/* Atalaya — shared styles. Tokens and rationale: products/site/DESIGN.md */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-var-latin.woff2") format("woff2-variations"), url("/fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --chart: #e8eeeb;
  --chart-2: #dfe7e3;
  --paper: #f6f8f7;
  --ink: #172b45;
  --ink-2: #3c5068;
  --ink-3: #56677a;
  --shoal: #b9d3cc;
  --lamp: #f2b23e;
  --lamp-soft: #fbe7bd;
  --buoy: #c4412a;
  --buoy-soft: #f5d6cf;
  --depth: #2f5d7c;
  --rule: #c9d6d1;
  --focus: #172b45;
  --measure: 66ch;
  --wide: 1120px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--chart);
  color: var(--ink);
  font: 400 17px/1.6 "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
  font-feature-settings: "kern", "liga";
}
img, svg { display: block; max-width: 100%; }
a { color: var(--depth); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--lamp-soft); }

.wrap { width: min(100% - 32px, var(--wide)); margin-inline: auto; }
.prose { max-width: var(--measure); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--paper); padding: 8px 12px; }

/* type scale (major third, 17px base) */
h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
.display {
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2.3rem, 5.2vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
h2 { font-stretch: 118%; font-weight: 750; font-size: clamp(1.6rem, 3vw, 2.15rem); line-height: 1.12; letter-spacing: -0.01em; }
h3 { font-weight: 700; font-size: 1.15rem; line-height: 1.3; }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink-2); }
.quiet { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }

/* header */
.top { padding: 18px 0; }
.top .wrap { display: flex; align-items: center; gap: 24px; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-stretch: 125%; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.mark svg { width: 26px; height: 30px; }
.top nav { margin-left: auto; display: flex; gap: 22px; align-items: center; font-size: 0.95rem; }
.top nav a { color: var(--ink-2); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 6px; border: 2px solid var(--ink);
  background: var(--ink); color: var(--paper); font: inherit; font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s;
}
.btn:hover { background: var(--depth); border-color: var(--depth); color: #fff; }
.btn.lamp { background: var(--lamp); border-color: var(--lamp); color: var(--ink); }
.btn.lamp:hover { background: #e8a42a; border-color: #e8a42a; color: var(--ink); }
.btn.line { background: transparent; color: var(--ink); }
.btn.line:hover { background: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: .55; cursor: progress; }

/* light list (crawler table) */
.lights { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.lights caption { text-align: left; padding: 0 0 10px; color: var(--ink-2); }
.lights th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 0.85rem; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.lights td { padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.lights tr:last-child td { border-bottom: 0; }
.lights .who { color: var(--ink-2); }
.lights code { font: 500 0.88rem/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--ink-2); }
.lamp-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; vertical-align: -2px; border: 2px solid var(--ink-3); background: transparent; transition: background-color .35s, border-color .35s, box-shadow .35s; }
.st-allowed .lamp-dot { background: var(--lamp); border-color: #d9961f; box-shadow: 0 0 0 4px rgba(242, 178, 62, .28); }
.st-blocked .lamp-dot { background: var(--paper); border-color: var(--buoy); }
.st-partial .lamp-dot { background: linear-gradient(90deg, var(--lamp) 50%, var(--paper) 50%); border-color: #d9961f; }
.st-label { font-weight: 600; }
.st-blocked .st-label { color: var(--buoy); }
.cat { white-space: nowrap; }

/* sections */
section { padding: 72px 0; }
.contour { border-top: 1px solid var(--rule); }
footer.site { padding: 40px 0 56px; color: var(--ink-2); font-size: 0.93rem; border-top: 1px solid var(--rule); }
footer.site .wrap { display: grid; gap: 10px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 18px; }

/* report */
.report { padding-bottom: 40px; }
.report .small { font-size: 0.9rem; }
.sample-note { background: var(--paper); border-left: 4px solid var(--lamp); padding: 12px 16px; margin: 8px 0 28px; max-width: var(--measure); }
.r-head { padding: 24px 0 8px; }
.r-head .display { font-size: clamp(2rem, 5vw, 3.4rem); overflow-wrap: anywhere; }
.r-score { display: grid; grid-template-columns: auto auto 1fr; align-items: end; gap: 8px 32px; padding: 24px 0 8px; }
.r-num { margin: 0; color: var(--ink-2); }
.r-num .big { font-stretch: 125%; font-weight: 800; font-size: 4.2rem; line-height: 1; color: var(--ink); }
.r-grade { margin: 0 0 10px; color: var(--ink-2); }
.r-grade strong { font-stretch: 125%; font-size: 1.6rem; color: var(--ink); }
.ruler { width: 100%; max-width: 520px; height: auto; margin-bottom: 6px; }
.ruler .track { fill: var(--chart-2); }
.ruler .fill { fill: var(--ink); }
.ruler .tick { stroke: var(--ink-3); stroke-width: 1; }
.ruler text { fill: var(--ink-3); font-size: 9px; font-family: inherit; }
.ruler .marker { fill: var(--lamp); stroke: var(--ink); stroke-width: 1; }
.r-sec { padding: 36px 0 8px; border-top: 1px solid var(--rule); margin-top: 28px; }
.r-sec h2 { margin-bottom: 18px; }
.fixes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 78ch; counter-reset: fix; }
.fixes li { padding: 16px 0 14px 46px; border-bottom: 1px solid var(--rule); position: relative; counter-increment: fix; }
.fixes li::before { content: counter(fix); position: absolute; left: 0; top: 16px; font-stretch: 125%; font-weight: 800; font-size: 1.4rem; color: var(--ink-3); }
.fixes h3 { margin: 2px 0 6px; }
.fixes p { margin: 0 0 6px; }
.fix-meta { display: flex; gap: 14px; font-size: 0.88rem; color: var(--ink-3); }
.sev { font-weight: 700; color: var(--ink-2); }
.sev-critical .sev, .sev-high .sev { color: var(--buoy); }
.breakdown { border-collapse: collapse; width: 100%; max-width: 900px; }
.breakdown th { text-align: left; font-weight: 600; font-size: 0.85rem; color: var(--ink-3); padding: 6px 12px 6px 0; border-bottom: 1px solid var(--rule); }
.breakdown td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); }
.nowrap { white-space: nowrap; }
.bar-cell { width: 34%; }
.bar { display: block; height: 8px; background: var(--chart-2); position: relative; }
.bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--ink); }
.b-fail .bar::after { background: var(--buoy); width: 3px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 0; max-width: 80ch; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.page { padding: 8px 0 20px; }
.page h3 { margin-bottom: 10px; font-size: 1rem; overflow-wrap: anywhere; }
.r-foot { display: grid; gap: 14px; justify-items: start; }

@media (max-width: 720px) {
  .r-score { grid-template-columns: auto 1fr; }
  .r-score .ruler { grid-column: 1 / -1; }
  .fixes li { padding-left: 34px; }
  .top nav { gap: 14px; font-size: 0.9rem; }
  .top nav .hide-sm { display: none; }
  section { padding: 52px 0; }
  .lights .who, .lights th.who { display: none; }
  .lights { font-size: 0.88rem; }
  .lights th, .lights td { padding: 8px 5px; }
  .lights .cat { white-space: normal; }
  .lights strong { overflow-wrap: anywhere; }
  .lights code { display: block; overflow-wrap: anywhere; font-size: 0.8rem; }
}

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

@media print {
  body { background: #fff; font-size: 11pt; }
  .top nav, .no-print, footer.site nav { display: none !important; }
  section { padding: 18px 0; }
  a { color: inherit; text-decoration: none; }
}
.fixes h3, .fixes p { overflow-wrap: anywhere; }
