/* ==========================================================================
   mybossisaboomer.com — shared styles
   Sticker / neo-brutalist look in light + dark, and a "Boomer Mode" that
   turns the whole thing into a 1997 GeoCities page (class on <html>).
   ========================================================================== */

:root {
  --bg: #f7f1e6;
  --bg-2: #ffffff;
  --bg-3: #efe6d6;
  --ink: #16130f;
  --ink-2: #6b6357;
  --line: #16130f;
  --accent: #ff4d3d;
  --accent-ink: #ffffff;
  --accent-2: #2e5bff;
  --hi: #ffe14d;
  --ok: #17a34a;
  --danger: #d92d20;
  --shadow: 4px 4px 0 var(--line);
  --shadow-sm: 2px 2px 0 var(--line);
  --radius: 14px;
  --radius-sm: 8px;
  --font-display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1040px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151311;
    --bg-2: #1f1b17;
    --bg-3: #2a2520;
    --ink: #f5efe4;
    --ink-2: #b5ac9e;
    --line: #f5efe4;
    --accent: #ff5a4a;
    --accent-ink: #16130f;
    --accent-2: #6b8cff;
    --hi: #ffd400;
    --shadow: 4px 4px 0 #000;
    --shadow-sm: 2px 2px 0 #000;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151311;
  --bg-2: #1f1b17;
  --bg-3: #2a2520;
  --ink: #f5efe4;
  --ink-2: #b5ac9e;
  --line: #f5efe4;
  --accent: #ff5a4a;
  --accent-ink: #16130f;
  --accent-2: #6b8cff;
  --hi: #ffd400;
  --shadow: 4px 4px 0 #000;
  --shadow-sm: 2px 2px 0 #000;
  color-scheme: dark;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; margin: 0 0 .4em; letter-spacing: .005em; }
