/* Shared by every page of licenscheck.com. */
:root {
  color-scheme: light;
  --font-display: "Geist", "Helvetica Neue", Helvetica, sans-serif;
  --font-body: "Geist", "Helvetica Neue", Helvetica, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Clean white paper, navy-black ink and a hi-vis safety orange: a job site, not cream and terracotta. */
  --paper: #f7f8fa;
  --paper-deep: #eef0f3;
  --sheet: #ffffff;
  --ink: #111827;
  --ink-2: #374151;
  --ink-3: #5f6776;
  --ink-4: #6b7280;
  --rule: #e5e7eb;
  --rule-strong: #d1d5db;
  --brand: #ff5a1f;
  --brand-wash: #fff0e8;

  --ok: #1f6f43;
  --ok-wash: #e4efe6;
  --warn: #9a5b00;
  --warn-wash: #f6ecd8;
  --bad: #b42318;
  --bad-wash: #f7e2df;
  --delisted: #a8430a;
  --delisted-wash: #f8e7da;
  --neutral: #5f6776;
  --neutral-wash: #eef0f3;

  --radius: 6px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: clamp(1rem, 4vw, 3rem);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 90, 31, 0.09), transparent 60%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: -0.01em; }
.muted { color: var(--ink-3); }
.error { color: var(--bad); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.035em;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.wordmark em { color: var(--brand); font-style: normal; }
.page { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter) 6rem; }

/* ---------- browse hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2rem 4rem;
  align-items: end;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 2.25rem;
  border-bottom: 1px solid var(--ink);
}
.eyebrow {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  margin: 0 0 1.1rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 0;
}
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-aside { font-size: 1rem; color: var(--ink-2); max-width: 30rem; }
.hero-aside p { margin: 0 0 1.25rem; }

.stat-row { display: flex; gap: 2.25rem; flex-wrap: wrap; }
.stat .num { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; font-size: 2.1rem; line-height: 1; }
.stat .lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-top: 0.35rem; }

/* ---------- search ---------- */
.search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin: 2rem 0 0.75rem;
  background: var(--sheet);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.search:focus-within { box-shadow: 3px 3px 0 var(--ink); transform: translate(3px, 3px); }
.search input, .search select {
  font: inherit;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
}
.search input {
  font-size: 1.15rem;
  padding: 1.05rem 1.25rem;
  min-width: 0;
}
.search input::placeholder { color: var(--ink-4); }
.search select {
  appearance: none;
  border-left: 1px solid var(--rule-strong);
  padding: 0 2.4rem 0 1.1rem;
  font-size: 0.92rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23111827' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.search button {
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0 1.75rem;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.search button:hover { background: #000; }
.search-error { margin: 0.9rem 0 0.4rem; font-size: 0.85rem; font-weight: 600; color: var(--bad); }
.search-hint { font-size: 0.8rem; color: var(--ink-3); display: flex; gap: 1.25rem; flex-wrap: wrap; }
kbd {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  border: 1px solid var(--rule-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 0 0.3rem;
  background: var(--sheet);
}

/* ---------- results ledger ---------- */
.results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 3rem 0 0.75rem;
}
.results-head h2 {
  font-family: var(--font-display);
  font-weight: 600; letter-spacing: -0.03em;
  font-size: 1.9rem;
  margin: 0;
}
#meta { font-size: 0.82rem; color: var(--ink-3); }

.ledger {
  width: 100%;
  border-collapse: collapse;
  background: var(--sheet);
  border: 1px solid var(--rule-strong);
}
.ledger th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--ink);
  background: var(--paper-deep);
  white-space: nowrap;
}
.ledger td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
  font-size: 0.9rem;
}
.ledger tbody tr { cursor: pointer; transition: background 0.15s var(--ease); }
.ledger tbody tr:hover { background: #fff5ef; }
.ledger tbody tr:hover .row-name { text-decoration: underline; text-underline-offset: 3px; }
.row-name { font-weight: 600; }
.row-link { color: inherit; text-decoration: none; }
.row-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@supports selector(:has(a)) {
  .ledger tbody tr:has(.row-link:focus-visible) { outline: 2px solid var(--ink); outline-offset: -2px; }
  .row-link:focus-visible { outline: none; }
}
.row-sub { font-size: 0.8rem; color: var(--ink-3); margin-top: 0.1rem; max-width: min(34rem, 38vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--ink);
  padding: 0.05rem 0.35rem;
  border-radius: 2px;
}
.trade { text-transform: capitalize; color: var(--ink-2); }
.ledger .col-num { white-space: nowrap; }
.ledger .col-date { white-space: nowrap; color: var(--ink-2); }

.row-in { animation: row-in 0.45s var(--ease) both; }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.skeleton-bar {
  height: 0.8rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--paper-deep) 25%, var(--rule) 50%, var(--paper-deep) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

#empty {
  padding: 3.5rem 1rem;
  text-align: center;
  border: 1px dashed var(--rule-strong);
  color: var(--ink-3);
  background: var(--sheet);
}
#empty strong { display: block; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; font-size: 1.6rem; color: var(--ink); margin-bottom: 0.25rem; }

#pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; }
.pager-btn {
  background: var(--sheet);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.pager-btn:hover:not(:disabled) { background: var(--paper-deep); }
.pager-btn:disabled { opacity: 0.3; cursor: default; }
#page-label { font-size: 0.82rem; color: var(--ink-3); }

/* ---------- status stamp ---------- */
.stamp {
  --c: var(--neutral);
  --w: var(--neutral-wash);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c);
  background: var(--w);
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: 0.2rem 0.5rem;
  white-space: nowrap;
}
.stamp::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.stamp-lg { font-size: 0.82rem; padding: 0.4rem 0.75rem; border-width: 2px; }

/* ---------- detail: dossier ---------- */
#detail-view { animation: page-in 0.4s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 1.75rem 0 0;
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--ink-3);
  cursor: pointer;
}
.crumb:hover { color: var(--ink); }

.dossier-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: end;
  padding: 1.5rem 0 1.75rem;
  border-bottom: 1px solid var(--ink);
}
.dossier-head h1 {
  font-family: var(--font-display);
  font-weight: 600; letter-spacing: -0.03em;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0.4rem 0 0.9rem;
  overflow-wrap: anywhere;
}
.id-line { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-size: 0.88rem; color: var(--ink-2); }
.id-line span b { font-weight: 500; color: var(--ink-3); margin-right: 0.35rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.head-status { text-align: right; }
.head-status .as-of { font-size: 0.76rem; color: var(--ink-3); margin-top: 0.5rem; }

/* verdict band */
.verdict {
  --c: var(--ok);
  --w: var(--ok-wash);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  margin: 1.75rem 0 0;
  padding: 1.25rem 1.5rem;
  background: var(--w);
  border-left: 6px solid var(--c);
}
.verdict-risk { --c: var(--bad); --w: var(--bad-wash); }
.verdict-review { --c: var(--warn); --w: var(--warn-wash); }
.verdict-locked { --c: var(--ink-3); --w: var(--paper-deep); }

/* key-only sections: counts in the clear, a blurred stand-in for the rest */
.locked { position: relative; }
.locked-blur { filter: blur(5px); user-select: none; pointer-events: none; }
.lock-bar { height: 0.7rem; background: var(--rule-strong); border-radius: 2px; }
.lock-bar-sub { width: 40%; height: 0.5rem; margin-top: 0.35rem; background: var(--rule); }
.locked-card {
  position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  width: min(26rem, calc(100% - 2rem));
  background: var(--sheet); border: 1px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  padding: 1rem 1.2rem; text-align: center; font-size: 0.9rem;
}
.locked-card p { margin: 0 0 0.75rem; color: var(--ink-2); }
.lock-cta {
  display: inline-block; padding: 0.45rem 0.9rem; background: var(--ink); color: var(--paper);
  font-size: 0.85rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.lock-cta:hover { background: var(--ink-2); }
.lock-cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.verdict-text .fine .lock-cta { margin-left: 0.5rem; }
.verdict-word {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em;
  font-size: 2.3rem;
  line-height: 1;
  color: var(--c);
  white-space: nowrap;
}
.verdict-text { font-size: 1.02rem; color: var(--ink); max-width: 60rem; }
.verdict-text .fine { display: block; font-size: 0.8rem; color: var(--ink-3); margin-top: 0.3rem; }

.dossier-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.45rem;
  margin: 0 0 0.25rem;
}
.section-title h2 {
  font-family: var(--font-display);
  font-weight: 600; letter-spacing: -0.03em;
  font-size: 1.55rem;
  margin: 0;
}
.section-title .count { font-size: 0.78rem; color: var(--ink-3); }
section.block { margin-bottom: 2.75rem; }

/* checks */
.checks { list-style: none; margin: 0; padding: 0; }
.check {
  display: grid;
  grid-template-columns: 1.6rem 11rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rule);
}
.check-mark {
  width: 1.3rem; height: 1.3rem;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  font-size: 0.72rem; font-weight: 700;
  color: var(--sheet);
  background: var(--neutral);
  transform: translateY(0.2rem);
}
.check-pass .check-mark { background: var(--ok); }
.check-warn .check-mark { background: var(--warn); }
.check-fail .check-mark { background: var(--bad); }
.check-label { font-weight: 600; font-size: 0.9rem; }
.check-result { font-size: 0.9rem; color: var(--ink-2); }
.check-result strong { color: var(--ink); font-weight: 600; }

