@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,800&family=DM+Sans:wght@400;500;700;800&display=swap');

:root {
  --canvas: #F5F1E7;
  --canvas-alt: #EFE9DB;
  --ink: #22201C;
  --forest: #2E5141;
  --forest-light: #3C5C4E;
  --coral: #C8512E;
  --mustard: #F0C24B;
  --rule: #D6D1C4;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-hard: 3px 3px 0 0 rgba(34,32,28,.20);
  --shadow-hard-lg: 4px 4px 0 0 rgba(34,32,28,.14);
  --f-display: 'Bricolage Grotesque', sans-serif;
  --f-body: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--f-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 13%, rgba(255, 90, 54, 0.13) 0 72px, transparent 73px),
    radial-gradient(circle at 90% 7%, rgba(255, 201, 64, 0.24) 0 90px, transparent 91px),
    linear-gradient(90deg, rgba(26, 26, 26, 0.035) 1px, transparent 1px),
    linear-gradient(var(--canvas), var(--canvas));
  background-size: auto, auto, 48px 48px, auto;
}
button { font: inherit; }
a { color: inherit; }

.ao-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.75rem);
}

.ao-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: clamp(1.25rem, 3vw, 2.5rem);
}

.ao-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.ao-mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: none;
  border: 2px solid var(--ink);
  background:
    linear-gradient(90deg, transparent 48%, var(--ink) 48% 52%, transparent 52%),
    linear-gradient(transparent 48%, var(--ink) 48% 52%, transparent 52%),
    var(--mustard);
  box-shadow: var(--shadow-hard);
  transform: rotate(-6deg);
}
.ao-mark::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  right: -7px;
  bottom: -7px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--coral);
}

.ao-brand h1,
.ao-title,
.ao-card h2,
.ao-target-card h2,
.ao-reward h2 {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
}

.ao-brand h1 { font-size: clamp(1.45rem, 4vw, 2rem); }
.ao-brand p,
.ao-kicker {
  margin: 0;
  color: var(--forest);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ao-link,
.ao-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--canvas);
  color: var(--ink);
  font-weight: 800;
  line-height: 1;
  min-height: 44px;
  padding: 0.78rem 1rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-hard);
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.ao-link:hover,
.ao-btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hard-lg); }
.ao-link:focus-visible,
.ao-btn:focus-visible,
.ao-choice:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.ao-btn--primary { background: var(--coral); color: var(--ink); }
.ao-btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.ao-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.42fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.ao-title {
  font-size: clamp(2.45rem, 6vw, 4.5rem);
  max-width: 10ch;
}
.ao-title span { background-image: linear-gradient(transparent 65%, var(--mustard) 65%); padding: 0 4px; }
.ao-lede {
  color: #444;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 500;
  line-height: 1.65;
  max-width: 54ch;
  margin: 1.25rem 0 0;
}

.ao-survey-map {
  position: relative;
  min-height: 232px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--canvas-alt);
  box-shadow: var(--shadow-hard-lg);
  overflow: hidden;
}
.ao-survey-map::before {
  content: '';
  position: absolute;
  inset: 18px;
  background:
    linear-gradient(90deg, rgba(26, 26, 26, 0.13) 1px, transparent 1px),
    linear-gradient(180deg, rgba(26, 26, 26, 0.13) 1px, transparent 1px);
  background-size: 38px 38px;
}
.ao-survey-map b {
  position: absolute;
  left: 22px;
  top: 22px;
  z-index: 2;
  max-width: 13ch;
  font-family: var(--f-display);
  font-size: 1.55rem;
  line-height: 1;
}
.ao-map-plot {
  position: absolute;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  z-index: 1;
}
.ao-map-plot--forest { width: 112px; height: 74px; right: 30px; top: 30px; background: var(--forest); transform: rotate(5deg); }
.ao-map-plot--mustard { width: 96px; height: 92px; left: 38px; bottom: 32px; background: var(--mustard); transform: rotate(-8deg); }
.ao-map-plot--coral { width: 76px; height: 76px; right: 74px; bottom: 40px; border-radius: 50%; background: var(--coral); }
.ao-map-path {
  position: absolute;
  left: 34px;
  right: 28px;
  bottom: 88px;
  height: 5px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 18px, transparent 18px 30px);
  transform: rotate(-11deg);
  z-index: 2;
}
.ao-map-stamp {
  position: absolute;
  right: 26px;
  bottom: 24px;
  z-index: 3;
  background: var(--mustard);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  padding: 0.45rem 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  transform: rotate(-5deg);
}

