/* ============================================================================
   BIRDFEED RECAP — three-theme stylesheet
   Themes are switched by [data-theme] on <html>: terminal (default), win95, normal.
   Shared components read CSS variables; each theme redefines the variables and,
   where the look demands it, overrides structure.
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; max-width: 100%; overflow-x: hidden; }
/* nothing should ever push the page wider than the screen */
img, input, select, textarea, button, pre { max-width: 100%; }
img, svg { height: auto; }

:root {
  --radius: 0px;
  --gap: 13px;
}

/* ---------------------------------------------------------------- TERMINAL - */
html[data-theme="terminal"] {
  --bg: #050805;
  --bg-2: #0a120a;
  --panel: #0a140a;
  --panel-title: #0f240f;
  --fg: #33ff88;
  --fg-dim: #1c9a52;
  --fg-bright: #b6ffcf;
  --accent: #33ff88;
  --border: #1e5a34;
  --border-bright: #33ff88;
  --danger: #ff5f56;
  --font: "VT323", "Courier New", monospace;
  --font-size: clamp(16px, 4.6vw, 21px);
  --shadow: 0 0 0 transparent;
  --glow: 0 0 6px rgba(51, 255, 136, 0.55);
}

/* ------------------------------------------------------------------- WIN95 - */
html[data-theme="win95"] {
  --bg: #008080;
  --bg-2: #008080;
  --panel: #c0c0c0;
  --panel-title: linear-gradient(90deg, #000080, #1084d0);
  --fg: #000000;
  --fg-dim: #404040;
  --fg-bright: #000000;
  --accent: #000080;
  --border: #808080;
  --border-bright: #ffffff;
  --danger: #a80000;
  /* "Pixelated MS Sans Serif" is provided by 98.css (loaded only in this theme). */
  --font: "Pixelated MS Sans Serif", "Tahoma", "Segoe UI", sans-serif;
  --font-size: 12px;
  --shadow: none;
  --glow: none;
}

/* ------------------------------------------------------------------ NORMAL - */
/* Modern theme — warm editorial look inspired by the "Running Story" recap:
   vibrant orange accent, heavy black display type, soft rounded white cards. */
html[data-theme="normal"] {
  --bg: #0e1116;
  --bg-2: #161b22;
  --panel: #151a21;
  --panel-title: transparent;
  --fg: #e9edf2;
  --fg-dim: #98a2b0;
  --fg-bright: #ffffff;
  --accent: #2563eb;
  --border: #232a33;
  --border-bright: #2563eb;
  --danger: #ff5468;
  --font: "Helvetica Neue", "Helvetica", "Arimo", Arial, sans-serif;
  --font-size: clamp(15px, 3.8vw, 16px);
  --radius: 18px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --glow: none;
}
@media (prefers-color-scheme: light) {
  html[data-theme="normal"] {
    --bg: #eef2f8; --bg-2: #ffffff; --panel: #ffffff;
    --fg: #131720; --fg-dim: #5b6370; --fg-bright: #0a0a0a;
    --border: #e2e8f1; --shadow: 0 16px 44px rgba(37, 99, 235, 0.12);
  }
}
/* Manual light/dark override — higher specificity than the media query above, so
   the toggle wins over the OS setting in both directions. */
html[data-theme="normal"][data-mode="dark"] {
  --bg: #0e1116; --bg-2: #161b22; --panel: #151a21;
  --fg: #e9edf2; --fg-dim: #98a2b0; --fg-bright: #ffffff;
  --border: #232a33; --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
html[data-theme="normal"][data-mode="light"] {
  --bg: #eef2f8; --bg-2: #ffffff; --panel: #ffffff;
  --fg: #131720; --fg-dim: #5b6370; --fg-bright: #0a0a0a;
  --border: #e2e8f1; --shadow: 0 16px 44px rgba(37, 99, 235, 0.12);
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--font-size);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
html[data-theme="terminal"] body { text-shadow: var(--glow); letter-spacing: 0.5px; }
html[data-theme="normal"] body { background: var(--bg); position: relative; }
/* Drifting aurora behind everything — modern theme's signature effect. */
html[data-theme="normal"] body::before {
  content: ""; position: fixed; inset: -25%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(36% 42% at 20% 20%, rgba(37,99,235,0.30), transparent 60%),
    radial-gradient(32% 38% at 84% 26%, rgba(56,189,248,0.20), transparent 60%),
    radial-gradient(42% 48% at 62% 86%, rgba(99,102,241,0.22), transparent 62%);
  filter: blur(30px); animation: bf-aurora 24s ease-in-out infinite alternate;
}
@keyframes bf-aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-2%, -3%, 0) scale(1.08); }
  100% { transform: translate3d(2%, 2%, 0) scale(1.04); }
}

/* --------------------------------------------------------------- layout ---- */
.screen {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 18px 60px;
  min-height: 100vh;
}
html[data-theme="terminal"] .screen { position: relative; z-index: 2; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: var(--gap);
}
/* Modern: a clean white floating nav bar like the reference */
html[data-theme="normal"] .topbar {
  background: var(--panel); border-radius: 16px; padding: 12px 18px; box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.4em; }
.brand-mark {
  display: inline-block; flex: none; width: 1.3em; height: 1.3em;
  background: currentColor;
  -webkit-mask: url("logo.png") center / contain no-repeat;
  mask: url("logo.png") center / contain no-repeat;
}
html[data-theme="terminal"] .brand { color: var(--fg-bright); }
.brand-cursor { animation: blink 1s steps(1) infinite; color: var(--accent); }
html[data-theme="normal"] .brand-cursor, html[data-theme="win95"] .brand-cursor { display: none; }
@keyframes blink { 50% { opacity: 0; } }

.topbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.theme-switch { display: flex; gap: 0; }
.theme-btn {
  font-family: var(--font); font-size: 0.8em; cursor: pointer;
  padding: 6px 10px; background: var(--panel); color: var(--fg-dim);
  border: 1px solid var(--border);
}
.theme-btn + .theme-btn { border-left: 0; }
.theme-btn.active { color: var(--fg-bright); background: var(--bg-2); border-color: var(--border-bright); }
html[data-theme="terminal"] .theme-btn.active { box-shadow: inset 0 0 8px rgba(51,255,136,.4); }
html[data-theme="normal"] .theme-btn { border-radius: 0; }
html[data-theme="normal"] .theme-switch .theme-btn:first-child { border-radius: 8px 0 0 8px; }
html[data-theme="normal"] .theme-switch .theme-btn:last-child { border-radius: 0 8px 8px 0; }

/* Light/dark toggle — only meaningful on the modern theme, hidden elsewhere. */
.mode-toggle {
  display: none; font-size: 1em; line-height: 1; cursor: pointer;
  padding: 6px 9px; background: var(--panel); color: var(--fg);
  border: 1px solid var(--border); border-radius: 8px;
}
.mode-toggle:hover { border-color: var(--accent); color: var(--fg-bright); }
html[data-theme="normal"] .mode-toggle { display: inline-flex; align-items: center; }

/* -------------------------------------------------------------- windows ---- */
/* No entrance animation — content appears settled, not popping in on load. */

/* Auth view gate: exactly one of landing / dashboard / loader shows, driven by
   <html data-view>. Returning users see the loader (not the login) on reload. */
#gate { display: none; min-height: 62vh; align-items: center; justify-content: center; }
html[data-view="loading"] #landing, html[data-view="loading"] #dashboard { display: none; }
html[data-view="landing"] #dashboard, html[data-view="landing"] #gate { display: none; }
html[data-view="dashboard"] #landing, html[data-view="dashboard"] #gate { display: none; }
html[data-view="loading"] #gate { display: flex; }
/* Branded loading splash (like a real app's boot screen) — never a blank page. */
.splash { text-align: center; }
.splash-mark {
  display: inline-block; width: 54px; height: 54px; background: currentColor; color: var(--fg-bright);
  -webkit-mask: url("logo.png") center / contain no-repeat;
  mask: url("logo.png") center / contain no-repeat;
}
.splash-title { font-size: 1.5em; font-weight: 800; color: var(--fg-bright); margin-top: 12px; }
html[data-theme="normal"] .splash-title { font-family: "Playfair Display", Georgia, serif; }
.splash-sub { color: var(--fg-dim); font-size: .9em; margin-top: 4px; }
.splash-bar {
  width: 170px; height: 4px; border-radius: 3px; background: var(--border);
  overflow: hidden; margin: 18px auto 0;
}
.splash-bar i { display: block; width: 40%; height: 100%; background: var(--accent); border-radius: 3px; animation: barslide 1.1s ease-in-out infinite; }
@keyframes barslide { 0% { transform: translateX(-130%); } 100% { transform: translateX(330%); } }
@media (prefers-reduced-motion: reduce) { .splash-bar i { animation: none; width: 100%; } }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }

