:root {
  --bg: #fafaf7;
  --bg-elevated: #ffffff;
  --ink: #0c0c0c;
  --ink-soft: #3a3a3a;
  --ink-mute: #6b6b6b;
  --line: #e4e4de;
  --line-strong: #0c0c0c;
  --lime: #c8f542;
  --lime-deep: #9fd000;
  --lime-wash: rgba(200, 245, 66, 0.22);
  --blue: #6eb6ff;
  --radius: 2px;
  --max: 42rem;
  --wide: 56rem;
  --font: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: rgba(12, 12, 12, 0.05);
  padding: 0.1em 0.35em;
  border-radius: var(--radius);
}

/* Atmosphere: grid + lime bloom, not a flat wash */
.atmosphere {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      55% 40% at 88% 8%,
      rgba(110, 182, 255, 0.18),
      transparent 70%
    ),
    radial-gradient(
      50% 45% at 12% 92%,
      rgba(200, 245, 66, 0.28),
      transparent 65%
    ),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 38%, #f3f6ea 100%);
}

.atmosphere::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(12, 12, 12, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 12, 12, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(250, 250, 247, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  height: 28px;
  width: auto;
}

.header-cta {
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.55rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.2s ease;
}

.header-cta:hover {
  color: #fff;
  background: #222;
  transform: translateY(-1px);
}

.header-cta-full {
  display: inline;
}

.header-cta-short {
  display: none;
}

main {
  width: min(100% - 2.5rem, var(--wide));
  margin: 0 auto;
  padding-bottom: 5rem;
}

.hero {
  padding: clamp(3.5rem, 12vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem);
  max-width: 40rem;
}

.hero-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.1rem;
  margin: 0 0 1.5rem;
}

.hero-logo {
  display: block;
  height: clamp(2.4rem, 6vw, 3.25rem);
  width: auto;
}

.hero-kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 0.35rem 0.7rem;
  background: var(--lime);
  border-radius: var(--radius);
}

.hero-title {
  margin: 0;
  font-size: clamp(2.35rem, 6.2vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: var(--ink);
}

.hero-lead {
  margin: 1.35rem 0 0;
  max-width: 34rem;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition:
    transform 0.25s var(--ease),
    background 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
  background: #1a1a1a;
}

.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--lime-wash);
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.15rem;
  padding: 0.85rem 0;
  margin: 0 0 2.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 3.6rem;
  z-index: 15;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(10px);
}

.toc a {
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-mute);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.toc a:hover,
.toc a.is-active {
  color: var(--ink);
  background: var(--lime);
}

.section {
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--line);
  max-width: var(--max);
}

.section:last-of-type {
  border-bottom: 0;
}

.section-head h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
}

.section-head {
  margin-bottom: 1.5rem;
}

.section > p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.section > p:last-child {
  margin-bottom: 0;
}

.qualify-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: q;
  display: grid;
  gap: 0.75rem;
}

.qualify-list li {
  counter-increment: q;
  position: relative;
  padding: 1rem 1rem 1rem 3.4rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-left: 3px solid var(--lime-deep);
}

.qualify-list li::before {
  content: counter(q, decimal-leading-zero);
  position: absolute;
  left: 0.9rem;
  top: 1.05rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-mute);
}

.note {
  margin: 1.5rem 0 0;
  padding: 1rem 1.1rem;
  background: rgba(12, 12, 12, 0.03);
  border-left: 3px solid var(--ink);
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.reject-panel {
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
}

.reject-panel summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  font-weight: 700;
  user-select: none;
}

.reject-panel summary::-webkit-details-marker {
  display: none;
}

.reject-panel summary::after {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
  flex-shrink: 0;
}

.reject-panel[open] summary::after {
  transform: rotate(225deg);
  margin-top: 0.25rem;
}

.reject-count {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-mute);
  margin-right: auto;
  margin-left: 0.75rem;
}

.reject-list {
  margin: 0;
  padding: 0 1.15rem 1.15rem 2.4rem;
  display: grid;
  gap: 0.7rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.scope-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.scope-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.scope-table th,
.scope-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.scope-table th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: rgba(12, 12, 12, 0.03);
}

.scope-table tr:last-child td {
  border-bottom: 0;
}

.scope-table td:first-child {
  white-space: nowrap;
}

.plain-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  display: grid;
  gap: 0.65rem;
}

.site-footer {
  width: min(100% - 2.5rem, var(--wide));
  margin: 0 auto 3rem;
  padding: 2rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.75rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand img {
  display: block;
  height: 24px;
  width: auto;
}

.footer-brand span {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.footer-mail {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  width: fit-content;
  border-bottom: 2px solid var(--lime);
  padding-bottom: 0.1rem;
  transition: border-color 0.2s ease;
}

.footer-mail:hover {
  border-bottom-color: var(--ink);
}

.footer-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-mute);
}

.footer-meta a {
  color: var(--ink-mute);
  text-decoration: none;
}

.footer-meta a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.hero .reveal:nth-child(1) {
  transition-delay: 0.05s;
}

.hero .reveal:nth-child(2) {
  transition-delay: 0.15s;
}

.hero .reveal:nth-child(3) {
  transition-delay: 0.25s;
}

.hero .reveal:nth-child(4) {
  transition-delay: 0.35s;
}

@media (max-width: 640px) {
  .header-cta-full {
    display: none;
  }

  .header-cta-short {
    display: inline;
  }

  .site-header {
    padding: 0.85rem 1rem;
  }

  main {
    width: min(100% - 1.75rem, var(--wide));
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .toc {
    top: 3.35rem;
    gap: 0.2rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .toc a {
    white-space: nowrap;
  }

  .scope-table td:first-child {
    white-space: normal;
  }

  .reject-count {
    display: none;
  }

  .site-footer {
    width: min(100% - 1.75rem, var(--wide));
  }
}
