/* Pushup Portal. Terminal calm: deep blue-black, muted glowing gold, soft white and grey.
   (--purple is the main accent, --blue the cool accent and --red the bright highlight; names kept so every rule follows the palette.) */
:root {
  --bg: #04070d;
  --surface: #0a111d;
  --surface-2: #0f1828;
  --line: #1b2638;
  --line-2: #29374f;
  --text: #e4e6ea;
  --muted: #8b94a3;
  --purple: #d8c27e;
  --blue: #7e9fd4;
  --deep: #12284d;
  --red: #f4f1e8;
  --green: #d8c27e;
  --ink: #0b0d10;
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --glow-p: 0 0 0 1px color-mix(in srgb, var(--purple) 35%, transparent), 0 0 18px color-mix(in srgb, var(--purple) 22%, transparent);
  --glow-b: 0 0 0 1px color-mix(in srgb, var(--blue) 35%, transparent), 0 0 18px color-mix(in srgb, var(--blue) 20%, transparent);
  --glow-r: 0 0 0 1px color-mix(in srgb, var(--red) 45%, transparent), 0 0 18px color-mix(in srgb, var(--red) 25%, transparent);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: 0.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--mono); color: var(--purple); text-shadow: 0 0 10px color-mix(in srgb, var(--purple) 35%, transparent); }
h3 { font-size: 1rem; }
p { margin: 0 0 0.5rem; }
a { color: var(--blue); }
code { font-family: var(--mono); }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; }
.layout { display: block; }
.content { max-width: 720px; margin: 0 auto; padding: 18px 16px 120px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.content.wide { max-width: 1160px; padding-bottom: 40px; }

.masthead { position: sticky; top: 0; z-index: 6; backdrop-filter: blur(12px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand.small { gap: 8px; font-weight: 700; min-width: 0; }
.brand.small span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand img { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--purple) 60%, transparent)); }
.reveal-chip { font-size: 0.8rem; color: var(--muted); white-space: nowrap; font-family: var(--mono); }
.reveal-chip strong { color: var(--purple); text-shadow: 0 0 10px color-mix(in srgb, var(--purple) 60%, transparent); }

/* The 50-day goal bar, always at the top. */
.goalbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 14px;
  padding: 8px 16px; border-top: 1px solid var(--line);
  background: linear-gradient(90deg, color-mix(in srgb, var(--red) 10%, transparent), color-mix(in srgb, var(--purple) 8%, transparent) 50%, color-mix(in srgb, var(--blue) 10%, transparent));
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.goalbar .label { color: var(--muted); }
.goalbar .label b { color: var(--text); }
.goalbar .clock { font-size: 1.15rem; font-weight: 700; color: var(--red); text-shadow: 0 0 12px color-mix(in srgb, var(--red) 65%, transparent); letter-spacing: 0.04em; white-space: nowrap; }
.goalbar .clock small { font-size: 0.65rem; color: var(--muted); text-shadow: none; margin: 0 4px 0 1px; }
.goalbar .meta { color: var(--muted); white-space: nowrap; }
.goalbar .meta b { color: var(--blue); text-shadow: 0 0 8px color-mix(in srgb, var(--blue) 60%, transparent); }

/* Navigation: bottom bar on phones, left rail on wide screens. */
.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 6;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.tabs button {
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 0.78rem; font-weight: 600;
  padding: 6px 2px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabs button .ico { font-size: 1.15rem; line-height: 1; }
.tabs button.on { color: var(--text); background: color-mix(in srgb, var(--purple) 14%, transparent); box-shadow: var(--glow-p); }
.tabs .extra { display: none; }
@media (min-width: 960px) {
  .layout { display: grid; grid-template-columns: 210px 1fr; }
  .tabs {
    position: sticky; top: 110px; align-self: start; height: auto; display: flex; flex-direction: column; gap: 4px;
    background: none; border: 0; padding: 18px 10px; backdrop-filter: none;
  }
  .tabs button { flex-direction: row; justify-content: flex-start; gap: 10px; font-size: 0.95rem; padding: 10px 12px; }
  .tabs .extra { display: flex; }
  .tabs .more-btn { display: none; }
  .content { padding-bottom: 60px; }
}

/* ---------- cards and text ---------- */
.card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 90%, transparent), color-mix(in srgb, var(--surface) 90%, transparent));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  position: relative;
}
.card.glow { box-shadow: var(--glow-p); border-color: color-mix(in srgb, var(--purple) 50%, transparent); }
.card.glow-b { box-shadow: var(--glow-b); border-color: color-mix(in srgb, var(--blue) 50%, transparent); }
.card.glow-r { box-shadow: var(--glow-r); border-color: color-mix(in srgb, var(--red) 55%, transparent); }
.card::before { /* corner tick, a small cyber detail */
  content: ""; position: absolute; top: -1px; left: -1px; width: 14px; height: 14px;
  border-top: 2px solid var(--purple); border-left: 2px solid var(--purple); border-top-left-radius: var(--radius); opacity: 0.8;
}
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error { color: var(--red); margin: 0; }
.error:empty { display: none; }
.eyebrow { font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }
.accent-p { color: var(--purple); text-shadow: 0 0 12px color-mix(in srgb, var(--purple) 55%, transparent); }
.accent-b { color: var(--blue); text-shadow: 0 0 12px color-mix(in srgb, var(--blue) 55%, transparent); }
.accent-r { color: var(--red); text-shadow: 0 0 12px color-mix(in srgb, var(--red) 55%, transparent); }

