/* Sugama Nyaya — pilot portal, shared styles. Load after tokens.css. */

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}
a { color: var(--navy); }
a:hover { color: var(--gold-dark); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1, h2 { font-family: var(--font-display); }
h1 { font-size: 1.55rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 0.95rem; font-weight: 600; }
p { margin: 0 0 0.9rem; }
.mono { font-family: var(--font-mono); font-size: 0.86em; }
.spacer { flex: 1; }
.text-muted { color: var(--muted); }

/* ---------- masthead ---------- */
.masthead {
  background: var(--surface);
  color: var(--ink);
  padding: 0 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  height: 66px;
  position: relative;
  box-shadow: 0 1px 0 var(--hairline);
}
.masthead::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 3px, transparent 3px 14px);
}
.wordmark { display: inline-flex; align-items: center; text-decoration: none; }
.wordmark img { height: 42px; display: block; }
.masthead .tagline {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  border-left: 1px solid var(--line-strong);
  padding-left: 1.1rem;
  white-space: nowrap;
}
.masthead__back { font-size: 0.78rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.lang-select {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0.35rem 0.5rem;
  font-family: inherit;
  font-size: 0.8rem;
  max-width: 130px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
}
.avatar--lg {
  width: 52px; height: 52px;
  background: var(--navy-soft);
  color: var(--navy);
  font-size: 1.1rem;
}

/* ---------- sub-nav ---------- */
.subnav {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  height: 44px;
  font-size: 0.83rem;
}
.subnav a { color: var(--muted); text-decoration: none; padding: 0.72rem 0; border-bottom: 3px solid transparent; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.76rem; }
.subnav a.active { color: var(--navy); border-bottom-color: var(--gold); }
.subnav .portal-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 700;
  margin-right: 0.4rem;
}

