/* =========================================================================
 * Subscription Trap Detector — styles (built 15 Nov 2026).
 * Professional, flat, deep-violet (#4c1d95) identity. Amber (#d97706) only
 * as a small accent — never as a gradient, never on large text.
 *
 * COLOURS ARE LITERAL VALUES, not var() references: the review browser
 * used by the site owner does not resolve CSS custom properties, so every
 * rule that paints a button, header, input, border or text uses a hex
 * value directly. The :root block below only documents the palette (and
 * keeps the --brand/--brand-2 declarations the cross-tool accent scan
 * looks for); no rule depends on it.
 *
 * Palette: bg #f6f7fb · surface #ffffff · surface-2 #eef1f8 ·
 * ink #141a2e · ink-soft #4b5573 · ink-faint #8a93ad ·
 * hairline #e2e7f2 · visible border #c9d2e0 · input border #b6bfce ·
 * brand #4c1d95 · brand hover #3b1478 · brand-soft #f0e9fb ·
 * amber #d97706 · ok #0f9d58 / #e5f6ec · warn #b45309 / #fef3e2 ·
 * err #dc2626 / #fdecec.
 * All motion disabled under prefers-reduced-motion.
 * ========================================================================= */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --ink: #141a2e;
  --ink-soft: #4b5573;
  --ink-faint: #8a93ad;
  --line: #e2e7f2;
  --brand: #4c1d95;
  --brand-2: #d97706;
  --brand-soft: #f0e9fb;
  --ok: #0f9d58;
  --ok-soft: #e5f6ec;
  --warn: #b45309;
  --warn-soft: #fef3e2;
  --err: #dc2626;
  --err-soft: #fdecec;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(20, 26, 46, 0.08);
  --shadow-lg: 0 18px 50px rgba(76, 29, 149, 0.16);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: #f6f7fb;
  color: #141a2e;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: #141a2e; color: #fff; padding: 10px 16px; border-radius: 10px;
  text-decoration: none; font-weight: 700; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------------- header ----------------
   Solid white — the old translucent header let scrolling text ghost
   through it. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid #dbe2ec;
  box-shadow: 0 1px 6px rgba(20, 26, 46, 0.06);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #141a2e; font-weight: 800; font-size: 1.05rem; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: #4c1d95;
  box-shadow: 0 10px 30px rgba(20, 26, 46, 0.08);
}
.brand-mark svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: #4b5573; text-decoration: none; font-weight: 600; font-size: 0.92rem;
  padding: 8px 12px; border-radius: 10px; transition: background 0.18s, color 0.18s;
}
.nav a:hover, .nav a:focus-visible { background: #eef1f8; color: #141a2e; outline: none; }

/* ---------------- hero ----------------
   Compact: headline + lede + at most four short pills on one row. */
.hero {
  padding: 26px 0 12px;
  background: radial-gradient(600px 280px at 15% 0%, rgba(76, 29, 149, 0.07), transparent 60%);
}
.hero h1 {
  font-size: clamp(1.65rem, 3.4vw, 2.25rem);
  line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 6px; max-width: none;
}
.hero h1 .accent { color: #4c1d95; }
.lede { font-size: 1rem; color: #4b5573; max-width: none; margin: 0 0 12px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.trust-row li {
  display: inline-flex; align-items: center; gap: 7px;
  background: #ffffff; border: 1px solid #c9d2e0; border-radius: 999px;
  padding: 5px 11px; font-size: 0.82rem; font-weight: 600; color: #3f4a63;
  box-shadow: 0 1px 3px rgba(20, 26, 46, 0.05);
}
.trust-row .dot { width: 7px; height: 7px; border-radius: 50%; background: #0f9d58; box-shadow: 0 0 0 3px #e5f6ec; }

/* ---------------- tool card ----------------
   A clearly visible container: white, 1.5px mid-grey border, real
   shadow, generous padding. Results run the full card width — the old
   "How scoring works" sidebar that squeezed them to ~55% now lives in
   its own full-width section below the tool. */
.tool-section { padding: 8px 0 32px; }
.tool-card {
  background: #ffffff; border: 1.5px solid #c9d2e0;
  border-radius: 18px; box-shadow: 0 18px 50px rgba(76, 29, 149, 0.16);
  padding: clamp(20px, 3vw, 30px);
}
.tool-title { font-size: 1.3rem; letter-spacing: -0.01em; margin: 0 0 4px; }

/* ---------------- input ---------------- */
.input-label { display: block; font-weight: 700; margin: 4px 0 8px; }
.tx-input {
  width: 100%; min-height: 220px; box-sizing: border-box;
  padding: 12px 14px 16px; border: 1.5px solid #b6bfce; border-radius: 12px;
  font: inherit; font-size: 0.95rem; line-height: 1.6; color: #141a2e;
  background: #ffffff; resize: vertical; overflow-y: auto;
}
.tx-input:focus { outline: 3px solid rgba(76, 29, 149, 0.35); outline-offset: 2px; border-color: #4c1d95; }
.mode-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 4px; }
.mode-row label { font-weight: 700; }
.mode-row select {
  font: inherit; padding: 9px 36px 9px 12px; border: 1.5px solid #b6bfce;
  border-radius: 10px; background-color: #ffffff; color: #141a2e; max-width: 100%;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%234c1d95' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px 16px;
}
.mode-row select:focus { outline: 3px solid rgba(76, 29, 149, 0.35); outline-offset: 2px; border-color: #4c1d95; }
.ctl-hint { font-size: 0.85rem; color: #8a93ad; }

/* ---------------- buttons ----------------
   Solid steel blue; hover darkens. Disabled is a solid muted grey,
   not a washed-out opacity. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 12px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 0.92rem; text-decoration: none;
  padding: 10px 18px; transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn-primary { background: #4c1d95; color: #fff; box-shadow: 0 4px 14px rgba(76, 29, 149, 0.28); }
.btn-primary:hover:not(:disabled) { background: #3b1478; transform: translateY(-1px); }
.btn-primary:disabled { background: #9aa5b5; color: #fff; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: #ffffff; border: 1.5px solid #c9d2e0; color: #141a2e; }
.btn-ghost:hover:not(:disabled) { background: #eef1f8; border-color: #b6bfce; }
.btn-ghost:disabled { background: #eef1f8; color: #8a93ad; border-color: #c9d2e0; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid rgba(76, 29, 149, 0.4); outline-offset: 2px; }

/* batch bar */
.batch-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  border-top: 1px solid #e2e7f2; margin-top: 18px; padding-top: 16px;
}
.bb-text { font-weight: 700; }
.bb-text small { display: block; font-weight: 400; color: #8a93ad; font-size: 0.84rem; }
.bb-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- results (full card width) ---------------- */
.results { margin-top: 20px; display: grid; gap: 22px; min-width: 0; }

/* Verdict panel — the one clear statement of the result. The score and
   label are the headline; the tiles are the compact summary; the note is
   a quiet caption underneath (its counts overlap the tiles, so it is
   de-emphasised rather than competing with them). Stat labels are
   near-white for contrast on the dark panel. */
.verdict { border-radius: 16px; padding: 18px 20px; color: #fff; background: #141a2e; }
.verdict-moderate { background: #7c4a03; }
.verdict-high { background: #7f1d1d; }
.verdict-low { background: #14532d; }
.verdict-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.verdict-score { font-size: 2rem; font-weight: 800; line-height: 1; }
.verdict-label { font-size: 1.15rem; font-weight: 800; }
.verdict-note { margin: 10px 0 0; color: rgba(255, 255, 255, 0.92); line-height: 1.6; font-size: 0.9rem; }
.verdict-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.vstat { background: rgba(255, 255, 255, 0.12); border-radius: 10px; padding: 10px; text-align: center; min-width: 0; }
.vstat b { display: block; font-size: 1.25rem; color: #fff; }
.vstat span { font-size: 0.78rem; color: rgba(255, 255, 255, 0.95); }

.res-sec h3 { margin: 0 0 6px; font-size: 1.1rem; }
.res-hint { color: #4b5573; font-size: 0.92rem; line-height: 1.6; margin: 4px 0 10px; overflow-wrap: anywhere; }

/* Services table — fixed layout, constrained columns, tight rows, no
   dead gaps. Four columns: Service / Charges / Cadence / Cost per year.
   The Cadence column hides on phones (see media query). */
.phrase-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; table-layout: fixed; }
.phrase-table th, .phrase-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid #e2e7f2; vertical-align: top; overflow-wrap: anywhere; }
.phrase-table th { color: #4b5573; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.phrase-table th:nth-child(1) { width: 44%; }
.phrase-table th:nth-child(2) { width: 12%; }
.phrase-table th:nth-child(3) { width: 18%; }
.phrase-table th:nth-child(4) { width: 26%; }
.phrase-table th:nth-child(4), .phrase-table td:nth-child(4) { text-align: right; }
.phrase-table td:nth-child(4) { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.phrase-table td:nth-child(2) { font-variant-numeric: tabular-nums; font-weight: 700; }
.phrase-cell { font-weight: 600; }
.flag-badge {
  display: inline-block; font-size: 0.78rem; font-weight: 800; color: #b45309;
  background: #fef3e2; border: 1px solid #f3c1c1; border-radius: 999px; padding: 1px 8px;
  margin-left: 6px; white-space: nowrap;
}

/* Trap cards — real cards with a severity accent bar; the score
   sits next to the service label as a badge, not far right. */
.review-list { display: grid; gap: 12px; }
.review-card { border: 1px solid #dbe2ec; border-left: 4px solid #0f9d58; border-radius: 12px; padding: 12px 14px; background: #fff; min-width: 0; }
.review-card.rev-moderate { border-left-color: #b45309; }
.review-card.rev-high { border-left-color: #dc2626; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 0.9rem; }
.review-rating { color: #d97706; font-weight: 800; }
.review-words { color: #8a93ad; }
.review-score { font-weight: 800; background: #eef1f8; border-radius: 999px; padding: 2px 10px; font-variant-numeric: tabular-nums; }
.rev-moderate .review-score { color: #b45309; }
.rev-high .review-score { color: #dc2626; }
.score-bar { display: block; height: 8px; border-radius: 4px; background: #eef1f8; margin: 10px 0; overflow: hidden; }
.score-fill { display: block; height: 100%; border-radius: 4px; }
.score-fill.low { background: #0f9d58; }
.score-fill.mod { background: #b45309; }
.score-fill.high { background: #dc2626; }
.review-text { margin: 0 0 8px; line-height: 1.6; overflow-wrap: anywhere; }
.signal-chips { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.signal-chips li {
  font-size: 0.86rem; line-height: 1.5; color: #4b5573; overflow-wrap: anywhere;
  background: #f6f7fb; border: 1px solid #e2e7f2; border-radius: 8px; padding: 5px 9px;
}
.signal-chips li b { color: #141a2e; }
.report-actions { margin-top: 4px; }

/* ---------------- how trap detection works ----------------
   Full-width section below the tool, neutral blue-grey tint. Two
   columns on desktop, stacked on mobile. */
.scoring { padding: 4px 0 40px; }
.settings {
  background: #eef1f8; border: 1px solid #dbe2ec; border-radius: 18px;
  padding: clamp(20px, 3vw, 28px);
}
.settings-title { font-weight: 800; font-size: 1.25rem; margin: 0 0 8px; }
.settings .ctl-hint { font-size: 0.92rem; color: #4b5573; margin: 0 0 4px; }
.scoring-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 32px; margin-top: 14px; }
.signal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.signal-list li { font-size: 0.9rem; line-height: 1.5; color: #4b5573; padding-left: 16px; position: relative; }
.signal-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: #d97706; }
.signal-list li strong { color: #141a2e; }
.png-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.png-facts li { font-size: 0.92rem; color: #4b5573; padding-left: 18px; position: relative; }
.png-facts li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px;
  border-radius: 50%; background: #4c1d95;
}
.png-facts li strong { color: #141a2e; }
.png-alt { font-size: 0.92rem; color: #4b5573; margin: 16px 0 0; padding-top: 12px; border-top: 1px solid #dbe2ec; }
.png-alt a { color: #4c1d95; font-weight: 700; }
.png-alt a:hover { color: #d97706; }

/* ---------------- privacy ---------------- */
.privacy { padding: 8px 0 44px; }
.privacy-card {
  background: linear-gradient(135deg, #2e1065, #4c1d95);
  color: #e7f0e8; border-radius: 22px; padding: clamp(22px, 3vw, 36px);
  box-shadow: 0 18px 50px rgba(76, 29, 149, 0.16);
}
.privacy-card h2 { color: #fff; margin: 0 0 10px; font-size: 1.4rem; }
.privacy-card p { margin: 0 0 16px; }
.net-meter {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px; padding: 9px 16px; font-weight: 700; color: #fff;
}
.net-meter b { font-size: 1.15rem; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #34d399; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
}
.verify-steps { margin: 16px 0 0; padding-left: 20px; }
.verify-steps li { margin: 6px 0; }
kbd {
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px; padding: 1px 7px; font: inherit; font-size: 0.85em;
}
.tool-card kbd, .content kbd {
  background: #eef1f8; border-color: #e2e7f2; color: #141a2e;
}

/* ---------------- guide + FAQ ----------------
   Reading measure ~68ch; tighter spacing; FAQ items are real cards. */
.content { padding: 20px 0 44px; }
.content .wrap { max-width: 68ch; }
.content h2 { font-size: 1.5rem; letter-spacing: -0.01em; margin: 0 0 12px; }
.content h3 { font-size: 1.08rem; margin: 22px 0 8px; }
.content p, .content li { color: #4b5573; }
.content ol, .content ul { padding-left: 22px; }
.content li { margin: 6px 0; }
.prose-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.prose-card { background: #ffffff; border: 1px solid #dbe2ec; border-radius: 16px; padding: 16px 18px; }
.prose-card h3 { margin: 0 0 6px; }
.prose-card p { margin: 0; font-size: 0.93rem; }

.faq details {
  background: #ffffff; border: 1px solid #dbe2ec; border-radius: 12px;
  padding: 12px 16px; margin: 8px 0;
}
.faq summary { font-weight: 700; cursor: pointer; }
.faq summary:focus-visible { outline: 3px solid rgba(76, 29, 149, 0.35); outline-offset: 2px; border-radius: 6px; }
.faq details p { margin: 10px 0 2px; }

/* ---------------- footer ----------------
   Light background + top border; links grouped in short lines. */
.site-footer { background: #eef1f8; border-top: 1px solid #c9d2e0; padding: 22px 0 30px; color: #4b5573; font-size: 0.85rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer p:first-child { font-weight: 700; color: #141a2e; }
.site-footer .footer-note { color: #4b5573; }
.site-footer a { color: #4c1d95; font-weight: 600; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------------- responsive ---------------- */
@media (max-width: 860px) {
  .scoring-grid { grid-template-columns: minmax(0, 1fr); }
  .settings { padding: 18px 20px; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .hero { padding: 20px 0 8px; }
  .batch-bar { flex-direction: column; align-items: stretch; }
  .bb-actions { display: grid; grid-template-columns: 1fr; }
  .bb-actions .btn { width: 100%; }
  .verdict-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phrase-table th:nth-child(3), .phrase-table td:nth-child(3) { display: none; }
  .phrase-table th:nth-child(1) { width: 50%; }
  .phrase-table th:nth-child(2) { width: 16%; }
  .phrase-table th:nth-child(4) { width: 34%; }
  .site-footer .wrap { flex-direction: column; gap: 2px; }
}

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