/* codeteck — private support workbench. Plain CSS, no JavaScript. Light and dark follow the system.
   Layout: fixed sidebar with the tools + a content column; on phones the sidebar becomes a top bar. */

@font-face { font-family: "Plex Sans"; src: url("fonts/IBMPlexSans-var.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/IBMPlexMono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/IBMPlexMono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #f2f5f4;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --ink: #13201d;
  --muted: #5b6b67;
  --faint: #6d7c78;
  --line: #dde4e2;
  --accent: #0b6e69;
  --accent-soft: #e2f1ef;
  --accent-ink: #ffffff;
  --side-bg: #10201d;
  --side-ink: #c9dbd6;
  --side-muted: #7f9893;
  --side-active: #1d3632;
  --ok: #1c7a4a;   --ok-soft: #e3f3ea;
  --warn: #9a5800; --warn-soft: #fcefd9;
  --bad: #b42318;  --bad-soft: #fde8e6;
  --info: #2a6390; --info-soft: #e5eef6;
  --font: "Plex Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(16 32 29 / 0.05), 0 1px 1px rgb(16 32 29 / 0.03);
  --deco-dot: rgb(11 110 105 / 0.32);
  --deco-ring: rgb(11 110 105 / 0.12);
  --deco-glow: rgb(42 161 151 / 0.20);
  --deco-link: rgb(11 110 105 / 0.16);
  --deco-node: rgb(11 110 105 / 0.45);
  --deco-label: rgb(60 90 85 / 0.55);
  --deco-label-strong: rgb(11 110 105 / 0.75);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1412; --surface: #131e1b; --surface-2: #17241f; --ink: #e1ebe8; --muted: #92a6a0; --faint: #82968f;
    --line: #22322e; --accent: #4fc1b6; --accent-soft: #15302c; --accent-ink: #071311;
    --side-bg: #08100e; --side-ink: #c9dbd6; --side-muted: #6f8780; --side-active: #15302c;
    --ok: #63d197; --ok-soft: #12291d; --warn: #f2b45a; --warn-soft: #2e2210; --bad: #ff8b7e; --bad-soft: #351714;
    --info: #7db8e8; --info-soft: #132433;
    --shadow: none;
    --deco-dot: rgb(79 193 182 / 0.26);
    --deco-ring: rgb(79 193 182 / 0.12);
    --deco-glow: rgb(79 193 182 / 0.13);
    --deco-link: rgb(79 193 182 / 0.14);
    --deco-node: rgb(79 193 182 / 0.45);
    --deco-label: rgb(146 166 160 / 0.55);
    --deco-label-strong: rgb(79 193 182 / 0.75);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); font-feature-settings: "ss01"; }
