/* ==========================================================================
   SINRR community — design system
   Black, charcoal, deep crimson, warm white. Fraunces for voice, Inter for UI.
   ========================================================================== */

@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/fraunces-latin-wght-normal.woff2') format('woff2'); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/fraunces-latin-wght-italic.woff2') format('woff2'); font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #0b0a0b;
  --bg-2: #100e10;
  --surface: #161316;
  --surface-2: #1d191d;
  --surface-3: #262126;
  --line: rgba(255, 240, 235, .09);
  --line-2: rgba(255, 240, 235, .16);
  --text: #f7f1ee;
  --muted: #bdb3b0;
  --muted-2: #8f8582;
  --crimson: #a3122a;
  --crimson-deep: #6e0a1b;
  --crimson-bright: #e2475f;
  --crimson-glow: rgba(226, 71, 95, .22);
  --crimson-wash: rgba(163, 18, 42, .14);
  --ember: #f2b8a0;
  --ok: #6fcf97;
  --warn: #f2c94c;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .45);
  --max: 1180px;
  --header-h: 68px;
  --player-h: 0px;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 1rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  padding-bottom: var(--player-h);
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(163, 18, 42, .16), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(110, 10, 27, .12), transparent 60%),
    linear-gradient(180deg, #0d0b0d, var(--bg) 40%);
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--crimson-bright); text-underline-offset: 3px; }
a:hover { color: #ff6b80; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 560; line-height: 1.12; letter-spacing: -.012em; margin: 0 0 .5em; font-variation-settings: "SOFT" 60, "WONK" 0; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
::selection { background: var(--crimson); color: #fff; }
:focus-visible { outline: 2px solid var(--crimson-bright); outline-offset: 3px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }

[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: 12px; z-index: 1000; background: var(--text); color: var(--bg); padding: .7rem 1rem; border-radius: 10px; transform: translateY(-200%); transition: transform .2s; }
.skip-link:focus { transform: none; }
.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.narrow { width: min(100% - 32px, 760px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.stack > * + * { margin-top: var(--gap, 1rem); }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.eyebrow { display: inline-block; font: 700 .72rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ember); margin-bottom: .9rem; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 62ch; }
.serif { font-family: var(--serif); }

/* ---- header ---------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 10, 11, .78); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line); }
.site-header .wrap { height: var(--header-h); display: flex; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); flex: none; }
.brand img { width: 40px; height: 40px; }
.brand span { font: 700 .95rem/1 var(--sans); letter-spacing: .22em; }
.nav { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.nav a, .nav button.linkish { white-space: nowrap; color: var(--muted); text-decoration: none; font-weight: 550; font-size: .93rem; padding: .55rem .75rem; border-radius: 10px; transition: color .2s, background .2s; position: relative; }
.nav a:hover, .nav button.linkish:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .25rem; height: 2px; border-radius: 2px; background: var(--crimson-bright); }
.nav .badge { position: absolute; top: 2px; right: 0; }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); border-radius: 10px; width: 44px; height: 40px; cursor: pointer; }
.menu-toggle span { display: block; height: 2px; width: 18px; background: var(--text); margin: 4px auto; border-radius: 2px; transition: transform .25s, opacity .25s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.account-menu { position: relative; }
.account-menu > button { display: flex; align-items: center; gap: .5rem; background: none; border: 1px solid transparent; border-radius: 999px; padding: 3px 10px 3px 3px; cursor: pointer; }
.account-menu > button:hover { border-color: var(--line-2); }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; padding: .4rem; box-shadow: var(--shadow); display: none; }
.dropdown.open { display: block; animation: pop .16s ease-out; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: .6rem .8rem; border-radius: 9px; color: var(--text); text-decoration: none; background: none; border: 0; cursor: pointer; font-size: .93rem; }
.dropdown a:hover, .dropdown button:hover { background: rgba(255, 255, 255, .06); }
.dropdown hr { margin: .35rem 0; }

@media (max-width: 1140px) {
  .menu-toggle { display: block; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; background: rgba(13, 11, 13, .98); border-bottom: 1px solid var(--line); padding: .6rem 16px 1rem; display: none; margin: 0; max-height: calc(100vh - var(--header-h)); overflow: auto; }
  .nav.open { display: flex; animation: drop .2s ease-out; }
  .nav a, .nav button.linkish { padding: .85rem .6rem; font-size: 1rem; }
  .nav a[aria-current="page"]::after { left: .6rem; right: auto; width: 24px; bottom: .45rem; }
  .header-actions { margin-left: auto; order: 2; }
  .menu-toggle { margin-left: .4rem; order: 3; }
  .header-actions .btn-join-text { display: none; }
}

/* ---- buttons & forms ------------------------------------------------------- */
.btn { --b: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: 0 1.15rem; border-radius: 12px; border: 1px solid var(--line-2); background: var(--b); color: var(--text); font-weight: 650; font-size: .95rem; text-decoration: none; cursor: pointer; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .26); color: var(--text); }
.btn:active { transform: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(180deg, #b8162f, var(--crimson)); border-color: #c92a43; color: #fff; box-shadow: 0 10px 30px rgba(163, 18, 42, .28), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-primary:hover { background: linear-gradient(180deg, #c81d38, #ad1430); box-shadow: 0 14px 34px rgba(163, 18, 42, .38), inset 0 1px 0 rgba(255, 255, 255, .16); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(255, 255, 255, .05); color: var(--text); border-color: transparent; }
.btn-danger { background: transparent; border-color: rgba(226, 71, 95, .45); color: #ff8a9b; }
.btn-danger:hover { background: rgba(226, 71, 95, .12); color: #ffb3bf; }
.btn-sm { min-height: 36px; padding: 0 .8rem; font-size: .86rem; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 0 1.6rem; font-size: 1.02rem; border-radius: 14px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: none; border: 1px solid transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.icon-btn svg, .btn svg { width: 18px; height: 18px; flex: none; }

.field { display: grid; gap: .4rem; }
.field > label, .label { font-weight: 600; font-size: .9rem; }
.field .hint { color: var(--muted-2); font-size: .82rem; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; background: #0f0d0f; border: 1px solid var(--line-2); border-radius: 12px;
  padding: .7rem .9rem; color: var(--text); transition: border-color .2s, box-shadow .2s, background .2s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--crimson-bright); box-shadow: 0 0 0 4px var(--crimson-glow); background: #121012; }
.input[aria-invalid="true"] { border-color: #ff6b80; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.4rem; }
.check { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--crimson); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02); color: var(--muted); font-size: .88rem; cursor: pointer; user-select: none; transition: all .15s; }
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.chip[aria-pressed="true"], .chip.on { background: var(--crimson-wash); border-color: rgba(226, 71, 95, .6); color: #ffd6dc; }
.chip.static { cursor: default; }
.form-error { color: #ff97a6; font-size: .9rem; min-height: 1.2em; }
.form-ok { color: var(--ok); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin: 0; }
legend { padding: 0 .4rem; font-weight: 650; }
.seg { display: inline-flex; background: #0f0d0f; border: 1px solid var(--line-2); border-radius: 12px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: .45rem .85rem; border-radius: 9px; font-size: .88rem; color: var(--muted); }
.seg input:checked + span { background: var(--surface-3); color: var(--text); }
.seg input:focus-visible + span { outline: 2px solid var(--crimson-bright); }

/* ---- surfaces ---------------------------------------------------------------- */
.card { background: linear-gradient(160deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 2.4vw, 1.6rem); }
.card.pad-lg { padding: clamp(1.4rem, 3.5vw, 2.4rem); }
.card.link { text-decoration: none; color: inherit; display: block; transition: transform .2s, border-color .2s, background .2s; }
.card.link:hover { transform: translateY(-3px); border-color: rgba(226, 71, 95, .35); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section-sm { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.page-head { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--crimson); color: #fff; font-size: .72rem; font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 650; letter-spacing: .02em; border: 1px solid var(--line-2); color: var(--muted); background: rgba(255, 255, 255, .03); }
.pill.crimson { color: #ffc2cb; border-color: rgba(226, 71, 95, .45); background: var(--crimson-wash); }
.pill.ok { color: #a9ebc4; border-color: rgba(111, 207, 151, .4); }
.notice { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); font-size: .93rem; }
.notice.warn { border-color: rgba(242, 201, 76, .35); background: rgba(242, 201, 76, .06); }
.notice.crimson { border-color: rgba(226, 71, 95, .4); background: var(--crimson-wash); }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: .1rem; }
.empty { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--text); }
.divider-dot { color: var(--muted-2); padding: 0 .35rem; }

/* ---- avatars ---------------------------------------------------------------- */
.avatar { --s: 40px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; object-fit: cover; background: var(--surface-3); display: inline-grid; place-items: center; font: 650 calc(var(--s) * .4)/1 var(--sans); color: #fff; border: 1px solid rgba(255, 255, 255, .1); overflow: hidden; }
.avatar.sm { --s: 30px; }
.avatar.lg { --s: 72px; }
.avatar.xl { --s: 120px; }
.avatar.ring { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--crimson); }
.online-dot { position: relative; }
.online-dot::after { content: ""; position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg); }

/* ---- hero & home --------------------------------------------------------------- */
.hero { position: relative; padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5rem); overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 50%; top: 42%; width: min(900px, 120vw); aspect-ratio: 1; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(163, 18, 42, .22), transparent 62%); filter: blur(10px); z-index: -1; animation: breathe 9s ease-in-out infinite; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.7rem); font-weight: 520; }
.hero h1 em { font-style: italic; color: #ffb3bf; font-weight: 450; }
.hero .wordmark { width: min(420px, 80vw); margin-bottom: 1.4rem; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .6)); }
.hero-art { position: relative; display: grid; place-items: center; }
.hero-art img { width: min(440px, 80vw); filter: drop-shadow(0 30px 70px rgba(163, 18, 42, .35)); animation: float 10s ease-in-out infinite; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; }
.brand-line { font-family: var(--serif); font-style: italic; color: var(--ember); font-size: 1.15rem; margin-top: 1.2rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; text-align: center; } .hero-actions { justify-content: center; } .hero .lede { margin-inline: auto; } .hero-art { order: -1; } .hero-art img { width: min(240px, 60vw); } .hero .wordmark { margin-inline: auto; } }

.feature-card { position: relative; overflow: hidden; min-height: 240px; display: flex; flex-direction: column; }
.feature-card .icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--crimson-wash); border: 1px solid rgba(226, 71, 95, .35); color: #ffb3bf; margin-bottom: 1.1rem; }
.feature-card .icon svg { width: 22px; height: 22px; }
.feature-card p { color: var(--muted); }
.feature-card .more { margin-top: auto; font-weight: 650; color: var(--crimson-bright); }
.feature-card.secondary { background: linear-gradient(160deg, rgba(163, 18, 42, .13), rgba(255, 255, 255, .01)); }
.steps { counter-reset: s; display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps li { list-style: none; counter-increment: s; position: relative; padding-top: 4.4rem; }
.steps li::before { content: counter(s); position: absolute; top: 1.3rem; left: clamp(1.1rem, 2.4vw, 1.6rem); width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; font: 600 1.1rem var(--serif); color: #fff; background: var(--crimson); box-shadow: 0 8px 20px rgba(163, 18, 42, .35); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.promise { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.promise > div { background: var(--bg-2); padding: 1.4rem; }
.promise strong { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 560; margin-bottom: .3rem; }
.promise span { color: var(--muted); font-size: .92rem; }
@media (max-width: 860px) { .promise { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .promise { grid-template-columns: 1fr; } }
.quote-band { text-align: center; padding: clamp(3rem, 8vw, 5.5rem) 0; border-block: 1px solid var(--line); background: linear-gradient(180deg, rgba(163, 18, 42, .08), transparent); }
.quote-band p { font: italic 400 clamp(1.5rem, 3.4vw, 2.5rem)/1.3 var(--serif); max-width: 24ch; margin: 0 auto; }
.places { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }

/* ---- footer ------------------------------------------------------------------ */
#site-footer { display: block; margin-top: 4rem; }
#site-footer[hidden] { display: none; }
.site-footer { border-top: 1px solid var(--line); background: #090809; }
.site-footer .wrap { padding: 3rem 0 2rem; display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 2rem; }
.site-footer h4 { font: 700 .75rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-footer a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.site-footer a:hover { color: var(--text); }
.footer-base { border-top: 1px solid var(--line); padding: 1.2rem 0 calc(1.2rem + var(--player-h)); color: var(--muted-2); font-size: .82rem; }
.footer-base .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0; }
.crisis-strip { background: #140b0e; border-top: 1px solid rgba(226, 71, 95, .2); color: #f0c9cf; font-size: .88rem; text-align: center; padding: .7rem 16px; }
.crisis-strip a { color: #fff; font-weight: 650; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .wrap > :first-child { grid-column: 1 / -1; } }

/* ---- auth & onboarding ----------------------------------------------------------- */
.auth-shell { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 2.5rem 16px; }
.auth-card { width: min(100%, 460px); }
.auth-card h1 { font-size: 2rem; }
.wizard-progress { display: flex; gap: .4rem; margin-bottom: 1.5rem; }
.wizard-progress span { height: 4px; flex: 1; border-radius: 4px; background: var(--surface-3); }
.wizard-progress span.on { background: var(--crimson-bright); }
.prompt-card { text-align: left; width: 100%; cursor: pointer; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 1rem; color: var(--text); transition: border-color .2s, background .2s; }
.prompt-card:hover, .prompt-card[aria-pressed="true"] { border-color: rgba(226, 71, 95, .6); background: var(--crimson-wash); }

/* ---- modal & toasts ---------------------------------------------------------------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(5, 4, 5, .72); backdrop-filter: blur(6px); z-index: 200; display: grid; place-items: center; padding: 16px; animation: fade .2s ease-out; }
.modal { width: min(100%, 560px); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; padding: clamp(1.2rem, 3vw, 2rem); box-shadow: var(--shadow); animation: rise .25s cubic-bezier(.2, .8, .2, 1); }
.modal.wide { width: min(100%, 760px); }
.modal h2 { font-size: 1.6rem; }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1.4rem; }
.toasts { position: fixed; left: 50%; bottom: calc(18px + var(--player-h)); transform: translateX(-50%); z-index: 300; display: grid; gap: .5rem; width: min(calc(100% - 32px), 440px); pointer-events: none; }
.toast { pointer-events: auto; background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 14px; padding: .8rem 1rem; box-shadow: var(--shadow); animation: rise .25s ease-out; font-size: .93rem; }
.toast.error { border-color: rgba(226, 71, 95, .5); }
.toast.ok { border-color: rgba(111, 207, 151, .45); }

/* ---- member app layout ---------------------------------------------------------- */
.app-grid { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; align-items: start; }
@media (max-width: 980px) { .app-grid { grid-template-columns: 1fr; } }
.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-top: 1px solid var(--line); }
.list-item { display: flex; gap: .8rem; align-items: center; padding: .85rem .2rem; text-decoration: none; color: inherit; }
a.list-item:hover { background: rgba(255, 255, 255, .025); }
.room-card { display: flex; gap: 1rem; align-items: flex-start; }
.room-card .glyph { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-3); flex: none; font-size: 1.5rem; }
.room-card.gathering .glyph { background: linear-gradient(140deg, var(--crimson), var(--crimson-deep)); }
.member-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; }
.member-card .chips { justify-content: center; }
.profile-head { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; }
@media (max-width: 560px) { .profile-head { grid-template-columns: 1fr; text-align: center; justify-items: center; } }

/* ---- chat ------------------------------------------------------------------------- */
.chat { display: grid; grid-template-rows: auto 1fr auto; height: calc(100vh - var(--header-h) - var(--player-h)); height: calc(100dvh - var(--header-h) - var(--player-h)); }
.chat-layout { display: grid; grid-template-columns: 1fr 260px; height: 100%; min-height: 0; }
@media (max-width: 900px) { .chat-layout { grid-template-columns: 1fr; } .chat-side { display: none; } .chat-side.open { display: block; position: fixed; inset: var(--header-h) 0 0 auto; width: min(88vw, 320px); z-index: 60; box-shadow: var(--shadow); } }
.chat-head { display: flex; align-items: center; gap: .8rem; padding: .8rem 16px; border-bottom: 1px solid var(--line); background: rgba(16, 14, 16, .9); }
.chat-head h1 { font-size: 1.25rem; margin: 0; }
.chat-main { display: grid; grid-template-rows: 1fr auto; min-height: 0; }
.chat-log { overflow-y: auto; padding: 1rem 16px 1.5rem; overscroll-behavior: contain; scroll-behavior: smooth; }
.chat-side { border-left: 1px solid var(--line); background: var(--bg-2); overflow-y: auto; padding: 1rem; }
.msg { display: grid; grid-template-columns: 40px 1fr; gap: .75rem; padding: .35rem .5rem; border-radius: 12px; position: relative; animation: msgIn .25s ease-out; }
.msg:hover { background: rgba(255, 255, 255, .025); }
.msg.cont { padding-top: 0; }
.msg.cont .avatar { visibility: hidden; height: 0; }
.msg .meta { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.msg .who { font-weight: 650; color: var(--text); text-decoration: none; font-size: .95rem; }
.msg .who:hover { text-decoration: underline; }
.msg .when { color: var(--muted-2); font-size: .76rem; }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; color: #ece4e1; }
.msg.mine .who { color: #ffc2cb; }
.msg.deleted .body { color: var(--muted-2); font-style: italic; }
.msg.pending { opacity: .55; }
.msg .actions { position: absolute; right: .4rem; top: -.6rem; display: none; gap: 2px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 2px; }
.msg:hover .actions, .msg:focus-within .actions { display: flex; }
@media (hover: none) { .msg .actions { display: flex; position: static; background: none; border: 0; grid-column: 2; padding: 0; } }
.msg .actions .icon-btn { width: 30px; height: 30px; }
.scam-warning { grid-column: 2; margin-top: .4rem; }
.day-sep { text-align: center; color: var(--muted-2); font-size: .76rem; margin: 1.2rem 0 .6rem; letter-spacing: .08em; text-transform: uppercase; }
.composer { border-top: 1px solid var(--line); padding: .75rem 16px calc(.75rem + env(safe-area-inset-bottom)); background: rgba(16, 14, 16, .95); }
.composer form { display: flex; gap: .6rem; align-items: flex-end; }
.composer textarea { min-height: 46px; max-height: 180px; resize: none; overflow-y: hidden; }
.composer form, .composer .welcome-banner, .composer .status { max-width: 960px; margin-inline: auto; }
.chat-log > * { max-width: 960px; margin-inline: auto; }
.composer .status { font-size: .8rem; color: var(--muted-2); min-height: 1.1em; margin-top: .35rem; }
.conn { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--muted-2); }
.conn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.conn.live::before { background: var(--ok); }
.conn.off::before { background: #ff6b80; }
.welcome-banner { margin: .5rem 0 1rem; }

/* ---- stories ------------------------------------------------------------------- */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
.story-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.story-card .cover { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--crimson-deep), #1a1418 70%); display: grid; place-items: center; overflow: hidden; }
.story-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.story-card .cover .mono { font: italic 500 2.6rem var(--serif); color: rgba(255, 220, 226, .55); }
.story-card .body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.story-card h3 { font-size: 1.25rem; margin: 0; }
.story-card p { color: var(--muted); font-size: .93rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-card .by { margin-top: auto; padding-top: .6rem; color: var(--muted-2); font-size: .84rem; }
.reader { font-family: var(--serif); font-size: clamp(1.08rem, 1.5vw, 1.2rem); line-height: 1.8; color: #efe7e4; }
.reader h2 { font-size: 1.7rem; margin: 2.4rem 0 1rem; }
.reader h3 { font-size: 1.35rem; margin: 2rem 0 .8rem; }
.reader p { margin: 0 0 1.25em; }
.reader blockquote { margin: 1.6rem 0; padding: .2rem 0 .2rem 1.3rem; border-left: 3px solid var(--crimson); color: var(--muted); font-style: italic; }
.reader img { border-radius: 14px; margin: 1.8rem auto; }
.reader ul, .reader ol { padding-left: 1.3rem; margin: 0 0 1.25em; }
.reader .chapter { scroll-margin-top: calc(var(--header-h) + 20px); }
.reader .chapter.reading { background: linear-gradient(90deg, rgba(163, 18, 42, .09), transparent 70%); border-radius: 12px; }
.story-cover-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; max-height: 440px; }
.story-cover-hero img { width: 100%; height: 100%; object-fit: cover; }
.toc { position: sticky; top: calc(var(--header-h) + 1rem); }
.toc a { display: block; padding: .35rem .6rem; color: var(--muted); text-decoration: none; border-left: 2px solid var(--line); font-size: .9rem; }
.toc a:hover, .toc a.on { color: var(--text); border-left-color: var(--crimson-bright); }
.content-note { border-left: 3px solid var(--warn); }

/* editor */
.editor-toolbar { display: flex; gap: 2px; flex-wrap: wrap; padding: .35rem; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--surface-2); }
.editor-toolbar + .textarea { border-radius: 0 0 12px 12px; min-height: 320px; font-family: var(--serif); font-size: 1.08rem; line-height: 1.75; }
.editor-toolbar .icon-btn { width: 34px; height: 34px; font-weight: 700; font-size: .9rem; }
.chapter-editor { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; background: rgba(255, 255, 255, .015); }
.save-state { font-size: .82rem; color: var(--muted-2); }
.preview { border: 1px dashed var(--line-2); border-radius: 12px; padding: 1.2rem; }

/* ---- audio player (persistent) -------------------------------------------------- */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: rgba(18, 15, 18, .97); backdrop-filter: blur(16px); border-top: 1px solid var(--line-2); padding: .6rem 16px calc(.6rem + env(safe-area-inset-bottom)); display: none; box-shadow: 0 -12px 40px rgba(0, 0, 0, .4); }
.player.open { display: block; animation: rise .25s ease-out; }
.player .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; }
.player .title { font-weight: 650; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .sub { font-size: .78rem; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .controls { display: flex; gap: .25rem; align-items: center; }
.player .play { width: 46px; height: 46px; border-radius: 50%; background: var(--crimson); color: #fff; border: 0; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 20px rgba(163, 18, 42, .4); }
.player .play:hover { background: #c01b36; }
.player .play svg { width: 20px; height: 20px; }
.player .progress { display: flex; align-items: center; gap: .6rem; font-size: .76rem; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.player input[type=range] { flex: 1; accent-color: var(--crimson-bright); height: 4px; }
.player .extras { display: flex; gap: .4rem; align-items: center; }
.player .extras select { min-height: 34px; padding: .2rem 1.8rem .2rem .6rem; font-size: .82rem; border-radius: 9px; }
.ai-label { font-size: .72rem; color: var(--ember); }
@media (max-width: 760px) {
  .player .wrap { grid-template-columns: 1fr auto; }
  .player .info { grid-column: 1 / -1; order: -1; }
  .player .extras .voice { display: none; }
}
.listen-bar { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; padding: .9rem 1rem; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); }

/* ---- founder story ---------------------------------------------------------------- */
.founder-hero { text-align: center; padding: clamp(3rem, 9vw, 6rem) 0 2rem; }
.founder-hero img { width: min(200px, 50vw); margin: 0 auto 1.5rem; filter: drop-shadow(0 20px 50px rgba(163, 18, 42, .35)); }
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--crimson), transparent); }
.timeline .section-item { position: relative; padding-left: 2.6rem; margin-bottom: 3.5rem; }
.timeline .section-item::before { content: ""; position: absolute; left: 4px; top: .55rem; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--crimson-bright); }
.date-label { font: 700 .74rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ember); }
.media-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 1.6rem 0; }
.media-grid figure { margin: 0; }
.media-grid img { border-radius: 14px; width: 100%; }
.media-grid figcaption { color: var(--muted); font-size: .86rem; margin-top: .5rem; }
.video-frame { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- admin ------------------------------------------------------------------------ */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; overflow-x: auto; }
.tabs a, .tabs button { padding: .8rem 1rem; color: var(--muted); text-decoration: none; border: 0; background: none; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; font-weight: 600; font-size: .92rem; }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { color: var(--text); border-bottom-color: var(--crimson-bright); }
.stat { padding: 1.1rem 1.2rem; }
.stat b { display: block; font: 600 2rem/1.1 var(--serif); }
.stat span { color: var(--muted); font-size: .86rem; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted-2); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.table-wrap { overflow-x: auto; }
.report { border-left: 3px solid var(--crimson); }
.meter { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--crimson), var(--crimson-bright)); }

/* ---- loading -------------------------------------------------------------------------- */
.skeleton { background: linear-gradient(90deg, var(--surface) 0, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 12px; min-height: 1rem; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); border-top-color: var(--crimson-bright); animation: spin .8s linear infinite; }
.page-loading { display: grid; place-items: center; min-height: 50vh; }

/* ---- motion ------------------------------------------------------------------------------ */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0ms); }
[data-reveal].in { opacity: 1; transform: none; }
.route-enter { animation: routeIn .35s ease-out; }
@keyframes routeIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(4px); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes breathe { 0%, 100% { opacity: .75; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
@media print { .site-header, .site-footer, .player, .crisis-strip { display: none; } body { background: #fff; color: #000; } }

/* ---- The Story Behind Sinrr ------------------------------------------------ */
.founder-cover { text-align: center; padding: clamp(3rem, 9vw, 6rem) 0 clamp(2rem, 5vw, 3rem); background: radial-gradient(600px 300px at 50% 30%, rgba(163, 18, 42, .18), transparent 70%); border-bottom: 1px solid var(--line); margin-bottom: clamp(2rem, 5vw, 3rem); }
.founder-cover h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); font-weight: 520; margin-top: .4rem; }
.founder-mark { margin: 0 auto 1.2rem; filter: drop-shadow(0 20px 50px rgba(163, 18, 42, .4)); }
.founder-subtitle { font: italic 400 clamp(1.15rem, 2.2vw, 1.45rem)/1.4 var(--serif); color: var(--ember); margin: -.2rem 0 1rem; }
.founder-layout { display: grid; grid-template-columns: 250px minmax(0, 720px); gap: clamp(2rem, 5vw, 4rem); justify-content: center; align-items: start; }
.founder-toc { position: sticky; top: calc(var(--header-h) + 1rem); }
.founder-toc details summary { cursor: pointer; list-style: none; }
.founder-toc details summary::-webkit-details-marker { display: none; }
.founder-toc .toc { margin-top: .8rem; max-height: calc(100vh - 200px); overflow: auto; }
.founder-toc .toc a { padding: .45rem .7rem; line-height: 1.35; }
.founder-section { padding: .5rem 0 2.5rem; scroll-margin-top: calc(var(--header-h) + 20px); border-radius: 14px; transition: background .4s; }
.founder-section + .founder-section { border-top: 1px solid var(--line); padding-top: 2.5rem; }
.founder-section h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: .4rem 0 1.4rem; }
.founder-section.reading { background: linear-gradient(90deg, rgba(163, 18, 42, .08), transparent 75%); }
.founder-section .reader p { margin-bottom: 1.05em; }
.founder-section .listen-from { margin-top: .4rem; }
@media (max-width: 980px) {
  .founder-layout { grid-template-columns: minmax(0, 1fr); }
  .founder-toc { position: sticky; top: var(--header-h); z-index: 20; margin: 0 -16px; }
  .founder-toc details { border-radius: 0; border-left: 0; border-right: 0; background: rgba(16, 14, 16, .96); backdrop-filter: blur(10px); padding: .8rem 16px; }
  .founder-toc details summary::after { content: " ▾"; color: var(--muted-2); }
  .founder-toc .toc { max-height: 60vh; }
}
.toc-num { color: var(--crimson-bright); font-variant-numeric: tabular-nums; font-weight: 650; }
h1 > svg, h2 > svg, h3 > svg, h4 > svg, .eyebrow > svg, p > svg { width: 1em; height: 1em; vertical-align: -0.12em; display: inline-block; }
