/* src/web/site/assets/site.css — Northshore Roleplay community website */
:root {
  color-scheme: dark;
  --paper: #0b1320;
  --paper-2: #0f1a2a;
  --card: #13213a;
  --ink: #eef3f9;
  --ink-2: #b2bfd0;
  --ink-3: #7b8aa0;
  --rule: rgba(148, 170, 205, .14);      /* hairlines: quiet, not boxes */
  --rule-strong: rgba(148, 170, 205, .24);
  --surface: rgba(255, 255, 255, .035);  /* cards on the page */
  --surface-2: rgba(255, 255, 255, .06); /* hovered / raised */
  --accent: #4aa8ff;          /* sky blue from the logo */
  --accent-2: #9fd2ff;
  --accent-ink: #06101c;
  --navy: #070d17;
  --ok: #4cc38a;
  --warn: #e5b04b;
  --red: #e5484d;
  --blue: #3e8cff;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --sans: "Barlow", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 12px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 16px; } }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.lightbar { height: 3px; background: linear-gradient(90deg, var(--red) 0 50%, var(--blue) 50% 100%); }

/* ---------- header ---------- */
header.site { position: sticky; top: 0; z-index: 20; background: rgba(11, 19, 32, .86); -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--rule); }
header.site .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: 48px; height: 48px; }
.brand-name { font: 700 22px/1 var(--display); letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; }
.brand-name small { display: block; font: 500 10.5px/1.4 var(--mono); color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; margin-top: 3px; white-space: nowrap; }
nav.primary ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(16px, 1.5vw, 22px); }
nav.primary li { white-space: nowrap; }
/* Signed in, the header also holds the bell, messages, and the account menu: there's no room for the slogan, and the nav folds into Menu sooner. */
header.site.has-account .brand-name small { display: none; }
@media (max-width: 1240px) { header.site.has-account nav.primary { display: none; } header.site.has-account .menu { display: block; } }
nav.primary a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink-2); padding: 6px 0; border-bottom: 2px solid transparent; }
nav.primary a:hover { color: var(--ink); border-bottom-color: var(--accent); }
nav.primary a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.header-cta { font-size: 14px; }

/* mobile menu — <details>, so it works without JavaScript */
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; font: 600 14px/1 var(--sans); padding: 10px 14px; border: 1px solid var(--rule); border-radius: 6px; color: var(--ink); }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { border-color: var(--accent); }
.menu ul { list-style: none; margin: 0; padding: 8px; position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 20px 40px -20px rgba(0,0,0,.8); }
.menu a { display: block; padding: 10px 12px; border-radius: 6px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.menu a:hover, .menu a[aria-current="page"] { background: var(--paper-2); color: var(--ink); }
@media (max-width: 1120px) { nav.primary { display: none; } .menu { display: block; } }
@media (max-width: 640px) { .header-cta, .header-signin { display: none; } }
@media (max-width: 480px) { .brand-name small { display: none; } .account-name { display: none; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 8px; font: 600 15px/1 var(--sans); letter-spacing: .01em; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); color: var(--accent-ink); }
.btn-ghost { border-color: rgba(238, 243, 249, .32); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: rgba(238, 243, 249, .6); background: var(--surface-2); color: var(--ink); }
.btn-small { padding: 9px 14px; font-size: 14px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- UI foundation: spacing, action groups, reveals, focus ---------- */
/* Spacing steps used by the rules below (and by new components). */
:root { --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; }

/* Buttons: one height per size so neighbors line up, labels never spill out. */
.btn { min-height: 46px; text-align: center; line-height: 1.15; }
.btn-small { min-height: 38px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* A row of actions (buttons, one-button forms, reveals): always spaced, wraps on small screens. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.actions > form { margin: 0; }
.table td.actions { white-space: nowrap; }
@media (max-width: 600px) { .table td.actions { white-space: normal; } }

/* Space between running text or headings and the controls that follow them.
   :where() keeps this at zero specificity, so a component's own margins win. */
:where(p, .hint, .sub, .lede, ul, ol, dl, .table-wrap, h2, h3, .info-list, .flash) + :where(.btn, form, .form-actions, .actions, details.reveal, .inline-form) { margin-top: var(--space-4); }
:where(.btn, form, .form-actions, .actions, details.reveal) + :where(.hint) { margin-top: var(--space-3); }
:where(form, .form-actions, .actions, details.reveal, .inline-form) + :where(form, .form-actions, .actions, details.reveal) { margin-top: var(--space-3); }
/* ...and between controls and the content that follows them. */
:where(.btn, form, .form-actions, .actions, details.reveal, .inline-form, .case-actions) + :where(.portal-two, .table-wrap, .group-title, h2, h3, .info-list, .staff-grid, .roster-grid, ul, ol, dl) { margin-top: var(--space-5); }
/* A checkbox or radio row straight above a button. */
:where(.check, .choice-row, .choice-stack, fieldset) + :where(.btn, button, .form-actions, .actions) { margin-top: var(--space-3); }

/* <details class="reveal">: a button that opens a short confirmation form.
   The button reads "Cancel" while open (see revealButton in layout.js). */
details.reveal > summary { list-style: none; cursor: pointer; display: inline-flex; width: max-content; max-width: 100%; }
details.reveal > summary::-webkit-details-marker { display: none; }
.reveal-open { display: none; }
details.reveal[open] > summary .reveal-closed { display: none; }
details.reveal[open] > summary .reveal-open { display: inline; }
details.reveal[open] > summary { background: transparent; color: var(--ink-2); border-color: var(--rule); }
details.reveal > form, details.reveal > .reveal-panel { margin-top: var(--space-3); padding: var(--space-4); background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); max-width: 100%; }

/* Scrolling boxes contain their absolutely positioned children (e.g. .sr-only labels), which would otherwise widen the page. */
:where(.profile-tabs, .settings-nav, .bell-pop ul, .dm-thread, .table-wrap, .ts-picks, .ts-checklist, .cal-people) { position: relative; }

/* Keyboard focus is always visible. */
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

/* ---------- home hero ---------- */
.hero { padding: 84px 0 80px; border-bottom: 1px solid var(--rule); background: radial-gradient(900px 460px at 78% 20%, rgba(74, 168, 255, .14), transparent 70%), radial-gradient(700px 380px at 0% 0%, rgba(62, 140, 255, .08), transparent 70%); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.eyebrow { font: 500 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
.hero h1 { font: 700 clamp(48px, 6.8vw, 92px)/.92 var(--display); text-transform: uppercase; letter-spacing: .005em; margin: 0 0 26px; max-width: 13ch; }
.hero h1 em, .page-hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 19px; color: var(--ink-2); max-width: 54ch; margin: 0 0 32px; }
.hero-note { margin-top: 22px; font-size: 14px; color: var(--ink-3); }
.hero-logo { justify-self: center; position: relative; width: min(100%, 440px); aspect-ratio: 1; }
.hero-logo::before { content: ""; position: absolute; inset: 6%; border-radius: 50%; border: 1px solid var(--rule); transform: scale(1.12); }
.hero-logo::after { content: ""; position: absolute; inset: 6%; border-radius: 50%; border: 1px dashed rgba(74, 168, 255, .25); transform: scale(1.26); }
.hero-logo img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .55)); }
@media (max-width: 920px) {
  .hero { padding: 48px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-logo { width: min(72%, 320px); order: -1; }
}

/* ---------- inner page hero ---------- */
.page-hero { padding: 72px 0 56px; border-bottom: 1px solid var(--rule); background: radial-gradient(800px 360px at 85% 0%, rgba(74, 168, 255, .12), transparent 70%); }
.crumbs { font: 500 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 18px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.page-hero h1 { font: 700 clamp(44px, 6vw, 80px)/.94 var(--display); text-transform: uppercase; margin: 0 0 20px; }
.page-hero .lede { margin: 0; }
@media (max-width: 600px) { .page-hero { padding: 48px 0 40px; } }

/* ---------- facts strip ---------- */
.facts { border-bottom: 1px solid var(--rule); }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.facts li { padding: 26px 24px 26px 0; border-right: 1px solid var(--rule); }
.facts li + li { padding-left: 24px; }
.facts li:last-child { border-right: 0; }
.facts .num { font: 700 46px/1 var(--display); display: block; margin-bottom: 8px; }
.facts .what { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
@media (max-width: 820px) {
  .facts ul { grid-template-columns: 1fr 1fr; }
  .facts li { padding: 22px 16px; border-bottom: 1px solid var(--rule); }
  .facts li + li { padding-left: 16px; }
  .facts li:nth-child(2n) { border-right: 0; }
  .facts li:nth-child(n+3) { border-bottom: 0; }
}

/* ---------- sections ---------- */
section.block { padding: 88px 0; border-bottom: 1px solid var(--rule); }
section.block.alt { background: var(--paper-2); }
.section-head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; margin-bottom: 48px; }
.section-num { font: 500 12px/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding-top: 12px; border-top: 1px solid var(--rule-strong); align-self: start; }
.section-head h2 { font: 700 clamp(36px, 4.4vw, 56px)/1 var(--display); text-transform: uppercase; letter-spacing: .005em; margin: 0 0 14px; }
.section-head p { margin: 0; color: var(--ink-2); max-width: 62ch; font-size: 18px; }
.indent { margin-left: 260px; }
@media (max-width: 820px) {
  section.block { padding: 60px 0; }
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
  .section-num { width: max-content; }
  .indent { margin-left: 0; }
}

/* about */
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.about-grid h3 { font: 600 23px/1.2 var(--display); margin: 0 0 10px; }
.about-grid p { margin: 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 920px) { .about-grid { grid-template-columns: 1fr; gap: 28px; } }

/* explore tiles (home) */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 26px 24px 22px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; transition: border-color .15s, transform .15s; min-height: 220px; }
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile .n { font: 500 12px/1 var(--mono); letter-spacing: .1em; color: var(--accent); }
.tile h3 { font: 700 28px/1 var(--display); text-transform: uppercase; margin: 6px 0 0; }
.tile p { margin: 0; color: var(--ink-2); font-size: 15px; flex: 1; }
.tile .go { font: 600 14px/1 var(--sans); color: var(--accent-2); }
@media (max-width: 960px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } .tile { min-height: 0; } }

/* departments */
.depts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.dept { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 24px; align-items: start; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.dept-abbr { font: 500 14px/1 var(--mono); letter-spacing: .06em; padding: 7px 0; color: var(--accent); }
.dept h3 { font: 600 24px/1.2 var(--display); margin: 0 0 6px; }
.dept p { margin: 0; color: var(--ink-2); font-size: 15.5px; max-width: 66ch; }
.dept ul.reqs { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.dept ul.reqs li { position: relative; padding-left: 20px; color: var(--ink-2); font-size: 15px; }
.dept ul.reqs li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 2px; background: var(--accent); }
.tag { font: 500 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--ok); color: var(--ok); white-space: nowrap; margin-top: 2px; }
.tag-warn { border-color: var(--warn); color: var(--warn); }
.tag-blue { border-color: var(--accent); color: var(--accent-2); }
.tag-muted { border-color: var(--rule); color: var(--ink-3); }
@media (max-width: 640px) {
  .dept { grid-template-columns: 1fr; gap: 8px; }
  .dept-abbr { padding: 0; }
  .tag { justify-self: start; }
}
.group-title { font: 500 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 56px 0 14px; }
.group-title:first-child { margin-top: 0; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule-strong); }
.steps li { padding: 24px 24px 8px 0; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
.step-n { font: 500 13px/1 var(--mono); color: var(--accent); display: block; margin-bottom: 14px; letter-spacing: .06em; }
.steps h3 { font: 600 23px/1.2 var(--display); margin: 0 0 8px; }
.steps p { margin: 0 0 10px; color: var(--ink-2); font-size: 15.5px; }
.steps a, .text-link { color: var(--accent-2); font-weight: 600; text-underline-offset: 3px; }
.example { font: 400 14px/1.5 var(--mono); background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; margin: 10px 0 0; white-space: pre; overflow-x: auto; }
@media (max-width: 920px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 600px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 22px 0 12px; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--rule); }
}