.hero { text-align: center; padding: 22px 16px; }
.big-countdown { font-family: var(--mono); font-size: clamp(2.2rem, 10vw, 3.6rem); font-weight: 800; letter-spacing: -0.01em; color: var(--purple); text-shadow: 0 0 22px color-mix(in srgb, var(--purple) 55%, transparent); margin: 2px 0 6px; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 14px; }
.stat .v { font-family: var(--mono); font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.stat .unit { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); letter-spacing: 0.04em; margin-top: 2px; }
.stat .k { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.dash-grid { display: grid; gap: 16px; }
@media (min-width: 1100px) { .content.dash { max-width: 1100px; } .dash-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.9rem; min-width: 0; flex: 1; }
.field small { font-weight: 400; }
.field .lead { font-size: 1.05rem; }
input, select, textarea {
  font: inherit; color: var(--text); background: color-mix(in srgb, var(--bg) 70%, transparent);
  border: 1px solid var(--line-2); border-radius: 8px; padding: 11px 12px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--purple); box-shadow: var(--glow-p); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
input[type="file"] { padding: 9px; font-size: 0.88rem; }
input[type="checkbox"] { width: auto; accent-color: var(--purple); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.count-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.count-input { font-family: var(--mono); font-size: 2.4rem; font-weight: 800; text-align: center; max-width: 160px; padding: 8px; color: var(--purple); text-shadow: 0 0 14px color-mix(in srgb, var(--purple) 50%, transparent); }
.bumps { display: flex; gap: 6px; flex-wrap: wrap; }
progress { width: 100%; accent-color: var(--purple); height: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; letter-spacing: 0.02em;
  border-radius: 8px; border: 1px solid transparent; padding: 11px 18px; transition: box-shadow 0.2s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn.small { padding: 6px 12px; font-size: 0.85rem; }
.btn.primary { background: linear-gradient(90deg, color-mix(in srgb, var(--purple), white 12%), color-mix(in srgb, var(--purple), black 18%)); color: var(--ink); box-shadow: 0 0 16px color-mix(in srgb, var(--purple) 45%, transparent); }
.btn.primary:hover { box-shadow: 0 0 24px color-mix(in srgb, var(--purple) 70%, transparent); }
.btn.primary:disabled { opacity: 0.6; cursor: progress; }
.btn.ghost { background: color-mix(in srgb, var(--bg) 40%, transparent); color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--blue); box-shadow: var(--glow-b); }
.btn.hot { background: linear-gradient(90deg, var(--red), color-mix(in srgb, var(--red), var(--muted) 35%)); color: var(--ink); box-shadow: 0 0 16px color-mix(in srgb, var(--red) 45%, transparent); }
.btn.whatsapp { background: rgb(37 211 102 / 0.08); color: #6fd39a; border-color: rgb(37 211 102 / 0.4); }
.btn.whatsapp:hover { box-shadow: 0 0 16px rgb(46 229 157 / 0.35); }
.btn.danger, .link.danger { color: var(--red); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; text-decoration: underline; }

.chip { display: inline-block; font-family: var(--mono); font-size: 0.72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); white-space: nowrap; letter-spacing: 0.03em; }
.chip.on { color: var(--purple); border-color: color-mix(in srgb, var(--purple) 60%, transparent); box-shadow: 0 0 10px color-mix(in srgb, var(--purple) 30%, transparent); }
.chip.red { color: var(--red); border-color: color-mix(in srgb, var(--red) 60%, transparent); }
.chip.pick { cursor: pointer; font-family: inherit; font-size: 0.85rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- sessions and props ---------- */
.session { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.session.pending { border-style: dashed; }
.session-head { display: flex; align-items: center; gap: 14px; }
.session-head .chip { margin-left: auto; }
.count { font-family: var(--mono); font-size: 2rem; font-weight: 800; color: var(--purple); text-shadow: 0 0 14px color-mix(in srgb, var(--purple) 55%, transparent); min-width: 2.5ch; }
.who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.who .muted { font-size: 0.82rem; }
.dedication { font-style: italic; border-left: 2px solid var(--red); background: color-mix(in srgb, var(--red) 7%, transparent); border-radius: 0 8px 8px 0; padding: 6px 10px; margin: 0; }
.note { margin: 0; }
video { width: 100%; max-height: 70vh; border-radius: 8px; background: #000; }
.actions { margin-top: 2px; }
.props { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.prop {
  font: inherit; font-size: 0.9rem; cursor: pointer; border-radius: 999px; padding: 3px 10px;
  background: color-mix(in srgb, var(--bg) 50%, transparent); border: 1px solid var(--line-2); color: var(--text);
}
.prop.on { border-color: var(--red); box-shadow: 0 0 10px color-mix(in srgb, var(--red) 40%, transparent); }
.prop[disabled] { cursor: default; opacity: 0.85; }
.comments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; }
.comments b { color: var(--blue); }
.comment-form { display: flex; gap: 6px; }
.comment-form input { padding: 7px 10px; font-size: 0.9rem; }

.reveal-group { margin-bottom: 16px; }
.reveal-group h3 { margin: 12px 0 8px; font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }

.pulses { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.pulses li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); display: inline-block; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.75); } }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th { text-align: left; font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 6px 6px; white-space: nowrap; }
.board th button { all: unset; cursor: pointer; }
.board th button.on { color: var(--purple); }
.board td { padding: 9px 6px; border-top: 1px solid var(--line); white-space: nowrap; }
.board td.num { font-family: var(--mono); }
.board .rank { color: var(--muted); width: 1.8em; font-family: var(--mono); }
.board tr.top1 td { background: color-mix(in srgb, var(--red) 6%, transparent); }
.board tr.top1 .rank { color: var(--red); text-shadow: 0 0 8px color-mix(in srgb, var(--red) 60%, transparent); }
.board tr.me td:nth-child(2) { color: var(--purple); }
.gain { color: var(--green); font-size: 0.8rem; margin-left: 4px; }

.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, var(--deep), var(--blue), var(--purple)); box-shadow: 0 0 12px color-mix(in srgb, var(--purple) 60%, transparent); }