/* record ledger (definition list) */
.record { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; margin: 0; }
.record div { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.record dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-bottom: 0.2rem; }
.record dd { margin: 0; font-size: 0.95rem; overflow-wrap: anywhere; }
.record .wide { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  border-radius: 2px;
  padding: 0.1rem 0.4rem;
}

/* entity panel */
.entity-summary { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.85rem; color: var(--ink-2); margin: 0.75rem 0 1rem; }
.entity-summary strong { color: var(--ink); }
.constellation {
  background: var(--sheet);
  border: 1px solid var(--rule-strong);
  margin-bottom: 1rem;
  position: relative;
}
.constellation svg { display: block; width: 100%; height: auto; }
.constellation .node { cursor: pointer; outline: none; }
.constellation .node:hover circle.body { stroke-width: 3; }
.constellation .focus-ring { fill: none; stroke: var(--ink); stroke-width: 2; opacity: 0; }
.constellation .node:focus-visible .focus-ring { opacity: 1; }
.state-summary { display: none; list-style: none; margin: 0; padding: 0.4rem 0.9rem; }
.state-summary li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.6rem;
  padding: 0.55rem 0; border-bottom: 1px solid var(--rule); font-size: 0.85rem;
}
.state-summary li:last-child { border-bottom: 0; }
.state-summary .ss-name { font-weight: 600; }
.state-summary .ss-count { color: var(--ink-3); }
.state-summary .ss-worst { margin-left: auto; font-weight: 600; }
.constellation .legend {
  position: absolute; left: 0.9rem; bottom: 0.7rem;
  display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.7rem; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.3rem; vertical-align: 0; }
.legend i.legend-glyph {
  width: 12px; height: 12px; vertical-align: -2px;
  color: var(--sheet); font-style: normal; font-weight: 700; font-size: 9px; line-height: 12px; text-align: center;
}
.table-wrap { overflow-x: auto; border: 1px solid var(--rule-strong); }
.table-wrap .ledger { border: 0; }
.table-wrap .row-sub { white-space: normal; max-width: none; }
.band { font-size: 0.8rem; }
.band-label { display: block; white-space: nowrap; }
.band .evidence { display: block; margin-top: 0.2rem; font-size: 0.72rem; color: var(--ink-3); }
.possible-note { margin: 0.75rem 0 1rem; font-size: 0.85rem; color: var(--ink-2); max-width: 46rem; }
.band-bar { display: inline-block; width: 44px; height: 4px; background: var(--rule); vertical-align: middle; margin-right: 0.45rem; position: relative; }
.band-bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); }