.window {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
html[data-theme="terminal"] .window { border-color: var(--border-bright); box-shadow: 0 0 14px rgba(51,255,136,.18); }
html[data-theme="win95"] .window { border: 0; box-shadow: none; } /* 98.css draws the authentic raised bevel */

.title-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 10px; font-size: 0.85em; letter-spacing: 1px;
  background: var(--panel-title); color: var(--fg-bright);
}
html[data-theme="terminal"] .title-bar { color: #041004; background: var(--accent); font-weight: 700; letter-spacing: 2px; }
html[data-theme="normal"] .title-bar { display: none; }

.title-bar-controls { display: inline-flex; gap: 6px; }
/* Win95: 98.css renders real pixel min/max/close icons via [aria-label].
   Terminal: draw our own _ □ × so the empty buttons still read right. */
html[data-theme="terminal"] .title-bar-controls button {
  font-family: var(--font); background: transparent; border: 0; color: #041004;
  cursor: pointer; padding: 0 2px; line-height: 1; opacity: .85; font-size: 0.9em;
}
html[data-theme="terminal"] .title-bar-controls button[aria-label="Minimize"]::after { content: "_"; }
html[data-theme="terminal"] .title-bar-controls button[aria-label="Maximize"]::after { content: "\25A1"; }
html[data-theme="terminal"] .title-bar-controls button[aria-label="Close"]::after { content: "\00D7"; }

.window-body { padding: 14px 16px; }
html[data-theme="normal"] .window-body { padding: 16px 18px; }

/* ---------------------------------------------------------------- hero ----- */
.hero-title { font-size: clamp(1.5rem, 5.5vw, 2.4rem); margin: 0 0 12px; line-height: 1.1; color: var(--fg-bright); overflow-wrap: break-word; }
/* Modern = editorial display: bold grotesque sans + italic-serif accent (.ed). */
html[data-theme="normal"] .hero-title {
  font-family: "Helvetica Neue", Helvetica, "Arimo", Arial, sans-serif;
  font-size: clamp(2.7rem, 9vw, 4.6rem); font-weight: 800; letter-spacing: -2px; line-height: 1.0;
}
html[data-theme="normal"] .hero-sub { font-size: 1.15em; max-width: 44ch; }
.hero-sub { font-size: 1.1em; color: var(--fg); max-width: 46ch; margin: 0 0 16px; overflow-wrap: break-word; }
.hero-points { list-style: none; padding: 0; margin: 0 0 22px; color: var(--fg-dim); }
.hero-points li { margin: 4px 0; }
.hero-points li::before { content: "> "; color: var(--accent); }
html[data-theme="normal"] .hero-points li::before { content: "✓ "; }
.hero-fine { color: var(--fg-dim); font-size: .85em; margin-top: 12px; }

/* --------------------------------------------------------------- buttons --- */
.btn {
  font-family: var(--font); font-size: 0.95em; cursor: pointer;
  padding: 9px 16px; background: var(--bg-2); color: var(--fg);
  border: 1px solid var(--border-bright);
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #05100a; font-weight: 700; border-color: var(--accent); }
html[data-theme="normal"] .btn { border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); color: var(--fg); }
html[data-theme="normal"] .btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 10px 24px rgba(37,99,235,0.32); }
html[data-theme="normal"] .btn-primary:hover { filter: brightness(1.05); }
html[data-theme="win95"] .btn {
  background: #c0c0c0; color: #000; border: 2px solid;
  border-color: #ffffff #000 #000 #ffffff;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf;
}
html[data-theme="win95"] .btn:active { border-color: #000 #fff #fff #000; box-shadow: inset 1px 1px 0 #808080; transform: none; }
html[data-theme="win95"] .btn-primary { font-weight: 700; }
.btn-lg { padding: 13px 22px; font-size: 1.15em; }
.g-mark {
  display: inline-block; font-weight: 800; margin-right: 6px;
  color: #fff; background: #4285f4; border-radius: 3px; padding: 0 6px;
}
html[data-theme="terminal"] .g-mark { background: transparent; color: #05100a; }

/* --------------------------------------------------------------- forms ----- */
.row { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.prompt { color: var(--accent); font-weight: 700; }
.input {
  font-family: var(--font); font-size: 0.95em; flex: 1; min-width: 0;
  padding: 8px 10px; background: var(--bg); color: var(--fg);
  border: 1px solid var(--border);
}
html[data-theme="terminal"] .input { background: #030603; }
html[data-theme="terminal"] .input:focus { outline: none; border-color: var(--accent); box-shadow: var(--glow); }
html[data-theme="win95"] .input {
  background: #fff; border: 2px solid; border-color: #808080 #fff #fff #808080;
  /* compact padding + auto height so 98.css's fixed 21px doesn't clip the text */
  padding: 3px 5px; height: auto; min-height: 21px;
}
/* authentic 98.css pixel dropdown arrow (our .input override otherwise hides it) */
html[data-theme="win95"] select.input {
  appearance: none; -webkit-appearance: none; padding-right: 26px;
  background-repeat: no-repeat; background-position: right 3px center;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0v16h1V1h14V0z' fill='%23DFDFDF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1v14h1V2h12V1H2z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H0v-1h15V0h1v17z' fill='%23000'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1h-1v14H1v1h14V1z' fill='gray'/%3E%3Cpath fill='silver' d='M2 2h12v13H2z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 6H4v1h1v1h1v1h1v1h1V9h1V8h1V7h1V6z' fill='%23000'/%3E%3C/svg%3E");
}
html[data-theme="normal"] .input { border-radius: 10px; background: var(--bg-2); }
.field { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 9px 0; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 540px) { .field-grid { grid-template-columns: 1fr; } }
.field > span { color: var(--fg-dim); font-size: .9em; }
.field.check { display: flex; flex-direction: row; align-items: center; gap: 10px; cursor: pointer; }
/* keep a real, visible checkbox even under 98.css (which hides native ones) */
.field.check input {
  width: 18px; height: 18px; flex: none; accent-color: var(--accent); cursor: pointer;
  opacity: 1; position: static; appearance: auto; -webkit-appearance: checkbox; margin: 0;
}
.field.check > span { font-size: .85em; }
select.input { cursor: pointer; }
.actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.panel-h { margin: 0 0 12px; font-size: 1.1em; color: var(--fg-bright); }
html[data-theme="normal"] .panel-h {
  font-family: "Playfair Display", Georgia, serif; font-weight: 700; letter-spacing: 0; font-size: 1.45em;
}
.muted { color: var(--fg-dim); font-size: .9em; margin: 8px 0; }

/* ------------------------------------------------------------ feed / results */
.feed-list, .result-list { list-style: none; margin: 0; padding: 0; }
/* Let results grow naturally (page scrolls) — a fixed-height scroll box left the
   last card sliced in half at its boundary, which looked "chopped". */
.result-list:not(:empty) { margin-top: 10px; }
.acct {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  border: 1px solid var(--border); margin: 8px 0; border-radius: var(--radius);
}
html[data-theme="terminal"] .acct { border-style: dashed; }
.acct-av {
  position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--bg-2); color: var(--fg-dim); font-weight: 700; font-size: 1.05em;
}
.acct-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
html[data-theme="win95"] .acct-av { border-radius: 0; border: 1px solid #808080; }
.acct-meta { flex: 1; min-width: 0; }
.acct-name { font-weight: 700; color: var(--fg-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-handle { color: var(--fg-dim); font-size: .85em; }
.acct-desc { color: var(--fg-dim); font-size: .8em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { font-size: .7em; color: var(--accent); }
.icon-btn {
  font-family: var(--font); cursor: pointer; padding: 6px 10px; flex: none;
  background: transparent; color: var(--danger); border: 1px solid var(--danger);
}
.icon-btn.add { color: var(--accent); border-color: var(--accent); }
.icon-btn:disabled { opacity: .5; cursor: default; }
html[data-theme="normal"] .icon-btn { border-radius: 8px; }

.auth-slot { position: relative; display: flex; align-items: center; font-size: .85em; }
.acct-trigger {
  display: flex; align-items: center; gap: 8px; cursor: pointer; font-family: var(--font);
  font-size: 1em; padding: 5px 10px; background: var(--panel); color: var(--fg);
  border: 1px solid var(--border); border-radius: 999px;
}
.acct-trigger:hover { border-color: var(--accent); }
.acct-ava-sm {
  width: 22px; height: 22px; border-radius: 50%; flex: none; display: flex;
  align-items: center; justify-content: center; background: var(--accent);
  color: #fff; font-weight: 700; font-size: .8em;
}
html[data-theme="terminal"] .acct-ava-sm { color: #041004; }
.acct-trigger .who { color: var(--fg); max-width: 20ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { color: var(--fg-dim); font-size: .85em; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 220px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; text-align: left;
}
.acct-menu-head { padding: 8px 10px; color: var(--fg-dim); font-size: .82em; line-height: 1.5; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.acct-menu-head b { color: var(--fg-bright); }
.menu-item {
  display: block; width: 100%; box-sizing: border-box; text-align: left; text-decoration: none;
  font-family: var(--font); font-size: .95em; cursor: pointer; padding: 9px 10px;
  background: transparent; color: var(--fg); border: 0; border-radius: 8px;
}
.menu-item:hover { background: var(--bg-2); }
.menu-item.danger { color: var(--danger); }
.acct-menu-sep { height: 1px; background: var(--border); margin: 5px 6px; }
.acct-menu-label { padding: 8px 10px 2px; font-size: .66em; letter-spacing: .8px; text-transform: uppercase; color: var(--fg-dim); }
/* Delete sits in a de-emphasized "danger zone" so it's not a one-slip action. */
.menu-item.subtle { color: var(--fg-dim); font-size: .85em; padding-top: 6px; padding-bottom: 6px; }
.menu-item.subtle:hover { color: var(--danger); background: var(--bg-2); }
html[data-theme="terminal"] .acct-trigger, html[data-theme="terminal"] .acct-menu,
html[data-theme="win95"] .acct-trigger, html[data-theme="win95"] .acct-menu,
html[data-theme="terminal"] .menu-item, html[data-theme="win95"] .menu-item { border-radius: 0; }
html[data-theme="win95"] .acct-menu { box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff, 2px 2px 0 rgba(0,0,0,.35); }
@media (max-width: 560px) { .acct-trigger .who { display: none; } }

.manual { margin-top: 14px; }
.manual summary { cursor: pointer; color: var(--fg-dim); font-size: .85em; }

/* --------------------------------------------------------- suggestions ----- */
.suggested-box { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.suggested-box > summary { cursor: pointer; color: var(--fg-dim); font-size: .85em; list-style: revert; }
.suggested-box[open] > summary { margin-bottom: 4px; }
.suggested { margin-top: 8px; }
.sug-group { margin-bottom: 12px; }
.sug-topic { color: var(--fg-bright); font-size: .85em; font-weight: 700; margin-bottom: 6px; }
html[data-theme="normal"] .sug-topic { font-family: "Playfair Display", Georgia, serif; font-size: 1.05em; }
.sug-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sug-chip {
  font-family: var(--font); font-size: .85em; cursor: pointer; white-space: nowrap;
  padding: 6px 12px; color: var(--fg); background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 999px;
}
.sug-chip:hover { border-color: var(--accent); color: var(--fg-bright); }
html[data-theme="terminal"] .sug-chip { border-radius: 0; border-style: dashed; }
html[data-theme="win95"] .sug-chip {
  border-radius: 0; background: #c0c0c0; color: #000; border: 2px solid;
  border-color: #fff #000 #000 #fff; box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf;
}
html[data-theme="win95"] .sug-chip:active { border-color: #000 #fff #fff #000; box-shadow: inset 1px 1px 0 #808080; }

/* ------------------------------------------------------------- statusbar --- */
.statusbar {
  display: flex; justify-content: space-between; margin-top: var(--gap);
  padding: 6px 10px; font-size: .8em; color: var(--fg-dim);
  border: 1px solid var(--border); background: var(--panel);
}
/* The "READY · N accounts" bar is a retro-OS touch that fits terminal/win95 but
   looks pointless in modern — hide it there and use a toast for feedback instead. */
html[data-theme="normal"] .statusbar { display: none; }
html[data-theme="win95"] .statusbar { border-color: #808080 #fff #fff #808080; border-width: 2px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(14px);
  background: var(--fg-bright); color: var(--bg); font: 600 .9em/1.35 var(--font);
  padding: 10px 18px; border-radius: 999px; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  z-index: 90; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* -------------------------------------------------- Flappy Feed (easter egg) */
.game-modal { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .62); backdrop-filter: blur(3px); }
.game-modal[hidden] { display: none; }
.game-card { background: #0b1120; border: 1px solid #232a33; border-radius: 16px; padding: 12px; box-shadow: 0 30px 90px rgba(0, 0, 0, .55); }
.game-head { display: flex; justify-content: space-between; align-items: center; color: #e9edf2; font: 700 15px "Helvetica Neue", Arial, sans-serif; padding: 4px 6px 10px; }
.game-x { background: none; border: 0; color: #8892a0; font-size: 17px; cursor: pointer; line-height: 1; }
.game-x:hover { color: #fff; }
.game-card canvas { display: block; border-radius: 10px; background: #0b1120; touch-action: none; }
.game-hint { text-align: center; color: #6b7686; font: 500 12px "Helvetica Neue", Arial, sans-serif; padding: 9px 0 2px; }

/* -------------------------------------------------- easter eggs: cowbell + flock */
.cowbell {
  position: fixed; right: 22px; bottom: 22px; z-index: 1150;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  animation: cowbell-in .4s cubic-bezier(.34, 1.56, .64, 1) both;
}
.cowbell[hidden] { display: none; }
.cowbell-bell { position: relative; }
.cowbell-btn { background: none; border: 0; padding: 0; cursor: pointer; }
.cowbell-btn img { width: 60px; height: auto; display: block; transform-origin: 50% 96%; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .22)); }
.cowbell.hit .cowbell-btn img { animation: cowbell-ring .5s ease; }
.cowbell-hint { font: 700 10px "Helvetica Neue", Arial, sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #b9863a; background: rgba(140, 140, 140, .18); padding: 3px 9px; border-radius: 999px; }
.cowbell-x {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: #333; color: #fff; font: 700 15px/1 Arial, sans-serif; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .15s ease;
}
.cowbell:hover .cowbell-x, .cowbell:focus-within .cowbell-x { opacity: 1; transform: scale(1); }
@keyframes cowbell-in { from { opacity: 0; transform: translateY(20px) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes cowbell-ring {
  0% { transform: rotate(0); }
  14% { transform: rotate(19deg); }
  32% { transform: rotate(-15deg); }
  50% { transform: rotate(11deg); }
  68% { transform: rotate(-7deg); }
  84% { transform: rotate(3deg); }
  100% { transform: rotate(0); }
}

.flock-bird { position: fixed; left: -70px; z-index: 1200; pointer-events: none; will-change: transform; animation: flock 3s linear forwards; }
@keyframes flock { from { transform: translate(0, 0); } to { transform: translate(calc(100vw + 140px), -46px); } }
@media (prefers-reduced-motion: reduce) { .flock-bird { display: none; } }

/* -------------------------------------------------- collections + pages ---- */
/* A recap = a named collection of people. The bar lets you switch, rename,
   create and delete them; the nav below splits settings into real "pages". */
.collections-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: var(--gap);
}
.collections-bar .recap-tabs { flex: 1 1 auto; margin-bottom: 0; }
.collection-actions { display: flex; gap: 8px; flex: none; }
.btn-sm { padding: 6px 12px; font-size: .82em; }

.dash-nav {
  display: flex; gap: 2px; flex-wrap: wrap; margin-bottom: var(--gap);
  border-bottom: 1px solid var(--border);
}
.dash-nav-btn {
  font-family: var(--font); font-size: .95em; cursor: pointer;
  padding: 10px 20px; background: transparent; color: var(--fg-dim);
  border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.dash-nav-btn:hover { color: var(--fg-bright); }
.dash-nav-btn.active { color: var(--fg-bright); border-bottom-color: var(--accent); font-weight: 700; }
html[data-theme="terminal"] .dash-nav-btn.active { color: var(--accent); text-shadow: var(--glow); }
/* Win95: raised tab buttons that press in when active */
html[data-theme="win95"] .dash-nav { border-bottom: 0; }
html[data-theme="win95"] .dash-nav-btn {
  background: #c0c0c0; color: #000; margin-bottom: 0; padding: 5px 16px;
  border: 2px solid; border-color: #fff #000 #000 #fff;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf;
}
html[data-theme="win95"] .dash-nav-btn.active {
  border-color: #000 #fff #fff #000; box-shadow: inset 1px 1px 0 #808080;
}
.dash-section[hidden] { display: none; }

/* --------------------------------------------------------------- stats ----- */
/* --------------------------------------------------------- recap tabs ------ */
.recap-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--gap); }
.recap-tab {
  font-family: var(--font); font-size: .9em; cursor: pointer; white-space: nowrap;
  padding: 8px 16px; color: var(--fg-dim); background: var(--panel);
  border: 1px solid var(--border); border-radius: 999px;
}
.recap-tab:hover { color: var(--fg-bright); border-color: var(--accent); }
.recap-tab.active { color: var(--fg-bright); background: var(--accent); border-color: var(--accent); font-weight: 700; }
html[data-theme="terminal"] .recap-tab { border-radius: 0; }
html[data-theme="terminal"] .recap-tab.active { color: #041004; }
html[data-theme="normal"] .recap-tab.active { color: #fff; }
.recap-new { color: var(--accent); border-style: dashed; background: transparent; }
.recap-new:hover { background: transparent; }
html[data-theme="win95"] .recap-tab {
  border-radius: 0; background: #c0c0c0; color: #000; border: 2px solid;
  border-color: #fff #000 #000 #fff; box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf;
}
html[data-theme="win95"] .recap-tab.active { background: #000080; color: #fff; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-bottom: var(--gap); }
.stat {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px 14px; min-width: 0;
}
.stat-label { color: var(--accent); font-size: .7em; letter-spacing: .6px; text-transform: uppercase; font-weight: 700; }
.stat-num { color: var(--fg-bright); font-size: 1.55em; font-weight: 800; line-height: 1.1; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-sub { color: var(--fg-dim); font-size: .8em; margin-top: 1px; }
html[data-theme="terminal"] .stat { border-color: var(--border-bright); border-style: dashed; box-shadow: 0 0 12px rgba(51,255,136,.12); }
html[data-theme="win95"] .stat { border: 0; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff; }
/* editorial serif numbers, like the Executive Brief stat blocks */
html[data-theme="normal"] .stat-num { font-family: "Playfair Display", Georgia, serif; font-size: 1.95em; font-weight: 800; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; gap: 10px; } }

/* -------------------------------------------------------- button spinner --- */
.btn.loading { pointer-events: none; opacity: .8; }
.btn.loading::after {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 8px; vertical-align: -1px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- sitefoot --- */
.sitefoot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 12px; padding: 4px 10px; font-size: .8em; color: var(--fg-dim);
}
html[data-theme="terminal"] .sitefoot { font-family: var(--font); }
.sitefoot a, .linkbtn { color: var(--fg-dim); text-decoration: none; }
.sitefoot a:hover, .linkbtn:hover { color: var(--accent); text-decoration: underline; }
.linkbtn { background: none; border: 0; cursor: pointer; font: inherit; padding: 0; }
#delete-data:hover { color: var(--danger); }
.sitefoot-tag { margin-left: auto; opacity: .85; }
@media (max-width: 480px) { .sitefoot-tag { margin-left: 0; width: 100%; } }

/* ----------------------------------------------------- win95 taskbar ------- */
.taskbar { display: none; }
html[data-theme="win95"] .taskbar {
  display: flex; align-items: center; gap: 6px;
  position: fixed; left: 0; right: 0; bottom: 0; height: 34px; z-index: 40;
  background: #c0c0c0; padding: 3px 4px;
  box-shadow: inset 0 1px 0 #fff, inset 0 2px 0 #dfdfdf;
  font-family: "Pixelated MS Sans Serif", Tahoma, sans-serif; font-size: 12px;
}
html[data-theme="win95"] body { padding-bottom: 42px; }
.start-btn {
  display: flex; align-items: center; gap: 5px; height: 26px;
  padding: 0 9px 0 5px; cursor: pointer; font-weight: 700; font-size: 12px;
  color: #000; background: #c0c0c0; font-family: inherit;
  border: 2px solid; border-color: #fff #000 #000 #fff;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf;
}
.start-btn:active { border-color: #000 #fff #fff #000; box-shadow: inset 1px 1px 0 #808080; }
.start-logo { font-size: 15px; line-height: 1; }
.tasktray {
  margin-left: auto; height: 26px; display: flex; align-items: center; padding: 0 12px;
  box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #808080; color: #000;
}

/* ============================================================ CRT EFFECTS === */
.crt-scanlines, .crt-vignette, .crt-flicker { display: none; }
html[data-theme="terminal"] .crt-scanlines,
html[data-theme="terminal"] .crt-vignette,
html[data-theme="terminal"] .crt-flicker {
  display: block; position: fixed; inset: 0; pointer-events: none; z-index: 9;
}
/* horizontal scanlines + a faint vertical aperture grille for phosphor texture */
.crt-scanlines {
  background:
    repeating-linear-gradient(to bottom,
      rgba(0,0,0,0) 0, rgba(0,0,0,0) 1px, rgba(0,0,0,.34) 2px, rgba(0,0,0,.34) 3px),
    repeating-linear-gradient(to right,
      rgba(255,0,0,.05), rgba(0,255,0,.03) 1px, rgba(0,0,255,.05) 2px, rgba(0,0,0,0) 3px);
  mix-blend-mode: multiply;
}
/* bright scan bar rolling down the screen */
html[data-theme="terminal"] .crt-scanlines::after {
  content: ""; position: absolute; inset: 0; height: 26%;
  background: linear-gradient(rgba(180,255,205,0) 0%, rgba(120,255,170,.10) 50%, rgba(180,255,205,0) 100%);
  animation: sweep 6s linear infinite;
}
@keyframes sweep { 0% { transform: translateY(-120%); } 100% { transform: translateY(460%); } }
/* curved-glass vignette + soft top-left reflection */
.crt-vignette {
  background: radial-gradient(130% 130% at 50% 50%,
    transparent 50%, rgba(0,0,0,.5) 86%, rgba(0,0,0,.82) 100%);
  box-shadow: inset 0 0 150px rgba(0,0,0,.7), inset 0 0 40px rgba(0,0,0,.55);
}
html[data-theme="terminal"] .crt-vignette::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(55% 38% at 28% 6%, rgba(120,255,170,.07), transparent 60%);
}
.crt-flicker { background: rgba(30,80,45,.04); animation: flicker .1s infinite steps(2); }
@keyframes flicker { 0% { opacity: .10; } 100% { opacity: .03; } }
/* Gentle phosphor breathing only — no power-on squish, so loads feel solid. */
html[data-theme="terminal"] .screen { animation: crt-breathe 5s ease-in-out infinite; }
@keyframes crt-breathe { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.035); } }
@media (prefers-reduced-motion: reduce) {
  .crt-flicker, .crt-scanlines::after, .brand-cursor { animation: none; }
  html[data-theme="terminal"] .screen { animation: none; }
}

/* -------------------------------------------------------------- boot ------- */
.boot {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: center; justify-content: center; overflow: hidden;
  opacity: 0; transition: opacity .45s ease; cursor: pointer;
}
.boot.show { display: flex; opacity: 1; }
.boot.out { opacity: 0; }
.bootwrap { text-align: center; width: 100%; }

/* Terminal — a BIOS log that prints line by line */
.boot-theme-terminal { background: #030603; }
.boot-term { text-align: left; padding: 40px; max-width: 620px; margin: 0 auto; }
.boot-term-lines { margin: 0; font-family: "VT323", monospace; font-size: clamp(15px, 3.4vw, 23px); line-height: 1.5; color: #33ff88; text-shadow: 0 0 6px rgba(51,255,136,.6); white-space: pre-wrap; overflow-wrap: break-word; }
.boot-term-lines span { display: block; opacity: 0; animation: boot-line .01s linear forwards; }
.boot-term-lines span:nth-child(1) { animation-delay: .15s; }
.boot-term-lines span:nth-child(2) { animation-delay: .45s; }
.boot-term-lines span:nth-child(3) { animation-delay: .75s; }
.boot-term-lines span:nth-child(4) { animation-delay: 1.05s; }
.boot-term-lines span:nth-child(5) { animation-delay: 1.4s; }
.boot-term-lines span:nth-child(6) { animation-delay: 1.75s; }
.boot-term-lines span:nth-child(7) { animation-delay: 2.1s; }
.boot-term-lines span:nth-child(8) { animation-delay: 2.45s; }
.boot-term-lines span:nth-child(9) { animation-delay: 2.85s; }
.boot-term-lines b.ok { color: #7dffb0; }
.boot-term-go { color: #d8ffe8; }
.boot-term-go b { animation: blink 1s steps(1) infinite; }
@keyframes boot-line { to { opacity: 1; } }

/* Windows 95 — startup splash with the marching progress bar */
.boot-theme-win95 { background: #000; }
.boot-95 { color: #fff; font-family: Tahoma, "MS Sans Serif", Geneva, Arial, sans-serif; }
.boot-95-mark { width: 62px; height: 62px; color: #fff; margin-bottom: 14px; animation: boot-pop .55s ease both; }
.boot-95-title { font-size: clamp(34px, 9vw, 66px); font-weight: 700; letter-spacing: -1px; line-height: 1; animation: boot-pop .55s ease both; }
.boot-95-title span { color: #00a2e8; }
.boot-95-sub { color: #c0c0c0; margin-top: 8px; font-size: 14px; }
.boot-95-bar { width: 240px; max-width: 70vw; height: 24px; margin: 26px auto 0; background: #000; padding: 3px; border: 2px solid; border-color: #808080 #fff #fff #808080; overflow: hidden; }
.boot-95-bar i { display: block; height: 100%; width: 58px; background: repeating-linear-gradient(90deg, #00a2e8 0 9px, transparent 9px 13px); animation: boot95bar 1.1s linear infinite; }
.boot-95-starting { margin-top: 18px; color: #c0c0c0; font-size: 13px; opacity: 0; animation: boot-line .4s ease 1s forwards; }
@keyframes boot95bar { from { transform: translateX(-62px); } to { transform: translateX(240px); } }
@keyframes boot-pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

/* Modern — a faux dev "build" boot, animated with anime.js (see buildBoot) */
.boot-theme-normal {
  background:
    linear-gradient(rgba(92,140,200,.05) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(90deg, rgba(92,140,200,.05) 1px, transparent 1px) 0 0 / 42px 42px,
    #0a0d12;
}
.boot-build { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 20px; }
.bb-window {
  width: min(92vw, 880px); background: #14181f; border: 1px solid #232a33; border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55); overflow: hidden; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  animation: boot-pop .45s ease both;
}
.bb-titlebar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #232a33; }
.bb-dot { width: 11px; height: 11px; border-radius: 50%; }
.bb-dot.r { background: #ff5f56; } .bb-dot.y { background: #ffbd2e; } .bb-dot.g { background: #27c93f; }
.bb-url { margin-left: 10px; font: 600 13px "SFMono-Regular", Menlo, Consolas, monospace; color: #6b7686; }
.bb-body { padding: 30px 34px 34px; text-align: left; }
.bb-word { font-size: clamp(1.8rem, 5.6vw, 3.4rem); font-weight: 800; letter-spacing: 1.5px; color: #8fe3ff; text-shadow: 0 0 26px rgba(92, 200, 255, .5); }
.bb-sub { margin-top: 12px; font-size: clamp(1rem, 2.4vw, 1.3rem); color: #8892a0; }
.bb-status { display: flex; align-items: center; gap: 16px; margin: 26px 0 18px; }
.bb-spin {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  background: repeating-conic-gradient(#7fd8ff 0 4deg, transparent 4deg 15deg);
  -webkit-mask: radial-gradient(circle, transparent 12px, #000 13px); mask: radial-gradient(circle, transparent 12px, #000 13px);
  animation: bb-spin 1s linear infinite;
}
@keyframes bb-spin { to { transform: rotate(360deg); } }
.bb-phase { font-size: clamp(.9rem, 2vw, 1.05rem); color: #aeb7c4; }
.bb-bar { height: 8px; border-radius: 6px; background: #232a33; overflow: hidden; }
.bb-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #5cc8ff, #8fe6ff); box-shadow: 0 0 16px rgba(92, 200, 255, .75); }
.bb-meta { display: flex; justify-content: space-between; margin-top: 12px; font: 600 clamp(.8rem, 1.8vw, .95rem) "Helvetica Neue", Arial, sans-serif; }
.bb-pct { color: #7fd8ff; } .bb-eta { color: #6b7686; }
.bb-log { margin-top: 20px; padding-top: 18px; border-top: 1px solid #232a33; font: 400 clamp(11px, 1.5vw, 15px)/1.9 "SFMono-Regular", Menlo, Consolas, monospace; color: #7f8b9a; height: 150px; overflow: hidden; }
.bb-line b.ok { color: #27c93f; } .bb-line b.run { color: #7fd8ff; } .bb-line b.cur { color: #7fd8ff; animation: blink 1s steps(1) infinite; }
.bb-foot { font: 400 clamp(11px, 1.5vw, 15px) "SFMono-Regular", Menlo, Consolas, monospace; color: #4a5462; }

/* --------------------------------------------------- smooth first paint ---- */
/* Cached data eases in once instead of snapping (paired with scroll-to-top on
   reload). Children re-rendering from Firestore don't retrigger it. */
html[data-view="dashboard"] #dashboard { animation: bf-rise .28s ease both; }
@keyframes bf-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html[data-view="dashboard"] #dashboard { animation: none; } }

/* ---------------------------------------------------- modern flourishes ---- */
/* Gradient wordmark on the hero (uses --fg-bright so it stays legible in both modes). */
html[data-theme="normal"] .hero-title { color: var(--fg-bright); line-height: 1.06; padding-bottom: 0.06em; }
/* Italic-serif accent phrase inside a headline — the editorial two-tone move. */
.ed { font-style: italic; }
html[data-theme="normal"] .hero-title .ed,
html[data-theme="normal"] .lp-h2 .ed { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-style: italic; letter-spacing: -0.5px; }
html[data-theme="normal"] .hero-title .ed { color: var(--accent); }
html[data-theme="normal"] .lp-h2 .ed { color: var(--fg-dim); }
/* Small cards lift on hover (modern only — keeps win95 bevels / terminal flat). */
html[data-theme="normal"] .stat,
html[data-theme="normal"] .tr-tile { transition: transform .18s ease, border-color .18s ease; }
html[data-theme="normal"] .stat:hover,
html[data-theme="normal"] .tr-tile:hover { transform: translateY(-3px); border-color: var(--accent); }
/* Hero copy eases in element-by-element (eyebrow → title → subhead → CTA). */
html[data-view="landing"] .lp-hero-copy > * { opacity: 0; animation: bf-rise .6s cubic-bezier(.2,.7,.2,1) forwards; }
html[data-view="landing"] .lp-hero-copy > *:nth-child(1) { animation-delay: .05s; }
html[data-view="landing"] .lp-hero-copy > *:nth-child(2) { animation-delay: .14s; }
html[data-view="landing"] .lp-hero-copy > *:nth-child(3) { animation-delay: .23s; }
html[data-view="landing"] .lp-hero-copy > *:nth-child(4) { animation-delay: .32s; }
html[data-view="landing"] .lp-hero-art { opacity: 0; animation: bf-rise .8s cubic-bezier(.2,.7,.2,1) .34s forwards; }

/* The floating email cards gently bob (staggered speeds → parallax-ish depth). */
.lp-mail-1 { animation: bf-float1 5.5s ease-in-out infinite; }
.lp-mail-2 { animation: bf-float2 6.6s ease-in-out infinite; }
.lp-mail-3 { animation: bf-float3 7.4s ease-in-out infinite; }
@keyframes bf-float1 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes bf-float2 { 0%, 100% { transform: rotate(3deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-13px); } }
@keyframes bf-float3 { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(-4deg) translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  html[data-theme="normal"] body::before { animation: none; }
  html[data-view="landing"] .lp-hero-copy > *,
  html[data-view="landing"] .lp-hero-art { opacity: 1; animation: none; }
  .lp-mail-1, .lp-mail-2, .lp-mail-3 { animation: none; }
}

/* -------------------------------------------------------------- modal ------ */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.modal-card {
  position: relative; z-index: 1; width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; animation: bf-rise .2s ease both;
}
html[data-theme="terminal"] .modal-card { border-color: var(--border-bright); box-shadow: 0 0 22px rgba(51,255,136,.25); }
html[data-theme="win95"] .modal-card {
  border: 0; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff, 4px 4px 0 rgba(0,0,0,.4);
}
/* Add-accounts modal: bigger, with a fixed header (search) and a scroll-contained
   results body — so the inputs stay put while results scroll inside the modal. */
#addaccts-modal .modal-card.aa-card {
  max-width: 680px; width: 100%;
  height: min(88vh, 780px); max-height: 88vh;
  display: flex; flex-direction: column; overflow: hidden; padding: 22px 22px 16px;
}
.aa-head { flex: 0 0 auto; }
.aa-head .modal-sub { margin-bottom: 12px; }
.aa-head #search-status { margin-top: 8px; }
.aa-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 4px -6px 0; padding: 0 6px 2px; }
.aa-body .result-list:not(:empty) { margin-top: 6px; }
.modal-title { margin: 0 0 4px; font-size: 1.3em; color: var(--fg-bright); }
html[data-theme="normal"] .modal-title { font-family: "Playfair Display", Georgia, serif; font-weight: 700; }
.modal-sub { margin: 0 0 16px; color: var(--fg-dim); font-size: .9em; }
/* Modal close button (top-right) */
.modal-x {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; z-index: 2;
  border: 0; background: var(--bg-2); color: var(--fg-dim); font: 700 18px/1 Arial, sans-serif; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-x:hover { color: var(--fg-bright); background: var(--border); }
html[data-theme="terminal"] .modal-x { border-radius: 0; border: 1px solid var(--border); }
html[data-theme="win95"] .modal-x { border-radius: 0; background: #c0c0c0; color: #000; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff; }
/* People tab: title + "Add accounts" button on one row */
.panel-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head-row .panel-h { margin: 0; }

/* Settings modal sections */
.st-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.st-section:first-of-type { margin-top: 6px; padding-top: 0; border-top: 0; }
.st-label { font-size: .7em; letter-spacing: .8px; text-transform: uppercase; color: var(--fg-dim); margin-bottom: 10px; }
.st-account { display: flex; align-items: center; gap: 10px; color: var(--fg-bright); font-weight: 600; }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.st-row + .st-row { margin-top: 4px; }
.st-row > span:first-child { color: var(--fg); font-size: .95em; }
.st-links { display: flex; flex-direction: column; gap: 8px; }
.st-links a { color: var(--accent); text-decoration: none; font-size: .95em; }
.st-links a:hover { text-decoration: underline; }
.st-danger-label { color: var(--danger); }
.st-delete-btn { color: var(--danger); border-color: var(--danger); background: transparent; }
.st-delete-btn:hover { background: var(--danger); color: #fff; }

/* How-it-works help list */
.help-list { margin: 6px 0 0; }
.help-list > div { padding: 12px 0; border-top: 1px solid var(--border); }
.help-list > div:first-child { border-top: 0; padding-top: 4px; }
.help-list dt { font-weight: 700; color: var(--fg-bright); font-size: .95em; margin-bottom: 3px; }
.help-list dd { margin: 0; color: var(--fg-dim); font-size: .9em; line-height: 1.55; }
/* the theme mini-switch inside the settings modal */
#settings-modal .theme-switch { display: inline-flex; gap: 2px; }
.nr-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
@media (max-width: 380px) { .nr-cats { grid-template-columns: 1fr; } }
.nr-cat {
  font-family: var(--font); font-size: .9em; cursor: pointer; text-align: left;
  padding: 10px 12px; color: var(--fg); background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.nr-cat:hover { border-color: var(--accent); color: var(--fg-bright); }
.nr-cat.active { border-color: var(--accent); color: var(--fg-bright); box-shadow: inset 0 0 0 1px var(--accent); }
html[data-theme="terminal"] .nr-cat { border-radius: 0; border-style: dashed; }
html[data-theme="win95"] .nr-cat {
  border-radius: 0; background: #fff; color: #000; border: 2px solid; border-color: #808080 #fff #fff #808080;
}
html[data-theme="win95"] .nr-cat.active { box-shadow: inset 0 0 0 2px #000080; }
.nr-preview { min-height: 1.2em; margin: 2px 0 4px; }

/* --------------------------------------------------------------- trends ---- */
.tr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin-bottom: 6px; }
.tr-tile { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 13px; }
.tr-tile-label { font-size: .64em; text-transform: uppercase; letter-spacing: .8px; color: var(--fg-dim); }
.tr-tile-val { font-size: 1.65em; font-weight: 800; color: var(--fg-bright); line-height: 1.1; margin-top: 3px; }
.tr-tile-sub { font-size: .72em; color: var(--fg-dim); margin-top: 2px; }
.tr-block { margin: 20px 0 4px; }
.tr-h { font-weight: 700; color: var(--fg-bright); margin-bottom: 8px; font-size: 1.02em; }
.tr-chart { width: 100%; height: auto; display: block; overflow: visible; }
.tr-bar { fill: var(--accent); }
.tr-bar-0 { fill: var(--fg-dim); opacity: .16; }
.tr-axis, .tr-alabel, .tr-aval { font-family: var(--font); font-size: 13px; }
.tr-axis { fill: var(--fg-dim); }
.tr-alabel { fill: var(--fg); font-weight: 600; }
.tr-aval { fill: var(--fg-bright); font-weight: 700; }
.tr-empty { text-align: center; padding: 28px 10px; }
.tr-empty-emoji { font-size: 2.3em; line-height: 1; }
.tr-empty p { margin: 8px 0; }
html[data-theme="terminal"] .tr-tile { border-radius: 0; border-style: dashed; }
html[data-theme="win95"] .tr-tile { border-radius: 0; background: #fff; border: 2px solid; border-color: #808080 #fff #fff #808080; }
html[data-theme="normal"] .tr-tile-val { font-family: "Playfair Display", Georgia, serif; }

/* --------------------------------------------------------- unsaved bar ----- */
.dirty-bar {
  position: sticky; top: 10px; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 11px 14px; border: 1px solid var(--accent);
  border-radius: var(--radius); background: var(--bg-2);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.16);
}
.dirty-bar[hidden] { display: none; }
.dirty-text { font-size: .85em; color: var(--fg); min-width: 0; }
.dirty-text b { color: var(--fg-bright); }
#dirty-list { color: var(--fg-dim); }
.dirty-actions { display: flex; gap: 8px; flex-shrink: 0; }
html[data-theme="terminal"] .dirty-bar { border-radius: 0; border-style: dashed; }
html[data-theme="win95"] .dirty-bar { border-radius: 0; }
.dirty-bar.saved { border-color: #22c55e; background: rgba(34, 197, 94, 0.10); }
.dirty-bar.saved .dirty-text b { color: #22c55e; }

/* Delivery double-opt-in notice — same shape as the unsaved bar. */
.verify-notice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--accent);
  border-radius: var(--radius); background: var(--bg-2);
}
.verify-notice[hidden] { display: none; }
#verify-text { font-size: .85em; color: var(--fg); min-width: 0; }
#verify-text b { color: var(--fg-bright); }
.verify-notice.ok { border-color: #22c55e; background: rgba(34, 197, 94, 0.09); }
.window-note { font-size: .82em; color: var(--fg-dim); line-height: 1.5; margin: -2px 0 14px; }
html[data-theme="terminal"] .verify-notice { border-radius: 0; border-style: dashed; }
html[data-theme="win95"] .verify-notice { border-radius: 0; }

/* ===================================================== LANDING (marketing) = */
#landing { display: block; }
/* The marketing landing has its own footer — hide the app's status bar + global
   footer here so they don't stack into a duplicated footer. */
html[data-view="landing"] .screen > .statusbar,
html[data-view="landing"] .screen > .sitefoot { display: none; }
.lp-section { max-width: 1000px; margin: 0 auto; padding: 64px 20px; }
.lp-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.lp-h2 { font-size: clamp(1.85rem, 5vw, 3rem); line-height: 1.08; color: var(--fg-bright); margin: 0 0 12px; }
html[data-theme="normal"] .lp-h2 { font-family: "Helvetica Neue", Helvetica, "Arimo", Arial, sans-serif; font-weight: 800; letter-spacing: -1.2px; }
.lp-lead { font-size: 1.06rem; line-height: 1.6; color: var(--fg-dim); margin: 0; }
.lp-lead b { color: var(--fg); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* hero */
.lp-hero { max-width: 1080px; margin: 0 auto; padding: 40px 20px 24px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.lp-eyebrow { display: inline-block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; color: var(--accent); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; margin-bottom: 16px; background: var(--bg-2); }
.lp-cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.lp-ghost { color: var(--fg-dim); text-decoration: none; font-weight: 600; font-size: .95rem; }
.lp-ghost:hover { color: var(--accent); }

/* hero art: a preview modeled on the actual modern Birdfeed email. */
.lp-hero-art { position: relative; height: 372px; }
.lp-mail { position: absolute; left: 7%; right: 7%; border-radius: 15px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.lp-mail-1 { top: 22px; z-index: 3; }
.lp-mail-2 { top: 42px; left: 16%; right: 1%; height: 255px; z-index: 2; opacity: .45; transform: rotate(3deg); }
.lp-mail-3 { top: 30px; left: 1%; right: 15%; height: 255px; z-index: 1; opacity: .28; transform: rotate(-4deg); }
.lp-inboxbar { display: flex; gap: 8px; align-items: center; padding: 8px 12px; font-size: .67rem; color: var(--fg-dim); border-bottom: 1px solid var(--border); background: var(--bg-2); }
.lp-inboxbar b { color: var(--accent); font-size: .62rem; text-transform: uppercase; letter-spacing: .5px; }
.lp-inbox-dots { margin-left: auto; letter-spacing: 2px; }
.lp-message-head { display: flex; align-items: center; gap: 8px; padding: 10px 13px 4px; }
.lp-bird { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--accent); font-size: .76rem; }
.lp-message-head b, .lp-message-head span { display: block; }
.lp-message-head b { font-size: .75rem; color: var(--fg-bright); }
.lp-message-head span { font-size: .63rem; color: var(--fg-dim); margin-top: 1px; }
.lp-subject { padding: 2px 13px 10px; color: var(--fg-bright); font-size: .88rem; font-weight: 750; border-bottom: 1px solid var(--border); }
.lp-subject span { color: var(--fg-dim); font-size: .68rem; font-weight: 500; }
.lp-email-body { margin: 10px; padding: 12px 14px 8px; background: #fff; color: #222; font-family: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif; border: 1px solid #e4e6e8; box-shadow: 0 5px 12px rgba(0,0,0,.07); }
.lp-email-brand { color: #111; font-size: .92rem; font-weight: 800; letter-spacing: -.2px; }
.lp-email-kicker { color: #6b7280; font-size: .47rem; font-weight: 700; letter-spacing: .55px; margin-top: 4px; }
.lp-email-rule { height: 2px; background: #111; margin: 8px 0; }
.lp-email-body > p { margin: 0 0 7px; font-size: .66rem; line-height: 1.4; }
.lp-email-post { padding: 7px 0; border-top: 1px solid #e4e6e8; }
.lp-email-post b, .lp-email-post span { display: block; }
.lp-email-post b { font-size: .64rem; color: #111; }
.lp-email-post span { color: #6b7280; font-size: .51rem; margin-top: 1px; }
.lp-email-post p { margin: 4px 0 4px; font-size: .62rem; line-height: 1.35; }
.lp-email-post em { color: #2563eb; font-size: .57rem; font-style: normal; font-weight: 700; }

/* before / after compare */
.lp-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; }
.lp-col { position: relative; min-width: 0; }
.lp-tag { display: inline-block; font-size: .74rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; margin-bottom: 12px; }
.lp-tag-bad { color: #d33; background: rgba(221,51,51,.1); border: 1px solid rgba(221,51,51,.3); }
.lp-tag-good { color: var(--accent); background: var(--bg-2); border: 1px solid var(--accent); }
.lp-feed { display: flex; flex-direction: column; gap: 9px; }
.lp-chaos { max-height: 360px; overflow: hidden; gap: 7px; }
.lp-clean { gap: 12px; }
.lp-feedfade { position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.lp-tw { display: flex; gap: 10px; padding: 11px 13px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.lp-chaos .lp-tw { padding: 8px 10px; opacity: .82; }
.lp-chaos .lp-tw:nth-child(3) { transform: rotate(-1deg); }
.lp-chaos .lp-tw:nth-child(6) { transform: rotate(1.2deg); }
.lp-clean .lp-tw { box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.lp-tw i { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--fg-dim); color: var(--panel); font-style: normal; font-weight: 700; font-size: .82rem; display: grid; place-items: center; }
.lp-clean .lp-tw i { background: var(--accent); color: #fff; }
.lp-tw b { display: block; font-size: .86rem; color: var(--fg-bright); }
.lp-tw span { display: block; font-size: .85rem; color: var(--fg-dim); line-height: 1.42; }
.lp-tw .lp-h { font-size: .74rem; color: var(--fg-dim); opacity: .8; margin: 1px 0 3px; }
.lp-promo { position: relative; }
.lp-promo-k { position: absolute; top: 6px; right: 8px; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--fg-dim); opacity: .7; }
.lp-note { font-size: .8rem; color: var(--fg-dim); padding: 6px 10px; border: 1px dashed var(--border); border-radius: 10px; text-align: center; }
.lp-arrow { font-size: 1.8rem; color: var(--accent); font-weight: 700; }

/* steps */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-step { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 24px 20px; }
.lp-step-n { width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: #fff; font-weight: 800; font-size: 1.1rem; display: grid; place-items: center; margin-bottom: 14px; }
.lp-step h3 { margin: 0 0 6px; font-size: 1.08rem; color: var(--fg-bright); }
.lp-step p { margin: 0; font-size: .92rem; line-height: 1.55; color: var(--fg-dim); }

/* theme previews (hardcoded so they SHOW each theme, not the current one) */
.lp-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-tprev { border-radius: 14px; padding: 12px; height: 150px; position: relative; overflow: hidden; border: 1px solid var(--border); }
.lp-tp-bar { font-size: .68rem; font-weight: 700; padding: 5px 8px; border-radius: 6px; margin-bottom: 12px; }
.lp-tp-l { height: 9px; border-radius: 5px; margin: 8px 2px; opacity: .8; }
.lp-tp-l.short { width: 55%; }
.lp-tp-name { position: absolute; bottom: 10px; left: 12px; font-size: .8rem; font-weight: 700; }
.lp-tp-modern { background: #fff; } .lp-tp-modern .lp-tp-bar { background: #eef4ff; color: #2563eb; } .lp-tp-modern .lp-tp-l { background: #d7def0; } .lp-tp-modern .lp-tp-name { color: #111; }
.lp-tp-terminal { background: #0c130c; font-family: monospace; } .lp-tp-terminal .lp-tp-bar { color: #33ff88; padding-left: 0; } .lp-tp-terminal .lp-tp-l { background: #1c5030; } .lp-tp-terminal .lp-tp-name { color: #33ff88; }
.lp-tp-win95 { background: #c0c0c0; } .lp-tp-win95 .lp-tp-bar { background: #000080; color: #fff; } .lp-tp-win95 .lp-tp-l { background: #fff; border: 1px solid #808080; } .lp-tp-win95 .lp-tp-name { color: #000; }

/* final cta */
.lp-final { text-align: center; }
.lp-final .lp-lead { margin: 0 auto 22px; max-width: 460px; }
.lp-final .btn-lg { margin: 0 auto; }

@media (max-width: 820px) {
  .lp-hero { grid-template-columns: 1fr; gap: 8px; }
  .lp-hero-art { display: block; width: min(100%, 480px); height: 350px; margin: 0 auto; }
  .lp-compare { grid-template-columns: 1fr; }
  .lp-arrow { transform: rotate(90deg); margin: 2px auto; }
  .lp-steps, .lp-themes { grid-template-columns: 1fr; }
  .lp-section { padding: 44px 18px; }
}

/* --- Editorial landing: kickers, facts row, crop-mark cards, big wordmark ---- */
.lp-kicker {
  display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.6px;
  color: var(--fg-dim); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; margin-bottom: 18px;
}
html[data-theme="terminal"] .lp-kicker { border-radius: 0; border-style: dashed; color: var(--accent); }
html[data-theme="win95"] .lp-kicker { border-radius: 0; }

.lp-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 34px; margin: 30px 0 0; padding: 24px 0 0; border-top: 1px solid var(--border); }
.lp-facts li { display: flex; flex-direction: column; }
.lp-facts b { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; color: var(--fg-bright); line-height: 1; letter-spacing: -1px; }
.lp-facts span { font-size: .8rem; color: var(--fg-dim); margin-top: 5px; }

/* Crop-mark corner framing (from the reference decks) — four corner ticks drawn
   on a pseudo-element; inset:0 keeps them clip-safe inside cards with overflow. */
.crop { position: relative; }
.crop::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55; --c: var(--fg-dim);
  background:
    linear-gradient(var(--c), var(--c)) top left, linear-gradient(var(--c), var(--c)) top left,
    linear-gradient(var(--c), var(--c)) top right, linear-gradient(var(--c), var(--c)) top right,
    linear-gradient(var(--c), var(--c)) bottom left, linear-gradient(var(--c), var(--c)) bottom left,
    linear-gradient(var(--c), var(--c)) bottom right, linear-gradient(var(--c), var(--c)) bottom right;
  background-repeat: no-repeat;
  background-size: 15px 1.5px, 1.5px 15px, 15px 1.5px, 1.5px 15px, 15px 1.5px, 1.5px 15px, 15px 1.5px, 1.5px 15px;
}
html[data-theme="terminal"] .crop::after { --c: var(--accent); opacity: .5; }

/* Big magazine-style closing wordmark */
.lp-wordmark {
  margin: 34px 0 10px; text-align: center; white-space: nowrap; overflow: hidden;
  font: 800 clamp(2.4rem, 13vw, 10rem)/0.95 "Helvetica Neue", Helvetica, "Arimo", Arial, sans-serif;
  letter-spacing: -3px; color: var(--fg-bright); padding-bottom: .08em;
}
.lp-wordmark em { font-family: "Playfair Display", Georgia, serif; font-style: italic; font-weight: 500; color: var(--fg-dim); letter-spacing: -2px; margin-left: .12em; }
html[data-theme="terminal"] .lp-wordmark, html[data-theme="terminal"] .lp-wordmark em { font-family: "VT323", monospace; letter-spacing: 0; }
html[data-theme="win95"] .lp-wordmark, html[data-theme="win95"] .lp-wordmark em { font-family: Tahoma, "MS Sans Serif", sans-serif; letter-spacing: -1px; }

/* ---- Win95 theme: make the LANDING actually look like Windows 95 ------------- */
/* Everyday MS-Sans-Serif type, square corners, real beveled chrome. */
html[data-theme="win95"] .lp-h2,
html[data-theme="win95"] .hero-title,
html[data-theme="win95"] .lp-lead,
html[data-theme="win95"] .lp-eyebrow,
html[data-theme="win95"] .lp-step h3,
html[data-theme="win95"] .lp-step p,
html[data-theme="win95"] .lp-inboxbar,
html[data-theme="win95"] .lp-message-head b, html[data-theme="win95"] .lp-message-head span,
html[data-theme="win95"] .lp-tw b, html[data-theme="win95"] .lp-tw span {
  font-family: Tahoma, "MS Sans Serif", Geneva, Arial, sans-serif;
}
html[data-theme="win95"] .hero-title { font-weight: 700; letter-spacing: 0; line-height: 1.15; color: #000; }
html[data-theme="win95"] .lp-h2 { font-weight: 700; letter-spacing: 0; }
/* eyebrow → a sunken status-bar tag */
html[data-theme="win95"] .lp-eyebrow {
  border-radius: 0; border: 0; letter-spacing: .3px; color: #000; background: #c0c0c0; padding: 4px 9px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #808080;
}
/* raised gray panels: steps + the email-preview "windows" */
html[data-theme="win95"] .lp-step,
html[data-theme="win95"] .lp-mail {
  border-radius: 0; border: 0; background: #c0c0c0;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
}
html[data-theme="win95"] .lp-step-n {
  border-radius: 0; background: #000080; color: #fff;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #4a90d0;
}
/* email cards get a real blue title bar */
html[data-theme="win95"] .lp-mail-1 { padding: 3px; }
html[data-theme="win95"] .lp-inboxbar {
  background: linear-gradient(90deg, #000080, #1084d0); color: #fff;
  padding: 4px 6px; letter-spacing: 0; text-transform: none; font-weight: 700;
}
html[data-theme="win95"] .lp-inboxbar b { color: #fff; }
html[data-theme="win95"] .lp-bird, html[data-theme="win95"] .lp-tw i { border-radius: 0; background: #000080; color: #fff; }
/* before/after tweet rows = sunken white fields */
html[data-theme="win95"] .lp-tw {
  border-radius: 0; border: 0; background: #fff;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
html[data-theme="win95"] .lp-tag { border-radius: 0; border: 0; box-shadow: inset -1px -1px #fff, inset 1px 1px #808080; }
html[data-theme="win95"] .lp-tag-bad { color: #a00; }
html[data-theme="win95"] .lp-tag-good { color: #000080; }
html[data-theme="win95"] .lp-arrow { color: #000080; }
html[data-theme="win95"] .lp-note { border-radius: 0; border: 1px solid #808080; }
html[data-theme="win95"] .lp-tprev { border-radius: 0; }
/* the final CTA + hero cards: square, no soft shadow */
html[data-theme="win95"] .lp-mail-2, html[data-theme="win95"] .lp-mail-3 { box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }

/* ============================================================ RESPONSIVE === */
/* let long strings (URLs, error text) wrap instead of pushing the page wider */
.muted, #search-status, .panel-h, .hero-points li, .hero-fine, .field > span {
  overflow-wrap: break-word;
}
#search-status { word-break: break-word; }

/* Large / 4K displays — widen the container and scale type + spacing up so the
   dashboard fills the screen instead of sitting as a tiny column in the middle.
   (Placed after the theme blocks so these var overrides win by source order.) */
@media (min-width: 1500px) { .screen { max-width: 1240px; } }
@media (min-width: 1920px) {
  .screen { max-width: 1480px; padding: 24px 26px 72px; }
  html[data-theme="normal"] { --font-size: 17px; }
  html[data-theme="terminal"] { --font-size: 22px; }
}
@media (min-width: 2560px) {
  .screen { max-width: 1840px; padding: 30px 34px 90px; }
  html[data-theme="normal"] { --font-size: 19px; --gap: 20px; }
  html[data-theme="terminal"] { --font-size: 24px; --gap: 20px; }
  html[data-theme="win95"] { --gap: 20px; }
}
/* True 4K / ultrawide: the ladder stopped at 2560, leaving the app a narrow strip
   with huge empty margins. Use more of the width and scale text up to match. */
@media (min-width: 3200px) {
  .screen { max-width: 2200px; padding: 44px 54px 120px; }
  html[data-theme="normal"] { --font-size: 21px; --gap: 26px; }
  html[data-theme="terminal"] { --font-size: 27px; --gap: 26px; }
  html[data-theme="win95"] { --gap: 26px; }
}

@media (max-width: 640px) {
  :root { --gap: 14px; }
  .screen { padding: 14px 12px 44px; }
  .window-body { padding: 14px; }
  html[data-theme="normal"] .window-body { padding: 18px; }
  .row { flex-wrap: wrap; }
  .row .input { flex: 1 1 150px; }
  .actions { gap: 8px; }
  .actions .btn { flex: 1 1 auto; }
}
@media (max-width: 400px) {
  .screen { padding: 10px 8px 30px; }
  .theme-btn { padding: 5px 7px; font-size: 0.72em; }
  .auth-slot { font-size: .8em; }
}
