/* Wisdsol Municipal ERP — design tokens.
   The look borrows from the assembly's own paper: the demand notice, the
   counterfoil receipt, the ledger card. Serials and money are always set in
   mono with tabular figures so columns line up the way a cash book does. */

:root {
  --ink: #101a21;
  --ink-soft: #45585f;
  --ink-faint: #7b8b90;
  --shell: #0c2a24;
  --shell-deep: #081d19;
  --shell-line: #1c453b;
  --canvas: #eef1ee;
  --surface: #ffffff;
  --line: #d8ded9;
  --line-soft: #e8ece8;
  --gold: #b8862b;
  --gold-wash: #fdf4e2;
  --jade: #1b7a5a;
  --jade-wash: #e6f3ed;
  --clay: #a8362c;
  --clay-wash: #fbebe8;
  --slate-wash: #eceff2;

  --sans: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Archivo", var(--sans);
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --r: 4px;
  --shadow: 0 1px 2px rgba(16, 26, 33, .06), 0 8px 24px -18px rgba(16, 26, 33, .35);
  --sidebar-w: 250px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--canvas);
  font-variant-numeric: tabular-nums;
}

a { color: var(--shell); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -.015em;
  margin: 0;
}
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--shell);
  color: #cfded8;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--shell-line);
}
.brand__seal {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.brand__name {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
}
.brand__meta { font-size: 11px; color: #8fa9a0; margin-top: 3px; }

.nav { padding: 12px 10px 24px; flex: 1; }
.nav__group {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6f8d83;
  padding: 16px 10px 6px;
}
.nav a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--r);
  color: #cfded8;
  font-size: 13px;
}
.nav a:hover { background: var(--shell-deep); color: #fff; text-decoration: none; }
.nav a.is-active {
  background: var(--shell-deep);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--gold);
}
.nav__count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gold);
}

.sidebar__foot {
  border-top: 1px solid var(--shell-line);
  padding: 12px 18px 18px;
  font-size: 11px;
  color: #7f9a91;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar__title { flex: 1; min-width: 0; }
.topbar__title small {
  display: block;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.chip {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.chip--year { border-color: var(--gold); color: var(--gold); background: var(--gold-wash); }

.content { padding: 22px 26px 60px; max-width: 1420px; width: 100%; }

.menu-toggle { display: none; }

/* ---------- Page header ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.page-head p { margin: 4px 0 0; color: var(--ink-soft); max-width: 62ch; }
.page-head .spacer { flex: 1; }

/* ---------- Stats ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
}
.stat__label {
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.stat__value {
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -.02em;
  margin-top: 5px;
}
.stat__note { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.stat--gold { border-left: 3px solid var(--gold); }
.stat--jade { border-left: 3px solid var(--jade); }
.stat--clay { border-left: 3px solid var(--clay); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 16px;
}
.card__head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 12px;
}
.card__head h2 { flex: 1; }
.card__body { padding: 16px; }
.card__foot {
  padding: 10px 16px;
  border-top: 1px solid var(--line-soft);
  background: #fafbfa;
  font-size: 12px;
  color: var(--ink-soft);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left;
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: var(--surface);
}
table.data td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
table.data tbody tr:hover { background: #fafbfa; }
table.data tfoot td {
  font-family: var(--mono);
  font-weight: 500;
  border-top: 2px solid var(--ink);
  border-bottom: none;
  background: #fafbfa;
}
.num { font-family: var(--mono); text-align: right; white-space: nowrap; }
.serial {
  font-family: var(--mono);
  font-size: 12.5px;
  border-bottom: 1px dotted var(--ink-faint);
}
.muted { color: var(--ink-faint); }
.wrap-tight { max-width: 34ch; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--slate-wash);
  color: var(--ink-soft);
  white-space: nowrap;
}
.badge--paid, .badge--good { background: var(--jade-wash); color: var(--jade); border-color: #bfe0d2; }
.badge--due, .badge--warn { background: var(--gold-wash); color: #8a6317; border-color: #ecd7a8; }
.badge--over, .badge--bad { background: var(--clay-wash); color: var(--clay); border-color: #f0c6c0; }

/* ---------- Bars ---------- */
.bar { height: 6px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--jade); }
.bar--gold > span { background: var(--gold); }
.bar--clay > span { background: var(--clay); }

.spark { display: flex; align-items: flex-end; gap: 5px; height: 96px; }
.spark__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.spark__bar { background: var(--shell); border-radius: 2px 2px 0 0; min-height: 2px; }
.spark__col:last-child .spark__bar { background: var(--gold); }
.spark__labels { display: flex; gap: 5px; margin-top: 6px; }
.spark__labels span { flex: 1; text-align: center; font-size: 10px; color: var(--ink-faint); }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 5px;
}
input[type=text], input[type=number], input[type=date], input[type=email],
input[type=password], input[type=search], input[type=tel], input[type=url],
select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  font: inherit;
  color: var(--ink);
}
input[type=number], input[name*=amount], input[name*=rate] { font-family: var(--mono); }
textarea { resize: vertical; }
.field .help { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.field .err { font-size: 12px; color: var(--clay); margin-top: 4px; }
.field--check { display: flex; gap: 8px; align-items: center; }
.field--check input { width: auto; }
.field--check label { text-transform: none; letter-spacing: 0; font-size: 13px; margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r);
  border: 1px solid var(--shell);
  background: var(--shell);
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--shell-deep); text-decoration: none; color: #fff; }
.btn--ghost { background: transparent; color: var(--shell); }
.btn--ghost:hover { background: var(--slate-wash); color: var(--shell); }
.btn--gold { background: var(--gold); border-color: var(--gold); }
.btn--gold:hover { background: #a2761f; }
.btn--danger { background: var(--clay); border-color: var(--clay); }
.btn--sm { padding: 5px 10px; font-size: 12px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type=search], .toolbar select { width: auto; min-width: 180px; }

/* ---------- Messages ---------- */
.msg {
  padding: 10px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 12px;
  border-left: 3px solid var(--ink-faint);
}
.msg.success { border-left-color: var(--jade); background: var(--jade-wash); }
.msg.error { border-left-color: var(--clay); background: var(--clay-wash); }
.msg.warning { border-left-color: var(--gold); background: var(--gold-wash); }

.empty { padding: 40px 20px; text-align: center; color: var(--ink-soft); }
.empty strong { display: block; font-family: var(--display); font-size: 15px; color: var(--ink); }

.pager { display: flex; gap: 8px; align-items: center; margin-top: 14px; font-size: 13px; }

/* ---------- Definition list ---------- */
dl.spec { display: grid; grid-template-columns: minmax(140px, 34%) 1fr; gap: 0; margin: 0; }
dl.spec dt {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
dl.spec dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }

/* ---------- Workflow rail ---------- */
.rail { display: flex; gap: 0; margin: 4px 0 16px; flex-wrap: wrap; }
.rail__step {
  flex: 1;
  min-width: 110px;
  padding: 8px 10px;
  border-top: 3px solid var(--line);
  font-size: 12px;
  color: var(--ink-faint);
}
.rail__step.is-done { border-top-color: var(--jade); color: var(--jade); }
.rail__step.is-now { border-top-color: var(--gold); color: var(--ink); font-weight: 600; }

/* ---------- Timeline ---------- */
.trail { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 1px solid var(--line); }
.trail li { position: relative; padding: 0 0 16px 14px; }
.trail li::before {
  content: "";
  position: absolute;
  left: -23px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--gold);
}
.trail time { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); }