a { color: var(--accent); text-underline-offset: 2px; }
h1 { font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h2 { font-size: 17px; font-weight: 600; margin: 0; }
h3 { font-size: 15px; font-weight: 600; margin: 0; }
p { margin: 0; }
code, pre, .mono { font-family: var(--mono); font-size: 0.88em; }
small { font-size: 12.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: no-preference) { a, button, .nav a { transition: background-color .15s, border-color .15s, color .15s; } }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side-bg); color: var(--side-ink); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; padding: 0 8px; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--mono); font-size: 13px; font-weight: 500; }
@media (prefers-color-scheme: light) { .brand-mark { background: #2aa197; color: #fff; } }
.nav { display: grid; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--side-muted); padding: 0 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--side-ink); text-decoration: none; font-size: 14px; }
.nav a:hover { background: var(--side-active); }
.nav a[aria-current="page"] { background: var(--side-active); color: #fff; box-shadow: inset 2px 0 0 #4fc1b6; }
.nav a.soon { color: var(--side-muted); }
.nav a.soon::after { content: "soon"; margin-left: auto; font-size: 10.5px; border: 1px solid #2c4540; border-radius: 99px; padding: 0 6px; }
.icon { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding: 0 8px; font-size: 13px; color: var(--side-muted); }
.side-foot button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; color: var(--side-ink); font-size: 13px; }
.side-foot button:hover { color: #fff; }
.menu-toggle, .menu-btn { display: none; }
.content { padding: 32px clamp(16px, 4vw, 44px) 64px; min-width: 0; }
.content-inner { max-width: 1120px; margin: 0 auto; display: grid; gap: 22px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0; padding: 12px 16px; }
  /* Menu button; the checkbox stays in the tab order (visually hidden) so the keyboard can open the menu too. */
  .menu-toggle { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 6px 12px; border: 1px solid #2c4540; border-radius: 8px; color: var(--side-ink); font-size: 14px; font-weight: 500; cursor: pointer; user-select: none; }
  .menu-btn:hover { background: var(--side-active); color: #fff; }
  .menu-toggle:focus-visible + .menu-btn { outline: 2px solid #4fc1b6; outline-offset: 2px; }
  .menu-btn .when-open, .menu-toggle:checked + .menu-btn .when-closed { display: none; }
  .menu-toggle:checked + .menu-btn .when-open { display: contents; }
  .menu-btn .when-closed { display: contents; }
  .nav, .side-foot { display: none; flex: 1 1 100%; }
  .menu-toggle:checked ~ .nav { display: grid; gap: 2px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #22322e; }
  .menu-toggle:checked ~ .side-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 12px 10px 4px; border-top: 1px solid #22322e; }
  .nav .nav-gap { margin-top: 10px; }
  .nav a { padding: 9px 10px; font-size: 15px; }
  .nav a.soon { display: none; }
  .content { padding-top: 22px; }
}

/* ---------------------------------------------------------------- background map (wide screens only)
   templates/backdrop.php: a network map of this server behind the content, fixed while scrolling.
   Tint follows the time of day (.tod-*), glow and pulse follow the SSL monitor (.state-*), packets move. */
.backdrop { display: none; }
@media (min-width: 861px) {
  .content { position: relative; isolation: isolate; }
  .backdrop { display: block; position: fixed; top: 0; right: 0; bottom: 0; left: 232px; z-index: -1; pointer-events: none; overflow: hidden;
    --bd-glow: rgb(42 161 151 / 0.20); --bd-ink: rgb(11 110 105); }
  .backdrop.tod-morning { --bd-glow: rgb(236 150 70 / 0.20); }
  .backdrop.tod-evening { --bd-glow: rgb(140 100 210 / 0.17); }
  .backdrop.tod-night   { --bd-glow: rgb(60 100 190 / 0.17); }
  .backdrop.state-warn  { --bd-glow: rgb(210 140 30 / 0.26); }
  .backdrop.state-bad   { --bd-glow: rgb(200 50 40 / 0.24); }
  .backdrop::before { content: ""; position: absolute; inset: 0;
    background:
      radial-gradient(ellipse 50% 48% at 100% 0%, var(--bd-glow), transparent 72%),
      radial-gradient(circle at 1px 1px, var(--deco-dot) 1px, transparent 1.6px) 0 0 / 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 80% 76% at 100% 0%, #000 15%, transparent 74%);
    mask-image: radial-gradient(ellipse 80% 76% at 100% 0%, #000 15%, transparent 74%); }
  .backdrop svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .bd-halo-in { stop-color: var(--bd-glow); }
  .bd-halo-out { stop-color: transparent; }
  .bd-orbits circle { fill: none; stroke: var(--deco-ring); stroke-width: 1; stroke-dasharray: 2 6; }
  .bd-links path { fill: none; stroke: var(--deco-link); stroke-width: 1.2; }
  .bd-node { fill: var(--bg); stroke: var(--deco-node); stroke-width: 1.5; }
  .backdrop text { font-family: var(--mono); font-size: 11px; fill: var(--deco-label); letter-spacing: 0.02em; }
  .bd-packet { fill: var(--accent); opacity: 0.75; }
  .bd-packet.warn { fill: var(--warn); }
  .bd-packet.bad { fill: var(--bad); }
  .bd-port { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
  .bd-port.warn { stroke: var(--warn); fill: var(--warn-soft); }
  .bd-port.bad { stroke: var(--bad); fill: var(--bad-soft); }
  .bd-hub rect { fill: var(--accent); opacity: 0.85; }
  .bd-hub.warn rect { fill: var(--warn); }
  .bd-hub.bad rect { fill: var(--bad); }
  .backdrop .bd-mark { font-size: 14px; font-weight: 500; fill: var(--accent-ink); }
  .bd-pulse circle { fill: none; stroke: var(--accent); stroke-width: 1.5; }
  .bd-pulse.warn circle { stroke: var(--warn); }
  .bd-pulse.bad circle { stroke: var(--bad); stroke-width: 2; }
  .bd-pulse circle { transform-box: fill-box; transform-origin: center; vector-effect: non-scaling-stroke; animation: bd-pulse 6s linear infinite; }
  .bd-pulse.fresh circle { animation: bd-pulse-fresh 2.6s linear infinite; }
  .backdrop .bd-caption { font-size: 12px; fill: var(--deco-label-strong); }
  .backdrop .bd-caption.sub { font-size: 10.5px; fill: var(--deco-label); }
  /* The map shows faintly through the boxes. */
  .card, .search, .tool-link, .stat, .result-hero, .paste, .item { background: color-mix(in srgb, var(--surface) 92%, transparent);
    -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
}
@media (min-width: 861px) and (prefers-reduced-motion: reduce) {
  .bd-packets, .bd-pulse { display: none; }
}

/* ---------------------------------------------------------------- page header & forms */
.page-head { display: grid; gap: 6px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.page-head p { color: var(--muted); max-width: 70ch; }

.search { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.search .field { display: grid; gap: 5px; min-width: 170px; }
.search .field.grow { flex: 1 1 280px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field-label small { font-weight: 400; color: var(--faint); }
input, textarea, select { font: inherit; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; background: var(--surface); }
.search input.big { font-size: 16px; font-family: var(--mono); }
/* Browser autofill paints its own light background; keep our colours so text never ends up white on white. */
input:-webkit-autofill, input:-webkit-autofill:hover, input:autofill {
  -webkit-text-fill-color: var(--ink); caret-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--surface-2) inset; transition: background-color 9999s ease-out 0s; }
input:-webkit-autofill:focus, input:autofill:focus { box-shadow: 0 0 0 1000px var(--surface) inset; }
.btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; border: 0; border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.btn:hover { filter: brightness(1.07); }
.btn .when-busy { display: none; }
.btn:focus:not(:focus-visible) .when-idle { display: none; }      /* clicked: shows "Checking…" until the page loads */
.btn:focus:not(:focus-visible) .when-busy { display: inline; }
.alert { background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 10px 14px; font-weight: 500; }

/* ---------------------------------------------------------------- login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: grid; gap: 18px; box-shadow: var(--shadow); }
.login .brand { color: var(--ink); padding: 0; }
.login form { display: grid; gap: 14px; }
.login label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.login .btn { width: 100%; margin-top: 4px; }
.login label.remember { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--ink); }
.login label.remember input { width: 16px; height: 16px; padding: 0; margin: 0; flex: none; accent-color: var(--accent); }
.login input[name="code"] { font-family: var(--mono); letter-spacing: 0.3em; font-size: 18px; }

/* ---------------------------------------------------------------- cards & small parts */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head .verdict { margin-left: auto; font-size: 13px; color: var(--muted); }
.card-body { padding: 16px 18px; display: grid; gap: 14px; }
.sub-head { font-size: 11.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint); }

.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.info { background: var(--info); } .dot.none { background: var(--faint); }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; border-radius: 99px; padding: 1px 9px; white-space: nowrap; line-height: 1.6; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.none { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

.copy { user-select: all; -webkit-user-select: all; cursor: text; font-family: var(--mono); font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.record { display: block; user-select: all; -webkit-user-select: all; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; color: var(--ink); }

/* definition rows */
.rows { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 18px; font-size: 14px; }
.rows > dt { color: var(--muted); font-size: 13px; padding: 8px 0; border-top: 1px solid var(--line); }
.rows > dd { margin: 0; padding: 8px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; min-width: 0; }
.rows > dt:first-of-type, .rows > dd:first-of-type { border-top: 0; padding-top: 0; }
.stack-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
@media (max-width: 520px) { .rows { grid-template-columns: minmax(0, 1fr); } .rows > dd { border-top: 0; padding-top: 0; } }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

details > summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 500; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; max-height: 380px; overflow: auto; font-size: 12.5px; margin: 10px 0 0; }

/* ---------------------------------------------------------------- home */

/* ---------------------------------------------------------------- domain result */
.result-hero { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; justify-content: space-between; }
.result-hero h1 { font-size: 30px; font-family: var(--font); }
.result-hero .meta { color: var(--muted); font-size: 13px; margin-top: 4px; display: flex; gap: 6px 14px; flex-wrap: wrap; }
.status-badge { display: inline-flex; align-items: center; gap: 10px; border-radius: 99px; padding: 7px 16px 7px 12px; font-weight: 600; font-size: 14px; }
.status-badge.ok { background: var(--ok-soft); color: var(--ok); }
.status-badge.warn { background: var(--warn-soft); color: var(--warn); }
.status-badge.bad { background: var(--bad-soft); color: var(--bad); }
.status-badge .dot { width: 10px; height: 10px; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.fact { background: var(--surface); padding: 13px 16px; display: grid; gap: 3px; align-content: start; min-width: 0; }
.fact-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: 6px; }
.fact-value { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.fact-sub { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }

.jump { display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.jump a:hover { border-color: var(--accent); }
.jump .count { color: var(--muted); font-weight: 400; font-size: 12.5px; }

.findings { list-style: none; margin: 0; padding: 0; }
.findings li { display: grid; grid-template-columns: 4px max-content minmax(0, 1fr) max-content; gap: 12px; align-items: baseline; padding: 11px 18px 11px 0; border-top: 1px solid var(--line); }
.findings li:first-child { border-top: 0; }
.findings .stripe { align-self: stretch; border-radius: 0 3px 3px 0; background: var(--info); }
.findings .bad .stripe, .findings li.bad .stripe { background: var(--bad); }
.findings li.warn .stripe { background: var(--warn); }
.findings .area { font-size: 12.5px; text-decoration: none; color: var(--muted); }
.findings .area:hover { color: var(--accent); }
.all-clear { padding: 16px 18px; display: flex; gap: 10px; align-items: center; color: var(--ok); font-weight: 600; }
@media (max-width: 600px) {
  .findings li { grid-template-columns: 4px minmax(0, 1fr); gap: 6px 12px; }
  .findings .stripe { grid-row: 1 / span 3; }
  .findings li > .pill, .findings .ftext, .findings .area { grid-column: 2; }
  .findings li > .pill { justify-self: start; }
}

section[id] { scroll-margin-top: 16px; }
.ip-line { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }

/* SSL hosts side by side */
.ssl-host { display: grid; gap: 12px; align-content: start; }
.ssl-host .stack-line .host { font-weight: 600; }

/* mail tiles */
.auth-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .auth-tiles { grid-template-columns: minmax(0, 1fr); } }
.auth { border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; display: grid; gap: 8px; align-content: start; background: var(--surface-2); min-width: 0; }
.auth-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.auth-name { font-weight: 600; font-size: 14px; letter-spacing: 0.02em; }
.auth .record { background: var(--surface); }
.auth p { font-size: 13px; color: var(--muted); }
.mx-list { display: grid; gap: 8px; }
.mx { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.mx .prio { font-family: var(--mono); font-size: 12px; color: var(--faint); text-align: right; }

/* redirect chains */
.chains { display: grid; gap: 4px; }
.chain { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.chain:first-child { border-top: 0; padding-top: 0; }
.chain-start { font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding-top: 2px; overflow-wrap: anywhere; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.step { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 10px; align-items: baseline; position: relative; }
.step .code { font-family: var(--mono); font-size: 12px; font-weight: 500; text-align: center; border-radius: 6px; padding: 1px 0; }
.step .code.ok { background: var(--ok-soft); color: var(--ok); }
.step .code.redirect { background: var(--info-soft); color: var(--info); }
.step .code.bad { background: var(--bad-soft); color: var(--bad); }
.step .url { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.step .url-meta { font-size: 12px; color: var(--faint); }
.step + .step::before { content: ""; position: absolute; left: 24px; top: -7px; height: 7px; border-left: 1px dashed var(--line); }
@media (max-width: 600px) { .chain { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

/* recent */
.recent { list-style: none; margin: 0; padding: 0; }
.recent li { display: grid; grid-template-columns: minmax(0, 1fr) max-content max-content; gap: 14px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); }
.recent li:first-child { border-top: 0; }
.recent a { font-family: var(--mono); font-size: 14px; text-decoration: none; overflow-wrap: anywhere; }
.recent a:hover { text-decoration: underline; }
.recent time { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

.empty { color: var(--muted); font-size: 14px; }
.bad-text { color: var(--bad); }

/* ---------------------------------------------------------------- mail headers */
.paste { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.paste .field { display: grid; gap: 5px; }
.paste textarea { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; resize: vertical; min-height: 90px; }
.paste-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn.ghost:hover { color: var(--ink); filter: none; border-color: var(--muted); }
.how-to { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px 22px; }
.how-to h3 { font-size: 14px; margin-bottom: 4px; }
.how-to p { font-size: 13.5px; color: var(--muted); }
.auth-mini { display: flex; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.auth-mini > span { display: inline-flex; align-items: center; gap: 6px; }

.hops { list-style: none; margin: 0; padding: 0; display: grid; }
.hop { display: grid; grid-template-columns: 28px minmax(0, 1fr) 190px; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.hop:first-child { border-top: 0; padding-top: 0; }
.hop-no { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.hop.slow .hop-no { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.hop-main { display: grid; gap: 4px; min-width: 0; }
.hop-line { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.hop-by { font-family: var(--mono); font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.hop-from { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.hop-from .mono { color: var(--ink); overflow-wrap: anywhere; }
.hop details summary { font-size: 12px; margin-top: 2px; }
.hop-time { display: grid; gap: 3px; justify-items: end; text-align: right; font-size: 13px; }
.hop-time .delay { font-size: 12.5px; color: var(--muted); }
.hop.slow .hop-time .delay { color: var(--warn); font-weight: 600; }
.bar { width: 100%; height: 5px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; display: block; }
.bar .fill { display: block; height: 100%; background: var(--info); width: 0; }
.hop.slow .bar .fill { background: var(--warn); }
.fill.w1 { width: 10%; } .fill.w2 { width: 20%; } .fill.w3 { width: 30%; } .fill.w4 { width: 40%; } .fill.w5 { width: 50%; }
.fill.w6 { width: 60%; } .fill.w7 { width: 70%; } .fill.w8 { width: 80%; } .fill.w9 { width: 90%; } .fill.w10 { width: 100%; }
@media (max-width: 700px) { .hop { grid-template-columns: 28px minmax(0, 1fr); } .hop-time { grid-column: 2; justify-items: start; text-align: left; } }

.ar { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.ar:first-of-type { margin-top: 10px; }
.spam-engine { display: grid; gap: 10px; align-content: start; min-width: 0; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 16px; font-size: 12.5px; }
.rules li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.header-list { margin-top: 12px; }
.header-list dt { font-size: 12.5px; color: var(--muted); }
.wrap-any { overflow-wrap: anywhere; font-size: 12.5px; }

/* ---------------------------------------------------------------- website check */
.timing { display: grid; gap: 8px; }
.timing-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 70px; gap: 12px; align-items: center; font-size: 13.5px; }
.timing-row .mono { text-align: right; font-size: 12.5px; color: var(--muted); }
.timing-row.key span:first-child { font-weight: 600; }
.timing-row.key .fill { background: var(--accent); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th { white-space: nowrap; text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); background: var(--surface-2); padding: 8px 12px; }
table.data td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: top; }
table.data td.mono { font-size: 12.5px; white-space: nowrap; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: grid; grid-template-columns: 9px minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 14px; }
.checklist .record { margin-top: 4px; }
.rows > dd > .pill { justify-self: start; }

/* ---------------------------------------------------------------- replies & notes */
.head-row { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; justify-content: space-between; }
.head-row > div { display: grid; gap: 6px; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.notice { background: var(--ok-soft); color: var(--ok); border-radius: 8px; padding: 10px 14px; font-weight: 500; }
.jump a[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.items { display: grid; gap: 10px; }
.item { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
a.item:hover { border-color: var(--accent); }
.item-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.item-head h2 { font-size: 16px; }
.item-head > a { color: inherit; text-decoration: none; }
.item-head > a:hover h2 { color: var(--accent); }
.item-text { color: var(--muted); font-size: 14px; }
.item-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--faint); }
.item.note.done { opacity: .75; }
.item.note.done h2 { text-decoration: line-through; text-decoration-color: var(--faint); }
/* Snippets: one click selects the whole text (no JS under this CSP) */
.snip-group { display: grid; gap: 10px; scroll-margin-top: 16px; }
.snip-cat { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 6px; }
.item.snip { scroll-margin-top: 16px; }
.item.snip h3 { font-size: 15px; }
.item.snip.just-saved { border-color: var(--ok); }
.snip-edit { font-size: 13px; color: var(--faint); text-decoration: none; }
.snip-edit:hover { color: var(--accent); }
.snip-copy { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 7px;
  padding: 5px 11px; border: 1px solid var(--accent); background: transparent; color: var(--accent); min-width: 7.5em; justify-content: center; }
.snip-copy[hidden] { display: none; }
.snip-copy .icon { width: 15px; height: 15px; }
.snip-copy:hover { background: var(--accent); color: var(--accent-ink); }
.snip-copy.copied { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.snip-copy.manual { border-color: var(--info); background: var(--info-soft); color: var(--info); }
.item.snip .snip-edit.push + .snip-copy { margin-left: 4px; }
.snip-text { user-select: all; -webkit-user-select: all; cursor: copy; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.6;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.snip-text:hover { border-color: var(--accent); }
.snip-text::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
kbd { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface-2); }
.push { margin-left: auto; }
.pill-btn { font: inherit; font-size: 12px; font-weight: 600; border-radius: 99px; padding: 2px 10px; cursor: pointer; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.pill-btn.open { background: var(--info-soft); color: var(--info); border-color: transparent; }
.pill-btn.done { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.card-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.editor .field, .use-grid .field { display: grid; gap: 5px; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; }
.form-row .field { flex: 1 1 180px; }
.form-row .field.grow { flex: 2 1 260px; }
.editor textarea { font-size: 14.5px; line-height: 1.6; resize: vertical; }
.radio-row { border: 0; padding: 0; margin: 0; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.radio-row legend { float: left; margin-right: 6px; }
.radio-row label { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.radio-row input { width: auto; }
.btn.danger { color: var(--bad); }
.btn.danger-fill { background: var(--bad); color: #fff; }
.use-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .use-grid { grid-template-columns: minmax(0, 1fr); } }
textarea.output { font-family: var(--font); font-size: 14.5px; line-height: 1.6; background: var(--surface); resize: vertical; }
.confirm { max-width: 520px; }
.nav-gap { margin-top: 14px; }
.hero-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- SSL monitor */
.mono.strong { font-weight: 500; color: var(--ink); }
/* Tables with class "stack" turn into one card per row on phones (labels from data-label). */
@media (max-width: 640px) {
  table.stack thead { display: none; }
  table.stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px; border-top: 1px solid var(--line); }
  table.stack tbody tr:first-child { border-top: 0; }
  table.stack td { display: block; padding: 0; border: 0; }
  table.stack td.wide { grid-column: 1 / -1; }
  table.stack td.mono { white-space: normal; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
  table.stack td:empty { display: none; }
}
.ssl-add { display: grid; gap: 12px; }
.ssl-add .field { display: grid; gap: 5px; }
.ssl-add .btn { justify-self: start; }

/* ---------------------------------------------------------------- server check */
.notice-info { background: var(--info-soft); color: var(--info); border-radius: 8px; padding: 10px 14px; font-weight: 500; }
.notice-info a { color: inherit; font-weight: 600; }
.ports { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.port { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.port.open { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.port:not(.open) { opacity: 0.6; }
.port-no { font-weight: 500; font-size: 13px; }
.port-name { font-size: 13.5px; }
.port-banner { grid-column: 1 / -1; color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
table.bl td { white-space: normal; }
@media (max-width: 640px) { table.stack.bl td { grid-column: 1 / -1; } }
.small-link { font-size: 12.5px; text-decoration: none; white-space: nowrap; }
.small-link:hover { text-decoration: underline; }

/* ---- Log analysis */
.small { font-size: 12.5px; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.file-input { padding: 7px 9px; font-size: 13.5px; cursor: pointer; }
.file-input::file-selector-button { font: inherit; font-size: 13px; font-weight: 600; margin-right: 12px; padding: 5px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.timeline { gap: 6px; }
.timeline svg.tl { width: 100%; height: 150px; display: block; background: var(--surface-2); border-radius: 6px; }
.timeline svg.tl-small { height: 40px; }
.tl-hit { fill: transparent; }
.tl-n { fill: color-mix(in srgb, var(--info) 60%, transparent); }
.tl-4 { fill: var(--warn); }
.tl-5, .tl-e { fill: var(--bad); }
g:hover > .tl-hit { fill: color-mix(in srgb, var(--ink) 8%, transparent); }
g:hover > .tl-n { fill: var(--info); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--muted); align-items: center; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.sw.n { background: color-mix(in srgb, var(--info) 60%, transparent); } .sw.w { background: var(--warn); } .sw.b, .sw.e { background: var(--bad); }
.tl-axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.tl-windows { display: grid; gap: 6px; margin-top: 8px; }
.cats { display: grid; gap: 10px; }
.cat-row { display: grid; grid-template-columns: 210px minmax(80px, 1fr) 130px; gap: 2px 14px; align-items: center; font-size: 13.5px; }
.cat-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.cat-row .mono { text-align: right; font-size: 12.5px; }
.cat-names { grid-column: 1 / -1; padding-left: 17px; overflow-wrap: anywhere; }
@media (max-width: 640px) { .cat-row { grid-template-columns: minmax(0, 1fr) auto; } .cat-row .bar { grid-column: 1 / -1; grid-row: 2; } }
table.paths td { padding: 5px 8px; }
table.paths td.num { text-align: right; width: 1%; }
.attack-list { display: grid; gap: 16px; }
.attack { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.attack:last-child { border-bottom: 0; padding-bottom: 0; }
.attack h3 { font-size: 14.5px; }
.err-groups { list-style: none; margin: 0; padding: 0; }
.err-groups li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); }
.err-groups li:first-child { border-top: 0; }
.err-count { font-size: 15px; font-weight: 600; text-align: right; padding-top: 1px; }
.err-main { display: grid; gap: 4px; min-width: 0; }
.err-main > p.mono { font-size: 12.5px; color: var(--ink); }
@media (max-width: 640px) { .err-groups li { grid-template-columns: minmax(0, 1fr); gap: 4px; } .err-count { text-align: left; } }
.fixes { gap: 20px; }
.fix { display: grid; gap: 6px; }
.fix h3 { font-size: 14.5px; }
.fix pre { margin: 0; }
pre.select-all { user-select: all; -webkit-user-select: all; }
@keyframes bd-pulse { from { transform: scale(1); opacity: 0.55; } to { transform: scale(9.375); opacity: 0; } }
@keyframes bd-pulse-fresh { from { transform: scale(1); opacity: 0.9; } to { transform: scale(9.375); opacity: 0; } }

/* ---- Code check */
.file-list { display: grid; gap: 16px; }
.file-card .card-head h2 { font-size: 14px; font-weight: 600; min-width: 0; }
.code-findings { list-style: none; margin: 0; padding: 0; }
.code-findings li { display: grid; gap: 6px; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 14px; min-width: 0; }
.code-findings li:first-child { border-top: 0; }
pre.excerpt { margin: 0; max-height: 140px; font-size: 12px; }
mark { background: var(--bad-soft); color: var(--bad); font-weight: 600; border-radius: 3px; padding: 0 1px; }
.layers details pre { max-height: 320px; }
.dot.inline { display: inline-block; vertical-align: 1px; }
.reason { display: block; font-size: 13px; }
.reason.bad { color: var(--bad); } .reason.warn { color: var(--warn); } .reason.info { color: var(--muted); }
pre.reply-text { margin: 0; max-height: none; font-family: var(--font); font-size: 14px; line-height: 1.55; }

/* Saved history: the run that is on screen, in the "earlier checks" list */
.recent li.here { background: var(--surface-2); }
.recent li .mono { font-size: 14px; }
a.verdict { color: var(--accent, inherit); }

/* ---- Ticket assistant (answer is streamed into .ai-out while the model writes) */
.ai-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .ai-options { grid-template-columns: minmax(0, 1fr); } }
.ai-out { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.6; min-width: 0; }
.ai-out:empty { display: none; }
.ai:has(.ai-out:not(:empty)) .ai-wait { display: none; }
.ai-wait { display: flex; align-items: center; gap: 10px; }
.ai-spinner { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: ai-spin 0.9s linear infinite; flex: none; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ai-spinner { animation: none; } }
.ai-stats { font-size: 12.5px; color: var(--faint); border-top: 1px solid var(--line); padding-top: 10px; }
.ai-stats.cut { color: var(--warn); }
.ai:has(.ai-done) .ai-wait { display: none; }
.ai-next { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.ai-next h3 { font-size: 15px; }
.ai-carry { font-size: 12.5px; }
.ai-checks { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.ai-checks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ai-checks li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 14px; }
.ai-checks li b { font-family: var(--mono, monospace); font-weight: 500; overflow-wrap: anywhere; margin-right: 4px; }
.ai-checks a { font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); border-radius: 99px; padding: 2px 11px; color: var(--accent); background: var(--surface); }
.ai-checks a:hover { border-color: var(--accent); }
.settings { display: grid; gap: 18px; }
.settings .card { margin: 0; scroll-margin-top: 16px; }
.settings-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ai-next-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.ai-outcome { min-width: 220px; }
.ai-more > summary { font-size: 13px; }
.ai-more[open] > summary { margin-bottom: 10px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs a { padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
@media (max-width: 640px) { .ai-next-actions .btn, .ai-outcome { flex: 1 1 100%; } .ai-next-actions .push { margin-left: 0; } }
.ai-you { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-you .field-label { margin-right: 6px; }
label.check { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
label.check input { width: auto; }
.ai-uses { font-size: 12.5px; color: var(--muted); }
.ai-uses a { color: inherit; }

/* ---- Learn: study sessions, lesson notes, topics */
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hint { background: var(--info-soft); color: var(--info); border-radius: 8px; padding: 10px 14px; }
.hint a { color: inherit; font-weight: 600; }
:where(section, div).stack { display: grid; gap: 12px; }
.section-title { font-size: 15px; color: var(--muted); }
.small { font-size: 12.5px; }
.items.flat .item { box-shadow: none; background: var(--surface-2); }
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.topic-list { list-style: none; margin: 0; padding: 8px 0; }
.topic-list li { display: flex; gap: 10px; align-items: baseline; padding: 5px 18px; font-size: 14.5px; }
.topic-list a { color: var(--ink); text-decoration: none; }
.topic-list a:hover { color: var(--accent); }
.topic-list .count { min-width: 2.2em; text-align: right; }
.topic-row .count { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.topic-edit { gap: 8px; }
.topic-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.topic-rename { display: flex; gap: 8px; flex: 1 1 320px; min-width: 0; }
.topic-rename input { flex: 1; min-width: 0; padding: 6px 10px; }
.topic-row .btn { padding: 6px 12px; font-size: 13.5px; }

/* Rendered Markdown (answers and lesson notes) */
.prose { font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; min-width: 0; }
.prose > * + * { margin-top: 0.7em; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.2em; }
.prose h2 { font-size: 16.5px; } .prose h3 { font-size: 15.5px; } .prose h4 { font-size: 15px; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 0; }
.prose li + li { margin-top: 0.25em; }
.prose code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; }
.prose pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; line-height: 1.5; margin-bottom: 0; }
.prose pre code { background: none; border: 0; padding: 0; font-size: 13px; overflow-wrap: normal; white-space: pre; }
.prose blockquote { margin: 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); }

.convo { display: grid; gap: 12px; }
.msg.you { justify-self: end; max-width: min(720px, 92%); background: var(--accent-soft); border-radius: 12px 12px 4px 12px; padding: 10px 14px; display: grid; gap: 4px; }
.msg.you .prose { font-size: 14.5px; }
.msg.tutor { max-width: 860px; }
.msg-meta { font-size: 12px; color: var(--faint); padding: 0 18px 12px; }
.ai-rendered:empty { display: none; }
.ai:has(.ai-rendered:not(:empty)) .ai-out { display: none; }   /* finished: show the rendered Markdown instead of the raw text */
.lesson { border-color: var(--accent); }
.lesson > summary { cursor: pointer; list-style: none; }
.lesson > summary::-webkit-details-marker { display: none; }
.lesson > summary::after { content: "▾"; margin-left: 8px; color: var(--muted); }
.lesson:not([open]) > summary { border-bottom: 0; }
.lesson:not([open]) > summary::after { content: "▸"; }
.finish h2 { font-size: 16px; }
@media (max-width: 640px) { .msg.you { max-width: 100%; } }
.head-row > .head-actions { display: flex; align-items: center; }
.card-body.prose { display: block; }
.card .paste { border: 0; padding: 0; box-shadow: none; background: none; }
/* Learn: Basics articles */
.article .prose { font-size: 15.5px; max-width: 75ch; }
.ask-list { gap: 8px; }
.ask-q { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; font: inherit; font-size: 14.5px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; cursor: pointer; }
.ask-q:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.ask-q:disabled { opacity: .6; cursor: not-allowed; }
.ask-q .icon { width: 15px; height: 15px; color: var(--accent); flex: none; position: relative; top: 2px; }
.ask-q .prose, .ask-q span p { font-size: inherit; }
.topic-list a { flex: 1; min-width: 0; }
.topic-list .basics { display: inline-flex; color: var(--faint); opacity: .45; }
.topic-list .basics.done { opacity: 1; }
.topic-list .basics.done { color: var(--ok); }
.topic-list .basics .icon { width: 15px; height: 15px; }
.progress-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.progress-line .bar { flex: 1 1 200px; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; max-width: 420px; }
.progress-line .bar i { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.progress-line .bar i.w0 { width: 0; } .progress-line .bar i.w1 { width: 10%; } .progress-line .bar i.w2 { width: 20%; } .progress-line .bar i.w3 { width: 30%; }
.progress-line .bar i.w4 { width: 40%; } .progress-line .bar i.w5 { width: 50%; } .progress-line .bar i.w6 { width: 60%; } .progress-line .bar i.w7 { width: 70%; }
.progress-line .bar i.w8 { width: 80%; } .progress-line .bar i.w9 { width: 90%; } .progress-line .bar i.w10 { width: 100%; }
.head-actions form { display: contents; }

/* ---------------------------------------------------------------- overview (dashboard) */
.home-head p { font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1180px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
.stat { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: inherit; min-width: 0; }
.stat:hover { border-color: var(--accent); }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--muted); }
.stat-icon .icon { width: 21px; height: 21px; }
.stat.ok .stat-icon { background: var(--ok-soft); color: var(--ok); }
.stat.warn .stat-icon { background: var(--warn-soft); color: var(--warn); }
.stat.bad .stat-icon { background: var(--bad-soft); color: var(--bad); }
.stat.info .stat-icon { background: var(--accent-soft); color: var(--accent); }
.stat-text { display: grid; gap: 2px; min-width: 0; }
.stat-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.stat-value { font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.stat.warn .stat-value { color: var(--warn); } .stat.bad .stat-value { color: var(--bad); }
.stat-sub { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.home-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 22px; align-items: start; }
@media (max-width: 980px) { .home-cols { grid-template-columns: minmax(0, 1fr); } }
.home-rows { list-style: none; margin: 0; padding: 0; }
.home-rows li + li { border-top: 1px solid var(--line); }
.home-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 18px; text-decoration: none; color: inherit; }
.home-row.no-icon { grid-template-columns: minmax(0, 1fr) auto; }
.home-row:hover { background: var(--surface-2); }
.home-rows li:last-child .home-row { border-radius: 0 0 var(--radius) var(--radius); }
.hrow-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.hrow-icon .icon { width: 18px; height: 18px; }
.hrow-main { display: grid; gap: 1px; min-width: 0; }
.hrow-name { font-size: 15.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrow-name.mono { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.home-row:hover .hrow-name { color: var(--accent); }
.hrow-meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hrow-main .hrow-meta { overflow: hidden; text-overflow: ellipsis; }
.hrow-side { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.home-row .pill { font-size: 12.5px; padding: 2px 10px; }
@media (max-width: 640px) { .home-row { padding: 12px 14px; gap: 12px; } }
.section-label { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 6px 0 -10px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 10px; }
.tool-link { display: flex; gap: 12px; align-items: center; padding: 11px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; min-width: 0; }
.tool-link:hover { border-color: var(--accent); }
.tool-link .icon { width: 19px; height: 19px; color: var(--accent); }
.tool-link > span { display: grid; min-width: 0; }
.tool-link b { font-weight: 600; font-size: 14px; }
.tool-link small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- polish 2026-11-13 */
/* Hints sit under their field, so two fields side by side keep their boxes on one line. */
.field-hint { font-size: 12.5px; line-height: 1.45; color: var(--faint); }
.ai-options { align-items: start; }
.ai-options .field { display: grid; gap: 5px; align-content: start; }
/* Text that is not inside a card gets its own surface on wide screens, so the map behind never runs through it. */
.btn.ghost { background: var(--surface); }
@media (min-width: 861px) {
  .result-hero { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); align-items: center; }
}
.msg.you { border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
/* Blacklists of one address on a phone: one line per list. */
@media (max-width: 640px) {
  table.stack.bl-compact tr { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 2px 12px; padding: 9px 12px; }
  table.stack.bl-compact td, table.stack.bl-compact td.wide { grid-column: auto; }
  table.stack.bl-compact td[data-label]::before { display: none; }
  table.stack.bl-compact td br, table.stack.bl-compact td small { display: none; }
  table.stack.bl-compact td.is-listed small { display: block; }
  table.stack.bl-compact .long { display: none; }
}
@media (max-width: 640px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tool-link { padding: 10px 12px; gap: 10px; }
  .tool-link small { display: none; }
}
@media (max-width: 640px) {
  .home-row:not(.no-icon) { grid-template-columns: auto minmax(0, 1fr); }
  .home-row:not(.no-icon) .hrow-side { grid-column: 2; justify-content: flex-start; margin-top: -6px; }
}

/* Log analysis: optional problem report + diagnosis */
.paste .problem-fields { margin-top: 10px; gap: 12px 22px; }
.findings li.ok .stripe { background: var(--ok); }
.findings .ftext b { color: var(--ink); }
#focus, #watch { border-top: 1px solid var(--line); }
