:root {
  --paper: #F4EFE6;
  --ink: #0E0E10;
  --ink-soft: #4A4A4E;
  --paper-dim: #D9D3C7;
  --pass: #1F9D55;
  --warn: #D98E04;
  --fail: #D6453D;
  --max: 1280px;
  --gutter: clamp(20px, 5vw, 80px);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", Arial, sans-serif;
  line-height: 1.2;
  letter-spacing: 0;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: var(--gutter);
  top: 12px;
  z-index: 50;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 12px;
  font-family: "JetBrains Mono", monospace;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--paper-dim);
  background: rgba(244, 239, 230, 0.94);
  backdrop-filter: blur(16px);
}

.topbar > *,
.page-hero > *,
.price-grid > *,
.feature-table > * {
  min-width: 0;
}

.brand,
.nav,
.top-actions,
.hero-link,
.console-top,
.console-row,
.verdict-stamp,
.footer-brand,
.footer nav,
.tabs,
.price-grid,
.doc-layout,
.changelog-entry {
  display: flex;
  align-items: center;
}

.brand img,
.footer-brand img {
  width: 118px;
  height: auto;
}

.footer-brand img {
  filter: invert(1);
}

.nav {
  justify-content: flex-end;
  gap: clamp(14px, 2vw, 26px);
  color: var(--ink-soft);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.top-actions {
  gap: 16px;
}

.nav a:hover,
.top-actions a:not(.ink-button):hover {
  color: var(--ink);
}

.nav a.is-active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.ink-button,
.paper-button,
.run-form button,
.footer .paper-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: 0 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.ink-button,
.run-form button {
  background: var(--ink);
  color: var(--paper);
}

.paper-button {
  background: var(--paper);
  color: var(--ink);
}

main,
.footer {
  max-width: var(--max);
  margin: 0 auto;
}

section,
.footer {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.eyebrow,
.mono,
code,
pre,
input,
.status,
.rule-id,
.matrix,
.console,
.table,
.meta,
.tabs button,
.run-form small,
.footer {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1,
h2 {
  margin-bottom: 0;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.96;
}

h1 {
  max-width: 980px;
  margin-top: 18px;
  font-size: 84px;
  overflow-wrap: break-word;
}

h2 {
  font-size: 56px;
}

h3 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 23px;
  line-height: 1.12;
  overflow-wrap: break-word;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: end;
  min-height: calc(62svh - 81px);
  padding-top: clamp(34px, 5vw, 64px);
  padding-bottom: clamp(42px, 6vw, 72px);
  border-bottom: 1px solid var(--paper-dim);
}

.hero h1 {
  max-width: 900px;
}

.run-form {
  max-width: 900px;
  margin-top: 32px;
}

.run-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--paper);
}

.run-form input {
  min-width: 0;
  min-height: 60px;
  border: 0;
  padding: 0 18px;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  outline: none;
}

.run-form button {
  min-height: 60px;
  border: 0;
  border-left: 1px solid var(--ink);
}

.run-form small {
  display: block;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 12px;
}

.run-form .form-error {
  color: var(--fail);
}

.run-form .form-error a {
  text-decoration: underline;
}

.hero-link {
  margin-top: 22px;
  color: var(--ink);
  font-weight: 700;
}

.console-wrap {
  padding-top: clamp(42px, 6vw, 72px);
  padding-bottom: clamp(42px, 6vw, 72px);
  border-bottom: 1px solid var(--paper-dim);
}

.console,
.report-surface,
.ink-panel,
.code-panel {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 2px;
}

.console {
  min-height: 560px;
  overflow: hidden;
}

.console-top {
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(244, 239, 230, 0.18);
}

.console-command {
  color: var(--paper);
  font-size: 18px;
}

.console-time {
  color: rgba(244, 239, 230, 0.58);
  font-size: 12px;
  text-transform: uppercase;
}

.console-body {
  padding: 24px;
}

.console-grid {
  display: grid;
  gap: 10px;
}

.console-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 84px;
  gap: 18px;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid rgba(244, 239, 230, 0.14);
}