.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.callout { border-left: 4px solid var(--accent); padding: 4px 0 4px 22px; }
.callout h3 { font: 600 24px/1.2 var(--display); margin: 0 0 8px; }
.callout p { margin: 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 820px) { .pair { grid-template-columns: 1fr; gap: 28px; } }

.panel { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 28px; }
.panel h3 { font: 600 24px/1.2 var(--display); margin: 0 0 8px; }
.panel p { margin: 0 0 10px; color: var(--ink-2); font-size: 15.5px; }
.panel p:last-child { margin-bottom: 0; }

/* requirements */
.req-list { list-style: none; margin-top: 0; margin-bottom: 0; padding: 0; border-top: 1px solid var(--rule-strong); counter-reset: req; }
.req { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--rule); counter-increment: req; }
.req::before { content: counter(req, decimal-leading-zero); font: 700 34px/1 var(--display); color: var(--accent); }
.req h3 { font: 600 24px/1.2 var(--display); margin: 0 0 6px; }
.req p { margin: 0; color: var(--ink-2); max-width: 70ch; }
.req .example { display: inline-block; }
@media (max-width: 600px) { .req { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; } .req::before { font-size: 26px; } }

/* resources */
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; }
.res-grid h3 { font: 500 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; padding-bottom: 10px; border-bottom: 1px solid var(--rule-strong); }
.res-grid ul { list-style: none; margin: 0; padding: 0; }
.res-grid li { border-bottom: 1px solid var(--rule); }
.res-grid a { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; text-decoration: none; font-weight: 500; }
.res-grid a:hover { color: var(--accent); }
.res-grid .ext { color: var(--ink-3); font-size: 14px; }

/* faq */
.faq { border-top: 1px solid var(--rule-strong); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font: 600 22px/1.3 var(--display); }
.faq summary:hover { color: var(--accent-2); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font: 400 26px/1 var(--mono); color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 22px; color: var(--ink-2); max-width: 70ch; }
.faq-group + .faq-group { margin-top: 64px; }

/* closing card */
.closing { padding: 88px 0; }
.closing-card { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; padding: 44px; border: 1px solid var(--rule); border-radius: 14px; background: linear-gradient(135deg, var(--card), var(--paper-2)); position: relative; overflow: hidden; }
.closing-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--red) 0 50%, var(--blue) 50% 100%); }
.closing h2 { font: 700 clamp(32px, 4vw, 52px)/1 var(--display); text-transform: uppercase; margin: 0 0 10px; max-width: 20ch; }
.closing p { margin: 0; color: var(--ink-2); max-width: 52ch; }
@media (max-width: 600px) { .closing { padding: 56px 0; } .closing-card { padding: 28px 22px; } }

/* footer */
footer.site { background: var(--navy); border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 15px; }
.foot-main { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 48px; padding: 72px 0 56px; }
.foot-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.foot-brand img { width: 64px; height: 64px; }
.foot-brand .name { font: 700 26px/1 var(--display); text-transform: uppercase; color: var(--ink); letter-spacing: .01em; }
.foot-slogan { font: 600 15px/1.3 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); margin: 0 0 14px; }
.foot-about { margin: 0 0 22px; color: var(--ink-2); max-width: 40ch; line-height: 1.55; }
.foot-col h4 { font: 500 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 6px 0 16px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-col a { color: var(--ink-2); text-decoration: none; transition: color .15s; }
.foot-col a:hover { color: var(--accent); }
.foot-word { font: 700 clamp(56px, 13vw, 190px)/.8 var(--display); text-transform: uppercase; letter-spacing: -.01em; color: transparent; -webkit-text-stroke: 1px var(--rule); margin: 0; padding: 8px 0 0; user-select: none; white-space: nowrap; overflow: hidden; }
.foot-bottom { border-top: 1px solid var(--rule); padding: 22px 0 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; }
.foot-bottom p { margin: 0; }
@media (max-width: 820px) { .foot-main { grid-template-columns: 1fr 1fr; gap: 36px 20px; } .foot-main > :first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-main { padding: 52px 0 40px; } }

/* =====================================================================
   Accounts & profiles
   ===================================================================== */
:root { --pa: var(--accent); }
.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; }
.mono { font-family: var(--mono); font-size: .92em; }
section.block.block-tight, .block-tight { padding: 56px 0 88px; }
.foot-sub { margin-top: 28px !important; }

