/* Swarm Incidents' own palette and type (swarm/template.html), so the two sites read as one
   family: Inter for everything, JetBrains Mono for small counts and hosts, the tracker's grays,
   and its orange kept for the escapee. Loaded after base.css; it overrides tokens only, plus
   the tracker-style header. */
:root {
  --paper: #F3F4F6; --surface: #FFFFFF; --soft: #F5F6F8; --ink: #0E1116; --ink-2: #434A55; --muted: #6B7280; --faint: #A1A7B0;
  --line: #E6E8EC; --line-2: #D3D7DE; --hover: #F7F8FA; --escape: #EB6834;
  --tile-line: #E6E8EC; --panel: #FFFFFF;
  --mark-tile: #0E1116; --mark-ring: #7A8391; --mark-dot: #F3F4F6;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: var(--sans);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0A0C10; --surface: #111419; --soft: #161A20; --ink: #E8EBEF; --ink-2: #B4BBC5; --muted: #8B929C; --faint: #5C636D;
    --line: #22272E; --line-2: #323843; --hover: #161A20; --escape: #D95926;
    --tile-line: #2C333E; --panel: #111419;
    --mark-tile: #E8EBEF; --mark-ring: #6B7280; --mark-dot: #0A0C10;
  }
}
:root[data-theme="dark"] {
  --paper: #0A0C10; --surface: #111419; --soft: #161A20; --ink: #E8EBEF; --ink-2: #B4BBC5; --muted: #8B929C; --faint: #5C636D;
  --line: #22272E; --line-2: #323843; --hover: #161A20; --escape: #D95926;
  --tile-line: #2C333E; --panel: #111419;
  --mark-tile: #E8EBEF; --mark-ring: #6B7280; --mark-dot: #0A0C10;
}
body { font-size: 15px; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; letter-spacing: -0.03em; }

/* The tracker's header: wordmark and tagline on one line, a quiet link beside them, small
   bordered controls on the right. */
.site-head .wrap { min-height: 58px; gap: 8px 18px; }
.brand { font-family: var(--sans); font-weight: 700; font-size: 17px; letter-spacing: -0.015em; gap: 9px; }
.brand svg { width: 24px; height: 24px; }
.tagline { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.top-link { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; text-decoration-color: var(--line-2); text-underline-offset: .22em; }
.top-link:hover { color: var(--ink); text-decoration-color: currentColor; }
.btn { height: 32px; padding: 0 12px; border-radius: 7px; font: 500 12.5px var(--sans); color: var(--ink-2); }
.btn:hover { background: var(--hover); color: var(--ink); border-color: var(--line-2); }
.btn.icon { width: 32px; }
.btn.icon svg { width: 16px; height: 16px; }
.search input { font-family: var(--sans); }
@media (max-width: 900px) { .tagline { display: none; } }
@media (max-width: 760px) {
  .brand { font-size: 16px; }
  .btn.suggest { height: 32px; padding: 0 10px; font-size: 12.5px; }
  .btn.icon { width: 32px; height: 32px; }
}
@media (max-width: 440px) { .site-head .top-link { display: none; } }

/* Latest incidents: a band of the tracker's newest entries, not an icon. */
.latest { margin-top: 44px; }
/* The widget is a panel: white on the grey page in light mode, the surface tone in dark. */
.latest-panel { padding: 20px 24px 18px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
@media (max-height: 759px) { .latest-panel { padding: 14px 22px 12px; } .latest-list a { padding: 10px 0; } }
.latest-list li:last-child a { border-bottom-color: transparent; }
@media (min-width: 761px) { .latest-list li a { border-bottom: 0; } }
/* Until the newest entries arrive (or 2.5 s pass), the list holds its place without showing the
   older list it ships with, so it does not visibly swap. */
.latest-list.pending { visibility: hidden; }
.latest-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.latest-head img { border-radius: 6px; }
.latest-head .si-mark { flex: none; }
.latest-head h2 { font-size: 17px; letter-spacing: -0.02em; }
.latest-head h2 a.plain { text-decoration: none; }
.latest-head h2 a.plain:hover { color: var(--ink-2); }
.latest-head .from { font-size: 13px; color: var(--muted); }
.latest-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
.latest-list a { display: grid; gap: 4px; padding: 14px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.latest-list time { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.latest-list .meta { display: flex; align-items: center; gap: 8px; }
.latest-list .kind { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); }
.latest-list .kind.new { color: var(--escape); }
.latest-list .kind.correction { color: var(--muted); }
.latest-list b { font-weight: 600; font-size: 15px; line-height: 1.35; }
.latest-list a:hover b { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.latest-all { display: inline-block; margin-top: 12px; font-size: 13.5px; color: var(--ink-2); text-underline-offset: .22em; text-decoration-color: var(--line-2); }
.latest-all:hover { color: var(--ink); text-decoration-color: currentColor; }
@media (max-width: 760px) { .latest-list { grid-template-columns: 1fr; } .latest-list a { padding: 11px 0; } }

/* Header links (round 5): FAQ, Glossary and the rest stay reachable from any scroll position.
   On phones they become a second row under the wordmark. */
.head-nav { font-size: 13.5px; gap: 4px 18px; }
.head-nav a { color: var(--ink-2); }
.head-nav a:hover { color: var(--ink); }
/* With nav links the tagline never fits beside them inside the 1180px wrap. */
.site-head.with-nav .tagline { display: none; }
@media (max-width: 760px) {
  .site-head.with-nav .wrap { flex-wrap: wrap; gap: 0 12px; }
  .site-head.with-nav .head-nav { display: flex; flex-basis: 100%; order: 10; gap: 18px; padding: 0 0 10px; margin-top: -4px; font-size: 13.5px; }
}

/* The section strip (E's docked strip, shared by F and G through SR.sectionStrip): a back arrow,
   then tabs with icon and count; the current one is filled. */
.strip .back, .sr-strip .back { position: sticky; left: 0; z-index: 1; flex: none; width: 32px; height: 32px; margin-right: 6px; box-shadow: 0 0 0 6px var(--paper); border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.strip .back:hover, .sr-strip .back:hover { color: var(--ink); background: var(--hover); }
.strip .back svg, .sr-strip .back svg { width: 16px; height: 16px; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px; border-radius: 8px; border: 0; background: none; color: var(--ink-2); font: 500 13px var(--sans); white-space: nowrap; cursor: pointer; text-decoration: none; }
.tab:hover { background: var(--hover); color: var(--ink); }
.tab[aria-selected="true"], .tab[aria-current="true"] { background: var(--ink); color: var(--paper); }
.tab .tab-icon { display: grid; place-items: center; width: 16px; height: 16px; }
.tab .tab-icon svg { width: 16px; height: 16px; }
.tab .n { font-family: var(--mono); font-size: 11px; opacity: .7; }
.tab:focus-visible { outline-offset: -2px; }
.tab.off { display: none; }
.sr-strip { position: sticky; top: var(--head-h, 58px); z-index: 15; background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.sr-strip .wrap { display: flex; align-items: center; gap: 4px; height: 48px; overflow-x: auto; scrollbar-width: none; scroll-padding-inline: 56px 16px; }
/* Tabs scrolled left would show in the side gutter beside the back arrow: paper covers it. */
.sr-strip .back { box-shadow: 0 0 0 6px var(--paper), -16px 0 0 6px var(--paper); }
.sr-strip .wrap::-webkit-scrollbar { display: none; }
