/* Sterling Connect — design tokens and components.
   Values are taken from the Claude Design files (Sterling Connect*.dc.html).
   Use these classes in views; reach for inline styles only for one-off layout. */

:root {
  --navy: #01204E;
  --navy-hover: #1E4280;
  --navy-deep: #0D2F63;
  --ink: #121826;
  --text: #3A4352;
  --muted: #6B7485;
  --paper: #F7F8FA;
  --white: #FFFFFF;
  --border: #E6EAF0;
  --field: #C5CBD5;
  --line: #EEF0F4;
  --tint: #E3E9F3;
  --tint-2: #EEF2F8;
  --tint-3: #F2F5FA;
  --green: #31FE01;
  --green-text: #127A00;
  --green-bg: #E4FFD9;
  --green-fg: #0E5C00;
  --amber-bg: #FFF3DC;
  --amber-fg: #7A4600;
  --amber-line: #A15C00;
  --amber-soft: #FFF8EA;
  --red: #C0362C;
  --red-dark: #9E2A21;
  --red-bg: #FDECEA;
  --nav-text: #C3CFE4;
  --nav-label: #7189B8;
  --disabled: #DFE3EA;
  --shadow-pop: 0 16px 40px rgba(1, 32, 78, .16);
  --shadow-card: 0 1px 2px rgba(1, 32, 78, .04);
  --f-head: 'Plus Jakarta Sans', system-ui, sans-serif;
  --f-body: 'DM Sans', system-ui, sans-serif;
  --f-mono: 'DM Mono', ui-monospace, monospace;
  --r-card: 24px;
  --r-input: 14px;
  --r-nav: 14px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 16px/26px var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-hover); text-decoration: underline; }
