/* Stereonet trainer: page style on top of Walleye's walleye.css (tokens, header, buttons). */

:root { --sn-good: #2c7a4b; --sn-warn: #a2381c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --sn-good: #6fcf94; --sn-warn: #f08a6a; }
}
:root[data-theme="dark"] { --sn-good: #6fcf94; --sn-warn: #f08a6a; }

.sn-main { max-width: 72rem; }
.sn-main h2 { font-family: var(--wy-sans); }

/* drills */
.sn-drill-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.5rem; margin: 0 0 1.25rem; }
.sn-drill { white-space: normal; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; height: auto; min-height: var(--wy-control-h); padding: 0.45rem 0.65rem; text-align: left; line-height: 1.25; }
.sn-drill-t { font-weight: 600; }
.sn-drill-b { font-size: 0.8rem; color: var(--wy-muted); }
.sn-drill[aria-pressed="true"] .sn-drill-b { color: inherit; opacity: 0.85; }

/* layout */
.sn-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 23rem); gap: 1.25rem; align-items: start; }
@media (max-width: 52rem) { .sn-layout { grid-template-columns: minmax(0, 1fr); } }
.sn-netcol { min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.sn-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }

/* the net */
.sn-net { display: block; width: 100%; max-width: 36rem; aspect-ratio: 1; margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; font-family: var(--wy-sans); }
.sn-net:focus { outline: none; }
.sn-net:focus-visible { outline: 3px solid var(--wy-focus); outline-offset: 4px; border-radius: 50%; }
.sn-face { fill: var(--wy-bg-raised); }
.sn-grid-minor { fill: none; stroke: var(--wy-scene-faint); stroke-width: 0.45; }
.sn-grid-major { fill: none; stroke: var(--wy-scene-muted); stroke-width: 0.8; stroke-opacity: 0.8; }
.sn-rim { fill: none; stroke: var(--wy-ink); stroke-width: 1.8; }
.sn-index { fill: var(--wy-ink); }
.sn-ticks { fill: none; stroke: var(--wy-scene-accent); stroke-width: 1; }
.sn-north-tick { stroke: var(--wy-scene-up); stroke-width: 3; }
.sn-deg, .sn-north { text-anchor: middle; font-size: 13px; fill: var(--wy-muted); font-variant-numeric: tabular-nums; }
.sn-north { font-size: 16px; font-weight: 700; fill: var(--wy-scene-up); }
.sn-gc { fill: none; stroke-width: 2.4; stroke-linecap: round; }
.sn-path { fill: none; stroke-width: 2; stroke-linecap: round; }
.is-dash { stroke-dasharray: 6 5; }
.is-ghost { opacity: 0.45; }
.sn-mark { fill: none; stroke-width: 2.2; }
.sn-cross { stroke-width: 1.6; }
.sn-pt { stroke: var(--wy-bg-raised); stroke-width: 1.5; }
.sn-label { font-size: 16px; font-weight: 700; text-anchor: middle; paint-order: stroke; stroke: var(--wy-bg-raised); stroke-width: 4px; }
.sn-plabel { font-size: 13px; font-weight: 600; paint-order: stroke; stroke: var(--wy-bg-raised); stroke-width: 4px; }
@media (prefers-contrast: more) { .sn-grid-minor { stroke: var(--wy-scene-muted); } }

.sn-turnbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; justify-content: center; font-family: var(--wy-sans); }
.sn-turnlabel { font-size: 0.9rem; color: var(--wy-muted); }
.sn-turnbar .wy-status { flex-basis: 100%; text-align: center; margin: 0; }

/* the side cards */
.sn-card { background: var(--wy-bg-raised); border: 1px solid var(--wy-line); border-radius: var(--wy-radius); padding: 0.9rem 1rem; font-family: var(--wy-sans); font-size: 0.95rem; }
.sn-card > :first-child { margin-top: 0; }
.sn-card > :last-child { margin-bottom: 0; }
.sn-drill-name, .sn-cardh { margin: 0 0 0.4rem; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wy-muted); }
.sn-prompt { font-family: var(--wy-serif); font-size: 1.08rem; line-height: 1.5; margin: 0 0 0.6rem; }
.sn-prompt b { font-family: var(--wy-sans); font-variant-numeric: tabular-nums; }
.sn-fields { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 0.3rem 0; }
.sn-fieldwrap { display: inline-flex; align-items: center; gap: 0.35rem; }
.sn-fieldlabel { color: var(--wy-muted); }
.sn-fields input { width: 5.5rem; font: inherit; font-variant-numeric: tabular-nums; padding: 0.35rem 0.45rem; border: 1px solid var(--wy-line-strong); border-radius: 0.35rem; background: var(--wy-bg); color: var(--wy-ink); }
.sn-unit { color: var(--wy-muted); }
.sn-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0 0.5rem; }
.sn-status { min-height: 1.5em; margin: 0.25rem 0; }
.sn-status.good { color: var(--sn-good); font-weight: 600; }
.sn-status.warn { color: var(--sn-warn); }
.sn-hints { margin: 0.5rem 0 0; padding-left: 1.3rem; color: var(--wy-ink); }
.sn-hints li { margin: 0.3rem 0; }
.sn-small { font-size: 0.85rem; color: var(--wy-muted); margin: 0.3rem 0; }
.sn-linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 0.85rem; color: var(--wy-accent); text-decoration: underline; cursor: pointer; }
.sn-linkbtn:focus-visible { outline: 2px solid var(--wy-focus); outline-offset: 2px; }
.sn-settings { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.45rem 0.75rem; align-items: center; }
.sn-settings label { color: var(--wy-muted); }
.sn-settings select { font: inherit; min-width: 0; max-width: 100%; padding: 0.3rem; border: 1px solid var(--wy-line-strong); border-radius: 0.35rem; background: var(--wy-bg); color: var(--wy-ink); }

.sn-bowl, .sn-notes { margin-top: 2.5rem; padding-top: 0.5rem; border-top: 1px solid var(--wy-line); }
.sn-notes { columns: 2 22rem; column-gap: 2rem; }
.sn-notes h2 { column-span: all; }
.sn-notes p { break-inside: avoid; margin-top: 0; }
