/* AusSci · Why isn't there an eclipse every month? (Year 7): the pairs of cases, the safety box, the simulations' layout,
   and the drawings. Diagrams of space from above or from the side are drawn on a paper-coloured plate, and views of
   the sky on a dark plate, with fixed colours in light and dark mode alike. The tide graphs are charts: they 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 cases on each screen ---------- */
.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; max-width: 44rem; }
.cases-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case { border: 1px solid var(--rule); border-radius: 3px; padding: 0.6rem 0.85rem; background: var(--box); }
.case p { margin: 0; font-size: 0.944rem; }
.case .case-tag { font-size: 0.778rem; font-weight: 800; color: var(--y-deep); margin-bottom: 0.15rem; }
.safety { border: 2px solid #b4441f; border-left-width: 0.45rem; border-radius: 3px; padding: 0.7rem 1rem; background: #fdf0ea; color: #3b1a0d; max-width: 44rem; }
.safety .label { color: #9a3412; }
.safety p { margin: 0; }
@media (prefers-color-scheme: dark) { .safety { background: #2a1610; color: #f6dccf; border-color: #e0794f; } .safety .label { color: #f3a27c; } }

/* ---------- 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; }
.opt-row { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.sem-opt { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.889rem; font-weight: 700; cursor: pointer; min-height: 2rem; }
.sem-opt input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }

/* ---------- layout of the simulations ---------- */
.sem-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; align-items: start; max-width: 58rem; }
.sem-wide { max-width: 46rem; }
.ec-two .sem-case { max-width: 22rem; }
.sem-case { margin: 0; min-width: 0; }
.sem-case figcaption { font-size: 0.833rem; font-weight: 700; color: var(--ink-2); margin-bottom: 0.3rem; }
.orbit-two { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.tilt-two { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.ec-two { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; }
.ec-note .status { font-size: 1rem; }
.sem-when { margin: 0; }
.sem-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.sem-card { margin: 0; border: 1px dashed var(--rule); border-radius: 3px; padding: 0.5rem 0.6rem; }
.sem-card.is-seen { border-style: solid; border-color: var(--ok); }
.sem-card figcaption { font-size: 0.833rem; font-weight: 800; margin-bottom: 0.3rem; }
.sem-card .small { margin: 0; }
.sem-card-pics { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0.4rem; align-items: center; }
.tm-line { max-width: 36rem; }
.sh-mini { max-width: 21rem; }
.sem-fig-note { margin: 0.35rem 0 0; }

/* the moons of the model year on screen 5 */
.moon-strip { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 0.25rem; }
.mstrip-btn { font: inherit; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.3rem 0.1rem; border: 1px solid var(--rule); border-radius: 3px; background: var(--box); color: var(--ink); cursor: pointer; min-height: 3.3rem; }
.mstrip-btn:hover { border-color: var(--ink-3); }
.mstrip-btn[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.mstrip-dot { width: 0.95rem; height: 0.95rem; border-radius: 50%; background: #e9e4d4; border: 1px solid #8d8a80; }
.mstrip-btn.is-new .mstrip-dot { background: #2b3036; border-color: #8d8a80; }
.mstrip-btn.is-ecl .mstrip-dot { box-shadow: 0 0 0 2px #c0532e; }
.mstrip-btn.is-full.is-ecl .mstrip-dot { background: #a2482b; }
.mstrip-n { font-size: 0.778rem; font-weight: 800; }
.mstrip-t { font-size: 0.667rem; color: #a33a17; font-weight: 700; min-height: 0.8rem; }
@media (prefers-color-scheme: dark) { .mstrip-t { color: #f09a74; } }

/* the year grids on screen 8 */
.yr-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.35rem; }
.yr-cell { border: 1px solid var(--rule); border-radius: 3px; padding: 0.35rem; background: var(--box); display: flex; flex-wrap: wrap; gap: 0.25rem; align-content: flex-start; min-height: 4.2rem; }
.yr-cell.is-season { background: var(--y-tint); border-color: var(--y-stripe); }
.yr-h { width: 100%; margin: 0; font-size: 0.778rem; font-weight: 800; color: var(--ink-2); }
.mchip { font: inherit; font-size: 0.833rem; font-weight: 700; display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.2rem 0.45rem; border: 1px solid var(--ink-3); border-radius: 999px; background: var(--box); color: var(--ink); cursor: pointer; min-height: 2.1rem; }
.mchip-i { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: #e9e4d4; border: 1px solid #8d8a80; flex: none; }
.mchip.is-new .mchip-i { background: #2b3036; }
.mchip.is-ecl.is-lunar .mchip-i { background: #a2482b; box-shadow: 0 0 0 2px #c0532e; }
.mchip.is-ecl.is-solar .mchip-i { background: #111; box-shadow: 0 0 0 2px #e2b23a; }
.mchip.is-ecl { border-color: #a33a17; border-width: 2px; }
.mchip.is-sel { outline: 2px solid var(--ink); outline-offset: 1px; }
.mchip.is-given { border-style: solid; background: var(--y-tint); }
.mchip.is-picked { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mchip.is-hit { background: var(--ok-bg); border-color: var(--ok); color: var(--ink); }
.mchip.is-missed { border-style: dashed; }
.mchip.is-wrong { background: var(--bad-bg); border-color: var(--bad); text-decoration: line-through; }

.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; }
.tn-first .label { margin-bottom: 0.25rem; }
.tn-text { white-space: pre-wrap; }

/* ---------- drawings: shared ---------- */
.dia { display: block; width: 100%; height: auto; font-family: 'Atkinson Next', system-ui, sans-serif; touch-action: 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-warn { fill: #ffd2bf; font-weight: 800; }
.dia .d-on-dark { fill: #d9e2ea; }
.halo { paint-order: stroke; stroke: #fbfbf6; stroke-width: 3.5px; stroke-linejoin: round; }

/* the sky */
.sky-dia { border-radius: 4px; }
.sky-fill { fill: #0b1626; }
.star { fill: #ffffff; }
.moon-dark { fill: #2b3036; }
.moon-lit { fill: #e9e4d4; }
.moon-mare { fill: #cbc4b1; }
.moon-rim { fill: none; stroke: #8d8a80; stroke-width: 0.8; }
.moon-tiny .moon-rim { stroke: #6f6c63; }
.pen-shade { fill: #1b0d08; opacity: 0.14; }
.umb-shade { fill: #5e1f12; opacity: 0.9; }
.moon-black { fill: #050608; }
.sun-small { fill: #ffd25a; stroke: #e2a91f; stroke-width: 1; }
.sun-glow { fill: #ffe7a3; opacity: 0.6; }
.sun-disc { fill: #ffd25a; stroke: #e8a514; stroke-width: 2; }

/* the Moon and Earth seen from above */
.mt-dark { fill: #3a3f45; }
.mt-lit { fill: #ece7d8; }
.mt-rim { fill: none; stroke: #45423b; stroke-width: 1; }
.moon-top.is-eclipsed .mt-lit, .moon-top.is-eclipsed .mt-dark { fill: #9a4127; }
.moon-top.is-part .mt-lit { fill: #b77a63; }
.moon-top.is-drag { cursor: grab; }
.et-sea { fill: #3b7cc0; }
.et-land { fill: #6ea25a; }
.et-night { fill: #0c1a33; opacity: 0.55; }
.et-rim { fill: none; stroke: #1f3d5e; stroke-width: 1; }
.ray { stroke: #e3a514; stroke-width: 1.6; }
.ray-head { fill: #e3a514; }
.arrow line { stroke: #34423c; stroke-width: 1.3; }
.arrow-head { fill: #34423c; }
.sunarrow line { stroke: #e3a514; stroke-width: 1.8; }
.sunarrow .arrow-head, .sunray .arrow-head { fill: #e3a514; }
.sunray line { stroke: #e3a514; stroke-width: 2; }
.orbit-dir line { stroke: #5f6b66; }
.orbit-dir .arrow-head { fill: #5f6b66; }
.orbit-path { fill: none; stroke: #8b968f; stroke-width: 1.2; stroke-dasharray: 4 4; }
.orbit-dot { fill: #5f6b66; }
.sight { stroke: #0f6a6a; stroke-width: 1.2; stroke-dasharray: 2 3; }
.face-half, .face-key { fill: none; stroke: #0f8a8a; stroke-width: 2.5; stroke-linecap: round; }
.edge-whole { fill: none; stroke: #ff9a3c; stroke-width: 2; stroke-dasharray: 6 4; }
.edge-pt { fill: #ff9a3c; }
.shadow-band { fill: #1c2330; opacity: 0.55; }
.leader-line { stroke: #5f6b66; stroke-width: 1; }

/* screen 1: the timeline of the evening */
.tl-axis { stroke: #8b968f; stroke-width: 1; }
.tl-part { fill: #c98a6f; }
.tl-total { fill: #8a2f19; }
.tl-now { stroke: #15231d; stroke-width: 2.5; stroke-linecap: round; }
.tl-now-halo { stroke: #fbfbf6; stroke-width: 6; stroke-linecap: round; }

/* screen 4: shadows */
.pen-cone { fill: #2a3346; opacity: 0.16; }
.umb-cone { fill: #1a2030; opacity: 0.42; }
.pen-on { fill: #1a2030; opacity: 0.35; }
.umb-on { fill: #05070c; opacity: 0.9; }
.key-rim { fill: none; stroke: #8b968f; stroke-width: 0.8; }
.see-arc { fill: none; stroke: #ff8a2a; stroke-width: 3.5; stroke-linecap: round; }

/* screen 5: the tilted orbit */
.plane { fill: #e9efe6; stroke: #b7c3ba; stroke-width: 1; }
.morbit { fill: none; stroke: #6b5bb3; stroke-width: 2; }
.morbit-back { stroke-dasharray: 4 4; opacity: 0.7; }
.shadow-3d { fill: #1c2330; opacity: 0.5; }
.drop { stroke: #6b5bb3; stroke-width: 1; stroke-dasharray: 2 2; }
.drop-dot { fill: #6b5bb3; }
.mshadow { stroke: #1c2330; stroke-width: 3; opacity: 0.45; }
.m3-full { fill: #ece7d8; stroke: #45423b; stroke-width: 1; }
.m3-new { fill: #2b3036; stroke: #c9c4b4; stroke-width: 1.2; }
.m3-ecl { fill: #a2482b; stroke: #45423b; stroke-width: 1; }
.node-mark { fill: #6b5bb3; }
.eye-white { fill: #ffffff; stroke: #0f6a6a; stroke-width: 1.5; }
.eye-pupil, .eye-arrow { fill: #0f6a6a; }
.plane-line { stroke: #4b5c70; stroke-width: 1; stroke-dasharray: 3 3; }
.t-pen { fill: #3a2a26; opacity: 0.55; }
.t-umb { fill: #7a2a17; opacity: 0.95; }
.m-path { stroke: #9fb2c4; stroke-width: 1; stroke-dasharray: 4 3; }
.t-moon { fill: #ece7d8; }
.t-moon-ecl { fill: #c46a46; stroke: #ffd0b8; stroke-width: 1; }
.t-earth { fill: #3b7cc0; }
.t-mshadow { fill: #05070c; opacity: 0.55; stroke: #9fb2c4; stroke-width: 0.8; }
.t-moon-new { fill: #2b3036; stroke: #c9c4b4; stroke-width: 1; }

/* screen 8: the line through the year */
.year-plate { max-width: none; }
.season-band { fill: #f3e2a9; opacity: 0.75; }
.yl-axis { stroke: #8b968f; stroke-width: 1; }
.yl-tick { stroke: #8b968f; stroke-width: 1; }
.yl-full { fill: #ece7d8; stroke: #6f6c63; stroke-width: 1; }
.yl-new { fill: #2b3036; stroke: #6f6c63; stroke-width: 1; }
.yl-ecl.yl-lunar { fill: #a2482b; stroke: #c0532e; stroke-width: 2.5; }
.yl-ecl.yl-solar { fill: #050608; stroke: #e2b23a; stroke-width: 2.5; }

/* screen 6: seasons */
.globe { fill: #3b7cc0; stroke: #1f3d5e; stroke-width: 1.2; }
.globe-night { fill: #0c1a33; opacity: 0.5; }
.axis-line { stroke: #15231d; stroke-width: 1.6; }
.equator { stroke: #e7eef5; stroke-width: 1.2; stroke-dasharray: 5 3; }
.lat-line { stroke: #ffd25a; stroke-width: 2; stroke-dasharray: 4 3; }
.overhead-dot { fill: #ffd25a; stroke: #8a5a00; stroke-width: 0.8; }
.horizon { stroke: #15231d; stroke-width: 2; }
.angle-arc { fill: none; stroke: #b4441f; stroke-width: 1.6; }
.noon-dot { fill: #b4441f; stroke: #fff; stroke-width: 1.2; }
.beam { fill: #ffd25a; opacity: 0.38; }
.beam-ray line { stroke: #e3a514; stroke-width: 1.4; }
.beam-ray .arrow-head { fill: #e3a514; }
.ground { stroke: #6b5534; stroke-width: 3; }
.patch { fill: #f2b31c; }
.bracket { fill: none; stroke: #15231d; stroke-width: 1.4; }
.bracket-ref { stroke: #8b968f; stroke-dasharray: 3 2; }
.daybar-night { fill: #1f2f4d; }
.daybar-day { fill: #ffd25a; }
.tick { stroke: #5f6b66; stroke-width: 1; }

/* screen 7: the bulges of water */
.ocean { fill: #9fcbf0; stroke: #3b7cc0; stroke-width: 1.2; }
.land { fill: #8fb07a; stroke: #5d7d4b; stroke-width: 1; }
.bulge-moon { fill: none; stroke: #5b4bb0; stroke-width: 2; stroke-dasharray: 6 3; }
.bulge-sun { fill: none; stroke: #c27c00; stroke-width: 2; stroke-dasharray: 2 3; }

/* ---------- 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-band: rgba(42, 120, 214, 0.12); }
@media (prefers-color-scheme: dark) {
  .lab, .viz { --viz-grid: #26332d; --viz-s1: #3987e5; --viz-band: rgba(57, 135, 229, 0.18); }
}
.viz { position: relative; max-width: 44rem; }
.viz svg { display: block; width: 100%; height: auto; font-family: 'Atkinson Next', system-ui, sans-serif; overflow: visible; }
.viz-title { margin: 0 0 0.3rem; font-weight: 800; font-size: 0.944rem; }
.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-dot { stroke: var(--viz-surface); stroke-width: 2; }
.viz .v-dot.v-s1 { fill: var(--viz-s1); }
.viz .v-cross { stroke: var(--viz-muted); stroke-width: 1; }
.viz .v-guide { stroke-dasharray: 2 3; }
.viz .v-hit { fill: transparent; stroke: none; cursor: crosshair; }
.viz .v-bracket { fill: none; stroke: var(--viz-ink); stroke-width: 1.4; }
.viz .day-band { fill: var(--viz-band); }
.viz .phase-icon .moon-rim { stroke: 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; }
.tide-day { max-width: 26rem; }

@media (max-width: 640px) {
  .dia .d-small { font-size: 15px; }
  .dia .d-lab { font-size: 16px; }
  .sem-two, .orbit-two, .tilt-two, .ec-two, .tn-two, .sem-cards { grid-template-columns: minmax(0, 1fr); }
  .cases, .cases-3 { grid-template-columns: minmax(0, 1fr); }
  .moon-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .yr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tide-chart .v-tick, .tide-chart .v-note { font-size: 16px; }
  .tide-chart .v-name { font-size: 16px; }
  .tide-day .v-tick, .tide-day .v-note { font-size: 15px; }
}
