/* wheel.css: the Wheel of Preparedness, drawn as a brass vault-door wheel on blackened steel.
   Russo One headings and Inter body (the site serves both from /fonts/).
   Brass #b08d57, titanium text, steel panels, red only for urgency (not used here).
   Squared corners of 6 to 10px. No italics. Animation uses transform and opacity only.
   The page that includes this file declares the @font-face rules. */

.wheel-section {
  --steel-black: #121416;
  --steel: #26292c;
  --titanium: #cdd0d3;
  --steel-mid: #8a9097;
  --brass: #b08d57;
  --brass-hi: #e0c48c;
  --cognac: #7a3f1d;
  --line: rgba(205, 208, 211, 0.12);
  --ink: var(--titanium);
  --ink-soft: #a3a9b0; /* steel-mid, one tone up so it clears AA on the steel panels */
  --surface: var(--steel);
  --radius: 8px;
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  touch-action: manipulation;
}

.wheel-heading {
  margin: 0 0 8px;
  font-family: 'Russo One', Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  color: #e6e9eb;
  text-shadow: 0 2px 1px rgba(0, 0, 0, 0.85);
}

.wheel-intro { margin: 0 0 24px; max-width: 62ch; color: var(--ink-soft); }

.wheel-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

@media (min-width: 960px) {
  .wheel-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; }
  .wheel-main { position: sticky; top: 16px; }
}

/* ---------- Stage, atmosphere ---------- */

.wheel-stage {
  position: relative;
  padding: 8px;
  background: radial-gradient(ellipse at 50% 55%, rgba(122, 63, 29, 0.2), rgba(0, 0, 0, 0) 62%), var(--brush), linear-gradient(180deg, #1a1d20, #0f1113);
  border: 1px solid #000;
  box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 30px rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  overflow: hidden;
}

.wheel-svg { position: relative; display: block; width: 100%; height: auto; max-height: 82vh; }

.wheel-embers { position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; }

.wheel-ember {
  position: absolute;
  bottom: -12px;
  width: 5px;
  height: 5px;
  background: var(--brass);
  border-radius: 2px;
  opacity: 0;
  animation: wheel-drift 18s linear infinite;
}
.wheel-ember:nth-child(1)  { left: 6%;  animation-duration: 21s; animation-delay: -2s; }
.wheel-ember:nth-child(2)  { left: 15%; animation-duration: 17s; animation-delay: -9s; width: 3px; height: 3px; }
.wheel-ember:nth-child(3)  { left: 24%; animation-duration: 24s; animation-delay: -14s; }
.wheel-ember:nth-child(4)  { left: 33%; animation-duration: 19s; animation-delay: -5s; width: 4px; height: 4px; }
.wheel-ember:nth-child(5)  { left: 42%; animation-duration: 26s; animation-delay: -18s; width: 3px; height: 3px; }
.wheel-ember:nth-child(6)  { left: 51%; animation-duration: 20s; animation-delay: -11s; }
.wheel-ember:nth-child(7)  { left: 60%; animation-duration: 23s; animation-delay: -1s; width: 4px; height: 4px; }
.wheel-ember:nth-child(8)  { left: 68%; animation-duration: 18s; animation-delay: -15s; width: 3px; height: 3px; }
.wheel-ember:nth-child(9)  { left: 76%; animation-duration: 25s; animation-delay: -7s; }
.wheel-ember:nth-child(10) { left: 84%; animation-duration: 22s; animation-delay: -20s; width: 4px; height: 4px; }
.wheel-ember:nth-child(11) { left: 91%; animation-duration: 19s; animation-delay: -12s; width: 3px; height: 3px; }
.wheel-ember:nth-child(12) { left: 97%; animation-duration: 27s; animation-delay: -4s; }

@keyframes wheel-drift {
  0%   { transform: translate3d(0, 0, 0) rotate(45deg); opacity: 0; }
  12%  { opacity: 0.22; }
  60%  { opacity: 0.12; }
  100% { transform: translate3d(24px, -560px, 0) rotate(45deg); opacity: 0; }
}

/* ---------- SVG parts ---------- */

.wheel-lift { transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.wheel-wedge.w0.is-lift .wheel-lift { transform: translate(0px, -8px); }
.wheel-wedge.w1.is-lift .wheel-lift { transform: translate(4.7px, -6.47px); }
.wheel-wedge.w2.is-lift .wheel-lift { transform: translate(7.61px, -2.47px); }
.wheel-wedge.w3.is-lift .wheel-lift { transform: translate(7.61px, 2.47px); }
.wheel-wedge.w4.is-lift .wheel-lift { transform: translate(4.7px, 6.47px); }
.wheel-wedge.w5.is-lift .wheel-lift { transform: translate(0px, 8px); }
.wheel-wedge.w6.is-lift .wheel-lift { transform: translate(-4.7px, 6.47px); }
.wheel-wedge.w7.is-lift .wheel-lift { transform: translate(-7.61px, 2.47px); }
.wheel-wedge.w8.is-lift .wheel-lift { transform: translate(-7.61px, -2.47px); }
.wheel-wedge.w9.is-lift .wheel-lift { transform: translate(-4.7px, -6.47px); }

.wheel-hit { cursor: pointer; }
.wheel-seg { cursor: pointer; transition: opacity 0.2s ease; }
.wheel-wedge.is-lift .wheel-seg { stroke: var(--brass-hi); }

/* The vault wheel turns a quarter on first load, then settles. Transform only. */
.wheel-rotor { transform-origin: 440px 360px; }

/* Filled rings scale outward from the wheel centre (880 by 720 viewBox, centre 440 360). */
.wheel-fill, .wheel-glow {
  pointer-events: none;
  transform-origin: 440px 360px;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.55s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.wheel-fill.is-on { opacity: 1; transform: scale(1); }
.wheel-glow.is-on { opacity: 0.3; transform: scale(1); }

/* Armed: everything is reset to "off" with no transition, then released in a stagger. */
.wheel-svg.wheel-arm .wheel-fill,
.wheel-svg.wheel-arm .wheel-glow { transition: none; opacity: 0; transform: scale(0.88); }

.wheel-live .wheel-glow.is-on { animation: wheel-breathe 7s ease-in-out infinite; }
.wheel-live .w1 .wheel-glow.is-on, .wheel-live .w4 .wheel-glow.is-on, .wheel-live .w7 .wheel-glow.is-on { animation-delay: -2.3s; }
.wheel-live .w2 .wheel-glow.is-on, .wheel-live .w5 .wheel-glow.is-on, .wheel-live .w8 .wheel-glow.is-on { animation-delay: -4.6s; }

@keyframes wheel-breathe {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.85; }
}

.wheel-ripple { pointer-events: none; transform-box: fill-box; transform-origin: center; }

.wheel-label, .wheel-icon { pointer-events: none; }
.wheel-label { font-size: 20px; }
.wheel-wedge.is-lift .wheel-label { fill: var(--brass-hi); }

@media (max-width: 640px) {
  .wheel-label { font-size: 26px; }
}

.wheel-centre { transition: opacity 0.18s ease; }

/* ---------- Help panel, lowest list ---------- */

/* Rivets on the control plates. */
.wheel-help-panel, .wheel-spoke { position: relative; }
.wheel-help-panel::before, .wheel-spoke::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: var(--rivet) left 6px top 6px / 8px 8px no-repeat, var(--rivet) right 6px top 6px / 8px 8px no-repeat; }
.wheel-help-panel::after, .wheel-spoke::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: var(--rivet) left 6px bottom 6px / 8px 8px no-repeat, var(--rivet) right 6px bottom 6px / 8px 8px no-repeat; }