/* accent colours a member can pick (profile highlights only) */
.accent-sky { --pa: #4aa8ff; }
.accent-shore { --pa: #2ec4b6; }
.accent-pine { --pa: #4fc27a; }
.accent-gold { --pa: #e8b84a; }
.accent-sunset { --pa: #f2843b; }
.accent-ember { --pa: #ef5a5a; }
.accent-violet { --pa: #a78bfa; }
.accent-slate { --pa: #9aa8bc; }

/* background presets (CSS only, no image requests) */
.bgp-shoreline { background:
  linear-gradient(180deg, transparent 61%, rgba(190, 228, 255, .5) 61.4%, transparent 62.4%),
  radial-gradient(60% 55% at 72% 58%, rgba(255, 238, 190, .42), transparent 70%),
  linear-gradient(180deg, #0c2746 0%, #1c5a92 42%, #6db4ea 61%, #144775 62%, #0b2238 82%, #0b1320 100%); }
.bgp-nightshift { background:
  radial-gradient(55% 110% at 18% -10%, rgba(229, 72, 77, .55), transparent 62%),
  radial-gradient(55% 110% at 82% -10%, rgba(62, 140, 255, .6), transparent 62%),
  linear-gradient(180deg, #0a1019, #0b1320); }
.bgp-pines { background:
  radial-gradient(70% 90% at 50% 120%, rgba(79, 194, 122, .38), transparent 62%),
  repeating-linear-gradient(100deg, rgba(0, 0, 0, .14) 0 22px, transparent 22px 54px),
  linear-gradient(180deg, #10302a 0%, #154034 55%, #0b1320 100%); }
.bgp-dusk { background:
  radial-gradient(50% 70% at 50% 85%, rgba(255, 170, 110, .55), transparent 70%),
  linear-gradient(180deg, #23173f 0%, #5b2a5c 42%, #c36a4a 72%, #0b1320 100%); }
.bgp-steel { background:
  repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 16px),
  linear-gradient(180deg, #1c2839 0%, #121c2b 60%, #0b1320 100%); }
.bgp-blackout { background: linear-gradient(180deg, #05080d, #0b1320); }

/* ---------- header account control: picture in a circle + name ---------- */
.header-signin { font-size: 14px; }
.account-menu { position: relative; }
.account-menu summary { list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 4px 10px 4px 4px; border-radius: 999px; color: var(--ink); transition: background-color .15s; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover, .account-menu[open] summary { background: var(--paper-2); }
.account-avatar { display: block; width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--card); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent); flex: none; }
.account-name { font: 600 15px/1.1 var(--sans); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-caret { color: var(--ink-3); transition: transform .15s; flex: none; }
.account-menu[open] .account-caret { transform: rotate(180deg); }
.account-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 270px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 8px; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .85); z-index: 30; }
.account-pop-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--rule); }
.account-pop-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: var(--paper); }
.account-pop-head div { min-width: 0; }
.account-pop-head strong { display: block; font: 700 20px/1.05 var(--display); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-pop-head span { font: 500 12px/1.5 var(--mono); color: var(--ink-3); }
.account-pop ul { list-style: none; margin: 0; padding: 0; }
.account-pop a, .account-pop button, .menu-signout button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font: 500 15px/1.2 var(--sans); background: none; border: 0; cursor: pointer; }
.account-pop a:hover, .account-pop button:hover, .menu-signout button:hover { background: var(--paper-2); color: var(--ink); }
.account-pop-signout { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--rule); }
.menu-sep { height: 1px; background: var(--rule); margin: 6px 4px; }
.menu-signout { margin: 0; }

/* ---------- extra buttons ---------- */
.btn-quiet { border-color: transparent; color: var(--ink); background: var(--surface-2); }
.btn-quiet:hover { border-color: transparent; background: rgba(255, 255, 255, .11); }
.btn-danger { background: #ef5a5a; color: #1d0505; }
.btn-danger:hover { background: #ff7b7b; color: #1d0505; }
.btn-provider { width: 100%; justify-content: flex-start; gap: 14px; padding: 16px 20px; font-size: 16px; border-radius: 8px; margin-bottom: 12px; }
.btn-provider span { flex: 1; text-align: center; margin-right: 20px; }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; color: #fff; }
.btn-steam { background: #171d25; color: #e6edf5; border-color: #2a475e; }
.btn-steam:hover { background: #1f2a36; color: #fff; border-color: #66c0f4; }

/* ---------- badges & chips ---------- */
.badge { display: inline-flex; align-items: center; font: 500 12px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); background: rgba(11, 19, 32, .55); white-space: nowrap; }
.badge-staff { background: var(--pa); border-color: var(--pa); color: var(--accent-ink); font-weight: 600; }
.badge-dept { border-color: color-mix(in srgb, var(--pa) 55%, transparent); color: var(--ink); }
.badge-mini { padding: 4px 8px; font-size: 11px; }
.badge-warn { border-color: var(--warn); color: var(--warn); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.idchip { display: inline-block; font: 500 13px/1 var(--mono); letter-spacing: .06em; color: var(--ink-2); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 11px; background: rgba(11, 19, 32, .6); }

/* ---------- flash messages ---------- */
.flash { border-radius: 8px; padding: 13px 16px; margin: 0 0 24px; border: 1px solid; font-weight: 500; font-size: 15.5px; }
.flash-ok { border-color: rgba(76, 195, 138, .5); background: rgba(76, 195, 138, .09); color: #c3f2da; }
.flash-err { border-color: rgba(239, 90, 90, .5); background: rgba(239, 90, 90, .09); color: #ffd3d3; }

/* ---------- sign in ---------- */
.login-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.login-card { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 36px; position: relative; overflow: hidden; }
.login-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--red) 0 50%, var(--blue) 50% 100%); }
.login-card h2 { font: 700 30px/1 var(--display); text-transform: uppercase; margin: 0 0 22px; }
.login-info { display: grid; gap: 16px; }
.notice-body { display: grid; gap: 18px; justify-items: start; }
@media (max-width: 820px) { .login-grid { grid-template-columns: 1fr; } .login-card { padding: 26px 22px; } }

/* ---------- forms ---------- */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { margin: 0 0 26px; }
.field > label, .field > .label, .field > legend, .upload-form > label, .delete-form > label, .mod-form label { display: block; font: 600 14.5px/1.3 var(--sans); color: var(--ink); margin: 0 0 10px; padding: 0; }
.hint { font-size: 13.5px; color: var(--ink-3); margin: 8px 0 0; line-height: 1.5; }
.hint-top { margin: -4px 0 12px; }
.hint-inline { font-weight: 400; color: var(--ink-3); }
.input { width: 100%; background: rgba(255, 255, 255, .03); color: var(--ink); border: 1px solid var(--rule-strong); border-radius: 8px; padding: 12px 14px; font: 400 15.5px/1.5 var(--sans); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(74, 168, 255, .22); }
textarea.input { min-height: 150px; resize: vertical; }
/* dropdowns (every <select> on the site): dark field, chevron that turns blue on focus, dark option list */
select, select.input {
  --chev: var(--ink-2);
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  color-scheme: dark;
  background-color: var(--paper);
  background-image: linear-gradient(45deg, transparent 50%, var(--chev) 50%), linear-gradient(135deg, var(--chev) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
  cursor: pointer;
  text-overflow: ellipsis;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
select:hover:not(:disabled) { --chev: var(--ink); border-color: var(--ink-3); background-color: var(--paper-2); }
select:focus, select:focus-visible { --chev: var(--accent); outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(74, 168, 255, .22); }
select:disabled { opacity: .55; cursor: not-allowed; }
select::-ms-expand { display: none; }
select option { background-color: var(--card); color: var(--ink); padding: 8px 12px; }
select option:checked { background-color: #1d3a63; color: var(--ink); }
select option:disabled { color: var(--ink-3); }
select optgroup { background-color: var(--paper-2); color: var(--ink-3); font-style: normal; font-weight: 600; }
select[multiple] { background-image: none; padding-right: 14px; }
input[type="file"].input { padding: 8px; font-size: 14.5px; color: var(--ink-2); }
input[type="file"].input::file-selector-button { font: 600 14px/1 var(--sans); background: var(--ink); color: var(--paper); border: 0; border-radius: 6px; padding: 10px 14px; margin-right: 12px; cursor: pointer; }
.readonly { padding: 12px 14px; border: 1px dashed var(--rule); border-radius: 8px; font-weight: 600; color: var(--ink); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: var(--space-4); }
.check { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 15.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.check.is-disabled { opacity: .55; cursor: not-allowed; }

/* radio chips, colour swatches, and preset cards (no JavaScript) */
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; display: inline-flex; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice > span { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 8px; color: var(--ink-2); font-size: 15px; transition: border-color .15s, background-color .15s, color .15s; }
.choice:hover > span { border-color: var(--ink-3); color: var(--ink); }
.choice input:checked + span { border-color: var(--accent); background: rgba(74, 168, 255, .1); color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice.is-disabled { cursor: not-allowed; opacity: .45; }
.swatch-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--pa); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.swatch input:checked + span { border-color: var(--pa); background: color-mix(in srgb, var(--pa) 14%, transparent); }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.preset { display: block; }
.preset > span { flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
.preset-preview { display: block; height: 64px; }
.preset b { display: block; padding: 9px 12px; font-weight: 600; font-size: 14.5px; }
.choice-stack { display: grid; gap: 10px; }
.choice-block { display: block; }
.choice-block > span { display: block; padding: 12px 16px; }
.choice-block b { display: block; font-weight: 600; color: var(--ink); }
.choice-block small { display: block; color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }

/* ---------- account settings ---------- */
.account-hero { position: relative; border-bottom: 1px solid var(--rule); overflow: hidden; }
.account-hero-bg { position: absolute; inset: 0; opacity: .55; }
.account-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.account-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 19, 32, .92) 0%, rgba(11, 19, 32, .7) 55%, rgba(11, 19, 32, .5) 100%); }
.account-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 26px; align-items: center; padding-top: 40px; padding-bottom: 36px; }
.account-hero-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--pa); background: var(--card); }
.account-hero h1 { font: 700 clamp(32px, 4vw, 52px)/.95 var(--display); text-transform: uppercase; margin: 0 0 14px; overflow-wrap: anywhere; }
.account-hero .crumbs { margin-bottom: 10px; }
.account-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
@media (max-width: 700px) {
  .account-hero-inner { grid-template-columns: auto minmax(0, 1fr); padding-top: 40px; padding-bottom: 32px; gap: 18px; }
  .account-hero-avatar { width: 80px; height: 80px; }
  .account-hero-actions { grid-column: 1 / -1; }
}

.settings { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 56px; align-items: start; }
.settings-nav { position: sticky; top: 100px; display: grid; gap: 2px; }
.settings-nav a { padding: 9px 12px; border-radius: 6px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 15px; border-left: 2px solid transparent; }
.settings-nav a:hover { background: var(--paper-2); color: var(--ink); border-left-color: var(--rule); }
.settings-nav a[aria-current="page"] { background: var(--paper-2); color: var(--ink); border-left-color: var(--accent); }
.settings-body { min-width: 0; max-width: 760px; }
.settings-section { padding: 0; margin: 0; }
.settings-section:last-child { border-bottom: 0; margin-bottom: 0; }
.settings-section > h2 { font: 700 34px/1 var(--display); text-transform: uppercase; margin: 0 0 8px; }
.settings-section > .sub { color: var(--ink-2); margin: 0 0 28px; }
.settings-danger > h2 { color: #ff8b8b; }
@media (max-width: 900px) {
  .settings { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .settings-nav { position: static; display: flex; overflow-x: auto; gap: 8px; padding-bottom: 6px; }
  .settings-nav a { white-space: nowrap; border: 1px solid var(--rule); }
  .settings-nav a:hover { border-left-color: var(--rule); }
  .settings-nav a[aria-current="page"] { border-color: var(--accent); }
}

.media-row { display: flex; gap: 28px; align-items: center; margin: 0 0 28px; flex-wrap: wrap; }
.media-row-form { display: grid; gap: 14px; justify-items: start; flex: 1; min-width: 240px; }
.settings-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 1px solid var(--rule); background: var(--card); }
.upload-form { margin: 0 0 18px; }
.upload-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.upload-row .input { flex: 1; min-width: 220px; }
.inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; vertical-align: middle; }
.bg-preview { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); margin: 0 0 24px; aspect-ratio: 3 / 1; }
.bg-preview-img { position: absolute; inset: 0; }
.bg-preview-img img { width: 100%; height: 100%; object-fit: cover; }
.bg-preview-label { position: absolute; left: 12px; bottom: 12px; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: rgba(11, 19, 32, .75); color: var(--ink-2); }

.conn { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); margin: 0 0 12px; flex-wrap: wrap; }
.conn-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.conn-discord { background: #5865f2; color: #fff; }
.conn-steam { background: #171d25; color: #c7d5e0; border: 1px solid #2a475e; }
.conn-body { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.conn-body strong { font-weight: 600; }
.conn-body span { color: var(--ink-3); font: 400 13.5px/1.45 var(--mono); overflow-wrap: anywhere; }

.perm-head { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.perm-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.perm-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); font-size: 15.5px; }
.perm-list li.yes { color: var(--ink); }
.perm-mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; flex: none; border: 1px solid var(--rule); color: var(--ink-3); }
.perm-list li.yes .perm-mark { background: rgba(76, 195, 138, .15); border-color: rgba(76, 195, 138, .6); color: var(--ok); }

.table-wrap { position: relative; overflow-x: auto; margin: 0 0 18px; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font: 500 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; color: var(--ink-2); }
.table td:first-child { color: var(--ink); }
.table td.mono { white-space: nowrap; }
.mini-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; background: var(--card); }
.acct-cell { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.acct-cell:hover span { color: var(--accent-2); }
.search-form { display: flex; gap: 10px; margin: 0 0 36px; max-width: 640px; }
.search-form .input { flex: 1; }

/* ---------- profile ---------- */
/* Compact header (picture, name, highest rank, departments) with tabs; each
   tab is its own short page. Built from the same pieces as the rest of the
   site. A member's background is a dimmed layer behind the header, and their
   accent colour only touches small details. */
.profile-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); background: radial-gradient(800px 360px at 85% 0%, rgba(74, 168, 255, .12), transparent 70%); }
.profile-hero-bg { position: absolute; inset: 0; opacity: .3; }
.profile-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero-bg.is-preset { opacity: .6; }
.profile-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(90deg, rgba(11, 19, 32, .95) 0%, rgba(11, 19, 32, .8) 45%, rgba(11, 19, 32, .5) 100%),
  linear-gradient(180deg, transparent 50%, var(--paper) 100%); }
.profile-hero-inner { position: relative; z-index: 1; padding-top: 40px; }
.profile-hero .crumbs { margin-bottom: 22px; }
.profile-id { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.profile-avatar-ring { display: block; justify-self: start; width: max-content; border-radius: 50%; box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--pa), 0 20px 40px -22px rgba(0, 0, 0, .8); }
.profile-avatar { display: block; width: 112px; height: 112px; border-radius: 50%; object-fit: cover; background: var(--card); }
.profile-heading { min-width: 0; }
.profile-heading .eyebrow { color: var(--pa); margin-bottom: 10px; }
.profile-heading h1 { font: 700 clamp(36px, 4.6vw, 60px)/.94 var(--display); text-transform: uppercase; margin: 0 0 14px; overflow-wrap: anywhere; }
.profile-heading h1 em { font-style: normal; color: var(--pa); }
.profile-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.profile-tabs { display: flex; gap: 30px; margin-top: 30px; overflow-x: auto; scrollbar-width: none; }
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 13px 0 12px; border-bottom: 2px solid transparent; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; white-space: nowrap; transition: color .15s, border-color .15s; }
.profile-tabs a:hover { color: var(--ink); }
.profile-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--pa); }
.tab-count { font: 500 11px/1 var(--mono); padding: 3px 7px; border-radius: 999px; background: var(--card); color: var(--ink-2); }
@media (max-width: 820px) {
  .profile-hero-inner { padding-top: 32px; }
  .profile-id { grid-template-columns: 1fr; gap: 18px; }
  .profile-avatar { width: 96px; height: 96px; }
  .profile-actions { justify-content: flex-start; }
  .profile-tabs { gap: 22px; margin-top: 24px; }
}

.ptag { display: inline-flex; align-items: center; font: 500 12px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); background: rgba(11, 19, 32, .5); white-space: nowrap; }
/* The member's highest rank — the primary tag. Staff ranks are filled. */
.ptag-rank { color: var(--pa); border-color: color-mix(in srgb, var(--pa) 70%, transparent); background: color-mix(in srgb, var(--pa) 12%, transparent); font-weight: 600; }
.ptag-rank.is-staff { background: var(--pa); border-color: var(--pa); color: var(--accent-ink); }
.ptag-dept { color: var(--ink); border-color: color-mix(in srgb, var(--pa) 40%, var(--rule)); }
.ptag-warn { border-color: var(--warn); color: var(--warn); }

.btn-staff { border-color: color-mix(in srgb, var(--warn) 70%, transparent); color: var(--warn); background: rgba(229, 176, 75, .08); }
.btn-staff:hover, .btn-staff[aria-current="page"] { background: var(--warn); border-color: var(--warn); color: #1b1300; }

section.block.block-compact, .block-compact { padding: 44px 0 80px; }
.tab-lede { color: var(--ink-2); margin: 0 0 18px; max-width: 66ch; }

.profile-overview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 40px; align-items: start; }
.profile-overview .group-title { margin-top: 0; }
.profile-bio { white-space: pre-line; overflow-wrap: anywhere; color: var(--ink-2); font-size: 17px; line-height: 1.75; max-width: 66ch; margin: 0; }
.profile-bio.is-empty { color: var(--ink-3); white-space: normal; }
.glance { padding: 22px 24px; }
@media (max-width: 900px) { .profile-overview { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

.info-list { margin: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); border-top: 1px solid var(--rule-strong); }
.info-list dt { font: 500 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 17px 16px 15px 0; border-bottom: 1px solid var(--rule); }
.info-list dd { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--ink); overflow-wrap: anywhere; }
.info-list dd .ptag { margin: 0 4px 4px 0; }
.info-list .mono { color: var(--ink-2); }
.info-narrow { max-width: 760px; }
.info-compact { grid-template-columns: 140px minmax(0, 1fr); border-top: 1px solid var(--rule); }
.info-compact dt { padding: 12px 12px 10px 0; }
.info-compact dd { padding: 9px 0; }
.info-compact dt:last-of-type, .info-compact dd:last-of-type { border-bottom: 0; }
@media (max-width: 600px) {
  .info-list { grid-template-columns: 1fr; }
  .info-list dt { padding-bottom: 2px; border-bottom: 0; }
}

.depts-compact .dept { grid-template-columns: 80px minmax(0, 1fr); padding: 16px 0; }
@media (max-width: 640px) { .depts-compact .dept { grid-template-columns: 1fr; } }

.staff-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.staff-grid .group-title { margin: 0 0 12px; }
.staff-grid .info-list + .group-title { margin-top: 36px; }
.staff-title { color: var(--warn); }
@media (max-width: 900px) { .staff-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; } }
.mod-form { display: grid; gap: 8px; justify-items: start; }
.mod-form label { display: block; font: 600 14.5px/1.3 var(--sans); color: var(--ink); margin: 0; }
.mod-form .input { margin-bottom: 8px; }
.danger-box { margin-top: 32px; padding: 20px 22px; border: 1px solid rgba(239, 90, 90, .45); border-radius: var(--radius); background: rgba(239, 90, 90, .05); }
.danger-box h3 { font: 600 22px/1.2 var(--display); margin: 0 0 6px; color: #ff9b9b; }
.danger-box p { margin: 0 0 14px; color: var(--ink-2); font-size: 15px; }
.audit { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.audit li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; color: var(--ink-2); }
.audit time { font: 400 12.5px/1.6 var(--mono); color: var(--ink-3); white-space: nowrap; }

/* ---------- portals (member / staff / admin) ---------- */
.portal-hero.has-tabs { padding-bottom: 0; }
.portal-hero .portal-tabs { margin-top: 28px; }
.portal-facts .num { font-size: 32px; overflow-wrap: anywhere; }
.tone-ok { color: var(--ok); }
.tone-warn { color: var(--warn); }
.tone-bad { color: #ff8b8b; }
.tone-accent { color: var(--accent); }
.muted { color: var(--ink-3); }

.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 0 0 44px; }
.link-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 44px 18px 20px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; transition: border-color .15s, transform .15s; min-height: 84px; justify-content: center; }
a.link-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.link-card-title { font: 700 21px/1.05 var(--display); text-transform: uppercase; color: var(--ink); }
.link-card-sub { font: 400 12.5px/1.3 var(--mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-card-go { position: absolute; top: 16px; right: 16px; color: var(--accent-2); font-size: 15px; }
.link-card.is-disabled { opacity: .55; }

.portal-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; margin: 0 0 44px; }
.portal-two .group-title { margin-top: 0; }
@media (max-width: 900px) { .portal-two { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.block-compact .table-wrap + .group-title, .block-compact .hint + .group-title { margin-top: 44px; }

.standing { display: inline-flex; font: 500 12px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); }
.standing-good { border-color: rgba(76, 195, 138, .6); color: var(--ok); }
.standing-muted, .standing-pending { border-color: var(--warn); color: var(--warn); }
.standing-banned, .standing-rejected { border-color: rgba(239, 90, 90, .7); color: #ff8b8b; }
.table td.empty { color: var(--ink-3); text-align: center; padding: 22px 12px; }
.dept-table .dept-abbr { padding: 0; }

/* ---------- registrations (staff portal) ---------- */
.reg-tabs { margin: 0 0 22px; border-bottom: 1px solid var(--rule); }
.reg-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 24px; }
.review-form .choice-stack { gap: 8px; }
.review-form .btn { margin-top: var(--space-4); }

/* ---------- staff portal tabs, filters, and the website log ---------- */
.filter-tabs { margin: 0 0 22px; border-bottom: 1px solid var(--rule); }
.nowrap { white-space: nowrap; }
.log-table { font-size: 13.5px; }
.log-table td { padding: 9px 10px; vertical-align: top; }
.log-table .log-request { max-width: 440px; overflow-wrap: anywhere; }
.log-level { display: inline-flex; font: 500 11px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 4px 7px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-3); }
.log-level-warn { border-color: var(--warn); color: var(--warn); }
.log-level-error { border-color: rgba(239, 90, 90, .7); color: #ff8b8b; }
.log-level-security { border-color: var(--accent); color: var(--accent-2); background: rgba(74, 168, 255, .1); }
.log-row.log-security td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.prune-form { display: grid; gap: 12px; justify-items: start; }
.prune-form .input { max-width: 320px; }

/* =====================================================================
   Page builder blocks (web/content/blocks.js) — public pages
   ===================================================================== */
.section-head.is-plain { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 821px) {
  .facts-n1 ul { grid-template-columns: minmax(0, 1fr); }
  .facts-n2 ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-n3 ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 921px) {
  .about-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .steps-1 { grid-template-columns: minmax(0, 1fr); }
  .steps-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 561px) { .tiles-1 { grid-template-columns: minmax(0, 420px); } }
@media (min-width: 961px) {
  .tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* rich text */
.rt-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.rt-list li { position: relative; padding-left: 22px; color: var(--ink-2); }
.rt-list li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 9px; height: 2px; background: var(--accent); }
.rt-list:last-child { margin-bottom: 0; }
.prose { max-width: 72ch; }
.prose p { margin: 0 0 16px; color: var(--ink-2); font-size: 17px; }
.prose p:last-child { margin-bottom: 0; }
.prose .rt-heading { font: 600 26px/1.2 var(--display); margin: 30px 0 10px; color: var(--ink); }
.prose .rt-heading:first-child { margin-top: 0; }
.prose strong { color: var(--ink); }

/* hero with an uploaded picture instead of the logo */
.hero-media { justify-self: center; width: min(100%, 540px); }
.hero-media img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--rule); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .85); }
@media (max-width: 920px) { .hero-media { order: -1; } }

/* picture */
.pb-figure { margin: 0; }
.pb-figure.size-contained { max-width: 880px; }
.pb-figure img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--rule); }
.pb-figure figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-3); }

/* picture and text */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.split.is-flipped .split-media { order: 2; }
.split.no-media { grid-template-columns: minmax(0, 1fr); }
.split-media { margin: 0; }
.split-media img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--rule); }
.split-body h2 { font: 700 clamp(32px, 4vw, 50px)/1 var(--display); text-transform: uppercase; margin: 0 0 16px; }
.split-body p { color: var(--ink-2); margin: 0 0 14px; }
.split-body .cta-row { margin-top: 24px; }
@media (max-width: 820px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .split.is-flipped .split-media { order: 0; }
}