h1 { font-size: clamp(34px, 6vw, 64px); }
h2 { font-size: clamp(22px, 3.4vw, 32px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(16px, 2vw, 19px); color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.hi { background: var(--hi); color: #16130f; padding: 0 .22em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- layout helpers ---------- */
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.grid-2 { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.section { padding: 32px 0; }

/* ---------- header ---------- */
.site-header { border-bottom: 2px solid var(--line); background: var(--bg-2); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.wordmark { font-family: var(--font-display); font-size: clamp(15px, 2.6vw, 22px); letter-spacing: .02em; text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; font-weight: 600; padding: 6px 10px; border-radius: 999px; }
.site-nav a:hover { background: var(--bg-3); }
.marquee { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--line); background: var(--bg-2); color: var(--ink);
  padding: 10px 16px; border-radius: 999px; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-sm); text-decoration: none; line-height: 1.2; user-select: none;
  transition: transform .08s ease, box-shadow .08s ease, background .12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--line); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--line); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { box-shadow: none; background: transparent; }
.btn-ghost:hover { background: var(--bg-3); transform: none; box-shadow: none; }
.btn-sm { padding: 6px 12px; font-size: 14px; }
.btn-lg { padding: 14px 22px; font-size: 18px; }
.btn-vote { padding: 6px 12px; font-size: 14px; gap: 6px; }
.btn-vote[aria-pressed="true"] { background: var(--hi); color: #16130f; }
.btn-vote .count { font-variant-numeric: tabular-nums; }
.btn-icon { padding: 6px 10px; box-shadow: none; border-color: transparent; background: transparent; }
.btn-icon:hover { background: var(--bg-3); transform: none; box-shadow: none; }

/* ---------- cards / chips / tags ---------- */
.card { background: var(--bg-2); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card-flat { box-shadow: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--line); border-radius: 999px;
  padding: 4px 12px; font-size: 14px; font-weight: 600; background: var(--bg-2); color: var(--ink);
  cursor: pointer; text-decoration: none; line-height: 1.4;
}
.chip:hover { background: var(--bg-3); }
.chip[aria-pressed="true"], .chip.active { background: var(--ink); color: var(--bg); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line); line-height: 1.5; white-space: nowrap; }
.tabs { display: flex; gap: 4px; border: 2px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg-2); width: max-content; max-width: 100%; overflow-x: auto; }
.tab { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }

/* ---------- forms ---------- */
textarea, input[type="text"], input[type="search"], select {
  width: 100%; border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px;
  font: inherit; background: var(--bg-2); color: var(--ink);
}
textarea { resize: vertical; min-height: 96px; }
textarea:focus, input:focus, select:focus, .btn:focus-visible, .chip:focus-visible, .tab:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
label { font-weight: 700; font-size: 14px; }
.help { font-size: 13px; color: var(--ink-2); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(16px);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px;
  border: 2px solid var(--line); box-shadow: var(--shadow-sm); opacity: 0; z-index: 100;
  font-weight: 600; pointer-events: none; max-width: calc(100vw - 32px); text-align: center;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- footer ---------- */
.site-footer { border-top: 2px solid var(--line); margin-top: 56px; padding: 28px 0 40px; color: var(--ink-2); font-size: 14px; text-align: center; }
.site-footer nav a { color: inherit; }
.visitor-counter { display: none; }

/* ---------- clippy (boomer mode only) ---------- */
.clippy {
  display: none; position: fixed; right: 16px; bottom: 16px; width: min(300px, calc(100vw - 32px));
  background: #ffffe1; color: #000; border: 1px solid #000; padding: 12px;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive; z-index: 90; box-shadow: 4px 4px 0 #000;
}
.clippy-actions { display: flex; gap: 8px; margin-top: 10px; }
.clippy button { font-family: inherit; border: 2px outset #ddd; background: #ddd; padding: 4px 10px; cursor: pointer; color: #000; }
html.boomer-mode .clippy.show { display: block; }

/* ==========================================================================
   BOOMER MODE — 1997 called, it wants its homepage back
   ========================================================================== */
/* Doubled class = specificity (0,2,1) so Boomer Mode beats the dark-mode token block (0,2,0). */
html.boomer-mode.boomer-mode {
  --bg: #c0c0c0; --bg-2: #ffffff; --bg-3: #e0e0e0;
  --ink: #000080; --ink-2: #000000; --line: #000000;
  --accent: #ff0000; --accent-ink: #ffff00; --accent-2: #0000ff; --hi: #00ff00;
  --shadow: none; --shadow-sm: none; --radius: 0; --radius-sm: 0;
  --font-display: "Times New Roman", Times, serif;
  --font-body: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
  color-scheme: light;
}
html.boomer-mode body {
  background-color: #c0c0c0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Ctext x='6' y='34' font-size='26' fill='%23ffffff' opacity='.55'%3E%E2%98%85%3C/text%3E%3C/svg%3E");
}
html.boomer-mode .site-header { background: #008080; border-bottom: 4px ridge #fff; }
html.boomer-mode .wordmark { color: #fff; text-shadow: 2px 2px 0 #000; }
html.boomer-mode .site-nav a { color: #ffff00; text-decoration: underline; }
html.boomer-mode .site-nav a:hover { background: transparent; color: #fff; }
html.boomer-mode h1 { color: #ff0000; text-shadow: 3px 3px 0 #ffff00; text-decoration: underline; }
html.boomer-mode h2 { color: #0000ff; }
html.boomer-mode .hi { background: #00ff00; color: #000; }
html.boomer-mode .card { border: 3px outset #d0d0d0; background: #fff; }
html.boomer-mode .btn, html.boomer-mode .chip, html.boomer-mode .tab { border: 3px outset #e0e0e0; background: linear-gradient(#f4f4f4, #bdbdbd); color: #000; border-radius: 0; box-shadow: none; }
html.boomer-mode .btn:active { border-style: inset; transform: none; }
html.boomer-mode .btn-primary { background: linear-gradient(#ff8080, #ff0000); color: #ffff00; text-shadow: 1px 1px 0 #000; }
html.boomer-mode .chip[aria-pressed="true"], html.boomer-mode .chip.active, html.boomer-mode .tab[aria-selected="true"] { background: #000080; color: #fff; border-style: inset; }
html.boomer-mode .btn-vote[aria-pressed="true"] { background: #00ff00; color: #000; }
html.boomer-mode .tabs { border-radius: 0; border: 3px inset #e0e0e0; background: #fff; }
html.boomer-mode textarea, html.boomer-mode input, html.boomer-mode select { border: 3px inset #e0e0e0; font-family: "Courier New", monospace; }
html.boomer-mode a { color: #0000ee; }
html.boomer-mode a:visited { color: #551a8b; }
html.boomer-mode .marquee { display: block; background: #000080; color: #ffff00; font-weight: 700; overflow: hidden; white-space: nowrap; padding: 4px 0; border-top: 2px solid #000; font-size: 14px; }
html.boomer-mode .marquee span { display: inline-block; padding-left: 100%; animation: marquee 40s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }
html.boomer-mode .visitor-counter { display: inline-block; font-family: "Courier New", monospace; background: #000; color: #0f0; padding: 4px 10px; letter-spacing: .2em; border: 3px inset #888; }
html.boomer-mode .site-footer { background: #008080; color: #fff; border-top: 4px ridge #fff; }
html.boomer-mode .blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
html.boomer-mode .toast { border-radius: 0; background: #ffffe1; color: #000; border: 1px solid #000; font-family: var(--font-body); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.boomer-mode .marquee span, html.boomer-mode .blink { animation: none; }
  .btn, .toast { transition: none; }
}

/* ---------- posts (feed + permalink) ---------- */
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.center .row { justify-content: center; }
.post { padding: 18px 18px 14px; }
.post-text { font-size: clamp(17px, 2.2vw, 20px); line-height: 1.4; margin: 0 0 10px; font-weight: 600; }
.post-prompt { color: var(--ink-2); font-weight: 600; }
.post-body { color: var(--ink); font-weight: 800; }
.post-single .post-text { font-size: clamp(22px, 3.2vw, 30px); line-height: 1.3; }
.post-meta { gap: 10px; }
.post-time { color: inherit; text-decoration: none; }
.post-time:hover { text-decoration: underline; }
.post-actions { gap: 4px; }
.result-card { padding: 32px 20px; }
.result-emoji { font-size: 72px; line-height: 1; margin-bottom: 8px; }
.result-score { font-family: var(--font-display); font-size: clamp(56px, 12vw, 96px); line-height: 1; color: var(--accent); }
.result-score span { font-size: .4em; color: var(--ink-2); }
.result-title { font-size: clamp(26px, 4vw, 40px); margin: 10px 0 8px; }

/* ---------- easter eggs ---------- */
.footer-egg { margin-top: 12px; }
.footer-line { font-style: italic; margin-bottom: 8px; }
.boomer-only { display: none; }
html.boomer-mode .modern-only { display: none; }
html.boomer-mode .boomer-only { display: block; }
.prize-link { display: inline-block; font-weight: 800; color: #ffff00 !important; background: #ff0000; padding: 6px 10px; border: 3px outset #ffcc00; text-decoration: none; margin-bottom: 8px; font-size: 13px; }
.rain { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.rain span { position: absolute; top: -48px; animation: rain-fall 3s linear forwards; }
@keyframes rain-fall { to { transform: translateY(115vh) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rain { display: none; } }

/* ---------- share menu / share nudge / random pick / sparkles / percentile ---------- */
.share-menu { position: fixed; z-index: 60; background: var(--bg-2); border: 2px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 6px; display: grid; gap: 2px; min-width: 190px; }
.share-menu a, .share-menu button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: 6px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); font-size: 14px; }
.share-menu a:hover, .share-menu button:hover { background: var(--bg-3); }
.share-nudge { margin-top: 12px; padding: 10px 12px; border: 2px dashed var(--line); border-radius: var(--radius-sm); background: var(--bg-3); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.share-nudge b { margin-right: auto; }
.random-slot { margin-bottom: 18px; }
.random-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.random-slot .post { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.sparkle { position: fixed; pointer-events: none; z-index: 96; font-size: 14px; transform: translate(-50%, -50%); animation: sparkle .7s ease-out forwards; }
@keyframes sparkle { from { opacity: 1; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, 10px) scale(.4); } }
.percentile { font-weight: 700; margin: 10px 0 0; }
html.boomer-mode .marquee a { color: #00ffff; }