.wheel-help-panel {
  min-height: 5.6em;
  margin: 14px 0 0;
  padding: 14px 16px;
  background: var(--brush), var(--noise), linear-gradient(180deg, #2c3034, #1e2124);
  border: 1px solid #0b0c0d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(0, 0, 0, 0.7), 0 14px 28px rgba(0, 0, 0, 0.6), 0 3px 6px rgba(0, 0, 0, 0.5);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 16px;
}
.wheel-help-panel strong { color: var(--brass-hi); font-weight: 700; }

.wheel-legend-line { margin: 10px 0 0; color: var(--ink-soft); font-size: 15px; }

.wheel-lowest-wrap { margin-top: 18px; }
.wheel-lowest-heading {
  margin: 0 0 8px;
  font-family: 'Russo One', Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 20px;
  color: var(--titanium);
}
.wheel-lowest { margin: 0; padding-left: 1.4em; }
.wheel-lowest li { margin: 0 0 6px; }
.wheel-lowest a { color: var(--brass-hi); font-weight: 700; text-decoration: underline; }
.wheel-lowest-level { color: var(--ink-soft); font-size: 15px; margin-left: 6px; }
.wheel-lowest-done { list-style: none; margin-left: -1.4em; }

/* ---------- Form ---------- */

.wheel-form { display: grid; gap: 14px; }

.wheel-spoke {
  margin: 0;
  padding: 14px 14px 12px;
  background: var(--brush), var(--noise), linear-gradient(180deg, #2c3034, #1e2124);
  border: 1px solid #0b0c0d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(0, 0, 0, 0.7), 0 14px 28px rgba(0, 0, 0, 0.6), 0 3px 6px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  min-width: 0;
  transition: border-color 0.2s ease;
}
.wheel-spoke.is-lift, .wheel-spoke:focus-within { border-color: var(--brass); }

/* float + full width pulls the legend inside the plate instead of straddling its top edge */
.wheel-legend {
  float: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px 4px;
  font-family: 'Russo One', Arial, Helvetica, sans-serif;
  font-size: 18px;
  color: var(--ink);
}

.wheel-choices { clear: both; display: grid; grid-template-columns: repeat(4, minmax(52px, 1fr)); gap: 8px; margin-top: 8px; }

.wheel-choice { position: relative; display: block; }

.wheel-choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.wheel-choice-text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 52px;
  padding: 8px 6px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  background: var(--brush), linear-gradient(180deg, #3a3f44 0%, #2a2e32 55%, #1f2225 100%);
  border: 1px solid #0b0c0d;
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -2px 0 rgba(0, 0, 0, 0.6), 0 3px 6px rgba(0, 0, 0, 0.55);
  text-shadow: 0 1px 0 #000;
  transition: border-color 0.2s ease;
}

.wheel-choice:hover .wheel-choice-text { border-color: var(--brass-hi); filter: brightness(1.12); }

.wheel-choice input:checked + .wheel-choice-text {
  background: linear-gradient(180deg, #6e5230 0%, #b08d57 18%, #e0c48c 48%, #b08d57 78%, #7d5f35 100%);
  border-color: #4a3519;
  color: #1a1206;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, 0.75), inset 0 -2px 0 rgba(60, 40, 14, 0.55), 0 3px 6px rgba(0, 0, 0, 0.55);
}
/* A tick as well as colour, so the chosen level is never carried by colour alone. */
.wheel-choice input:checked + .wheel-choice-text::before { content: '\2713\00a0'; }

.wheel-choice input:focus-visible + .wheel-choice-text {
  outline: 3px solid var(--brass-hi);
  outline-offset: 2px;
}

.wheel-details { margin-top: 10px; }
.wheel-details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--brass-hi);
  font-size: 15px;
  font-weight: 600;
}
.wheel-details summary:focus-visible { outline: 3px solid var(--brass-hi); outline-offset: 2px; }
.wheel-help { margin: 4px 0 0; }
.wheel-help-row { margin: 0 0 10px; }
.wheel-help-row dt { color: var(--brass-hi); font-weight: 700; font-size: 15px; }
.wheel-help-row dd { margin: 2px 0 0; color: var(--ink-soft); font-size: 15px; }

.wheel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.wheel-save {
  min-height: 52px;
  padding: 12px 28px;
  font-family: 'Russo One', Arial, Helvetica, sans-serif;
  font-size: 17px;
  color: #1a1206;
  background: linear-gradient(180deg, #6e5230 0%, #b08d57 18%, #e0c48c 48%, #b08d57 78%, #7d5f35 100%);
  border: 1px solid #4a3519;
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, 0.75), inset 0 -2px 0 rgba(60, 40, 14, 0.55), 0 6px 14px rgba(0, 0, 0, 0.6);
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.45);
  cursor: pointer;
}
.wheel-save:hover { filter: brightness(1.08); }
.wheel-save:active { filter: brightness(0.94); box-shadow: inset 0 3px 7px rgba(40, 26, 8, 0.7); }
.wheel-save:focus-visible { outline: 3px solid var(--brass-hi); outline-offset: 2px; }