/* ---------- Public pages ---------- */
.public { max-width: 940px; margin: 0 auto; padding: 0 20px 60px; }
.public-bar {
  background: var(--shell);
  color: #fff;
  padding: 14px 0;
  margin-bottom: 28px;
}
.public-bar .inner {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.public-bar a { color: #cfded8; font-size: 13px; }
.public-bar .brand__name { font-size: 16px; }
.public-hero { padding: 10px 0 26px; }
.public-hero h1 { font-size: 32px; max-width: 18ch; line-height: 1.1; }
.public-hero p { color: var(--ink-soft); max-width: 58ch; font-size: 15px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  display: block;
  color: inherit;
}
.tile:hover { border-color: var(--gold); text-decoration: none; }
.tile h3 { margin-bottom: 4px; }
.tile p { margin: 0; color: var(--ink-soft); font-size: 13px; }

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(var(--shell), var(--shell-deep));
}
.auth__card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border-radius: var(--r);
  padding: 28px;
  box-shadow: var(--shadow);
}
.auth__seal {
  font-family: var(--display);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- The notice: signature element ----------
   A demand notice and a receipt are the two documents a resident actually
   holds. Both are drawn here as a torn counterfoil: a scalloped top edge and
   a dotted tear line above the amount due. */
.notice {
  background: var(--surface);
  border: 1px solid var(--ink);
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  padding: 0 0 24px;
}
.notice::before {
  content: "";
  display: block;
  height: 8px;
  background-image: radial-gradient(circle at 5px 0, transparent 5px, var(--ink) 5px);
  background-size: 10px 8px;
  background-repeat: repeat-x;
}
.notice__head { padding: 20px 26px 16px; border-bottom: 2px solid var(--ink); }
.notice__crest {
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}
.notice__body { padding: 18px 26px; }
.notice__tear {
  margin: 18px 26px;
  border-top: 1px dashed var(--ink-faint);
}
.notice__amount {
  padding: 0 26px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.notice__amount .figure {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -.02em;
}
.notice__stub {
  margin: 18px 26px 0;
  padding: 12px 0 0;
  border-top: 1px dashed var(--ink-faint);
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Print ---------- */
@page { size: A4; margin: 14mm; }
@media print {
  .no-print, .sidebar, .topbar { display: none !important; }
  body { background: #fff; font-size: 11.5pt; }
  .content { padding: 0; max-width: none; }
  .notice { border: none; max-width: none; }
  .notice::before { display: none; }
  .card { border: 1px solid #000; box-shadow: none; }
  a { color: #000; text-decoration: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

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

/* ==========================================================================
   Public site — top navigation
   ========================================================================== */

.topnav {
  background: var(--shell);
  color: #dbe7e1;
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--shell-line);
}
.topnav__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.topnav__brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.topnav__brand:hover { text-decoration: none; }
.topnav__crest {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--display);
  font-size: 12px; font-weight: 700;
  letter-spacing: .04em;
}
.topnav__eyebrow {
  display: block;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold);
}
.topnav__name { display: block; font-family: var(--display); font-weight: 600; font-size: 15px; }
.topnav__toggle {
  display: none; margin-left: auto;
  background: transparent; color: #dbe7e1;
  border: 1px solid var(--shell-line); border-radius: var(--r);
  padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer;
}
.topnav__links { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topnav__links a {
  color: #cadbd4; padding: 8px 11px; border-radius: var(--r);
  font-size: 13.5px; font-weight: 500;
}
.topnav__links a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.topnav__cta {
  background: var(--gold); color: #241703 !important; font-weight: 600 !important;
  margin-left: 6px;
}
.topnav__cta:hover { background: #cd9834; }
.topnav__staff { color: #7e9a90 !important; font-size: 12.5px !important; }

@media (max-width: 860px) {
  .topnav__toggle {
    display: inline-flex; align-items: center; gap: 9px;
    min-height: 44px; padding: 0 14px;
  }
  .topnav__inner { flex-wrap: wrap; padding: 10px 16px; }
  .topnav__inner { padding-top: calc(10px + env(safe-area-inset-top)); }
  .topnav__name { font-size: 14px; }
  .topnav__links {
    display: none; width: 100%; order: 3;
    margin: 10px -16px -10px;
    padding: 6px 16px calc(14px + env(safe-area-inset-bottom));
    flex-direction: column; align-items: stretch;
    border-top: 1px solid var(--shell-line);
  }
  .topnav__links.is-open { display: flex; }
  .topnav__links a {
    padding: 13px 12px; font-size: 15px;
    min-height: 46px; display: flex; align-items: center;
    border-radius: var(--r);
  }
  .topnav__cta { margin: 8px 0 0; justify-content: center; }
  .topnav__staff { font-size: 14px !important; }
  body.menu-open { overflow: hidden; }
}

/* ==========================================================================
   Powered-by footer
   ========================================================================== */

.powered {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 42px;
}
.powered__inner {
  max-width: 1120px; margin: 0 auto;
  padding: 20px 22px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.powered__by { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-faint); }
.powered__brand { display: inline-flex; align-items: center; gap: 7px; }
.powered__brand:hover { text-decoration: none; }
.powered__brand img { display: block; }
.powered__word {
  font-family: var(--display); font-weight: 700; font-size: 14px;
  color: var(--ink); letter-spacing: -.01em;
}
.powered__word em { font-style: normal; color: #f97316; }
.powered__links { margin-left: auto; display: flex; gap: 16px; font-size: 12.5px; }
.powered__links a { color: var(--ink-soft); }

.sidebar__who { display: flex; align-items: center; gap: 9px; }
.sidebar__who strong { font-weight: 600; }
.avatar {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gold); color: #241703;
  font-family: var(--display); font-size: 11.5px; font-weight: 700;
  text-transform: uppercase;
}
.sidebar__wisdsol {
  display: flex; align-items: center; gap: 7px;
  margin-top: 12px; padding-top: 11px;
  border-top: 1px solid var(--shell-line);
  color: #7e9a90 !important; font-size: 11px; letter-spacing: .02em;
}
.sidebar__wisdsol:hover { color: #cadbd4 !important; text-decoration: none; }

/* ==========================================================================
   Landing page
   ========================================================================== */

.hero {
  background:
    radial-gradient(1100px 420px at 78% -18%, rgba(184,134,43,.30), transparent 62%),
    linear-gradient(168deg, var(--shell) 0%, var(--shell-deep) 100%);
  color: #e7efeb;
  padding: 74px 22px 90px;
  position: relative;
  overflow: hidden;
}
/* A faint ledger rule, so the page still reads as the assembly's own paper. */
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    to bottom, transparent 0 43px, rgba(255,255,255,.035) 43px 44px);
  pointer-events: none;
}
.hero__inner { max-width: 1120px; margin: 0 auto; position: relative; z-index: 1; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(184,134,43,.45);
  border-radius: 999px; padding: 6px 14px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(30px, 5.2vw, 52px);
  line-height: 1.06;
  letter-spacing: -.028em;
  font-weight: 800;
  color: #fff;
  max-width: 15ch;
}
.hero h1 em { font-style: normal; color: var(--gold); }
.hero__lede {
  margin: 20px 0 30px;
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.62;
  color: #b8ccc4;
  max-width: 58ch;
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn--hero {
  background: var(--gold); color: #241703; border: 0;
  padding: 13px 24px; font-size: 15px; font-weight: 600; border-radius: var(--r);
}
.btn--hero:hover { background: #cd9834; text-decoration: none; }
.btn--hero-ghost {
  background: transparent; color: #e7efeb;
  border: 1px solid rgba(255,255,255,.28);
  padding: 13px 24px; font-size: 15px; font-weight: 500; border-radius: var(--r);
}
.btn--hero-ghost:hover { border-color: rgba(255,255,255,.55); text-decoration: none; }

.hero__figures {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; margin-top: 56px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r); overflow: hidden;
}
.hero__figure { background: rgba(8,29,25,.82); padding: 20px 22px; }
.hero__figure dt {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: #8fada3; margin-bottom: 7px;
}
.hero__figure dd {
  margin: 0; font-family: var(--mono); font-size: 22px; font-weight: 500; color: #fff;
  letter-spacing: -.02em;
}
.hero__figure small { display: block; margin-top: 5px; font-size: 11.5px; color: #7e9a90; }
@media (max-width: 780px) { .hero__figures { grid-template-columns: repeat(2, 1fr); } }

.section { max-width: 1120px; margin: 0 auto; padding: 58px 22px; }
.section__head { margin-bottom: 28px; max-width: 62ch; }
.section__head h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.022em; }
.section__head p { color: var(--ink-soft); margin: 10px 0 0; font-size: 15.5px; line-height: 1.62; }
.section--tint { background: var(--surface); border-block: 1px solid var(--line); max-width: none; }
.section--tint > * { max-width: 1120px; margin-inline: auto; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px; display: block; color: inherit;
  transition: border-color .16s ease, transform .16s ease;
}
a.feature:hover { border-color: var(--gold); transform: translateY(-2px); text-decoration: none; }
.feature__icon {
  width: 34px; height: 34px; border-radius: var(--r);
  display: grid; place-items: center; margin-bottom: 14px;
  background: var(--gold-wash); color: var(--gold);
  font-family: var(--display); font-weight: 700; font-size: 15px;
}
.feature h3 { font-size: 16px; margin-bottom: 7px; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.58; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.checklist { list-style: none; margin: 18px 0 0; padding: 0; }
.checklist li {
  position: relative; padding: 0 0 0 26px; margin-bottom: 11px;
  color: var(--ink-soft); font-size: 14.5px; line-height: 1.55;
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 13px; height: 7px;
  border-left: 2px solid var(--jade); border-bottom: 2px solid var(--jade);
  transform: rotate(-45deg);
}
.checklist strong { color: var(--ink); font-weight: 600; }

.highlight-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .highlight-row { grid-template-columns: 1fr; } }
.highlight {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--jade); border-radius: var(--r); padding: 18px;
}
.highlight h4 { font-size: 14.5px; margin-bottom: 6px; }
.highlight .muted { font-size: 12.5px; }

/* ==========================================================================
   Map
   ========================================================================== */

.map-wrap {
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: var(--surface);
}
#map { height: 620px; width: 100%; background: #dfe5e0; }
#map.map--short { height: 400px; }
.leaflet-container { font-family: var(--sans); font-size: 13px; }
.map-legend {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft); background: var(--surface);
}
.map-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 13px 5px 9px; font-size: 12.5px; cursor: pointer;
  background: var(--surface); color: var(--ink-soft); user-select: none;
}
.map-toggle input { display: none; }
.map-toggle .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.map-toggle.is-on { border-color: var(--ink); color: var(--ink); font-weight: 500; }
.map-toggle .n { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.map-pop h4 { font-size: 14px; margin: 0 0 3px; }
.map-pop .sub { color: var(--ink-faint); font-size: 12px; margin-bottom: 8px; }
.map-pop dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; font-size: 12.5px; }
.map-pop dt { color: var(--ink-faint); }
.map-pop dd { margin: 0; }
.map-pop a { display: inline-block; margin-top: 9px; font-weight: 600; }

/* ==========================================================================
   Role desk on the dashboard
   ========================================================================== */

.desk {
  background: var(--surface); border: 1px solid var(--line);
  border-top: 3px solid var(--gold); border-radius: var(--r);
  margin-bottom: 18px; overflow: hidden;
}
.desk__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
}
.desk__head h2 { font-size: 16px; }
.desk__tiles {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line-soft);
}
@media (max-width: 820px) { .desk__tiles { grid-template-columns: repeat(2, 1fr); } }
.desk__tile { background: var(--surface); padding: 16px 18px; }
.desk__tile dt {
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 6px;
}
.desk__tile dd {
  margin: 0; font-family: var(--mono); font-size: 20px; letter-spacing: -.02em;
}
.desk__tile small { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 11.5px; }

/* ==========================================================================
   Resident account
   ========================================================================== */

.account-head {
  background: linear-gradient(160deg, var(--shell), var(--shell-deep));
  color: #e7efeb; border-radius: var(--r); padding: 24px 26px; margin-bottom: 18px;
}
.account-head h1 { color: #fff; font-size: 24px; }
.account-head .code {
  font-family: var(--mono); color: var(--gold); font-size: 13px; letter-spacing: .04em;
}
.account-figures { display: flex; gap: 30px; margin-top: 20px; flex-wrap: wrap; }
.account-figures div small {
  display: block; font-size: 10.5px; letter-spacing: .13em;
  text-transform: uppercase; color: #8fada3; margin-bottom: 5px;
}
.account-figures div strong { font-family: var(--mono); font-size: 21px; font-weight: 500; color: #fff; }
.account-nav { display: flex; gap: 4px; margin-bottom: 18px; flex-wrap: wrap; }
.account-nav a {
  padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: 13.5px; color: var(--ink-soft);
}
.account-nav a:hover { border-color: var(--ink-faint); text-decoration: none; }
.account-nav a.is-active { background: var(--shell); border-color: var(--shell); color: #fff; }

/* ==========================================================================
   User manual
   ========================================================================== */

.manual { display: grid; grid-template-columns: 232px 1fr; gap: 30px; align-items: start; }
@media (max-width: 880px) { .manual { grid-template-columns: 1fr; } }
.manual__nav {
  position: sticky; top: 78px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 8px;
}
@media (max-width: 880px) { .manual__nav { position: static; } }
.manual__nav a {
  display: block; padding: 8px 12px; border-radius: var(--r);
  font-size: 13.5px; color: var(--ink-soft);
}
.manual__nav a:hover { background: var(--slate-wash); text-decoration: none; }
.manual__nav a.is-active { background: var(--shell); color: #fff; font-weight: 500; }
.manual__body {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 32px 38px; max-width: 76ch;
}
.manual__body h1 { font-size: 27px; letter-spacing: -.022em; margin-bottom: 6px; }
.manual__body h2 {
  font-size: 18px; margin: 34px 0 10px;
  padding-top: 18px; border-top: 1px solid var(--line-soft);
}
.manual__body h3 { font-size: 15px; margin: 22px 0 7px; }
.manual__body p, .manual__body li { color: var(--ink-soft); line-height: 1.68; font-size: 14.5px; }
.manual__body p { margin: 0 0 13px; }
.manual__body ul, .manual__body ol { margin: 0 0 15px; padding-left: 20px; }
.manual__body li { margin-bottom: 7px; }
.manual__body strong { color: var(--ink); font-weight: 600; }
.manual__body code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--slate-wash); padding: 1px 5px; border-radius: 3px; color: var(--ink);
}
.manual__lede { font-size: 16px !important; color: var(--ink-soft); margin-bottom: 8px !important; }
.manual__note {
  border-left: 3px solid var(--gold); background: var(--gold-wash);
  padding: 13px 17px; border-radius: 0 var(--r) var(--r) 0; margin: 18px 0;
}
.manual__note p:last-child { margin-bottom: 0; }
.manual__foot {
  display: flex; justify-content: space-between; gap: 14px;
  margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
}

/* The narrow public wrapper suits reading, but the resident's account and the
   manual carry tables and a side nav, so they get the wider measure. */
.is-wide .public { max-width: 1120px; }

/* The landing hero and tinted bands run edge to edge, so that page opts out of
   the narrow public wrapper entirely. */
.is-landing .public { max-width: none; padding: 0 0 0; }
.is-landing .public > .msg { max-width: 1120px; margin: 18px auto; }

/* ==========================================================================
   Project carousel
   ========================================================================== */

.carousel { position: relative; }
.carousel__frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--shell-deep);
  aspect-ratio: 16 / 9;
}
.carousel__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .55s ease;
}
.carousel__slide.is-current { opacity: 1; visibility: visible; }
.carousel__slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.carousel__caption {
  position: absolute; inset: auto 0 0 0;
  padding: 96px 26px 22px;
  background: linear-gradient(to top,
              rgba(6,20,17,.96) 0%, rgba(6,20,17,.88) 42%, rgba(6,20,17,0) 100%);
  color: #e7efeb;
}
.carousel__caption .eyebrow {
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); display: block; margin-bottom: 6px;
}
.carousel__caption h3 {
  color: #fff; font-size: clamp(16px, 2.2vw, 23px); margin-bottom: 6px;
  letter-spacing: -.018em;
}
.carousel__caption p { margin: 0; color: #b8ccc4; font-size: 13.5px; }
.carousel__meta {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px;
}
.carousel__meta .pill {
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  padding: 3px 11px; font-size: 11.5px; color: #cadbd4;
}
.carousel__meta .pill--done { border-color: rgba(27,122,90,.75); color: #7fd3b1; }

.carousel__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.34);
  background: rgba(6,20,17,.55); color: #fff;
  font-size: 17px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s ease;
}
.carousel__nav:hover { background: rgba(6,20,17,.85); }
.carousel__nav--prev { left: 14px; }
.carousel__nav--next { right: 14px; }