.intentions, .members, .plain, .shouts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.members li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.shouts li { padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, var(--bg) 45%, transparent); border: 1px solid var(--line); }
.shouts .to { color: var(--purple); }
.shouts .from { color: var(--blue); }
.challenge { margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.challenge.active { border-color: color-mix(in srgb, var(--red) 55%, transparent); box-shadow: var(--glow-r); }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 12px; }
.past { margin-top: 8px; }
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.more-grid button { all: unset; cursor: pointer; }
.more-grid .card { display: flex; flex-direction: column; gap: 4px; min-height: 96px; }
.more-grid .card .ico { font-size: 1.4rem; }

.url { display: block; word-break: break-all; background: color-mix(in srgb, var(--bg) 60%, transparent); padding: 10px 12px; border-radius: 8px; font-size: 0.82rem; border: 1px solid var(--line); }
.code { font-family: var(--mono); font-size: 1.3rem; font-weight: 800; letter-spacing: 0.15em; color: var(--red); text-shadow: 0 0 12px color-mix(in srgb, var(--red) 60%, transparent); padding: 2px 8px; }

/* ---------- chart ---------- */
.spark { width: 100%; height: 120px; display: block; }
.spark .line-w { stroke: var(--purple); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--purple) 80%, transparent)); }
.spark .line-x { stroke: var(--blue); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--blue) 80%, transparent)); }
.spark .grid { stroke: var(--line); }
.legend { display: flex; gap: 14px; font-size: 0.8rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 3px; margin-right: 6px; vertical-align: middle; }