/* side rail */
.rail { display: flex; flex-direction: column; gap: 1.25rem; }
.card {
  background: var(--sheet);
  border: 1px solid var(--rule-strong);
  padding: 1.1rem 1.2rem;
}
.card h3 {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-3); margin: 0 0 0.75rem;
}
.prov-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.85rem; padding: 0.4rem 0; border-bottom: 1px dotted var(--rule-strong); }
.prov-row:last-child { border-bottom: 0; }
.prov-row span:first-child { color: var(--ink-3); }
.prov-row span:last-child { text-align: right; overflow-wrap: anywhere; }
.card-alert { border-color: var(--delisted); background: var(--delisted-wash); }
.card-alert h3 { color: var(--delisted); }
.card-alert p { margin: 0; font-size: 0.88rem; }
.copy-btn {
  width: 100%;
  margin-top: 0.25rem;
  background: var(--ink); color: var(--paper);
  border: 0; border-radius: var(--radius);
  padding: 0.65rem; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.copy-btn:hover { background: #000; }

/* CE */
.ce-toggle {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.ce-table td { font-size: 0.85rem; padding: 0.55rem 1rem; }
.ce-table tbody tr { cursor: default; }
.ce-table tbody tr:hover { background: transparent; }
.row-delisted td { color: var(--ink-4); }

.skel-block { display: grid; gap: 0.7rem; padding: 2rem 0; }

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .dossier-grid { grid-template-columns: minmax(0, 1fr); }
}
.results-scroll { overflow-x: auto; }
@media (max-width: 900px) {
  .ledger .col-hide-md { display: none; }
  #results-table .row-sub { max-width: 28vw; }
}
@media (max-width: 680px) {
  .search { grid-template-columns: 1fr; box-shadow: 4px 4px 0 var(--ink); }
  .search select { border-left: 0; border-top: 1px solid var(--rule-strong); padding: 0.85rem 1.25rem; }
  .search button { padding: 0.9rem; }
  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; width: 100%; }
  .ledger tr { padding: 0.8rem 1rem; border-bottom: 1px solid var(--rule); }
  .ledger td { border: 0; padding: 0.1rem 0; }
  .ledger td.col-hide-sm { display: none; }
  .ledger td[data-label]::before {
    content: attr(data-label); font-family: var(--font-body);
    display: inline-block; min-width: 5.5rem;
    font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3);
  }
  .dossier-head { grid-template-columns: minmax(0, 1fr); }
  .constellation .legend { position: static; flex-wrap: wrap; padding: 0 0.9rem 0.7rem; }
  .head-status { text-align: left; }
  .verdict { grid-template-columns: minmax(0, 1fr); }
  .check { grid-template-columns: 1.6rem minmax(0, 1fr); }
  .check-result { grid-column: 2; }
  .record { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 500px) {
  .constellation svg, .constellation .legend { display: none; }
  .state-summary { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- site chrome (every page) ---------- */
.site-nav { display: flex; gap: 1.4rem; font-size: 0.9rem; }
.site-nav a { color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.site-footer {
  max-width: 1240px; margin: 0 auto; padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--rule); font-size: 0.82rem; color: var(--ink-3);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-bottom: 0.9rem; }
.site-footer a { color: var(--ink-2); }
.site-footer p { margin: 0; max-width: 52rem; }

/* ---------- content pages (pricing, docs, legal) ---------- */
.prose { max-width: 46rem; padding: 2.5rem 0 1rem; }
.prose h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.1rem, 4.6vw, 3.2rem); line-height: 1.05; letter-spacing: -0.035em; margin: 0.3rem 0 0.75rem; }
.prose h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; font-size: 1.6rem; margin: 2.2rem 0 0.5rem; }
.prose h3 { font-size: 1rem; margin: 1.5rem 0 0.35rem; }
.prose p, .prose li { font-size: 1rem; line-height: 1.6; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose .updated { font-size: 0.82rem; color: var(--ink-3); }
.prose code { font-family: var(--font-mono); font-size: 0.88em; background: var(--paper-deep); padding: 0.1rem 0.3rem; }
.prose pre {
  font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.5;
  background: var(--sheet); border: 1px solid var(--rule-strong); padding: 0.9rem 1rem; overflow-x: auto;
}
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 0.75rem 0; }
.prose th, .prose td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.table-scroll { overflow-x: auto; }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0 1rem; }
.plan { background: var(--sheet); border: 1px solid var(--rule-strong); padding: 1.2rem 1.2rem 1.4rem; display: flex; flex-direction: column; }
.plan h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; font-size: 1.7rem; margin: 0 0 0.2rem; }
.plan .for { font-size: 0.82rem; color: var(--ink-3); margin: 0 0 0.9rem; }
.plan ul { padding-left: 1.1rem; margin: 0 0 1.2rem; flex: 1; }
.plan li { font-size: 0.9rem; line-height: 1.5; color: var(--ink-2); margin-bottom: 0.3rem; }
.plan .price { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; font-size: 1.35rem; margin: 0 0 0.9rem; }
.plan .soon { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--warn); font-weight: 700; }
@media (max-width: 860px) { .plans { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .site-nav { gap: 1rem; font-size: 0.85rem; flex-wrap: wrap; align-items: center; }
  .topbar { flex-wrap: wrap; row-gap: 0.6rem; }
  .key-chip { margin-left: 0; }
  .key-chip .key-hint { display: none; }
}

/* ---------- API docs: sticky sidebar on desktop, a slide-in menu on phones ---------- */
.docs-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.docs-nav {
  position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow-y: auto;
  padding: 2.5rem 0 2rem; font-size: 0.9rem;
}
.docs-nav-group {
  margin: 1.4rem 0 0.4rem; font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--ink-3);
}
.docs-nav-group:first-child { margin-top: 0; }
.docs-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.32rem 0.6rem; margin-left: -0.6rem; border-left: 2px solid transparent;
  color: var(--ink-2); text-decoration: none;
}
.docs-nav a:hover { color: var(--ink); background: var(--paper-deep); }
.docs-nav a.active { color: var(--ink); font-weight: 600; border-left-color: var(--brand); background: var(--paper-deep); }
.nav-key {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--warn); border: 1px solid currentColor; padding: 0 0.3rem; border-radius: 2px;
}
.docs-content { max-width: 48rem; padding-top: 2.5rem; }
.doc-section { scroll-margin-top: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule); margin-bottom: 1.5rem; }
.doc-section:last-child { border-bottom: 0; }
.doc-section > h2:first-child { margin-top: 0; }
.endpoint-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 0.9rem; }
.endpoint-line code { font-size: 0.92rem; }
.method {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em;
  background: var(--ink); color: var(--paper); padding: 0.18rem 0.45rem;
}
.badge { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; padding: 0.15rem 0.45rem; border: 1px solid currentColor; }
.badge-free { color: var(--ok); }
.badge-key { color: var(--warn); }
.params td:first-child { white-space: nowrap; }
.prose pre.code { position: relative; padding-right: 4.5rem; }
.copy-code {
  position: absolute; top: 0.5rem; right: 0.5rem; font: inherit; font-family: var(--font-body); font-size: 0.72rem;
  background: var(--paper); color: var(--ink-2); border: 1px solid var(--rule-strong); padding: 0.2rem 0.5rem; cursor: pointer;
}
.copy-code:hover { color: var(--ink); border-color: var(--ink); }
.docs-menu-btn, .docs-nav-close { display: none; }
.docs-backdrop { display: none; }

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .docs-menu-btn {
    display: inline-flex; align-items: center; gap: 0.4rem; position: sticky; top: 0.75rem; z-index: 30;
    margin: 1.25rem 0 0; font: inherit; font-size: 0.85rem; font-weight: 600;
    background: var(--sheet); color: var(--ink); border: 1px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
    padding: 0.45rem 0.8rem; cursor: pointer;
  }
  .docs-menu-btn::before { content: "☰"; }
  .docs-nav {
    position: fixed; top: 0; left: 0; z-index: 60; height: 100vh; max-height: none; width: min(18rem, 85vw);
    padding: 1.5rem 1.25rem 2rem 1.85rem; background: var(--sheet); border-right: 1px solid var(--ink);
    transform: translateX(-100%); transition: transform 0.2s ease; visibility: hidden;
  }
  .docs-nav.open { transform: translateX(0); visibility: visible; }
  .docs-nav-close {
    display: block; margin: 0 0 1.25rem auto; font: inherit; font-size: 0.8rem; font-weight: 600;
    background: none; color: var(--ink-2); border: 1px solid var(--rule-strong); padding: 0.3rem 0.65rem; cursor: pointer;
  }
  .docs-nav-close::before { content: "✕  "; }
  .docs-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(17, 24, 39, 0.35); }
  .docs-content { padding-top: 1.25rem; }
  body.docs-menu-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .docs-nav { transition: none; } }