/* notice */
.notice-band { padding: 40px 0; border-bottom: 1px solid var(--rule); }
.notice-band.alt { background: var(--paper-2); }
.notice-box { border: 1px solid; border-left-width: 4px; border-radius: var(--radius); padding: 20px 24px; max-width: 900px; }
.notice-box h3 { font: 600 23px/1.2 var(--display); margin: 0 0 6px; }
.notice-box p { margin: 0 0 8px; color: var(--ink-2); }
.notice-box > :last-child { margin-bottom: 0; }
.notice-info { border-color: rgba(74, 168, 255, .4); border-left-color: var(--accent); background: rgba(74, 168, 255, .07); }
.notice-warn { border-color: rgba(229, 176, 75, .4); border-left-color: var(--warn); background: rgba(229, 176, 75, .07); }
.notice-ok { border-color: rgba(76, 195, 138, .4); border-left-color: var(--ok); background: rgba(76, 195, 138, .07); }

/* announcement banner (Banner & footer settings) */
.site-banner { border-bottom: 1px solid var(--rule); font-size: 15px; }
.site-banner .wrap { padding-top: 11px; padding-bottom: 11px; }
.site-banner p { margin: 0; color: var(--ink); }
.site-banner a { color: var(--accent-2); font-weight: 600; text-underline-offset: 3px; }
.site-banner-link { margin-left: 6px; white-space: nowrap; }
.site-banner-info { background: linear-gradient(90deg, rgba(74, 168, 255, .18), rgba(74, 168, 255, .05)); }
.site-banner-warn { background: linear-gradient(90deg, rgba(229, 176, 75, .22), rgba(229, 176, 75, .06)); }
.site-banner-ok { background: linear-gradient(90deg, rgba(76, 195, 138, .2), rgba(76, 195, 138, .05)); }

