/* scan.html, review-results.html and attest.html. Quiet white pages: the beam
   appears once, on the prompt card, and colour otherwise only marks a state.
   Structure comes from hairlines and type, not cards. */

.sc { max-width: 760px; padding-top: 6vh; padding-bottom: 14vh; }
.sc-narrow { max-width: 620px; }
.sc > .beam { margin: 0 0 28px; }
.sc .line { max-width: 34em; }

/* .button sets display, which would otherwise win over the hidden attribute */
.sc [hidden] { display: none !important; }

.sc-mono { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0; overflow-wrap: anywhere; }
.sc-note { margin: 16px 0 0; max-width: 40em; }

.sc-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sc-header-link { font-size: 0.9375rem; font-weight: 500; color: var(--fg); text-decoration: none; }
.sc-header-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.sc-eyebrow { margin: 0 0 14px; font-size: 0.8125rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-eyebrow a { color: inherit; text-decoration: none; }
.sc-eyebrow a:hover { color: var(--fg); }

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* The prompt: the one call to action, so it carries the page's beam. */

.copybox {
  position: relative;
  margin: 28px 0 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.copybox-beam { position: absolute; inset: 0 0 auto 0; width: auto; }
.copybox-label { margin: 0 0 10px; font-weight: 600; font-size: 0.9375rem; }

.copybox-scroll { position: relative; margin: 0 0 16px; }

/* Fades the clipped bottom line to show the prompt scrolls; clears at the end. */
.copybox-scroll::after {
  content: "";
  position: absolute;
  left: 0;
  right: 12px;
  bottom: 0;
  height: 26px;
  border-bottom-left-radius: 8px;
  background: linear-gradient(to bottom, transparent, var(--bg) 75%);
  pointer-events: none;
  transition: opacity 160ms var(--ease-out);
}
.copybox-scroll[data-end]::after { opacity: 0; }

.copybox-line {
  margin: 0;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
  user-select: all;
  max-height: calc(3 * 1.6em + 28px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
}
.copybox-line:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

.copybox-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.copybox-actions .button { min-width: 148px; justify-content: center; }
.copybox-note { margin: 14px 0 0; max-width: 40em; }
.copybox-note summary {
  display: inline;
  cursor: pointer;
  list-style: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.copybox-note summary::-webkit-details-marker { display: none; }
.copybox-note summary:hover { color: var(--fg); }
.copybox-note summary:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 2px; }
.copybox-note p { margin: 8px 0 0; }
.copybox-note a { color: var(--fg); text-underline-offset: 3px; }

.copybox-status { display: inline-flex; align-items: center; gap: 6px; color: #16a34a; }
.copybox-status:empty { display: none; }
.copybox-status::before {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  clip-path: polygon(39% 62%, 15% 44%, 6% 54%, 40% 82%, 94% 30%, 84% 20%);
}

/* Live figures: three numbers big enough to read at a glance. */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 20px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.stats > div { padding: 16px 20px; min-width: 0; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats dt { font-size: 0.8125rem; color: var(--muted); }
.stats dd {
  margin: 4px 0 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.stats-of, .stats-unit { font-size: 0.875rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.sc-stats-note { margin: 12px 0 0; }
.sc-stats-note:empty { display: none; }
.sc-load { margin-top: 32px; }

/* Hero: a plain title, the two paths as an index, then the record. */

/* The hero owns the first screen, centred on tall ones, and the sections start below
   the fold. 64px is the sticky header. */
.sc-hero { display: flex; flex-direction: column; justify-content: center; min-height: calc(100svh - 64px - 6vh); padding-bottom: 6vh; }
.sc-hero + .sc-section { margin-top: 0; }

.sc-title { font-size: clamp(2.25rem, 4.6vw, 3.25rem); }

.sc-paths-label { margin: 40px 0 14px; font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; }
/* Numbered steps joined by a line: reporting follows a review, it isn't a rival option. */
.sc-paths { list-style: none; margin: 0; padding: 0; counter-reset: path; }
.sc-paths li { position: relative; counter-increment: path; padding-left: 44px; }
.sc-paths li::before {
  content: counter(path);
  position: absolute;
  top: 12px;
  left: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--fg);
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--bg);
}
.sc-paths li:not(:last-child)::after { content: ""; position: absolute; top: 42px; bottom: -12px; left: 13px; width: 1px; background: var(--line); }
.sc-paths a { display: grid; gap: 4px; padding: 14px 32px 18px 0; position: relative; color: var(--fg); text-decoration: none; }
.sc-paths a::after { content: "↓"; position: absolute; top: 14px; right: 0; color: var(--muted); transition: transform .2s var(--ease-out), color .2s ease; }
.sc-paths a:hover::after, .sc-paths a:focus-visible::after { color: var(--fg); transform: translateY(2px); }
.sc-paths a:hover .sc-path-title { text-decoration: underline; text-underline-offset: 3px; }
.sc-path-title { font-weight: 600; }
.sc-path-text { font-size: 0.9375rem; color: var(--muted); }
.sc-path-reward {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-self: start;
  margin-top: 2px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg);
}
.sc-path-reward::before {
  content: "";
  flex: none;
  width: 13px;
  height: 15px;
  background: url("favicon.svg") center / contain no-repeat;
}

/* The record: what anyone can check on the results page. Hairlines, modest figures. */

.record { margin: 40px 0 0; }
.record-figures { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.record-figures > div { padding: 14px 16px 14px 0; min-width: 0; }
.record-figures > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.record-figures dt { font-size: 0.8125rem; color: var(--muted); }
.record-figures dd { margin: 2px 0 0; font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.record-link { margin: 10px 0 0; font-size: 0.875rem; }
.record-link a { color: var(--fg); text-underline-offset: 3px; }

/* Inline figures beside the rules they belong to. */

/* The beam marks these as live numbers; it stays a 3px line, never a fill on the digits. */
.figures {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 48px;
  margin: 0 0 20px;
  padding: 2px 0 2px 18px;
  overflow: hidden;
}
.figures::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg,
    var(--beam-red) 0 20%, var(--beam-purple) 20% 40%, var(--beam-sky) 40% 60%,
    var(--beam-yellow) 60% 80%, var(--beam-green) 80% 100%);
}
.figures dt { font-size: 0.8125rem; color: var(--muted); }
.figures dd {
  margin: 2px 0 0;
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.figures-unit { font-size: 0.9375rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }

/* One beam glint across the figures as they arrive. */
.figures.sweep::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%,
    rgba(255,23,23,.14) 42%, rgba(139,18,255,.14) 45%, rgba(115,201,232,.14) 48%,
    rgba(255,228,92,.18) 51%, rgba(40,240,45,.14) 54%, transparent 58%);
  background-size: 300% 100%;
  background-position: 100% 0;
  animation: figures-glint 1.1s ease-in-out forwards;
}
@keyframes figures-glint { to { background-position: 0 0; opacity: 0; } }
.sc-intro + .figures { margin-top: 24px; }
.sc-hero-figures { margin: 28px 0 0; }
.figures-pending { font-size: 0.9375rem !important; font-weight: 500 !important; }
.figures-pending .figures-unit { display: none; }

.sc-report-action { margin: 0 0 16px; }
.sc-report-action .button { min-height: 44px; font-size: 0.9375rem; }

/* The disclaimer: set apart, quieter than a section. */

.sc-disclaimer { margin-top: clamp(48px, 8vh, 80px); padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.sc-disclaimer h2 { margin: 0 0 8px; font-size: 0.9375rem; line-height: 1.4; font-weight: 600; }
.sc-disclaimer p { margin: 0 0 8px; max-width: 42em; font-size: 0.9375rem; color: var(--muted); }
.sc-disclaimer p:last-child { margin-bottom: 0; }

/* Sections */

.sc-section { margin-top: clamp(48px, 8vh, 80px); padding-top: 28px; border-top: 1px solid var(--line); }
.sc-section-flush { padding-top: 0; border-top: 0; }
.sc-section h2, .sc-cta h2 { margin: 0 0 20px; font-size: clamp(1.625rem, 2.4vw, 2rem); line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; }
.sc-num { color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-section > .small { margin: 16px 0 0; max-width: 42em; }
.sc-section { scroll-margin-top: 80px; }
.sc-section h3 { margin: 40px 0 14px; font-size: 1.0625rem; line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; }
.sc-intro { margin: 0 0 10px; max-width: 38em; }
.sc-body { margin: 0 0 16px; max-width: 42em; color: var(--muted); }
.sc-body a { color: var(--fg); }

.sc-prose { margin: 0 0 16px; padding-left: 1.25em; max-width: 42em; color: var(--muted); }
.sc-prose li { margin: 0 0 10px; }
.sc-prose li::marker { color: var(--muted); }
.sc-prose strong { color: var(--fg); font-weight: 600; }
.sc-prose a, .sc .small a, .sc-section p a { text-underline-offset: 3px; color: var(--fg); }
.sc .links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 48px; }

/* How it works */

.sc-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.sc-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.sc-steps li:last-child { border-bottom: 1px solid var(--line); }
.sc-steps li::before { content: counter(step); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.sc-steps p { margin: 0; }

.tiers { width: 100%; max-width: 420px; margin: 8px 0 10px; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.tiers th, .tiers td { padding: 6px 12px 6px 0; border-top: 1px solid var(--line); text-align: left; white-space: nowrap; }
.tiers tr:last-child > * { border-bottom: 1px solid var(--line); }
.tiers tr > :last-child { padding-right: 0; }
.tiers thead th { font-size: 0.8125rem; font-weight: 500; color: var(--muted); border-top: 0; }
.tiers tbody th { font-weight: 500; }
.tiers .num { text-align: right; }
.tiers-amount { color: var(--muted); }

/* Questions */

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { padding: 16px 0; font-weight: 600; cursor: pointer; }
.faq details p { margin: 0 0 18px; max-width: 42em; color: var(--muted); }
.sc-faq { margin-top: 32px; }
.sc-faq-flush details:first-child { border-top: 0; }
.sc-faq details > :last-child { margin-bottom: 18px; }
.sc-faq details p:not(.small) { color: inherit; }
.sc-faq .sc-steps { margin: 0 0 8px; }
.sc-faq .sc-steps li:last-child { border-bottom: 0; }
.sc-faq .sc-steps p { margin: 0; }

/* Results: coverage bar is a hairline track with an ink fill; its width is the share examined. */

.bar { height: 8px; margin: 12px 0 0; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--fg); border-radius: 4px; }
.sc-models { margin: 16px 0 0; }
.sc-models [data-models-text] { margin: 0 0 10px; }
.sc-models [data-models-note] { margin: 10px 0 0; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.chip { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 0.875rem; font-weight: 500; }

.sc-more { margin: 14px 0 0; }
.sc-more summary { cursor: pointer; font-size: 0.9375rem; font-weight: 500; }
.sc-list { margin: 10px 0 0; padding-left: 1.25em; max-height: 280px; overflow: auto; }
.sc-list li { margin: 0 0 4px; }

.sc-empty { padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; }
.sc-empty p { margin: 0; }

.sc-cta { margin-top: clamp(48px, 8vh, 80px); padding: 28px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.sc-cta h2 { margin-bottom: 8px; }
.sc-cta p { margin: 0 0 20px; max-width: 34em; color: var(--muted); }

/* Attestations. Colour marks only "pass" as the quiet, expected outcome; "scanned" is neutral. */

.atts { list-style: none; margin: 0 0 16px; padding: 0; }
.att { border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.att:last-child { border-bottom: 1px solid var(--line); }
.att-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 0; cursor: pointer; }
.att-model { font-weight: 600; overflow-wrap: anywhere; }
.att-tag { padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 0.75rem; line-height: 1.5; }
.att-tag[data-result="scanned"] { border-color: var(--muted); color: var(--muted); }
.att-tag[data-result="pass"] { border-color: #bfe8c6; color: #15803d; }
.att-meta { color: var(--muted); font-size: 0.875rem; }
.att-body { padding: 0 0 18px; }
.att-body > .small { margin: 14px 0 6px; font-weight: 600; }
.att-foot { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; }
.att-id { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-link {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--muted);
  transition: color .2s ease;
}
.att-link:hover, .att-link:focus-visible { color: var(--fg); }
.att-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.att-target { background: #fff; box-shadow: -3px 0 0 var(--beam-sky); padding: 0 12px; }

.report {
  margin: 0;
  padding: 12px 14px;
  max-height: 360px;
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.answers { margin: 0; padding-left: 1.25em; }
.answers li { margin: 0 0 12px; }
.answers .answer-check { display: block; margin-top: 2px; }

.button-quiet { background: #fff; color: var(--fg); border: 1px solid var(--line); }
.button-quiet:hover { background: #fff; border-color: var(--fg); }
.button:disabled { opacity: .55; cursor: default; transform: none; }

/* attest.html */

.facts { margin: 28px 0 24px; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 0.875rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.sign { margin: 32px 0 0; }
.sign .button { min-width: 200px; justify-content: center; }
.sign .small { margin: 14px 0 0; max-width: 34em; }
.sign .sign-step { margin: 0 0 16px; }

/* The outcome. Colour marks the state: sky for done, red for needs attention. */

.result {
  margin: 28px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--beam-red);
  border-radius: var(--radius);
  background: #fff;
}
.result[data-tone="good"] { border-left-color: var(--beam-green); }
.result:focus { outline: none; }
.result:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.result-message { margin: 0; font-size: 1.0625rem; line-height: 1.5; overflow-wrap: anywhere; }
.result-action { margin: 16px 0 0; }
.result-action:has(a[hidden]) { margin: 0; }
.result .small { margin: 12px 0 0; }

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
  .record-figures { grid-template-columns: 1fr 1fr; }
  .record-figures > div + div { padding-left: 0; border-left: 0; }
  .record-figures > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
  .record-figures > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .stats > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .sc-steps li { grid-template-columns: 28px 1fr; }
}

@media (max-width: 520px) {
  .copybox { padding: 20px 16px 16px; }
  .sc-disclaimer { padding: 16px; }
  .copybox-actions .button { width: 100%; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .sign .button, .result .button { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
  .figures.sweep::after { display: none; }
}