.carousel__dots {
  display: flex; gap: 7px; justify-content: center; align-items: center;
  margin-top: 14px; flex-wrap: wrap;
}
.carousel__dot {
  width: 34px; height: 4px; border: 0; padding: 0; cursor: pointer;
  background: var(--line); border-radius: 999px;
}
.carousel__dot.is-current { background: var(--gold); }
.carousel__dot:focus-visible { outline: 2px solid var(--shell); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .carousel__slide { transition: none; }
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.gallery {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }
.gallery__item {
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: var(--surface); cursor: zoom-in; padding: 0; text-align: left;
  font: inherit; color: inherit; display: block; width: 100%;
  transition: border-color .16s ease, transform .16s ease;
}
.gallery__item:hover { border-color: var(--gold); transform: translateY(-2px); }
.gallery__item:focus-visible { outline: 2px solid var(--shell); outline-offset: 2px; }
.gallery__item img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block;
  background: var(--slate-wash);
}
.gallery__body { padding: 13px 15px 15px; }
.gallery__body h4 { font-size: 14px; margin-bottom: 4px; }
.gallery__body .muted { font-size: 12px; }
.gallery__tags { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }

.filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-row a {
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; color: var(--ink-soft); background: var(--surface);
}
.filter-row a:hover { border-color: var(--ink-faint); text-decoration: none; }
.filter-row a.is-active { background: var(--shell); border-color: var(--shell); color: #fff; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(6, 20, 17, .93);
  display: none; align-items: center; justify-content: center;
  padding: 26px;
}
.lightbox.is-open { display: flex; }
.lightbox__inner { max-width: 1100px; width: 100%; }
.lightbox img {
  width: 100%; max-height: 74vh; object-fit: contain; display: block;
  border-radius: var(--r); background: #06140f;
}
.lightbox__bar {
  display: flex; align-items: flex-start; gap: 16px;
  margin-top: 14px; color: #cadbd4; flex-wrap: wrap;
}
.lightbox__bar h4 { color: #fff; font-size: 15px; margin-bottom: 3px; }
.lightbox__bar .muted { color: #8fada3; font-size: 12.5px; }
.lightbox__close, .lightbox__step {
  border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff;
  border-radius: var(--r); padding: 7px 14px; cursor: pointer; font: inherit;
  font-size: 13px;
}
.lightbox__close:hover, .lightbox__step:hover { background: rgba(255,255,255,.12); }

/* Project photo strip on the staff project page */
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 700px) { .photo-strip { grid-template-columns: repeat(2, 1fr); } }
.photo-strip img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border: 1px solid var(--line); border-radius: var(--r); display: block;
}
.photo-strip figure { margin: 0; }
.photo-strip figcaption {
  font-size: 11.5px; color: var(--ink-faint); margin-top: 6px; line-height: 1.4;
}

