:root {
  --bg: #0f1419;
  --bg-raise: #121820;
  --panel: #1a2332;
  --panel-head: #152030;
  --border: #2d3a4d;
  --text: #e7ecf3;
  --muted: #93a4b8;
  --green: #00c805;
  --green-dim: #1a3d22;
  --green-ink: #041407;
  --danger: #f26b6b;
  --nav-h: 3.5rem;
  --max: 1120px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }

a { color: #8ec8ef; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #fff; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--green);
  color: var(--green-ink);
  padding: 0.4rem 0.7rem;
  z-index: 20;
}
.skip:focus { top: 0.5rem; }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  background: rgba(15, 20, 25, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.wordmark {
  color: var(--green);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  margin-right: auto;
}
.wordmark:hover { color: var(--green); }

.nav-links {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  min-width: 0;
  overflow: visible;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  white-space: nowrap;
}
.nav-links a:hover { color: #fff; }
.nav-links a[aria-current="page"] { color: var(--text); }

.nav-drop { position: relative; display: flex; align-items: center; gap: 0.1rem; }
.nav-caret {
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.nav-caret::before {
  content: "";
  display: block;
  width: 0.38rem;
  height: 0.38rem;
  margin: 0.15rem auto 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.nav-caret:hover,
.nav-caret[aria-expanded="true"] { color: #fff; background: var(--bg-raise); }
.nav-drop-panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.7rem);
  left: 0;
  z-index: 20;
  min-width: 11rem;
  flex-direction: column;
  padding: 0.35rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.nav-drop-panel a {
  display: block;
  padding: 0.45rem 0.65rem;
  border-radius: 0.35rem;
}
.nav-drop-panel a:hover { background: var(--bg-raise); color: #fff; }
.nav-drop:hover .nav-drop-panel,
.nav-drop:focus-within .nav-drop-panel,
.nav-drop.is-open .nav-drop-panel { display: flex; }

.nav .btn { flex-shrink: 0; }

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
}

.hero {
  position: relative;
  padding: 3.2rem 0 2.4rem;
  background-image:
    linear-gradient(rgba(45, 58, 77, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 58, 77, 0.28) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 20, 25, 0.2), var(--bg) 92%);
  pointer-events: none;
}
.hero .wrap { position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 2.2rem;
  align-items: center;
}
.hero h1 { font-size: clamp(2.35rem, 3.4vw, 3.25rem); }
.hero .lede,
.hero .asset-line,
.hero .required-line { max-width: 36rem; }
.hero-frame {
  margin-top: 0;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 200, 5, 0.22);
}
.hero-frame img {
  width: 100%;
  height: auto;
}

.kicker {
  margin: 0 0 0.7rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

h1, h2, h3, h4 { line-height: 1.15; font-weight: 650; letter-spacing: -0.03em; }
h1 { margin: 0; font-size: clamp(2.15rem, 4.6vw, 3.5rem); }
h2 { margin: 0 0 0.8rem; font-size: clamp(1.6rem, 2.4vw, 2rem); }
h3 { margin: 0; font-size: 1.15rem; }

.lede {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.08rem;
  margin: 1rem 0 0;
}

.asset-line {
  margin: 1rem 0 0;
  max-width: 40rem;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 650;
}

.required-line {
  margin: 1rem 0 0;
  max-width: 40rem;
  color: var(--text);
  font-size: 0.95rem;
}
.required-line strong { color: var(--green); font-weight: 650; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.4rem;
  padding: 0.62rem 0.95rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--text);
  background: transparent;
}
.btn-primary { background: var(--green); color: var(--green-ink); }
.btn-primary:hover { color: var(--green-ink); filter: brightness(1.08); }
.btn-ghost { border-color: var(--border); background: rgba(18, 24, 32, 0.8); }
.btn-ghost:hover { border-color: #4d6278; color: #fff; }
.btn-small { padding: 0.4rem 0.7rem; font-size: 0.82rem; }

.frame {
  margin-top: 2rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.frame-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.85rem;
  background: var(--panel-head);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.dots { display: flex; gap: 0.32rem; }
.dots i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #314052;
  display: block;
}
.frame-bar strong { color: var(--text); font-weight: 550; }
.frame-bar .local {
  margin-left: auto;
  color: var(--green);
  letter-spacing: 0.12em;
}
.frame img { width: 100%; background: #0c1014; }

.band, .section { padding: 3.4rem 0; }
.section + .section, .band + .section { border-top: 1px solid rgba(45, 58, 77, 0.7); }

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.fact {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 1rem 1rem 1.05rem;
}
.fact span {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.45rem;
}
.fact p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.caps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
}
.caps li {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--bg-raise);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
}

.section-head { max-width: 40rem; margin-bottom: 1.4rem; }
.section-head p { margin: 0; color: var(--muted); }

.account-grid, .edition-grid, .repo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.account-grid > *,
.edition-grid > *,
.repo-grid > *,
.shot > * {
  min-width: 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  padding: 1.15rem 1.15rem 1.2rem;
}
.card-required { box-shadow: inset 3px 0 0 var(--green); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}
.feature h3 { margin-bottom: 0.45rem; font-size: 1.02rem; }
.feature p { margin: 0; font-size: 0.92rem; }
.feature-grid > * { min-width: 0; }

.card p { color: var(--muted); }
.card .btn { margin-top: 0.4rem; }

.card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}
.req {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-dim);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
}
.fine {
  color: var(--muted);
  font-size: 0.84rem;
  margin: 0.85rem 0 0;
}

