/* ARC Alumni staff admin, in the ARC house style read off the logo files: forest #1F3020, sand #E5DECE,
   bronze #C08855. Forest on ivory or ivory on forest, never a third ground. The forest rail carries the
   wordmark (the one bold element); everything else is quiet paper. Forest carries the buttons. Bronze
   is spent on the star, the focus ring and the section you are on, nothing else.
   Type: Cinzel for display only (the wordmark's "Alumni", page headlines); Montserrat for the rest.
   Both are self-hosted from /brand (SIL Open Font License). */

@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('/brand/cinzel.woff2') format('woff2-variations'), url('/brand/cinzel.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/brand/montserrat.woff2') format('woff2-variations'), url('/brand/montserrat.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --canvas: #f2ede1;          /* paper */
  --surface: #fcfaf4;         /* a card sits above the paper, so it is lighter */
  --raised: #f5f0e4;          /* hover rows, table heads, disabled fields */
  --ink: #1f3020;             /* forest, the ink itself */
  --muted: #6b6152;           /* warm grey-brown, never a cold grey */
  --line: #e0d8c4;
  --field-line: #b9ad93;      /* inputs need a boundary you can actually see */
  --ever: #1f3020;            /* primary = forest: ivory on forest */
  --ever-strong: #2b4230;
  --ever-soft: #dfe4d5;
  --on-ever: #f4efe3;
  --sun: #c08855;             /* bronze: the star in the logo */
  --sun-soft: #f0dfc6;
  --sun-ink: #7d552f;         /* bronze deepened until it reads as text */
  --band: #e5dece;            /* sand: the ground of the official logo */
  --band-line: #cfc4ac;
  --staff: #8a5f34;
  --staff-soft: #f2e3cf;
  --danger: #b3384c;
  --danger-soft: #f6dee0;
  --on-danger: #ffffff;
  --rail: #1f3020;
  --rail-ink: #f2ede1;
  --rail-muted: #bfb6a1;
  --rail-line: rgba(242, 237, 225, 0.14);
  --rail-hover: rgba(242, 237, 225, 0.07);
  --rail-current: rgba(242, 237, 225, 0.12);
  --focus: color-mix(in srgb, #c08855 70%, transparent);
  --scrim: rgba(20, 32, 22, 0.5);
  --shadow: 0 12px 32px rgba(31, 48, 32, 0.2);
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --top-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --canvas: #142016;
    --surface: #1f3020;
    --raised: #26392a;
    --ink: #f2ede1;
    --muted: #bfb6a1;
    --line: #33493a;
    --field-line: #557058;
    --ever: #e5dece;          /* primary = sand with forest text */
    --ever-strong: #f2ede1;
    --ever-soft: #2e4433;
    --on-ever: #1f3020;
    --sun: #c08855;
    --sun-soft: #3a2e20;
    --sun-ink: #d9a877;
    --band: #2a3e2c;
    --band-line: #3e5641;
    --staff: #d9a877;
    --staff-soft: #3b3022;
    --danger: #e8897c;
    --danger-soft: #3d2420;
    --on-danger: #2a0d08;
    --rail: #0e1810;
    --rail-ink: #f2ede1;
    --rail-muted: #bfb6a1;
    --rail-line: rgba(242, 237, 225, 0.1);
    --rail-hover: rgba(242, 237, 225, 0.06);
    --rail-current: rgba(242, 237, 225, 0.1);
    --scrim: rgba(0, 0, 0, 0.6);
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; height: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 15px/1.55 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
a { color: var(--ever); }
a:hover { color: var(--ever-strong); }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; line-height: 1.45; }
.strong { font-weight: 600; }
.lede { color: var(--muted); max-width: 70ch; }
.dot-sep { display: inline-block; width: 12px; }
.noscript { padding: 40px; text-align: center; }

/* ---- brand lockup: the ARC wordmark, a thin rule, "Alumni" in Cinzel ---- */
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; line-height: 1; }
.brand picture { display: contents; }
.brand img { height: 30px; width: auto; flex: none; }
.brand-rule { width: 1px; align-self: stretch; margin: 3px 0; background: currentColor; opacity: 0.35; }
.brand-word { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: 0.08em; padding-top: 2px; }
.brand-lg img { height: 44px; }
.brand-lg .brand-word { font-size: 23px; }
.brand-lg .brand-rule { margin: 5px 0; }
.brand-rail, .brand-rail:hover { color: var(--rail-ink); }
.brand-rail img { height: 34px; }
/* The lockup fills the rail; the person's role already shows in the rail's foot. */
.side-tag { display: none; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 500; font-size: 14.5px; line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 0.12s, border-color 0.12s;
}
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-sm { min-height: 34px; padding: 0 10px; font-size: 13.5px; gap: 5px; }
.btn-primary { background: var(--ever); color: var(--on-ever); }
.btn-primary:hover:not(:disabled) { background: var(--ever-strong); color: var(--on-ever); }
.btn-quiet { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-quiet:hover:not(:disabled) { background: var(--raised); color: var(--ink); border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); }
.btn-danger { background: var(--danger); color: var(--on-danger); }
.btn-danger:hover:not(:disabled) { color: var(--on-danger); filter: brightness(0.95); }
.btn-danger-quiet { background: var(--surface); border-color: var(--line); color: var(--danger); }
.btn-danger-quiet:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }
.btn-link { background: none; color: var(--ever); padding: 0 2px; min-height: 32px; }
.btn-link:hover { text-decoration: underline; }
.btn:has(> svg:only-child) { padding: 0 9px; }