img, svg { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
button { color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-head); color: var(--navy); margin: 0; }
p { margin: 0; text-wrap: pretty; }
/* The admin design sets no text-wrap on paragraphs, so lines break as plain wrap (matches its line endings). */
.admin p { text-wrap: wrap; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 600; }
.skip-link:focus { top: 12px; color: #fff; }
[hidden] { display: none !important; }
[x-cloak] { display: none !important; }

/* ---------- Icons ---------- */
.ic { display: inline-block; flex: none; color: var(--navy); --ia: var(--green); --io: 1; vertical-align: middle; }
.ic svg { display: block; width: 100%; height: 100%; }
/* A caret overlaid on a select: the design sets the icon box at top:14px, so no inline line box may push it down. */
[class*="-caret"] > .ic { display: block; }
.ic .ia { fill: var(--ia); opacity: var(--io); }
.ic-glyph { --io: 0; }
.ic-light { color: var(--navy); }
.ic-dark { color: #FFFFFF; }
.ic-muted { color: var(--muted); --io: .7; }
.ic-amber { color: var(--amber-line); --ia: #FFD58A; }
.ic-red { color: var(--red); --ia: #F8C9C4; }
.ic-nav { color: var(--nav-text); --io: .5; }
.ic-green { color: var(--green-text); }
.ic-glyph.ic-muted, .ic-glyph.ic-nav { --io: 0; }

/* ---------- Typography ---------- */
.eyebrow { display: flex; align-items: center; gap: 10px; font: 600 12px/16px var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--green-text); }
.eyebrow::before { content: ''; width: 20px; height: 3px; background: var(--green); flex: none; }
.eyebrow.on-dark { color: var(--green); }
.page-title { margin: 10px 0 6px; font: 800 36px/44px var(--f-head); letter-spacing: -.02em; color: var(--navy); }
.lead { margin: 0; max-width: 680px; }
.h2 { font: 700 20px/28px var(--f-head); color: var(--navy); }
.h3 { font: 700 18px/24px var(--f-head); color: var(--navy); }
.h4 { font: 700 17px/24px var(--f-head); color: var(--navy); }
.h5 { font: 700 16px/22px var(--f-head); color: var(--navy); }
.stat { font: 800 32px/38px var(--f-head); color: var(--navy); letter-spacing: -.02em; }
.stat-sm { font: 800 24px/28px var(--f-head); color: var(--navy); }
.label { font: 600 14px/20px var(--f-body); color: var(--navy); }
.label-15 { font: 600 15px/22px var(--f-body); color: var(--navy); }
.meta { font-size: 13px; line-height: 20px; color: var(--muted); }
.meta-12 { font-size: 12px; line-height: 18px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 22px; }
.ink { color: var(--ink); }
.mono { font-family: var(--f-mono); }
.prose { font-size: 16px; line-height: 26px; color: var(--text); }
.prose p + p, .prose ul, .prose ol { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 0; }
.prose a { text-decoration: underline; }
.caps { font: 600 11px/16px var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Layout ---------- */
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.stack-4 { display: flex; flex-direction: column; gap: 4px; }
.stack-14 { display: flex; flex-direction: column; gap: 14px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.stack-24 { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-6 { display: flex; align-items: center; gap: 6px; }
.row-wrap { display: flex; gap: 6px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; }
.grow { flex: 1; min-width: 0; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.split-wide { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.sticky-side { position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 1000px) {
  .split, .split-wide, .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .sticky-side { position: static; }
  .page-title { font-size: 30px; line-height: 38px; }
}

/* ---------- App shell ---------- */
.app { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--header-h); background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px; padding: 0 20px; }
.topbar .logo { display: flex; align-items: center; gap: 10px; flex: none; }
.topbar .logo img { height: clamp(32px, 9vw, 44px); width: auto; aspect-ratio: 4.372; display: block; }
.topbar .admin-tag { height: 28px; padding: 0 12px; border-radius: 6px; background: var(--navy); color: #fff; font: 700 11px/28px var(--f-body); letter-spacing: .1em; text-transform: uppercase; flex: none; }
.topbar .search { flex: 1 1 320px; max-width: 520px; margin-left: 40px; height: 46px; border: 1px solid var(--border); border-radius: 999px; background: var(--paper); display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.topbar .search input { flex: 1; min-width: 0; border: none; background: transparent; outline: none; font: 500 15px/20px var(--f-body); color: var(--ink); }
.topbar .search:focus-within { border-color: var(--navy); background: #fff; }
.topbar .actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.topbar .ext-link { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; border-radius: 999px; font: 600 14px/20px var(--f-body); color: var(--text); }
.topbar .ext-link:hover { background: var(--tint-3); text-decoration: none; color: var(--text); }
.menu-btn { width: 44px; height: 44px; border: none; border-radius: 14px; background: var(--tint-2); display: none; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.icon-btn { position: relative; width: 44px; height: 44px; border: none; border-radius: 999px; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--tint-3); }
.icon-btn .count { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--navy); color: var(--green); font: 700 10px/13px var(--f-body); border: 1.5px solid #fff; text-align: center; }
.avatar-pill { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 4px; border: 1px solid var(--border); border-radius: 999px; background: #fff; cursor: pointer; }
.avatar-pill:hover { background: var(--tint-3); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font: 700 13px/36px var(--f-head); text-align: center; flex: none; overflow: hidden; display: inline-block; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; line-height: 28px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; line-height: 56px; }
.avatar-pill .who { display: flex; flex-direction: column; text-align: left; }
.avatar-pill .name { font: 600 14px/18px var(--f-body); color: var(--navy); }
.avatar-pill .role { font-size: 11px; line-height: 14px; color: var(--muted); }

.shell { display: flex; align-items: flex-start; }
.sidebar { position: sticky; top: var(--header-h); left: 0; z-index: 20; width: 264px; flex: none; height: calc(100vh - var(--header-h)); overflow-y: auto; background: #fff; border-right: 1px solid var(--border); padding: 12px 12px 16px; display: flex; flex-direction: column; }
.sidebar .group { display: flex; flex-direction: column; gap: 2px; }
.sidebar .group-label { font: 600 11px/16px var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: var(--r-nav); font: 500 14px/18px var(--f-body); color: var(--text); }
.nav-item:hover { background: var(--tint-3); text-decoration: none; color: var(--text); }
.nav-item .grow { flex: 1; }
.nav-item[aria-current="page"] { background: var(--tint-2); color: var(--navy); font-weight: 600; }
.nav-item .badge-count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--navy); color: var(--green); font: 700 11px/20px var(--f-body); text-align: center; }
.sidebar .foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); }

/* Admin shell: navy sidebar */
.admin .sidebar { width: 256px; background: var(--navy); border-right: none; }
.admin .sidebar .group-label { color: var(--nav-label); }
.admin .nav-item { color: var(--nav-text); }
.admin .nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin .nav-item[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #fff; }
.admin .nav-item .badge-count { background: var(--green); color: var(--navy); }
.admin .sidebar .foot { padding: 14px 12px 4px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 12px; line-height: 18px; color: #9FB0CF; }

.main { flex: 1; min-width: 0; padding: 32px 40px 80px; }
.main .wrap { max-width: 1180px; margin: 0 auto; }
.admin .main .wrap { max-width: 1240px; }
.scrim { position: fixed; inset: var(--header-h) 0 0 0; background: rgba(1, 32, 78, .35); z-index: 19; display: none; }

@media (max-width: 999px) {
  .menu-btn { display: flex; }
  .topbar .search, .topbar .ext-link { display: none; }
  .sidebar { position: fixed; display: none; }
  body.menu-open .sidebar { display: flex; }
  body.menu-open .scrim { display: block; }
  .main { padding: 24px 16px 72px; }
  .avatar-pill .name, .avatar-pill .who { display: none; }
}
/* Phones: keep menu, logo, Admin tag, bell and avatar inside the screen width. */
@media (max-width: 480px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .topbar .logo img { height: 28px; }
  .topbar .actions { gap: 2px; }
  .avatar-pill { padding: 0 3px; gap: 0; }
  .avatar-pill > .ic { display: none; }
}

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.card-tight { padding: 18px; border-radius: 20px; gap: 10px; }
.card-flush { padding: 0; overflow: hidden; gap: 0; }
.card-navy { background: var(--navy); border-color: var(--navy); color: #C3CFE4; }
.card-navy h2, .card-navy h3, .card-navy .h2, .card-navy .h3, .card-navy .h4 { color: #fff; }
.card-tint { background: var(--tint-3); border-color: var(--tint-3); }
.card-amber { background: var(--amber-soft); border-color: #F5E2BC; }
.card-head { display: flex; align-items: center; gap: 10px; font: 700 17px/24px var(--f-head); color: var(--navy); }
.card-link { display: block; color: inherit; }
.card-link:hover { text-decoration: none; color: inherit; border-color: var(--navy); }
.list-row { display: flex; gap: 14px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: none; }
.tile { text-align: left; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 18px; display: flex; gap: 14px; align-items: flex-start; color: inherit; }
a.tile:hover, button.tile:hover { border-color: var(--navy); text-decoration: none; color: inherit; }
.tile .tile-icon { width: 40px; height: 40px; border-radius: 14px; background: var(--tint-3); display: flex; align-items: center; justify-content: center; flex: none; }
.empty { text-align: center; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .empty-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--tint-3); display: flex; align-items: center; justify-content: center; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Buttons ---------- */
.btn { height: 44px; padding: 0 20px; border: none; border-radius: 999px; background: var(--navy); color: #fff; font: 600 15px/20px var(--f-body); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--navy-hover); color: #fff; text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--disabled); color: var(--muted); cursor: not-allowed; }
.btn-lg { height: 48px; padding: 0 22px; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; line-height: 18px; }
.btn-xs { height: 36px; padding: 0 14px; font-size: 13px; line-height: 18px; }
.btn-outline { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-outline:hover { background: var(--tint-3); color: var(--navy); }
.btn-soft { background: #fff; color: var(--navy); border: 1.5px solid var(--border); }
.btn-soft:hover { background: var(--tint-3); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--tint-3); color: var(--navy); }
.btn-danger { background: transparent; color: var(--red-dark); }
.btn-danger:hover { background: var(--red-bg); color: var(--red-dark); }
.btn-danger-solid { background: var(--red); color: #fff; }
.btn-danger-solid:hover { background: var(--red-dark); }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: var(--tint-2); color: var(--navy); }
.btn-on-dark { background: transparent; color: #fff; border: 1.5px solid #7189B8; }
.btn-on-dark:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.btn-green { background: var(--green); color: var(--navy); }
.btn-green:hover { background: #5BFF34; color: var(--navy); }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 999px; border: 1px solid var(--border); background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.btn-icon:hover { background: var(--tint-3); }
.btn-icon.on { background: var(--navy); border-color: var(--navy); }
.btn-block { width: 100%; }
.link-btn { border: none; background: none; padding: 0; color: var(--navy); font: 600 14px/20px var(--f-body); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.link-btn:hover { color: var(--navy-hover); text-decoration: underline; }

/* ---------- Pills, chips, tabs ---------- */
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--navy); font: 600 14px/18px var(--f-body); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.pill:hover { border-color: var(--navy); text-decoration: none; color: var(--navy); }
.pill[aria-pressed="true"], .pill[aria-selected="true"], .pill.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.pill .n { font-weight: 500; opacity: .75; }
.pill-sm { height: 36px; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--tint-3); color: var(--navy); font: 600 13px/18px var(--f-body); white-space: nowrap; }
.chip-sm { height: 24px; padding: 0 8px; font-size: 12px; }
.chip-outline { background: #fff; border: 1px solid var(--border); color: var(--text); }
.chip-green { background: var(--green-bg); color: var(--green-fg); }
.chip-amber { background: var(--amber-bg); color: var(--amber-fg); }
.chip-navy { background: var(--navy); color: #fff; }
.chip-tint { background: var(--tint); color: var(--navy); }
.chip-grey { background: var(--line); color: var(--text); }
.chip-red { background: var(--red-bg); color: var(--red-dark); }
.chip-check { background: var(--navy); color: var(--green); }
.chip-remove { border: none; background: transparent; padding: 0; margin-left: 2px; cursor: pointer; display: inline-flex; }
.src { height: 18px; padding: 0 6px; border-radius: 5px; font: 600 10px/18px var(--f-body); letter-spacing: .04em; text-transform: uppercase; display: inline-block; }
.src-connect { background: var(--navy); color: var(--green); }
.src-academy { background: var(--tint); color: var(--navy); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--navy); flex: none; display: inline-block; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tab { padding: 12px 0; border: none; background: transparent; color: var(--muted); font: 500 15px/20px var(--f-body); cursor: pointer; box-shadow: inset 0 -2px 0 transparent; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--navy); text-decoration: none; }
.tab[aria-selected="true"], .tab.on { color: var(--navy); font-weight: 600; box-shadow: inset 0 -3px 0 var(--navy); }

/* Role badges (community) */
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font: 600 11px/20px var(--f-body); letter-spacing: .02em; white-space: nowrap; }
.badge-tutor { background: #01204E; color: #fff; }
.badge-candidate { background: #fff; color: #6B7485; border: 1px solid var(--border); line-height: 18px; }
.badge-past_recipient { background: #E4FFD9; color: #0E5C00; }
.badge-staff, .badge-admin { background: #E3E9F3; color: #01204E; }
.badge-sponsor { background: #FFF3DC; color: #7A4600; }
.badge-moderator { background: var(--tint-2); color: var(--navy); border: 1px solid var(--tint); line-height: 18px; }

/* Application status colours */
.status { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; font: 600 13px/18px var(--f-body); white-space: nowrap; }
.status-preparing { background: #E3E9F3; color: #01204E; }
.status-submitted { background: #E4FFD9; color: #0E5C00; }
.status-shortlisted, .status-interview { background: #FFF3DC; color: #7A4600; }
.status-offer, .status-accepted { background: #01204E; color: #fff; }
.status-unsuccessful, .status-withdrawn { background: #EEF0F4; color: #3A4352; }

/* Match labels */
.match { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font: 600 13px/18px var(--f-body); }
.match-strong { background: var(--navy); color: #fff; }
.match-strong .score { color: var(--green); }
.match-good { background: var(--green-bg); color: var(--green-fg); }
.match-explore { background: var(--tint); color: var(--navy); }
.match-check { background: var(--amber-bg); color: var(--amber-fg); }

/* Readiness bands */
.band { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font: 600 12px/18px var(--f-body); }
.band-emerging { background: #FFF3DC; color: #7A4600; --bar: #A15C00; }
.band-developing { background: #E3E9F3; color: #01204E; --bar: #34589A; }
.band-ready { background: #E4FFD9; color: #0E5C00; --bar: #127A00; }
.band-strong { background: #01204E; color: #fff; --bar: #01204E; }
.bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--bar, var(--navy)); }
.bar-green > span { background: var(--green-text); }
.bar-thick { height: 10px; }
.ring { --p: 0; --size: 120px; width: var(--size); height: var(--size); border-radius: 50%; background: conic-gradient(var(--green) calc(var(--p) * 1%), rgba(255, 255, 255, .14) 0); display: grid; place-items: center; flex: none; }
.ring::before { content: ''; grid-area: 1 / 1; width: calc(var(--size) - 20px); height: calc(var(--size) - 20px); border-radius: 50%; background: var(--navy); }
.ring > * { grid-area: 1 / 1; position: relative; color: #fff; font: 800 28px/32px var(--f-head); }
.ring.light { background: conic-gradient(var(--navy) calc(var(--p) * 1%), var(--line) 0); }
.ring.light::before { background: #fff; }
.ring.light > * { color: var(--navy); }

/* Deadline chip */
.deadline { display: inline-flex; align-items: center; gap: 6px; font: 600 13px/18px var(--f-body); color: var(--text); }
.deadline.warn { color: var(--amber-fg); }
.deadline.muted { color: var(--muted); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > .label-text, .field-label { font: 600 14px/20px var(--f-body); color: var(--navy); }
.field .hint { font-size: 13px; line-height: 18px; color: var(--muted); }
.field .error, .form-error { font-size: 13px; line-height: 18px; color: var(--red); font-weight: 500; }
.input, .select, .textarea { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--field); border-radius: var(--r-input); font-size: 16px; color: var(--ink); background: #fff; outline: none; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(1, 32, 78, .12); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--red); }
.select { padding-right: 40px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%2301204E'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
.textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 24px; resize: vertical; }
.input-sm { height: 40px; font-size: 15px; border-radius: 12px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 15px; line-height: 22px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.option { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--r-input); background: #fff; cursor: pointer; font: 500 15px/20px var(--f-body); color: var(--ink); }
.option:hover { border-color: var(--navy); }
.option:has(input:checked) { border-color: var(--navy); background: var(--tint-3); box-shadow: inset 0 0 0 1px var(--navy); }
.option input { accent-color: var(--navy); width: 18px; height: 18px; margin: 0; flex: none; }
.switch { position: relative; width: 44px; height: 26px; flex: none; display: inline-block; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: var(--field); transition: background .2s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(1, 32, 78, .3); transition: left .2s; }
.switch input:checked + .track { background: var(--navy); }
.switch input:checked + .track::after { left: 21px; }
.switch input:focus-visible + .track { outline: 3px solid var(--green); outline-offset: 2px; }
.search-field { height: 52px; border: 1px solid var(--field); border-radius: 999px; background: #fff; display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.search-field input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 16px; color: var(--ink); }
.search-field:focus-within { border-color: var(--navy); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Tables ---------- */
.table-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.table th { text-align: left; font: 600 12px/16px var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--border); background: #fff; white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #FAFBFC; }
.table .t-title { font-weight: 600; color: var(--navy); }

/* ---------- Popovers, menus, modals, toasts ---------- */
.pop { position: absolute; top: 54px; right: 0; width: min(380px, calc(100vw - 24px)); background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-pop); overflow: hidden; z-index: 50; }
.pop-head { padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.pop-item { padding: 12px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; color: inherit; }
.pop-item:hover { background: var(--paper); text-decoration: none; color: inherit; }
.pop-item.unread { background: var(--tint-3); }
.pop-foot { display: block; width: 100%; height: 46px; border: none; background: #fff; color: var(--navy); font: 600 14px/46px var(--f-body); text-align: center; cursor: pointer; }
.pop-foot:hover { background: var(--tint-3); text-decoration: none; }
.menu { position: absolute; top: 52px; right: 0; min-width: 220px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 50; display: flex; flex-direction: column; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px; border: none; border-radius: 10px; background: transparent; color: var(--ink); font: 500 14px/20px var(--f-body); text-align: left; cursor: pointer; width: 100%; }
.menu a:hover, .menu button:hover { background: var(--tint-3); text-decoration: none; }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 4px 0; }
.rel { position: relative; }
.modal { border: none; padding: 0; border-radius: var(--r-card); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px); box-shadow: var(--shadow-pop); color: var(--text); }
.modal::backdrop { background: rgba(1, 32, 78, .45); }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-wide { width: min(760px, calc(100vw - 24px)); }
.toast-host { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 18px; border-radius: 999px; background: var(--navy); color: #fff; font: 600 14px/20px var(--f-body); box-shadow: var(--shadow-pop); animation: toast-in .2s ease-out; }
.toast.error { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--tint-3); color: var(--text); font-size: 14px; line-height: 22px; }
.notice-amber { background: var(--amber-bg); color: var(--amber-fg); }
.notice-green { background: var(--green-bg); color: var(--green-fg); }
.notice-red { background: var(--red-bg); color: var(--red-dark); }

/* ---------- Community ---------- */
.post-body { font-size: 15px; line-height: 24px; color: var(--text); overflow-wrap: anywhere; }
.post-body p + p, .post-body ul, .post-body ol { margin-top: 10px; }
.post-body ul, .post-body ol { padding-left: 22px; margin-bottom: 0; }
.post-body a { text-decoration: underline; }
.answer-flag { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/18px var(--f-body); color: var(--green-fg); }

/* ---------- Public site ---------- */
.site-top { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--border); }
.site-top .inner { max-width: 1240px; margin: 0 auto; height: var(--header-h); display: flex; align-items: center; gap: 16px; padding: 0 20px; }
.site-top nav { display: flex; gap: 4px; margin-left: 24px; }
.site-top nav a { height: 44px; padding: 0 12px; border-radius: 999px; display: flex; align-items: center; font: 600 14px/20px var(--f-body); color: var(--text); }
.site-top nav a:hover, .site-top nav a[aria-current="page"] { background: var(--tint-3); text-decoration: none; color: var(--navy); }
.site-main { max-width: 1240px; margin: 0 auto; padding: 32px 20px 80px; }
.site-foot { background: var(--navy); color: #C3CFE4; padding: 48px 20px; }
.site-foot .inner { max-width: 1240px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-foot a { color: #fff; }
@media (max-width: 760px) { .site-top nav { display: none; } }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.center { text-align: center; }
.right { text-align: right; }
.hide-narrow { }
@media (max-width: 999px) { .hide-narrow { display: none !important; } }
@media (min-width: 1000px) { .show-narrow { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .topbar, .sidebar, .scrim, .toast-host { display: none !important; } .main { padding: 0; } }