/* ---------- layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 1.8rem 1.4rem 4rem; }
.wrap.narrow { max-width: 760px; }
.wrap.reader { max-width: 720px; }
.wrap.wide { max-width: 1220px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: 0.88rem; margin-top: 0.25rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow);
  padding: 1.3rem 1.5rem;
}
.card + .card, .grid + .card { margin-top: 1.1rem; }
.card h2 { margin-bottom: 0.8rem; }
.card--tight { padding: 1rem; }
.grid { display: grid; gap: 1.1rem; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid.cols-profile { grid-template-columns: 320px 1fr; }
@media (max-width: 860px) { .grid.cols-2, .grid.cols-3, .grid.cols-profile { grid-template-columns: 1fr; } }

/* Small print used under cards, charts and forms */
.fine-print { font-size: 0.78rem; color: var(--muted); margin: 0.9rem 0 0; }
.fine-print--xs { font-size: 0.72rem; }
.note { font-size: 0.82rem; color: var(--muted); }
.chart-note { font-size: 0.75rem; color: var(--muted); margin: 0.6rem 0 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 0;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn.primary { background: var(--gold); color: var(--navy-dark); }
.btn.primary:hover { background: var(--gold-dark); color: var(--navy-dark); }
.btn.secondary { background: var(--surface); color: var(--navy); border-color: var(--navy); }
.btn.secondary:hover { background: var(--navy-soft); color: var(--navy); }
.btn.success { background: var(--ok); color: #fff; }
.btn.success:hover { background: #16603a; color: #fff; }
.btn.danger-outline { background: var(--surface); color: var(--bad); border-color: var(--bad); }
.btn.warn { background: #b47607; color: #fff; }
.btn.warn:hover { background: #9a6404; color: #fff; }
.btn.sm { font-size: 0.78rem; padding: 0.38rem 0.85rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.block { width: 100%; }

/* ---------- pills & chips ---------- */
.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.14rem 0.6rem;
  border-radius: 2px;
  white-space: nowrap;
}
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.warn { color: var(--warn); background: var(--warn-bg); }
.pill.bad { color: var(--bad); background: var(--bad-bg); }
.pill.info { color: var(--info); background: var(--info-bg); }
.pill.neutral { color: var(--muted); background: var(--surface-2); }
.chip-days {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.18rem 0.55rem;
  border-radius: 0;
  white-space: nowrap;
}
.chip-days.green { color: var(--ok); background: var(--ok-bg); }
.chip-days.amber { color: var(--warn); background: var(--warn-bg); }
.chip-days.red { color: var(--bad); background: var(--bad-bg); }
.chip-days.overdue { color: #fff; background: var(--bad); }

/* ---------- tables ---------- */
.table-card { padding: 0; overflow: hidden; }
.table-card table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.table-card th {
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  padding: 0.6rem 1rem;
  border-bottom: 2px solid var(--navy);
  white-space: nowrap;
}
.table-card td { padding: 0.68rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-card tr:last-child td { border-bottom: none; }
.table-card tr.rowlink { cursor: pointer; }
.table-card tr.rowlink:hover { background: var(--navy-soft); }
.table-card tr.dim { color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.bad { color: var(--bad); font-weight: 700; }

/* Key-value tables (case details, profiles, timelines) */
.kv { width: 100%; font-size: 0.88rem; border-collapse: collapse; }
.kv td { padding: 0.35rem 0; }
.kv td:first-child { color: var(--muted); padding-right: 1.2rem; white-space: nowrap; width: 1%; }
.kv--roomy td:first-child { padding-right: 2.6rem; }
.kv--sm { font-size: 0.83rem; }
.timeline { width: 100%; font-size: 0.87rem; border-collapse: collapse; }
.timeline td { padding: 0.4rem 0; }
.timeline td:first-child { color: var(--muted); width: 130px; }

/* ---------- forms ---------- */
label.fld { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.25rem; }
input[type=text], input[type=tel], input[type=date], select.fld-input, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0.55rem 0.7rem;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.form-field { margin-bottom: 0.8rem; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.1rem; margin-bottom: 0.9rem; }
@media (max-width: 700px) { .fld-row { grid-template-columns: 1fr; } }
.form-actions { display: flex; justify-content: flex-end; gap: 0.8rem; }

/* Inline filter bars (period / month / year pickers) */
.filters { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; }
.filters label.fld { margin: 0; }
.filters select.fld-input { width: auto; }
.filters--page { margin-bottom: 1.1rem; }

/* ---------- portal chooser (portal home) ---------- */
.chooser-hero { text-align: center; padding: 3.2rem 1rem 1rem; }
.chooser-hero h1 { font-family: var(--font-display); font-size: 2.1rem; }
.chooser-hero .lede { color: var(--muted); max-width: 560px; margin: 0.8rem auto 0; }
.portal-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; max-width: 1020px; margin: 2.4rem auto 0; padding: 0 1.2rem; }
@media (max-width: 900px) { .portal-cards { grid-template-columns: 1fr; } }
.portal-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 0; border-top: 4px solid var(--gold);
  box-shadow: var(--shadow); padding: 1.7rem 1.6rem; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 0.5rem; transition: transform 0.12s, box-shadow 0.12s;
}
.portal-card:hover { transform: translateY(-3px); box-shadow: 0 6px 0 var(--gold); }
.portal-card__ico {
  width: 44px; height: 44px; border-radius: 0;
  background: var(--gold); color: var(--navy-dark);
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
}
.portal-card h2 { font-size: 1.05rem; }
.portal-card p { color: var(--muted); font-size: 0.85rem; margin: 0; flex: 1; }
.portal-card .go { color: var(--navy); font-weight: 700; font-size: 0.85rem; }
.pilot-line { text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 2.6rem; }

/* ---------- login ---------- */
.login-shell { min-height: calc(100vh - 66px); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.login-card { width: 400px; max-width: 100%; border-top: 4px solid var(--gold); }
.login-card .portal-tag {
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-dark); font-weight: 700; margin-bottom: 0.5rem;
}
.login-card .intro { color: var(--muted); font-size: 0.88rem; }
.login-card .btn { margin-top: 0.3rem; }
.login-note { font-size: 0.78rem; color: var(--muted); margin-top: 0.9rem; }

/* ---------- applicant: application list ---------- */
.app-card { display: flex; align-items: center; gap: 1.2rem; }
.app-card .a-body { flex: 1; }
.app-card .a-title { font-weight: 700; }
.app-card .a-meta { font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; }

/* ---------- applicant: petition wizard ---------- */
.heir-row, .asset-row { display: grid; grid-template-columns: 2fr 1.4fr 1fr; gap: 0.7rem; margin-bottom: 0.6rem; }
.asset-row { grid-template-columns: 1.4fr 2fr 1fr; }
@media (max-width: 700px) { .heir-row, .asset-row { grid-template-columns: 1fr; } }

/* ---------- upload checklist ---------- */
.slot {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0.4rem;
  border-bottom: 1px dashed var(--line-strong);
}
.slot:last-child { border-bottom: none; }
.slot .slot-ico {
  width: 34px; height: 34px; border-radius: 0; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700;
  font-size: 1rem; background: var(--surface-2); color: var(--muted);
}
.slot.done .slot-ico { background: var(--ok-bg); color: var(--ok); }
.slot.error .slot-ico { background: var(--bad-bg); color: var(--bad); }
.slot .slot-body { flex: 1; min-width: 0; }
.slot .slot-title { font-weight: 600; font-size: 0.9rem; }
.slot .slot-hint { font-size: 0.76rem; color: var(--muted); }
.slot .slot-status { font-size: 0.78rem; margin-top: 0.15rem; }
.slot .slot-status.good { color: var(--ok); font-weight: 600; }
.slot .slot-status.err { color: var(--bad); font-weight: 600; }
.slot .req-tag { font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-dark); }
.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--line-strong); border-top-color: var(--navy);
  display: inline-block; vertical-align: -3px; margin-right: 0.4rem;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Submit gate below a checklist */
.submit-bar { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; }
.submit-bar--inline { margin-top: 1rem; }
.submit-bar .count { font-weight: 700; }
.submit-bar .count--sub { font-weight: 400; font-size: 0.8rem; color: var(--muted); }

/* ---------- tracker ---------- */
.stepper { display: flex; gap: 0; margin: 1.2rem 0 1.5rem; }
.step { flex: 1; text-align: center; position: relative; font-size: 0.8rem; color: var(--muted); }
.step .dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-2); border: 2px solid var(--line-strong);
  margin: 0 auto 0.4rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; color: var(--muted);
  position: relative; z-index: 1;
}
.step::before {
  content: ""; position: absolute; top: 13px; left: -50%; width: 100%;
  height: 2px; background: var(--line-strong);
}
.step:first-child::before { display: none; }
.step .step-date { font-weight: 400; }
.step.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.done { color: var(--ok); font-weight: 600; }
.step.current .dot { background: var(--navy); border-color: var(--navy); color: #fff; }
.step.current { color: var(--navy); font-weight: 700; }
.step.warn-state .dot { background: var(--warn); border-color: var(--warn); color: #fff; }
.step.warn-state { color: var(--warn); font-weight: 700; }
.clock-band {
  display: flex; align-items: center; gap: 1.4rem;
  background: var(--navy-soft); border: 1px solid #c3d3ea; border-left: 4px solid var(--gold);
  border-radius: 0; padding: 1rem 1.4rem;
}
.clock-num {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1;
  white-space: nowrap;
}
.clock-num .of { font-size: 1rem; color: var(--muted); }
.clock-meta { flex: 1; font-size: 0.85rem; color: var(--ink); }
.clock-meta b { color: var(--navy); }
.progressbar { height: 7px; border-radius: 0; background: #c3d3ea; overflow: hidden; margin-top: 0.5rem; }
.progressbar .fill { height: 100%; background: var(--navy); border-radius: 0; }

/* Decision text quoted back to the applicant */
.authority-note { border-left: 3px solid var(--warn); padding: 0.2rem 0 0.2rem 1rem; font-size: 0.92rem; }
.authority-note .sig { margin-bottom: 0; color: var(--muted); font-size: 0.8rem; }

/* ---------- confirmation page ---------- */
.wrap.confirm { max-width: 640px; text-align: center; padding-top: 3.5rem; }
.confirm-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--ok-bg); color: var(--ok); font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.2rem;
}
.confirm-lede { color: var(--muted); margin-top: 0.6rem; }
.confirm-card { text-align: left; margin-top: 1.6rem; }
.wrap.confirm .note { margin-top: 1.1rem; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 0.2rem; border-bottom: 2px solid var(--line); margin-bottom: 1.1rem; }
.tab {
  font-family: inherit; font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.03em;
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 0.6rem 1.1rem;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tab.active { color: var(--navy); border-bottom-color: var(--gold); }
.tab .count {
  font-size: 0.7rem; background: var(--surface-2); border-radius: 2px;
  padding: 0.05rem 0.5rem; margin-left: 0.3rem; color: var(--muted);
}
.tab.active .count { background: var(--navy-soft); color: var(--navy); }
.tabpane { display: none; }
.tabpane.active { display: block; }

/* ---------- review 3-pane ---------- */
.review-grid { display: grid; grid-template-columns: 280px 1fr 330px; gap: 1.1rem; align-items: start; }
@media (max-width: 1080px) { .review-grid { grid-template-columns: 1fr; } }
.case-summary { font-size: 0.85rem; }
.case-summary p { margin-bottom: 0.5rem; }
.case-summary p:last-child { margin-bottom: 0; }
.doc-viewer { display: grid; grid-template-columns: 210px 1fr; gap: 0.9rem; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li {
  padding: 0.5rem 0.65rem; border-radius: 0; cursor: pointer;
  font-size: 0.82rem; display: flex; justify-content: space-between; gap: 0.5rem;
  align-items: center;
  border-left: 3px solid transparent;
}
.doc-list li:hover { background: var(--surface-2); }
.doc-list li.sel { background: var(--navy-soft); color: var(--navy); font-weight: 600; border-left-color: var(--gold); }
.doc-list .dtype { font-size: 0.66rem; color: var(--muted); font-weight: 400; white-space: nowrap; }
.specimen {
  background: #fdfdfb; border: 1px solid var(--line-strong); border-radius: 0;
  min-height: 430px; padding: 2rem 2.2rem; position: relative; overflow: hidden;
  font-family: var(--font-mono); font-size: 0.78rem; color: #414f5e;
}
.specimen .doc-head { text-align: center; font-weight: 700; font-size: 0.9rem; color: var(--ink); margin-bottom: 1.4rem; letter-spacing: 0.06em; }
.specimen table { width: 100%; font-size: 0.76rem; border-collapse: collapse; }
.specimen td { padding: 0.3rem 0.4rem; border-bottom: 1px dotted var(--line-strong); }
.specimen td:first-child { color: var(--muted); width: 42%; }
.specimen .flag { margin-top: 1rem; color: var(--bad); }

/* ---------- AI panel ---------- */
.ai-panel { border: 1px solid var(--line); border-radius: 0; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.ai-panel .ai-head {
  padding: 0.8rem 1.1rem; display: flex; align-items: center; gap: 0.55rem;
  border-bottom: 2px solid var(--navy); background: var(--surface-2);
  font-weight: 700; font-size: 0.88rem;
}
.ai-head .hint { font-weight: 400; color: var(--muted); font-size: 0.75rem; }
.ai-verdict { padding: 1rem 1.1rem; }
.ai-verdict.grantable { border-left: 4px solid var(--ok); }
.ai-verdict.notgrantable { border-left: 4px solid var(--bad); }
.ai-verdict .summary { font-size: 0.82rem; margin: 0.7rem 0 0; }
.ai-check { list-style: none; margin: 0.6rem 0 0; padding: 0; font-size: 0.82rem; }
.ai-check li { padding: 0.32rem 0; display: flex; gap: 0.5rem; align-items: flex-start; }
.ai-check .tick { color: var(--ok); font-weight: 700; flex-shrink: 0; }
.ai-check .cross { color: var(--bad); font-weight: 700; flex-shrink: 0; }
.ai-analysing { padding: 2.2rem 1.1rem; text-align: center; color: var(--muted); font-size: 0.85rem; }
.decision-bar { padding: 1rem 1.1rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.6rem; }
.advisory-note { font-size: 0.72rem; color: var(--muted); }

/* ---------- modal ---------- */
.modal-back {
  display: none; position: fixed; inset: 0; background: rgba(22, 41, 79, 0.55);
  z-index: 50; align-items: center; justify-content: center; padding: 1rem;
}
.modal-back.open { display: flex; }
.modal {
  background: var(--surface); border-radius: 0; border-top: 4px solid var(--gold);
  width: 520px; max-width: 100%;
  padding: 1.5rem 1.7rem; box-shadow: 0 8px 0 rgba(22, 41, 79, 0.25);
  max-height: 90vh; overflow-y: auto;
}
.modal h2 { margin-bottom: 0.7rem; }
.modal .lede { font-size: 0.88rem; }
.modal .hint { font-size: 0.85rem; color: var(--muted); }
.modal .modal-actions { display: flex; gap: 0.7rem; justify-content: flex-end; margin-top: 1.2rem; }
.stamp-preview {
  border: 1px dashed var(--line-strong); border-radius: 0; background: var(--surface-2);
  padding: 0.8rem 1rem; font-size: 0.8rem; margin-top: 0.9rem;
}

/* ---------- KPI band ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.9rem; margin-bottom: 1.2rem; }
.kpis.cols-5 { grid-template-columns: repeat(5, 1fr); }
.kpis.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .kpis, .kpis.cols-5, .kpis.cols-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .kpis, .kpis.cols-5, .kpis.cols-4 { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 0; padding: 0.9rem 1rem; box-shadow: var(--shadow); }
.kpi .k-label { font-size: 0.66rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.kpi .k-num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin: 0.15rem 0; font-variant-numeric: tabular-nums; color: var(--ink); }
.kpi .k-num.bad-num { color: var(--bad); }
.kpi .k-delta { font-size: 0.72rem; font-weight: 600; }
.k-delta.up { color: var(--ok); }
.k-delta.down { color: var(--bad); }
.k-delta.flat { color: var(--muted); }

/* ---------- tile map ---------- */
.tilemap { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; max-width: 560px; }
.tile {
  aspect-ratio: 1; border-radius: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 700; color: #fff; cursor: default;
  font-family: var(--font-mono);
}
.tile.empty { background: transparent; }
.tile.d1, .sw.d1 { background: #7fb394; }
.tile.d2, .sw.d2 { background: #d9b45c; }
.tile.d2 { color: #4a3a08; }
.tile.d3, .sw.d3 { background: #c96a5b; }
.tile.d4, .sw.d4 { background: #a93e31; }
.tile.click { cursor: pointer; outline: 2px solid var(--gold); outline-offset: 1px; }
.tile.click:hover { transform: scale(1.06); }
.map-legend { display: flex; gap: 1rem; font-size: 0.72rem; color: var(--muted); margin-top: 0.8rem; flex-wrap: wrap; }
.map-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 0; vertical-align: -1px; margin-right: 0.3rem; }

/* ---------- charts ---------- */
.chart-svg { width: 100%; height: auto; display: block; }
.chart-title { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.6rem; }

/* ---------- officer profile ---------- */
.profile-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.profile-head h1 { font-size: 1.15rem; }
.profile-head .role { font-size: 0.8rem; color: var(--muted); }

/* ---------- misc ---------- */
.header-strip {
  display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap;
  background: var(--navy); color: #fff; border: none; border-radius: 0;
  padding: 0.8rem 1.3rem; margin-bottom: 1.2rem; box-shadow: var(--shadow);
  font-size: 0.85rem;
}
.header-strip b { font-variant-numeric: tabular-nums; color: var(--gold); }
.header-strip .meta { color: var(--muted); font-size: 0.78rem; }
.divider-dot { color: rgba(217, 228, 245, 0.5); }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--navy-dark); color: #fff; font-size: 0.84rem;
  padding: 0.65rem 1.2rem; border-radius: 0; border-left: 4px solid var(--gold); z-index: 90;
  opacity: 0; transition: opacity 0.25s; pointer-events: none;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; }
.banner {
  border-radius: 0; padding: 0.85rem 1.1rem; font-size: 0.87rem; margin-bottom: 1.1rem;
  border: 1px solid; border-left-width: 4px;
}
.banner.info { background: var(--info-bg); border-color: #c3d3ea; border-left-color: var(--navy); color: var(--navy-dark); }
.banner.warn { background: var(--warn-bg); border-color: #e4cd9a; border-left-color: var(--warn); color: #6b4700; }
.banner.ok { background: var(--ok-bg); border-color: #bcdcc8; border-left-color: var(--ok); color: var(--ok); }
.banner.flush { margin-bottom: 0; }
.crumbs { font-size: 0.8rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }
.footer-note {
  text-align: center; font-size: 0.72rem; color: var(--muted);
  padding: 2rem 1rem 2.5rem;
}
