/* ==========================================================================
   Fifth Alarm Roleplay: site styles
   1. Tokens  2. Base  3. Layout  4. Header & menu  5. Buttons  6. Section heads
   7. Home  8. Cards & panels  9. Inner pages  10. Footer  11. Motion  12. Responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* brand: crimson from the badge; used sparingly as the one accent */
  --red: #9E0225;
  --red-hover: #B6072E;
  --red-text: #EE5A66;          /* readable red for small text on black */
  --red-tint: rgba(158, 2, 37, .14);

  --bg: #0A0A0B;
  --bg-2: #0E0E10;
  --surface: #121214;
  --surface-2: #17171A;
  --border: rgba(255, 255, 255, .08);
  --border-2: rgba(255, 255, 255, .15);

  --text: #EDEBE7;
  --muted: #A3A19C;
  --faint: #827F7A;

  --f-head: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --container: 1180px;
  --gutter: clamp(18px, 4vw, 32px);
  --radius: 10px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 400 16px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--f-head); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; color: #fff; }
p, ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red-text); outline-offset: 3px; border-radius: 3px; }
[hidden] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 6px; background: #fff; color: #000; font-weight: 600; font-size: 14px; transition: top .2s; }
.skip-link:focus { top: 12px; }

/* 3. Layout ---------------------------------------------------------------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: clamp(72px, 9vw, 112px); }
.section.alt { background: var(--bg-2); border-block: 1px solid var(--border); }

/* 4. Header & menu --------------------------------------------------------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h); background: rgba(10, 10, 11, .82);
  border-bottom: 1px solid var(--border); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
/* a backdrop-filter would trap the fixed mobile menu inside the header bar, so the open menu uses a solid bar */
.site-header.is-open { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
.header-row { height: 100%; display: flex; align-items: center; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand img { width: 38px; height: 38px; }
.brand-name { font: 700 17px/1 var(--f-head); letter-spacing: .06em; text-transform: uppercase; color: #fff; white-space: nowrap; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 8px 12px; border-radius: 6px; font: 500 14.5px/1 var(--f-body); color: var(--muted); transition: color .15s, background-color .15s; }
.nav-link:hover { color: #fff; }
.nav-link[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .06); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* dropdowns */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-caret { display: grid; place-items: center; width: 22px; height: 30px; margin-left: -8px; padding: 0; border: 0; border-radius: 4px; color: var(--muted); cursor: pointer; }
.nav-caret svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.nav-caret:hover { color: #fff; }
.has-menu.is-open .nav-caret svg { transform: rotate(180deg); }
.nav-menu { position: absolute; top: 100%; left: 50%; z-index: 10; padding-top: 12px; /* bridges the gap so hover doesn't drop */
  opacity: 0; visibility: hidden; transform: translate(-50%, 4px); transition: opacity .15s, transform .15s var(--ease), visibility .15s; }
.has-menu.is-open .nav-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (hover: hover) and (min-width: 921px) {
  .has-menu:hover .nav-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
  .has-menu:hover .nav-caret svg { transform: rotate(180deg); }
}
.nav-menu-inner { display: grid; grid-template-columns: repeat(2, minmax(190px, 1fr)); gap: 2px; padding: 8px; border-radius: var(--radius);
  border: 1px solid var(--border-2); background: var(--surface); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .7); }
.nav-menu-inner a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 7px; transition: background-color .15s; }
.nav-menu-inner a:hover, .nav-menu-inner a[aria-current="page"] { background: rgba(255, 255, 255, .06); }
.nav-menu-inner a span { font-size: 14px; font-weight: 600; color: var(--text); }
.nav-menu-inner a small { font-size: 12.5px; color: var(--muted); }
.nav-menu-inner .nav-menu-all { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between;
  margin-bottom: 4px; padding: 12px; border-bottom: 1px solid var(--border); border-radius: 7px 7px 0 0; font-size: 14px; font-weight: 600; color: #fff; }
.nav-menu-all svg { width: 16px; height: 16px; color: var(--muted); }
#menu-departments .nav-menu-inner { grid-template-columns: minmax(300px, 1fr); }

.menu-toggle { display: none; margin-left: auto; width: 42px; height: 42px; place-items: center; border-radius: 8px; border: 1px solid var(--border-2); background: transparent; cursor: pointer; }
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle .i-close { display: none; }
.is-open .menu-toggle .i-open { display: none; }
.is-open .menu-toggle .i-close { display: block; }

/* 5. Buttons ---------------------------------------------------------------- */
.btn { --h: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: var(--h); padding: 0 22px; border-radius: 6px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap; font: 600 15px/1 var(--f-head); letter-spacing: .07em; text-transform: uppercase;
  transition: background-color .15s, border-color .15s, color .15s; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hover); }
.btn-ghost { border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .28); }
.btn-sm { --h: 38px; padding: 0 16px; font-size: 14px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.inline-link { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 3px; transition: text-decoration-color .15s; }
.inline-link:hover { text-decoration-color: currentColor; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font: 600 15px/1 var(--f-head); letter-spacing: .07em; text-transform: uppercase; color: var(--text); }
.text-link svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.text-link:hover { color: #fff; }
.text-link:hover svg { transform: translateX(3px); }

/* 6. Section heads ---------------------------------------------------------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 12.5px/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--red-text); }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-title { margin-top: 14px; font-size: clamp(2rem, 3.6vw, 2.75rem); line-height: 1.06; }
.section-lead { margin-top: 16px; font-size: 1.06rem; color: var(--muted); }

/* 7. Home ------------------------------------------------------------------- */
.hero { position: relative; padding: calc(var(--header-h) + clamp(56px, 8vw, 104px)) 0 clamp(56px, 7vw, 88px);
  background: radial-gradient(55% 75% at 80% 45%, rgba(158, 2, 37, .16), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: clamp(32px, 5vw, 72px); }
.status { display: flex; align-items: center; gap: 10px; margin-top: 22px; font-size: .9rem; color: var(--muted); }
.status-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #8A8782; }
.status.is-online .status-dot { background: #3DD68C; box-shadow: 0 0 0 3px rgba(61, 214, 140, .18); }
.hero-title { margin-top: 18px; font-size: clamp(2.6rem, 5.4vw, 4.4rem); line-height: 1.02; text-wrap: balance; }
.hero-lead { margin-top: 22px; max-width: 34em; font-size: clamp(1.04rem, 1.3vw, 1.15rem); color: var(--muted); }
.hero .btn-row { margin-top: 34px; }
.hero-badge { justify-self: end; width: min(100%, 420px); }
.hero-badge img { width: 100%; height: auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .5)); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stat { padding: 24px 28px; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat-num { display: block; font: 600 2.4rem/1 var(--f-head); color: #fff; font-variant-numeric: tabular-nums; }
.stat-label { display: block; margin-top: 8px; font-size: .9rem; color: var(--muted); }
.stats-wrap { padding-bottom: clamp(24px, 4vw, 40px); }
/* with the two live call totals: two rows of three */
.stats.has-live { grid-template-columns: repeat(3, 1fr); }
.stats.has-live .stat:nth-child(4) { border-left: 0; }
.stats.has-live .stat:nth-child(n+4) { border-top: 1px solid var(--border); }
.stat[data-live] .stat-label::after { content: "Live"; margin-left: 8px; padding: 2px 6px; border-radius: 4px; background: rgba(61, 214, 140, .12); color: #7BDDA8; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; vertical-align: 1px; }

/* 8. Cards & panels --------------------------------------------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: border-color .2s; }
.card:hover { border-color: var(--border-2); }
.icon-box { width: 42px; height: 42px; display: grid; place-items: center; flex: none; border-radius: 9px; background: var(--red-tint); color: var(--red-text); }
.icon-box svg { width: 21px; height: 21px; }
.card h3 { margin-top: 20px; font-size: 1.3rem; line-height: 1.15; }
.card p { margin-top: 8px; font-size: .96rem; color: var(--muted); }

.dept-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dept-org { margin-top: 4px; font-size: .9rem; color: var(--faint); }
.card .dept-org + p { margin-top: 14px; }
.dept-list { list-style: none; display: grid; gap: 10px; margin: 22px 0 0; padding-top: 22px; border-top: 1px solid var(--border); }
.dept-list li { position: relative; padding-left: 18px; font-size: .95rem; color: var(--text); }
.dept-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 2px; background: var(--red-text); }

.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border-2);
  font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.tag.open { color: #7BDDA8; border-color: rgba(61, 214, 140, .35); }

.cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; padding: clamp(32px, 5vw, 56px); border-radius: 14px;
  border: 1px solid rgba(158, 2, 37, .4); background: linear-gradient(135deg, rgba(158, 2, 37, .22), rgba(158, 2, 37, .04) 55%, transparent), var(--surface); }
.cta h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); line-height: 1.08; }
.cta p { margin-top: 12px; max-width: 62ch; color: var(--muted); }
.cta .btn-row { justify-content: flex-end; }

.panel { padding: clamp(26px, 4vw, 40px); border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.panel h2 { margin-top: 12px; font-size: 1.7rem; line-height: 1.1; }
.panel > h2:first-child { margin-top: 0; }
.panel > p:not(.eyebrow), .panel-text { margin-top: 10px; color: var(--muted); }

/* 9. Inner pages ------------------------------------------------------------ */
.page-head { padding: calc(var(--header-h) + clamp(56px, 7vw, 88px)) 0 clamp(40px, 5vw, 56px); border-bottom: 1px solid var(--border);
  background: radial-gradient(60% 120% at 85% 0%, rgba(158, 2, 37, .12), transparent 70%); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--faint); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: #fff; }
.crumbs svg { width: 14px; height: 14px; }
.page-title { margin-top: 18px; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.02; }
.page-lead { margin-top: 16px; max-width: 46em; font-size: 1.08rem; color: var(--muted); }
.page-meta { margin-top: 18px; font-size: 13.5px; color: var(--faint); }

/* rules */
.rules-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.rule-list { list-style: none; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.rule { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; padding: 24px 28px; }
.rule + .rule { border-top: 1px solid var(--border); }
.rule-num { font: 600 1.05rem/1.5 var(--f-head); color: var(--red-text); font-variant-numeric: tabular-nums; }
.rule h2 { font-size: 1.2rem; line-height: 1.3; }
.rule p { margin-top: 6px; color: var(--muted); }
.aside { position: sticky; top: calc(var(--header-h) + 24px); }
.aside h2 { font-size: 1.35rem; }
.aside-list { list-style: none; display: grid; gap: 12px; margin: 16px 0 24px; }
.aside-list li { position: relative; padding-left: 18px; font-size: .95rem; color: var(--muted); }
.aside-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 2px; background: var(--red-text); }
.aside .btn { width: 100%; }

/* join */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps .card { min-height: 100%; }
.step-num { font: 600 13px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--red-text); }
.steps h2 { margin-top: 14px; font-size: 1.3rem; line-height: 1.15; }
.steps p { margin: 8px 0 22px; font-size: .96rem; color: var(--muted); }
.steps .push { margin-top: auto; align-self: flex-start; }
.join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.check-list { list-style: none; margin-top: 18px; }
.check-list li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.check-list svg { width: 18px; height: 18px; margin-top: 3px; color: var(--red-text); }
.check-list b { display: block; font-weight: 600; color: var(--text); }
.check-list span span { color: var(--muted); font-size: .95rem; }
.server-field { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 6px 6px 6px 16px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--bg); }
.server-field code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 15px/1 ui-monospace, 'Cascadia Mono', Consolas, monospace; color: var(--text); }
.panel .btn-row { margin-top: 20px; }

/* account button in the header */
.account { position: relative; }
.account-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--border-2);
  color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color .15s; }
.account-btn:hover, .account.is-open .account-btn { background: rgba(255, 255, 255, .06); }
.account-btn img { width: 30px; height: 30px; border-radius: 50%; }
.account-btn svg { width: 14px; height: 14px; color: var(--muted); }
.account-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 230px; padding: 6px; border-radius: var(--radius);
  border: 1px solid var(--border-2); background: var(--surface); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); display: none; }
.account.is-open .account-menu { display: block; }
.account-menu-head { display: grid; gap: 2px; padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.account-menu-head b { font-weight: 600; }
.account-menu-head small { font-size: 12.5px; color: var(--muted); }
.account-menu a, .account-menu button { display: block; width: 100%; padding: 9px 12px; border-radius: 7px; text-align: left; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.account-menu a:hover, .account-menu button:hover { background: rgba(255, 255, 255, .06); }

/* account page */
.acct-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; }
.acct-card { text-align: center; }
.acct-card img { width: 96px; height: 96px; margin: 0 auto; border-radius: 50%; border: 1px solid var(--border-2); }
.acct-card h2 { margin-top: 16px; font-size: 1.6rem; line-height: 1.1; }
.acct-callsign { margin-top: 6px; font: 600 1rem/1 var(--f-head); letter-spacing: .08em; color: var(--red-text); }
.acct-card .facts { margin-top: 22px; text-align: left; }
.acct-status { display: inline-flex; align-items: center; gap: 7px; }
.acct-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3DD68C; }
.acct-status.is-loa::before { background: #E8B44C; }
.acct-main { display: grid; gap: 24px; }
.acct-main .panel h2 { font-size: 1.35rem; margin-top: 0; }
.form { display: grid; gap: 14px; margin-top: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--muted); }
.field input, .field textarea { width: 100%; padding: 11px 13px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--bg); color: var(--text); font: inherit; font-size: 15px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: rgba(238, 90, 102, .6); }
.field input::-webkit-calendar-picker-indicator { filter: invert(.8); }
.field-hint { font-size: 12.5px; color: var(--faint); }
.form-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form-msg { font-size: 14px; color: var(--muted); }
.form-msg.is-error { color: var(--red-text); }
.req-list { list-style: none; margin-top: 18px; border-top: 1px solid var(--border); }
.req-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.req-list b { font-weight: 600; }
.req-list p { grid-column: 1; font-size: 14px; color: var(--muted); }
.req-state { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.req-state.pending { color: #E8B44C; } .req-state.approved { color: #7BDDA8; } .req-state.denied { color: var(--red-text); }
.link-btn { padding: 0; font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.notice { padding: 14px 16px; border-radius: 8px; border: 1px solid var(--border-2); background: rgba(255, 255, 255, .03); color: var(--muted); font-size: .95rem; }
.notice.is-error { border-color: rgba(238, 90, 102, .45); color: var(--text); }
.signin-panel { max-width: 520px; }
.signin-panel .btn { margin-top: 22px; }

/* tabs (roster departments, staff panel) */
.tabs { display: flex; gap: 6px; margin-top: 26px; flex-wrap: wrap; }
.tabs[hidden] { display: none; }
.tabs button { height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-2); font: 500 14px/1 var(--f-body); color: var(--muted); cursor: pointer; transition: background-color .15s, color .15s; }
.tabs button:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.tabs button[aria-selected="true"] { color: #fff; background: var(--red); border-color: var(--red); }

/* roster */
.ros-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.ros-count { color: var(--muted); }
.ros-search, .staff-bar input, .staff-bar select, .field select { height: 42px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--bg); color: var(--text); font: inherit; font-size: 15px; }
.ros-search { width: min(320px, 100%); }
.ros-search:focus, .staff-bar input:focus, .staff-bar select:focus, .field select:focus { outline: none; border-color: rgba(238, 90, 102, .6); }
.ros-section + .ros-section { margin-top: 48px; }
.ros-head { font-size: 1.6rem; line-height: 1.1; }
.ros-head span, .ros-group-head span { margin-left: 8px; font: 500 .95rem/1 var(--f-body); text-transform: none; letter-spacing: 0; color: var(--faint); }
.ros-group { margin-top: 18px; }
.ros-group-head { margin-bottom: 10px; font-size: 1rem; letter-spacing: .08em; color: var(--muted); }
.ros-list { list-style: none; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ros-row { display: grid; grid-template-columns: 36px minmax(0, 1.6fr) 90px minmax(0, 1.2fr) 180px 140px; align-items: center; gap: 16px; padding: 12px 18px; }
.ros-row + .ros-row { border-top: 1px solid var(--border); }
.ros-row img, .ros-avatar-empty { width: 36px; height: 36px; border-radius: 50%; }
.ros-avatar-empty { border: 1px dashed var(--border-2); }
.ros-who { display: grid; min-width: 0; }
.ros-who b { font-weight: 600; }
.ros-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--faint); }
.ros-call { font: 600 .95rem/1 var(--f-head); letter-spacing: .06em; color: var(--red-text); }
.ros-rank { display: grid; font-size: 14.5px; }
.ros-rank small { font-size: 12.5px; color: var(--faint); }
.ros-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--muted); }
.ros-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3DD68C; flex: none; }
.ros-status.is-loa { color: #E8B44C; }
.ros-status.is-loa::before { background: #E8B44C; }
.ros-joined { font-size: 13px; color: var(--faint); text-align: right; }
.ros-row.is-vacant .ros-who b, .ros-row.is-vacant .ros-rank { color: var(--faint); font-weight: 500; }
.ros-empty { padding: 16px 18px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--faint); font-size: .95rem; }

/* staff panel */
.staff-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.staff-bar input { flex: 1 1 320px; }
.staff-row { display: grid; grid-template-columns: 36px minmax(0, 1.4fr) 90px minmax(0, 1.4fr) 170px 160px; align-items: center; gap: 16px; padding: 12px 18px; }
.staff-row + .staff-row { border-top: 1px solid var(--border); }
.staff-row img { width: 36px; height: 36px; border-radius: 50%; }
.staff-row.is-clickable { cursor: pointer; transition: background-color .15s; }
.staff-row.is-clickable:hover, .staff-row.is-clickable:focus-visible { background: rgba(255, 255, 255, .04); outline: none; }
.staff-sync { text-align: right; }
.sync-warn { font-size: 12.5px; color: #E8B44C; }
.sheet { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border-radius: 14px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); }
.sheet:focus, .sheet:focus-visible { outline: none; }
.sheet::backdrop { background: rgba(0, 0, 0, .7); }
.sheet-body { padding: clamp(22px, 4vw, 34px); }
.sheet-head { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.sheet-head img { width: 56px; height: 56px; border-radius: 50%; }
.sheet-head h2 { font-size: 1.5rem; line-height: 1.1; }
.sheet-head p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.sheet-close { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); cursor: pointer; }
.sheet-close:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sheet-close svg { width: 18px; height: 18px; }
.sheet .field[hidden] { display: none; }
.sheet-sub { margin-top: 30px; font-size: 1rem; letter-spacing: .08em; color: var(--muted); }
.log-list { list-style: none; margin-top: 12px; border-top: 1px solid var(--border); }
.log-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.log-list li > span { color: var(--faint); }
.log-list b { font-weight: 600; }
.log-list div span { color: var(--muted); }
.log-list small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--faint); }
.loa-list { margin-top: 14px; }
.loa-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1.3fr) 220px; align-items: center; gap: 16px; padding: 14px 18px; }
.loa-row + .loa-row { border-top: 1px solid var(--border); }
.loa-row img { width: 36px; height: 36px; border-radius: 50%; }
.loa-row .ros-call { margin-left: 6px; font-size: .85rem; }
.loa-when { display: grid; }
.loa-when b { font-weight: 600; }
.loa-when small { font-size: 13.5px; color: var(--muted); }
.loa-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* applications */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.apply-card { display: flex; flex-direction: column; align-items: flex-start; }
.apply-card h2 { font-size: 1.6rem; line-height: 1.1; }
.apply-card .btn { margin-top: auto; }
.apply-card .panel-text { margin-bottom: 22px; }
.apply-card .notice { margin-top: auto; }
.apply-form { max-width: 820px; }
.apply-form h2 { margin-top: 10px; font-size: 2rem; line-height: 1.05; }
.req-state.app-pending { color: #E8B44C; } .req-state.app-interview { color: var(--text); }
.req-state.app-hired { color: #7BDDA8; } .req-state.app-denied { color: var(--red-text); }
.apply-grid { align-items: stretch; }
.check { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); }
.check a { color: var(--red-text); text-decoration: underline; }
.wl-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 22px; padding: 14px 16px; border-radius: 8px; border: 1px solid var(--border-2); font-size: 14.5px; color: var(--muted); }
.wl-row b { color: var(--text); font-weight: 600; }
.req-state.app-approved { color: #7BDDA8; }
.app-answers { display: grid; gap: 18px; margin-top: 22px; }
.app-answers dt { font-size: 13px; font-weight: 500; color: var(--muted); }
.app-answers dd { margin: 4px 0 0; white-space: pre-wrap; }
.app-actions { display: grid; gap: 12px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); }
.app-row { grid-template-columns: 36px minmax(0, 1.4fr) minmax(0, 1.4fr) 170px 160px; }
.app-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; font-size: 13.5px; color: var(--muted); }

