:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #10131a;
  --panel-raised: #151922;
  --line: #252a35;
  --muted: #9299a8;
  --text: #f5f7fb;
  --gold: #f9d423;
  --orange: #f97316;
  --green: #4ade80;
  --cyan: #58d0ff;
  --blue: #5489ff;
  --red: #ff4b4b;
  --radius: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 5%, rgba(84, 137, 255, .12), transparent 26rem),
    radial-gradient(circle at 18% 10%, rgba(249, 212, 35, .07), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
code, kbd, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: white;
  color: black;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--max));
  margin: 18px auto 0;
  padding: 12px 14px 12px 18px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(9, 11, 16, .8);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  backdrop-filter: blur(18px);
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.03em; }
.wordmark-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--red), var(--gold) 42%, var(--green) 70%, var(--blue));
  color: #080a0e;
  font-size: 13px;
  letter-spacing: -.04em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), 0 0 24px rgba(249,212,35,.12);
}
.site-nav { display: flex; align-items: center; gap: 26px; color: #c8cdd8; font-size: 14px; font-weight: 650; }
.site-nav a { transition: color .2s ease; }
.site-nav a:hover, .site-nav a:focus-visible { color: white; }
.site-nav .nav-github { padding: 8px 13px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.04); }

.hero {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 72px;
  align-items: center;
  width: min(calc(100% - 40px), var(--max));
  min-height: 720px;
  margin: 0 auto;
  padding: 92px 0 78px;
}
.eyebrow, .section-index, .overline { color: #b6bdc9; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px var(--green); }
h1, h2, h3, p { margin-top: 0; }
.hero h1 {
  margin: 22px 0 24px;
  font-size: clamp(58px, 7vw, 96px);
  line-height: .93;
  letter-spacing: -.075em;
}
.hero h1 span {
  background: linear-gradient(90deg, var(--gold), var(--orange), var(--red), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede { max-width: 620px; margin-bottom: 32px; color: #aeb5c2; font-size: 19px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 800;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.button:hover, .button:focus-visible { transform: translateY(-2px); }
.button-primary { background: var(--gold); color: #10120d; box-shadow: 0 12px 34px rgba(249, 212, 35, .13); }
.button-primary:hover, .button-primary:focus-visible { background: #ffe55c; }
.button-secondary { border-color: var(--line); background: rgba(255,255,255,.035); color: #e7eaf0; }
.button-secondary:hover, .button-secondary:focus-visible { border-color: #4b5260; background: rgba(255,255,255,.065); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 22px; margin: 28px 0 0; padding: 0; color: #777f8d; font-size: 12px; font-weight: 700; list-style: none; }
.hero-facts li::before { content: "◆"; margin-right: 8px; color: #48505e; font-size: 7px; vertical-align: 2px; }

.challenge-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid #2a303c;
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(24,29,39,.98), rgba(13,16,22,.98));
  box-shadow: 0 36px 80px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.04);
  transform: perspective(1100px) rotateY(-4deg) rotateX(2deg);
}
.challenge-card::before { content: ""; position: absolute; inset: -1px auto auto 15%; width: 65%; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); opacity: .7; }
.card-topline, .total-row, .contribution { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.card-topline strong { display: block; margin-top: 3px; font-size: 20px; }
.overline { color: #687181; font-size: 9px; }
.status-pill { padding: 5px 8px; border: 1px solid rgba(74,222,128,.25); border-radius: 999px; background: rgba(74,222,128,.08); color: var(--green); font: 800 9px/1.2 "SFMono-Regular", monospace; letter-spacing: .1em; }
.total-row { margin-top: 34px; color: var(--muted); font-size: 13px; }
.total-row strong { color: white; font-size: 22px; }
.total-row small { color: #737b89; font-size: 12px; }
.progress-track { overflow: hidden; height: 7px; margin: 12px 0 28px; border-radius: 99px; background: #272d37; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--green), var(--cyan)); box-shadow: 0 0 18px rgba(88,208,255,.28); }
.progress-track .example-progress { width: 49.5%; }
.crop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.crop-stat { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #262c37; border-radius: 12px; background: rgba(255,255,255,.025); }
.crop-stat b, .crop-stat small { display: block; }
.crop-stat b { font-size: 12px; }
.crop-stat small { margin-top: 2px; color: #777f8d; font-size: 10px; }
.crop-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; color: #0c0e12; font-size: 11px; font-weight: 950; }
.crop-icon.wheat { background: linear-gradient(135deg, #f9d423, #a66b16); }
.crop-icon.carrot { background: linear-gradient(135deg, #ffad32, #f04e23); }
.crop-icon.melon { background: linear-gradient(135deg, #6fe47f, #ea6681); }
.crop-icon.wart { background: linear-gradient(135deg, #e94255, #7a1830); color: white; }
.contribution { margin-top: 20px; padding-top: 18px; border-top: 1px solid #262c37; color: #7f8795; font-size: 11px; }
.contribution strong { color: #d5dae3; }

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.feature-strip article { display: flex; gap: 18px; padding: 34px 28px; border-right: 1px solid var(--line); }
.feature-strip article:last-child { border-right: 0; }
.feature-number { color: #4e5664; font: 800 10px/1.5 "SFMono-Regular", monospace; }
.feature-strip h2 { margin-bottom: 6px; font-size: 15px; }
.feature-strip p { margin: 0; color: #7f8795; font-size: 12px; line-height: 1.7; }

.docs-section { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: 120px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
.section-heading { max-width: 690px; margin-bottom: 52px; }
.section-heading h2, .config-copy h2, .final-cta h2 { margin: 14px 0 20px; font-size: clamp(42px, 5vw, 70px); line-height: 1.02; letter-spacing: -.055em; }
.section-heading p, .config-copy > p { color: #8f97a5; font-size: 17px; }
.section-index { color: var(--gold); font-family: "SFMono-Regular", monospace; font-size: 10px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0; list-style: none; }
.steps li { min-height: 230px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); }
.steps li > span { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 44px; border: 1px solid #3a414e; border-radius: 50%; color: var(--gold); font: 800 11px "SFMono-Regular", monospace; }
.steps h3 { margin-bottom: 8px; font-size: 17px; }
.steps p { margin: 0; color: #848c9a; font-size: 13px; }
.steps code { color: #dce2ec; font-size: .95em; }
.callout { margin-top: 16px; padding: 17px 20px; border: 1px solid rgba(88,208,255,.2); border-radius: 12px; background: rgba(88,208,255,.055); color: #97a2b2; font-size: 13px; }
.callout strong { margin-right: 4px; color: var(--cyan); }

.split-heading { display: grid; grid-template-columns: 1.2fr .8fr; gap: 60px; max-width: none; align-items: end; }
.split-heading p { margin-bottom: 7px; }
.search-box { display: flex; align-items: center; gap: 12px; height: 52px; margin-bottom: 12px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: #0d1016; color: #5f6877; }
.search-box:focus-within { border-color: #525b6b; box-shadow: 0 0 0 3px rgba(84,137,255,.09); }
.search-box input { flex: 1; width: 100%; border: 0; outline: 0; background: transparent; color: white; }
.search-box input::placeholder { color: #5f6877; }
.search-box kbd { padding: 2px 7px; border: 1px solid #343a45; border-radius: 5px; background: #171b23; color: #7c8594; font-size: 10px; }
.placeholder-list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.placeholder-row { display: grid; grid-template-columns: minmax(330px, 1fr) 1fr auto; gap: 24px; align-items: center; width: 100%; padding: 16px 18px; border: 0; border-bottom: 1px solid var(--line); background: #10131a; color: inherit; text-align: left; cursor: pointer; transition: background .15s ease; }
.placeholder-row:last-child { border-bottom: 0; }
.placeholder-row:hover, .placeholder-row:focus-visible { background: #171b23; outline: none; }
.placeholder-row code { color: var(--cyan); font-size: 12px; }
.placeholder-row span { color: #858d9b; font-size: 12px; }
.placeholder-row em { color: #626b7a; font-size: 10px; font-style: normal; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.placeholder-row:hover em, .placeholder-row:focus-visible em { color: var(--gold); }
.empty-state { padding: 44px; border: 1px dashed var(--line); border-radius: 12px; color: #6d7583; text-align: center; }
.syntax-details { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.018); }
.syntax-details summary { display: flex; justify-content: space-between; padding: 18px 20px; cursor: pointer; color: #cbd0da; font-size: 13px; font-weight: 700; list-style: none; }
.syntax-details summary::-webkit-details-marker { display: none; }
.syntax-details[open] summary span { transform: rotate(45deg); }
.syntax-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; padding: 8px 20px 24px; }
.syntax-grid h3 { color: #727b8a; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.syntax-grid code { display: block; margin-top: 8px; color: #b5bdca; font-size: 11px; }

.command-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line); color: #8d95a3; font-size: 12px; }
.command-table th, .command-table td { padding: 20px 24px 20px 0; border-bottom: 1px solid var(--line); text-align: left; }
.command-table th:first-child, .command-table td:first-child { width: 30%; }
.command-table th:nth-child(2), .command-table td:nth-child(2) { width: 42%; }
.command-table th:last-child, .command-table td:last-child { width: 28%; padding-right: 0; }
.command-table td:first-child code { color: var(--gold); }
.command-table td:last-child code { color: #697280; }
.command-table th { padding-top: 12px; padding-bottom: 12px; color: #565f6e; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }

.config-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; align-items: center; }
.check-list { display: grid; gap: 12px; padding: 0; color: #afb6c2; font-size: 13px; list-style: none; }
.check-list li::before { content: "✓"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 10px; border-radius: 5px; background: rgba(74,222,128,.1); color: var(--green); font-size: 10px; }
.code-window { overflow: hidden; border: 1px solid #2a303b; border-radius: 16px; background: #0d1015; box-shadow: 0 28px 60px rgba(0,0,0,.32); }
.window-bar { display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; border-bottom: 1px solid #252a34; background: #141820; }
.window-bar span { width: 8px; height: 8px; border-radius: 50%; background: #3d4552; }
.window-bar span:first-child { background: #ff6159; }
.window-bar span:nth-child(2) { background: #ffbd2e; }
.window-bar span:nth-child(3) { background: #28c941; }
.window-bar b { margin-left: 7px; color: #656e7d; font: 500 10px "SFMono-Regular", monospace; }
.code-window pre { margin: 0; padding: 28px; overflow-x: auto; color: #8891a0; font-size: 12px; line-height: 1.9; }
.code-key { color: #80c7ef; }
.code-number { color: #f6cf65; }
.code-value { color: #d69cf7; }
.code-bool { color: #72dd9d; }

.final-cta { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: 140px 0; text-align: center; }
.final-cta h2 { margin-left: auto; margin-right: auto; max-width: 870px; }
.final-cta .hero-actions { justify-content: center; margin-top: 34px; }
footer { display: flex; align-items: center; justify-content: space-between; width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: 30px 0 40px; border-top: 1px solid var(--line); color: #737b89; font-size: 11px; }
footer p { margin: 0; }
footer > a:last-child { color: #a5acb8; font-weight: 700; }

.toast { position: fixed; z-index: 50; left: 50%; bottom: 22px; padding: 10px 14px; border: 1px solid #3a424f; border-radius: 9px; background: #171b23; color: white; box-shadow: 0 12px 30px rgba(0,0,0,.38); font-size: 12px; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity .2s ease, transform .2s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .site-nav a:not(.nav-github) { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 100px; }
  .challenge-card { max-width: 620px; transform: none; }
  .feature-strip { grid-template-columns: 1fr; }
  .feature-strip article { border-right: 0; border-bottom: 1px solid var(--line); }
  .feature-strip article:last-child { border-bottom: 0; }
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: auto 1fr; gap: 20px; min-height: 0; }
  .steps li > span { margin-bottom: 0; }
  .split-heading, .config-section { grid-template-columns: 1fr; gap: 40px; }
  .placeholder-row { grid-template-columns: 1fr auto; gap: 10px; }
  .placeholder-row span { grid-column: 1; grid-row: 2; }
  .placeholder-row em { grid-column: 2; grid-row: 1 / span 2; }
  .syntax-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 600px) {
  .site-header { width: calc(100% - 24px); margin-top: 10px; }
  .wordmark > span:last-child { font-size: 14px; }
  .nav-github { font-size: 0; }
  .nav-github span { font-size: 14px; }
  .hero, .feature-strip, .docs-section, .final-cta, footer { width: calc(100% - 28px); }
  .hero { gap: 52px; padding: 78px 0 64px; }
  .hero h1 { font-size: 54px; }
  .hero-lede { font-size: 16px; }
  .hero-actions .button { flex: 1 1 100%; }
  .challenge-card { padding: 18px; }
  .crop-grid { grid-template-columns: 1fr; }
  .total-row strong { font-size: 18px; }
  .docs-section { padding: 86px 0; }
  .section-heading h2, .config-copy h2, .final-cta h2 { font-size: 42px; }
  .placeholder-row { padding: 15px; }
  .placeholder-row code { overflow-wrap: anywhere; }
  .command-table thead { display: none; }
  .command-table, .command-table tbody, .command-table tr, .command-table td { display: block; width: 100%; }
  .command-table tr { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .command-table td, .command-table td:first-child, .command-table td:nth-child(2), .command-table td:last-child { width: 100%; padding: 2px 0; border: 0; }
  .code-window pre { padding: 20px; font-size: 10px; }
  footer { flex-direction: column; gap: 18px; text-align: center; }
}

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