/* Trust Readiness Diagnostic — PREMIUM ADVISORY skin, matched to slm.css.
   Warm graphite ground, warm ivory ink, Spectral + Hanken Grotesk. Cyan/violet stay ONLY as the
   reserved measurement accents (the score, the bands, the signal bars). Class names unchanged so
   scan.html and scan.js are untouched. */
:root {
  --bg: #0D0C11;
  --panel: #16131D;
  --panel-2: #1B1826;
  --line: rgba(239,236,228,.12);
  --line-2: rgba(239,236,228,.22);
  --text: #EFECE4;
  --slate: #C9C4D0;
  --muted: #8C8797;
  --cyan: #36E6FF;
  --violet: #9A7BFF;
  --magenta: #FF6BB4;
  --amber: #FFC24B;
  --good: #4FE0A6;
  --warn: #FFC24B;
  --bad: #E06A86;
  --serif: "Spectral", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--text); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; }
b { font-weight: 600; }
.hide { display: none !important; }
.grad { font-style: italic; color: var(--text); }

/* HERO / INPUT */
.hero { padding: 48px 24px 40px; }
.hero-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.kicker { font-family: var(--sans); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hero h1 { font-size: 38px; line-height: 1.06; color: var(--text); margin: 14px 0 16px; letter-spacing: -0.6px; }
.lede { font-size: 16px; color: var(--slate); max-width: 620px; margin: 0 auto; }
.lede + .lede { margin-top: 14px; font-size: 14.5px; color: var(--muted); }
.scan {
  display: flex; gap: 10px; margin: 28px auto 0; max-width: 560px;
  background: rgba(255,255,255,.03); padding: 8px; border-radius: 14px; border: 1px solid var(--line-2);
}
.scan input { flex: 1; border: none; outline: none; font-size: 17px; padding: 14px 16px; color: var(--text); background: transparent; font-family: var(--sans); }
.scan input::placeholder { color: var(--muted); }
.scan:focus-within { outline: 2px solid var(--violet); outline-offset: 2px; box-shadow: 0 0 0 4px rgba(154,123,255,.22); }
#urlInput:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.scan button { border: none; background: var(--text); color: #0d0c11; font-family: var(--sans); font-size: 15px; font-weight: 600; padding: 0 26px; border-radius: 9px; cursor: pointer; white-space: nowrap; transition: box-shadow .2s, transform .12s; }
.scan button:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(239,236,228,.16); }
.scan button:disabled { opacity: .55; cursor: default; box-shadow: none; transform: none; }
.scan-note { font-size: 13px; color: var(--muted); margin-top: 14px; }
.error { margin: 18px auto 0; max-width: 560px; background: rgba(224,106,134,.10); color: #f0aebb; border: 1px solid rgba(224,106,134,.35); padding: 12px 16px; border-radius: 10px; font-size: 14px; }

/* LIVE PROGRESS */
.progress { max-width: 860px; margin: 8px auto 0; padding: 0 20px; }
.progress-head { display: flex; align-items: center; gap: 12px; justify-content: center; color: var(--text); font-weight: 600; font-size: 16px; font-family: var(--sans); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(255,255,255,.14); border-top-color: var(--violet); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cancel { margin-top: 16px; }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: var(--violet); }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.ticker { list-style: none; max-width: 520px; margin: 18px auto 0; }
.ticker li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); padding: 5px 0; }
.ticker li .dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.18); flex: none; }
.ticker li.done { color: var(--text); }
.ticker li.done .dot { background: var(--cyan); box-shadow: 0 0 10px rgba(54,230,255,.6); }

/* RESULTS */
.results { padding: 30px 20px 0; }
.report { max-width: 860px; margin: 0 auto; background: var(--panel); border-radius: 16px; padding: 32px 38px; border: 1px solid var(--line); }
.report-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 1px solid var(--line-2); padding-bottom: 16px; }
.report-top h2 { font-size: 26px; color: var(--text); margin: 4px 0 6px; }
.subject { font-size: 13px; color: var(--slate); font-family: var(--sans); }
.prep { text-align: right; font-size: 11px; color: var(--muted); line-height: 1.6; white-space: nowrap; font-family: var(--sans); }
.prep b { color: var(--text); font-size: 12.5px; }