.prose p.lede { font-size: 1.1rem; color: var(--ink); border-left: 3px solid var(--brand); padding-left: 0.9rem; }

/* ---------- the "Get an API key" form ---------- */
.key-form { margin-top: 1.5rem; display: grid; gap: 1.1rem; max-width: 34rem; }
.key-form .field { display: grid; gap: 0.35rem; }
.key-form .field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.key-form label { font-size: 0.8rem; font-weight: 600; color: var(--ink); }
.key-form .optional { font-weight: 400; color: var(--ink-3); }
.key-form input, .key-form select, .key-form textarea {
  font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--sheet);
  border: 1px solid var(--rule-strong); padding: 0.6rem 0.7rem; width: 100%;
}
.key-form textarea { resize: vertical; }
.key-form input:focus, .key-form select:focus, .key-form textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.key-form button { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 600; padding: 0.6rem 1.1rem; }
.key-form button:disabled { opacity: 0.6; cursor: progress; }
.field-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--bad); font-size: 0.9rem; margin: 0; }
.form-done { margin-top: 1.5rem; background: var(--sheet); border: 1px solid var(--rule-strong); padding: 1.2rem 1.4rem; max-width: 34rem; }
.form-done h2 { margin-top: 0; }
@media (max-width: 560px) { .key-form .field-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- welcome: the new key, shown once ---------- */
.key-box { display: flex; align-items: center; gap: 0.75rem; margin: 1rem 0 1.5rem; padding: 0.9rem 1rem; background: var(--sheet); border: 1px solid var(--rule-strong); border-left: 3px solid var(--brand); border-radius: var(--radius); }
.key-box code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 0.95rem; background: none; padding: 0; }
.key-box .key-copy { flex: none; width: auto; margin: 0; padding: 0.5rem 0.9rem; }