.client-label {
  color: var(--paper);
  font-size: 13px;
  text-transform: lowercase;
}

.client-label small {
  display: block;
  max-width: 520px;
  margin-top: 6px;
  color: rgba(244, 239, 230, 0.46);
  font-size: 11px;
  line-height: 1.25;
  text-transform: none;
}

.track {
  display: grid;
  grid-template-columns: repeat(9, minmax(18px, 1fr));
  gap: 4px;
}

.seg {
  height: 12px;
  border: 1px solid rgba(244, 239, 230, 0.22);
  background: transparent;
}

.console-row.calibrating {
  opacity: 0.62;
}

.track.muted .seg {
  border-color: rgba(244, 239, 230, 0.12);
}

.status.muted,
.cell.muted {
  color: rgba(244, 239, 230, 0.42);
}

.seg.pass,
.status.pass,
.cell.pass,
.severity.low {
  color: var(--pass);
}

.seg.pass {
  background: var(--pass);
  border-color: var(--pass);
}

.seg.warn {
  background: var(--warn);
  border-color: var(--warn);
}

.seg.fail {
  background: var(--fail);
  border-color: var(--fail);
}

.status {
  justify-self: end;
  font-size: 12px;
  font-weight: 700;
}

.status.warn,
.cell.warn,
.severity.medium {
  color: var(--warn);
}

.status.fail,
.cell.fail,
.severity.high,
.severity.critical {
  color: var(--fail);
}

.trace-excerpt {
  display: none;
  margin: 20px 0 0;
  border-left: 2px solid var(--fail);
  padding: 14px 16px;
  background: rgba(244, 239, 230, 0.06);
  color: var(--paper);
  white-space: pre-wrap;
}

.trace-excerpt.is-open {
  display: block;
}

.scan-line {
  margin-top: 20px;
  border-top: 1px solid rgba(244, 239, 230, 0.18);
  padding-top: 18px;
  color: var(--paper);
}

.verdict-stamp {
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  border: 1px solid var(--fail);
  padding: 20px;
  color: var(--fail);
}

.verdict-stamp svg {
  width: 34px;
  fill: currentColor;
}

.verdict-stamp strong {
  display: block;
  font-size: 44px;
  line-height: 0.9;
  letter-spacing: 0;
  font-family: "Archivo", Arial, sans-serif;
}

.verdict-stamp span {
  display: block;
  margin-top: 8px;
  color: var(--paper);
}

.console-reveal {
  display: none;
}

.trace-excerpt.console-reveal.is-open,
.scan-line.console-reveal.is-open {
  display: block;
}

.verdict-stamp.console-reveal.is-open {
  display: flex;
}

.noscript-console {
  margin: 20px 0 0;
  border-top: 1px solid rgba(244, 239, 230, 0.18);
  padding-top: 18px;
  color: var(--paper);
}

.noscript-console a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.paper-section {
  padding-top: clamp(58px, 8vw, 104px);
  padding-bottom: clamp(58px, 8vw, 104px);
  border-bottom: 1px solid var(--paper-dim);
}

.claim-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(520px, 1.28fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.claim-grid > * {
  min-width: 0;
}

.claim-grid p {
  color: var(--ink-soft);
  font-size: 22px;
  line-height: 1.12;
}

.inline-evidence {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 18px;
}

.diff-line {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  min-height: 38px;
  align-items: center;
  border-bottom: 1px solid rgba(244, 239, 230, 0.14);
}

.diff-line.fail {
  border-left: 2px solid var(--fail);
  padding-left: 12px;
  color: var(--fail);
}

.step-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
}

.step-list li {
  border-bottom: 1px solid var(--paper-dim);
  padding: 10px 0;
}

.rule-strip {
  display: grid;
  gap: 12px;
}

.rule-strip div {
  display: grid;
  grid-template-columns: 120px 90px 1fr;
  gap: 18px;
  border-bottom: 1px solid var(--paper-dim);
  padding: 12px 0;
}