/* ---------- chat mirror ---------- */
.chat { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 55%, transparent); min-height: 50vh; }
.chat .day { align-self: center; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); background: var(--surface-2); padding: 3px 10px; border-radius: 6px; margin: 10px 0 6px; border: 1px solid var(--line); }
.bubble { max-width: min(80%, 520px); padding: 6px 10px 4px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); align-self: flex-start; white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { align-self: flex-end; background: color-mix(in srgb, var(--blue) 16%, transparent); border-color: color-mix(in srgb, var(--blue) 45%, transparent); }
.bubble .sender { font-size: 0.8rem; font-weight: 700; display: block; margin-bottom: 2px; }
.bubble .time { font-family: var(--mono); font-size: 0.65rem; color: var(--muted); float: right; margin: 6px 0 0 10px; }
.bubble.log { border-color: color-mix(in srgb, var(--red) 60%, transparent); box-shadow: 0 0 12px color-mix(in srgb, var(--red) 25%, transparent); }
.bubble .logtag { display: inline-block; font-family: var(--mono); font-size: 0.68rem; color: var(--red); margin-left: 6px; }
.bubble.media { font-style: italic; color: var(--muted); }
.s0 { color: var(--purple); } .s1 { color: var(--blue); } .s2 { color: var(--text); } .s3 { color: var(--red); } .s4 { color: var(--muted); } .s5 { color: var(--blue); }

.auth { max-width: 420px; margin: 0 auto; padding: 48px 16px; display: flex; flex-direction: column; gap: 16px; }
.auth > .link { align-self: center; }

dialog.sheet { border: 1px solid color-mix(in srgb, var(--purple) 60%, transparent); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 22px; max-width: min(440px, calc(100vw - 32px)); box-shadow: var(--glow-p); }
dialog::backdrop { background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(3px); }
.celebrate .day-num { font-family: var(--mono); font-size: 3rem; font-weight: 800; color: var(--red); text-shadow: 0 0 22px color-mix(in srgb, var(--red) 70%, transparent); line-height: 1; margin: 4px 0 10px; }
.celebrate .msg { font-size: 1.15rem; line-height: 1.45; }

#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 96px; z-index: 20; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--surface-2); color: var(--text); border: 1px solid color-mix(in srgb, var(--purple) 60%, transparent); box-shadow: var(--glow-p); padding: 12px 16px; border-radius: 8px; font-size: 0.92rem; transition: opacity 0.5s, transform 0.5s; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- launch quote ---------- */
.splash {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; cursor: pointer;
  background: radial-gradient(600px 400px at 50% 40%, color-mix(in srgb, var(--purple) 18%, transparent), transparent 70%), var(--bg);
  transition: opacity 0.8s ease;
}
.splash.out { opacity: 0; pointer-events: none; }
.splash::after { /* faint scanlines */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgb(255 255 255 / 0.025) 0 1px, transparent 1px 3px);
}
.splash pre {
  margin: 0; font-family: var(--mono); font-size: clamp(1rem, 3.6vw, 1.5rem); line-height: 1.6; white-space: pre-wrap;
  color: var(--text); text-shadow: 0 0 14px color-mix(in srgb, var(--purple) 55%, transparent); max-width: 760px;
  animation: flicker 2.4s ease-in 1;
}
.splash .hint { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
@keyframes flicker { 0% { opacity: 0; } 8% { opacity: 0.8; } 10% { opacity: 0.2; } 14% { opacity: 1; } 100% { opacity: 1; } }

.live-top .live-dot { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; color: var(--red); display: flex; align-items: center; gap: 6px; text-shadow: 0 0 8px color-mix(in srgb, var(--red) 70%, transparent); }
.live-top .live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: pulse 1.6s infinite; }
.grid { display: grid; gap: 20px; }
.grid aside { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 900px) { .grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }

@media (prefers-reduced-motion: reduce) {
  .dot, .live-dot::before, .splash pre { animation: none !important; }
}
.legend i.lw { background: var(--purple); box-shadow: 0 0 6px var(--purple); }
.legend i.lx { background: var(--blue); box-shadow: 0 0 6px var(--blue); }
.login-art { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--purple) 50%, transparent); box-shadow: var(--glow-p); }