.wheel-status { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* With JavaScript on, the demo form needs no submit button. */
.wheel-js .wheel-demo-submit { display: none; }

.wheel-cta { margin: 22px 0 0; font-size: 19px; font-weight: 600; }
.wheel-cta-link { color: var(--brass-hi); text-decoration: underline; }
.wheel-cta-link:focus-visible { outline: 3px solid var(--brass-hi); outline-offset: 2px; }

/* ---------- Data table (always visible) ---------- */

.wheel-table { width: 100%; margin-top: 36px; border-collapse: collapse; font-size: 16px; }
.wheel-table caption {
  padding: 0 0 8px;
  text-align: left;
  font-family: 'Russo One', Arial, Helvetica, sans-serif;
  font-size: 20px;
  color: var(--titanium);
}
.wheel-table th, .wheel-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.wheel-table thead th { color: var(--ink-soft); font-weight: 600; font-size: 15px; }
.wheel-table tbody th { font-weight: 600; }

/* ---------- Pause, reduced motion ---------- */

.wheel-paused .wheel-ember,
.wheel-paused .wheel-glow { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .wheel-ember { display: none; }
  .wheel-glow, .wheel-glow.is-on { animation: none !important; }
  .wheel-fill, .wheel-glow, .wheel-lift, .wheel-centre, .wheel-seg,
  .wheel-choice-text, .wheel-spoke { transition: none !important; }
  .wheel-svg.wheel-arm .wheel-fill.is-on { opacity: 1; transform: scale(1); }
  .wheel-svg.wheel-arm .wheel-glow.is-on { opacity: 0.3; transform: scale(1); }
}