/* THE READ */
.read { margin-top: 24px; }
.read p { font-size: 17px; line-height: 1.62; color: var(--slate); margin-bottom: 14px; }
.read p:first-child { font-size: 18.5px; color: var(--text); }
.read p:last-child { margin-bottom: 0; }

/* score + pillars */
.scoreband { display: flex; gap: 20px; margin-top: 28px; align-items: stretch; }
.scorebox { width: 210px; flex: none; background: linear-gradient(160deg, rgba(54,230,255,.10), rgba(154,123,255,.07)); border: 1px solid var(--line-2); color: var(--text); border-radius: 14px; padding: 22px 20px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.scorebox .num { font-family: var(--serif); font-size: 64px; font-weight: 500; line-height: 1; letter-spacing: -2px; color: var(--cyan); }
.scorebox .num i { font-size: 22px; font-weight: 500; color: var(--muted); font-style: normal; }
.scorebox .bandname { font-size: 13px; font-weight: 600; letter-spacing: .3px; margin-top: 12px; line-height: 1.35; color: var(--text); font-family: var(--sans); }
.scorebox .delta { font-size: 11.5px; color: var(--muted); margin-top: 10px; font-family: var(--sans); }
.scorebox .delta b.up { color: var(--good); } .scorebox .delta b.down { color: var(--bad); }
.pillars { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pillar { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; background: rgba(255,255,255,.02); }
.pillar .p-name { font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .3px; text-transform: uppercase; }
.pillar .p-score { font-family: var(--serif); font-size: 32px; font-weight: 500; letter-spacing: -1px; margin-top: 4px; color: var(--text); }
.pillar .p-score i { font-size: 13px; font-weight: 500; color: var(--muted); font-style: normal; }
.pillar.hygiene { background: rgba(255,255,255,.04); }
.pillar.hygiene .p-score { color: var(--slate); font-size: 26px; }

/* cap callout */
.cap { margin-top: 20px; background: rgba(255,107,180,.08); border: 1px solid rgba(255,107,180,.30); border-radius: 12px; padding: 16px 18px; }
.cap .cap-h { font-family: var(--sans); font-size: 13px; font-weight: 700; color: var(--magenta); letter-spacing: .3px; text-transform: uppercase; }
.cap p { font-size: 14.5px; color: var(--slate); margin-top: 6px; line-height: 1.55; }
.cap .gap { color: var(--text); font-weight: 700; }

/* named bands strip */
.bands { display: flex; gap: 6px; margin-top: 22px; }
.band { flex: 1; text-align: center; font-size: 10px; padding: 8px 4px; border-radius: 8px; color: #fff; font-weight: 700; opacity: .55; font-family: var(--sans); }
.band small { display: block; font-size: 8.5px; font-weight: 600; opacity: .95; margin-top: 2px; letter-spacing: .2px; }
.band.active { opacity: 1; outline: 2px solid var(--cyan); outline-offset: 2px; box-shadow: 0 0 20px rgba(54,230,255,.35); }

/* signals */
.signals { margin-top: 32px; }
.sig-head { font-family: var(--sans); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.sig { display: grid; grid-template-columns: 220px 1fr; gap: 22px; padding: 16px 0; border-top: 1px solid var(--line); }
.sig-left .name { font-size: 15px; font-weight: 600; color: var(--text); font-family: var(--sans); }
.sig-left .q { font-size: 12px; color: var(--muted); margin-top: 2px; font-style: italic; }
.sig-left .contested { display: inline-block; margin-top: 6px; font-size: 10px; font-weight: 700; color: var(--amber); border: 1px solid rgba(255,194,75,.4); background: rgba(255,194,75,.08); padding: 1px 7px; border-radius: 10px; }
.bar { height: 9px; background: rgba(255,255,255,.08); border-radius: 5px; margin-top: 10px; position: relative; max-width: 160px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 5px; transform: scaleX(0); transform-origin: left; transition: transform .7s ease; }
.bar b { position: absolute; left: 172px; top: -4px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; font-family: var(--sans); }
.sig-right .working { font-size: 13.5px; color: var(--good); font-weight: 600; margin-bottom: 5px; }
.sig-right p { font-size: 14.5px; line-height: 1.55; color: var(--slate); }
.sig-right .held { color: var(--muted); font-style: italic; }

/* the story */
.story { margin-top: 34px; }
.story-el { display: grid; grid-template-columns: 260px 1fr; gap: 22px; padding: 14px 0; border-top: 1px solid var(--line); }
.story-el .s-left { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.story-el .s-n { font-family: var(--sans); font-size: 12px; font-weight: 700; color: #0d0c11; background: var(--cyan); border-radius: 50%; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.story-el .s-name { font-size: 14.5px; font-weight: 600; color: var(--text); font-family: var(--sans); }
.story-el .s-verdict { font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; width: 100%; }
.story-el .s-finding { font-size: 14px; line-height: 1.55; color: var(--slate); }
.story-el.ns .s-finding { color: var(--muted); font-style: italic; }

/* stages */
.stages { margin-top: 34px; }
.stage { border-top: 1px solid var(--line); padding: 14px 0; display: grid; grid-template-columns: 170px 1fr; gap: 18px; }
.stage .st-name { font-family: var(--serif); font-size: 17px; font-weight: 500; color: var(--text); }
.stage .st-note { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; font-family: var(--sans); }
.stage .st-items { font-size: 13.5px; color: var(--slate); }
.stage .st-items span { display: inline-block; margin-right: 4px; }

.report-foot { margin-top: 26px; border-top: 1px solid var(--line-2); padding-top: 16px; }
.method { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.method b { color: var(--text); }

/* book CTA */
.book { max-width: 860px; margin: 28px auto 48px; background: linear-gradient(160deg, rgba(154,123,255,.10), rgba(255,107,180,.05)); border: 1px solid var(--line-2); color: var(--text); border-radius: 16px; padding: 38px; text-align: center; }
.book h3 { font-size: 28px; letter-spacing: -0.4px; margin-bottom: 12px; color: var(--text); }
.book p { font-size: 16px; color: var(--slate); max-width: 620px; margin: 0 auto 24px; }
.book-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary { background: var(--text); color: #0d0c11; text-decoration: none; font-family: var(--sans); font-weight: 600; font-size: 16px; padding: 14px 28px; border-radius: 999px; }
.btn-primary:hover { box-shadow: 0 14px 34px rgba(239,236,228,.16); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); font-size: 15px; font-weight: 600; padding: 13px 22px; border-radius: 999px; cursor: pointer; font-family: var(--sans); }
.btn-ghost:hover { border-color: var(--violet); }
.book-by { font-size: 12px; color: var(--muted); margin-top: 20px; }

/* unscannable */
.noscore-body { padding: 22px 4px 4px; }
.noscore-body p { margin: 0 0 14px; line-height: 1.6; color: var(--slate); }
.noscore-body .lead { font-size: 1.06rem; color: var(--text); }
.noscore-body .why { color: var(--muted); }

.site-foot { text-align: center; padding: 26px; font-size: 12px; color: var(--muted); }

@media (max-width: 720px) {
  .hero h1 { font-size: 29px; }
  .scan { flex-direction: column; } .scan button { padding: 14px; }
  .report { padding: 24px 18px; }
  .report-top { flex-direction: column; } .prep { text-align: left; white-space: normal; }
  .scoreband { flex-direction: column; } .scorebox { width: 100%; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .read p { font-size: 16px; } .read p:first-child { font-size: 17px; }
  .bands { flex-wrap: wrap; } .band { min-width: 30%; }
  .sig, .stage, .story-el { grid-template-columns: 1fr; gap: 8px; }
  .bar { max-width: 200px; }
}
@media print {
  body { background: #fff; color: #111; }
  .hero, .progress, .book, .site-foot { display: none !important; }
  .results { padding: 0; }
  .report { border: none; border-radius: 0; max-width: 100%; padding: 0; background: #fff; }
}