.repeat-cta {
  text-align: center;
  padding-top: clamp(58px, 8vw, 100px);
  padding-bottom: clamp(58px, 8vw, 100px);
  border-bottom: 1px solid var(--paper-dim);
}

.repeat-cta h2 {
  max-width: 1000px;
  margin: 0 auto;
}

.repeat-cta .run-form {
  margin-left: auto;
  margin-right: auto;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.65fr) minmax(420px, 0.85fr);
  gap: clamp(34px, 6vw, 88px);
  align-items: end;
  min-height: auto;
  padding-top: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--paper-dim);
}

.page-hero h1 {
  font-size: 64px;
  line-height: 0.98;
}

.page-hero h1.mono {
  max-width: 620px;
  font-size: 54px;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.page-hero .lead {
  margin-bottom: 10px;
}

.report-surface {
  margin-top: clamp(42px, 6vw, 72px);
  overflow: hidden;
}

.surface-head,
.tabs,
.verdict-sidebar,
.finding-row,
.price-row,
.faq-row,
.doc-row,
.change-row {
  border-bottom: 1px solid rgba(244, 239, 230, 0.16);
}

.surface-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
}

.surface-head h1 {
  margin: 8px 0 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 36px;
  letter-spacing: 0;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.tabs button {
  min-height: 44px;
  border: 0;
  border-right: 1px solid rgba(244, 239, 230, 0.16);
  background: transparent;
  color: rgba(244, 239, 230, 0.58);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tabs button.is-active {
  background: var(--paper);
  color: var(--ink);
}

.tab-panel {
  display: none;
  min-height: 540px;
  padding: 22px;
  overflow-x: auto;
}

.tab-panel.is-active {
  display: block;
}

.matrix-table {
  display: grid;
  grid-template-columns: 190px repeat(9, minmax(84px, 1fr));
  min-width: 1050px;
  border-top: 1px solid rgba(244, 239, 230, 0.16);
  border-left: 1px solid rgba(244, 239, 230, 0.16);
}

.matrix-table > * {
  min-height: 48px;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(244, 239, 230, 0.16);
  border-bottom: 1px solid rgba(244, 239, 230, 0.16);
  padding: 0 10px;
}

.cell {
  font-weight: 700;
}

.trace-drawer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}

pre {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: pre-wrap;
}

pre code,
.code-panel code {
  display: block;
  max-width: 100%;
  padding: 18px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid rgba(244, 239, 230, 0.16);
  overflow-x: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.finding-row,
.security-rule,
.price-row,
.faq-row,
.doc-row,
.change-row {
  display: grid;
  gap: clamp(18px, 4vw, 56px);
  padding: 26px 0;
}

.finding-row {
  grid-template-columns: 130px 110px 1fr;
}

.security-rule {
  grid-template-columns: 170px 220px minmax(0, 1fr);
  border-bottom: 1px solid var(--paper-dim);
}

.security-rule > *,
.doc-content,
.doc-row > *,
.trace-drawer > * {
  min-width: 0;
}

.security-rule .examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.index-table {
  overflow-x: auto;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.index-grid {
  min-width: 1120px;
  display: grid;
  grid-template-columns: 210px 140px repeat(5, 92px) 120px 110px;
}

.index-grid > * {
  min-height: 50px;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(244, 239, 230, 0.16);
  border-bottom: 1px solid rgba(244, 239, 230, 0.16);
  padding: 0 10px;
}

.price-grid {
  align-items: stretch;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.price-col {
  flex: 1 1 0;
  min-height: 430px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding: 24px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.price-col.team {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.team-note {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 12px;
}

.team-note.placeholder {
  visibility: hidden;
}

.price-col h2 {
  margin-top: 26px;
}

.price-col p {
  color: var(--ink-soft);
}

.feature-table {
  margin-top: 48px;
  border: 1px solid var(--ink);
}

.price-row,
.faq-row {
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1fr);
  border-bottom-color: var(--paper-dim);
}

.doc-layout {
  align-items: flex-start;
  gap: clamp(30px, 6vw, 80px);
}

.doc-rail {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.doc-rail a {
  border-left: 1px solid var(--paper-dim);
  padding: 10px 0 10px 14px;
  color: var(--ink-soft);
}

.doc-content {
  flex: 1;
}

.doc-row {
  grid-template-columns: 190px minmax(0, 1fr);
  border-bottom-color: var(--paper-dim);
}

.changelog-list {
  padding-top: clamp(32px, 5vw, 70px);
}

.change-row {
  grid-template-columns: 150px minmax(260px, 0.62fr) minmax(0, 1fr);
  border-bottom-color: var(--paper-dim);
}

.footer {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(260px, 0.7fr) minmax(250px, 0.7fr);
  gap: 28px;
  padding-top: 36px;
  padding-bottom: 36px;
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid rgba(244, 239, 230, 0.16);
}

.footer-brand {
  align-items: flex-start;
  gap: 18px;
  flex-direction: column;
}

.footer nav {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: rgba(244, 239, 230, 0.62);
}

.footer p {
  margin: 0;
  color: rgba(244, 239, 230, 0.62);
}

[data-reveal] {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  h1 {
    font-size: 64px;
  }

  .page-hero h1,
  .page-hero h1.mono {
    font-size: 52px;
  }

  h2 {
    font-size: 46px;
  }

  h3 {
    font-size: 26px;
  }

  .lead,
  .claim-grid p {
    font-size: 20px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .page-hero,
  .claim-grid,
  .trace-drawer,
  .security-rule,
  .doc-row,
  .change-row,
  .finding-row,
  .price-row,
  .faq-row,
  .footer {
    grid-template-columns: 1fr;
  }

  .price-grid,
  .doc-layout {
    flex-direction: column;
  }

  .doc-rail {
    position: static;
    display: flex;
    flex-wrap: wrap;
  }

  .doc-rail a {
    border: 1px solid var(--paper-dim);
    padding: 10px 12px;
  }
}

@media (max-width: 620px) {
  .topbar {
    grid-template-columns: auto auto;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .top-actions a:not(.ink-button) {
    display: none;
  }

  .brand img {
    width: 92px;
  }

  .top-actions .ink-button {
    min-height: 40px;
    padding: 0 12px;
    font-size: 14px;
  }

  h1 {
    font-size: 44px;
  }

  .page-hero {
    padding-top: 56px;
    padding-bottom: 44px;
  }

  .page-hero h1,
  .page-hero h1.mono {
    font-size: 34px;
    line-height: 1;
    overflow-wrap: anywhere;
  }

  h2 {
    font-size: 36px;
  }

  h3 {
    font-size: 23px;
  }

  .lead,
  .claim-grid p {
    font-size: 18px;
  }

  .verdict-stamp strong {
    font-size: 34px;
  }

  .hero {
    min-height: auto;
  }

  .run-form > div {
    grid-template-columns: 1fr;
  }

  .run-form button {
    border-left: 0;
    border-top: 1px solid var(--ink);
  }

  .console-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 0;
  }

  .status {
    justify-self: start;
  }

  .verdict-stamp {
    align-items: flex-start;
    flex-direction: column;
  }

  .rule-strip div,
  .security-rule .examples,
  .diff-line {
    grid-template-columns: 1fr;
  }

  .surface-head,
  .tabs {
    grid-template-columns: 1fr;
  }

  .tabs {
    display: grid;
  }

  .tabs button {
    border-right: 0;
    border-bottom: 1px solid rgba(244, 239, 230, 0.16);
  }
}

@media (max-width: 720px) {
  .report-surface .surface-head {
    flex-direction: column;
  }

  .report-surface .surface-head .verdict-stamp {
    width: 100%;
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    margin-top: 8px;
  }

  .report-surface .surface-head .verdict-stamp strong {
    font-size: 22px;
    line-height: 1;
    white-space: nowrap;
  }

  .report-surface .surface-head .verdict-stamp span {
    font-size: 12px;
  }

  .report-surface .surface-head .verdict-stamp svg {
    flex: 0 0 28px;
    width: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
