/* App chrome around the forge. Colours are the Tokyo Night variables set on .iso in forge.css. */
*{box-sizing:border-box}
html{color-scheme:dark}
body{margin:0;background:var(--anatomy-page);color:var(--anatomy-text);font:14px/1.6 ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
.top{display:flex;align-items:center;justify-content:space-between;gap:16px;width:min(1100px,100% - 32px);margin:24px auto 12px}
h1{margin:0;font-size:22px;color:var(--anatomy-strong);font-weight:600}
h2{margin:0 0 8px;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--anatomy-muted);font-family:var(--anatomy-mono);font-weight:500}
.app{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;width:min(1100px,100% - 32px);margin:0 auto 28px;align-items:start}
/* desktop: the figure left, the boxes in a second column that flows top to bottom */
.app>.figure{grid-area:figure}.app>.controls{grid-area:controls}.app>.explainer{grid-area:explainer}
.app{grid-template-areas:"figure" "controls" "explainer"}
/* desktop: the figure left with the explainer under it, the boxes in a second column that flows top to bottom */
@media (min-width:940px){.app{grid-template-columns:minmax(0,1fr) 340px;gap:16px 24px;grid-template-areas:"figure controls" "explainer controls"}}
.figure{min-width:0}
.iso-figure{margin:0}
.controls{display:flex;flex-direction:column;gap:14px;min-width:0}
.step{background:var(--anatomy-card);box-shadow:0 0 0 1px var(--anatomy-lo);border-radius:6px;padding:14px 16px}
.step p{margin:6px 0}
.step[hidden]{display:none}
.hint{color:var(--anatomy-muted);font-size:12.5px}
label{display:block;color:var(--anatomy-strong);margin-bottom:4px}
input[type=file]{max-width:100%;color:var(--anatomy-text)}
input[type=file]::file-selector-button{font:inherit;padding:5px 10px;margin-right:10px;background:var(--tn-bg-hi);color:var(--anatomy-strong);border:0;border-radius:4px;cursor:pointer}
#drop.over{box-shadow:0 0 0 2px var(--anatomy-blue)}
button{font:inherit;padding:7px 14px;background:var(--anatomy-blue);color:var(--anatomy-page);border:0;border-radius:4px;cursor:pointer;font-weight:600}
button:hover{filter:brightness(1.08)}
button:disabled{background:var(--anatomy-faint);color:var(--anatomy-muted);cursor:default;filter:none}
button:focus-visible,input:focus-visible,a:focus-visible{outline:2px solid var(--tn-cyan);outline-offset:2px}
.krow{display:flex;justify-content:space-between;align-items:baseline}
.krow label{margin:0}
output{font-family:var(--anatomy-mono);color:var(--anatomy-strong);font-size:16px}
input[type=range]{width:100%;margin:4px 0;accent-color:var(--anatomy-blue)}
code{font-family:var(--anatomy-mono);font-size:15px;letter-spacing:.08em;color:var(--tn-teal);word-break:break-all}
#eq,#dims{font-family:var(--anatomy-mono);font-size:12.5px;color:var(--tn-cyan)}
#status{color:var(--anatomy-strong)}
#status .spin,#out .spin{display:inline-block;width:12px;height:12px;border:2px solid var(--anatomy-blue);border-top-color:transparent;border-radius:50%;animation:s .8s linear infinite;vertical-align:-2px;margin-right:6px}
@keyframes s{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){#status .spin,#out .spin{animation:none;border-top-color:var(--anatomy-blue);opacity:.6}}
a{color:var(--tn-cyan)}
/* the explainer: the figure's legend and caption, below the boxes */
.explainer{color:var(--anatomy-muted);font-size:13px;line-height:1.55;padding:2px 2px 0}
.explainer .iso-legend{margin-top:0}
/* tabs: shown by app.js when the figure and the boxes do not fit one screen */
.tabs{display:flex;gap:4px;padding:3px;background:var(--anatomy-card);box-shadow:0 0 0 1px var(--anatomy-lo);border-radius:6px}
.tabs[hidden]{display:none}
.tabs [role=tab]{flex:1;padding:7px 4px;background:transparent;color:var(--anatomy-text);font-weight:500;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:4px}
.tabs [role=tab][aria-selected=true]{background:var(--tn-bg-hi);color:var(--anatomy-strong)}
.tabs [role=tab]:disabled{background:transparent;color:var(--anatomy-muted)}
.tabbed .step:not(.active){display:none}
textarea{width:100%;font-family:var(--anatomy-mono);font-size:11.5px;line-height:1.4;color:var(--tn-teal);background:var(--tn-bg-hi);border:0;border-radius:4px;padding:8px;resize:vertical;word-break:break-all}
.row{display:flex;gap:12px;align-items:center}
.row button{padding:4px 10px;font-size:12.5px}
#fp{font-family:var(--anatomy-mono);font-size:12px;color:var(--tn-cyan);word-break:break-all}
.hint code{font-size:12px;letter-spacing:0;color:var(--anatomy-strong)}
#out[hidden]{display:none}