/* ---- inputs ---- */
.input {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--field-line); background: var(--surface); color: var(--ink); font-size: 15px;
}
textarea.input { resize: vertical; line-height: 1.45; }
.input:focus { outline: none; border-color: var(--ever); box-shadow: 0 0 0 3px var(--focus); }
.input:disabled { background: var(--raised); color: var(--muted); }
.input::placeholder { color: color-mix(in srgb, var(--muted) 85%, transparent); }
.input-narrow { width: auto; min-width: 180px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 500; font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14.5px; }
.check input { width: 18px; height: 18px; accent-color: var(--ever); margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-items: start; }
.span-2 { grid-column: 1 / -1; }
.form-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---- chips, pills, tags ---- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 13px; font-size: 13.5px; font-weight: 500; cursor: pointer; min-height: 34px; }
.chip:hover { border-color: color-mix(in srgb, var(--muted) 50%, var(--line)); }
.chip-on, .chip-on:hover { background: var(--ever-soft); border-color: var(--ever); color: var(--ever); font-weight: 600; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--ever-soft); color: var(--ever); }
.pill-warn { background: var(--sun-soft); color: var(--sun-ink); }
.pill-bad { background: var(--danger-soft); color: var(--danger); }
.pill-muted { background: var(--canvas); color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; padding: 2px 7px; font-size: 12px; font-weight: 600; background: var(--canvas); color: var(--muted); white-space: nowrap; }
.tag-announcement, .tag-team { background: var(--staff-soft); color: var(--staff); }
.tag-milestone, .tag-alerts { background: var(--sun-soft); color: var(--sun-ink); }
.tag-topic { background: var(--band); color: var(--ink); font-weight: 500; white-space: normal; overflow-wrap: anywhere; }
.tag-event, .tag-pin { background: var(--ever-soft); color: var(--ever); }
.tag-report, .tag-user { background: var(--danger-soft); color: var(--danger); }
.tag-post, .tag-comment, .tag-story { background: var(--canvas); color: var(--ink); }

