/* AusSci · Has the universe always looked the same? (Year 10): the two model cards, the rating scales, the simulations'
   layout and the drawings. Views of space are drawn on a dark plate and diagrams on a paper-coloured plate, with fixed
   colours in light and dark mode alike. The Hubble, blackbody and ratings charts take their light and dark colours
   from the --viz variables. */

.section-title { font-size: 1.333rem; font-weight: 800; margin: 0; }
.section > * + * { margin-top: 0.8rem; }

/* ---------- the two models ---------- */
.two-models { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; max-width: 52rem; }
.model-card { border: 1px solid var(--rule); border-left-width: 0.4rem; border-radius: 3px; padding: 0.7rem 0.9rem; background: var(--box); }
.model-card p { margin: 0; font-size: 0.944rem; }
.model-card .label { margin-bottom: 0.25rem; }
.model-a { border-left-color: #c2410c; }
.model-b { border-left-color: #2563a8; }
@media (prefers-color-scheme: dark) { .model-a { border-left-color: #f0915e; } .model-b { border-left-color: #7fb0e8; } }

/* ---------- rating scales ---------- */
.rate { border: 0; padding: 0; margin: 0 0 0.8rem; min-width: 0; }
.rate legend { font-weight: 700; font-size: 0.944rem; margin-bottom: 0.35rem; padding: 0; }
.rate-scale { display: grid; grid-template-columns: repeat(10, minmax(0, 2.6rem)); gap: 0.25rem; }
.rate-scale label { position: relative; display: block; }
.rate-scale input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer; }
.rate-scale span { display: flex; align-items: center; justify-content: center; min-height: 2.4rem; border: 1px solid var(--ink-3); border-radius: 3px; background: var(--box); font-weight: 800; font-variant-numeric: tabular-nums; }
.rate-scale input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.rate-scale input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.rate-scale label:hover span { border-color: var(--ink); }

/* ---------- controls ---------- */
.ctl .label { margin-bottom: 0.3rem; }
.ctl-range label { display: block; font-size: 0.889rem; font-weight: 700; margin-bottom: 0.2rem; }
.ctl-range output { font-weight: 800; color: var(--y-deep); margin-left: 0.25rem; }
.ctl-range input[type="range"] { width: 100%; max-width: 36rem; accent-color: var(--accent); min-height: 2rem; }
.lab-run { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: end; }
.lab-run .ctl-range { flex: 1 1 16rem; }
.opt-row { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.bb-opt { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.889rem; font-weight: 700; cursor: pointer; min-height: 2rem; }
.bb-opt input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.bb-note { margin: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.seg .btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- layout ---------- */
.bb-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; align-items: start; max-width: 58rem; }
.bb-case { margin: 0; min-width: 0; }
.bb-case figcaption { font-size: 0.889rem; font-weight: 800; margin-bottom: 0.3rem; }
.bb-case .status { margin-top: 0.4rem; min-height: 3.2rem; }
.lad-card { border: 1px solid var(--rule); border-radius: 3px; padding: 0.6rem 0.85rem; background: var(--soft); max-width: 44rem; }
.lad-card p { margin: 0 0 0.25rem; }
.lad-card p:last-child { margin-bottom: 0; }
.lad-name { font-weight: 800; }
.st-read { border: 1px solid var(--rule); border-radius: 3px; padding: 0.6rem 0.85rem; background: var(--soft); max-width: 44rem; }
.st-read p { margin: 0 0 0.2rem; }
.he-temp { margin: 0; font-weight: 700; }
.bb-table summary { cursor: pointer; font-weight: 700; }
.table-wrap { overflow-x: auto; }
.bb-table table { border-collapse: collapse; font-size: 0.889rem; margin-top: 0.5rem; }
.bb-table th, .bb-table td { border-bottom: 1px solid var(--rule); padding: 0.25rem 0.6rem; text-align: right; font-variant-numeric: tabular-nums; }
.bb-table th[scope="row"], .bb-table thead th:first-child { text-align: left; }
.mel-link > * + * { margin-top: 0.8rem; }
.mel-evtext { margin: 0; max-width: 44rem; }
.mel-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; font-size: 0.833rem; font-weight: 700; }
.mel-key { display: inline-flex; align-items: center; gap: 0.4rem; }
.mel-keysvg { width: 3.4rem; height: 1rem; overflow: visible; }
.mel-detail { border: 1px solid var(--rule); border-radius: 3px; padding: 0.7rem 0.85rem; background: var(--soft); max-width: 44rem; }
.mel-detail > * + * { margin-top: 0.6rem; }
.mel-pick .label { margin-bottom: 0.3rem; }
.mel-pick .rpick[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mel-ex { margin: 0.4rem 0 0; font-size: 0.944rem; }
.tn-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.tn-first { border: 1px solid var(--rule); border-radius: 3px; padding: 0.6rem 0.85rem; background: var(--soft); }
.tn-first p { margin: 0 0 0.3rem; }
.tn-first .label { margin-bottom: 0.25rem; }
.tn-rate { font-weight: 700; }
.tn-text { white-space: pre-wrap; }

/* ---------- drawings: shared ---------- */
.dia { display: block; width: 100%; max-width: 46rem; height: auto; font-family: 'Atkinson Next', system-ui, sans-serif; touch-action: manipulation; }
.bb-two .dia { max-width: none; }
.plate { background: #fbfbf6; border: 1px solid #d8ded9; border-radius: 4px; color: #15231d; }
.dia text { fill: #15231d; pointer-events: none; }
.d-lab { font-size: 13px; fill: #34423c; }
.d-small { font-size: 11.5px; fill: #34423c; }
.dia .d-strong { font-weight: 800; fill: #15231d; }
.dia .d-muted { fill: #5f6b66; }
.dia .d-teal { fill: #0f6a6a; }
.dia .d-on-dark { fill: #dfe7ee; }
.dia .d-muted-dark { fill: #9fb0c0; }
.dia .d-warm { fill: #ffd29a; }
.dia .d-warn-ink { fill: #a33a17; font-weight: 700; }
.halo { paint-order: stroke; stroke: #fbfbf6; stroke-width: 3.5px; stroke-linejoin: round; }
.arrow line { stroke: #34423c; stroke-width: 1.3; }
.arrow-head { fill: #34423c; }

/* canvas drawings, with an SVG on top for labels and pointer input */
.art { position: relative; width: 100%; max-width: 46rem; }
.bb-two .art { max-width: none; }
.art-cv { display: block; width: 100%; height: auto; border-radius: 4px; background: #0b1626; }
.art .art-svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; overflow: visible; }
.dia .art-cap { paint-order: stroke; stroke: rgba(5, 11, 22, 0.8); stroke-width: 3px; stroke-linejoin: round; }
.wave-box { margin-bottom: 0.6rem; }
.wave-ar line { stroke: #dfe7ee; stroke-width: 1.4; }
.wave-ar .arrow-head { fill: #dfe7ee; }
.dia .wave-red { fill: #ffb6a6; }
.dia .wave-blue { fill: #b0d0ff; }

/* space */
.sky-dia { border-radius: 4px; background: #0b1626; }
.sky-fill { fill: #0b1626; }
.star { fill: #ffffff; }
.gx-arm { fill: none; stroke-width: 1.6; stroke-linecap: round; opacity: 0.85; }
.q-glow { fill: #cfe6ff; opacity: 0.35; }
.q-spike { stroke: #eaf4ff; stroke-width: 0.9; }
.q-core { fill: #ffffff; }

/* screen 2: distances */
.lad-sky { fill: #0b1626; }
.lad-earth { fill: #3b7cc0; stroke: #9cc3ea; stroke-width: 1; }
.lad-moon { fill: #d9d4c4; }
.lad-sun { fill: #ffd25a; stroke: #e8a514; stroke-width: 1.5; }
.lad-red { fill: #ff6b4a; }
.lad-you { fill: #ffe9a8; stroke: #0b1626; stroke-width: 1; }
.lad-leader { stroke: #ffe9a8; stroke-width: 1; }
.lad-scale path { fill: none; stroke: #dfe7ee; stroke-width: 1.4; }
.lad-span { stroke: rgba(223, 231, 238, 0.7); stroke-width: 1.1; stroke-dasharray: 4 4; }
.lad-axisbar { margin-top: 0.4rem; }
.lad-axis { stroke: #5f6b66; stroke-width: 1.2; }
.lad-unit { stroke: #0f6a6a; stroke-width: 2; }
.lad-mark { fill: #c2410c; }
.lad-ar line { stroke: #dfe7ee; stroke-width: 1.2; }
.lad-ar .arrow-head { fill: #dfe7ee; }
.lad-wave { fill: none; stroke: #ffd29a; stroke-width: 1.4; }
.cd-screen { stroke: #15231d; stroke-width: 3; stroke-linecap: round; }
.cd-ghost { stroke: #b9c2bd; stroke-width: 1.5; stroke-dasharray: 3 3; }
.cd-beam { fill: #ffd25a; opacity: 0.42; }
.cd-tick { stroke: #15231d; stroke-width: 1.2; }
.cd-star { fill: #ffd25a; stroke: #b07a00; stroke-width: 1.5; }
.cd-sq { fill: #f2b31c; }
.cd-frame { fill: none; stroke: #15231d; stroke-width: 1.4; }

/* screen 3: spectra */
.sp-rim { fill: none; stroke: #34423c; stroke-width: 1; }
.sp-line { fill: #0b0b0b; }
.sp-tick { stroke: #5f6b66; stroke-width: 1; }
.sp-lab { fill: #e7ebe8; }
.sp-labline { fill: #15231d; }
.sp-guide { stroke: #0f6a6a; stroke-width: 1; stroke-dasharray: 2 2; }
.sp-shift line { stroke: #c2410c; stroke-width: 1.3; }
.sp-shift .arrow-head { fill: #c2410c; }
.sp-zoomline { stroke: #5f6b66; stroke-width: 1; stroke-dasharray: 3 3; fill: none; }
.sp-zoombox { fill: none; stroke: #15231d; stroke-width: 1.2; }
.sp-labmark { stroke: #0f6a6a; stroke-width: 2; stroke-dasharray: 4 3; }
.sp-mline { stroke: #e2560f; stroke-width: 2; }
.sp-mhead { fill: #e2560f; stroke: #fbfbf6; stroke-width: 1; }
.sp-marker.is-idle { opacity: 0.55; }
.sp-hit { fill: transparent; cursor: ew-resize; }
.sp-soften { fill: #ffffff; opacity: 0.38; }
.sp-dia, .an-dia { touch-action: none; }

/* screen 4: every galaxy sees the same */
.home-gx { cursor: pointer; }
.home-hit { fill: transparent; }
.home-ghost { fill: none; stroke: #8fa3b8; stroke-width: 1; }
.home-ar line { stroke: #ffb27a; stroke-width: 1.3; }
.home-ar .arrow-head { fill: #ffb27a; }
.home-ring { fill: none; stroke: #ffe9a8; stroke-width: 2; }
.home-frame { fill: none; stroke: #3d4f63; stroke-width: 1; }

/* screen 5: the glow */
.st-path { fill: none; stroke: #c2410c; stroke-width: 2.4; stroke-linejoin: round; }
.st-bar { stroke: #15231d; stroke-width: 1.6; }
.an-art .art-svg { touch-action: none; cursor: crosshair; }
.an-rim { fill: none; stroke: rgba(223, 231, 238, 0.7); stroke-width: 1.2; }
.an-grid { fill: none; stroke: rgba(11, 22, 38, 0.45); stroke-width: 1; stroke-dasharray: 3 3; }
.an-tick { fill: none; stroke: #15231d; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.an-ret circle, .an-ret path { fill: none; stroke: #ffffff; stroke-width: 2; }
.an-ret { filter: drop-shadow(0 0 1.5px rgba(5, 11, 22, 0.9)); }
.an-axis-d { stroke: #8fa0b2; stroke-width: 1; }
.an-dot { fill: #ffb347; stroke: #0b1626; stroke-width: 1.5; }
.an-level { stroke: #ffb347; stroke-width: 1; stroke-dasharray: 4 3; }
.an-cap { margin: 0.45rem 0 0; max-width: 46rem; }

/* screen 6: helium */
.he-box { fill: #fff7ea; stroke: #c9b9a3; stroke-width: 1.5; }
.he-box.he-hot { fill: #fff0d6; stroke: #e2a02a; }
.he-box.he-cold { fill: #eef3f7; stroke: #9fb2c4; }
.he-p { fill: #d0543b; stroke: #7a2414; stroke-width: 1; }
.he-n { fill: #a8b0b6; stroke: #4b5359; stroke-width: 1; }
.dia .he-plus { fill: #ffffff; font-weight: 800; }
.he-sel { fill: none; stroke: #0f6a6a; stroke-width: 2.5; stroke-dasharray: 3 2; }
.he-hit { fill: transparent; cursor: pointer; }
.he-ph { fill: none; stroke: #b45309; stroke-width: 1.4; stroke-linecap: round; }
.he-ph-hot { stroke-width: 1.7; }
.he-ph-cold { stroke: #a16207; stroke-width: 1.1; opacity: 0.7; }
.he-ph-gamma { stroke: #6d28d9; stroke-width: 2.3; }
.he-burst { fill: none; stroke: #d97706; stroke-width: 2.5; }
.he-pulse { fill: none; stroke: #0f6a6a; stroke-width: 2.5; }
.he-bar-h { fill: #d0543b; }
.he-bar-n { fill: #a8b0b6; }
.he-bar-d { fill: #8a5bb0; }
.he-bar-he { fill: #2a78d6; }
.he-bar-star { fill: #7fb0e8; }
.he-bar-rim { fill: none; stroke: #15231d; stroke-width: 1.2; }

/* screen 7: looking back */
.lb-axis { stroke: #5f6b66; stroke-width: 1.2; }
.lb-now { fill: #c2410c; stroke: #fbfbf6; stroke-width: 2; }
.lb-frame { fill: none; stroke: #3d4f63; stroke-width: 1; }
.lb-art { border: 1px solid #d8ded9; border-radius: 4px; overflow: hidden; }
.lb-art .art-cv { border-radius: 0; background: #fbfbf6; }
.lb-glow { fill: #b4441f; opacity: 0.35; }

/* model-evidence link diagrams */
.mel-box { stroke-width: 1.5; }
.mel-ma { fill: #fdeee3; stroke: #c2410c; }
.mel-mb { fill: #e7f0fa; stroke: #2563a8; }
.mel-ev { fill: #ffffff; stroke: #5f6b66; }
.mel-line { fill: none; stroke: #15231d; stroke-width: 2; }
.mel-none .mel-line { stroke-dasharray: 5 4; }
.mel-empty .mel-line { stroke: #9aa5a0; stroke-width: 1.4; stroke-dasharray: 1.5 3.5; }
.dia .mel-q { fill: #5f6b66; font-weight: 800; }
.mel-x { stroke: #b4441f; stroke-width: 2.6; stroke-linecap: round; }
.mel-head { fill: #15231d; }
.mel-ar.is-diff .mel-line { stroke: #e2560f; stroke-width: 3; }
.mel-ar.is-diff .mel-head { fill: #e2560f; }
.mel-row.is-sel .mel-ev { stroke: #0f6a6a; stroke-width: 3; }
.mel-hit { fill: transparent; cursor: pointer; }
.mel-keysvg .mel-line { stroke: currentColor; }
.mel-keysvg .mel-head { fill: currentColor; }
.mel-keysvg .mel-x { stroke: #b4441f; }

/* screen 9: the timeline */
.tl-axis { stroke: #34423c; stroke-width: 1.4; }
.tl-dot { fill: #c2410c; stroke: #fbfbf6; stroke-width: 1.5; }
.tl-leader { fill: none; stroke: #8b968f; stroke-width: 1; }
.tl-ref { stroke: #0f6a6a; stroke-width: 2; }

/* ---------- charts ---------- */
.lab, .viz { --viz-surface: var(--box); --viz-ink: var(--ink); --viz-ink-2: var(--ink-2); --viz-muted: var(--ink-3); --viz-grid: #e3e8e4;
  --viz-s1: #2a78d6; --viz-s2: #eb6834; --viz-band-1: rgba(120, 90, 200, 0.07); --viz-band-2: rgba(200, 80, 40, 0.06); --viz-band-3: rgba(42, 120, 214, 0.08); }
@media (prefers-color-scheme: dark) {
  .lab, .viz { --viz-grid: #26332d; --viz-s1: #3987e5; --viz-s2: #d95926; --viz-band-1: rgba(150, 120, 230, 0.10); --viz-band-2: rgba(230, 110, 70, 0.09); --viz-band-3: rgba(57, 135, 229, 0.12); }
}
.viz { position: relative; max-width: 44rem; }
.viz svg { display: block; width: 100%; height: auto; font-family: 'Atkinson Next', system-ui, sans-serif; overflow: visible; touch-action: none; }
.viz .v-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz .v-axis { stroke: var(--viz-muted); stroke-width: 1; }
.viz .v-tick { fill: var(--viz-ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.viz .v-name { fill: var(--viz-ink-2); font-size: 12.5px; font-weight: 700; }
.viz .v-note { fill: var(--viz-ink); font-size: 12px; font-weight: 700; }
.viz .v-halo { paint-order: stroke; stroke: var(--viz-surface); stroke-width: 4px; stroke-linejoin: round; }
.viz .v-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz .v-s1 { stroke: var(--viz-s1); }
.viz .v-you { stroke: var(--viz-s2); stroke-width: 2.5; }
.viz .v-best { stroke: var(--viz-muted); stroke-dasharray: 6 4; }
.viz .v-ghost { stroke: var(--viz-muted); stroke-dasharray: 5 4; stroke-width: 1.5; }
.viz .v-dot { stroke: var(--viz-surface); stroke-width: 2; }
.viz .v-dot.v-s1 { fill: var(--viz-s1); }
.viz .v-handle { fill: var(--viz-s2); stroke: var(--viz-surface); stroke-width: 2; cursor: grab; }
.viz .v-handle.v-galaxy { fill: var(--viz-s1); }
.viz .v-cross { stroke: var(--viz-muted); stroke-width: 1; }
.viz .v-guide { stroke-dasharray: 2 3; }
.viz .st-bandbg { fill: transparent; }
.viz .st-b0 { fill: var(--viz-band-1); }
.viz .st-b2 { fill: var(--viz-band-2); }
.viz .st-b3 { fill: var(--viz-band-3); }
.viz .rt-before { fill: var(--viz-surface); stroke: var(--viz-s1); stroke-width: 2.5; }
.viz .rt-after { fill: var(--viz-s2); stroke: var(--viz-surface); stroke-width: 2; }
.viz .rt-ar line { stroke: var(--viz-muted); stroke-width: 1.5; }
.viz .rt-ar .arrow-head { fill: var(--viz-muted); }
.viz-tip { position: absolute; z-index: 3; pointer-events: none; background: var(--viz-ink); color: var(--viz-surface); border-radius: 4px; padding: 0.3rem 0.5rem; font-size: 0.778rem; line-height: 1.35; white-space: nowrap; transform: translate(-50%, -100%); }
.viz-tip b { font-weight: 800; }

@media (max-width: 640px) {
  .dia .d-small { font-size: 15px; }
  .dia .d-lab { font-size: 16px; }
  .two-models, .bb-two, .tn-two { grid-template-columns: minmax(0, 1fr); }
  .rate-scale { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .viz .v-tick, .viz .v-note { font-size: 15px; }
  .viz .v-name { font-size: 15px; }
}