/* ---------- overview ---------- */
.overview h1 { font-family: var(--mono); font-size: clamp(1.5rem, 5vw, 2.2rem); line-height: 1.25; margin: 6px 0 10px; }
.overview .lead-line { font-family: var(--mono); font-size: 1.15rem; color: var(--blue); text-shadow: 0 0 10px color-mix(in srgb, var(--blue) 50%, transparent); margin: 0; }
.overview-body p { font-size: 1.08rem; line-height: 1.7; max-width: 62ch; }
.overview-body .power { font-family: var(--mono); font-size: 1.3rem; font-weight: 700; margin: 14px 0 16px; }

.splash pre { position: relative; z-index: 1; background: color-mix(in srgb, var(--bg) 60%, transparent); padding: 18px 22px; border-radius: 8px; }
.vision-text { white-space: pre-wrap; margin-top: 4px; line-height: 1.55; }

/* ---------- colour sliders ---------- */
.colour-row { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-2); box-shadow: 0 0 10px color-mix(in srgb, currentColor 30%, transparent); display: inline-block; }
.slider { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 10px; }
.slider input[type="range"] { -webkit-appearance: none; appearance: none; height: 10px; border-radius: 99px; border: 1px solid var(--line-2); padding: 0; background: var(--surface-2); }
.slider input.hue { background: linear-gradient(90deg, hsl(0 60% 55%), hsl(60 60% 55%), hsl(120 60% 55%), hsl(180 60% 55%), hsl(240 60% 55%), hsl(300 60% 55%), hsl(360 60% 55%)); }
.slider input.light { background: linear-gradient(90deg, #000, #fff); }
.slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--text); border: 2px solid var(--bg); box-shadow: 0 0 8px var(--purple); cursor: pointer; }
.slider input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--text); border: 2px solid var(--bg); box-shadow: 0 0 8px var(--purple); cursor: pointer; }

/* ---------- layers, back to front ----------
   galaxy (40%) + spotlight -> member media blend (50%) -> grid and scanlines -> content */
