* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); font: 16px/1.65 "Segoe UI", system-ui, sans-serif; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; opacity: .11; background: repeating-radial-gradient(ellipse at 18% 12%, transparent 0 18px, var(--accent-alt) 19px 20px, transparent 21px 38px); }
a { color: var(--text); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .2em; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid #1a68a8; outline-offset: 3px; }
.skip-link { position: fixed; z-index: 20; top: -5rem; left: 1rem; padding: .7rem 1rem; background: var(--text); color: var(--surface); }
.skip-link:focus { top: 1rem; }
.hero, main, footer { width: min(1160px, calc(100% - 2rem)); margin-inline: auto; }
.hero { min-height: 76vh; padding: 1.1rem 0 3rem; display: flex; flex-direction: column; }
nav { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .4rem 1.3rem; }
nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.horizon-mark { display: grid; grid-template-columns: repeat(4, 1fr); height: 12px; margin: 5rem 0 2.4rem; }
.horizon-mark i:nth-child(1) { background: #e7b53f; }
.horizon-mark i:nth-child(2) { background: #258a61; }
.horizon-mark i:nth-child(3) { background: #2b75ae; }
.horizon-mark i:nth-child(4) { background: #d2603a; }
.eyebrow { margin: 0 0 .7rem; color: var(--accent); font-size: .74rem; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
h1 { margin: 0; max-width: 10ch; font-size: clamp(4rem, 10.7vw, 9.5rem); line-height: .82; letter-spacing: -.065em; }
h2 { margin: .1em 0 .5em; font-size: clamp(2.1rem, 5vw, 4.7rem); line-height: .95; letter-spacing: -.045em; }
.hero-foot { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: end; padding-top: 3rem; }
.lede { margin: 0; max-width: 48ch; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.45rem); }
dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0; }
dl div { border-top: 4px solid var(--accent-alt); padding-top: .7rem; }
dt { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
dd { margin: .2rem 0 0; font-weight: 750; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 0 0 7rem; }
.metrics div { min-height: 10rem; padding: 1rem; display: flex; flex-direction: column; justify-content: space-between; border-top: 7px solid; background: var(--surface); box-shadow: 0 10px 28px rgb(24 60 58 / 9%); }
.metrics div:nth-child(1) { border-color: #258a61; }
.metrics div:nth-child(2) { border-color: #2b75ae; }
.metrics div:nth-child(3) { border-color: #d2603a; }
.metrics div:nth-child(4) { border-color: #e7b53f; }
.metrics span, .metrics small { color: var(--muted); font-size: .78rem; }
.metrics strong { font: 2.2rem/1 Georgia, serif; }
.sequence { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 7vw, 7rem); align-items: start; padding: 3rem 0 7rem; }
.sequence-copy { position: sticky; top: 2rem; }
.sequence-copy p:last-child { max-width: 44ch; color: var(--muted); }
.sequence-board { padding: clamp(1.2rem, 4vw, 2.5rem); border: 2px solid var(--text); background: var(--surface); box-shadow: 14px 14px 0 var(--accent-alt); }
.mode-stack { display: grid; grid-template-columns: auto 1fr; gap: 0 1.2rem; align-items: center; padding-bottom: 1.5rem; border-bottom: 1px solid color-mix(in srgb, var(--muted) 35%, transparent); }
.mode-number { grid-row: span 2; margin: 0; width: 5rem; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: white; font: 2.5rem/1 Georgia, serif; }
.mode-name { margin: 0; font: 1.8rem/1.1 Georgia, serif; }
#mode-detail { margin: .35rem 0 0; color: var(--muted); }
.sequence-actions { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: .5rem; margin: 1.3rem 0; }
.sequence-actions button { min-height: 48px; border: 2px solid var(--text); padding: .55rem; background: transparent; color: var(--text); cursor: pointer; font-weight: 800; }
.sequence-actions button:first-child { background: var(--text); color: var(--surface); }
.sequence-key { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.sequence-key li { display: grid; grid-template-columns: 2.3rem 1fr; gap: .5rem; align-items: center; }
.sequence-key b { width: 2.1rem; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--muted); border-radius: 50%; }
.section-heading { max-width: 750px; }
.guide { padding: 3rem 0 7rem; }
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin-top: 2rem; border-top: 1px solid var(--muted); }
.guide-card { min-width: 0; padding: 2rem 2rem 2.5rem 0; border-bottom: 1px solid var(--muted); }
.guide-card:nth-child(even) { padding-left: 2rem; padding-right: 0; border-left: 1px solid var(--muted); }
.guide-card .kicker { color: var(--accent-alt); font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.guide-card h2 { font-size: clamp(1.7rem, 3vw, 2.7rem); }
.guide-card > p:not(.kicker) { color: var(--muted); }
.section-cards { font-size: .86rem; }
.section-cards strong { color: var(--text); }
.boundary { margin: 0 0 7rem; padding: clamp(1.5rem, 5vw, 4rem); color: #fffdf7; background: var(--text); position: relative; overflow: hidden; }
.boundary::after { content: ""; position: absolute; width: 17rem; aspect-ratio: 1; right: -5rem; bottom: -8rem; border: 3rem solid var(--accent); border-radius: 50%; opacity: .6; }
.boundary .eyebrow { color: #e7b53f; }
.boundary h2 { max-width: 17ch; }
.boundary > p:last-child { max-width: 70ch; color: #d3dfdc; }
.catalog { padding: 3rem 0; }
.catalog-controls { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: end; margin: 2rem 0; }
label { display: grid; gap: .35rem; color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
input, select { width: 100%; min-height: 48px; border: 1px solid var(--muted); border-radius: 2rem; padding: .65rem 1rem; background: var(--surface); color: var(--text); }
#catalog-status { min-width: 11rem; color: var(--muted); font-size: .8rem; }
.deck-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.deck-card { min-width: 0; padding: 1rem; border-radius: .7rem; background: var(--surface); box-shadow: 0 5px 20px rgb(24 60 58 / 8%); }
.deck-card div { display: grid; gap: .25rem; }
.deck-card span, .deck-card p { margin: 0; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.deck-card[hidden] { display: none; }
footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: 5rem; padding: 2rem 0 4rem; border-top: 1px solid var(--muted); color: var(--muted); }
@media (max-width: 860px) {
  .hero-foot, .sequence { grid-template-columns: 1fr; }
  .sequence-copy { position: static; }
  .metrics, .deck-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-controls { grid-template-columns: 1fr 1fr; }
  #catalog-status { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .hero, main, footer { width: min(100% - 1.1rem, 1160px); }
  .hero { min-height: auto; }
  .horizon-mark { margin-top: 2.5rem; }
  h1 { font-size: clamp(3.5rem, 20vw, 5.8rem); }
  dl, .metrics, .guide-grid, .deck-grid, .catalog-controls { grid-template-columns: 1fr; }
  .guide-card, .guide-card:nth-child(even) { padding: 1.5rem 0; border-left: 0; }
  .sequence-actions { grid-template-columns: 1fr; }
  .mode-stack { grid-template-columns: 1fr; }
  .mode-number { grid-row: auto; margin-bottom: 1rem; }
  footer { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