/* for page editors: who can see a non-public page, and the "Edit page" button */
.pb-access-note { background: rgba(229, 176, 75, .1); border-bottom: 1px solid rgba(229, 176, 75, .35); font-size: 14.5px; }
.pb-access-note .wrap { padding-top: 10px; padding-bottom: 10px; }
.pb-access-note p { margin: 0; color: #f3dca8; }
.pb-fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 12px 17px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 14.5px/1 var(--sans); text-decoration: none; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08); transition: background-color .15s, color .15s, transform .15s; }
.pb-fab:hover { background: var(--warn); color: #1b1300; transform: translateY(-1px); }
@media (max-width: 600px) { .pb-fab { right: 14px; bottom: 14px; padding: 11px 14px; } }
@media print { .pb-fab { display: none; } }

/* =====================================================================
   Live server status (member portal, staff Server tab, builder block)
   ===================================================================== */
.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 0 0 44px; }
.srv-card { position: relative; overflow: hidden; display: grid; gap: 16px; align-content: start; padding: 20px 22px 18px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.srv-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--ok); }
.srv-card.is-offline::before { background: var(--red); }
.srv-head { display: flex; align-items: center; gap: 10px; }
.srv-head h3 { flex: 1; min-width: 0; margin: 0; font: 700 24px/1 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.srv-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(76, 195, 138, .18); }
.is-offline .srv-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(229, 72, 77, .18); }
.srv-state { font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ok); }
.is-offline .srv-state { color: #ff8b8b; }
.srv-stats { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; margin: 0; }
.srv-stats dt { margin-bottom: 6px; font: 500 11.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.srv-stats dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.srv-stats b { font: 700 30px/1 var(--display); color: var(--ink); }
.srv-stats dd span { font: 600 18px/1 var(--display); color: var(--ink-3); }
.srv-stats small { display: block; margin-top: 5px; font-size: 13px; color: var(--ink-3); }
.srv-depts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.srv-depts li { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 7px 9px; border: 1px solid var(--rule); border-radius: 6px; background: rgba(11, 19, 32, .45); }
.srv-depts span { font: 500 11.5px/1 var(--mono); letter-spacing: .04em; color: var(--ink-2); }
.srv-depts b { font: 700 17px/1 var(--display); color: var(--ink); }
.srv-depts .is-zero { opacity: .45; }
.srv-players summary { list-style: none; cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--accent-2); }
.srv-players summary::-webkit-details-marker { display: none; }
.srv-players summary::before { content: "+ "; color: var(--accent); font-family: var(--mono); }
.srv-players[open] summary::before { content: "\2212  "; }
.srv-players ul { list-style: none; margin: 10px 0 0; padding: 0; columns: 2; column-gap: 16px; font-size: 14.5px; color: var(--ink-2); }
.srv-players li { break-inside: avoid; padding: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-updated { margin: 0; font: 400 12.5px/1.4 var(--mono); color: var(--ink-3); }
.srv-section { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 28px; align-items: start; margin: 0 0 40px; }
@media (max-width: 900px) { .srv-section { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
@media (max-width: 420px) { .srv-grid { grid-template-columns: minmax(0, 1fr); } .srv-depts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- website account bans (staff portal) ---------- */
.ban-table td { vertical-align: top; }
.ban-lift { margin-top: 8px; }
.ban-form { max-width: 520px; margin-bottom: 8px; }
.ban-form .hint { margin-top: 4px; }

/* ---------- department rosters and ranks ---------- */
.roster-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 290px); gap: 36px; align-items: start; }
@media (max-width: 1100px) { .roster-grid { grid-template-columns: minmax(0, 1fr); } }
.roster-table td { vertical-align: middle; }
.rank-set { display: flex; gap: 8px; align-items: center; margin: 0; }
.rank-set .input { padding: 8px 36px 8px 10px; font-size: 14.5px; min-width: 190px; }
.rank-ladder { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.rank-ladder li { display: grid; grid-template-columns: minmax(0, 1fr) auto 32px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.rank-ladder b { text-align: right; font: 700 18px/1 var(--display); }
.rank-ladder .ptag { padding: 3px 7px; font-size: 10.5px; margin-left: 4px; }
.rank-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.rank-edit { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1.2fr); gap: 0 16px; margin: 0; }
.rank-edit .field { margin-bottom: 10px; }
.rank-flags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.rank-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; font-size: 14px; }
.rank-tools { display: flex; gap: 6px; padding-bottom: 2px; }
.rank-delete { color: #ff9b9b; }
.rank-new { padding: 18px; border: 1px dashed var(--rule); border-radius: var(--radius); }
@media (max-width: 820px) {
  .rank-row { grid-template-columns: minmax(0, 1fr); }
  .rank-edit { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- TeamSpeak manager ---------- */
.ts-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ts-head h1 { margin-bottom: 0; }
.ts-head-side { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; }
.ts-status { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ok); }
.ts-status.is-off { color: #ff8b8b; }
.ts-status.is-off .srv-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(229, 72, 77, .18); }
.ts-filter { max-width: 760px; }
.ts-filter select.input { max-width: 220px; }
.ts-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.ts-actions .group-title { margin-top: 0; }
.ts-picks { display: flex; flex-wrap: wrap; gap: 8px; max-height: 220px; overflow-y: auto; padding: 2px; }
.ts-picks .choice > span { padding: 7px 11px; font-size: 14px; }
.ts-manage .form-actions { margin: 4px 0 20px; }
.ts-table td { vertical-align: top; }
.ts-uid { font-size: 12px; overflow-wrap: anywhere; }
.ts-groups { display: flex; flex-wrap: wrap; gap: 5px; max-width: 520px; }
.ts-groups .ptag { padding: 4px 8px; font-size: 11px; text-transform: none; letter-spacing: 0; }
.ts-results { margin-bottom: 28px; }
.ts-pager { display: flex; gap: 16px; align-items: center; }
.ts-group-form { max-width: 980px; }
.ts-roles { min-height: 180px; padding-right: 14px; background-image: none; }
.ts-perm-table td, .ts-perm-table th { text-align: center; }
.ts-perm-table td:first-child, .ts-perm-table th:first-child { text-align: left; }
.ts-perm-table input { width: 17px; height: 17px; accent-color: var(--accent); }
.ts-delete { margin-top: 18px; display: block; }
@media (max-width: 760px) { .ts-actions { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

/* ---------- TeamSpeak channels ---------- */
.ts-tree { list-style: none; margin: 0 0 40px; padding: 0; border-top: 1px solid var(--rule-strong); }
.ts-ch-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.ts-depth-1 { padding-left: 24px; } .ts-depth-2 { padding-left: 48px; } .ts-depth-3 { padding-left: 72px; }
.ts-depth-4 { padding-left: 96px; } .ts-depth-5 { padding-left: 120px; } .ts-depth-6 { padding-left: 144px; }
.ts-ch-row:not(.ts-depth-0) .ts-ch-name::before { content: "\2514\00a0"; color: var(--ink-3); font-family: var(--mono); }
.ts-ch-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.ts-ch-name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ts-ch-main .ptag { padding: 3px 7px; font-size: 10.5px; }
.ts-ch-count { font-size: 12.5px; }
.ts-ch-topic { flex-basis: 100%; font-size: 13.5px; color: var(--ink-3); }
.ts-ch-people { flex-basis: 100%; font-size: 14px; color: var(--accent-2); }
.ts-ch.has-people .ts-ch-name { color: var(--accent-2); }
.ts-ch-tools { display: flex; gap: 6px; flex: none; }
.ts-ch-tools .btn { padding: 6px 10px; }
.ts-channel-form { max-width: 900px; }
.pb-fieldgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.pb-fieldgrid .field { margin-bottom: 18px; }
.pb-wide-field { grid-column: 1 / -1; }
.ts-ch-delete { max-width: 900px; display: grid; gap: 10px; justify-items: start; }
@media (max-width: 760px) {
  .ts-ch-row { flex-direction: column; }
  .pb-fieldgrid { grid-template-columns: minmax(0, 1fr); }
  .ts-depth-1, .ts-depth-2, .ts-depth-3, .ts-depth-4, .ts-depth-5, .ts-depth-6 { padding-left: 16px; }
}

/* ---------- TeamSpeak manager: toolbars, dropdowns, menus ---------- */
.ts-toolbar { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.ts-toolbar .search-form { margin: 0; flex: 1; min-width: 280px; }
.ts-toolbar .inline-form .btn { height: 50px; }
.ts-bulk { display: grid; grid-template-columns: minmax(170px, auto) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 16px; align-items: end; padding: 18px 20px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.ts-bulk-title { display: grid; gap: 2px; align-self: center; }
.ts-bulk-title b { font: 700 20px/1.1 var(--display); text-transform: uppercase; }
.ts-bulk-title span { font-size: 13.5px; color: var(--ink-3); }
.ts-bulk-field label { display: block; font: 500 11.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.ts-bulk-field select:disabled { opacity: .55; }
.ts-bulk .btn { height: 50px; }
.ts-bulk-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 10px 2px 18px; font-size: 13.5px; color: var(--ink-3); }
.ts-pick { width: 44px; }
.ts-pick input { width: 18px; height: 18px; accent-color: var(--accent); }
@media (max-width: 900px) { .ts-bulk { grid-template-columns: minmax(0, 1fr); } .ts-bulk .btn { width: 100%; } }

.ts-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 16px; max-height: 260px; overflow-y: auto; padding: 12px 14px; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; }
.ts-checklist .check { margin: 0; padding: 6px 0; font-size: 14.5px; }
.ts-perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.ts-perm-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px; align-items: center; padding: 8px 8px 8px 14px; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; }
.ts-perm-row.is-set { border-color: color-mix(in srgb, var(--accent) 55%, var(--rule)); background: rgba(74, 168, 255, .06); }
.ts-perm-row label { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; margin: 0; }
.ts-perm-row .input { padding: 9px 36px 9px 12px; font-size: 14px; }

.ts-menu { position: relative; flex: none; }
.ts-menu summary { list-style: none; cursor: pointer; padding: 7px 12px; }
.ts-menu summary::-webkit-details-marker { display: none; }
.ts-menu[open] summary { border-color: var(--accent); }
.ts-menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 12; min-width: 210px; padding: 6px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .85); }
.ts-menu-pop form { margin: 0; }
.ts-menu-pop a, .ts-menu-pop button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 6px; border: 0; background: none; color: var(--ink-2); font: 500 14.5px/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.ts-menu-pop a:hover, .ts-menu-pop button:hover { background: var(--paper-2); color: var(--ink); }

/* =====================================================================
   Community calendar
   ===================================================================== */
.cal-cat-community { --cal: #a78bfa; }
.cal-cat-patrol { --cal: #4aa8ff; }
.cal-cat-training { --cal: #4cc38a; }
.cal-cat-meeting { --cal: #e5b04b; }
.cal-cat-department { --cal: #2ec4b6; }
.cal-cat-other { --cal: #9aa8bc; }

.cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin: 0 0 18px; }
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-nav h2 { margin: 0 6px; min-width: 190px; text-align: center; font: 700 30px/1 var(--display); text-transform: uppercase; }
.cal-nav .btn { padding: 8px 12px; }
.cal-today { margin-left: 6px; font-size: 14px; }
.cal-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.cal-filters .input { width: auto; min-width: 170px; padding-top: 9px; padding-bottom: 9px; font-size: 14.5px; }
.cal-filters .btn { padding: 9px 14px; }
.cal-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.cal-grid { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin: 0 0 44px; background: var(--paper-2); }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 10px 12px; font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); background: var(--paper); border-bottom: 1px solid var(--rule); }
.cal-day { min-height: 118px; padding: 8px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-week .cal-day:last-child { border-right: 0; }
.cal-week:last-child .cal-day { border-bottom: 0; }
.cal-day.is-out { background: var(--paper); }
.cal-day.is-out .cal-date { color: var(--ink-3); opacity: .6; }
.cal-day.is-selected { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-date { align-self: flex-start; display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; font: 600 14px/1 var(--sans); color: var(--ink-2); text-decoration: none; }
.cal-date:hover { background: var(--card); color: var(--ink); }
.cal-day.is-today .cal-date { background: var(--accent); color: var(--accent-ink); }
.cal-chip { display: block; padding: 4px 7px; border-radius: 5px; font-size: 12.5px; line-height: 1.3; color: var(--ink); text-decoration: none; background: color-mix(in srgb, var(--cal) 16%, transparent); border-left: 3px solid var(--cal); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip span { color: color-mix(in srgb, var(--cal) 80%, white); font-weight: 600; }
.cal-chip:hover { background: color-mix(in srgb, var(--cal) 28%, transparent); }
.cal-chip.is-dim { opacity: .55; text-decoration: line-through; }
.cal-more { font-size: 12px; color: var(--accent-2); text-decoration: none; padding-left: 4px; }
.cal-agenda { display: none; }
@media (max-width: 760px) { .cal-grid { display: none; } .cal-agenda { display: block; } .cal-nav h2 { min-width: 0; font-size: 24px; } }

.cal-list { list-style: none; margin: 0 0 40px; padding: 0; border-top: 1px solid var(--rule-strong); }
.cal-item { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.cal-item.is-cancelled .cal-what a { text-decoration: line-through; color: var(--ink-3); }
.cal-when { display: grid; gap: 2px; }
.cal-when b { font: 700 18px/1.1 var(--display); text-transform: uppercase; }
.cal-when span { font-size: 13.5px; color: var(--ink-3); }
.cal-what { display: grid; gap: 6px; min-width: 0; }
.cal-what a { font-weight: 600; font-size: 17px; color: var(--ink); text-decoration: none; }
.cal-what a:hover { color: var(--accent-2); }
.cal-going { text-align: center; }
.cal-going b { display: block; font: 700 22px/1 var(--display); }
.cal-going span { font-size: 12px; color: var(--ink-3); }
@media (max-width: 640px) { .cal-item { grid-template-columns: minmax(0, 1fr) auto; } .cal-when { grid-column: 1 / -1; } }

.cal-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-tags .ptag { padding: 4px 8px; font-size: 10.5px; }
.cal-cat { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font: 600 11px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: color-mix(in srgb, var(--cal) 85%, white); background: color-mix(in srgb, var(--cal) 15%, transparent); border: 1px solid color-mix(in srgb, var(--cal) 45%, transparent); }

.cal-event { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 40px; align-items: start; }
@media (max-width: 900px) { .cal-event { grid-template-columns: minmax(0, 1fr); } }
.cal-facts { margin: 18px 0 24px; }
.cal-desc { margin-bottom: 24px; }
.cal-manage { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.cal-delete { color: #ff9b9b; }
.cal-rsvp h3 { margin-bottom: 4px; }
.cal-counts { color: var(--ink-2); }
.cal-counts b { color: var(--ink); font-size: 18px; }
.cal-rsvp-form { display: flex; gap: 8px; margin: 12px 0; }
.cal-rsvp-form .input { flex: 1; }
.cal-people { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--rule); max-height: 320px; overflow-y: auto; }
.cal-people li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.cal-dates { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cal-form { max-width: 900px; }
.cal-perms { margin-top: 10px; border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 18px; background: var(--paper-2); }
.cal-perms summary { cursor: pointer; font-weight: 600; }
.cal-perms .table-wrap { margin-top: 14px; }

/* =====================================================================
   Applications
   ===================================================================== */
.app-tools { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 22px; }
.app-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 0 0 44px; }
.app-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px 22px; min-height: 150px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; transition: border-color .15s, transform .15s; }
a.app-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.app-card.is-off { opacity: .6; }
.app-card-name { font: 700 23px/1.05 var(--display); text-transform: uppercase; color: var(--ink); }
.app-card-sum { flex: 1; font-size: 14.5px; color: var(--ink-2); }
.app-card-state { align-self: flex-start; font: 500 11.5px/1.35 var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--rule); color: var(--ink-3); }
.app-card-state.is-open { border-color: rgba(76, 195, 138, .6); color: var(--ok); }

.app-status { display: inline-flex; font: 500 11.5px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); white-space: nowrap; }
.app-status-pending { border-color: var(--warn); color: var(--warn); }
.app-status-review { border-color: var(--accent); color: var(--accent-2); }
.app-status-accepted { border-color: rgba(76, 195, 138, .6); color: var(--ok); }
.app-status-denied { border-color: rgba(239, 90, 90, .7); color: #ff8b8b; }
.app-status-withdrawn { color: var(--ink-3); }

.app-intro { margin-bottom: 28px; }
.app-form { max-width: 760px; }
.app-form .field { margin-bottom: 24px; }
.app-form fieldset.field legend { display: block; font: 600 14.5px/1.3 var(--sans); color: var(--ink); margin: 0 0 10px; padding: 0; }
.app-narrow { max-width: 220px; }
.app-checks { display: grid; gap: 4px; }
.app-agree { font-weight: 600; color: var(--ink); }

.app-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 40px; align-items: start; }
@media (max-width: 900px) { .app-layout { grid-template-columns: minmax(0, 1fr); } }
.app-answers { margin-bottom: 36px; }
.app-answers dd .ptag { margin: 0 4px 4px 0; }
.app-long { white-space: pre-line; color: var(--ink-2); line-height: 1.65; }
.app-side { padding: 18px 20px; }
.app-side-tools { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.app-side-tools .btn { width: 100%; }
.app-decide { margin-top: 16px; }
.app-decide-btns { display: flex; gap: 8px; margin-top: 4px; }
.app-thread { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.app-msg { padding: 12px 16px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.app-msg.is-applicant { border-left: 3px solid var(--accent); }
.app-msg.is-note { background: rgba(229, 176, 75, .07); border-color: rgba(229, 176, 75, .4); }
.app-msg.is-system { display: flex; justify-content: space-between; gap: 12px; padding: 6px 4px; background: none; border: 0; border-bottom: 1px dashed var(--rule); border-radius: 0; font-size: 13.5px; color: var(--ink-3); }
.app-msg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 14.5px; }
.app-msg-head .ptag { padding: 3px 7px; font-size: 10.5px; }
.app-msg time { margin-left: auto; font: 400 12px/1.4 var(--mono); color: var(--ink-3); }
.app-msg-body { white-space: pre-line; color: var(--ink-2); overflow-wrap: anywhere; }
.app-reply textarea { min-height: 0; }
.app-reply-bar { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.app-reply-bar .input { width: auto; }
.app-filter { display: flex; gap: 8px; margin: 0 0 20px; max-width: 520px; }

.app-newform { display: flex; gap: 10px; max-width: 560px; }
.app-editor { max-width: 980px; }
.app-perms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 820px) { .app-perms { grid-template-columns: minmax(0, 1fr); } }
.app-perm { padding: 18px 20px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.app-perm h3 { font: 700 20px/1.1 var(--display); text-transform: uppercase; margin: 0 0 4px; }
.app-perm .field { margin-bottom: 14px; }
.app-roles summary { cursor: pointer; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); font-size: 14.5px; }
.app-roles[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.app-roles .ts-checklist { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.app-field { margin-bottom: 12px; padding: 14px 16px 2px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.app-field-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.app-field-flags { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.app-field textarea.input { min-height: 0; }
.app-save { margin-top: 26px; }
.app-delete { max-width: 980px; display: grid; gap: 10px; justify-items: start; }
.pb-item-title { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.pb-item-tools { display: flex; gap: 6px; }
.pb-tool { height: 28px; min-width: 30px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--rule); background: var(--paper-2); color: var(--ink); font: 600 12.5px/1 var(--sans); cursor: pointer; }
.pb-tool:hover:not(:disabled) { border-color: var(--ink-2); }
.pb-tool:disabled { opacity: .3; cursor: default; }
.pb-tool-danger { color: #ff9b9b; }

/* =====================================================================
   Messages and following
   ===================================================================== */
.header-icons { display: flex; align-items: center; gap: 2px; margin-right: -12px; }
.header-icon { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; color: var(--ink-2); text-decoration: none; cursor: pointer; list-style: none; transition: background-color .15s, color .15s; }
.header-icon::-webkit-details-marker { display: none; }
.header-icon:hover, .header-bell[open] .header-icon { background: var(--paper-2); color: var(--ink); }
.header-icon.has-unread { color: var(--ink); }
.header-icon-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font: 700 11px/18px var(--sans); text-align: center; box-shadow: 0 0 0 2px var(--paper); }
.dm-start { display: flex; gap: 10px; max-width: 560px; margin: 0 0 24px; }
.dm-list { list-style: none; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--rule-strong); }
.dm-row { display: flex; align-items: center; gap: 14px; padding: 14px 6px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink-2); }
.dm-row:hover { background: var(--paper-2); }
.dm-row.is-unread b { color: var(--accent-2); }
.dm-row-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.dm-row-main b { color: var(--ink); font-size: 16px; }
.dm-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.dm-row.is-unread .dm-preview { color: var(--ink); font-weight: 600; }
.dm-row-side { display: grid; justify-items: end; gap: 4px; font: 400 12.5px/1.3 var(--mono); color: var(--ink-3); }
.dm-empty { padding: 20px 4px; color: var(--ink-3); }
.dm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 32px; align-items: start; }
.dm-thread { list-style: none; margin: 0 0 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow-y: auto; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius); }
.dm-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 80%; }
.dm-msg.is-mine { align-self: flex-end; align-items: flex-end; }
.dm-bubble { padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--card); border: 1px solid var(--rule); color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; line-height: 1.5; }
.dm-msg.is-mine .dm-bubble { border-radius: 14px 14px 4px 14px; background: color-mix(in srgb, var(--accent) 22%, var(--card)); border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); }
.dm-meta { display: flex; gap: 8px; align-items: center; margin-top: 3px; font: 400 11.5px/1.3 var(--mono); color: var(--ink-3); }
.dm-del { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-3); cursor: pointer; text-decoration: underline; }
.dm-del:hover { color: #ff9b9b; }
.dm-compose { display: grid; gap: 10px; justify-items: end; }
.dm-compose textarea { min-height: 0; width: 100%; }
.dm-cant { padding: 14px 16px; border: 1px dashed var(--rule); border-radius: var(--radius); }
.dm-side { display: flex; flex-direction: column; gap: 10px; }
.dm-who { display: grid; justify-items: start; gap: 6px; padding: 16px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; }
.dm-who img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.dm-who b { font: 700 20px/1.1 var(--display); text-transform: uppercase; color: var(--ink); }
/* Phones: one column, with the member card, Block, and Report as a compact strip above the conversation. */
@media (max-width: 820px) {
  .dm-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .dm-side { order: -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
  .dm-side > * { margin: 0; }
  .dm-who { grid-template-columns: auto auto; align-items: center; column-gap: 10px; row-gap: 0; padding: 8px 12px; margin-right: auto; }
  .dm-who img { width: 36px; height: 36px; grid-row: span 2; }
  .dm-who b { font-size: 16px; }
  .dm-side details.reveal[open] { flex-basis: 100%; }
}
.dm-blocked { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.dm-blocked li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.follow-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); max-width: 760px; }
.follow-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.profile-actions .inline-form { display: inline-flex; }

/* ---------- notifications: header bell ---------- */
.header-bell { position: relative; }
.bell-pop { position: absolute; right: -8px; top: calc(100% + 12px); width: 360px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .85); z-index: 30; overflow: hidden; }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 12px; border-bottom: 1px solid var(--rule); }
.bell-head b { font: 700 19px/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.bell-head form { margin: 0; }
.bell-head button { background: none; border: 0; padding: 0; color: var(--accent-2); font: 600 13px/1.2 var(--sans); cursor: pointer; }
.bell-head button:hover { text-decoration: underline; }
.bell-pop ul { list-style: none; margin: 0; padding: 4px 0; max-height: min(420px, 60vh); overflow-y: auto; }
.bell-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; padding: 11px 16px 11px 30px; text-decoration: none; color: var(--ink-2); }
.bell-item:hover { background: var(--paper-2); }
.bell-item.is-unread { color: var(--ink); }
.bell-item.is-unread::before { content: ""; position: absolute; left: 13px; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.bell-item-title { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.bell-item time { font: 500 12px/1.7 var(--mono); color: var(--ink-3); }
.bell-item-body { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-3); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-empty { padding: 22px 16px; color: var(--ink-3); font-size: 14px; text-align: center; }
.bell-foot { display: flex; justify-content: space-between; padding: 11px 16px; border-top: 1px solid var(--rule); }
.bell-foot a { color: var(--accent-2); font: 600 13.5px/1.2 var(--sans); text-decoration: none; }
.bell-foot a:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .bell-pop { position: fixed; left: 16px; right: 16px; top: 78px; width: auto; }
}

/* ---------- notifications page ---------- */
.notif-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); margin: 0 0 6px; }
.notif-bar .filter-tabs { margin: 0; border-bottom: 0; }
.notif-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; }
.notif-list { list-style: none; margin: 0 0 18px; padding: 0; }
.notif-row { display: flex; align-items: flex-start; gap: 14px; padding: 15px 8px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink-2); }
a.notif-row:hover { background: var(--paper-2); }
.notif-row.is-unread .notif-main b { color: var(--ink); }
.notif-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--paper-2); }
.notif-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--paper-2); color: var(--accent-2); border: 1px solid var(--rule); }
.notif-main { display: grid; gap: 3px; min-width: 0; flex: 1; }
.notif-main b { font-weight: 600; font-size: 15.5px; color: var(--ink-2); line-height: 1.35; }
.notif-body { font-size: 14.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.notif-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font: 500 12px/1.6 var(--mono); color: var(--ink-3); }
.notif-tag { text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); }
.notif-dot { width: 9px; height: 9px; margin-top: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.notif-empty { padding: 28px 8px; color: var(--ink-3); border-bottom: 1px solid var(--rule); }
.notif-pager { display: flex; gap: 10px; margin: 0 0 18px; }
.notify-table td, .notify-table th { vertical-align: middle; }
.notify-table td:not(:first-child), .notify-table th:not(:first-child) { text-align: center; width: 96px; }
.notify-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.notify-table .hint { margin: 2px 0 0; }
@media (max-width: 600px) {
  .notify-table td:not(:first-child), .notify-table th:not(:first-child) { width: 64px; }
}

/* Signed in on a phone the header holds Menu, the bell, messages, and the avatar: the logo alone stands for the brand. */
@media (max-width: 520px) {
  header.site.has-account .wrap { gap: 12px; }
  header.site.has-account .brand-name { display: none; }
}

/* ---------- callsigns ---------- */
.callsign { display: inline-block; font: 500 13.5px/1 var(--mono); letter-spacing: .04em; color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; padding: 5px 8px; background: var(--paper-2); white-space: nowrap; }
.roster-edit { display: grid; gap: 8px; }
.callsign-set .input { min-width: 0; width: 150px; padding: 8px 10px; }
.roster-table td:nth-child(4) { font-size: 13.5px; color: var(--ink-3); white-space: nowrap; }
.roster-table td:nth-child(4) .muted { display: block; }

/* ---------- department status and subdivisions ---------- */
.ptag-status.is-primary { border-color: var(--accent); color: var(--accent-2); }
.ptag-status.is-parttime { border-color: var(--warn); color: var(--warn); }
.ptag-status.is-reserve { border-color: var(--ink-3); color: var(--ink-2); }
.ptag-status.is-implied { border-style: dashed; color: var(--ink-2); }
.sub-list { list-style: none; margin: 0 0 8px; padding: 0; border-top: 1px solid var(--rule-strong); }
.sub-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 13px 4px; border-bottom: 1px solid var(--rule); }
.dept-edit { margin-top: 32px; }
.dept-edit-form { margin-top: 8px; }
.dept-edit-form .group-title { margin-top: 28px; }
.dept-edit-form td .input { min-width: 0; width: 100%; max-width: 280px; }
.sub-edit { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.sub-edit .field { margin: 0; }
.sub-edit .form-actions { margin: 0; display: flex; align-items: center; gap: 12px; }
.sub-delete { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.sub-delete .check { margin: 0; font-size: 14px; }
.sub-new { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--rule); }
@media (max-width: 820px) { .sub-edit { grid-template-columns: minmax(0, 1fr); } }

/* ---------- complaints ---------- */
.complaint-form { max-width: 820px; }
.complaint-form .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }
.required-mark { color: var(--red); }
.case-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 22px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-2); }
.case-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.case-inline .input { width: auto; min-width: 0; padding-top: 8px; padding-bottom: 8px; font-size: 14.5px; }
.case-link .case-inline .input { flex: 1 1 220px; }
.case-timeline { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.case-entry { border: 1px solid var(--rule); border-radius: 8px; padding: 11px 14px; background: var(--card); }
.case-entry.is-note { border-color: rgba(229, 176, 75, .45); background: rgba(229, 176, 75, .07); }
.case-entry.is-system { background: transparent; border-style: dashed; }
.case-entry.is-system .case-body { color: var(--ink-3); font-size: 14px; }
.case-entry.is-submitter { border-left: 3px solid var(--accent); }
.case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; margin-bottom: 4px; }
.case-meta time { font: 500 12px/1.6 var(--mono); color: var(--ink-3); margin-left: auto; }
.case-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); font-size: 15px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 4px 0 8px; }
.choice-row .check { margin: 0; font-size: 14.5px; }
.check.is-disabled { opacity: .5; }
.evidence-list { margin: 0 0 8px; padding-left: 18px; }
.evidence-list li { margin: 4px 0; overflow-wrap: anywhere; }
.portal-two .info-list + .group-title, .portal-two .profile-bio + .group-title, .portal-two .evidence-list + .group-title { margin-top: 34px; }

