/* Legit or Not. Tokens from the LegitCheck design system, exactly as specified. */
:root {
  --ground:#F5F7F6; --surface:#FFFFFF; --line:#D9E0DC;
  --ink:#121A17; --ink-muted:#55635D;
  --brand:#2347D6; --brand-ink:#FFFFFF; --highlight:#FFE95C;
  --safe:#1B7349; --safe-soft:#E3F3EA;
  --careful:#8F5400; --careful-soft:#FBF0DC;
  --risk:#B42F24; --risk-soft:#FBE6E3;
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-6:24px; --space-8:32px;
  --radius-sm:6px; --radius-md:12px; --radius-pill:999px;
  --font-display:"Bricolage Grotesque","Instrument Sans",system-ui,sans-serif;
  --font-sans:"Instrument Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-mono:"IBM Plex Mono",ui-monospace,"SF Mono",Menlo,monospace;
}
@media (prefers-color-scheme: dark) { :root {
  --ground:#0F1513; --surface:#17201D; --line:#2A3632;
  --ink:#EEF3F0; --ink-muted:#A3B1AB;
  --brand:#8FA6FF; --brand-ink:#0F1513; --highlight:#5C5416;
  --safe:#5BCB8E; --safe-soft:#15301F;
  --careful:#F0B451; --careful-soft:#34280F;
  --risk:#FF8A7A; --risk-soft:#3A1A16;
  color-scheme: dark;
} }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 16px/24px var(--font-sans); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--brand); text-underline-offset: 2px; }
img { max-width: 100%; display: block; }
h1, h2, h3, p, dl, dd { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); z-index: 10; }
.skip:focus { left: 8px; }

/* Type scale */
.t-display { font: 700 40px/44px var(--font-display); letter-spacing: -0.01em; }
.t-verdict { font: 700 24px/30px var(--font-display); }
.t-title { font: 600 20px/28px var(--font-sans); }
.t-body-strong { font: 600 16px/24px var(--font-sans); }
.t-small { font-size: 14px; line-height: 20px; }
.t-label { font: 600 12px/16px var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); }
.t-price { font: 500 18px/24px var(--font-mono); }
.t-data { font: 400 13px/18px var(--font-mono); color: var(--ink-muted); overflow-wrap: anywhere; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-muted); }
.strong { font-weight: 600; }
.lead { font-size: 16px; line-height: 24px; }

/* Layout */
.wrap { width: 100%; max-width: 672px; margin: 0 auto; padding: 0 var(--space-4); }
main.wrap { flex: 1; padding-top: var(--space-8); padding-bottom: var(--space-8); display: flex; flex-direction: column; gap: var(--space-6); }
.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.stack-tight { display: flex; flex-direction: column; gap: var(--space-1); }
.stack-lg { display: flex; flex-direction: column; gap: var(--space-6); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); }

/* Header and footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 56px; }
.brand { color: var(--ink); text-decoration: none; padding: var(--space-2) 0; }
.wordmark { font: 400 20px/28px var(--font-display); white-space: nowrap; }
.wordmark b { font-weight: 700; }
.wordmark span { color: var(--ink-muted); }
.header-nav { display: flex; align-items: center; gap: var(--space-6); }
.header-nav a { font-weight: 600; font-size: 14px; line-height: 20px; text-decoration: none; padding: var(--space-3) 0; }
.nav-wide { display: none; color: var(--ink); }
.site-footer { border-top: 1px solid var(--line); margin-top: auto; }
.footer-row { padding-top: var(--space-6); padding-bottom: var(--space-8); display: flex; flex-direction: column; gap: var(--space-3); }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: 14px; line-height: 20px; }
.footer-nav a { padding: var(--space-1) 0; }

/* Buttons and inputs */
.button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 48px; padding: 0 var(--space-4); border-radius: var(--radius-sm); font: 600 16px/24px var(--font-sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.button.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.button.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.button.small { min-height: 36px; font-size: 14px; padding: 0 var(--space-3); }
.button[disabled] { opacity: 0.7; cursor: progress; }
.link-btn { background: none; border: 0; padding: var(--space-2) 0; color: var(--brand); font-weight: 600; cursor: pointer; }
.link-form { display: flex; flex-direction: column; gap: var(--space-3); }
.link-form label { font-weight: 600; }
.link-form.compact label { font-size: 14px; line-height: 20px; }
.link-row { display: flex; gap: var(--space-2); }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; min-width: 0; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-3); min-height: 48px; font-size: 16px;
}
input::placeholder, textarea::placeholder { color: var(--ink-muted); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.link-row input { flex: 1; }
.form-hint { margin-top: var(--space-3); }

/* Home */
.home { display: flex; flex-direction: column; gap: var(--space-8); }
.hero { display: flex; flex-direction: column; gap: var(--space-6); }
.hero-main { gap: var(--space-4); }
.hero-example { display: none; }
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.tile { display: flex; flex-direction: column; gap: var(--space-1); text-decoration: none; color: var(--ink); }
.link-color { color: var(--brand); }
.steps { list-style: none; margin: 0; padding: 0; }
.steps > li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4); border-top: 1px solid var(--line); }
.steps > li:first-child { border-top: 0; }
.step-num { width: 32px; height: 32px; border-radius: var(--radius-pill); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font: 500 13px/18px var(--font-mono); }
.recent-list { list-style: none; margin: 0; padding: 0 var(--space-4); }
.recent-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.recent-list li:first-child { border-top: 0; }
.recent-list a { font-family: var(--font-mono); font-size: 14px; overflow-wrap: anywhere; }
.recent-meta { display: flex; align-items: center; gap: var(--space-2); flex: none; }