/* ---- avatars and names ---- */
.av { flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; font-weight: 600; color: #fff; user-select: none; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-sm { width: 32px; height: 32px; font-size: 12.5px; }
.av-md { width: 40px; height: 40px; font-size: 14.5px; }
.av-lg { width: 52px; height: 52px; font-size: 18px; }
.av-xl { width: 76px; height: 76px; font-size: 26px; }
.av-t1 { background: #3d5a40; } .av-t2 { background: #8a5f34; } .av-t3 { background: #2f5d7c; }
.av-t4 { background: #6b4a7a; } .av-t5 { background: #7a3e3e; } .av-t6 { background: #5a6b2a; }
.av-staff { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--staff); }
.who { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 7px; text-decoration: none; color: var(--ink); min-width: 0; }
a.who:hover .who-main { text-decoration: underline; }
.who-main { font-weight: 600; overflow-wrap: anywhere; }
.who-sub { color: var(--muted); font-size: 13.5px; }
.who-team { color: var(--staff); font-weight: 600; }

/* ---- shell ---- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--rail); color: var(--rail-ink); overflow-y: auto; }
.side-head { display: flex; align-items: center; gap: 10px; padding: 24px 20px 14px; }
.side-head .btn { display: none; margin-left: auto; }
.side-tag { font-size: 12px; font-weight: 600; color: var(--rail-muted); border: 1px solid var(--rail-line); border-radius: 999px; padding: 1px 8px; }
.side .btn-quiet { background: transparent; border-color: var(--rail-line); color: var(--rail-ink); }
.side .btn-quiet:hover:not(:disabled) { background: var(--rail-hover); color: var(--rail-ink); border-color: var(--rail-muted); }
.nav { display: flex; flex-direction: column; padding: 6px 12px 16px; }
.nav-group { font-size: 12.5px; font-weight: 600; color: var(--rail-muted); padding: 14px 12px 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 6px 12px; min-height: 38px; border-radius: 10px; color: var(--rail-ink); text-decoration: none; font-weight: 500; font-size: 14.5px; }
.nav-item:hover { background: var(--rail-hover); color: var(--rail-ink); }
.nav-item[aria-current] { background: var(--rail-current); color: var(--rail-ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--sun); }
.nav-item[aria-current] svg { color: var(--sun); }
.nav-item svg { flex: none; }
.nav-badge { margin-left: auto; display: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--sun); color: #1f3020; }
.nav-badge-on { display: inline-flex; }
.nav-badge-danger { background: var(--danger); color: var(--on-danger); }
.side-foot { margin-top: auto; border-top: 1px solid var(--rail-line); padding: 14px 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-foot .btn { flex: none; }
.side-me { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.side-me b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-me span { font-size: 13px; color: var(--rail-muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; min-height: var(--top-h); padding: 10px 32px; background: color-mix(in srgb, var(--canvas) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.menu-btn { display: none; }
.shell[data-page='members'] .top-search { display: none; }
.top-title { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: 0.03em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-search { position: relative; width: min(340px, 40vw); }
.top-search-ico, .toolbar-search > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.top-search-input { padding-left: 38px; background: var(--surface); }
.view { padding: 24px 32px 72px; width: 100%; max-width: 1180px; }
.view:focus { outline: none; }

/* ---- page building blocks ---- */
.page { display: flex; flex-direction: column; gap: 20px; }
.page-narrow { max-width: 780px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.pad { padding: 20px; }
.card-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.card-sub { margin-bottom: 8px; }
.section-title { font-size: 15px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar .lede { flex: 1 1 320px; }
.toolbar-search { position: relative; flex: 1 1 260px; }
.toolbar-search .input { padding-left: 38px; }
.count { margin-left: auto; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.list-foot { display: flex; justify-content: center; padding: 14px 0 0; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.pl-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.pl-row:last-child { border-bottom: 0; }
.pl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.call-text { display: inline-flex; gap: 6px; flex: none; }
.facts { display: grid; grid-template-columns: 130px 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.body { white-space: pre-wrap; overflow-wrap: anywhere; }
.clamp { display: -webkit-box; -webkit-line-clamp: 5; line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* states */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px 20px; color: var(--muted); text-align: center; }
.empty svg { color: var(--ever); }
.empty p { max-width: 46ch; }
.loading { display: flex; justify-content: center; padding: 36px 0; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ever); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.errbox { background: var(--danger-soft); color: var(--danger); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }

/* ---- dashboard: the reach-out band (the one bold moment) ---- */
.band { border-radius: 20px; padding: 24px 24px 22px; color: var(--ink); background: var(--band); border: 1px solid var(--band-line); }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.band-title { font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.15; }
.band-date { color: var(--sun-ink); font-weight: 500; }
.band-empty { color: var(--sun-ink); max-width: 60ch; }
.reach-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.reach { display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: 'ico av text' 'act act act'; align-items: center; gap: 10px 12px; background: var(--surface); border-radius: 14px; padding: 14px; border: 1px solid var(--line); }
.reach > .reach-ico { grid-area: ico; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sun-soft); color: var(--sun-ink); }
.reach > .av { grid-area: av; }
.reach-text { grid-area: text; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.reach-what { font-size: 13px; font-weight: 600; color: var(--sun-ink); }
.reach-quote { font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reach-act { grid-area: act; display: flex; flex-wrap: wrap; gap: 6px; }
.reach-help { border-color: var(--danger); box-shadow: inset 4px 0 0 var(--danger); }
.reach-help > .reach-ico { background: var(--danger-soft); color: var(--danger); }
.reach-help .reach-what { color: var(--danger); }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); }
a.stat:hover { border-color: var(--ever); color: var(--ink); }
.stat-n { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat-l { color: var(--muted); font-size: 13.5px; }
.stat-warn .stat-n { color: var(--sun-ink); }
.stat-bad .stat-n { color: var(--danger); }

/* ---- approvals ---- */
.approval { display: flex; flex-direction: column; gap: 14px; }
.approval-head { display: flex; align-items: center; gap: 14px; }

/* ---- members ---- */
.mtable { overflow: hidden; }
.mlist { list-style: none; margin: 0; padding: 0; }
.mrow {
  display: grid; grid-template-columns: 40px minmax(170px, 2.2fr) minmax(90px, 1.1fr) minmax(80px, 1fr) minmax(90px, 0.9fr) minmax(90px, 1fr);
  gap: 12px; align-items: center; width: 100%; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--line);
  background: none; text-align: left; cursor: pointer; font-size: 14.5px; min-height: 60px;
}
.mlist li:last-child .mrow { border-bottom: 0; }
button.mrow:hover { background: var(--raised); }
.mrow-head { cursor: default; min-height: 40px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--raised); }
.mrow-name { display: flex; flex-direction: column; min-width: 0; }
.mrow-name b, .mrow-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow-name b { font-weight: 600; }
.mrow-name span { font-size: 13.5px; }
.mrow-seen { font-size: 13.5px; }

/* ---- drawer + dialog ---- */
.scrim { position: fixed; inset: 0; z-index: 60; background: var(--scrim); display: grid; place-items: center; padding: 16px; }
.scrim-drawer { display: flex; justify-content: flex-end; align-items: stretch; padding: 0; }
.drawer { width: min(580px, 100%); height: 100%; background: var(--surface); overflow-y: auto; box-shadow: var(--shadow); animation: slide-in 0.18s ease-out; overscroll-behavior: contain; }
.drawer-wide { width: min(760px, 100%); }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0.6; } }
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 12px 22px; background: var(--surface); border-bottom: 1px solid var(--line); }
.drawer-title { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-body { padding: 20px 22px 40px; display: flex; flex-direction: column; gap: 16px; }
.dialog { width: min(460px, 100%); background: var(--surface); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; animation: pop 0.14s ease-out; }
@keyframes pop { from { transform: scale(0.97); opacity: 0.4; } }
.dialog h2 { font-size: 19px; font-weight: 600; }
.dialog-text { color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.lightbox { padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 10px; object-fit: contain; }
.lightbox .btn { position: fixed; top: 16px; right: 16px; }

/* member panel */
.m-hero { display: flex; align-items: center; gap: 16px; }
.m-hero-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.m-username { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; line-height: 1.2; }
.m-real { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); }
.m-pills { display: flex; gap: 6px; margin: 2px 0; }
.contact-row { display: flex; flex-wrap: wrap; gap: 8px; }
.m-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.m-actions:empty { display: none; }
.m-tab-body { display: flex; flex-direction: column; gap: 12px; }

/* ---- posts, comments ---- */
.post { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.post-head { display: flex; align-items: flex-start; gap: 10px; }
.post-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.post-photo img { width: 100%; max-height: 380px; object-fit: cover; border-radius: 10px; background: var(--canvas); }
.post-event { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--ever-soft); color: var(--ever); text-decoration: none; }
.post-event span { display: flex; flex-direction: column; color: var(--ink); }
.post-stats { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.post-reacts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; color: var(--ink); }
.post-react { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; font-variant-numeric: tabular-nums; }
.post-react-emoji { font-size: 15.5px; line-height: 1; }
.post-stat-comments { display: inline-flex; align-items: center; gap: 4px; }
.post-comments { border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; }
.photo-btn { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; }
.thumb img { width: 112px; height: 112px; object-fit: cover; border-radius: 10px; }
.card.is-pinned { box-shadow: inset 4px 0 0 var(--ever); }
.card.is-removed, .comment.is-removed { background: var(--raised); border-style: dashed; }
.card.is-hidden { border-color: var(--sun); }
.is-removed .body, .is-removed .comment-body { color: var(--muted); }
.state-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.card.comment { padding: 14px 16px; }
.comment-compact { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment-compact:last-child { border-bottom: 0; }
.comment-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.comment-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.comment-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.on-post q { color: var(--ink); }
.composer { display: flex; flex-direction: column; gap: 10px; }
.composer-text { min-height: 84px; }
.composer-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.composer-foot .btn-primary { margin-left: auto; min-width: 96px; }
.composer-foot label.btn { cursor: pointer; }
.composer-preview { display: flex; gap: 8px; align-items: flex-start; }
.composer-preview:empty { display: none; }
.composer-preview img { max-height: 160px; border-radius: 10px; }

/* ---- topics ---- */
.topic-filter { flex: 0 1 240px; width: auto; min-width: 0; }
.topic-form { grid-template-columns: minmax(0, 1fr) 120px; }
.topic-emoji-input { text-align: center; font-size: 20px; padding: 4px 6px; }
.topic-checks { display: flex; flex-direction: column; gap: 12px; }
.topic-check { display: flex; align-items: flex-start; gap: 10px; }
.topic-check input { margin-top: 2px; flex: none; }
.topic-check-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.topic-check-text b { font-weight: 600; }
.topic-list-sub { margin-bottom: 4px; }
.topic-list { list-style: none; margin: 0; padding: 0; }
.topic-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.topic-row:last-child { border-bottom: 0; padding-bottom: 0; }
.topic-emoji { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); display: grid; place-items: center; font-size: 22px; line-height: 1; color: var(--muted); }
.topic-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.topic-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.topic-name b { font-weight: 600; overflow-wrap: anywhere; }
.topic-blurb { overflow-wrap: anywhere; }
.topic-actions { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.topic-row.is-archived .topic-emoji { opacity: 0.6; }
.topic-row.is-archived .topic-name b { color: var(--muted); }

/* ---- stories ---- */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.story { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.story-face { position: relative; aspect-ratio: 9 / 16; max-height: 340px; display: flex; align-items: center; justify-content: center; background: var(--canvas); }
.story-photo { cursor: zoom-in; }
.story-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-text { padding: 16px; }
.story-words { color: #fff; font-weight: 600; font-size: 17px; line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
.story-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 10px; color: #fff; font-size: 13.5px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); }
.story-mini { width: 128px; border-radius: 10px; }
.story-mini .story-words { font-size: 13px; }
.story-info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.story-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.story.is-removed .story-face, .story.is-expired .story-face { opacity: 0.55; }
.story.is-hidden { border-color: var(--sun); }

/* ---- reports ---- */
.report { display: flex; flex-direction: column; gap: 12px; }
.report-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.reasons li { background: var(--raised); border-radius: 8px; padding: 6px 10px; font-size: 14px; }
.report-target { background: var(--raised); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.report-target-head { display: flex; align-items: center; gap: 8px; }

/* ---- inbox ---- */
.inbox { display: grid; grid-template-columns: 330px minmax(0, 1fr); height: calc(100vh - var(--top-h) - 56px); min-height: 460px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.inbox-list { border-right: 1px solid var(--line); overflow-y: auto; }
.threads { list-style: none; margin: 0; padding: 0; }
.thread { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); min-height: 64px; }
.thread:hover { background: var(--raised); color: var(--ink); }
.thread-on, .thread-on:hover { background: var(--ever-soft); }
.thread-urgent { box-shadow: inset 4px 0 0 var(--danger); }
.thread-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.thread-top { display: flex; justify-content: space-between; gap: 8px; }
.thread-top b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-unread .thread-top b { font-weight: 700; }
.thread-last { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-unread .thread-last { color: var(--ink); }
.thread-flag { color: var(--danger); flex: none; }
.inbox-conv { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.conv-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.conv-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.conv-back { display: none; }
.conv-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); padding: 24px; text-align: center; }
.conv-empty svg { color: var(--ever); }
.msgs { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--canvas); }
.msg { position: relative; max-width: min(78%, 560px); padding: 9px 13px 7px; border-radius: 18px; }
.msg-alum { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg-staff { align-self: flex-end; background: var(--ever); color: var(--on-ever); border-bottom-right-radius: 6px; }
.msg-urgent { background: var(--danger-soft); border: 1.5px solid var(--danger); }
.msg-flag { display: flex; align-items: center; gap: 4px; color: var(--danger); font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.msg-staff .msg-meta { color: color-mix(in srgb, var(--on-ever) 78%, transparent); }
.msg-del { position: absolute; top: 50%; transform: translateY(-50%); background: var(--surface); opacity: 0; min-height: 30px; }
.msg-alum .msg-del { right: -42px; }
.msg-staff .msg-del { left: -42px; }
.msg:hover .msg-del, .msg-del:focus-visible { opacity: 1; }
@media (hover: none) { .msg-del { opacity: 1; } }
.msg-day { align-self: center; font-size: 12px; color: var(--muted); padding: 6px 10px; }
.reply { display: flex; gap: 8px; align-items: flex-end; padding: 12px 16px 6px; border-top: 1px solid var(--line); }
.reply-text { flex: 1; min-height: 44px; max-height: 180px; }
.reply-hint { padding: 0 16px 10px; }

/* ---- events ---- */
.event { display: flex; gap: 16px; align-items: flex-start; }
.event-date { flex: none; width: 58px; height: 62px; border-radius: 12px; background: var(--ever-soft); color: var(--ever); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.event-mon { font-size: 12.5px; font-weight: 600; }
.event-day { font-size: 24px; font-weight: 700; }
.event-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.event-main .row-actions { margin-top: 6px; }
.event-title { font-size: 17px; font-weight: 600; }
.event.is-past { opacity: 0.85; }
.attendees { width: 100%; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }

/* ---- activity log ---- */
.log { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.log li { display: grid; grid-template-columns: 140px 170px minmax(0, 1fr); gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.log li:last-child { border-bottom: 0; }
.log-when { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.log-who { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-what { overflow-wrap: anywhere; }
.m-tab-body .log { border: 1px solid var(--line); border-radius: 12px; }

/* ---- sign in ---- */
.signin { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; background: var(--rail); }
.signin-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 32px 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.signin-title { font-size: 21px; font-weight: 600; margin-top: 10px; }
.signin-note { color: var(--danger); background: var(--danger-soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.signin-note:empty { display: none; }
.signin-sent { color: var(--muted); }
.signin-form { display: flex; flex-direction: column; gap: 14px; }
.signin-form .btn-primary { min-height: 46px; }
.input-code { font-size: 22px; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; }
.signin-foot { color: var(--rail-muted); font-size: 13.5px; margin-top: 18px; text-align: center; }
.dev-slot:empty { display: none; }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--surface); padding: 12px 18px; border-radius: 12px; font-weight: 500; max-width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow); transition: opacity 0.18s, transform 0.18s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-bad { background: var(--danger); color: var(--on-danger); }

/* ---- phones and small tablets ---- */
@media (max-width: 1000px) {
  .two-col { grid-template-columns: 1fr; }
  .mrow { grid-template-columns: 40px minmax(150px, 2fr) minmax(80px, 1fr) minmax(90px, 0.9fr) minmax(80px, 1fr); }
  .mrow-fac { display: none; }
  .mrow-head > :nth-child(3) { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0; z-index: 70; height: 100%; width: 100%; transform: translateX(-100%); visibility: hidden; transition: transform 0.2s ease-out, visibility 0.2s; border-right: 0; }
  .side.side-open { transform: none; visibility: visible; }
  .side-head .btn { display: inline-flex; }
  .nav-item { min-height: 48px; font-size: 16px; }
  .menu-btn { display: inline-flex; min-height: 44px; min-width: 44px; }
  .top { padding: 8px 16px; gap: 10px; flex-wrap: wrap; }
  .top-title { font-size: 19px; }
  .top-search { order: 3; width: 100%; }
  .view { padding: 16px 16px 72px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
  .chip { min-height: 40px; }
  .input { min-height: 46px; font-size: 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .pad { padding: 16px; }
  .band { padding: 18px 16px; border-radius: 18px; }
  .band-title { font-size: 25px; }
  .reach-list { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-n { font-size: 24px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts dd { margin-bottom: 8px; }
  .mrow-head { display: none; }
  .mrow { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: 'av name status' 'av sober seen'; row-gap: 2px; padding: 12px 14px; }
  .mrow > .av { grid-area: av; align-self: start; }
  .mrow-name { grid-area: name; }
  .mrow-status { grid-area: status; justify-self: end; }
  .mrow-sober { grid-area: sober; font-size: 13.5px; color: var(--muted); }
  .mrow-seen { grid-area: seen; justify-self: end; }
  .drawer, .drawer-wide { width: 100%; }
  .drawer-body { padding: 16px 16px 40px; }
  .m-hero .av-xl { width: 60px; height: 60px; font-size: 21px; }
  .pl-row { flex-wrap: wrap; }
  .pl-row > .pl-main { flex: 1 1 calc(100% - 50px); }
  .pl-row .call-text { margin-left: 44px; }
  .post { padding: 14px; }
  .post-head { flex-wrap: wrap; }
  .post-tags { width: 100%; justify-content: flex-start; padding-left: 50px; }
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .inbox { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 140px); border-radius: 14px; }
  .inbox-conv { display: none; }
  .inbox-open .inbox-conv { display: flex; }
  .inbox-open .inbox-list { display: none; }
  .conv-back { display: inline-flex; padding: 0 6px; }
  .conv-head { padding: 8px 10px; }
  .msg { max-width: 86%; }
  .msg-del { position: static; transform: none; opacity: 1; margin-top: 4px; background: transparent; border-color: transparent; color: inherit; min-height: 32px; padding: 0 4px; }
  .msg-staff .msg-del { color: var(--on-ever); }
  .hide-sm { display: none; }
  .log li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'what what' 'who when'; gap: 2px 10px; }
  .log-what { grid-area: what; }
  .log-who { grid-area: who; color: var(--muted); font-size: 13.5px; }
  .log-when { grid-area: when; }
  .event { gap: 12px; }
  .toolbar-search { flex-basis: 100%; }
  .count { margin-left: 0; }
  .topic-filter { flex-basis: 100%; }
  .topic-form { grid-template-columns: minmax(0, 1fr) 88px; }
  .topic-row { flex-wrap: wrap; gap: 10px 12px; }
  .topic-main { flex-basis: calc(100% - 56px); }
  .topic-actions { width: 100%; justify-content: flex-start; padding-left: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- invite: what was sent, and the text ready to send ----------------------------------------- */
.page-stack { display: flex; flex-direction: column; gap: 20px; }
.invite-done { background: var(--band); border: 1px solid var(--band-line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.invite-done .card-title { margin: 0; }
.invite-done p { margin: 0; }
.invite-msg { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.pl-row .row-actions { margin-left: auto; }
@media (max-width: 640px) {
  .pl-row { flex-wrap: wrap; }
  .pl-row .row-actions { margin-left: 0; width: 100%; }
}