.ao-progress-wrap {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.ao-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ao-progress {
  height: 18px;
  border: 2px solid var(--ink);
  background: var(--canvas-alt);
  border-radius: 999px;
  overflow: hidden;
}
.ao-progress span {
  display: block;
  height: 100%;
  width: var(--pct, 0%);
  background: linear-gradient(90deg, var(--coral), var(--mustard));
}

.ao-card {
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--canvas);
  box-shadow: var(--shadow-hard-lg);
  padding: clamp(1rem, 3vw, 2rem);
}
.ao-card h2 { font-size: clamp(1.6rem, 4vw, 2.45rem); margin-bottom: 0.75rem; }
.ao-card p { margin: 0; color: #444; font-weight: 500; }

.ao-play-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

.ao-target-card,
.ao-work-card {
  display: grid;
  gap: 1rem;
  align-content: start;
}
.ao-target-card h2 { font-size: clamp(2rem, 5vw, 3.4rem); }

.ao-facts {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}
.ao-facts div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: baseline;
  border-top: 2px solid var(--rule);
  padding-top: 0.75rem;
}
.ao-facts dt {
  color: var(--forest);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}
.ao-facts dd { margin: 0; color: #444; font-weight: 700; }

.ao-instruction {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.ao-mini-label {
  color: var(--forest);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.ao-count-pill {
  flex: none;
  border: 2px solid var(--ink);
  background: var(--mustard);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  font-weight: 900;
  box-shadow: 3px 3px 0 0 rgba(34,32,28,.20);
}

.ao-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.ao-choice {
  min-height: 64px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--canvas-alt);
  color: var(--ink);
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  font-weight: 900;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  transition: transform 0.12s ease-in-out, box-shadow 0.12s ease-in-out, background 0.12s ease-in-out;
}
.ao-choice:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hard-lg); }
.ao-choice.is-selected {
  background: var(--forest);
  color: var(--canvas);
}
.ao-choice.is-correct {
  background: var(--mustard);
  color: var(--ink);
}
.ao-choice.is-extra {
  background: var(--canvas);
  color: var(--ink);
  background-image: repeating-linear-gradient(-45deg, transparent 0 9px, rgba(255, 90, 54, 0.22) 9px 18px);
}