/* ---------- community directory ---------- */
.dir-tools { margin: 0 0 18px; }
.dir-group { margin: 0 0 30px; border: 1px solid var(--rule); border-radius: var(--radius); background: rgba(15, 26, 42, .65); overflow: hidden; }
.dir-heading { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 18px; font: 700 21px/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; border-bottom: 1px solid var(--rule); background: var(--navy); }
.dir-count { font: 500 12px/1 var(--mono); color: var(--ink-3); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 8px; }
.dir-grid { list-style: none; margin: 0; padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.dir-card > a, .dir-card > div { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 18px 12px 16px; height: 100%; text-align: center; background: var(--card); border: 1px solid transparent; border-radius: 8px; text-decoration: none; transition: border-color .15s, background-color .15s, transform .15s; }
.dir-card > a:hover { border-color: var(--accent); background: #172843; transform: translateY(-1px); }
.dir-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--paper-2); box-shadow: 0 0 0 2px var(--rule); }
.dir-name { font-weight: 700; font-size: 15.5px; line-height: 1.25; color: var(--ink); overflow-wrap: anywhere; }
.dir-dept { font: 500 12px/1.3 var(--mono); color: var(--ink-2); letter-spacing: .02em; }
.dir-dept b { color: var(--accent-2); font-weight: 600; }
.dir-title { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.dir-group-retired .dir-avatar { filter: grayscale(.6); }
.dir-edit .dir-edit-group th { background: var(--navy); color: var(--ink); font: 700 15px/1.2 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.dir-edit tr.is-hidden td { opacity: .55; }
.dir-edit .input { padding-top: 8px; padding-bottom: 8px; font-size: 14.5px; }
.dir-edit .dir-order { width: 80px; }
.dir-edit .check { margin: 0; }
@media (max-width: 600px) { .dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; gap: 8px; } .dir-card > a, .dir-card > div { padding: 14px 8px; } .dir-name { font-size: 14px; } }
/* The header buttons hide on phones (Sign in stays in the menu); .btn comes later in this file, so this needs the extra weight. */
@media (max-width: 640px) { header.site .header-cta, header.site .header-signin { display: none; } }

/* ---------- phones: account header ---------- */
@media (max-width: 480px) {
  .account-hero-inner { gap: 14px; padding-top: 28px; padding-bottom: 24px; }
  .account-hero-avatar { width: 64px; height: 64px; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--pa); }
  .account-hero .crumbs { font-size: 11px; letter-spacing: .08em; }
}