.galaxy, .galaxy-lit { position: fixed; inset: 0; z-index: -3; background-size: cover; background-position: center; pointer-events: none; }
.galaxy { opacity: 0.4; }
.galaxy-lit {
  opacity: 0; transition: opacity 0.35s ease;
  -webkit-mask-image: radial-gradient(circle 100px at var(--mx, -999px) var(--my, -999px), #000 0%, rgb(0 0 0 / 0.55) 50%, transparent 100%);
  mask-image: radial-gradient(circle 100px at var(--mx, -999px) var(--my, -999px), #000 0%, rgb(0 0 0 / 0.55) 50%, transparent 100%);
}
.galaxy-lit.on { opacity: 1; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgb(255 255 255 / 0.018) 0 1px, transparent 1px 3px),
    linear-gradient(color-mix(in srgb, var(--blue) 5%, transparent) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, color-mix(in srgb, var(--blue) 5%, transparent) 1px, transparent 1px) 0 0 / 32px 100%;
}

/* Member media: newest photo/video underneath, newest handwritten page on top, ink only. */
.backdrop { position: fixed; inset: 0; z-index: -2; opacity: 0.5; pointer-events: none; overflow: hidden; }
.backdrop .bd-base { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; object-fit: cover; }
.bd-fallback { background: linear-gradient(120deg, var(--deep), color-mix(in srgb, var(--purple) 45%, var(--deep)), color-mix(in srgb, var(--blue) 50%, var(--deep)), var(--deep)); background-size: 300% 300%; animation: drift 26s ease-in-out infinite alternate; }
@keyframes drift { from { background-position: 0% 30%; } to { background-position: 100% 70%; } }
.bd-ink {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 35% 40%;
  transform: scale(1.8); transform-origin: 35% 40%;
  filter: invert(1) grayscale(1) contrast(1.9) brightness(1.1) blur(0.6px);
  mix-blend-mode: screen; opacity: 0.45;
  -webkit-mask-image: linear-gradient(115deg, transparent 0%, #000 32%, #000 72%, transparent 100%);
  mask-image: linear-gradient(115deg, transparent 0%, #000 32%, #000 72%, transparent 100%);
}
.bd-fade { position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 40%, transparent) 0%, transparent 35%, transparent 65%, var(--bg) 100%); }
@media (prefers-reduced-motion: reduce) { .bd-fallback { animation: none; } }

/* ---------- profile ---------- */
.content.profile .card { background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(3px); }
.profile-head { display: flex; gap: 16px; align-items: center; }
.profile-head h1 { margin: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack.tight { gap: 4px; }
.avatar {
  flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-size: 2rem; font-weight: 800; color: var(--purple);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--blue) 35%, var(--deep)), var(--bg));
  border: 1px solid var(--purple); box-shadow: var(--glow-p);
}
.quote { margin: 6px 0 0; font-style: italic; line-height: 1.5; }
.quote cite { color: var(--muted); font-style: normal; font-size: 0.85rem; }
.stats.five { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .stats.five { grid-template-columns: repeat(5, 1fr); } }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface-2); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; max-height: none; border-radius: 0; }
.thumb-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer; background: rgb(0 0 0 / 0.65); color: #fff; font-size: 1rem; line-height: 1; }
.library { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.library h3 { margin: 0; }

/* ---------- 50-day bar graph: quiet until hovered ---------- */
.bars { margin: 0; opacity: 0.5; transition: opacity 0.25s ease; }
.bars:hover, .bars:focus-within { opacity: 1; }
.bars-row { display: flex; align-items: flex-end; gap: 2px; height: 64px; }
.bar { flex: 1; min-width: 2px; border-radius: 2px 2px 0 0; background: var(--blue); box-shadow: 0 0 6px color-mix(in srgb, var(--blue) 40%, transparent); }
.bar.met { background: var(--purple); box-shadow: 0 0 6px color-mix(in srgb, var(--purple) 45%, transparent); }
.bar.empty { background: var(--line); box-shadow: none; }
.bar:hover { background: var(--red); }
.bars figcaption { margin-top: 6px; }
.program .lead-line { font-family: var(--mono); font-size: 1.1rem; color: var(--blue); text-shadow: 0 0 10px color-mix(in srgb, var(--blue) 45%, transparent); }
.program-list { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 14px; line-height: 1.7; max-width: 68ch; }

/* ---------- crew chat ---------- */
.content .chat { max-height: 60vh; overflow-y: auto; min-height: 30vh; }
.bubble.character { border-color: color-mix(in srgb, var(--purple) 60%, transparent); box-shadow: 0 0 12px color-mix(in srgb, var(--purple) 22%, transparent); }
.bubble .sender .chip { margin-left: 6px; font-size: 0.62rem; padding: 1px 6px; }
.bubble-x { all: unset; cursor: pointer; margin-left: 6px; color: var(--muted); font-size: 0.9rem; }
.bubble-x:hover { color: var(--text); }
.compose input { padding: 11px 12px; font-size: 1rem; }
.program p { line-height: 1.7; max-width: 68ch; }
.program h3 { font-family: var(--mono); margin-top: 10px; }

/* Handwritten page as a profile background: the photo itself, a little zoomed and softened. */
.backdrop .bd-photo { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; object-fit: cover; object-position: center 35%; transform: scale(1.12); filter: brightness(0.55) contrast(1.08) saturate(0.9); }
.content.profile .card { background: color-mix(in srgb, var(--surface) 84%, transparent); }
@media (min-width: 720px) { .stats.five { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
@media (min-width: 960px) { .tabs button { background: color-mix(in srgb, var(--bg) 55%, transparent); } }

/* ---------- names that open profiles, and profile pictures ---------- */
.namelink { all: unset; cursor: pointer; color: inherit; font: inherit; font-weight: inherit; border-bottom: 1px dotted color-mix(in srgb, currentColor 45%, transparent); }
.namelink:hover, .namelink:focus-visible { color: var(--purple); border-bottom-color: var(--purple); }
.namelink.from { color: var(--blue); } .namelink.to { color: var(--purple); }
.avatar.photo { object-fit: cover; padding: 0; max-height: none; }
.avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 auto; }

/* bar graph: bars rise when the page loads */
.bars.grow .bar { transform-origin: bottom; animation: bar-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes bar-rise { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bars.grow .bar { animation: none; } }

/* leaderboard lock, The Basics, feed */
.locked { text-align: center; padding: 18px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lock-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.locked .muted { margin: 0; }
.basics-list { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 10px; line-height: 1.55; }
.basics-list li::marker { color: var(--purple); font-weight: 700; font-family: var(--mono); }
.feed-item { padding: 14px 16px; }
.feed-head { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.feed-body { margin: 8px 0 0; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.feed-item.pulse .feed-body, .feed-item.join { color: var(--muted); }