/* faq */
.faq-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.faq-groups { display: grid; gap: 44px; }
.faq-group-head { margin-bottom: 14px; font-size: 1.5rem; line-height: 1.1; }
.faq-list { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; font-weight: 600; font-size: 1.02rem; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: rgba(255, 255, 255, .03); }
.faq-item summary svg { width: 18px; height: 18px; flex: none; color: var(--muted); transition: transform .2s var(--ease); }
.faq-item[open] summary svg { transform: rotate(180deg); }
.faq-answer { padding: 0 22px 20px; color: var(--muted); }
.faq-answer p + p, .faq-answer p + ul, .faq-answer p + ol, .faq-answer ul + p, .faq-answer ol + p { margin-top: 10px; }
.faq-answer ul, .faq-answer ol { display: grid; gap: 6px; padding-left: 20px; }
.faq-answer b { color: var(--text); font-weight: 600; }
.faq-answer a { color: var(--red-text); text-decoration: underline; text-underline-offset: 2px; }
.faq-answer a:hover { color: #fff; }

/* departments */
.dept-card { color: inherit; }
.dept-card h2 { margin-top: 20px; font-size: 1.45rem; line-height: 1.1; }
.card-more { margin-top: auto; padding-top: 26px; }
.dept-card .dept-list { margin-bottom: 0; }
.dept-card:hover .card-more { color: #fff; }
.dept-card:hover .card-more svg { transform: translateX(3px); }
.dept-hero { display: flex; margin-top: 22px; }
.dept-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 5vw, 64px); align-items: start; }
.dept-sub { font-size: 1.05rem; letter-spacing: .06em; color: var(--muted); }
.dept-layout .dept-list { margin-top: 14px; }
.panel-head { font-size: 1.25rem; }
.dept-positions { margin-top: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.dept-positions li { padding: 3px 0; }
.dept-layout .panel .btn-row { margin-top: 24px; }

/* chain of command: rank tree (an indented tree on phones) */
.tree { --line: var(--border-2); overflow-x: auto; padding-bottom: 4px; }
.tree ul { position: relative; display: flex; justify-content: center; margin: 0; padding: 20px 0 0; list-style: none; }
.tree > ul { width: max-content; min-width: 100%; padding-top: 0; }
.tree li { position: relative; display: flex; flex-direction: column; align-items: center; padding: 20px 8px 0; }
/* connectors: each child draws half of the bar above it, plus its own drop */
.tree li::before, .tree li::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 20px; border-top: 1px solid var(--line); }
.tree li::after { right: auto; left: 50%; border-left: 1px solid var(--line); }
.tree li:first-child::before, .tree li:last-child::after { border: 0; }
.tree li:last-child::before { border-right: 1px solid var(--line); border-top-right-radius: 8px; }
.tree li:first-child::after { border-top-left-radius: 8px; }
.tree li:only-child { padding-top: 0; }
.tree li:only-child::before, .tree li:only-child::after { display: none; }
.tree ul ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 20px; border-left: 1px solid var(--line); }
.tree-node { width: 230px; padding: 16px 16px 15px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); text-align: center; }
.tree-node.is-top { border-color: rgba(158, 2, 37, .55); background: linear-gradient(180deg, rgba(158, 2, 37, .16), transparent), var(--surface); }
.tree-title { font: 600 1.05rem/1.2 var(--f-head); letter-spacing: .03em; text-transform: uppercase; color: var(--text); }
.tree-about { margin-top: 5px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.trees { display: grid; gap: clamp(48px, 6vw, 72px); }
.tree-heading { font-size: 1.05rem; letter-spacing: .08em; color: var(--muted); text-align: center; }
.tree-lead { margin-top: 6px; font-size: .95rem; color: var(--faint); text-align: center; }
.tree-block .tree { margin-top: 24px; }
.tree-unit { margin-bottom: 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--red-text); }
.tree li:has(> .is-compact) { padding-left: 4px; padding-right: 4px; }
.tree-node.is-compact { width: 106px; padding: 13px 6px 12px; }
.tree-node.is-compact .tree-title { font-size: .92rem; }
.tree-node.is-compact .tree-about { font-size: 12px; }
/* a rank whose children are listed in a column (captains and their stations) */
@media (min-width: 921px) {
  /* a single branch keeps the same spacing as a split one, so every level lines up */
  .tree li:only-child { padding-top: 20px; }
  .tree li:only-child::after { display: block; left: 50%; width: 0; border: 0; border-left: 1px solid var(--line); border-radius: 0; }
  .tree > ul > li:only-child { padding-top: 0; }
  .tree > ul > li:only-child::after { display: none; }
  .tree ul.stack { display: flex; flex-direction: column; align-items: stretch; width: 230px; padding: 0; }
  .tree ul.stack::before { display: none; }
  .tree ul.stack > li { display: block; padding: 10px 0 0 30px; }
  .tree ul.stack > li::before { top: 0; bottom: 0; left: 14px; right: auto; width: 0; height: auto; border: 0; border-left: 1px solid var(--line); border-radius: 0; display: block; }
  .tree ul.stack > li:last-child::before { bottom: auto; height: calc(50% + 5px); }
  .tree ul.stack > li::after { display: block; top: calc(50% + 5px); left: 14px; width: 16px; height: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .tree ul.stack .tree-node { width: auto; text-align: left; padding: 11px 14px; }
}
.tree-seats { margin-top: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.tree-members { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.tree-members span { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; background: rgba(255, 255, 255, .05); font-size: 12.5px; color: var(--text); }

/* stations */
.station-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: border-color .2s; }
.station-card:hover { border-color: var(--border-2); }
.station-media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--border); background: #141416; }
.station-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.station-card:hover .station-media img { transform: scale(1.03); }
.ph-num { font: 700 4.5rem/1 var(--f-head); color: rgba(255, 255, 255, .07); }
.ph-note { position: absolute; left: 16px; bottom: 14px; font-size: 12.5px; color: var(--faint); }
.station-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.station-body h2 { font-size: 1.45rem; line-height: 1.1; }
.station-area { margin-top: 4px; font-size: .95rem; color: var(--muted); }
.unit-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.unit-tags span { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 6px; background: rgba(255, 255, 255, .05); font-size: 12.5px; color: var(--text); }
.station-link { margin-top: auto; padding-top: 22px; }
.station-card:hover .station-link svg { transform: translateX(3px); }

.station-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.station-desc { margin-bottom: 24px; max-width: 70ch; font-size: 1.05rem; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery button { display: block; padding: 0; border: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 10; background: #141416; cursor: zoom-in; }
.gallery button:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.gallery button:hover img { transform: scale(1.02); }
.showcase-empty { display: grid; place-items: center; aspect-ratio: 16 / 9; padding: 24px; border-radius: var(--radius); border: 1px dashed var(--border-2); background: var(--surface); text-align: center; color: var(--muted); }
.showcase-empty .ph-num { display: block; font-size: 5.5rem; }
.showcase-empty p { margin-top: 10px; }
.facts { margin: 18px 0 0; }
.facts > div + div { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.facts dt { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin: 4px 0 0; color: var(--text); }
.fact-list { list-style: none; display: grid; gap: 4px; }
.station-pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }

.lightbox { max-width: min(1200px, 94vw); max-height: 94vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(0, 0, 0, .9); }
.lightbox figure { margin: 0; }
.lightbox img { display: block; max-width: 100%; max-height: 84vh; margin: 0 auto; border-radius: 8px; }
.lightbox figcaption { margin-top: 12px; text-align: center; font-size: .95rem; color: var(--muted); }
.lightbox-btn { position: fixed; z-index: 1; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-2);
  background: rgba(10, 10, 11, .7); color: #fff; cursor: pointer; }
.lightbox-btn svg { width: 20px; height: 20px; }
.lightbox-btn:hover { background: rgba(255, 255, 255, .1); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* 10. Footer ---------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg); padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; }
.footer-brand img { width: 44px; height: 44px; }
.footer-blurb { margin-top: 16px; max-width: 36ch; font-size: .94rem; color: var(--muted); }
.footer-head { margin-bottom: 14px; font: 600 12.5px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.footer-col a { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: .95rem; color: var(--muted); transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-col svg { width: 15px; height: 15px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding: 20px 0 28px; border-top: 1px solid var(--border); font-size: .85rem; color: var(--faint); }

/* 404 */
.notfound { display: grid; place-items: center; min-height: 100vh; padding: calc(var(--header-h) + 40px) 0 80px; text-align: center; }
.notfound img { width: 96px; height: 96px; margin: 0 auto 28px; }
.notfound .page-lead { margin-inline: auto; }
.notfound .btn-row { justify-content: center; margin-top: 30px; }

/* 11. Motion ---------------------------------------------------------------- */
.js [data-reveal] { opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* 12. Responsive ------------------------------------------------------------ */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .grid-3:has(.station-card) { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  :root { --header-h: 64px; }
  .menu-toggle { display: grid; }
  .nav { position: fixed; inset: var(--header-h) 0 0; display: none; flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    padding: 12px var(--gutter) calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; background: var(--bg); }
  .is-open .nav { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { padding: 18px 2px; border-radius: 0; border-bottom: 1px solid var(--border); font: 600 1.2rem/1 var(--f-head); letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
  .nav-link[aria-current="page"] { background: none; color: var(--red-text); }
  .nav-item { flex-wrap: wrap; border-bottom: 1px solid var(--border); }
  .nav-item .nav-link { flex: 1; border-bottom: 0; }
  .nav-caret { width: 44px; height: 44px; margin: 0; border: 1px solid var(--border-2); border-radius: 8px; }
  .nav-caret svg { width: 18px; height: 18px; }
  .nav-menu { position: static; flex-basis: 100%; display: none; padding: 0 0 14px; opacity: 1; visibility: visible; transform: none; }
  .has-menu.is-open .nav-menu { display: block; }
  .nav-menu-inner { grid-template-columns: 1fr 1fr; padding: 0; border: 0; background: none; box-shadow: none; }
  #menu-departments .nav-menu-inner { grid-template-columns: 1fr; }
  .nav-menu-inner a { padding: 10px 8px; }
  .nav-menu-inner .nav-menu-all { border-bottom: 0; padding: 10px 8px; }
  .nav-actions { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 24px; }
  .nav-actions .btn { --h: 48px; }

  .hero { background: radial-gradient(70% 40% at 20% 18%, rgba(158, 2, 37, .18), transparent 70%); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-badge { order: -1; justify-self: start; width: 160px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats.has-live { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd) { border-left: 0; }
  .stats.has-live .stat:nth-child(4) { border-left: 1px solid var(--border); } /* even column again on two-column phones */
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .grid-3, .join-grid { grid-template-columns: 1fr; }
  .cta { grid-template-columns: 1fr; }
  .cta .btn-row { justify-content: flex-start; }
  .rules-layout, .station-layout, .dept-layout { grid-template-columns: 1fr; }
  .faq-layout { grid-template-columns: 1fr; }
  .acct-layout { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .ros-row { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 12px; }
  .ros-row img, .ros-avatar-empty { grid-row: span 3; align-self: start; }
  .ros-rank, .ros-status, .ros-joined { grid-column: 2 / -1; text-align: left; }
  .ros-call { grid-column: 3; grid-row: 1; }
  .staff-row { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 12px; }
  .staff-row img { grid-row: span 3; align-self: start; }
  .staff-row .ros-rank, .staff-row .ros-status, .staff-sync { grid-column: 2 / -1; text-align: left; }
  .staff-row .ros-call { grid-column: 3; grid-row: 1; }
  .loa-row { grid-template-columns: 36px minmax(0, 1fr); }
  .loa-when, .loa-actions { grid-column: 2; }
  .account { width: 100%; }
  .account-btn { width: 100%; height: 48px; justify-content: flex-start; padding-left: 8px; }
  .account-btn svg { margin-left: auto; }
  .account-menu { position: static; margin-top: 8px; box-shadow: none; }
  .tree ul, .tree > ul { display: block; width: auto; min-width: 0; padding: 0; }
  .tree li { display: block; padding: 12px 0 0 22px; }
  .tree > ul > li { padding-left: 0; }
  .tree li::before { top: 0; bottom: 0; left: 6px; right: auto; width: 0; height: auto; border: 0; border-left: 1px solid var(--line); border-radius: 0; }
  .tree li::after { top: 12px; left: 6px; width: 16px; height: 26px; border: 0; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0 0 0 8px; }
  .tree li:last-child::before { display: none; }
  .tree li:only-child::before, .tree li:only-child::after { display: block; }
  .tree li:last-child::before, .tree > ul > li::before, .tree > ul > li::after { display: none; }
  .tree li:first-child::after, .tree li:last-child::after { border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0 0 0 8px; }
  .tree ul ul::before { display: none; }
  .tree ul ul { margin-left: 10px; }
  .tree-node { width: auto; text-align: left; }
  .tree-members { justify-content: flex-start; }
  .tree-node.is-compact { width: auto; padding: 13px 16px 12px; }
  .tree li:has(> .is-compact) { padding-left: 22px; padding-right: 0; }
  .tree-heading, .tree-lead { text-align: left; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  body { font-size: 15.5px; }
  .brand-name { font-size: 15px; }
  .steps, .grid-3:has(.station-card) { grid-template-columns: 1fr; }
  .stat { padding: 20px; }
  .stat-num { font-size: 2rem; }
  .rule { grid-template-columns: 36px minmax(0, 1fr); padding: 20px; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .server-field { flex-wrap: wrap; padding: 12px; }
  .server-field code { flex-basis: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