.shot {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 0.8fr);
  gap: 1rem;
  align-items: center;
  margin: 0 0 1.3rem;
}
.shot:last-child { margin-bottom: 0; }
.shot .frame { margin-top: 0; }
.shot h3 { margin-bottom: 0.4rem; }
.shot p { margin: 0; color: var(--muted); }

.price {
  font-family: var(--mono);
  color: var(--green);
  font-size: 0.95rem;
  margin: 0.35rem 0 0.8rem;
}
.edition-paid { border-color: #1f6b32; box-shadow: inset 0 0 0 1px rgba(0, 200, 5, 0.25); }
.checklist { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--muted); }
.checklist li + li { margin-top: 0.35rem; }

.clone {
  position: relative;
  margin: 0 0 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 4.2rem 0.75rem 0.8rem;
}
.clone pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #d5deea;
}
.clone .btn { position: absolute; top: 0.45rem; right: 0.45rem; }

.repo-card h3 a { color: var(--text); text-decoration: none; }
.repo-card h3 a:hover { color: var(--green); }
.repo-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  color: var(--muted);
}
.badge-private { color: var(--green); border-color: #1f6b32; }
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin: 0.9rem 0;
}
.stat {
  background: var(--bg);
  border-radius: 0.4rem;
  padding: 0.45rem 0.55rem;
}
.stat span {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat strong { font-weight: 650; font-size: 0.95rem; }
.commit-list { list-style: none; margin: 0; padding: 0; }
.commit-list li {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
}
.sha { font-family: var(--mono); font-size: 0.78rem; }
.commit-list li span { overflow-wrap: anywhere; }
.commit-list time { color: var(--muted); font-family: var(--mono); font-size: 0.75rem; white-space: nowrap; }
.repo-note, .repo-fallback { color: var(--muted); margin: 0.4rem 0 0; }
.repo-card h4 {
  margin: 0.2rem 0 0.3rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 550;
}
.updated {
  margin: 0.8rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.faq { display: flex; flex-direction: column; gap: 0.45rem; }
.faq details {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 0.95rem;
}
.faq summary { cursor: pointer; font-weight: 650; }
.faq details[open] { box-shadow: inset 3px 0 0 var(--green); }
.faq details p { margin: 0.55rem 0 0; color: var(--muted); }

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.6rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer p { margin: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 1.4rem 2rem;
  margin-bottom: 1.5rem;
}
.footer-brand {
  margin: 0 0 0.4rem;
  color: var(--green);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.footer-label {
  margin: 0 0 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}
.footer nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}
.footer nav a { color: var(--muted); text-decoration: none; }
.footer nav a:hover { color: #fff; }
.footer-note { max-width: 68rem; }

.terms, .page { padding: 2.5rem 0 3rem; }
.terms h1, .page h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); max-width: none; }
.page .lede { max-width: 42rem; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.6rem;
}
.about-grid .card h2 { font-size: 1.2rem; margin-bottom: 0.55rem; }
.about-grid .card p { color: var(--muted); }
.contact-card { margin-top: 1.4rem; max-width: 42rem; }
.contact-label {
  margin: 0 0 0.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}
.contact-mail { margin: 0 0 0.8rem; font-size: 1.35rem; font-weight: 650; }
.contact-mail a { color: var(--text); text-decoration: none; }
.contact-mail a:hover { color: #fff; }
.contact-notes { margin-top: 1rem; }
.terms ol { padding-left: 1.2rem; max-width: 46rem; }
.terms li { margin: 0.7rem 0; color: var(--muted); }
.terms li strong { color: var(--text); }

@media (max-width: 900px) {
  .facts, .account-grid, .edition-grid, .repo-grid, .about-grid, .shot, .hero-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .hero-frame img { height: auto; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .commit-list li { grid-template-columns: 4.2rem minmax(0, 1fr); }
  .commit-list time { grid-column: 2; }
}

@media (max-width: 720px) {
  .nav { padding: 0 0.8rem; }
  .nav-links { gap: 0.7rem; }
  .wrap { width: min(var(--max), calc(100% - 1.6rem)); }
  .hero h1 { max-width: none; }
  .feature-grid, .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
