/* Fineprint site styles. Minimal, calm, grayscale; matches the wireframes.
   Light and dark aware. One centered column. */
:root {
  --ink: #222;
  --muted: #737373;
  --faint: #999;
  --line: #e0e0e0;
  --bg: #f6f6f6;
  --card: #fff;
  --chip: #ededed;
  --flag: #222;
  --flag-ink: #fff;
  --caution: #c9c9c9;
  --clear: #e6e6e6;
  --added: #dbe8db;
  /* Verdict colors (WCAG AA both themes, colorblind-safe; see docs/rubric-analysis.md).
     Separate from --flag/--flag-ink, which stay the primary-action color. */
  --v-flag-bg: #fbe9e7; --v-flag-ink: #c0261c;
  --v-caution-bg: #fff4d6; --v-caution-ink: #8a5a00;
  --v-clear-bg: #e4f3e7; --v-clear-ink: #1e6b37;
  --radius: 12px;
  --col: 720px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ededed; --muted: #a0a0a0; --faint: #7a7a7a; --line: #333;
    --bg: #141414; --card: #1c1c1c; --chip: #2a2a2a; --flag: #ededed;
    --flag-ink: #141414; --caution: #444; --clear: #2f2f2f; --added: #26361f;
    --v-flag-bg: #3a1a17; --v-flag-ink: #f6b9b2;
    --v-caution-bg: #3a2e12; --v-caution-ink: #f4ce7a;
    --v-clear-bg: #14301f; --v-clear-ink: #8fd3a6;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 40px; max-width: 1280px; margin: 0 auto;
}
.wordmark { font-weight: 600; font-size: 20px; text-decoration: none;
  display: flex; align-items: center; gap: 10px; }
.wordmark .mark { width: 24px; height: 24px; border-radius: 6px; }
.nav a { color: var(--muted); text-decoration: none; margin-left: 28px; font-size: 14px; }
.nav a:hover { color: var(--ink); }

.app { max-width: var(--col); margin: 0 auto; padding: 24px 20px 80px; }

/* Landing */
.hero { text-align: center; padding: 96px 0 0; }
.hero h1 { font-size: 40px; font-weight: 600; margin: 0 0 14px; }
.hero-sub { color: var(--muted); font-size: 18px; line-height: 1.5; max-width: 560px; margin: 0 auto 28px; }
.search { display: flex; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 20px; }
.search input { flex: 1; border: 0; background: transparent; color: var(--ink); font-size: 18px; outline: none; }
.search button { border: 0; background: var(--flag); color: var(--flag-ink);
  font-size: 16px; font-weight: 600; padding: 14px 24px; border-radius: 10px; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.chip { background: var(--chip); border-radius: 20px; padding: 10px 16px; font-size: 15px;
  font-weight: 500; text-decoration: none; }
.chip.see-all { background: transparent; color: var(--muted); font-weight: 600; }
.chip.see-all:hover { color: var(--ink); }

/* Report */
.svc h1 { font-size: 34px; font-weight: 600; margin: 0; }
.svc .domain { color: var(--muted); text-decoration: none; }
a.domain:hover { text-decoration: underline; }
/* Executive summary: the read-this-first takeaway, most important words bold. */
.exec-summary { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; margin: 16px 0 4px; }
.exec-summary p { margin: 0; font-size: 17px; line-height: 1.55; }
.exec-summary strong { font-weight: 700; }

.summary { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 14px 0 6px; }
.meta { color: var(--faint); font-size: 13px; }
.status-line { color: var(--muted); font-weight: 500; margin: 6px 0; }

/* Progress: an indeterminate bar (no width binding, so no inline style and no
   CSP trouble) that keeps moving while we work, plus the live step line. */
.progress { margin: 14px 0 6px; }
.progress-bar { position: relative; height: 4px; border-radius: 4px; overflow: hidden;
  background: var(--line); margin-bottom: 10px; }
.progress-bar::after { content: ""; position: absolute; top: 0; left: 0; height: 100%;
  width: 40%; border-radius: 4px; background: var(--muted); animation: indet 1.3s ease-in-out infinite; }
@keyframes indet { 0% { left: -40%; } 100% { left: 100%; } }

.badge { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 14px;
  background: var(--clear); color: var(--ink); white-space: nowrap; }
.tally-chip { border: 0; cursor: pointer; font-family: inherit; line-height: 1;
  -webkit-appearance: none; appearance: none; transition: box-shadow .12s ease, opacity .12s ease; }
.tally-chip:hover { opacity: .85; }
.tally-chip:focus-visible { outline: 2px solid var(--muted); outline-offset: 2px; }
.tally-chip.active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--muted); }
.badge.flag { background: var(--v-flag-bg); color: var(--v-flag-ink); }
.badge.caution { background: var(--v-caution-bg); color: var(--v-caution-ink); }
.badge.clear { background: var(--v-clear-bg); color: var(--v-clear-ink); }
.badge.notsure { background: transparent; border: 1px dashed var(--faint); color: var(--muted); }

.rows { margin-top: 12px; }
.row { border-bottom: 1px solid var(--line); padding: 18px 0; }
.row .top { display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; }
.row .lc { flex: 1; }
.row .label { font-weight: 600; }
.row .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.row .caret { color: var(--faint); }
.verdict-cell { display: flex; align-items: center; gap: 10px; }
.clause { background: var(--card); border-left: 3px solid var(--ink); border-radius: 10px;
  padding: 16px 18px; margin-top: 12px; }
