/*
 * FCSN Staff Hub — stylesheet
 * Brand: FCSN Brand System Reference (five-heart palette).
 *   Navy #1D4F6A anchor · Teal #2AACA8 Families · Lime #B8C62A Youth ·
 *   Coral #E6625A the one call-to-action colour · Sky #C5DEE8 soft tints ·
 *   Cream #FFF8F0 page · Ink #2D3E4A body copy · White.
 * Type: Poppins (headings), Inter (body), Lora italic (one accent word).
 * Rules baked in: teal/lime/sky never carry text and never take white text;
 * coral carries only large text and buttons (16px+ semibold); body >= 14.7px.
 */

:root {
  --navy: #1D4F6A;
  --teal: #2AACA8;
  --lime: #B8C62A;
  --coral: #E6625A;
  --sky: #C5DEE8;
  --cream: #FFF8F0;
  --ink: #2D3E4A;
  --white: #FFFFFF;

  /* tints of the palette (backgrounds only; navy or ink text on top) */
  --navy-tint: #E4ECF1;
  --teal-tint: #E5F4F3;
  --lime-tint: #F3F5D9;
  --coral-tint: #FBE5E3;
  --sky-tint: #E9F2F6;

  --muted: #566771;      /* secondary text: 5.6:1 on cream */
  --line: #E6E0D6;       /* warm hairline */
  --line-strong: #D5CEC2;
  --bg: var(--cream);
  --card: var(--white);

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(29, 79, 106, 0.08);
  --shadow-md: 0 10px 28px rgba(29, 79, 106, 0.12);
  --head: "Poppins", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --accent: "Lora", "Times New Roman", serif;
  --topbar-h: 64px;
  --sidebar-w: 262px;
  --fs: 15.5px;
  --fs-sm: 14.7px;
  --fs-label: 13px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body {
  margin: 0; padding: 0; min-height: 100%;
  font-family: var(--body); font-size: var(--fs); line-height: 1.55;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
body.is-login { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--navy); font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 17.5px; }
h4 { font-size: 15.5px; }
p { margin: 0 0 12px; }
a { color: var(--navy); }
a:hover { color: var(--coral); }
button, input, select, textarea { font-family: var(--body); font-size: var(--fs); color: var(--ink); }
img { max-width: 100%; }
.accent { font-family: var(--accent); font-style: italic; font-weight: 500; color: var(--coral); }
.hero .accent { color: var(--coral); }
[hidden] { display: none !important; }
.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; }

/* focus */
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 1000; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- utilities ---------- */
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.label { font-size: var(--fs-label); font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 26px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.grow { flex: 1 1 auto; min-width: 0; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.icon { width: 18px; height: 18px; flex-shrink: 0; vertical-align: -3px; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 24px; height: 24px; }

/* ---------- layout ---------- */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  background: var(--navy); color: #fff;
  display: flex; align-items: center; gap: 16px; padding: 0 18px; z-index: 100;
}
.app-body { display: flex; align-items: flex-start; padding-top: var(--topbar-h); min-height: 100vh; }
#sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--card); border-right: 1px solid var(--line);
  position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; padding: 14px 12px 28px;
}
#content { flex: 1; min-width: 0; padding: 26px 32px 70px; min-height: calc(100vh - var(--topbar-h)); }
.drawer-backdrop { display: none; position: fixed; inset: var(--topbar-h) 0 0 0; background: rgba(29,79,106,.35); z-index: 90; }
.drawer-backdrop.show { display: block; }

