
  /* Dark is the default (theme.py). The --serp-* tokens are this page's own, so unlike the
     core tokens theme.py cannot re-emit them: each one is set four times - base, the
     no-JavaScript media-query fallback, and both [data-theme] blocks - or a forced theme
     that disagrees with the OS would keep the wrong one (CLAUDE.md, light/dark). */
  :root { --bg:#0f1115; --panel:#181b22; --panel-2:#1f232c; --border:#2a2f3a;
          --text:#e7eaf0; --muted:#9aa3b2; --accent:#4f8cff;
          --good:#57ab5a; --warn:#d4a72c; --bad:#e5534b;
          --serp-bg:#202124; --serp-title:#99c3ff; --serp-url:#bdc1c6;
          --serp-text:#bdc1c6; --serp-site:#dadce0; --serp-cut:rgba(229,83,75,.28); }
  @media (prefers-color-scheme: light) {
    :root { --bg:#f6f7f9; --panel:#fff; --panel-2:#f1f3f7; --border:#dfe3ea;
            --text:#171a21; --muted:#5d6675;
            --serp-bg:#ffffff; --serp-title:#1a0dab; --serp-url:#4d5156;
            --serp-text:#4d5156; --serp-site:#202124; --serp-cut:rgba(203,64,54,.18); }
  }
  :root[data-theme="dark"] { --serp-bg:#202124; --serp-title:#99c3ff; --serp-url:#bdc1c6;
                             --serp-text:#bdc1c6; --serp-site:#dadce0; --serp-cut:rgba(229,83,75,.28); }
  :root[data-theme="light"] { --serp-bg:#ffffff; --serp-title:#1a0dab; --serp-url:#4d5156;
                              --serp-text:#4d5156; --serp-site:#202124; --serp-cut:rgba(203,64,54,.18); }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  body { margin:0; font: 16px/1.6 -apple-system, "Segoe UI", Roboto, sans-serif;
         background: var(--bg); color: var(--text); }
  .wrap { max-width: 920px; margin: 0 auto; padding: 30px 16px 70px; }
  h1 { font-size: 30px; line-height: 1.2; margin: 18px 0 8px; }
  h2 { font-size: 20px; margin: 0 0 4px; }
  .lede { color: var(--muted); margin: 0 0 24px; font-size: 17px; }
  a { color: var(--accent-text, var(--accent)); }

  form.main { display: grid; gap: 14px; background: var(--panel);
              border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
  .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  @media (max-width: 640px) { .row { grid-template-columns: 1fr; } }
  label { display: block; font-size: 13px; color: var(--muted); }
  label .opt { font-weight: 400; }
  input, textarea { width: 100%; margin-top: 5px; padding: 11px 12px; font: inherit; font-size: 15px;
                    border-radius: 8px; border: 1px solid var(--border);
                    background: var(--bg); color: var(--text); }
  textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
  .meter { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 13px;
           color: var(--muted); font-variant-numeric: tabular-nums; }
  .meter .ok { color: var(--good); }
  .meter .over { color: var(--bad); font-weight: 650; }
  .hint { color: var(--muted); font-size: 13px; margin: 6px 2px 0; }

  .warn { margin-top: 18px; padding: 12px 14px; border-radius: 10px; font-size: 14px;
          border: 1px solid var(--warn); background: var(--panel); }
  .warn strong { color: var(--warn); }

  .views { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 22px; }
  .card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
  .card .sub { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
  .serp { background: var(--serp-bg); border: 1px solid var(--border); border-radius: 10px;
          padding: 16px 18px; font-family: Arial, Helvetica, sans-serif; overflow: hidden; }
  /* On a phone the desktop result is wider than the screen: scroll it sideways rather
     than clip it, or the title would look cut earlier than Google cuts it. */
  .serp.desktop { overflow-x: auto; }
  .serp.desktop .inner { max-width: 600px; min-width: 600px; }
  .serp.mobile { max-width: 380px; }
  .serp .site { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
  .serp .fav { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--panel-2);
               border: 1px solid var(--border); display: grid; place-items: center;
               font-size: 12px; color: var(--serp-site); font-weight: 700; }
  .serp .sname { font-size: 14px; color: var(--serp-site); line-height: 20px; }
  .serp .crumb { font-size: 12px; color: var(--serp-url); line-height: 18px;
                 overflow-wrap: anywhere; }
  .serp .t { color: var(--serp-title); font-size: 20px; line-height: 26px; margin: 0 0 4px;
             font-weight: 400; overflow-wrap: anywhere; }
  .serp.desktop .t { white-space: nowrap; }
  .serp.mobile .t { font-size: 18px; line-height: 24px; }
  .serp .d { color: var(--serp-text); font-size: 14px; line-height: 22px; margin: 0;
             overflow-wrap: anywhere; }
  .serp mark { background: var(--serp-cut); color: inherit; border-radius: 2px; }
  .stats { margin: 12px 0 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .stats .over { color: var(--bad); font-weight: 650; }
  .stats .ok { color: var(--good); }

  .notes { margin-top: 22px; color: var(--muted); font-size: 14px; }
  .notes h2 { color: var(--text); font-size: 18px; margin-top: 18px; }
  .cta { margin-top: 28px; text-align: center; background: var(--panel-2);
         border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
  .cta h2 { margin: 0 0 6px; font-size: 19px; }
  .cta p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
  .cta a.btn { display: inline-block; background: var(--accent-btn, var(--accent)); color: #fff;
               text-decoration: none; font-weight: 650; padding: 12px 26px; border-radius: 9px; }