/* ---------- a saved API key: the header chip and "use a key" controls ---------- */
.use-key-link { margin-left: 0.75rem; background: none; border: 0; padding: 0; font-size: 0.85rem; color: var(--ink-2); text-decoration: underline; cursor: pointer; }
.use-key-link:hover { color: var(--ink); }
.use-key-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.6rem; }
.use-key-form input { flex: 1 1 14rem; min-width: 0; font: inherit; font-family: var(--font-mono); font-size: 0.85rem; padding: 0.5rem 0.65rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--sheet); color: var(--ink); }
.use-key-form .form-error { flex-basis: 100%; margin: 0; }
.key-chip { display: inline-flex; align-items: center; gap: 0.4rem; margin-left: 1rem; font-size: 0.82rem; color: var(--ink-2); }
.key-chip .key-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ok); }
.key-chip button { background: none; border: 0; padding: 0; font-size: 0.82rem; color: var(--ink-3); text-decoration: underline; cursor: pointer; }
.key-chip button:hover { color: var(--ink); }

/* ---------- coverage ---------- */
.stat .num a { color: inherit; text-decoration: none; border-bottom: 2px solid var(--brand); }
.stat .num a:hover { color: var(--brand); }
.coverage-table td.num, .coverage-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.coverage-table .row-sub { max-width: none; white-space: normal; }
