:root {
  color: #f7f4ed;
  background: #080b0d;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 20%, #123630 0, transparent 33rem),
    radial-gradient(circle at 90% 75%, #2b183e 0, transparent 30rem),
    #080b0d;
}

html { scroll-behavior: smooth; }

.site-nav {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 32px, 1120px);
  margin: 0 auto;
  padding: 16px 0;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  background: rgb(8 11 13 / 78%);
  backdrop-filter: blur(18px);
}

.site-nav a { color: inherit; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: #08110e; background: #79e7c6; font-size: 10px; letter-spacing: .05em; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 8px 11px; border-radius: 8px; color: #8f9b99; font-size: 13px; }
.nav-links a:hover, .nav-links a.active { color: #f7f4ed; background: rgb(255 255 255 / 7%); }

main {
  width: min(100% - 32px, 980px);
  margin: 0 auto;
  padding: 72px 0 56px;
}

.hero { max-width: 820px; margin-bottom: 40px; padding-top: 14px; }

.eyebrow,
.level {
  margin: 0 0 10px;
  color: #79e7c6;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 700px;
  margin-bottom: 18px;
  font-size: clamp(46px, 8vw, 86px);
  line-height: .92;
  letter-spacing: -.065em;
}

.experiment-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.experiment-link {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  padding: 15px 17px;
  border: 1px solid #2a3235;
  border-radius: 15px;
  color: inherit;
  background: rgb(12 17 19 / 72%);
  text-decoration: none;
}

.experiment-link > span { grid-row: 1 / 3; color: #79e7c6; font-family: ui-monospace, monospace; font-size: 12px; }
.experiment-link strong { font-size: 14px; }
.experiment-link small { color: #7e8987; }
.experiment-link.active { border-color: #346e5e; background: #10231e; }
.experiment-link.upcoming { opacity: .52; }

.lede {
  max-width: 660px;
  color: #bac4c2;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.stage {
  padding: 22px;
  overflow: hidden;
  border: 1px solid #2a3235;
  border-radius: 28px;
  background: rgb(12 17 19 / 86%);
  box-shadow: 0 30px 100px rgb(0 0 0 / 45%);
}

.stage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.stage-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.stage-summary { max-width: 590px; margin: 7px 0 0; color: #8f9b99; font-size: 13px; line-height: 1.5; }

.status {
  padding: 9px 12px;
  border: 1px solid #3b4447;
  border-radius: 999px;
  color: #aeb8b6;
  font-size: 12px;
  white-space: nowrap;
}

.status.supported { color: #79e7c6; border-color: #286454; }
.status.unsupported { color: #ffbf79; border-color: #71502a; }

.effect-controls {
  position: relative;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid #2a3235;
  border-radius: 16px;
  background: #0a0f11;
}

.effect-controls legend {
  padding: 0 7px;
  color: #aeb8b6;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.effect-grid {
  display: grid;
  grid-template-columns: minmax(74px, 1fr) repeat(3, minmax(92px, 1fr));
  gap: 8px;
  align-items: center;
}

.effect-grid-head {
  margin-bottom: 8px;
  color: #727e7c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.effect-grid-head span:first-child { text-align: left; }
.effect-grid strong { color: #f7f4ed; font-size: 13px; }

.effect-grid label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #2a3235;
  border-radius: 9px;
  color: #8f9b99;
  background: #111719;
  cursor: pointer;
  font-size: 12px;
  user-select: none;
}

.effect-grid label:has(input:checked) {
  border-color: #438c78;
  color: #bff8e7;
  background: #15352d;
}

.effect-grid input { position: absolute; opacity: 0; pointer-events: none; }

.clear-effects {
  margin-top: 12px;
  padding: 8px 12px;
  color: #cbd3d1;
  background: #20282a;
  font-size: 12px;
}

.effect-controls:disabled { opacity: .48; }

.canvas { display: block; width: 100%; border: 0; }
.outer { height: 630px; }
.middle { height: 390px; margin-top: 20px; }
.inner { height: 190px; margin-top: 18px; }

.card {
  width: 100%;
  height: 100%;
  padding: 26px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 22px;
  color: #f7f4ed;
}

.card h3 { margin-bottom: 8px; font-size: 25px; letter-spacing: -.035em; }
.card p { margin-bottom: 0; color: rgb(247 244 237 / 70%); line-height: 1.5; }
.card-outer { background: linear-gradient(145deg, #183f36, #10251f); }
.card-middle { background: linear-gradient(145deg, #392455, #21152f); }
.card-inner { background: linear-gradient(145deg, #5d2e1c, #321910); }
.card-middle .level { color: #d5a8ff; }
.card-inner .level { color: #ffbf79; }

button {
  margin-top: 15px;
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  color: #271108;
  background: #ffbf79;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover { background: #ffd09d; }
button:disabled { cursor: not-allowed; filter: grayscale(.75); opacity: .6; }

.interaction-mode {
  display: block;
  max-width: 390px;
  margin-top: 10px;
  color: rgb(247 244 237 / 60%);
  font-size: 11px;
  line-height: 1.4;
}

.fallback {
  display: flex;
  gap: 8px;
  flex-direction: column;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #71502a;
  border-radius: 14px;
  color: #d8c7b4;
  background: #241a10;
  line-height: 1.5;
}

.fallback[hidden] { display: none; }
.fallback code { color: #ffbf79; }

.diagnostics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: #aeb8b6;
  font-size: 13px;
}

.diagnostics li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid #2a3235;
  border-radius: 12px;
  background: #0c1113;
}

.diagnostics strong { color: #f7f4ed; }
.swatch { width: 13px; height: 13px; flex: 0 0 auto; border: 3px solid; border-radius: 3px; }
.outer-swatch { border-color: #79e7c6; }
.middle-swatch { border-color: #c792ff; border-style: dashed; }
.inner-swatch { border-color: #ffad5c; border-style: dotted; }

.answer {
  max-width: 760px;
  margin: 28px 8px 0;
  color: #aeb8b6;
  font-size: 16px;
  line-height: 1.65;
}

.findings {
  margin-top: 84px;
  padding-top: 30px;
  border-top: 1px solid #2a3235;
}

.findings > h2 { margin-bottom: 24px; font-size: clamp(34px, 5vw, 54px); letter-spacing: -.055em; }
.finding-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.finding { min-height: 270px; padding: 22px; border: 1px solid #2a3235; border-radius: 18px; background: rgb(12 17 19 / 76%); }
.finding h3 { margin: 16px 0 10px; font-size: 21px; }
.finding p, .method-note { color: #9aa5a3; line-height: 1.6; }
.finding-status { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.positive .finding-status { color: #79e7c6; background: #15352d; }
.caution .finding-status { color: #ffbf79; background: #3b2815; }
.neutral .finding-status { color: #d5a8ff; background: #2d1c42; }
.method-note { max-width: 740px; margin: 22px 0 0; font-size: 13px; }

.unsupported-demo .card-outer { height: 630px; }
.unsupported-demo .card-middle { height: 390px; margin-top: 20px; }
.unsupported-demo .card-inner { height: 190px; margin-top: 18px; }

@media (max-width: 640px) {
  main { padding-top: 40px; }
  .site-nav { align-items: flex-start; }
  .brand > span:last-child { display: none; }
  .nav-links { gap: 0; }
  .nav-links a { padding-inline: 8px; font-size: 12px; }
  .experiment-nav, .finding-grid { grid-template-columns: 1fr; }
  .stage { padding: 14px; border-radius: 20px; }
  .stage-heading { align-items: flex-start; flex-direction: column; }
  .diagnostics { grid-template-columns: 1fr; }
  .effect-grid { grid-template-columns: 62px repeat(3, minmax(62px, 1fr)); gap: 5px; }
  .effect-grid label { min-height: 34px; font-size: 10px; }
  .outer { height: 590px; }
  .middle { height: 370px; }
  .inner { height: 180px; }
  .unsupported-demo .card-outer { height: 590px; }
  .unsupported-demo .card-middle { height: 370px; }
  .unsupported-demo .card-inner { height: 180px; }
  .card { padding: 20px; }
  .card h3 { font-size: 21px; }
}
