/* Tilt explorer: the month and latitude sliders, the place buttons, the orbit picture, the readout and the misconception callout.
   Builds on the shared .explorer, .btn and .cx styles in styles.css. */
.tilt-explorer {
  --ti-day: #ffe7a3;
  --ti-night: #3a4470;
  min-width: 0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tilt-explorer { --ti-night: #0b0e1a; }
}
/* The same colours when the student picks the dark theme with the toggle (data-theme="dark"), also on a device that prefers light. */
:root[data-theme="dark"] .tilt-explorer { --ti-night: #0b0e1a; }

/* One column at 360 px: the sliders, the picture right under them (so a slider move can be seen), then the numbers and
   the callout. Wider, the controls and the numbers sit left of the picture. */
.ti-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 1.4rem; align-items: start; }
.ti-controls { display: flex; flex-direction: column; gap: 0.7rem; min-width: 0; }
.ti-stage { min-width: 0; }
.ti-results { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
@media (min-width: 760px) {
  .ti-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-areas: "controls stage" "results stage" "callout callout"; }
  .ti-controls { grid-area: controls; }
  .ti-stage { grid-area: stage; }
  .ti-results { grid-area: results; }
  .ti-callout { grid-area: callout; }
}

.ti-slider { display: grid; grid-template-columns: minmax(0, 1fr) auto; overflow-wrap: anywhere; align-items: center; gap: 0.1rem 0.6rem; font-weight: 600; font-size: 0.95rem; }
.ti-value { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; }
.ti-range { grid-column: 1 / -1; width: 100%; min-height: 44px; margin: 0; accent-color: var(--accent); }
.ti-range:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

.ti-places { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ti-place { flex: 1 1 auto; min-height: 44px; }
.ti-place[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.ti-place:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

/* The three numbers, large. They are hidden from screen readers, which hear the readout. */
.ti-stats { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: 0.5rem; }
.ti-stat { padding: 0.5rem 0.7rem; border-radius: 10px; background: var(--accent-soft); min-width: 0; }
.ti-stat dt { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.ti-stat-value { margin: 0.1rem 0 0; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* The readout is the live region: it is also what the student reads. */
.ti-readout { margin: 0; min-height: 3em; padding: 0.55rem 0.75rem; border-radius: 10px; background: var(--accent-soft); font-weight: 600; overflow-wrap: anywhere; }

/* The picture. The day and night sides differ in colour and the night side is also darker, and everything is outlined. */
.ti-figure-wrap { max-width: 460px; border-radius: 10px; }
.ti-figure { background: var(--surface); border-radius: 10px; border: 1px solid var(--border); }
.ti-orbit { fill: none; stroke: var(--axis); stroke-width: 1.5; stroke-dasharray: 5 4; }
.ti-sun { fill: var(--glow); stroke: var(--text); stroke-width: 2; }
.ti-sun-label { fill: #1c2033; font-size: 12px; font-weight: 700; pointer-events: none; }
.ti-axis { stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; }
.ti-globe { fill: var(--ti-day); }
.ti-night { fill: var(--ti-night); }
.ti-rim { fill: none; stroke: var(--text); stroke-width: 1.75; }
.ti-earth--mark { opacity: 0.85; }
.ti-ring { fill: none; stroke: var(--accent); stroke-width: 3; }
.ti-place-dot { fill: var(--user-line); stroke: var(--surface); stroke-width: 1.5; }
.ti-pole, .ti-label { fill: var(--text); font-size: 13px; font-weight: 700; paint-order: stroke; stroke: var(--surface); stroke-width: 3.5px; stroke-linejoin: round; pointer-events: none; }
.ti-pole { font-size: 14px; }

/* The key says in words what the marks mean, next to a sample of each. */
.ti-key { margin-top: 0.7rem; font-size: 0.9rem; }
.ti-key-title { margin: 0 0 0.3rem; font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.ti-key dl { margin: 0; display: grid; gap: 0.1rem; }
.ti-key dt { overflow-wrap: anywhere; display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; font-weight: 700; }
.ti-key dd { overflow-wrap: anywhere; margin: 0; color: var(--muted); }
.ti-key-term::before { content: ''; flex: none; box-sizing: border-box; width: 1.4rem; height: 0; border-top: 3px solid var(--text); }
.ti-key-term--months::before { width: 0.9rem; height: 0.9rem; margin: 0 0.25rem; border: 2px solid var(--text); border-radius: 50%; background: var(--ti-day); }
.ti-key-term--night::before { width: 0.9rem; height: 0.9rem; margin: 0 0.25rem; border: 2px solid var(--text); border-radius: 50%; background: linear-gradient(90deg, var(--ti-day) 50%, var(--ti-night) 50%); }
.ti-key-term--place::before { width: 0.9rem; height: 0.9rem; margin: 0 0.25rem; border: 2px solid var(--surface); border-radius: 50%; background: var(--user-line); box-shadow: 0 0 0 1px var(--user-line); }

/* The misconception, set apart from the controls. */
.ti-callout { min-width: 0; padding: 0.75rem 0.95rem; border-radius: 10px; background: var(--warn-soft); border-left: 5px solid var(--user-line); overflow-wrap: anywhere; }
.ti-callout p { margin: 0.3rem 0 0; }
.ti-callout .ti-callout-title { margin: 0; font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.ti-callout-lead { font-weight: 700; font-size: 1.02rem; }
.ti-distance { font-weight: 600; }