/* Verdicts */
.verdict { border: 1px solid; border-radius: var(--radius-md); padding: var(--space-6) var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.verdict.safe { background: var(--safe-soft); border-color: var(--safe); --tone: var(--safe); }
.verdict.careful { background: var(--careful-soft); border-color: var(--careful); --tone: var(--careful); }
.verdict.risk { background: var(--risk-soft); border-color: var(--risk); --tone: var(--risk); }
.verdict-domain { color: var(--tone); }
.verdict-row { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.badge { align-self: flex-start; display: inline-flex; align-items: center; gap: var(--space-2); border: 2px solid var(--tone); color: var(--tone); border-radius: var(--radius-pill); padding: var(--space-1) var(--space-4) var(--space-1) var(--space-3); }
.badge-glyph { display: flex; }
.badge.small { padding: 2px 14px 2px 10px; font: 700 20px/28px var(--font-display); }
.in-short { background: var(--surface); border-radius: var(--radius-sm); padding: var(--space-3); font-size: 14px; line-height: 20px; }
.in-short.plain { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); font-size: 16px; line-height: 24px; }
.note { border-left: 3px solid var(--tone, var(--line)); padding-left: var(--space-3); }
.mini-verdict { display: flex; flex-direction: column; gap: var(--space-2); border: 1px solid var(--tone); background: var(--risk-soft); border-radius: var(--radius-md); padding: var(--space-4); }
.mini-verdict.risk { --tone: var(--risk); }
.mini-verdict .t-data { color: var(--tone); }
.chip { display: inline-flex; align-items: center; gap: var(--space-1); border-radius: var(--radius-sm); padding: 2px var(--space-2); font: 600 12px/16px var(--font-sans); white-space: nowrap; }
.chip.safe { background: var(--safe-soft); color: var(--safe); }
.chip.careful { background: var(--careful-soft); color: var(--careful); }
.chip.risk { background: var(--risk-soft); color: var(--risk); }
.chip.neutral { background: var(--ground); color: var(--ink-muted); border: 1px solid var(--line); }

/* Product */
.product { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.product.no-image { grid-template-columns: minmax(0, 1fr); }
.product img { width: 88px; height: 88px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--ground); }
.price-line { display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.was { text-decoration: line-through; color: var(--ink-muted); font: 400 14px/20px var(--font-mono); }

/* Signal rows */
.signals { list-style: none; margin: 0; padding: var(--space-1) var(--space-4); }
.hero-example .signals { padding: 0; }
.signal { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.signal:first-child { border-top: 0; }
.signal-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.glyph { width: 24px; height: 24px; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; }
.glyph.pass { color: var(--safe); background: var(--safe-soft); }
.glyph.caution { color: var(--careful); background: var(--careful-soft); }
.glyph.fail { color: var(--risk); background: var(--risk-soft); }
.glyph.unknown { color: var(--ink-muted); background: var(--ground); border: 1px solid var(--line); }
.finding { font-weight: 600; }

/* Search elsewhere and sharing */
.pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-4); border: 1px solid var(--brand); color: var(--brand); border-radius: var(--radius-pill); text-decoration: none; font-weight: 600; }
.pill:hover { background: var(--brand); color: var(--brand-ink); }
.share-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.tips { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: var(--space-1); font-size: 14px; line-height: 20px; }
.result { display: flex; flex-direction: column; gap: var(--space-6); }

/* Checking */
.progress { height: 6px; border-radius: var(--radius-pill); background: var(--line); overflow: hidden; margin-top: var(--space-2); }
.progress span { display: block; height: 100%; width: 40%; background: var(--brand); border-radius: var(--radius-pill); animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.checking-list { list-style: none; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.checking-list li { display: flex; align-items: center; gap: var(--space-3); font-weight: 600; opacity: 0; animation: appear 0.4s ease-out forwards; }
.spinner { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes appear { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .progress span, .spinner { animation: none; }
  .checking-list li { animation: none; opacity: 1; }
}

/* Errors */
.error-icon { width: 40px; height: 40px; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; background: var(--ground); border: 1px solid var(--line); color: var(--ink-muted); }
.note-error { border-color: var(--risk); color: var(--risk); }

/* Store pages */
.store-page { display: flex; flex-direction: column; gap: var(--space-6); }
.crumbs a { color: var(--ink-muted); }
.store-grid { display: flex; flex-wrap: wrap; gap: var(--space-8); align-items: flex-start; }
.store-main { flex: 999 1 520px; min-width: 0; }
.store-aside { flex: 1 1 280px; min-width: 0; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2) var(--space-4); font-size: 14px; line-height: 20px; }
.facts dt { color: var(--ink-muted); }
.facts dd { overflow-wrap: anywhere; }
.store-list { list-style: none; margin: 0; padding: 0 var(--space-4); }
.store-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.store-list li:first-child { border-top: 0; }
.store-list a { overflow-wrap: anywhere; }

/* Add to phone */
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-1); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: var(--space-1); }
.segmented a { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: var(--radius-pill); color: var(--ink); font-weight: 600; text-decoration: none; }
.segmented a:hover { background: var(--ground); }
.copy-box { display: flex; align-items: center; gap: var(--space-2); background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3); margin-top: var(--space-2); }
.copy-box code { flex: 1; min-width: 0; color: var(--ink); }
.install-btn { margin-top: var(--space-2); }

