
  /* Dark is the base and light lives in the media query, matching app/guides.py.
     branding.js overwrites bg/panel/border/text/muted/accent at runtime; everything
     below derives from those. Before this the page had no light palette at all and
     rendered dark until branding.js resolved. */
  :root {
    --bg:#0f1115; --panel:#181b22; --panel-2:#1f232c; --border:#2a2f3a; --text:#e7eaf0;
    --muted:#9aa3b2; --accent:#4f8cff; --bad:#e5534b; --good:#57ab5a; --warn:#d4a72c;
    --header-bg: rgba(15,17,21,.84); --tint: rgba(255,255,255,.02);
    --shadow: 0 20px 50px rgba(0,0,0,.45);
  }
  @media (prefers-color-scheme: light) {
    :root {
      --bg:#f5f7fb; --panel:#ffffff; --panel-2:#eef2f7; --border:#dde1e8; --text:#1a1d24;
      --muted:#5b6472; --accent:#3b6fe0; --bad:#cb4036; --good:#268042; --warn:#94690f;
      --header-bg: rgba(255,255,255,.86); --tint: rgba(20,26,40,.022);
      --shadow: 0 18px 44px rgba(20,26,40,.10);
    }
  }
  /* Accent as small text fails 4.5:1 in light mode on every admin theme. Graphics
     keep the raw accent - they only need 3:1. */
  :root { --accent-text: var(--accent); }
  @media (prefers-color-scheme: light) {
    @supports (color: color-mix(in srgb, red, blue)) {
      :root { --accent-text: color-mix(in srgb, var(--accent) 70%, #000); }
    }
  }
  :root { --accent-2: #7c4dd6; }
  @supports (color: color-mix(in oklab, red, blue)) {
    :root { --accent-2: color-mix(in oklab, var(--accent) 58%, #8b5cf6); }
  }
  :root {
    --accent-08: color-mix(in srgb, var(--accent) 8%, transparent);
    --accent-12: color-mix(in srgb, var(--accent) 12%, transparent);
    --accent-20: color-mix(in srgb, var(--accent) 20%, transparent);
    --accent-30: color-mix(in srgb, var(--accent) 30%, transparent);
    --accent2-14: color-mix(in srgb, var(--accent-2) 14%, transparent);
    --good-14: color-mix(in srgb, var(--good) 14%, transparent);
  }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
         font: 16px/1.7 -apple-system, "Segoe UI", Roboto, sans-serif;
         background: var(--bg); color: var(--text); position: relative; }
  body::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 1100px; height: 440px; pointer-events: none; z-index: 0;
    background:
      radial-gradient(ellipse 42% 46% at 26% 32%, var(--accent2-14), transparent 70%),
      radial-gradient(ellipse 46% 50% at 74% 26%, var(--accent-20), transparent 72%);
  }
  a { color: var(--accent-text); }
  .wrap { max-width: 640px; margin: 0 auto; padding: 34px 20px 80px; flex: 1; display: flex; flex-direction: column; width: 100%; position: relative; z-index: 1; }
  .crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
  .crumbs a { color: var(--muted); }
  .eyebrow {
    display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; margin-bottom: 16px;
    padding: 6px 14px; border-radius: 100px; font-size: 13px; font-weight: 600;
    background: var(--accent-12); border: 1px solid var(--accent-30); color: var(--accent-text);
  }
  .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-14); }
  h1 { font-size: 30px; margin: 0 0 10px; letter-spacing: -.02em; }
  p.lead { color: var(--muted); margin: 0 0 28px; font-size: 17px; }
  /* Sits right under the lead, which already carries the bottom margin. */
  p.response-time { color: var(--muted); margin: -18px 0 28px; font-size: 15px; }
  .info-row { display: flex; gap: 8px; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
  .info-row strong { color: var(--text); font-weight: 600; min-width: 70px; }
  .info-row a { display: inline-block; min-height: 24px; }
  form {
    position: relative; overflow: hidden;
    background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
    padding: 26px; margin-top: 24px; box-shadow: var(--shadow);
  }
  form::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; pointer-events: none;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
  }
  label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
  input, textarea { background: var(--bg); color: var(--text); border: 1px solid var(--border);
                    border-radius: 9px; padding: 11px 13px; font-size: 14.5px; font-family: inherit;
                    transition: border-color .15s ease, box-shadow .15s ease; }
  input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-20); }
  textarea { resize: vertical; min-height: 110px; }
  button {
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: 0;
    border-radius: 9px; padding: 12px 26px; font-size: 14.5px; font-weight: 600; cursor: pointer;
    box-shadow: 0 8px 22px var(--accent-30);
    transition: transform .15s ease, box-shadow .15s ease;
  }
  button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 30px var(--accent-30); }
  button:disabled { opacity: .5; cursor: default; transform: none; }
  .msg { font-size: 14px; margin-top: 14px; }
  .msg.success { color: var(--good); }
  .msg.error { color: var(--bad); }
  /* <main> holds everything above the footer; a flex column like .wrap, so the page lays
     out exactly as it did when these were .wrap's own children. */
  main#main { display: flex; flex-direction: column; }
  footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
  footer a { color: var(--muted); margin-right: 12px; }