.hint-warn { color: var(--warn); }

/* ---------- rank designations ---------- */
.ptag-command { border-color: rgba(229, 72, 77, .55); color: #ff9b9e; }
.ptag-supervisor { border-color: rgba(229, 176, 75, .55); color: var(--warn); }

/* ---------- navbar: "More" and the account menu ---------- */
.nav-more { position: relative; }
.nav-more summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 15px; color: var(--ink-2); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary:hover, .nav-more details[open] summary, .nav-more summary[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav-more details[open] svg { transform: rotate(180deg); }
.nav-more ul { position: absolute; top: calc(100% + 12px); left: -12px; min-width: 190px; list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .85); z-index: 30; }
.nav-more ul a { display: block; padding: 9px 12px; border: 0; border-radius: 6px; }
.nav-more ul a:hover, .nav-more ul a[aria-current="page"] { background: var(--paper-2); }

.account-pop { width: 320px; padding: 0; overflow: hidden; }
.account-pop-head { padding: 16px 16px 14px; margin: 0; }
.account-pop-head .account-pop-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 5px; }
.account-pop-head .account-pop-rank { font: 600 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-2); border: 1px solid rgba(74, 168, 255, .45); border-radius: 999px; padding: 4px 8px; white-space: nowrap; }
.account-pop-head .account-pop-meta .mono { font: 500 12px/1.4 var(--mono); color: var(--ink-3); }
.account-portals { display: flex; gap: 6px; padding: 0 12px 12px; border-bottom: 1px solid var(--rule); }
.account-portals a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 6px 9px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper-2); color: var(--ink-2); text-decoration: none; font: 600 12.5px/1 var(--sans); transition: border-color .15s, color .15s, background-color .15s; }
.account-portals a:hover, .account-portals a[aria-current="page"] { border-color: var(--accent); color: var(--ink); background: #172843; }
.account-portals svg { color: var(--accent-2); }
.account-grid { list-style: none; margin: 0; padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.account-grid a { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-grid a:hover { background: var(--paper-2); color: var(--ink); }
.account-grid svg { flex: none; color: var(--ink-3); }
.account-grid a:hover svg { color: var(--accent-2); }
.account-pop .account-pop-signout { margin: 0; padding: 6px 8px 8px; border-top: 1px solid var(--rule); }
.account-pop .account-pop-signout button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border-radius: 6px; background: none; border: 0; color: var(--ink-3); font: 500 14.5px/1.2 var(--sans); cursor: pointer; text-align: left; }
.account-pop .account-pop-signout button:hover { background: rgba(229, 72, 77, .1); color: #ff9b9e; }
@media (max-width: 480px) { .account-pop { width: min(320px, calc(100vw - 32px)); } }

/* ---------- confirmation dialogs (confirmDialog in layout.js; CSS :target, no JavaScript) ---------- */
.modal { display: none; position: fixed; inset: 0; z-index: 200; align-items: center; justify-content: center; padding: 16px; }
.modal:target { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 7, 13, .74); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); cursor: default; }
.modal-card { position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; margin: 0; display: grid; gap: 14px; padding: 24px; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9); text-align: left; white-space: normal; animation: modal-in .16s ease-out; }
.modal-card.is-wide { width: min(620px, 100%); }
.modal-card h2 { margin: 0; font: 700 24px/1.1 var(--display); text-transform: uppercase; letter-spacing: .01em; color: var(--ink); }
.modal-message { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.modal-fields { display: grid; gap: 10px; }
.modal-fields label:not(.check) { display: block; font: 600 14px/1.3 var(--sans); color: var(--ink); margin: 4px 0 0; }
.modal-fields .check { margin: 0; font-size: 14.5px; }
.modal-fields .hint { margin: 0; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--rule); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal-card { animation: none; } }
.app-card-closed { font-size: 14px; line-height: 1.45; color: var(--ink-2); border-left: 2px solid var(--warn); padding-left: 10px; }
.app-closed { margin-bottom: var(--space-5); }


/* =====================================================================
   Visual refresh: softer surfaces instead of outlined boxes
   ---------------------------------------------------------------------
   Cards on the page are translucent fills with a faint edge; only things
   that float (menus, pop-ups, dialogs) stay solid. Card titles use the
   body font in normal case; the condensed capitals are kept for page and
   section headings, so a grid of cards doesn't read like a wall of signs.
   ===================================================================== */
:where(.tile, .panel, .example, .login-card, .link-card, .srv-card, .ts-bulk, .app-card, .app-msg, .app-perm, .app-field, .dm-who, .case-entry:not(.is-note):not(.is-system), .notice-box, .callout, .closing-card, .rank-row, .stat-card) {
  border-color: rgba(255, 255, 255, .055);
}
.tile, .panel, .example, .login-card, .link-card, .srv-card, .ts-bulk, .app-card, .app-msg, .app-perm, .app-field, .dm-who, .rank-row {
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 30px -24px rgba(0, 0, 0, .9);
}
:where(a.tile, a.link-card, a.app-card, .dir-card > a):hover { background: var(--surface-2); border-color: rgba(255, 255, 255, .1); transform: translateY(-1px); }
/* floating things stay solid, with a softer edge */
.menu ul, .account-pop, .ts-menu-pop, .bell-pop, .nav-more ul, .modal-card { border-color: rgba(255, 255, 255, .08); }

/* card titles: body font, normal case */
.tile h3, .link-card-title, .app-card-name, .srv-head h3, .app-perm h3, .dm-who b, .ts-bulk-title b {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
}
.link-card-sub, .app-card-sum { font-family: var(--sans); letter-spacing: 0; }

/* directory: one level of grouping, no box around each rank */
.dir-group { border: 0; background: none; border-radius: 0; overflow: visible; margin-bottom: 36px; }
.dir-heading { background: none; padding: 0 0 12px; border-bottom: 1px solid var(--rule); font-size: 22px; }
.dir-grid { padding: 14px 0 0; }
.dir-card > a, .dir-card > div { background: var(--surface); border: 1px solid rgba(255, 255, 255, .05); border-radius: var(--radius); }

/* chips and tags: quieter outlines */
.ptag, .standing, .app-card-state, .app-status, .callsign, .dir-count { border-color: var(--rule-strong); }

/* tables: rows separated by hairlines, a faint highlight on hover */
.table tbody tr:hover td { background: rgba(255, 255, 255, .02); }
/* server cards: department counts as soft pills, not a grid of boxes */
.srv-depts li { border-color: transparent; background: rgba(255, 255, 255, .04); border-radius: 999px; padding: 6px 12px; }
/* application cards: the state reads as a short line, not a stamped label */
.app-card-state { font: 600 12.5px/1.35 var(--sans); letter-spacing: 0; text-transform: none; border-radius: 999px; padding: 4px 11px; }
/* complaint pages: the secondary action under the reply form */
.case-close, .case-secondary { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--rule); }

/* =====================================================================
   Staff portal (work queue) and admin portal (control panel)
   ===================================================================== */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 40px; align-items: start; }
