/* 2026-11 redesign (ориентир — timeweb.com): warm neutrals, one coral
   brand color for every primary action, and a muted hue per tool used
   only for identity (nav dot, eyebrow pill, card icon) — never for the
   main buttons, so «Проверить» looks the same on every page.
   The old dark scheme (prefers-color-scheme) was dropped with the
   redesign: the new palette is light-only. */
:root {
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --surface-sunken: #f6f1ee;
    --surface-soft: #fbf8f6;
    --ink: #3a2e2e;
    --ink-muted: #6e625f;
    --accent: #b94838;
    --accent-strong: #9e3a2c;
    --on-accent: #ffffff;
    --nav-bg: #4a3838;
    --nav-ink: #f5c6b3;
    --dark-card: #2e2222;

    /* per tool: ink (text/icons, ≥4.5:1 on its tint) + tint (backgrounds) */
    --tool-stock: #a63f30;        --tool-stock-tint: #fbe6e0;        --tool-stock-dot: #f0937f;
    --tool-texts: #7f5208;        --tool-texts-tint: #faefd6;        --tool-texts-dot: #e9b54f;
    --tool-malware: #7e3464;      --tool-malware-tint: #f5e4ef;      --tool-malware-dot: #d98bc0;
    --tool-availability: #1b625e; --tool-availability-tint: #ddf0ee; --tool-availability-dot: #6fc3bc;
    --tool-law: #384a96;          --tool-law-tint: #e5e8f7;          --tool-law-dot: #9faeea;
    --tool-ads: #46601b;          --tool-ads-tint: #e8f0d8;          --tool-ads-dot: #a9c46a;
    --tool-checker: #1a577f;      --tool-checker-tint: #dfecf6;      --tool-checker-dot: #7db6e0;
    --tool-site: #b94838;         --tool-site-tint: #fbe6e0;         --tool-site-dot: #f0937f;
    /* old names some rules still read */
    --tool-stock-strong: var(--tool-stock);
    --tool-texts-strong: var(--tool-texts);
    --tool-malware-strong: var(--tool-malware);
    --tool-availability-strong: var(--tool-availability);
    --tool-law-strong: var(--tool-law);
    --tool-ads-strong: var(--tool-ads);
    --tool-checker-strong: var(--tool-checker);
    --tool: var(--accent);
    --tool-tint: var(--surface-sunken);

    --good: #136c33;
    --good-bg: #e6f4ea;
    --warn: #8f3f05;
    --warn-bg: #fef1de;
    --critical: #a1281c;
    --critical-bg: #fdecea;
    --info: #4f4442;
    --info-bg: #f6f1ee;
    --line: #efe8e4;
    --line-strong: #e4dcd8;
    --shadow: 0 6px 24px rgba(58, 46, 46, 0.06);
    --shadow-lg: 0 1px 2px rgba(58, 46, 46, 0.06), 0 12px 40px rgba(58, 46, 46, 0.10);
    --font-display: "Roboto", "Segoe UI", system-ui, sans-serif;
    --font-body: "Roboto", "Segoe UI", system-ui, sans-serif;
    --font-mono: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  }

  /* A tool page's own hue — identity only (see the note at the top). */
  body.theme-stock { --tool: var(--tool-stock); --tool-tint: var(--tool-stock-tint); }
  body.theme-texts { --tool: var(--tool-texts); --tool-tint: var(--tool-texts-tint); }
  body.theme-checker { --tool: var(--tool-checker); --tool-tint: var(--tool-checker-tint); }
  body.theme-malware { --tool: var(--tool-malware); --tool-tint: var(--tool-malware-tint); }
  body.theme-availability { --tool: var(--tool-availability); --tool-tint: var(--tool-availability-tint); }
  body.theme-law { --tool: var(--tool-law); --tool-tint: var(--tool-law-tint); }
  body.theme-ads { --tool: var(--tool-ads); --tool-tint: var(--tool-ads-tint); }
  body.theme-site { --tool: var(--tool-site); --tool-tint: var(--tool-site-tint); }

  * { box-sizing: border-box; }

  html, body {
    margin: 0;
    padding: 0;
    background: var(--surface);
    color: var(--ink);
    overflow-x: hidden;
  }

  body {
    font-family: var(--font-body);
    font-size: 14.5px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  a { color: var(--accent-strong); }
  a:focus-visible, button:focus-visible, label:focus-within, input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  .wrap {
    max-width: 940px;
    margin: 0 auto;
    padding: 0 24px;
  }

  header.hero {
    background: var(--surface-sunken);
    padding: 52px 0 40px;
    border-bottom: 1px solid var(--line);
  }

  .eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-strong);
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
  }

  h1 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: clamp(26px, 3.8vw, 38px);
    line-height: 1.12;
    margin: 12px 0 14px;
    text-wrap: balance;
    color: var(--ink);
  }

  .hero-sub {
    font-size: 14.5px;
    color: var(--ink-muted);
    margin: 0 0 28px;
  }

  .dropzone {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--surface-raised);
    border: 1.5px dashed var(--line-strong);
    border-radius: 16px;
    padding: 22px 24px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    box-shadow: var(--shadow);
  }
  .dropzone:hover, .dropzone.dragover {
    border-color: var(--accent);
    background: var(--surface-raised);
  }
  .dropzone svg { flex: none; color: var(--accent); }
  .dropzone .dz-text { display: flex; flex-direction: column; gap: 4px; }
  .dropzone .dz-title { font-weight: 600; font-size: 14.5px; }
  .dropzone .dz-sub { font-size: 12.5px; color: var(--ink-muted); }
  .dropzone input[type="file"] {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .privacy-note {
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--ink-muted);
    display: flex;
    align-items: flex-start;
    gap: 7px;
  }
  .privacy-note svg { flex: none; opacity: 0.8; margin-top: 2px; }

  .hero-details {
    margin: 0 0 22px;
  }
  .hero-details summary {
    cursor: pointer;
    list-style: none;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--accent-strong);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
  }
  .hero-details summary::-webkit-details-marker { display: none; }
  .hero-details summary::before {
    content: "▸";
    font-size: 11px;
    transition: transform 0.15s ease;
  }
  .hero-details[open] summary::before { transform: rotate(90deg); }
  .hero-details summary:hover { color: var(--accent); }
  .hero-details .hero-sub {
    margin-top: 10px;
    margin-bottom: 0;
  }

  main { padding: 36px 0 76px; }

  .status-line {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--ink-muted);
    margin-bottom: 20px;
    min-height: 1.4em;
  }

  #report {
    display: none;
    opacity: 0;
    transform: translateY(6px);
  }
  #report.visible {
    display: block;
    animation: reveal 0.35s ease forwards;
  }
  @keyframes reveal {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @media (prefers-reduced-motion: reduce) {
    #report.visible { animation: none; opacity: 1; transform: none; }
  }

  .summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 18px 22px;
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 26px;
  }
  .summary p {
    margin: 0;
    flex-basis: 100%;
    color: var(--ink-muted);
    font-size: 13.5px;
  }
  .chip {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    padding: 5px 11px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
  .chip.critical { background: var(--critical-bg); color: var(--critical); }
  .chip.critical::before { background: var(--critical); }
  .chip.warn { background: var(--warn-bg); color: var(--warn); }
  .chip.warn::before { background: var(--warn); }
  .chip.good { background: var(--good-bg); color: var(--good); }
  .chip.good::before { background: var(--good); }
  .chip.info { background: var(--info-bg); color: var(--info); }
  .chip.info::before { background: var(--info); }

  .tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .tab {
    font-family: var(--font-display);
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-raised);
    color: var(--ink-muted);
    text-decoration: none;
  }
  .tab:hover { color: var(--ink); border-color: var(--line-strong); }
  .tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
  }

  .exhibit {
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
    overflow: hidden;
  }
  .exhibit-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--line);
  }
  .exhibit-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-muted);
  }
  .exhibit-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    color: var(--ink);
  }
  /* Optional small icon inside an .exhibit-title span, e.g.
     <span class="exhibit-title"><svg>...</svg> Title</span> — additive,
     only applies where a template actually puts an svg there, so it
     can't affect the many exhibit-title usages that don't. */
  .exhibit-title svg {
    vertical-align: -4px;
    margin-right: 6px;
    color: var(--accent-strong);
    flex: none;
  }
  .exhibit-body { padding: 18px 20px 22px; }
  .exhibit-body > p.lede {
    margin: 0 0 16px;
    color: var(--ink-muted);
    font-size: 13.5px;
  }

  .stock-only-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--ink-muted);
    cursor: pointer;
    user-select: none;
  }
  .stock-only-toggle input { margin: 0; cursor: pointer; }

  .finding {
    display: flex;
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid var(--line);
  }
  .finding:first-child { border-top: none; padding-top: 0; }
  /* Toggled by #stock-only-filter in report.html — hides the "clean"
     findings (level="good"/"info") so only critical/warn cards remain
     visible. */
  body.filter-stock-only .finding.good,
  body.filter-stock-only .finding.info { display: none; }
  .finding .stripe {
    flex: none;
    width: 3px;
    border-radius: 2px;
    align-self: stretch;
  }
  .finding.critical .stripe { background: var(--critical); }
  .finding.warn .stripe { background: var(--warn); }
  .finding.good .stripe { background: var(--good); }
  .finding.info .stripe { background: var(--info); }
  .finding .ftitle { font-weight: 600; font-size: 13.5px; margin: 0 0 3px; }
  .finding .fdetail { font-size: 12.5px; color: var(--ink-muted); margin: 0; }
  .finding.critical .ftitle { color: var(--critical); }
  .finding.warn .ftitle { color: var(--warn); }
  .finding.good .ftitle { color: var(--good); }
  .finding .reverse-matches { list-style: none; margin: 2px 0; padding: 0; }
  .finding .reverse-matches .fdetail { margin: 1px 0; }
  .finding-other-urls { margin: 6px 0 0; }
  .finding-other-urls summary { cursor: pointer; font-size: 12.5px; color: var(--ink-muted); }
  .finding-other-urls .fdetail { margin: 4px 0 0 14px; }

  .page-list {
    max-height: 480px;
    overflow-y: auto;
    margin: 0;
    padding-left: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .page-list li { margin: 3px 0; }

  table.meta-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 12.5px;
  }
  table.meta-table tr { border-top: 1px solid var(--line); }
  table.meta-table tr:first-child { border-top: none; }
  table.meta-table td { padding: 8px 4px; vertical-align: top; }
  table.meta-table td:first-child {
    color: var(--ink-muted);
    white-space: nowrap;
    padding-right: 18px;
    width: 1%;
  }
  table.meta-table td:last-child { word-break: break-word; }

  .empty-note {
    font-size: 13px;
    color: var(--ink-muted);
    font-style: italic;
  }

  .compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 4px;
  }
  .compare-item figure { margin: 0; }
  .compare-item img, .compare-item canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface-sunken);
  }
  .compare-item figcaption {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .search-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
  }
  .search-links a {
    font-family: var(--font-mono);
    font-size: 12px;
    text-decoration: none;
    color: var(--ink);
    background: var(--surface-sunken);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 13px;
    transition: border-color 0.15s ease, color 0.15s ease;
  }
  .search-links a:hover { border-color: var(--accent); color: var(--accent-strong); }

  /* Full-width like every other block (main's .wrap) — footer used to set
     its own max-width here, which shrank the whole element (including its
     centered .wrap child) down to that width and left it stuck at the
     left edge of the viewport instead of sharing the page's centered
     content column. */
  footer {
    padding: 28px 0 56px;
    color: var(--ink-muted);
    font-size: 12.5px;
  }
  footer p { margin: 0 0 10px; }

  ::selection { background: var(--accent); color: var(--on-accent); }

  /* ---------- navigation ---------- */

  nav.topbar {
    background: var(--surface-raised);
    border-bottom: 1px solid var(--line);
  }
  nav.topbar .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
    max-width: 940px;
  }
  .brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    font-size: 16px;
    text-decoration: none;
    color: var(--ink);
  }
  .brand-mark { flex: none; display: block; }
  .nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 13px;
  }
  .nav-links a {
    color: var(--ink-muted);
    text-decoration: none;
  }
  .nav-links a:hover { color: var(--accent-strong); }
  .nav-links form { margin: 0; }
  .nav-links button.linklike {
    font: inherit;
    color: var(--ink-muted);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }
  .nav-links button.linklike:hover { color: var(--accent-strong); }

  /* ---------- quota badge ---------- */

  .quota-badge {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    padding: 5px 11px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 20px;
  }
  .quota-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
  .quota-badge.quota-good { background: var(--good-bg); color: var(--good); }
  .quota-badge.quota-good::before { background: var(--good); }
  .quota-badge.quota-warn { background: var(--warn-bg); color: var(--warn); }
  .quota-badge.quota-warn::before { background: var(--warn); }
  .quota-badge.quota-critical { background: var(--critical-bg); color: var(--critical); }
  .quota-badge.quota-critical::before { background: var(--critical); }

  /* ---------- buttons ---------- */

  .btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 9px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  }
  .btn:disabled { cursor: not-allowed; opacity: 0.65; filter: none; }
  .field input:disabled { opacity: 0.65; cursor: not-allowed; }
  .btn-primary {
    background: var(--accent);
    color: var(--on-accent);
  }
  .btn-primary:hover { filter: brightness(1.06); }
  .btn-secondary {
    background: var(--surface-raised);
    color: var(--ink);
    border-color: var(--line-strong);
  }
  .btn-secondary:hover { border-color: var(--accent); color: var(--accent-strong); }

  /* ---------- forms (auth pages) ---------- */

  .auth-wrap {
    max-width: 420px;
    margin: 64px auto;
    padding: 0 24px;
  }
  .auth-card {
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 30px 28px;
  }
  .auth-card h1 {
    font-size: 22px;
    margin: 0 0 6px;
  }
  .auth-card .auth-sub {
    color: var(--ink-muted);
    font-size: 13.5px;
    margin: 0 0 22px;
  }
  .field { margin-bottom: 16px; }
  .field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 6px;
  }
  .field input {
    width: 100%;
    font-family: var(--font-body);
    font-size: 14.5px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink);
  }
  .field input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
  }
  .field .help-text {
    font-size: 11.5px;
    color: var(--ink-muted);
    margin-top: 4px;
  }
  .field .errorlist {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    color: var(--critical);
    font-size: 12px;
  }
  .form-errors {
    background: var(--critical-bg);
    color: var(--critical);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
  }
  .auth-card .btn { width: 100%; margin-top: 6px; }
  .auth-switch {
    margin-top: 20px;
    font-size: 13px;
    color: var(--ink-muted);
    text-align: center;
  }

  /* ---------- messages ---------- */
  /* Level-specific coloring (2026-09-14): li.{{ message.tags }} in
     base.html carries Django's own message level name ("success",
     "error", "warning", "info", "debug") — used for the payment
     success/failure banners (see billing/services.py:
     payment_return_messages) so a successful payment reads as
     unmistakably different from a failed one at a glance, not just by
     the text. Falls back to the neutral --info look for anything else
     (debug, or a plain messages.info() call). */

  .messages { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
  .messages li {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    background: var(--info-bg);
    color: var(--info);
  }
  .messages li.success { background: var(--good-bg); color: var(--good); }
  .messages li.error { background: var(--critical-bg); color: var(--critical); }
  .messages li.warning { background: var(--warn-bg); color: var(--warn); }

  /* ---------- home page: tool grid ---------- */

  .tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
  }
  .tool-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-top: 3px solid var(--card-accent, var(--accent));
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 22px 22px 24px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  }
  .tool-card:hover {
    border-color: var(--line);
    border-top-color: var(--card-accent, var(--accent));
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(14, 14, 18, 0.08);
  }
  /* Each card gets its own bright accent (see home.html) — the whole
     point of a "44tools" tool grid is that all four are visible at once,
     so this can't rely on the page-level theme-* override used elsewhere
     (that would make every card the same color). */
  .tool-card.tool-card--stock { --card-accent: var(--tool-stock); --card-accent-strong: var(--tool-stock); --card-tint: var(--tool-stock-tint); }
  .tool-card.tool-card--texts { --card-accent: var(--tool-texts); --card-accent-strong: var(--tool-texts); --card-tint: var(--tool-texts-tint); }
  .tool-card.tool-card--checker { --card-accent: var(--tool-checker); --card-accent-strong: var(--tool-checker); --card-tint: var(--tool-checker-tint); }
  .tool-card.tool-card--malware { --card-accent: var(--tool-malware); --card-accent-strong: var(--tool-malware); --card-tint: var(--tool-malware-tint); }
  .tool-card.tool-card--availability { --card-accent: var(--tool-availability); --card-accent-strong: var(--tool-availability); --card-tint: var(--tool-availability-tint); }
  .tool-card.tool-card--law { --card-accent: var(--tool-law); --card-accent-strong: var(--tool-law); --card-tint: var(--tool-law-tint); }
  .tool-card.tool-card--ads { --card-accent: var(--tool-ads); --card-accent-strong: var(--tool-ads); --card-tint: var(--tool-ads-tint); }
  .tool-card.tool-card--site { --card-accent: var(--tool-site); --card-accent-strong: var(--tool-site); --card-tint: var(--tool-site-tint); }
  .tool-card .tool-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--card-accent, var(--accent));
    color: var(--on-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
  }
  .tool-card .tool-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    color: var(--ink);
  }
  .tool-card .tool-desc {
    font-size: 13px;
    color: var(--ink-muted);
    line-height: 1.5;
    flex: 1;
  }
  .tool-card .tool-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--card-accent-strong, var(--accent-strong));
  }
  .tool-card .tool-cta svg { transition: transform 0.15s ease; }
  .tool-card:hover .tool-cta svg { transform: translateX(3px); }

  /* ---------- account / billing page ---------- */

  .account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
  }
  .stat-card {
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 20px 22px;
  }
  .stat-card .stat-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 10px;
  }
  .stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 600;
    color: var(--ink);
  }
  .stat-card .stat-sub {
    font-size: 12.5px;
    color: var(--ink-muted);
    margin-top: 6px;
  }
  .plan-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    padding: 4px 10px;
    border-radius: 999px;
    margin-top: 8px;
  }
  .plan-pill.free { background: var(--info-bg); color: var(--info); }
  .plan-pill.paid { background: var(--good-bg); color: var(--good); }

  table.payments-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
  }
  table.payments-table th, table.payments-table td {
    text-align: left;
    padding: 10px 4px;
    border-top: 1px solid var(--line);
  }
  table.payments-table th {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    font-weight: 500;
  }
  table.payments-table td.status-succeeded { color: var(--good); }
  table.payments-table td.status-pending { color: var(--warn); }
  table.payments-table td.status-canceled { color: var(--critical); }

  /* ---------- stock-photo checker ---------- */

  .scan-form {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin: 20px 0 14px;
  }
  .scan-form .field { flex: 1 1 320px; margin-bottom: 0; }
  .scan-form .btn { flex: none; height: 42px; }

  /* ---------- stockcheck index: sales blocks (2026-09) ----------
     Small icon-card / step components for the "how it works" and
     example-finding blocks on stockcheck's index.html (the site's de
     facto homepage). Deliberately reuse the same visual vocabulary as
     .tool-card/.tool-icon (icon-in-colored-square, card with
     border+shadow) rather than inventing a new style, so the page still
     feels like the rest of the site. */
  .step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 6px 0 4px;
  }
  .step { display: flex; flex-direction: column; gap: 8px; }
  .step .step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    flex: none;
  }
  .step .step-title { font-weight: 600; font-size: 13.5px; color: var(--ink); }
  .step .step-desc { font-size: 12.5px; color: var(--ink-muted); line-height: 1.5; }

  /* Stand-in for .stock-thumb in the illustrative "example finding" card
     on stockcheck's index.html — same footprint, but an icon instead of
     a real (or fake) photo, since that card isn't a real scan result. */
  .stock-thumb-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface-sunken);
    color: var(--ink-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
  }

  /* ---------- scan progress (stockcheck/textcheck submit feedback) ---------- */
  /* Injected by static/js/scan-progress.js on form submit. There's no real
     percentage to report — the check is one synchronous request, the
     server doesn't stream progress — so the fill eases toward ~92% and
     sits there (the page navigating away to the report *is* the "100%",
     there's nothing left to animate once that happens); the rotating
     caption underneath is what actually carries information about what's
     happening. */
  .scan-progress {
    margin: 16px 0 4px;
    animation: reveal 0.25s ease forwards;
  }
  .scan-progress-bar {
    height: 7px;
    border-radius: 999px;
    background: var(--surface-sunken);
    border: 1px solid var(--line);
    overflow: hidden;
  }
  .scan-progress-fill {
    height: 100%;
    width: 6%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    transition: width 0.5s ease;
  }
  .scan-progress-text {
    margin: 9px 0 0;
    font-size: 12.5px;
    color: var(--ink-muted);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .scan-progress-text::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex: none;
    animation: scan-progress-pulse 1.1s ease-in-out infinite;
  }
  @keyframes scan-progress-pulse {
    0%, 100% { opacity: 0.35; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1); }
  }
  @media (prefers-reduced-motion: reduce) {
    .scan-progress-text::before { animation: none; opacity: 1; }
  }

  .stock-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    flex: none;
  }

  .paywall {
    margin-top: 18px;
    padding: 22px;
    border-radius: 16px;
    border: 1px dashed var(--line-strong);
    background: var(--surface);
    text-align: center;
  }
  .paywall p { margin: 0 0 14px; color: var(--ink-muted); font-size: 13.5px; }
  .paywall .price { font-weight: 700; color: var(--ink); }
  .paywall-pdf {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--surface-sunken);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 600;
  }
  .paywall-pdf svg { flex: none; color: var(--accent); }

  .full-scan-offer { margin-top: 18px; padding: 22px; border-radius: 16px; border: 1px dashed var(--line-strong); background: var(--surface); }
  .full-scan-offer .paywall-pdf { display: inline-flex; }
  .full-scan-form { margin-top: 4px; }
  .full-scan-form .field { max-width: 360px; margin-bottom: 14px; }
  .full-scan-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
  .full-scan-buttons .btn { flex: 1 1 260px; text-align: center; }
  .disclaimer-notes { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
  .disclaimer-notes p { margin: 0 0 8px; color: var(--ink-muted); font-size: 12.5px; line-height: 1.5; }
  .disclaimer-notes p:last-child { margin-bottom: 0; }
  .disclaimer-notes code { font-family: var(--font-mono); font-size: 12px; }

  .package-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 4px 0 0;
  }
  .package-grid form { margin: 0; }

  /* ---------- legal pages (policy/oferta/requisites text, footer links,
     cookie banner, registration consent checkbox) ---------- */

  .legal-doc { font-size: 14px; line-height: 1.6; color: var(--ink); }
  .legal-doc h2 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    margin: 26px 0 10px;
  }
  .legal-doc h2:first-child { margin-top: 0; }
  .legal-doc p { margin: 0 0 12px; }
  .legal-doc ul, .legal-doc ol { margin: 0 0 12px; padding-left: 22px; }
  .legal-doc li { margin: 0 0 6px; }
  .legal-doc .legal-updated {
    color: var(--ink-muted);
    font-size: 12.5px;
    margin: 0 0 20px;
  }

  .legal-consent-note {
    margin: 12px 0 0;
    color: var(--ink-muted);
    font-size: 12px;
  }
  .legal-consent-note a { color: var(--ink-muted); text-decoration: underline; }
  .legal-consent-note a:hover { color: var(--accent); }

  .consent-field {
    display: flex;
    align-items: flex-start;
    gap: 9px;
  }
  .consent-field input[type="checkbox"] {
    margin: 3px 0 0;
    flex: none;
    width: 16px;
    height: 16px;
  }
  .consent-field label {
    font-size: 12.5px;
    color: var(--ink-muted);
    font-weight: 400;
  }
  .consent-field label a { color: var(--ink); text-decoration: underline; }
  .consent-field label a:hover { color: var(--accent); }
  .consent-field .errorlist { color: var(--critical); font-size: 12px; margin: 6px 0 0; padding: 0; list-style: none; }

  footer .footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
  }
  footer .footer-legal-links a { color: var(--ink-muted); }
  footer .footer-legal-links a:hover { color: var(--accent); }

  /* [hidden] on its own would be enough (it's the browser's built-in
     "display: none"), but an author stylesheet rule always wins over that
     built-in rule regardless of specificity — so .cookie-banner's own
     "display: flex" below silently cancelled it out, and toggling the
     `hidden` attribute in JS (see templates/base.html) had no visible
     effect at all. This explicit override is what actually hides it. */
  .cookie-banner[hidden] { display: none; }

  .cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 50;
    max-width: 640px;
    margin: 0 auto;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface-raised);
    box-shadow: 0 8px 28px rgba(14, 14, 18, 0.18);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
  }
  .cookie-banner p {
    margin: 0;
    flex: 1 1 320px;
    font-size: 12.5px;
    color: var(--ink-muted);
  }
  .cookie-banner p a { color: var(--ink); text-decoration: underline; }
  .cookie-banner .btn { flex: none; }
  .hero-offer {
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--ink-muted);
  }
  .hero-offer a { color: var(--accent); text-decoration: underline; }
  /* Honeypot в форме регистрации. Намеренно НЕ display:none: часть ботов
     пропускает поля, скрытые через CSS-свойство display, но заполняет те,
     что просто уведены за пределы экрана. */
  .hp-field {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: none;
  }

  /* ---------- mobile ---------- */

  @media (max-width: 680px) {
    .wrap { padding: 0 16px; }

    nav.topbar .wrap {
      flex-wrap: wrap;
      row-gap: 10px;
      padding-top: 12px;
      padding-bottom: 12px;
    }
    .nav-links {
      flex-wrap: wrap;
      row-gap: 8px;
      font-size: 12.5px;
      width: 100%;
    }

    header.hero { padding: 36px 0 28px; }
    h1 { font-size: clamp(23px, 6vw, 30px); }

    .dropzone {
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
      padding: 18px;
    }

    .scan-form { flex-direction: column; align-items: stretch; }
    .scan-form .field { flex: 1 1 auto; }
    .scan-form .btn { width: 100%; }

    /* Prevents iOS Safari's automatic zoom-on-focus, which otherwise
       triggers on any text input styled below 16px. */
    .field input, .scan-form input { font-size: 16px; }

    .summary { padding: 14px 16px; gap: 8px 10px; }
    .exhibit-head {
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
      padding: 13px 16px;
    }
    .exhibit-body { padding: 14px 16px 18px; }

    .tabs { gap: 6px; }
    .tab { padding: 7px 14px; font-size: 12.5px; }

    .compare-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }

    table.meta-table td:first-child { white-space: normal; padding-right: 10px; }

    .tool-grid, .account-grid, .step-grid { gap: 14px; }
    .tool-card { padding: 18px 18px 20px; }

    .auth-wrap { margin: 32px auto; padding: 0 16px; }
    .auth-card { padding: 22px 18px; }

    footer { padding: 22px 0 40px; }

    .cookie-banner { left: 10px; right: 10px; bottom: 10px; padding: 14px; }
    .cookie-banner .btn { width: 100%; }
  }

  /* ---------- full-scan "processing" popup (native <dialog>) ---------- */
  /* Shown once, right after a successful full-site-scan payment — see
     stockcheck/templates/stockcheck/_full_scan_offer.html. Uses the
     native <dialog> element rather than a hand-rolled overlay div: it
     gets a real backdrop, Esc-to-close, and focus trapping for free. */

  .full-scan-popup {
    max-width: 440px;
    width: calc(100% - 32px);
    margin: auto;
    padding: 22px 22px 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-raised);
    color: var(--ink);
    box-shadow: 0 16px 48px rgba(14, 14, 18, 0.24);
  }
  .full-scan-popup::backdrop {
    background: rgba(14, 14, 18, 0.5);
  }
  .full-scan-popup form:first-child {
    display: flex;
    justify-content: flex-end;
    margin: -6px -6px 4px 0;
  }
  .full-scan-popup .popup-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: var(--ink-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
  }
  .full-scan-popup .popup-close:hover { color: var(--ink); background: var(--surface-sunken); }
  .full-scan-popup .lede { margin: 0 0 16px; }
  .full-scan-popup form:last-child { display: flex; justify-content: flex-end; }

  /* ---------- adcheck: multi-field form (text + images + video) ----------
     The other tools' .scan-form is a one-line "URL + button" row; the ad
     check needs a stacked form, so it gets its own modifier rather than
     changing .scan-form for everyone. */
  .scan-form.ad-form {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-width: 760px;
  }
  .scan-form.ad-form .field { flex: none; margin-bottom: 16px; }
  .scan-form.ad-form .btn { align-self: flex-start; }
  .ad-form .field-row { display: flex; gap: 16px; flex-wrap: wrap; }
  .ad-form .field-row .field { flex: 1 1 260px; }
  .ad-form textarea,
  .ad-form select,
  .ad-form input[type="file"] {
    width: 100%;
    font-family: var(--font-body);
    font-size: 14.5px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink);
  }
  .ad-form textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
  .ad-form input[type="file"] { padding: 8px 10px; font-size: 13px; }
  .ad-form textarea:focus,
  .ad-form select:focus,
  .ad-form input[type="file"]:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
  }
  .ad-read-segment { margin: 0 0 14px; }
  .ad-read-segment .fdetail { white-space: pre-wrap; font-family: var(--font-mono); font-size: 12px; }
  @media (max-width: 640px) {
    .ad-form textarea, .ad-form select { font-size: 16px; }
    .scan-form.ad-form .btn { align-self: stretch; }
  }

  /* =====================================================================
     2026-11 redesign layer. Appended last so it wins over the older rules
     above without rewriting each of them; class names are unchanged, so
     every existing template picks the new look up as-is.
     ===================================================================== */

  body { font-size: 15.5px; line-height: 1.55; }
  .wrap { max-width: 1080px; }
  ::selection { background: var(--tool-tint); color: var(--ink); }
  a { color: var(--accent); }
  a:hover { color: var(--accent-strong); }
  a:focus-visible, button:focus-visible, label:focus-within, input:focus-visible,
  select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .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;
  }

  /* ---------- site header + dark tool nav (templates/base.html) ---------- */
  .site-header { max-width: 1240px; margin: 0 auto; padding: 18px 20px 0; }
  .site-header-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px 20px; flex-wrap: wrap;
  }
  .site-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
  .site-brand:hover { color: var(--ink); }
  .site-brand-mark {
    width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
  }
  .site-brand-name { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
  .header-links { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; font-size: 14px; }
  .header-links > a:not(.btn), .header-links .linklike {
    color: var(--ink); text-decoration: none; font-weight: 500;
    font: inherit; font-weight: 500; background: none; border: 0; padding: 0; cursor: pointer;
  }
  .header-links > a:not(.btn):hover, .header-links .linklike:hover { color: var(--accent); }
  .header-links form { margin: 0; }
  .header-links .header-email { color: var(--ink-muted); }
  .header-links .btn { padding: 9px 16px; font-size: 14px; border-radius: 10px; }

  .tool-nav {
    margin-top: 16px; background: var(--nav-bg); border-radius: 16px; padding: 6px 8px;
    display: flex; flex-wrap: wrap; gap: 2px; align-items: center;
  }
  .tool-nav a {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 10px;
    color: var(--nav-ink); font-size: 14px; font-weight: 500; text-decoration: none;
  }
  .tool-nav a::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--dot, var(--nav-ink));
  }
  .tool-nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
  .tool-nav a[aria-current="page"] { background: #fff; color: var(--ink); font-weight: 700; }
  .tool-nav a[aria-current="page"]::before { background: var(--dot-on-light, var(--ink)); }

  /* ---------- hero ---------- */
  header.hero { background: var(--surface); border-bottom: 0; padding: 56px 0 28px; }
  header.hero > .wrap { text-align: center; }
  header.hero > .wrap > * { margin-left: auto; margin-right: auto; }
  .eyebrow {
    display: inline-flex; gap: 8px; align-items: center;
    padding: 7px 14px; border-radius: 999px; background: var(--tool-tint); color: var(--tool);
    font-family: var(--font-body); font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none;
  }
  .eyebrow::before { width: 8px; height: 8px; background: var(--tool); }
  h1 {
    font-family: var(--font-display); font-weight: 800; letter-spacing: -0.025em;
    font-size: clamp(30px, 4.6vw, 52px); line-height: 1.08; margin: 20px auto 16px; max-width: 880px;
  }
  .hero-sub { font-size: 17px; line-height: 1.55; max-width: 700px; margin: 0 auto 18px; }
  header.hero .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-details {
    max-width: 760px; margin: 0 auto 18px; text-align: left; background: var(--surface-sunken);
    border-radius: 16px; padding: 14px 18px;
  }
  .hero-details[open] { padding-bottom: 4px; }
  .hero-details .hero-sub { font-size: 15px; margin: 12px 0; max-width: none; }
  header.hero .exhibit, header.hero .privacy-note, header.hero .dropzone, header.hero .messages {
    max-width: 760px; text-align: left;
  }
  header.hero .privacy-note { margin: 12px auto 0; }

  /* one-line URL form: a white pill card with a big input and the button */
  .scan-form {
    max-width: 760px; margin: 28px auto 14px; padding: 10px; gap: 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
    box-shadow: var(--shadow-lg); align-items: center; text-align: left;
  }
  .scan-form:not(.ad-form) .field label {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .scan-form:not(.ad-form) .field input {
    border: 0; min-height: 54px; font-size: 17px; padding: 0 14px; background: transparent;
  }
  .scan-form:not(.ad-form) .field input:focus { outline: none; }
  .scan-form:not(.ad-form):focus-within { border-color: var(--accent); }
  .scan-form:not(.ad-form) .field .help-text { padding: 0 14px 6px; }
  .scan-form:not(.ad-form) .field .errorlist { padding: 0 14px 6px; }
  .scan-form .btn { height: 54px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
  .scan-form .form-errors { flex-basis: 100%; }

  /* ad check: the stacked form is the card itself */
  .scan-form.ad-form { padding: 22px; border-radius: 22px; align-items: stretch; }
  .scan-form.ad-form .btn { align-self: flex-start; }
  .ad-form textarea, .ad-form select, .ad-form input[type="file"] { border-radius: 14px; border: 1.5px solid var(--line-strong); }
  .ad-form input[type="file"] { background: var(--surface-soft); border-style: dashed; padding: 14px; }

  /* ---------- buttons, fields ---------- */
  .btn { font-weight: 500; font-size: 15px; border-radius: 12px; padding: 12px 22px; }
  .btn-primary { background: var(--accent); color: var(--on-accent); }
  .btn-primary:hover { background: var(--accent-strong); filter: none; color: var(--on-accent); }
  .btn-secondary { border: 1px solid var(--line-strong); color: var(--ink); }
  .btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
  .field label { font-size: 14px; font-weight: 500; }
  .field input, .field select, .field textarea {
    border-radius: 12px; border: 1.5px solid var(--line-strong); padding: 12px 14px; font-size: 15px;
  }
  .field .help-text { font-size: 13px; }
  .form-errors, .messages li { border-radius: 12px; }

  /* ---------- cards: exhibit, summary, findings ---------- */
  main { padding-bottom: 24px; }
  .exhibit { border-radius: 20px; border-color: var(--line); box-shadow: var(--shadow); }
  .exhibit-head { padding: 18px 22px; }
  .exhibit-label { font-family: var(--font-body); font-size: 12px; letter-spacing: 0.04em; font-weight: 500; }
  .exhibit-title { font-size: 18px; font-weight: 700; }
  .exhibit-title svg { color: var(--tool); }
  .exhibit-body { padding: 20px 22px 24px; }
  .exhibit-body > p.lede { font-size: 14.5px; }

  .summary { border-radius: 20px; padding: 18px 22px; }
  .chip { font-family: var(--font-body); font-size: 13px; padding: 6px 12px; }
  .chip.info { background: var(--surface-sunken); color: var(--ink); }
  .chip.info::before { background: var(--ink-muted); }

  .finding { gap: 14px; padding: 16px 0; }
  .finding .stripe {
    width: 30px; height: 30px; border-radius: 10px; align-self: flex-start;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15px; line-height: 1;
  }
  .finding.critical .stripe { background: var(--critical-bg); color: var(--critical); }
  .finding.warn .stripe { background: var(--warn-bg); color: var(--warn); }
  .finding.good .stripe { background: var(--good-bg); color: var(--good); }
  .finding.info .stripe { background: var(--info-bg); color: var(--info); }
  .finding.critical .stripe::after { content: "!"; }
  .finding.warn .stripe::after { content: "?"; }
  .finding.good .stripe::after { content: "✓"; }
  .finding.info .stripe::after { content: "i"; }
  .finding .ftitle, .finding.critical .ftitle, .finding.warn .ftitle, .finding.good .ftitle {
    color: var(--ink); font-size: 15.5px; font-weight: 700; margin-bottom: 4px;
  }
  .finding .fdetail { font-size: 14px; line-height: 1.55; }

  .paywall {
    border: 0; border-radius: 20px; background: var(--surface-sunken); padding: 26px;
  }
  .paywall p { font-size: 14.5px; }
  .paywall .price { font-size: 22px; font-weight: 800; color: var(--ink); }

  .quota-badge {
    font-family: var(--font-body); font-size: 13px; padding: 6px 12px;
    background: var(--surface-sunken); color: var(--ink);
  }
  .quota-badge::before { background: var(--tool); }

  /* how-it-works steps on tool pages */
  .step .step-num {
    width: 34px; height: 34px; border-radius: 10px; background: var(--tool-tint); color: var(--tool);
    border: 0; font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  }
  .dropzone {
    border-radius: 22px; border: 2px dashed var(--line-strong); background: var(--surface-soft);
  }
  .dropzone svg { color: var(--tool); }

  /* ---------- home: tool cards, filter, mission ---------- */
  .home-section { margin: 40px 0 0; }
  .home-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
  .home-section-head h2 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
  .home-section-head p { margin: 0; color: var(--ink-muted); font-size: 14.5px; }
  .tool-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 20px; }
  .tool-filter button {
    min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong);
    background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  }
  .tool-filter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

  .tool-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
  .tool-card {
    border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: 20px;
    padding: 24px; gap: 12px; min-height: 230px;
  }
  .tool-card:hover { border-top-color: var(--line); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
  .tool-card .tool-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
  .tool-card .tool-icon {
    width: 54px; height: 54px; border-radius: 16px; background: var(--card-tint); color: var(--card-accent);
  }
  .tool-card .tool-tag {
    font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px;
    background: var(--card-tint); color: var(--card-accent);
  }
  .tool-card .tool-title { font-size: 20px; font-weight: 700; line-height: 1.2; }
  .tool-card .tool-desc { font-size: 14.5px; line-height: 1.55; }
  .tool-card .tool-cta { font-size: 14px; font-weight: 500; color: var(--card-accent); }
  .tool-card[hidden] { display: none; }

  .mission {
    margin: 24px 0 0; border-radius: 26px; padding: 44px; color: #fff;
    background: var(--dark-card); background-image: radial-gradient(90% 120% at 100% 0%, #7a3a2e 0%, rgba(46, 34, 34, 0) 55%);
    display: flex; gap: 36px; flex-wrap: wrap; align-items: flex-start;
  }
  .mission-text { flex: 1 1 400px; display: flex; flex-direction: column; gap: 14px; }
  .mission-kicker { font-size: 14px; font-weight: 500; color: var(--nav-ink); }
  .mission h2 { margin: 0; font-size: 38px; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
  .mission-text p { margin: 0; font-size: 16.5px; line-height: 1.6; color: #e7d6d0; }
  .mission-values { flex: 1 1 420px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
  .mission-value {
    border-radius: 18px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.10);
    padding: 22px; display: flex; flex-direction: column; gap: 8px;
  }
  .mission-value svg { color: #f08c76; }
  .mission-value strong { font-size: 17px; }
  .mission-value span { font-size: 14px; line-height: 1.55; color: #e7d6d0; }

  .included {
    margin: 24px 0 0; background: var(--surface-sunken); border-radius: 22px; padding: 28px;
    display: flex; gap: 24px; flex-wrap: wrap; align-items: stretch;
  }
  .included-head {
    flex: 1 1 200px; background: var(--surface); border-radius: 16px; padding: 22px; min-height: 140px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
    font-size: 22px; font-weight: 700; line-height: 1.2;
  }
  .included-head svg { color: var(--accent); }
  .included-items { flex: 3 1 560px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 22px; align-content: center; }
  .included-items div { display: flex; flex-direction: column; gap: 6px; }
  .included-items strong { font-size: 15px; }
  .included-items span { font-size: 14px; line-height: 1.5; color: var(--ink-muted); }

  /* ---------- account ---------- */
  .stat-card { border: 0; box-shadow: none; background: var(--surface-sunken); border-radius: 20px; padding: 24px; }
  .stat-card .stat-label { font-family: var(--font-body); font-size: 14px; letter-spacing: 0; text-transform: none; font-weight: 500; }
  .stat-card .stat-value { font-size: 28px; font-weight: 800; }
  .plan-pill { font-family: var(--font-body); font-size: 13px; background: var(--surface); }
  table.payments-table { font-size: 14px; }
  table.payments-table th {
    font-family: var(--font-body); font-size: 13px; letter-spacing: 0; text-transform: none;
    background: var(--surface-soft); padding: 12px 10px;
  }
  table.payments-table td { padding: 14px 10px; }

  /* ---------- auth, footer, misc ---------- */
  .auth-card { border-radius: 22px; box-shadow: var(--shadow-lg); padding: 32px 30px; }
  .auth-card h1 { font-size: 26px; text-align: left; margin: 0 0 8px; }
  footer { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 24px; font-size: 13px; }
  .cookie-banner { border-radius: 18px; box-shadow: var(--shadow-lg); }

  .scan-form input, .scan-form textarea { text-align: left; }

  @media (max-width: 680px) {
    .site-header { padding: 14px 14px 0; }
    /* one swipeable row instead of three wrapped ones on a phone */
    .tool-nav {
      padding: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }
    .tool-nav::-webkit-scrollbar { display: none; }
    .tool-nav a { padding: 9px 10px; font-size: 13px; white-space: nowrap; flex: none; }
    header.hero { padding: 36px 0 20px; }
    .hero-sub { font-size: 16px; }
    .scan-form { padding: 8px; border-radius: 18px; }
    .scan-form .btn { width: 100%; }
    .home-section-head h2 { font-size: 26px; }
    .mission { padding: 26px; }
    .mission h2 { font-size: 28px; }
    .included { padding: 18px; }
  }

/* ---------- Articles (seo/articles.py, templates/seo/) ---------- */
.article-doc { font-size: 15px; line-height: 1.65; max-width: 760px; }
.article-doc h2 { font-size: 19px; margin-top: 30px; }
.article-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: 14px;
}
.article-doc th, .article-doc td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.article-doc th { background: var(--surface-sunken); font-weight: 600; }
.article-doc blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: var(--surface-soft);
  border-left: 3px solid var(--tool, var(--accent));
  font-size: 14px;
}
.article-note {
  padding: 10px 14px;
  background: var(--surface-sunken);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}
.article-cta {
  margin: 28px 0 18px;
  padding: 18px 20px;
  background: var(--tool-tint, var(--surface-sunken));
  border-radius: 12px;
}
.article-cta p { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-muted); }
.article-disclaimer { font-size: 12.5px; color: var(--ink-muted); }
.article-sources { font-size: 13px; color: var(--ink-muted); }
.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.article-list li:first-child { border-top: none; }
.article-list a { font-weight: 500; }
.article-list-desc { display: block; margin-top: 3px; font-size: 13px; color: var(--ink-muted); }
.hero .eyebrow a { color: inherit; text-decoration: none; }
.hero .eyebrow a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .article-doc table { display: block; overflow-x: auto; }
}