.ao-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.ao-feedback,
.ao-success {
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-hard);
}
.ao-feedback { background: #fff7df; }
.ao-success { background: #e7f0e9; }
.ao-feedback h3,
.ao-success strong {
  display: block;
  margin: 0 0 0.35rem;
  font-family: var(--f-display);
  font-size: 1.35rem;
  line-height: 1.05;
}
.ao-feedback p,
.ao-success p { margin: 0; color: #333; font-weight: 600; line-height: 1.55; }

.ao-reward {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 1.25rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--canvas-alt);
  box-shadow: var(--shadow-hard-lg);
  padding: clamp(1.5rem, 5vw, 4rem);
}
.ao-reward h2 { font-size: clamp(2.5rem, 8vw, 5rem); }
.ao-reward p {
  max-width: 52ch;
  margin: 0 auto;
  color: #444;
  font-weight: 600;
  line-height: 1.65;
}
.ao-reward-map {
  width: min(320px, 80vw);
  aspect-ratio: 1.45;
  border: 2px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(26,26,26,.13) 1px, transparent 1px),
    linear-gradient(rgba(26,26,26,.13) 1px, transparent 1px),
    radial-gradient(circle at 30% 45%, var(--forest) 0 32px, transparent 33px),
    radial-gradient(circle at 68% 55%, var(--mustard) 0 42px, transparent 43px),
    var(--canvas);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
  box-shadow: var(--shadow-hard-lg);
}

@media (max-width: 820px) {
  .ao-topbar,
  .ao-instruction {
    align-items: flex-start;
    flex-direction: column;
  }
  .ao-hero,
  .ao-play-grid {
    grid-template-columns: 1fr;
  }
  .ao-survey-map { min-height: 190px; }
  .ao-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ao-actions .ao-btn,
  .ao-link { width: 100%; }
}

@media (max-width: 460px) {
  .ao-shell { padding: 1rem; }
  .ao-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .ao-choice { min-height: 58px; }
  .ao-progress-row { align-items: flex-start; flex-direction: column; }
  .ao-map-plot--forest { right: 18px; }
  .ao-map-plot--coral { right: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

.ao-target-number {
  display: inline-grid;
  place-items: center;
  min-width: 4.5rem;
  min-height: 4.5rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--mustard);
  box-shadow: var(--shadow-hard);
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 900;
}
.ao-diagram-card {
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fffaf0;
  box-shadow: var(--shadow-hard);
  padding: clamp(0.6rem, 2vw, 1rem);
  overflow: hidden;
}
.ao-diagram-svg { display: block; width: 100%; min-height: 260px; }
.ao-ray { stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.ao-arc { fill: none; stroke: var(--forest); stroke-width: 7; stroke-linecap: round; }
.ao-arc.is-missing { stroke: var(--coral); stroke-dasharray: 8 7; }
.ao-angle-label {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 900;
  fill: var(--ink);
  paint-order: stroke;
  stroke: #fffaf0;
  stroke-width: 5;
  stroke-linejoin: round;
  text-anchor: middle;
  dominant-baseline: middle;
}
.ao-angle-label.is-missing { fill: var(--coral); font-size: 28px; }
.ao-origin { fill: var(--mustard); stroke: var(--ink); stroke-width: 3; }
.ao-right-mark { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.ao-triangle { fill: rgba(255, 201, 64, 0.14); stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; }
.ao-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.75rem; }
.ao-option {
  min-height: 64px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--canvas-alt);
  color: var(--ink);
  box-shadow: var(--shadow-hard);
  font: 900 clamp(1.3rem, 4vw, 2.1rem)/1 var(--f-display);
  cursor: pointer;
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.ao-option:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hard-lg); }
.ao-option:focus-visible, .ao-btn:focus-visible, .ao-link:focus-visible { outline: 4px solid var(--mustard); outline-offset: 3px; }
.ao-option.is-selected { background: var(--forest); color: var(--canvas); }
.ao-option.is-correct { background: var(--mustard); color: var(--ink); }
.ao-option.is-extra { background: #fff; border-style: dashed; }
.ao-map-card { position: relative; min-height: 220px; }
.ao-map-ray { position: absolute; left: 58px; bottom: 58px; width: 150px; height: 7px; background: var(--ink); border-radius: 99px; transform-origin: left center; }
.ao-map-ray--base { transform: rotate(0deg); }
.ao-map-ray--tilt { transform: rotate(-42deg); background: var(--forest); }
.ao-map-arc { position: absolute; left: 84px; bottom: 64px; width: 86px; height: 86px; border: 7px solid var(--coral); border-left-color: transparent; border-bottom-color: transparent; border-radius: 999px; transform: rotate(-42deg); }
.ao-map-stamp {
  position: absolute;
  right: 26px;
  bottom: 24px;
  z-index: 3;
  background: var(--mustard);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  padding: 0.45rem 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  transform: rotate(-5deg);
}
.ao-map-card b { position: absolute; left: 22px; top: 22px; z-index: 2; max-width: 12ch; font-family: var(--f-display); font-size: 1.55rem; line-height: 1; }
.ao-reward-map { position: relative; width: min(340px, 100%); height: 190px; margin: 0 auto; border: 3px solid var(--ink); border-radius: var(--radius); background: linear-gradient(35deg, transparent 0 48%, var(--ink) 49% 51%, transparent 52%), radial-gradient(circle at 48% 62%, rgba(200,81,46,0.25) 0 22%, transparent 23%), #fffaf0; box-shadow: var(--shadow-hard); }

@media (max-width: 640px) {
  .ao-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ao-diagram-svg { min-height: 230px; }
  .ao-option { min-height: 58px; }
}
