/* eduapphub app kit – shared look for every app (light, navy/gold like the site) */
:root{--navy:#0e4479;--navy2:#1b66ca;--gold:#a07749;--gold-soft:#f7f0e6;--bg:#fff;--panel:#f6f8fc;--panel2:#eef3f9;--line:#e1e6ee;--text:#1f2430;--muted:#5d6475;--ok:#1f8a4c;--ok-soft:#e6f6ec;--bad:#c0392b;--bad-soft:#fdecea;--warn:#b7791f;--r:12px;--shadow:0 1px 2px rgba(16,30,54,.06),0 6px 18px rgba(16,30,54,.07);--font:Inter,"Segoe UI",system-ui,-apple-system,Roboto,"Helvetica Neue",Arial,sans-serif}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font:15px/1.55 var(--font);-webkit-text-size-adjust:100%}
.eah{max-width:1180px;margin:0 auto;padding:18px 18px 28px}
.eah-head{display:flex;align-items:flex-start;gap:14px;justify-content:space-between;flex-wrap:wrap;margin-bottom:16px}
.eah-head h1{margin:0;font-size:1.35rem;line-height:1.25;color:var(--navy);font-weight:700}
.eah-head p{margin:4px 0 0;color:var(--muted);font-size:.93rem;max-width:760px}
.eah-actions{display:flex;gap:8px;flex-wrap:wrap}
.eah-grid{display:grid;grid-template-columns:minmax(280px,380px) 1fr;gap:18px;align-items:start}
.eah-grid.one{grid-template-columns:1fr}
.eah-card{background:#fff;border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);padding:16px 18px;margin-bottom:16px;min-width:0}
.eah-card>h2,.eah-h2{font-size:.82rem;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);margin:0 0 12px;font-weight:700;display:flex;align-items:center;gap:8px}
.eah-card h3{font-size:1rem;margin:16px 0 8px;color:var(--navy)}
.eah-sticky{position:sticky;top:10px}
.eah-field{margin-bottom:12px}
.eah-field label,.eah-label{display:block;font-weight:600;font-size:.88rem;margin-bottom:5px}
.eah-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px}
.eah input[type=text],.eah input[type=number],.eah input:not([type]),.eah select,.eah textarea{font:inherit;width:100%;min-height:42px;padding:8px 12px;border:1px solid #c9d1dc;border-radius:10px;background:#fbfcfe;color:var(--text)}
.eah textarea{min-height:90px;resize:vertical}
.eah input:focus,.eah select:focus,.eah textarea:focus{outline:none;border-color:var(--navy2);box-shadow:0 0 0 3px rgba(27,102,202,.16);background:#fff}
.eah input.is-bad{border-color:var(--bad);background:var(--bad-soft)}
.eah-unit{display:flex;align-items:center;gap:6px}
.eah-unit span{color:var(--muted);font-size:.85rem;white-space:nowrap}
.eah-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:8px 16px;border-radius:10px;border:1px solid transparent;font:inherit;font-weight:600;cursor:pointer;background:var(--navy);color:#fff;text-decoration:none;transition:background .15s}
.eah-btn:hover{background:var(--navy2)}
.eah-btn.light{background:#fff;color:var(--text);border-color:var(--line)}
.eah-btn.light:hover{background:var(--panel2);color:var(--navy)}
.eah-btn.gold{background:var(--gold)}.eah-btn.gold:hover{background:#8a6339}
.eah-btn.red{background:var(--bad)}
.eah-btn.sm{min-height:32px;padding:4px 10px;font-size:.85rem}
.eah-btn[disabled]{opacity:.5;pointer-events:none}
.eah-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 0}
.eah-chip{display:inline-flex;align-items:center;gap:4px;padding:4px 11px;border-radius:999px;border:1px solid var(--line);background:#fff;color:var(--navy);font-size:.82rem;font-weight:600;cursor:pointer}
.eah-chip:hover{border-color:var(--navy);background:var(--panel2)}
.eah-tabs{display:flex;gap:4px;border-bottom:2px solid var(--line);margin-bottom:14px;overflow-x:auto}
.eah-tabs button{border:0;background:none;font:inherit;font-weight:600;color:var(--muted);padding:9px 14px;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-2px;white-space:nowrap}
.eah-tabs button[aria-selected=true]{color:var(--navy);border-bottom-color:var(--navy)}
.eah-result{background:linear-gradient(135deg,var(--ok-soft),#f4fbf7);border:1px solid #bfe3cd;border-radius:var(--r);padding:14px 16px}
.eah-result .big{font-size:1.6rem;font-weight:800;color:#0f5132;line-height:1.2;word-break:break-all}
.eah-result.bad{background:var(--bad-soft);border-color:#f3c4bd}.eah-result.bad .big{color:var(--bad)}
.eah-kv{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.eah-kv>div{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:8px 12px}
.eah-kv b{display:block;font-size:1.15rem;color:var(--navy)}
.eah-kv span{font-size:.8rem;color:var(--muted)}
.eah-table{width:100%;border-collapse:collapse;font-size:.92rem}
.eah-table th,.eah-table td{border-bottom:1px solid var(--line);padding:7px 9px;text-align:center}
.eah-table th{background:var(--panel2);color:var(--navy);font-weight:700}
.eah-scroll{overflow-x:auto;max-width:100%}
.eah-steps{counter-reset:s;list-style:none;padding:0;margin:0}
.eah-steps>li{counter-increment:s;position:relative;padding:6px 0 6px 36px;border-bottom:1px dashed var(--line)}
.eah-steps>li::before{content:counter(s);position:absolute;left:0;top:6px;width:24px;height:24px;border-radius:50%;background:var(--navy);color:#fff;display:grid;place-items:center;font-size:.78rem;font-weight:700}
.eah-note{background:var(--gold-soft);border-left:4px solid var(--gold);border-radius:8px;padding:9px 12px;font-size:.9rem;color:#5c4224;margin:10px 0}
.eah-muted{color:var(--muted)}.eah-small{font-size:.85rem}
.eah-ok{color:var(--ok);font-weight:700}.eah-bad{color:var(--bad);font-weight:700}
.eah-toast{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);background:#222;color:#fff;padding:9px 16px;border-radius:999px;font-size:.9rem;z-index:99}
.eah-canvas{width:100%;border:1px solid var(--line);border-radius:10px;background:#fff;display:block}
.eah-empty{color:var(--muted);padding:18px;text-align:center;background:var(--panel);border-radius:10px}
.eah-foot{margin-top:6px;font-size:.8rem;color:var(--muted);text-align:center}
@media (max-width:860px){.eah-grid{grid-template-columns:1fr}.eah-sticky{position:static}.eah{padding:12px}}

/* ---------- skin for the original apps (keeps their scripts and ids) ---------- */
body.eah-skin{background:#fff!important;min-width:0!important}
.eah-skin #app-body-app,.eah-skin #app-main-window{background:#fff;min-width:0!important}
.eah-skin #app-container-app{width:auto!important;max-width:1180px!important;margin:0 auto!important;padding:0 18px 24px!important;display:block!important;border:0!important}
.eah-skin #app-container-inputs,.eah-skin #app-container-results,.eah-skin #app-container-input-area{position:static!important;top:auto!important;width:100%!important;margin:0 0 16px!important;padding:16px 18px!important;background:#fff!important;border:1px solid var(--line)!important;border-radius:var(--r)!important;box-shadow:var(--shadow)!important;display:block!important}
.eah-skin #app-container-input-area{box-shadow:none!important;background:var(--panel)!important;min-width:0!important}
.eah-skin #app-container-break{display:none}
.eah-skin #results-head,.eah-skin .inputs-main-title,.eah-skin #inputs-area-head{font-size:.82rem!important;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)!important;font-weight:700!important;padding:0 0 10px!important;margin:0!important;border:0!important}
.eah-skin .results-subhead{color:var(--navy)!important;font-weight:700!important;font-size:1rem!important;margin:16px 0 8px!important;padding:8px 0 0!important;border-top:1px solid var(--line);width:100%}
.eah-skin .results-row,.eah-skin .inputs-row{display:flex;flex-wrap:wrap!important;gap:10px 18px!important;align-items:center!important;margin:6px 0!important;width:100%!important;height:auto!important}
.eah-skin .results-result,.eah-skin .results-element{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:6px 12px!important;min-width:140px;width:auto!important;margin:0!important}
.eah-skin .inputs-title{font-weight:600;color:var(--text)!important;width:auto!important;min-width:0!important}
.eah-skin input[type=text],.eah-skin input[type=number],.eah-skin .input-input,.eah-skin .area-input,.eah-skin .app-input,.eah-skin textarea{font:inherit!important;min-height:40px!important;height:auto!important;padding:7px 11px!important;border:1px solid #c9d1dc!important;border-radius:10px!important;background:#fbfcfe!important;color:var(--text)!important;box-shadow:none!important}
.eah-skin input:focus,.eah-skin textarea:focus{outline:none!important;border-color:var(--navy2)!important;box-shadow:0 0 0 3px rgba(27,102,202,.16)!important;background:#fff!important}
.eah-skin input[type=range]{accent-color:var(--navy);width:100%;min-height:0!important;border:0!important;background:transparent!important}
.eah-skin .button,.eah-skin .button2,.eah-skin .button-red,.eah-skin .button-passive,.eah-skin .app-button-submit,.eah-skin .add-area,.eah-skin button{font:inherit!important;font-weight:600!important;border-radius:10px!important;border:1px solid transparent!important;min-height:40px;padding:8px 16px!important;cursor:pointer;box-shadow:none!important}
.eah-skin .button,.eah-skin .app-button-submit{background:var(--navy)!important;color:#fff!important}
.eah-skin .button:hover{background:var(--navy2)!important}
.eah-skin .button-red{background:var(--bad)!important;color:#fff!important}
.eah-skin .button2,.eah-skin .button-passive{background:#fff!important;color:var(--text)!important;border-color:var(--line)!important}
.eah-skin table{border-collapse:collapse}
.eah-skin svg,.eah-skin canvas{max-width:100%}
.eah-skin .area-type{border-radius:8px}
.eah-skin mjx-container{font-size:105%!important}
@media (max-width:860px){.eah-skin #app-container-app{padding:0 10px 18px!important}.eah-skin .results-result,.eah-skin .results-element{min-width:0;flex:1 1 140px}}
/* games keep their own artwork; only the frame is modernised */
body.eah-game{min-width:0!important;margin:0}
.eah-game #app-main-window,.eah-game #app-container-app{border-radius:16px;overflow:hidden}
.eah-skin .inputs-input{width:auto!important;height:auto!important;flex:0 0 auto}
.eah-skin .inputs-title{flex:0 0 auto;height:auto!important}
.eah-skin .inputs-row{padding:0!important;height:auto!important}
.eah-skin .eah-chip,.eah .eah-chip{white-space:nowrap;width:auto!important;height:auto!important;min-height:0!important;flex:0 0 auto;border:1px solid var(--line)!important;background:#fff!important;line-height:1.3!important;margin:0!important}
.eah-skin .eah-chip:hover{border-color:var(--navy)!important;background:var(--panel2)!important}
.eah-skin .results-row[style*="display: none"],.eah-skin .inputs-row[style*="display: none"],.eah-skin #app-container-input-area[style*="display: none"]{display:none!important}
@media (max-width:900px){.eah-skin .input-input{width:96px!important}.eah-skin .inputs-row{gap:8px 12px}}
.eah-skin input[type=range]{min-width:160px;flex:1 1 180px;height:auto!important}.eah-skin .slidecontainer{display:flex;align-items:center;gap:10px;flex:1 1 300px}
.eah-skin .inputs-input:has(.slidecontainer){flex:1 1 260px!important;width:auto!important;max-width:460px}.eah-skin .slider{-webkit-appearance:auto!important;appearance:auto!important;background:transparent!important;opacity:1!important;height:auto!important}
@media (max-width:560px){
.eah-skin .inputs-row{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 12px;align-items:center}
.eah-skin .inputs-row>div:not([class]){display:none}
.eah-skin .inputs-row .input-input{width:100%!important;max-width:220px}
.eah-skin .inputs-input:has(.slidecontainer){grid-column:1/-1}
.eah-skin #app-container-input-area,.eah-skin #app-container-inputs,.eah-skin #app-container-results{overflow-x:auto}
.eah-skin #area-list,.eah-skin #G-list{overflow-x:auto}
.eah-skin #app-container-input-area div{flex-wrap:wrap!important;max-width:100%}.eah-skin #app-container-input-area img{max-width:100%;height:auto}
}