/* Text pages */
.prose p, .prose li { max-width: 68ch; }
.rule-list { display: flex; flex-direction: column; padding: 0 var(--space-4); }
.rule-list > div { padding: var(--space-3) 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.rule-list > div:first-child { border-top: 0; }
.verdict-scale { list-style: none; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.verdict-scale li { display: flex; align-items: center; gap: var(--space-3); }
.report-form label { font-weight: 600; margin-top: var(--space-2); }
.report-form label:first-child { margin-top: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Wider screens */
@media (min-width: 760px) {
  .nav-wide { display: inline; }
  .wordmark { font-size: 24px; line-height: 32px; }
  .card { padding: var(--space-6); }
  .signals { padding: var(--space-1) var(--space-6); }
  .verdict { padding: var(--space-6); }
}
@media (min-width: 1000px) {
  .wrap { max-width: 1168px; padding: 0 var(--space-6); }
  main.wrap { padding-top: 56px; padding-bottom: 64px; }
  body[data-page="result"] main.wrap, body[data-page="report"] main.wrap, body[data-page="add_to_phone"] main.wrap,
  body[data-page="not_found"] main.wrap, body[data-page="server_error"] main.wrap, body[data-page="report_thanks"] main.wrap { max-width: 720px; }
  .hero { flex-direction: row; align-items: center; gap: 48px; }
  .hero-main { flex: 1 1 0; min-width: 0; }
  .hero-main .t-display { font-size: 56px; line-height: 60px; letter-spacing: -0.015em; }
  .hero-main .lead { font-size: 18px; line-height: 28px; max-width: 520px; }
  .hero-example { display: flex; flex: 0 0 400px; }
  .home > section:not(.hero) { max-width: 760px; }
  .store-page .t-display { font-size: 48px; line-height: 52px; }
}

/* Owner dashboard */
.admin main.wrap-wide { max-width: 1280px; margin: 0 auto; padding: var(--space-8) var(--space-4); width: 100%; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-3); }
.tile-stat { display: flex; flex-direction: column; gap: var(--space-2); }
.stat { font: 500 28px/34px var(--font-mono); }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-3); }
.admin-grid.two { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.admin table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.admin th { text-align: left; font: 600 12px/16px var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); padding: var(--space-2); border-bottom: 1px solid var(--line); }
.admin td { padding: var(--space-2); border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin .num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.bar-cell { width: 35%; min-width: 80px; }
.bar { display: block; height: 6px; border-radius: var(--radius-pill); background: var(--brand); margin: 2px 0; }
.bar.alt { background: var(--safe); }
.table-scroll { overflow-x: auto; }
.report-item { padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.report-item:first-of-type { border-top: 0; }