.clause.notsure { border-left-color: var(--faint); }
.clause.flag { border-left-color: var(--v-flag-ink); }
.clause.caution { border-left-color: var(--v-caution-ink); }
.clause.clear { border-left-color: var(--v-clear-ink); }
.clause p { margin: 0 0 10px; }
.clause a { font-weight: 500; }
/* Context window: the surrounding passage reads muted, the operative quote is
   bolded in full ink so the critical words stand out. */
.clause .quotebox { color: var(--muted); }
.clause .quotebox strong { color: var(--ink); font-weight: 700; }
/* Analogy: our plain-language help, tinted with the verdict's accent color
   (matching the clause border) so it reads as OUR voice, distinct from the
   grey quoted passage. */
.clause .analogy { color: var(--ink); margin: 12px 0 0; font-style: italic; }
.clause.flag .analogy { color: var(--v-flag-ink); }
.clause.caution .analogy { color: var(--v-caution-ink); }
.clause.clear .analogy { color: var(--v-clear-ink); }
.analogy-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--faint); margin-right: 8px; font-style: normal; }

/* Per-verdict feedback: a quiet Disagree? that expands into the four verdicts.
   Deliberately understated; it should never compete with the content. */
.disagree { margin-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.disagree-link { border: 0; background: transparent; color: var(--faint); font-size: 13px;
  font-family: inherit; cursor: pointer; padding: 0; text-decoration: underline dotted; }
.disagree-link:hover { color: var(--muted); }
.disagree-opt { border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  font-size: 12.5px; font-weight: 600; font-family: inherit; padding: 5px 12px;
  border-radius: 12px; cursor: pointer; }
.disagree-opt:hover { color: var(--ink); border-color: var(--muted); }

/* Skeletons: shimmer so a placeholder reads as work-in-progress, not a freeze. */
.skel { display: inline-block; border-radius: 6px; height: 10px;
  background: linear-gradient(90deg, var(--line) 25%, var(--chip) 50%, var(--line) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skel.bar { width: 60%; }
.skel.pill { width: 64px; height: 26px; border-radius: 14px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  .progress-bar::after { animation: none; left: 0; width: 100%; opacity: .5; }
  .skel { animation: none; }
}

/* Fineprint Rating: plain words, color-coded, text always present. Gray is the
   honest "not enough data" tier, never a guess. */
/* True traffic-light colors, deliberately bolder and more saturated than the
   muted verdict badges, so the overall rating reads as a stoplight at a glance.
   The text label always rides along, so color is never the only signal. */
.rating { display: inline-block; font-size: 14px; font-weight: 700; padding: 7px 14px;
  border-radius: 16px; white-space: nowrap; }
.rating.red { background: #d92d20; color: #fff; }
.rating.yellow { background: #f2a71b; color: #1a1a1a; }
.rating.green { background: #0f7a45; color: #fff; }
.rating.gray { background: var(--chip); color: var(--muted); }
.rating-line { margin: 12px 0 2px; }

/* Directory */
.dir-row { display: flex; align-items: center; gap: 16px; padding: 16px 0;
  border-bottom: 1px solid var(--line); text-decoration: none; }
.dir-row:hover .label { text-decoration: underline; }
.dir-name { flex: 1; min-width: 0; }
.dir-tally { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .dir-tally { display: none; } }

/* Feed */
.feed h1 { font-size: 30px; font-weight: 600; }
.entry { border-bottom: 1px solid var(--line); padding: 22px 0; }
.entry .date { color: var(--faint); font-size: 13px; }
.entry .svc { font-weight: 600; font-size: 18px; margin: 4px 0; }
.entry .line { color: var(--muted); }

/* How it works + terminal states */
.prose h1 { font-size: 30px; font-weight: 600; }
.prose h2 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.prose p { color: var(--muted); margin-top: 4px; }
.step { display: flex; gap: 16px; margin-bottom: 22px; }
.step-num { color: var(--faint); font-weight: 600; font-size: 20px; }
.linkbtn { display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 20px; margin-top: 12px; text-decoration: none; font-weight: 500; }
.notice { padding: 80px 0; }
.notice h1 { font-size: 24px; font-weight: 600; margin-bottom: 6px; }
.notice p { color: var(--muted); }
.accuracy { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-top: 22px; }
.accuracy .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
@media (max-width: 480px) { .accuracy .stats { grid-template-columns: 1fr; } }
.accuracy .stat { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.accuracy .stat-num { font-size: 32px; font-weight: 700; color: var(--v-clear-ink); line-height: 1.05; }
.accuracy .stat-label { color: var(--muted); font-size: 13.5px; line-height: 1.4; margin-top: 8px; }
.accuracy .note { color: var(--faint); font-size: 13px; line-height: 1.5; margin: 0;
  padding-top: 14px; border-top: 1px solid var(--line); }

/* How we grade */
.grading { margin-top: 30px; }
.grade-verdicts { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 18px; }
.grade-verdict { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.grade-dim { border-top: 1px solid var(--line); padding: 14px 0; }
.grade-label { font-weight: 600; margin-bottom: 8px; }
.grade-line { display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: 14px; margin: 5px 0; }
.grade-line .badge { flex: none; }