/* ==========================================================================
   Collapsible sidebar sections
   ========================================================================== */

.nav__section { margin-bottom: 2px; }
.nav__group {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: 0; cursor: pointer;
  font: inherit; text-align: left;
  padding: 14px 16px 7px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  color: #6f8d83;
}
.nav__group:hover { color: #cadbd4; }
.nav__group:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.nav__chevron {
  margin-left: auto; width: 7px; height: 7px; flex: none;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .18s ease;
}
.nav__items { display: block; }
.is-collapsed .nav__items { display: none; }
.is-collapsed .nav__chevron { transform: rotate(-45deg) translate(-2px, 2px); }
/* A collapsed group that still contains the current page would be a trap, so the
   script never collapses one — but flag it if the markup ever changes. */
.is-collapsed .nav__items a.is-active { display: block; }

@media (prefers-reduced-motion: reduce) { .nav__chevron { transition: none; } }

/* Uploaded assembly marks. Both fall back to the lettering when absent. */
.brand__logo {
  display: block; max-width: 130px; max-height: 52px;
  width: auto; height: auto; margin-bottom: 12px;
}
.topnav__logo {
  display: block; max-height: 38px; max-width: 132px;
  width: auto; height: auto; flex: none;
}
.notice__arms { display: block; max-height: 66px; width: auto; margin: 0 auto 10px; }

/* Badges in a card header should not squeeze the heading onto two lines. */
.card__head h2 { flex: 0 1 auto; min-width: 0; }

/* ==========================================================================
   Mobile
   ==========================================================================
   Most of the people using this are on a phone, standing at a counter or in a
   market. The layout below is written for that first: one thumb, a small screen,
   sunlight, and a hurry.
   ========================================================================== */

.menu-toggle {
  display: none;
  align-items: center; gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0 14px 0 12px;
  min-height: 44px;
  font: inherit; font-size: 13.5px; font-weight: 500;
  color: var(--ink); cursor: pointer;
}
.menu-toggle__bars {
  position: relative; width: 17px; height: 2px; flex: none;
  background: currentColor; border-radius: 2px;
}
.menu-toggle__bars::before, .menu-toggle__bars::after {
  content: ""; position: absolute; left: 0;
  width: 17px; height: 2px; background: currentColor; border-radius: 2px;
}
.menu-toggle__bars::before { top: -5px; }
.menu-toggle__bars::after { top: 5px; }

.sidebar__close {
  display: none;
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 40px; height: 40px;
  background: rgba(255,255,255,.08); color: #fff;
  border: 1px solid var(--shell-line); border-radius: 50%;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.sidebar__close:hover { background: rgba(255,255,255,.16); }

.scrim {
  position: fixed; inset: 0; z-index: 39;
  background: rgba(8, 29, 25, .55);
  backdrop-filter: blur(1px);
}

@media (max-width: 820px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    z-index: 40;
    width: min(84vw, 320px);
    flex-basis: min(84vw, 320px);
    height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 0 0 40px rgba(0,0,0,.35);
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .sidebar { transform: none; }
  .sidebar__close { display: grid; place-items: center; }
  .menu-toggle { display: inline-flex; }

  /* Bigger targets: a 13px link with 7px padding is not a thumb target. */
  .nav a { padding: 12px 12px; font-size: 14.5px; min-height: 44px; align-items: center; }
  .nav__group { padding: 16px 12px 8px; min-height: 44px; }
  .brand { padding-right: 58px; }

  .topbar {
    position: sticky; top: 0; z-index: 20;
    padding: 9px 12px;
    padding-top: calc(9px + env(safe-area-inset-top));
    gap: 10px;
  }
  .topbar__title small { font-size: 9.5px; }
  .topbar__title strong { font-size: 15px; }
  .topbar__tools { display: flex; gap: 6px; margin-left: auto; align-items: center; }
  .topbar__signout { display: none; }

  .content { padding: 14px 12px calc(60px + env(safe-area-inset-bottom)); }
  .field-row { grid-template-columns: 1fr; }
  dl.spec { grid-template-columns: 1fr; gap: 2px 0; }
  dl.spec dt { border-bottom: none; padding-bottom: 0; }
  dl.spec dd { padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }

  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desk__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Toolbars stack, and their controls go full width so they can be tapped. */
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .toolbar form { flex-direction: column; align-items: stretch; width: 100%; }
  .toolbar input, .toolbar select, .toolbar button, .toolbar .btn { width: 100%; }
  .toolbar > .btn { width: 100%; text-align: center; }

  /* Row after row of pills should scroll sideways rather than stack six deep. */
  .filter-row, .account-nav, .map-legend {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .filter-row::-webkit-scrollbar,
  .account-nav::-webkit-scrollbar,
  .map-legend::-webkit-scrollbar { display: none; }
  .filter-row a, .account-nav a, .map-toggle { flex: none; }

  .manual__body { padding: 22px 18px; }
  .manual__nav {
    display: flex; gap: 6px; overflow-x: auto; padding: 8px;
    scrollbar-width: none;
  }
  .manual__nav::-webkit-scrollbar { display: none; }
  .manual__nav a { flex: none; white-space: nowrap; }

  #map { height: 62vh; }
  .carousel__frame { aspect-ratio: 4 / 3; }
  .carousel__caption { padding: 70px 16px 16px; }
  .carousel__nav { width: 38px; height: 38px; }
  .account-head { padding: 18px 18px; }
  .account-figures { gap: 20px; }
}

/* Inputs below 16px make iOS zoom in on focus and never zoom back out. */
@media (max-width: 820px) {
  input, select, textarea { font-size: 16px; }
  .btn, button { min-height: 42px; }
  .btn--sm { min-height: 34px; }
}

/* ---------- Tables become cards ----------
   Below this width a seven-column table is unreadable however it is scrolled,
   so each row becomes a small stack of label-and-value pairs. The labels come
   from the table's own headings, applied by script, so no template had to
   change. */
@media (max-width: 640px) {
  .data--stackable thead { display: none; }
  .data--stackable, .data--stackable tbody,
  .data--stackable tr, .data--stackable td { display: block; width: auto; }
  .data--stackable tr {
    border-bottom: 1px solid var(--line);
    padding: 10px 2px 12px;
  }
  .data--stackable tr:last-child { border-bottom: 0; }
  .data--stackable td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
    border: 0; padding: 5px 12px; text-align: left;
  }
  .data--stackable td.num { text-align: right; }
  .data--stackable td::before {
    content: attr(data-label);
    flex: none; max-width: 45%;
    font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--ink-faint);
  }
  .data--stackable td:not([data-label]) { justify-content: flex-end; }
  .data--stackable td.empty { display: block; text-align: center; }
  .data--stackable td.empty::before { content: none; }
  .data--stackable tfoot { display: block; }
  .data--stackable tfoot td { font-weight: 600; }
  .table-wrap { overflow-x: visible; }
}

@media (max-width: 460px) {
  .stat-row, .desk__tiles { grid-template-columns: 1fr; }
  .hero { padding: 48px 18px 60px; }
  .section { padding: 40px 18px; }
  .card__head { flex-wrap: wrap; }
}

.nav__count--warn { color: var(--clay-soft, #e79a92); }

/* Stacked-table tidying, and shorter stat cards, on a phone. */
@media (max-width: 640px) {
  .data--stackable td {
    border-bottom: 1px solid var(--line-soft);
  }
  .data--stackable td:last-child { border-bottom: 0; }
  .data--stackable tr {
    border-bottom: 0;
    border-top: 3px solid var(--line);
    padding: 4px 0 8px;
  }
  .data--stackable tr:first-child { border-top: 0; }
  .data--stackable td.wrap-tight { align-items: flex-start; }
}

@media (max-width: 460px) {
  .stat { padding: 13px 15px; }
  .stat__value { font-size: 20px; }
  .stat__label { font-size: 10px; }
}

/* A folded group still has to show that something is waiting inside it —
   otherwise collapsing the menu hides the very thing it should surface. */
.nav__count--group { margin-left: auto; }
.nav__section:not(.is-collapsed) .nav__count--group { display: none; }
.is-collapsed .nav__count--group + .nav__chevron { margin-left: 8px; }

/* ==========================================================================
   Staff identity cards
   ==========================================================================
   Both faces are drawn at CR80 — 85.6 x 54 mm, the size of a bank card — so a
   printed sheet can be cut and laminated without rescaling.
   ========================================================================== */

.idcard-sheet { display: flex; gap: 14px; flex-wrap: wrap; }
.idcard {
  width: 85.6mm; height: 54mm;
  border: 1px solid var(--line);
  border-radius: 3mm;
  background: #fff;
  overflow: hidden;
  display: flex; flex-direction: column;
  font-size: 8.2pt; line-height: 1.3;
  color: var(--ink);
  page-break-inside: avoid;
  box-shadow: 0 2px 10px rgba(12, 42, 36, .12);
}
.idcard__band {
  background: var(--shell); color: #fff;
  padding: 2.4mm 3mm; display: flex; align-items: center; gap: 2.4mm;
  border-bottom: 1.2mm solid var(--gold);
}
.idcard__arms { height: 8mm; width: auto; }
.idcard__eyebrow {
  font-size: 5.6pt; letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
}
.idcard__assembly {
  font-family: var(--display); font-weight: 700; font-size: 8.4pt; line-height: 1.15;
}
.idcard__body { display: flex; gap: 3mm; padding: 3mm; flex: 1; }
.idcard__photo {
  width: 20mm; height: 25mm; flex: none;
  border: 0.4mm solid var(--line);
  border-radius: 1mm; overflow: hidden;
  background: var(--slate-wash);
  display: grid; place-items: center;
}
.idcard__photo img { width: 100%; height: 100%; object-fit: cover; }
.idcard__nophoto {
  font-size: 5.6pt; color: var(--ink-faint); text-align: center; letter-spacing: .04em;
}
.idcard__who { flex: 1; min-width: 0; }
.idcard__name {
  font-family: var(--display); font-weight: 700; font-size: 11pt;
  line-height: 1.1; letter-spacing: -.01em;
}
.idcard__role { color: var(--jade); font-weight: 600; font-size: 7.6pt; margin-bottom: 1.6mm; }
.idcard__who dl {
  display: grid; grid-template-columns: auto 1fr; gap: 0.5mm 2mm; margin: 0;
  font-size: 6.8pt;
}
.idcard__who dt { color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }
.idcard__who dd { margin: 0; font-family: var(--mono); }
.idcard__foot {
  background: var(--slate-wash); border-top: 1px solid var(--line-soft);
  padding: 1.6mm 3mm; display: flex; justify-content: space-between; align-items: center;
  font-size: 6.4pt;
}
.idcard__code { font-family: var(--mono); font-weight: 500; }
.idcard__motto { color: var(--ink-faint); font-style: italic; }

.idcard--back { padding: 3mm; }
/* The barcode spans the card and the verification line sits under it. Side by
   side, the barcode pushed the text off the edge at card size. */
.idcard__back-top { margin-bottom: 1.6mm; }
.idcard__barcode { width: 100%; }
.idcard__barcode svg { height: 9mm; width: 100%; display: block; }
.idcard__verify {
  font-size: 5.8pt; color: var(--ink-soft); line-height: 1.3;
  display: flex; justify-content: space-between; gap: 2mm;
  margin-top: 0.8mm;
}
.idcard__vcode { font-family: var(--mono); font-size: 8.4pt; letter-spacing: .08em; }
.idcard__back-details {
  display: grid; grid-template-columns: auto 1fr; gap: 0.6mm 2mm; margin: 0 0 2mm;
  font-size: 6.6pt;
}
.idcard__back-details dt { color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }
.idcard__back-details dd { margin: 0; }
.idcard__notice {
  font-size: 5.8pt; color: var(--ink-soft); line-height: 1.3;
  border-top: 1px solid var(--line-soft); padding-top: 1.4mm; flex: 1;
}
.idcard__sign {
  display: flex; justify-content: space-between; gap: 3mm;
  font-size: 5.6pt; color: var(--ink-faint);
}
.idcard__sign span {
  flex: 1; border-top: 0.3mm solid var(--ink); padding-top: 0.8mm; text-align: center;
}

@media print {
  .idcard { box-shadow: none; border: 0.3mm solid #999; }
  .idcard-sheet { gap: 6mm; }
}

/* Payslip */
.payslip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
@media (max-width: 620px) { .payslip-grid { grid-template-columns: 1fr; } }
.payslip-col { padding: 0; }
.payslip-col h3 {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); padding: 10px 14px 6px; margin: 0;
  border-bottom: 1px solid var(--line-soft);
}
.payslip-col + .payslip-col { border-left: 1px solid var(--line-soft); }
@media (max-width: 620px) { .payslip-col + .payslip-col { border-left: 0; border-top: 1px solid var(--line); } }
.payslip-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 5px 14px; font-size: 13px;
}
.payslip-row span:last-child { font-family: var(--mono); }
.payslip-row--total {
  border-top: 1px solid var(--line); font-weight: 600; margin-top: 4px; padding-top: 8px;
}