@media (max-width: 960px) { .dash { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.dash-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; }
.dash-head h2 { margin: 0; font: 700 26px/1.1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.dash-count { font: 600 12.5px/1 var(--sans); color: var(--ink); background: var(--surface-2); border-radius: 999px; padding: 4px 9px; }
.dash-sub { margin-left: auto; font-size: 13px; color: var(--ink-3); }

.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.queue-item { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink-2); transition: background-color .15s; }
.queue-item:hover { background: var(--surface-2); }
.queue-type { justify-self: start; font: 600 12px/1 var(--sans); border-radius: 999px; padding: 5px 10px; background: rgba(255, 255, 255, .06); color: var(--ink-2); }
.queue-type.t-registration { background: rgba(74, 168, 255, .14); color: var(--accent-2); }
.queue-type.t-complaint { background: rgba(229, 72, 77, .14); color: #ff9b9e; }
.queue-type.t-application { background: rgba(76, 195, 138, .14); color: #8fe0b8; }
.queue-type.t-event { background: rgba(229, 176, 75, .14); color: var(--warn); }
.queue-main { display: grid; gap: 2px; min-width: 0; }
.queue-main b { color: var(--ink); font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-main span { font-size: 13.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-age { font: 500 12.5px/1 var(--mono); color: var(--ink-3); }
.queue-empty { padding: 28px 16px; border-radius: var(--radius); background: var(--surface); color: var(--ink-2); text-align: center; }
.queue-more { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 14px; }
.queue-more a { color: var(--ink-2); text-decoration: none; }
.queue-more a:hover { color: var(--ink); }
.queue-more b { color: var(--ink); margin-left: 2px; }
@media (max-width: 560px) { .queue-item { grid-template-columns: minmax(0, 1fr) auto; } .queue-type { grid-column: 1 / -1; } }

.dash-side { display: grid; gap: 28px; }
.side-block h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 500 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.side-link { display: inline-block; margin-top: 8px; font-size: 13.5px; color: var(--accent-2); text-decoration: none; }
.side-link:hover { text-decoration: underline; }
.srv-rows, .act-list, .jump-list { list-style: none; margin: 0; padding: 0; }
.srv-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.srv-row > :nth-child(3) { color: var(--ink-3); justify-self: end; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(76, 195, 138, .18); }
.srv-row.is-off .srv-dot, .health-item.is-down .srv-dot { background: var(--red); box-shadow: 0 0 0 3px rgba(229, 72, 77, .18); }
.health-item.is-unknown .srv-dot { background: var(--ink-3); box-shadow: none; }
.act-list li { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.act-what { color: var(--ink); font-size: 14px; text-transform: capitalize; }
.act-what .muted { text-transform: none; }
.act-who { font-size: 12.5px; color: var(--ink-3); }
.tl-list .act-what, .tl-what { text-transform: none; }
.jump-list { display: grid; gap: 2px; }
.jump-list a { display: block; padding: 7px 0; color: var(--ink-2); text-decoration: none; font-size: 14.5px; }
.jump-list a:hover { color: var(--ink); }
.jump-list a::after { content: " →"; color: var(--ink-3); }

.health { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.health-item { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface); font-size: 14px; color: var(--ink-2); }
.health-item b { color: var(--ink); font-weight: 600; }
.manage { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 32px; }
.manage-group h3 { margin: 0 0 8px; font: 500 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.manage-group ul { list-style: none; margin: 0; padding: 0; }
.manage-group a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.manage-group a:hover { color: var(--accent-2); }
.manage-group em { font-style: normal; font-size: 13px; color: var(--ink-3); white-space: nowrap; }

/* ---------- member portal ---------- */
.portal-id { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; font-size: 16px; color: var(--ink-2); }
.portal-id li { display: inline-flex; align-items: center; gap: 8px; }
.portal-id li + li::before { content: "·"; margin: 0 12px; color: var(--ink-3); }
.portal-id li.is-accent { color: var(--accent-2); font-weight: 600; }
.dash-stack { display: grid; gap: 40px; }
.dash-empty { margin: 0; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--ink-3); font-size: 14.5px; }
.dept-rows, .event-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.dept-rows li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 96px; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.dept-row-main { display: grid; gap: 2px; min-width: 0; }
.dept-row-main b { color: var(--ink); font-weight: 600; font-size: 15px; }
.dept-row-main > span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-3); }
.dept-row-status { justify-self: end; }
@media (max-width: 560px) {
  .dept-rows li { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .dept-row-status { grid-column: 2 / -1; justify-self: start; }
  .dept-row-status:empty { display: none; }
}
.event-rows a { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.event-rows a:hover .event-title { color: var(--accent-2); }
.event-date { display: grid; gap: 2px; }
.event-date b { font: 600 13px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.event-date span { font-size: 12.5px; color: var(--ink-3); }
.event-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; transition: color .15s; }
.side-facts { margin: 0; }
.side-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.side-facts dt { color: var(--ink-3); }
.side-facts dd { margin: 0; color: var(--ink); text-align: right; }
.srv-who { grid-column: 1 / -1; font-size: 13.5px; }
.srv-who summary { cursor: pointer; color: var(--accent-2); width: max-content; }
.srv-who ul { list-style: none; margin: 6px 0 2px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); }
.jump-list a.is-external::after { content: " ↗"; }
.srv-duty { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-3); }
.srv-duty b { color: var(--ink-2); font-weight: 600; }
@media (max-width: 560px) { .portal-id { gap: 8px 14px; } .portal-id li + li::before { content: none; } }

/* ---- Civilian hours (web/civilian) ---- */
.civ-meter { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); margin: 0 0 14px; }
.civ-meter-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 12px; }
.civ-total { color: var(--ink-2); font-size: 15px; }
.civ-total b { font: 700 30px/1 var(--display); color: var(--ink); margin-right: 4px; }
.civ-note { margin: 10px 0 0; font-size: 13px; color: var(--ink-3); }
.civ-progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; background: var(--rule-strong); color: var(--accent); overflow: hidden; }
.civ-progress::-webkit-progress-bar { background: var(--rule-strong); border-radius: 999px; }
.civ-progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.civ-progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.civ-progress.is-met { color: var(--ok); }
.civ-progress.is-met::-webkit-progress-value { background: var(--ok); }
.civ-progress.is-met::-moz-progress-bar { background: var(--ok); }
.civ-progress.is-inline { display: inline-block; width: 72px; height: 5px; margin-left: 10px; vertical-align: middle; }
.civ-recent { list-style: none; margin: 0; padding: 0; }
.civ-recent li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); }
.civ-recent li b { color: var(--ink); font-weight: 500; }
.civ-months { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; font-size: 14px; }
.civ-months b { font: 700 20px/1.1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.civ-page .civ-meter { max-width: 560px; }
@media (max-width: 560px) {
  .civ-months { flex-wrap: wrap; }
  .civ-months b { order: -1; width: 100%; }
  .civ-recent li { flex-direction: column; gap: 2px; }
  .civ-progress.is-inline { display: none; }
}
.ptag-ok { border-color: rgba(76, 195, 138, .6); color: var(--ok); }
.civ-side { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.civ-side b { font: 700 22px/1 var(--display); color: var(--ink); margin-right: 2px; }
.side-block .civ-progress { margin-bottom: 8px; }
.civ-meter.is-compact { padding: 12px 14px; }
.civ-meter.is-compact .civ-total b { font-size: 24px; }

/* ---- BOLOs (web/bolos) ---- */
.bolo-tag.is-investigative { border-color: rgba(155, 89, 182, .7); color: #c79be0; }
.bolo-tag.is-disciplinary { border-color: var(--warn); color: var(--warn); }
.bolo-flag { border-color: rgba(239, 90, 90, .7); color: #ff8b8b; text-decoration: none; font-weight: 600; }
.bolo-flag:hover { background: rgba(239, 90, 90, .12); }
.bolo-form { max-width: 720px; }
.bolo-form fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.bolo-form legend { font-weight: 600; margin-bottom: 8px; }
.bolo-form .choice { display: flex; margin-bottom: 8px; }
.bolo-form .choice > span { display: block; width: 100%; }
.bolo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
.bolo-reason { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); color: var(--ink); line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.bolo-timeline { list-style: none; margin: 0 0 16px; padding: 0; }
.bolo-event { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); }
.bolo-event-kind { font: 500 12px/1.6 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.bolo-event.is-sighting .bolo-event-kind { color: #ff8b8b; }
.bolo-event.is-lifted .bolo-event-kind { color: var(--ok); }
.bolo-event time { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.bolo-event-main { overflow-wrap: anywhere; }
.bolo-note { display: grid; gap: 8px; justify-items: start; }
.bolo-note textarea { width: 100%; }
.bolo-list { list-style: none; margin: 0 0 10px; padding: 0; }
.bolo-list li { padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
@media (max-width: 860px) {
  .bolo-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .bolo-event { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
.side-sub { margin: 12px 0 2px; font: 500 11.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.bolo-notice a { color: inherit; }
.bolo-filters { flex-wrap: wrap; gap: 8px; }
.bolo-filters .input { flex: 1 1 160px; width: auto; }
.bolo-filters #q { flex: 2 1 240px; }
.bolo-mine { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }

/* ---- Server connections (web/connections) ---- */
.conn-quick { font-size: 14px; margin: -6px 0 14px; }
.conn-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px; align-items: end; margin-bottom: 14px; }
.conn-filters .conn-q { grid-column: 1 / -1; }
.conn-filters .form-actions { grid-column: 1 / -1; }
.conn-ids { font-size: 12px; }
.conn-table tr.conn-flagged td { background: rgba(229, 176, 75, .06); }
.conn-idlist { list-style: none; margin: 0; padding: 0; text-align: right; }
.conn-idlist li { font-size: 12.5px; overflow-wrap: anywhere; }
.conn-facts dd { max-width: 70%; }

/* ---- Announcements (web/announcements) ---- */
.site-banner + .site-banner { border-top: 0; }
.site-banner-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.site-banner-row p { flex: 1; }
.site-banner-urgent { background: linear-gradient(90deg, rgba(229, 72, 77, .28), rgba(229, 72, 77, .08)); }
.site-banner-urgent p { font-weight: 600; }
.site-banner-dismiss { margin: 0; flex: none; }
.site-banner-dismiss button { background: none; border: 0; color: var(--ink-2); font-size: 22px; line-height: 1; padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.site-banner-dismiss button:hover { color: var(--ink); background: var(--surface-2); }
.ann-preview .site-banner { border: 1px solid var(--rule); border-radius: 8px; font-size: 14px; }
.ann-preview .site-banner .wrap { padding: 8px 12px; max-width: none; }
.ann-preview-large { margin-bottom: 22px; }
.ann-table .ann-preview { min-width: 280px; }
.ann-actions form { display: inline; }
.ann-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; max-width: 900px; }
.ann-form .ann-wide { grid-column: 1 / -1; }

/* Registrations: duplicates, merging, corrections, history (web/portals/views.js) */
.standing-merged { border-color: var(--rule-strong); color: var(--ink-3); }
.reg-note { border: 1px solid var(--rule); border-left: 4px solid var(--warn); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 24px; background: color-mix(in srgb, var(--warn) 6%, transparent); }
.reg-note p { margin: 0; color: var(--ink-2); }
.reg-note-title { font: 600 18px/1.3 var(--display); margin: 0 0 12px; color: var(--warn); }
.reg-links { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 14px; }
.reg-links .hint { margin: 4px 0 8px; }
.reg-edit { margin-top: var(--space-3); }
.reg-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }
.reg-edit-grid .field { margin-bottom: 16px; }
.reg-history { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.reg-history li { padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); overflow-wrap: anywhere; }
.reg-history-head { margin-bottom: 4px; color: var(--ink); }
.merge-intro { color: var(--ink-2); max-width: 70ch; margin: 0 0 22px; }
.merge-table th[scope="row"] { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.merge-table td { overflow-wrap: anywhere; min-width: 160px; }
.merge-role { display: block; font: 500 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.merge-same { color: var(--ink-3); }
.merge-pick { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.merge-pick input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.merge-differs td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.merge-context th, .merge-context td { color: var(--ink-3); }

/* Community gallery (web/gallery) */
.gal-actions { margin: 0 0 24px; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.gal-tile { margin: 0; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.gal-thumb { display: block; aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden; }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.gal-thumb:hover img, .gal-thumb:focus-visible img { transform: scale(1.03); }
.gal-tile figcaption { padding: 12px 14px 14px; display: grid; gap: 4px; font-size: 14.5px; overflow-wrap: anywhere; }
.gal-caption { color: var(--ink); }
.gal-counts { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.gal-pager { margin-top: 26px; }
.gal-full { margin: 0 0 18px; }
.gal-full img { display: block; max-width: 100%; height: auto; max-height: 80vh; margin: 0 auto; border-radius: var(--radius); background: var(--paper-2); }
.gal-full figcaption { max-width: 72ch; margin: 14px auto 0; text-align: center; color: var(--ink-2); overflow-wrap: anywhere; }
.gal-full figcaption p { margin: 0 0 6px; }
.gal-reacts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin: 0 0 8px; }
.gal-react { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--rule); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 17px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.gal-react:hover { border-color: var(--ink-3); }
.gal-react:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gal-react.is-on { border-color: var(--accent); background: rgba(74, 168, 255, .12); }
.gal-react.is-static { cursor: default; }
.gal-react-n { font-size: 14px; color: var(--ink-2); min-width: 1ch; }
.gal-signin { margin-left: 6px; font-size: 14.5px; }
.gal-manage { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--rule); display: grid; gap: 16px; justify-items: start; max-width: 560px; }
.gal-caption-form label { display: block; font-weight: 600; margin: 0 0 8px; }
.gal-caption-form .inline-form { width: 100%; }
.gal-caption-form .input { flex: 1; min-width: 0; }
.gal-upload { max-width: 640px; }
@media (max-width: 520px) { .gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .gal-tile figcaption { padding: 10px; font-size: 13.5px; } }
