:root { --ec-blue:#149bd7; --ec-blue-dark:#006b99; --ec-ink:#102131; --ec-muted:#526c7a; --ec-line:#c9dbe6; --ec-green:#157347; --ec-amber:#8a6100; }
* { box-sizing:border-box; }
[hidden] { display:none!important; }
html,body { min-height:100%; }
body { margin:0; color:var(--ec-ink); background:#edf5f9; font-family:Arial,Helvetica,sans-serif; }
button,input,select { font:inherit; }
.app { min-height:100vh; display:grid; grid-template-rows:auto minmax(0,1fr); }
.topbar { min-height:72px; display:grid; grid-template-columns:minmax(260px,1fr) auto; align-items:center; gap:16px; padding:11px 18px; color:#fff; background:#071018; }
.brand { min-width:0; display:flex; align-items:center; gap:14px; }.brand-logo { min-height:44px; display:inline-flex; align-items:center; border-radius:6px; }.brand-logo img { width:142px; height:auto; display:block; }.brand h1 { margin:0; color:#fff; font-size:clamp(1.35rem,2vw,2rem); line-height:1.05; }
.top-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; }.icon-button { width:48px; min-width:48px; min-height:48px; display:inline-grid; place-items:center; padding:0; border:2px solid #263d51; border-radius:8px; color:#fff; background:#122436; cursor:pointer; }.icon-button:hover,.icon-button:focus-visible { border-color:#8fd8f3; color:#06111a; background:var(--ec-blue); }.icon { width:24px; height:24px; display:block; pointer-events:none; }.home-button { min-height:48px; display:inline-flex; align-items:center; justify-content:center; padding:0 14px; border:2px solid #263d51; border-radius:8px; color:#fff; background:#122436; font-weight:800; text-decoration:none; }.home-button:hover,.home-button:focus-visible { border-color:#8fd8f3; color:#06111a; background:var(--ec-blue); }
.ec-app { min-height:calc(100vh - 72px); display:grid; grid-template-rows:auto minmax(0,1fr); color:var(--ec-ink); background:#edf5f9; }
.ec-toolbar { min-height:68px; display:flex; align-items:center; gap:10px; padding:10px 16px; border-bottom:1px solid var(--ec-line); background:#fff; }.ec-setup { min-width:0; flex:1 1 auto; }.ec-setup summary { min-height:48px; display:flex; align-items:center; gap:10px; padding:7px 12px; border:1px solid #9fb8c8; border-radius:8px; color:var(--ec-ink); background:#f7fbfd; cursor:pointer; }.ec-setup summary::marker { color:var(--ec-blue-dark); }.ec-setup summary span { color:var(--ec-blue-dark); font-weight:900; }.ec-setup summary strong { min-width:0; color:var(--ec-muted); font-size:.88rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.ec-setup[open] summary { border-color:var(--ec-blue-dark); background:#eaf8ff; }.ec-setup-panel { display:flex; flex-wrap:wrap; align-items:end; gap:10px; padding:12px 0 2px; }.ec-toolbar fieldset { min-width:0; margin:0; padding:0; border:0; }.ec-toolbar legend,.ec-mode-select,.ec-givens label,.ec-reason { color:var(--ec-muted); font-size:.78rem; font-weight:800; }.ec-mode-select { min-width:230px; display:grid; gap:5px; }.ec-mode-select select { min-height:48px; padding:7px 38px 7px 10px; border:1px solid #9fb8c8; border-radius:8px; color:var(--ec-ink); background:#fff; font-weight:800; }.ec-mode-select select:focus-visible { border-color:var(--ec-blue-dark); outline:3px solid rgba(20,155,215,.3); outline-offset:2px; }.ec-segmented { display:flex; flex-wrap:wrap; gap:6px; margin-top:5px; }.ec-segmented label { min-height:48px; display:inline-flex; align-items:center; cursor:pointer; }.ec-segmented input { position:absolute; opacity:0; pointer-events:none; }.ec-segmented span { min-height:48px; display:flex; align-items:center; justify-content:center; padding:7px 10px; border:1px solid #9fb8c8; border-radius:8px; color:var(--ec-ink); background:#fff; font-weight:800; }.ec-segmented input:checked + span { border-color:var(--ec-blue-dark); color:#fff; background:var(--ec-blue-dark); }.ec-segmented input:focus-visible + span { outline:3px solid rgba(20,155,215,.3); outline-offset:2px; }.ec-year-choices span,.ec-operation-choices span { min-width:48px; font-size:1.08rem; }
.ec-givens { display:flex; align-items:end; gap:7px; }.ec-givens label { display:grid; gap:5px; }.ec-givens input { width:116px; min-height:48px; padding:8px 10px; border:1px solid #9fb8c8; border-radius:8px; font-weight:900; }.ec-setup-actions { display:flex; flex-wrap:wrap; gap:7px; }.ec-button { min-height:48px; padding:0 14px; border:1px solid #9fb8c8; border-radius:8px; color:var(--ec-ink); background:#fff; font-weight:800; cursor:pointer; }.ec-button:hover,.ec-button:focus-visible { border-color:var(--ec-blue-dark); box-shadow:0 0 0 3px rgba(20,155,215,.18); outline:0; }.ec-button.ec-primary { border-color:var(--ec-blue-dark); color:#fff; background:var(--ec-blue); }.ec-button:disabled { opacity:.45; cursor:not-allowed; }
.ec-workspace { min-width:0; min-height:0; display:grid; grid-template-columns:minmax(0,760px); justify-content:center; align-items:start; gap:14px; padding:14px; }.ec-workspace.ec-journey-visible { grid-template-columns:minmax(410px,47%) minmax(0,1fr); justify-content:stretch; align-items:stretch; }.ec-work-panel,.ec-model-panel { min-width:0; min-height:0; border:1px solid var(--ec-line); border-radius:12px; background:#fff; box-shadow:0 8px 22px rgba(7,32,48,.07); }.ec-work-panel { overflow:auto; padding:14px; }.ec-model-panel { display:grid; grid-template-rows:auto minmax(0,1fr); place-items:stretch; overflow:hidden; padding:12px; }.ec-model-panel > h2 { margin:0 0 8px; color:var(--ec-muted); font-size:.9rem; }.ec-model-host { min-height:0; display:grid; place-items:stretch; overflow:hidden; }.ec-model-host .question-visual { width:100%; height:100%; min-width:0; min-height:0; margin:0; display:grid; grid-template-rows:minmax(0,1fr) auto; overflow:hidden; }.ec-model-host .diagram-frame,.ec-model-host svg { width:100%; height:100%; min-height:0; max-height:100%; }.ec-model-host .model-number-sentence { margin:6px 0 0; overflow-wrap:anywhere; }.ec-model-host figcaption { position:absolute; left:-10000px; width:1px; height:1px; overflow:hidden; white-space:nowrap; }
.ec-prompt-card { margin-bottom:10px; padding:10px 14px; border-radius:9px; color:#fff; background:#073047; }.ec-prompt-card h2 { margin:0; color:#fff; font-size:clamp(1.35rem,2.5vw,2rem); }
.ec-compare-panel { margin-bottom:10px; padding:10px; border:1px solid #d4b15a; border-radius:9px; background:#fffaf0; }.ec-compare-panel h3 { margin:0 0 8px; font-size:1rem; }.ec-compare-panel article { display:grid; grid-template-columns:140px minmax(0,1fr); gap:2px 8px; padding:7px 0; border-top:1px solid #ead8a8; }.ec-compare-panel article:first-of-type { border-top:0; }.ec-compare-panel span { font-weight:900; }.ec-compare-panel small { grid-column:2; color:var(--ec-muted); }
.ec-stage-card { min-height:205px; padding:13px; border:1px solid var(--ec-line); border-radius:9px; }.ec-stage-heading { display:flex; align-items:baseline; gap:8px; margin-bottom:10px; }.ec-stage-heading span { color:var(--ec-blue-dark); font-size:.76rem; font-weight:900; letter-spacing:.04em; text-transform:uppercase; }.ec-stage-heading h3 { margin:0; font-size:1.1rem; }.ec-stage-card p { margin:6px 0 12px; line-height:1.4; }.ec-stage-card label:not(.ec-segmented label),.ec-stage-card fieldset legend { display:grid; gap:5px; color:var(--ec-muted); font-size:.82rem; font-weight:800; }.ec-stage-card input[type="text"],.ec-stage-card select { min-height:48px; padding:8px 10px; border:1px solid #9fb8c8; border-radius:8px; color:var(--ec-ink); background:#fff; font-size:1.08rem; font-weight:900; }.ec-range-inputs,#ecExactEntry { display:flex; flex-wrap:wrap; gap:10px; }.ec-range-inputs label,#ecExactEntry label { flex:1 1 150px; }.ec-strategy-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }.ec-strategy-grid label { min-height:68px; display:flex!important; align-items:flex-start; gap:8px; padding:9px; border:1px solid #9fb8c8; border-radius:8px; color:var(--ec-ink)!important; background:#f7fbfd; cursor:pointer; }.ec-strategy-grid label:has(input:checked) { border:2px solid var(--ec-blue-dark); background:#eaf8ff; }.ec-strategy-grid input { margin-top:3px; accent-color:var(--ec-blue-dark); }.ec-strategy-grid span,.ec-strategy-grid strong,.ec-strategy-grid small { display:block; }.ec-strategy-grid small { margin-top:3px; color:var(--ec-muted); line-height:1.25; }.ec-reason { display:grid; gap:5px; margin-top:10px; }.ec-reason select { width:100%; }.ec-transformation,.ec-inverse,.ec-candidate { padding:10px 12px; border-radius:7px; color:#073047; background:#eaf8ff; font-size:1.08rem; font-weight:900; }.ec-direction { margin:12px 0 0; padding:0; border:0; }.ec-candidate { background:#fff0c9; }.ec-remainder-rule { color:var(--ec-muted); font-weight:800; }
.ec-stage-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }.ec-hint { min-height:1.2em; margin:9px 0 0; color:var(--ec-amber); font-weight:800; line-height:1.35; }.ec-feedback { min-height:52px; display:flex; align-items:center; margin:8px 0 0; padding:10px 12px; border-left:5px solid #6f8794; border-radius:7px; background:#f2f7fa; font-weight:800; line-height:1.4; }.ec-feedback:empty { display:none; }.ec-feedback[data-tone="success"] { border-left-color:var(--ec-green); color:#0b5934; background:#eef9f3; }.ec-feedback[data-tone="warning"] { border-left-color:#b07a00; color:#704e00; background:#fff8e7; }.ec-related { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:10px; color:var(--ec-muted); font-size:.82rem; font-weight:800; }.ec-related a { min-height:44px; display:inline-flex; align-items:center; padding:0 10px; border:1px solid #9fb8c8; border-radius:7px; color:#075d86; text-decoration:none; }.ec-related a:hover,.ec-related a:focus-visible { border-color:var(--ec-blue-dark); background:#eaf8ff; }
.ec-app > .ec-print-surface { display:none; }.ec-instructions { width:min(760px,calc(100vw - 28px)); max-height:calc(100vh - 28px); padding:0; border:0; border-radius:11px; color:var(--ec-ink); box-shadow:0 24px 70px rgba(0,0,0,.35); }.ec-instructions::backdrop { background:rgba(4,19,29,.62); }.ec-dialog-header { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:14px 17px; color:#fff; background:#071018; }.ec-dialog-header h2 { margin:0; }.ec-dialog-body { padding:17px 20px; line-height:1.52; overflow:auto; }.ec-dialog-body li { margin-bottom:7px; }.ec-app:focus-visible { outline:4px solid rgba(20,155,215,.4); outline-offset:-4px; }
@media (prefers-reduced-motion:reduce) { .ec-app * { scroll-behavior:auto!important; transition:none!important; animation:none!important; } }
@media (min-width:1101px) { .ec-app { height:calc(100vh - 72px); overflow:hidden; } }
@media (max-width:1100px) { .app { display:block; }.topbar { grid-template-columns:1fr; }.top-actions { justify-content:flex-start; flex-wrap:wrap; }.ec-toolbar { align-items:flex-start; }.ec-workspace,.ec-workspace.ec-journey-visible { grid-template-columns:minmax(0,760px); justify-content:center; }.ec-work-panel { overflow:visible; }.ec-model-panel { min-height:470px; }.ec-app { display:block; min-height:0; } }
@media (max-width:600px) { .topbar { padding-inline:12px; }.brand { align-items:flex-start; flex-direction:column; gap:6px; }.brand-logo img { width:124px; }.ec-toolbar { padding:9px; }.ec-mode-select { width:100%; }.ec-setup summary { align-items:flex-start; flex-direction:column; gap:2px; }.ec-setup summary strong { width:100%; }.ec-givens { width:100%; flex-wrap:wrap; }.ec-givens label { flex:1 1 42%; }.ec-givens input { width:100%; }.ec-workspace { padding:8px; }.ec-work-panel,.ec-model-panel { padding:9px; }.ec-strategy-grid { grid-template-columns:1fr; }.ec-stage-actions .ec-button { flex:1 1 42%; }.ec-model-panel { min-height:410px; } }
@media print {
  @page { size:A4 landscape; margin:8mm; }
  html,body { width:100%; height:auto!important; overflow:visible!important; background:#fff!important; }
  .topbar,.ec-toolbar,.ec-stage-actions,.ec-hint,.ec-feedback,.ec-related,.ec-instructions,.classroom-tools-layer,.annotation-toolbar { display:none!important; }
  .ec-model-panel[hidden] { display:grid!important; }
  .app,.ec-app,.ec-workspace { min-height:0!important; height:auto!important; }.ec-app { display:block; background:#fff; }.ec-workspace,.ec-workspace.ec-journey-visible { display:grid!important; grid-template-columns:82mm minmax(0,1fr); gap:5mm; padding:0; }.ec-work-panel,.ec-model-panel { height:145mm; overflow:hidden; border:1px solid #93a9b7; box-shadow:none; padding:4mm; }.ec-prompt-card { margin-bottom:2mm; padding:3mm; }.ec-prompt-card h2 { font-size:17pt; }.ec-compare-panel { font-size:8pt; }.ec-stage-card { min-height:0; padding:3mm; font-size:9pt; }.ec-model-host .diagram-frame,.ec-model-host svg { min-height:125mm; }.ec-app > .ec-print-surface { position:fixed; left:8mm; right:8mm; bottom:4mm; display:flex!important; justify-content:space-between; align-items:end; padding-top:2mm; border-top:1px solid #c7d7df; color:var(--ec-muted); font-size:8pt; }.ec-print-surface .print-logo { width:34mm; height:auto; }
}