/* ---------- masthead ---------- */
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex-shrink: 0; }
.wordmark img { width: 36px; height: 36px; object-fit: contain; display: block; }
.wordmark .wm-text { display: flex; flex-direction: column; line-height: 1; }
.wordmark .wm-fcsn { font-family: var(--head); font-weight: 600; font-size: 21px; letter-spacing: .01em; color: #fff; }
.wordmark .wm-hub { font-family: var(--body); font-weight: 500; font-size: 12.5px; color: var(--sky); letter-spacing: .05em; margin-top: 3px; }
.wordmark:hover { color: #fff; }
.mast-search { flex: 1; max-width: 560px; margin: 0 auto; position: relative; min-width: 0; }
.mast-search input {
  width: 100%; padding: 10px 14px 10px 40px; border: 1px solid transparent; border-radius: 999px;
  background: #fff; font-size: var(--fs-sm); color: var(--ink);
}
.mast-search input::placeholder { color: var(--muted); }
.mast-search > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--navy); pointer-events: none; }
.mast-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
.mast-create { display: inline-flex; align-items: center; gap: 6px; }
.user-chip { display: flex; align-items: center; gap: 10px; background: transparent; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 4px 12px 4px 4px; color: #fff; cursor: pointer; }
.user-chip:hover { background: rgba(255,255,255,.1); }
.user-chip .uc-text { text-align: left; line-height: 1.15; }
.user-chip .uc-name { display: block; font-weight: 600; font-size: 14.7px; white-space: nowrap; }
.user-chip .uc-title { display: block; font-size: 12.5px; color: var(--sky); max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu { position: absolute; right: 18px; top: calc(var(--topbar-h) - 6px); background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); min-width: 260px; padding: 14px; z-index: 130; }
.user-menu .um-name { font-family: var(--head); font-weight: 600; color: var(--navy); font-size: 16px; }
.user-menu .um-title { color: var(--muted); font-size: var(--fs-sm); }
.user-menu .um-role { display: inline-block; margin-top: 6px; }
.user-menu hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.hamburger { display: none; background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 10px; width: 40px; height: 40px; align-items: center; justify-content: center; cursor: pointer; }
.hamburger .icon { width: 22px; height: 22px; }

/* search results */
.search-results { position: absolute; top: 110%; left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); z-index: 120; max-height: 380px; overflow: auto; color: var(--ink); text-align: left; }
.result-group { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.result-group:last-child { border-bottom: none; }
.group-title { font-size: var(--fs-label); font-weight: 600; color: var(--muted); margin: 2px 6px 4px; }
.result-item { width: 100%; text-align: left; background: transparent; border: 0; padding: 8px 8px; cursor: pointer; font-size: var(--fs-sm); display: flex; justify-content: space-between; gap: 10px; align-items: center; border-radius: 8px; color: var(--ink); }
.result-item:hover, .result-item:focus-visible { background: var(--sky-tint); }
.result-item .ri-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }

/* ---------- sidebar nav ---------- */
.nav-label { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 16px 12px 6px; }
#sidebar .nav-label:first-child { margin-top: 2px; }
.nav-item { display: flex; align-items: center; gap: 11px; color: var(--ink); padding: 9px 12px; margin: 1px 0; font-size: var(--fs-sm); font-weight: 500; text-decoration: none; border-radius: 10px; transition: background .12s, color .12s; }
.nav-item .icon { color: var(--navy); }
.nav-item:hover { background: var(--sky-tint); color: var(--navy); }
.nav-item.active { background: var(--navy); color: #fff; font-weight: 600; }
.nav-item.active .icon { color: #fff; }
.nav-item.sub { padding-left: 40px; font-size: 14.7px; font-weight: 400; position: relative; }
.nav-item.sub::before { content: ""; position: absolute; left: 24px; top: 50%; width: 8px; height: 8px; border-radius: 50%; transform: translateY(-50%); background: var(--dotc, var(--sky)); }
.nav-item .nav-count { margin-left: auto; font-size: 12.5px; font-weight: 600; background: var(--sky-tint); color: var(--navy); border-radius: 999px; padding: 1px 8px; }
.nav-item.active .nav-count { background: rgba(255,255,255,.2); color: #fff; }
.nav-foot { margin: 20px 6px 0; padding: 12px 14px; background: var(--sky-tint); border-radius: var(--radius-sm); font-size: 14px; color: var(--muted); }
.nav-foot a { color: var(--navy); font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: var(--fs-sm); }
.nav-foot a:hover { text-decoration: underline; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 28px; }
.page-head .sub { color: var(--muted); margin-top: 4px; max-width: 720px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- cards & panels ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: 10px; }
.card.tint-sky { background: var(--sky-tint); border-color: transparent; }
.card.tint-navy { background: var(--navy); color: #fff; }
.card.tint-navy h3, .card.tint-navy h2 { color: #fff; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { padding: 16px 20px 8px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.panel-head .sub { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.panel-body { padding: 8px 20px 18px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-main-rail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.rail { display: flex; flex-direction: column; gap: 16px; }
.empty { padding: 26px 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--cream); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-size: 15.5px; font-weight: 600; cursor: pointer; border: 1px solid transparent; text-decoration: none; line-height: 1.2; transition: filter .12s, background .12s, color .12s; white-space: nowrap; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; filter: none; }
.btn-primary { background: var(--coral); color: #fff; font-size: 16px; }
.btn-primary:hover:not(:disabled) { filter: brightness(.94); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover:not(:disabled) { filter: brightness(1.12); color: #fff; }
.btn-secondary { background: var(--card); color: var(--navy); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--sky-tint); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--sky-tint); }
.btn-light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-light:hover:not(:disabled) { background: rgba(255,255,255,.24); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: 14.7px; }
.btn-primary.btn-sm { font-size: 16px; padding: 8px 15px; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 50%; background: var(--card); border: 1px solid var(--line-strong); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.btn-icon:hover { background: var(--sky-tint); }
.btn-icon.on-navy { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
.btn-icon.on-navy:hover { background: rgba(255,255,255,.12); }
.btn-link { background: none; border: 0; padding: 0; color: var(--navy); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.btn-link:hover { color: var(--coral); }
.btn-text { background: none; border: 0; padding: 6px 8px; color: var(--navy); font-weight: 600; cursor: pointer; border-radius: 8px; font-size: var(--fs-sm); display: inline-flex; align-items: center; gap: 6px; }
.btn-text:hover { background: var(--sky-tint); }
.btn-text.danger { color: var(--coral); }

/* ---------- chips, badges, dots ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: var(--fs-label); font-weight: 600; color: var(--navy); background: var(--navy-tint); white-space: nowrap; line-height: 1.5; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--navy); flex-shrink: 0; }
.chip-navy { background: var(--navy-tint); } .chip-navy .dot { background: var(--navy); }
.chip-teal { background: var(--teal-tint); } .chip-teal .dot { background: var(--teal); }
.chip-lime { background: var(--lime-tint); } .chip-lime .dot { background: var(--lime); }
.chip-coral { background: var(--coral-tint); } .chip-coral .dot { background: var(--coral); }
.chip-sky { background: var(--sky-tint); } .chip-sky .dot { background: var(--sky); }
.chip-solid { background: var(--navy); color: #fff; }
.chip-outline { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); }
.badge-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--sky-tint); color: var(--navy); }

/* ---------- avatars ---------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; font-family: var(--head); letter-spacing: .02em; }
.avatar.av-sky { background: var(--sky); color: var(--navy); }
.avatar.av-lime { background: var(--lime); color: var(--navy); }
.avatar.av-teal { background: var(--teal-tint); color: var(--navy); border: 1px solid var(--teal); }
.avatar.av-cream { background: var(--cream); color: var(--navy); border: 1px solid var(--navy); }
.avatar.av-coral { background: var(--coral-tint); color: var(--navy); border: 1px solid var(--coral); }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.avatar-row { display: flex; }
.avatar-row .avatar { border: 2px solid #fff; margin-left: -8px; }
.avatar-row .avatar:first-child { margin-left: 0; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label, .field > .label { font-size: var(--fs-label); font-weight: 600; color: var(--navy); }
.field .hint { font-size: 13.5px; color: var(--muted); }
.input, .select, .textarea, .field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; font-size: var(--fs-sm); color: var(--ink);
}
.field textarea, .textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, .select:focus, .textarea:focus { border-color: var(--navy); outline: 3px solid rgba(29,79,106,.18); outline-offset: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-sm); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--navy); flex-shrink: 0; }
.pill-select { padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font-size: 14px; color: var(--navy); font-weight: 600; }

/* ---------- toast & modal ---------- */
.toast { position: fixed; bottom: 22px; right: 22px; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: var(--radius-sm); z-index: 500; box-shadow: var(--shadow-md); font-size: var(--fs-sm); max-width: min(420px, calc(100vw - 44px)); }
.toast.error { background: var(--coral); }
.modal-overlay { position: fixed; inset: 0; background: rgba(29,79,106,.45); display: flex; align-items: center; justify-content: center; z-index: 300; padding: 16px; }
.modal { background: var(--card); border-radius: var(--radius); width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow-md); }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 6px; }
.modal-head h2 { font-size: 20px; }
.modal-body { padding: 10px 22px; }
.modal-foot { padding: 12px 22px 20px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.modal .success { text-align: center; padding: 22px 10px 10px; }
.modal .success .icon-lg { color: var(--teal); width: 40px; height: 40px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font-size: var(--fs-label); font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--cream); }
.table .input, .table .select { padding: 7px 10px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; font-size: var(--fs-sm); margin-bottom: -1px; border-radius: 6px 6px 0 0; }
.tab:hover { color: var(--navy); background: var(--sky-tint); }
.tab.active { color: var(--navy); border-bottom-color: var(--coral); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: #fff; }
.seg button { background: transparent; border: 0; padding: 7px 14px; font-weight: 600; font-size: 14.7px; color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--navy); color: #fff; }

/* ---------- login ---------- */
.login-screen { position: fixed; inset: 0; z-index: 900; background: var(--cream); display: flex; align-items: center; justify-content: center; padding: 20px; overflow: auto; }
.login-screen::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 14px; background: var(--navy); }
.login-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-md); padding: 34px 32px 26px; text-align: center; }
.login-card .mark { width: 72px; height: 72px; object-fit: contain; margin: 0 auto 10px; display: block; }
.login-card .lg-fcsn { font-family: var(--head); font-weight: 600; font-size: 30px; color: var(--navy); line-height: 1; }
.login-card .lg-hub { font-family: var(--head); font-weight: 500; font-size: 16px; color: var(--navy); margin-top: 4px; }
.login-card .lg-org { color: var(--muted); font-size: 14.7px; margin: 6px 0 18px; }
.login-card .field { text-align: left; margin-top: 12px; }
.login-card .btn-primary { width: 100%; margin-top: 18px; padding: 13px; }
.login-card .err { color: var(--coral); font-weight: 600; font-size: 15px; min-height: 22px; margin-top: 10px; }
.login-card .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; margin: 16px 0 10px; }
.login-card .or::before, .login-card .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.ms-wrap { position: relative; display: block; }
.ms-btn { width: 100%; background: #fff; border: 1px solid var(--line-strong); color: var(--navy); font-weight: 600; font-size: 15.5px; padding: 11px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.ms-btn:disabled { opacity: .55; cursor: not-allowed; }
.ms-wrap .tip { display: none; position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); background: var(--navy); color: #fff; font-size: 13.5px; padding: 7px 11px; border-radius: 8px; white-space: nowrap; }
.ms-wrap:hover .tip, .ms-wrap:focus-within .tip { display: block; }
.login-card .foot { font-size: 13.5px; color: var(--muted); margin-top: 16px; }

/* ---------- home ---------- */
.hero { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 30px 190px 30px 34px; margin-bottom: 22px; box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
.hero h1 { color: #fff; font-size: 30px; margin-bottom: 8px; max-width: 24ch; }
.hero p { color: var(--sky); max-width: 640px; margin: 0 0 18px; font-size: 16px; }
.hero img.hero-mark { position: absolute; right: 34px; top: 50%; transform: translateY(-50%); width: 120px; opacity: .95; pointer-events: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); cursor: pointer; text-align: left; font-family: var(--body); transition: transform .12s, box-shadow .12s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card.c-teal { border-top-color: var(--teal); }
.stat-card.c-lime { border-top-color: var(--lime); }
.stat-card.c-coral { border-top-color: var(--coral); }
.stat-card.c-sky { border-top-color: var(--sky); }
.stat-card .count { font-family: var(--head); font-size: 32px; font-weight: 600; color: var(--navy); line-height: 1; margin-bottom: 6px; }
.stat-card .lbl { font-size: var(--fs-sm); color: var(--muted); font-weight: 500; }

/* composer, feed */
.composer { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.composer .select-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.composer textarea { width: 100%; min-height: 70px; resize: vertical; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--cream); font-size: var(--fs-sm); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px; }
.filter-chip { padding: 6px 15px; border-radius: 999px; border: 1px solid var(--line-strong); cursor: pointer; font-size: 14.7px; background: var(--card); color: var(--muted); font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; }
.filter-chip:hover { background: var(--sky-tint); color: var(--navy); }
.filter-chip.active { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.feed-list { padding: 0 20px; }
.post { padding: 18px 0; border-bottom: 1px solid var(--line); }
.post:last-child { border-bottom: none; }
.post-head { display: flex; align-items: flex-start; gap: 12px; }
.post-head .who { flex: 1; min-width: 0; }
.post-head .name { font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-head .meta { font-size: 13.5px; color: var(--muted); margin-top: 1px; }
.post-body { margin-top: 10px; white-space: pre-wrap; line-height: 1.6; }
.post-actions { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.post-action { background: transparent; border: 1px solid transparent; border-radius: 999px; padding: 5px 11px; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.post-action:hover { background: var(--sky-tint); color: var(--navy); }
.post-action.on { color: var(--navy); background: var(--navy-tint); }
.comments { margin-top: 12px; border-top: 1px dashed var(--line-strong); padding-top: 12px; }
.comment { display: flex; gap: 8px; margin-bottom: 8px; }
.comment .content { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; flex: 1; }
.comment .content .name { font-weight: 600; font-size: 14px; color: var(--navy); }
.comment .content .text { font-size: var(--fs-sm); margin-top: 1px; white-space: pre-wrap; }
.comment-form { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; }
.comment-form textarea { flex: 1; resize: vertical; min-height: 44px; font-size: var(--fs-sm); padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
.rail-item { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.rail-item:last-child { border-bottom: none; }
.rail-item .ri-title { font-weight: 600; color: var(--ink); font-size: var(--fs-sm); }
.rail-item .ri-sub { font-size: 13.5px; color: var(--muted); }
.quick-link { display: flex; align-items: center; gap: 8px; padding: 8px 0; color: var(--navy); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; border-bottom: 1px dashed var(--line); }
.quick-link:last-child { border-bottom: none; }
.quick-link:hover { color: var(--coral); }
.snap-task { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.snap-task:last-child { border-bottom: none; }
.snap-task .st-title { font-weight: 600; font-size: var(--fs-sm); }
.snap-task .st-sub { font-size: 13.5px; color: var(--muted); }
.status-pill { font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; color: var(--navy); background: var(--sky-tint); }
.status-pill.todo { background: var(--sky-tint); }
.status-pill.in_progress, .status-pill.inprogress { background: var(--lime-tint); }
.status-pill.waiting { background: var(--coral-tint); }
.status-pill.done { background: var(--teal-tint); }

/* ---------- spaces ---------- */
.space-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.space-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.space-card .bar { height: 8px; background: var(--navy); }
.space-card .inner { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.space-card .name { font-family: var(--head); font-weight: 600; color: var(--navy); font-size: 17px; }
.space-card .name button { all: unset; cursor: pointer; }
.space-card .name button:hover { color: var(--coral); }
.space-card .desc { color: var(--muted); font-size: var(--fs-sm); flex: 1; }
.space-card .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.space-head { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 22px 26px; margin-bottom: 18px; border-left: 12px solid var(--navy); }
.space-head h1 { color: #fff; font-size: 26px; }
.space-head p { color: var(--sky); margin: 6px 0 12px; }
.bar-navy { background: var(--navy) !important; } .bar-teal { background: var(--teal) !important; } .bar-lime { background: var(--lime) !important; } .bar-coral { background: var(--coral) !important; } .bar-sky { background: var(--sky) !important; }
.bl-navy { border-left-color: var(--navy) !important; } .bl-teal { border-left-color: var(--teal) !important; } .bl-lime { border-left-color: var(--lime) !important; } .bl-coral { border-left-color: var(--coral) !important; } .bl-sky { border-left-color: var(--sky) !important; }

/* ---------- projects ---------- */
.project-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; }
.project-card .bar { height: 8px; }
.project-card .inner { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project-card .pc-name { font-family: var(--head); font-weight: 600; font-size: 17px; color: var(--navy); }
.project-card .pc-name button { all: unset; cursor: pointer; }
.project-card .pc-name button:hover { color: var(--coral); }
.progress { height: 8px; background: var(--sky-tint); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--teal); border-radius: 999px; }
.project-head { background: #fff; border: 1px solid var(--line); border-left: 12px solid var(--navy); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.project-head h1 { font-size: 26px; }
.project-head .meta-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: var(--fs-sm); align-items: center; }
.project-head .meta-row b { color: var(--navy); font-weight: 600; }
.project-head .desc { margin-top: 10px; max-width: 760px; }
.milestones { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; }
.milestone { flex: 0 0 auto; min-width: 180px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; text-align: left; font-family: var(--body); }
.milestone .ms-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--navy); margin-top: 3px; flex-shrink: 0; background: #fff; }
.milestone.done .ms-dot { background: var(--teal); border-color: var(--teal); }
.milestone .ms-title { font-weight: 600; font-size: 14.7px; color: var(--navy); }
.milestone.done .ms-title { text-decoration: line-through; color: var(--muted); }
.milestone .ms-date { font-size: 13.5px; color: var(--muted); }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.board-col { background: var(--sky-tint); border-radius: var(--radius); padding: 12px; min-height: 160px; }
.board-col h3 { font-size: 14px; font-family: var(--body); color: var(--navy); display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 10px; }
.board-col.over { outline: 2px dashed var(--navy); }
.task-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; cursor: grab; box-shadow: var(--shadow-sm); }
.task-card:active { cursor: grabbing; }
.task-card .tc-title { font-weight: 600; font-size: 14.7px; color: var(--ink); }
.task-card .tc-title button { all: unset; cursor: pointer; }
.task-card .tc-title button:hover { color: var(--coral); }
.task-card .tc-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.task-card .tc-meta .due.late { color: var(--coral); font-weight: 600; }
.prio { font-size: 12.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--sky-tint); color: var(--navy); }
.prio.High { background: var(--coral-tint); }
.prio.Medium { background: var(--lime-tint); }
.prio.Low { background: var(--sky-tint); }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.checklist li.done span { text-decoration: line-through; color: var(--muted); }
.activity { list-style: none; padding: 0; margin: 0; }
.activity li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: var(--fs-sm); }
.activity li .when { color: var(--muted); font-size: 13px; }
.link-list a { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); }
.link-list a:last-child { border-bottom: 0; }

/* ---------- tasks page ---------- */
.task-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.task-column { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); }
.task-column h3 { font-size: 14px; font-family: var(--body); color: var(--muted); margin: 0 0 10px; display: flex; justify-content: space-between; }
.task-item { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; font-size: var(--fs-sm); }
.task-item label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.task-item input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--navy); margin-top: 1px; }
.task-item .ti-sub { font-size: 13.5px; color: var(--muted); margin-top: 4px; margin-left: 30px; }

/* ---------- calendar ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.cal-grid .dow { font-size: 12.5px; color: var(--muted); text-align: center; font-weight: 600; }
.cal-grid .day { padding: 8px 4px; background: #fff; border: 1px solid var(--line); border-radius: 8px; text-align: center; font-size: 14px; min-height: 52px; }
.cal-grid .day.empty { background: transparent; border: none; }
.cal-grid .day.today { border-color: var(--navy); font-weight: 600; }
.cal-grid .cdot { width: 7px; height: 7px; border-radius: 50%; margin: 4px auto 0; background: var(--navy); }
.cal-grid .cdot.event { background: var(--coral); }
.ev-row { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.ev-row:last-child { border-bottom: 0; }
.ev-date { width: 52px; flex-shrink: 0; text-align: center; background: var(--sky-tint); border-radius: 10px; padding: 6px 4px; }
.ev-date .d { font-family: var(--head); font-weight: 600; font-size: 20px; color: var(--navy); line-height: 1; }
.ev-date .m { font-size: 12px; font-weight: 600; color: var(--navy); }
.ev-row .ev-name { font-weight: 600; }
.ev-row .ev-sub { color: var(--muted); font-size: 13.5px; }

/* ---------- apps ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.app-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; gap: 14px; align-items: flex-start; box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); transition: transform .12s, box-shadow .12s; position: relative; }
.app-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--ink); }
.app-card .app-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--navy); }
.app-icon.c-navy { background: var(--navy); color: #fff; }
.app-icon.c-teal { background: var(--teal); }
.app-icon.c-lime { background: var(--lime); }
.app-icon.c-coral { background: var(--coral); color: #fff; }
.app-icon.c-sky { background: var(--sky); }
.app-card .grow { padding-right: 22px; }
.app-card .link-coming { white-space: normal; text-align: left; }
.app-card .app-name { font-weight: 600; color: var(--navy); font-size: 16px; }
.app-card .app-desc { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.app-card .app-url { color: var(--muted); font-size: 12.5px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-card .ext { position: absolute; right: 12px; top: 12px; color: var(--muted); }

/* ---------- staff portal ---------- */
.portal-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; position: sticky; top: var(--topbar-h); background: var(--cream); padding: 10px 0; z-index: 5; }
.portal-section { margin-bottom: 26px; }
.portal-section h2 { margin-bottom: 4px; }
.portal-section .sec-blurb { color: var(--muted); margin-bottom: 12px; }
.portal-item { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.portal-item:last-child { border-bottom: 0; }
.portal-item .pi-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--sky-tint); color: var(--navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.portal-item .pi-title { font-weight: 600; }
.portal-item .pi-sub { color: var(--muted); font-size: 13.5px; }
.portal-item .pi-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.link-coming { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 13.5px; font-weight: 600; background: var(--cream); white-space: nowrap; }
.link-edit { display: flex; gap: 8px; align-items: center; width: 100%; margin-top: 8px; }
.link-edit input { flex: 1; }
.policy-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.policy-card .pol-num { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.policy-card h3 { font-size: 17px; }
.ack-box { background: var(--sky-tint); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: auto; }
.ack-box .check { margin-bottom: 10px; }
.ack-done { display: flex; align-items: center; gap: 8px; background: var(--teal-tint); color: var(--navy); border-radius: var(--radius-sm); padding: 10px 14px; font-weight: 600; font-size: var(--fs-sm); margin-top: auto; }
.ack-done .icon { color: var(--navy); }

/* ---------- template studio ---------- */
.template-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.template-option { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); cursor: pointer; font-size: 14.7px; background: var(--card); color: var(--muted); font-weight: 500; }
.template-option:hover { background: var(--sky-tint); color: var(--navy); }
.template-option.active { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.studio-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.template-form { display: flex; flex-wrap: wrap; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.template-form .field { flex: 1 1 220px; }
.template-form .field.full { flex-basis: 100%; }
.template-form .note { font-size: var(--fs-sm); color: var(--muted); flex-basis: 100%; }
.template-form .remove-btn { margin-top: 4px; color: var(--coral); font-size: 14px; cursor: pointer; font-weight: 600; background: none; border: 0; padding: 0; text-align: left; }
.preview-wrap { position: sticky; top: calc(var(--topbar-h) + 14px); }
.preview-label { font-size: var(--fs-label); color: var(--muted); font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.preview-label .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.template-preview { background: var(--sky-tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; max-height: 640px; overflow: auto; }
.template-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- builders ---------- */
.builder-frame { width: 100%; height: calc(100vh - var(--topbar-h) - 170px); min-height: 520px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }

/* ---------- library ---------- */
.lib-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.lib-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); cursor: pointer; text-align: left; font-family: var(--body); }
.lib-tile:hover, .lib-tile.active { border-color: var(--navy); }
.lib-tile .lt-name { font-weight: 600; color: var(--navy); font-size: 15.5px; }
.lib-tile .lt-count { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: none; }
.file-chip { font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; background: var(--sky-tint); color: var(--navy); flex-shrink: 0; text-transform: uppercase; letter-spacing: .04em; }
.file-row .fr-name { font-weight: 600; font-size: var(--fs-sm); }
.file-row .fr-sub { font-size: 13.5px; color: var(--muted); }
.file-status { margin-left: auto; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--sky-tint); color: var(--navy); white-space: nowrap; }
.file-status.s-synced { background: var(--teal-tint); }
.file-status.s-review { background: var(--coral-tint); }
.file-status.s-scheduled { background: var(--lime-tint); }

/* ---------- directory ---------- */
.directory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.directory-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.directory-card .name { font-family: var(--head); font-weight: 600; color: var(--navy); font-size: 16px; margin-top: 6px; }
.directory-card .title { font-size: 14px; color: var(--muted); }
.directory-card .email { font-size: 14px; word-break: break-all; }
.directory-card .dc-actions { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.dir-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.dir-controls .input, .dir-controls .select { width: auto; min-width: 200px; border-radius: 999px; }

/* ---------- help ---------- */
.help-list { list-style: none; padding: 0; margin: 0; }
.help-list li { border-bottom: 1px solid var(--line); }
.help-list button { width: 100%; text-align: left; background: none; border: 0; padding: 13px 4px; color: var(--navy); font-weight: 600; cursor: pointer; font-size: var(--fs); display: flex; justify-content: space-between; align-items: center; }
.help-list button:hover { color: var(--coral); }
.help-article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm); max-width: 760px; }
.help-article h2 { margin-bottom: 10px; }

/* ---------- admin ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.kpi .k { font-family: var(--head); font-size: 24px; font-weight: 600; color: var(--navy); }
.kpi .l { font-size: 13.5px; color: var(--muted); }
.ack-bar { height: 8px; background: var(--sky-tint); border-radius: 999px; overflow: hidden; min-width: 120px; }
.ack-bar > i { display: block; height: 100%; background: var(--teal); }
code.inline { background: var(--sky-tint); padding: 2px 6px; border-radius: 6px; font-size: 14px; color: var(--navy); }
pre.code { background: var(--navy); color: #fff; padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto; font-size: 13.5px; line-height: 1.5; }

/* ---------- tip pill ---------- */
.tip-pill { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 12px 10px 18px; border-radius: 999px; z-index: 150; box-shadow: var(--shadow-md); font-size: var(--fs-sm); display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); }
.tip-pill .btn-icon { width: 30px; height: 30px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1080px) {
  .studio-cols { grid-template-columns: 1fr; }
  .preview-wrap { position: static; }
  .grid-main-rail { grid-template-columns: 1fr; }
  .task-board { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero img.hero-mark { display: none; }
  .hero { padding-right: 34px; }
  .hero h1 { max-width: none; }
}
@media (max-width: 900px) {
  .hamburger { display: inline-flex; }
  #sidebar { position: fixed; top: var(--topbar-h); left: 0; bottom: 0; height: auto; width: min(300px, 86vw); z-index: 95; box-shadow: var(--shadow-md); transform: translateX(-105%); transition: transform .18s ease; }
  #sidebar.show { transform: translateX(0); }
  #content { padding: 18px 16px 60px; }
  .user-chip .uc-text { display: none; }
  .user-chip { padding: 3px; border-color: transparent; }
  .mast-create span { display: none; }
  .mast-create { padding: 9px 12px; }
  .wordmark .wm-hub { display: none; }
  .hero { padding: 22px 20px; }
  .hero h1 { font-size: 24px; }
  .page-head h1 { font-size: 24px; }
  .board { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .portal-nav { position: static; }
  .portal-item { flex-wrap: wrap; }
  .portal-item .pi-actions { margin-left: 52px; justify-content: flex-start; }
  .builder-frame { height: 70vh; }
}
@media (max-width: 480px) {
  #topbar { gap: 10px; padding: 0 12px; }
  .tip-pill { left: 12px; right: 12px; transform: none; border-radius: 14px; max-width: none; }
  .toast { left: 12px; right: 12px; max-width: none; }
  .mast-search input { padding-left: 36px; }
  .wordmark img { width: 30px; height: 30px; }
  .wordmark .wm-fcsn { font-size: 18px; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card .count { font-size: 26px; }
  .composer, .filters, .feed-list, .panel-head, .panel-body { padding-left: 14px; padding-right: 14px; }
  .page-head .actions .btn { flex: 1 1 auto; }
  .template-actions .btn { flex: 1 1 auto; }
}

/* ---------- print (letterhead) ---------- */
@media print {
  body { background: #fff; }
  #topbar, #sidebar, .no-print, .template-actions, .tip-pill, .toast, .drawer-backdrop { display: none !important; }
  .app-body { padding-top: 0; }
  #content { padding: 0; }
}

@media(min-width:961px){.hamburger{display:flex!important}.nav-collapsed #sidebar{display:none}.nav-collapsed #content{margin-left:0}.nav-collapsed .app-body{grid-template-columns:1fr}}
[disabled]{cursor:not-allowed}details>summary{cursor:pointer}#request-list .btn-link{text-align:left}iframe#review-preview{background:white}
