/* NIC AP · Document Intelligence Platform
   Visual language follows the NIC AP State Centre portal (S3WaaS / GIGW):
   indigo #29136C, Noto Sans, white canvas with grey bands, underline navigation. */

@font-face { font-family: "Noto Sans"; src: url("/fonts/NotoSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("/fonts/NotoSans-Bold.ttf") format("truetype"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Noto Sans Telugu"; src: url("/fonts/NotoSansTelugu.ttf") format("truetype"); font-weight: 400; font-display: swap; unicode-range: U+0C00-0C7F, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Telugu"; src: url("/fonts/NotoSansTelugu-Bold.ttf") format("truetype"); font-weight: 600 800; font-display: swap; unicode-range: U+0C00-0C7F, U+200C-200D, U+25CC; }

:root {
  --indigo: #29136C;
  --indigo-700: #3A1F8C;
  --indigo-500: #5B3FB5;
  --indigo-100: #E9E4F6;
  --indigo-50: #F5F3FB;
  --band: #ECECEC;
  --ink: #150202;
  --ink-2: #3D3550;
  --muted: #6B6580;
  --line: #DCD8E6;
  --line-soft: #ECE9F3;
  --paper: #FFFFFF;
  --canvas: #FAFAFC;
  --saffron: #FF9933;
  --green-flag: #138808;
  --ok: #17784A;   --ok-bg: #E5F4EC;
  --warn: #9A5B00; --warn-bg: #FFF2DB;
  --bad: #B42318;  --bad-bg: #FDECEA;
  --info: #1F5FA8; --info-bg: #E6EFFA;
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 14px;
  --shadow: 0 1px 2px rgba(41, 19, 108, .06), 0 4px 16px rgba(41, 19, 108, .06);
  --font: "Noto Sans", "Noto Sans Telugu", "Nirmala UI", "Gautami", system-ui, sans-serif;
  --fs: 1rem;
  color-scheme: light;
}
html { font-size: 15px; }
html.fs-sm { font-size: 13.5px; }
html.fs-lg { font-size: 17px; }

/* High-contrast mode (GIGW accessibility requirement) */
html.hc {
  --indigo: #000; --indigo-700: #000; --indigo-500: #000; --indigo-100: #FFF; --indigo-50: #FFF;
  --ink: #000; --ink-2: #000; --muted: #000; --line: #000; --line-soft: #000; --band: #FFF; --canvas: #FFF;
}
html.hc body { background: #fff; }
html.hc a, html.hc .nav a.active { color: #00e !important; text-decoration: underline; }
html.hc .btn-primary { background: #000; color: #ff0; }
html.hc .site-footer { background: #000; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--canvas); line-height: 1.55; -webkit-font-smoothing: antialiased; }
:lang(te), .te { font-family: "Noto Sans Telugu", "Nirmala UI", "Gautami", var(--font); line-height: 1.75; }
a { color: var(--indigo-700); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--indigo); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
.container { width: min(1320px, 100% - 32px); margin-inline: auto; }

/* ---------------------------------------------------------------- GIGW top strip */
.gov-strip { background: #fff; border-bottom: 1px solid var(--line); font-size: .82rem; }
.gov-strip .container { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.flag { width: 26px; height: 16px; display: inline-grid; grid-template-rows: 1fr 1fr 1fr; border: 1px solid #ddd; flex: none; }
.flag i:nth-child(1) { background: var(--saffron); } .flag i:nth-child(2) { background: #fff; } .flag i:nth-child(3) { background: var(--green-flag); }
.gov-strip .ministry { color: var(--ink-2); }
.gov-strip .tools { margin-left: auto; display: flex; align-items: stretch; height: 36px; }
.gov-strip .tools > * { border-left: 1px solid var(--line); display: flex; align-items: center; padding: 0 10px; background: none; border-top: 0; border-bottom: 0; border-right: 0; cursor: pointer; color: var(--ink-2); font-size: .8rem; text-decoration: none; }
.gov-strip .tools > *:last-child { border-right: 1px solid var(--line); }
.gov-strip .tools button:hover, .gov-strip .tools a:hover { background: var(--indigo-50); color: var(--indigo); }
.gov-strip .tools button[aria-pressed="true"] { color: var(--indigo); font-weight: 600; }
.gov-strip select { border: 0; background: transparent; cursor: pointer; }

/* ---------------------------------------------------------------- identity header */
.site-header { background: #fff; }
.identity { display: flex; align-items: center; gap: 18px; padding: 16px 0 14px; }
.mark { width: 58px; height: 58px; flex: none; }
.identity .titles { line-height: 1.25; }
.identity .t1 { font-size: 1.05rem; color: var(--ink); }
.identity .t2 { font-size: 1.02rem; font-weight: 700; color: #000; }
.identity .t3 { font-size: 1.1rem; color: var(--ink); }
.identity .t3 .te { font-size: .95rem; color: var(--muted); margin-left: 6px; }
.identity .right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.poc-tag { border: 1.5px solid var(--indigo); color: var(--indigo); border-radius: 999px; padding: 2px 10px; font-size: .75rem; font-weight: 600; }
.nic-word { font-weight: 800; color: var(--indigo-500); letter-spacing: -1px; font-size: 2.1rem; line-height: 1; display: flex; align-items: center; gap: 6px; }
.nic-word small { font-size: .55rem; letter-spacing: 0; font-weight: 600; line-height: 1.15; color: var(--indigo-500); }
.officer { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--ink-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--indigo); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }

.search-row { padding-bottom: 16px; }
.searchbar { display: flex; align-items: center; border: 1px solid var(--indigo); border-bottom-width: 4px; border-radius: var(--radius-m); background: #fff; padding: 0 6px 0 16px; }
.searchbar input { flex: 1; border: 0; padding: 12px 0; outline: none; background: transparent; font-size: 1rem; }
.searchbar button { border: 0; background: none; cursor: pointer; padding: 8px; color: var(--indigo); display: grid; place-items: center; }
.search-results { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow); max-height: 420px; overflow: auto; }
.search-results a { display: block; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); }
.search-results a:hover, .search-results a:focus { background: var(--indigo-50); }
.search-results .meta { font-size: .78rem; color: var(--muted); }

/* ---------------------------------------------------------------- navigation */
.nav { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.nav .container { display: flex; align-items: center; }
.nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav ul::-webkit-scrollbar { display: none; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 13px 12px 11px; color: var(--ink); text-decoration: none; font-size: .93rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.nav a svg { width: 17px; height: 17px; opacity: .75; }
.nav a:hover { color: var(--indigo); background: var(--indigo-50); }
.nav a.active { color: var(--indigo); border-bottom-color: var(--indigo); font-weight: 600; }
.nav a.active svg { opacity: 1; }
.nav .status-pill { margin-left: 10px; flex: none; }

/* ---------------------------------------------------------------- page band */
.page-band { background: var(--band); border-bottom: 1px solid #e2e2e2; }
.page-band .container { display: flex; align-items: flex-end; gap: 20px; padding: 22px 0 20px; flex-wrap: wrap; }
.crumbs { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.page-title { margin: 0; font-size: 1.75rem; font-weight: 600; color: var(--indigo); line-height: 1.2; }
.page-title .te { display: block; font-size: 1rem; font-weight: 400; color: var(--ink-2); margin-top: 2px; }
.page-band .lead { color: var(--ink-2); margin: 6px 0 0; max-width: 72ch; font-size: .95rem; }
.page-band .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.fr-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; color: var(--indigo); background: #fff; border: 1px solid var(--indigo-100); border-radius: 999px; padding: 2px 10px; vertical-align: middle; margin-left: 8px; }

main { min-height: 60vh; padding: 24px 0 56px; }

/* ---------------------------------------------------------------- primitives */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 14px; border-radius: var(--radius-s); cursor: pointer; font-size: .9rem; font-weight: 500; text-decoration: none; transition: background .12s, border-color .12s; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: var(--indigo-500); color: var(--indigo); }
.btn-primary { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-700); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 5px 10px; font-size: .82rem; }
.btn-danger:hover { border-color: var(--bad); color: var(--bad); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { border: 1px solid transparent; background: none; padding: 6px; border-radius: var(--radius-s); cursor: pointer; display: inline-grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { background: var(--indigo-50); color: var(--indigo); }
.icon-btn svg { width: 18px; height: 18px; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.panel-h h2, .panel-h h3 { margin: 0; font-size: 1.02rem; font-weight: 600; color: var(--indigo); }
.panel-h .sub { color: var(--muted); font-size: .82rem; }
.panel-h .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.panel-b { padding: 18px; }
.panel-b.tight { padding: 0; }

.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.g-side-l { grid-template-columns: 300px minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .85em; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--indigo-50); color: var(--indigo); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.info { background: var(--info-bg); color: var(--info); }
.chip.plain { background: #f1f1f4; color: var(--ink-2); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; background: #fff; text-decoration: none; }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.status-pill.degraded .dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }

label.field, div.field { display: flex; flex-direction: column; gap: 5px; font-size: .84rem; color: var(--ink-2); font-weight: 500; }
.input, select.input, textarea.input { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; background: #fff; width: 100%; }
.input:focus { border-color: var(--indigo-500); outline: 2px solid var(--indigo-100); }
textarea.input { resize: vertical; min-height: 90px; }
.hint { font-size: .78rem; color: var(--muted); font-weight: 400; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 7px 13px; cursor: pointer; font-size: .85rem; border-right: 1px solid var(--line); color: var(--ink-2); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--indigo); color: #fff; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: .88rem; user-select: none; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 999px; background: #cfcbd9; position: relative; cursor: pointer; transition: background .15s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--indigo); }
.switch input:checked::after { left: 18px; }

.lang-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.lang-chips label { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: .85rem; background: #fff; }
.lang-chips input { position: absolute; opacity: 0; pointer-events: none; }
.lang-chips label:has(input:checked) { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.lang-chips label:has(input:focus-visible) { outline: 3px solid var(--saffron); }

/* tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th { text-align: left; font-weight: 600; color: var(--ink-2); background: var(--indigo-50); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: .8rem; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data tr:hover td { background: #fcfbff; }
table.data tr.selected td { background: var(--indigo-50); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data a { text-decoration: none; font-weight: 500; }
table.data a:hover { text-decoration: underline; }

/* meters */
.meter { height: 6px; background: #ece9f3; border-radius: 99px; overflow: hidden; min-width: 60px; }
.meter > i { display: block; height: 100%; background: var(--indigo-500); border-radius: 99px; }
.meter.ok > i { background: var(--ok); } .meter.warn > i { background: #D88A0B; } .meter.bad > i { background: var(--bad); }
.conf { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-size: .82rem; }
.conf .meter { width: 70px; }

/* dropzone */
.dropzone { border: 2px dashed #c6bfdc; border-radius: var(--radius-m); background: var(--indigo-50); padding: 30px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; position: relative; }
.dropzone:hover, .dropzone.drag { border-color: var(--indigo); background: #EEEAF8; }
.dropzone .dz-icon { width: 46px; height: 46px; margin: 0 auto 8px; color: var(--indigo); }
.dropzone strong { color: var(--indigo); font-size: 1.05rem; display: block; }
.dropzone .formats { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.samples { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.sample-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-s); padding: 6px 10px; cursor: pointer; font-size: .8rem; text-align: left; }
.sample-btn:hover { border-color: var(--indigo-500); }
.sample-btn svg { width: 16px; height: 16px; color: var(--indigo-500); flex: none; }

/* job progress */
.jobs { display: flex; flex-direction: column; gap: 8px; }
.job { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; background: #fff; }
.job .row { gap: 8px; }
.job .title { font-weight: 500; font-size: .88rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job .msg { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.job .meter { margin-top: 6px; height: 5px; }
.job.running .meter > i { background: linear-gradient(90deg, var(--indigo-500), #8C74D6, var(--indigo-500)); background-size: 200% 100%; animation: flow 1.4s linear infinite; }
@keyframes flow { to { background-position: -200% 0; } }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px 9px; cursor: pointer; color: var(--ink-2); border-bottom: 3px solid transparent; font-size: .9rem; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--indigo); border-bottom-color: var(--indigo); font-weight: 600; }
.tabs button:hover { color: var(--indigo); }

/* empty state */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 42px; height: 42px; color: #b9b1d3; margin-bottom: 6px; }
.empty h3 { color: var(--ink-2); margin: 4px 0; font-size: 1rem; }

/* toast & modal */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: var(--radius-s); font-size: .88rem; box-shadow: 0 8px 24px rgba(0,0,0,.18); max-width: 380px; display: flex; gap: 10px; align-items: flex-start; animation: tin .2s ease-out; }
.toast.ok { background: #0F5A37; } .toast.bad { background: #8C1C13; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
.modal-back { position: fixed; inset: 0; background: rgba(21, 8, 50, .55); z-index: 150; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: var(--radius-l); width: min(1100px, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.modal-h h2 { margin: 0; font-size: 1.05rem; color: var(--indigo); }
.modal-b { padding: 20px; overflow: auto; }

/* ---------------------------------------------------------------- dashboard */
.hero { background: var(--indigo); color: #fff; border-radius: var(--radius-l); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); position: relative; }
.hero .copy { padding: 34px 36px; position: relative; z-index: 1; }
.hero h1 { margin: 0; font-size: 2.05rem; line-height: 1.18; font-weight: 600; max-width: 22ch; }
.hero .te-line { font-size: 1.15rem; opacity: .85; margin: 10px 0 0; }
.hero p.lead { opacity: .85; max-width: 56ch; margin: 14px 0 22px; }
.hero .btn { border-color: rgba(255,255,255,.4); background: transparent; color: #fff; }
.hero .btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.hero .btn-primary { background: #fff; color: var(--indigo); border-color: #fff; }
.hero .btn-primary:hover { background: var(--indigo-100); color: var(--indigo); }
.hero .visual { position: relative; min-height: 300px; display: grid; place-items: center; padding: 24px; background: radial-gradient(120% 90% at 80% 20%, #4A2CA8 0%, transparent 60%); }
.scan-doc { width: 230px; aspect-ratio: 1 / 1.35; background: #fbfaf6; border-radius: 4px; box-shadow: 0 20px 40px rgba(0,0,0,.35); position: relative; overflow: hidden; transform: rotate(-3deg); padding: 18px 16px; color: #2a2346; }
.scan-doc .l { height: 6px; background: #d9d4e6; border-radius: 3px; margin: 7px 0; }
.scan-doc .te-text { font-size: .62rem; line-height: 1.6; color: #3b3360; }
.scan-doc .hl { background: rgba(255, 153, 51, .35); border-radius: 2px; }
.scan-line { position: absolute; left: 0; right: 0; height: 36px; top: -40px; background: linear-gradient(180deg, transparent, rgba(255,153,51,.35) 70%, rgba(255,153,51,.9) 72%, transparent 74%); animation: scan 3.2s cubic-bezier(.5,0,.5,1) 1s 2 both; }
@keyframes scan { 0% { top: -40px; } 100% { top: 105%; } }
.field-pop { position: absolute; background: #fff; color: var(--ink); border-radius: 6px; padding: 7px 10px; font-size: .75rem; box-shadow: 0 10px 30px rgba(0,0,0,.3); display: flex; flex-direction: column; min-width: 150px; opacity: 0; animation: pop .4s ease-out forwards; }
.field-pop b { color: var(--indigo); font-size: .82rem; }
.field-pop span { color: var(--muted); font-size: .68rem; }
.field-pop.f1 { right: 7%; top: 18%; animation-delay: 2.2s; }
.field-pop.f2 { left: 6%; top: 52%; animation-delay: 3.1s; }
.field-pop.f3 { right: 10%; bottom: 12%; animation-delay: 4s; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }

.news-band { display: flex; background: var(--band); border-radius: var(--radius-m); overflow: hidden; align-items: stretch; }
.news-band .lbl { padding: 14px 22px; font-size: 1.15rem; border-right: 1px solid #d4d4d4; display: flex; align-items: center; white-space: nowrap; }
.news-band .feed { padding: 12px 20px; display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; font-size: .93rem; }
.news-band .feed span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; }
.kpi { padding: 16px 18px; border-right: 1px solid var(--line-soft); }
.kpi:last-child { border-right: 0; }
.kpi .v { font-size: 1.75rem; font-weight: 600; color: var(--indigo); font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .k { font-size: .82rem; color: var(--ink-2); }
.kpi .s { font-size: .74rem; color: var(--muted); }

.cap-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; overflow: hidden; }
.cap { padding: 18px; border-right: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; transition: background .12s; }
.cap:last-child { border-right: 0; }
.cap:hover { background: var(--indigo-50); }
.cap .ic { width: 38px; height: 38px; border-radius: 9px; background: var(--indigo-100); color: var(--indigo); display: grid; place-items: center; }
.cap .ic svg { width: 20px; height: 20px; }
.cap h3 { margin: 4px 0 0; font-size: .98rem; color: var(--indigo); }
.cap .te { font-size: .82rem; color: var(--muted); line-height: 1.4; }
.cap p { margin: 0; font-size: .83rem; color: var(--ink-2); }
.cap .fr { font-size: .72rem; font-weight: 600; color: var(--muted); }

.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 40px; gap: 10px; align-items: center; font-size: .85rem; }
.bar-row .track { height: 10px; background: #efecf6; border-radius: 99px; overflow: hidden; }
.bar-row .track i { display: block; height: 100%; background: var(--indigo-500); border-radius: 99px; }
.bar-row .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.legend { display: flex; flex-direction: column; gap: 7px; font-size: .85rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }
.engine-list { display: flex; flex-direction: column; }
.engine { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: .86rem; }
.engine:last-child { border-bottom: 0; }
.engine .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; background: #c9c4d6; }
.engine.on .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.engine .d { font-size: .76rem; color: var(--muted); }
.stack-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: #efecf6; }
.stack-bar i { display: block; height: 100%; }

/* ---------------------------------------------------------------- studio / viewer */
.viewer { display: grid; grid-template-columns: 120px minmax(0, 1fr) 420px; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; min-height: 72vh; overflow: hidden; }
.thumbs { border-right: 1px solid var(--line); background: var(--canvas); overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; max-height: 80vh; }
.thumbs button { border: 2px solid transparent; padding: 0; background: #fff; cursor: pointer; border-radius: 4px; position: relative; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.thumbs button[aria-current="true"] { border-color: var(--indigo); }
.thumbs img { display: block; width: 100%; border-radius: 2px; }
.thumbs .pn { position: absolute; bottom: 3px; right: 3px; background: var(--indigo); color: #fff; font-size: .68rem; border-radius: 3px; padding: 0 5px; }
.stage { display: flex; flex-direction: column; min-width: 0; background: #F0EFF4; }
.stage-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.stage-canvas { flex: 1; overflow: auto; padding: 18px; display: flex; justify-content: center; align-items: flex-start; max-height: 74vh; }
.page-img { position: relative; box-shadow: 0 4px 18px rgba(0,0,0,.18); background: #fff; transform-origin: top center; }
.page-img img { display: block; width: 100%; }
.page-img .wb { position: absolute; border: 1.5px solid; border-radius: 2px; pointer-events: auto; }
.page-img .wb:hover::after { content: attr(data-t); position: absolute; left: 0; top: 100%; background: var(--ink); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 3px; white-space: nowrap; z-index: 2; }
.page-img .wb.hi { border-color: rgba(23,120,74,.65); background: rgba(23,120,74,.06); }
.page-img .wb.mid { border-color: rgba(216,138,11,.8); background: rgba(216,138,11,.1); }
.page-img .wb.lo { border-color: rgba(180,35,24,.85); background: rgba(180,35,24,.12); }
.page-img .wb.ev { border: 2px solid var(--saffron); background: rgba(255,153,51,.25); }
.side { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; max-height: 80vh; }
.side .tabs { padding: 0 8px; }
.side-body { padding: 16px; overflow-y: auto; flex: 1; }
.text-out { white-space: pre-wrap; font-size: .92rem; line-height: 1.7; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; min-height: 300px; background: #fff; }
textarea.text-out { width: 100%; resize: vertical; font: inherit; }
.gauge { display: flex; align-items: center; gap: 16px; }
.gauge svg { width: 96px; height: 96px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: .86rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.issue-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.issue-list li { display: flex; gap: 8px; align-items: center; font-size: .86rem; }
.issue-list svg { width: 15px; height: 15px; flex: none; }
.callout { border-left: 3px solid var(--indigo-500); background: var(--indigo-50); padding: 10px 14px; border-radius: 0 var(--radius-s) var(--radius-s) 0; font-size: .86rem; }
.callout.warn { border-color: #D88A0B; background: var(--warn-bg); }
.callout.ok { border-color: var(--ok); background: var(--ok-bg); }

/* ---------------------------------------------------------------- extraction */
.seg-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-tab { border: 1px solid var(--line); background: #fff; border-radius: var(--radius-m); padding: 10px 14px; cursor: pointer; text-align: left; min-width: 200px; }
.seg-tab[aria-selected="true"] { border-color: var(--indigo); box-shadow: inset 0 0 0 1px var(--indigo); background: var(--indigo-50); }
.seg-tab b { display: block; color: var(--indigo); font-size: .92rem; }
.seg-tab span { font-size: .78rem; color: var(--muted); }
.field-input { border: 1px solid transparent; background: transparent; padding: 5px 7px; border-radius: 3px; width: 100%; min-width: 180px; }
.field-input:hover { border-color: var(--line); }
.field-input:focus { border-color: var(--indigo-500); background: #fff; outline: 2px solid var(--indigo-100); }
.field-input.edited { background: var(--info-bg); }
.evidence { font-size: .76rem; color: var(--muted); margin-top: 3px; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-label { font-weight: 600; font-size: .86rem; }
.field-label .req { color: var(--bad); margin-left: 2px; }
.summary-strip { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; overflow: hidden; }
.summary-strip > div { flex: 1; padding: 12px 16px; border-right: 1px solid var(--line-soft); }
.summary-strip > div:last-child { border-right: 0; }
.summary-strip .v { font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.summary-strip .k { font-size: .78rem; color: var(--muted); }

/* ---------------------------------------------------------------- gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.g-item { border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; overflow: hidden; cursor: pointer; text-align: left; padding: 0; display: flex; flex-direction: column; }
.g-item:hover { border-color: var(--indigo-500); box-shadow: var(--shadow); }
.g-item .ph { aspect-ratio: 4 / 3; background: repeating-conic-gradient(#f1eff6 0% 25%, #fff 0% 50%) 50% / 16px 16px; display: grid; place-items: center; overflow: hidden; }
.g-item .ph img { max-height: 100%; object-fit: contain; }
.g-item .meta { padding: 9px 11px; font-size: .78rem; display: flex; flex-direction: column; gap: 4px; }
.g-item .meta .name { font-weight: 600; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- duplicates */
.dup-group { border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; }
.dup-group .gh { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.dup-members { display: flex; gap: 12px; padding: 14px 16px; overflow-x: auto; }
.dup-m { width: 200px; flex: none; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: #fff; }
.dup-m.keeper { border: 2px solid var(--ok); }
.dup-m .ph { height: 140px; background: #f4f3f7; display: grid; place-items: center; overflow: hidden; cursor: zoom-in; }
.dup-m .ph img { max-height: 100%; object-fit: contain; }
.dup-m .info { padding: 8px 10px; font-size: .76rem; display: flex; flex-direction: column; gap: 4px; }
.dup-m .path { font-weight: 600; word-break: break-all; font-size: .76rem; }
.readonly-note { display: flex; gap: 10px; align-items: center; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compare figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.compare figure img { display: block; width: 100%; max-height: 60vh; object-fit: contain; background: #f4f3f7; }
.compare figcaption { padding: 8px 12px; font-size: .8rem; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- translation */
.lang-pair { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.tr-table { width: 100%; border-collapse: collapse; }
.tr-table th { text-align: left; font-size: .8rem; font-weight: 600; color: var(--ink-2); background: var(--indigo-50); padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
.tr-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-size: .93rem; }
.tr-table td.pg { width: 46px; color: var(--muted); font-size: .78rem; }
.tr-table td.src { width: 42%; }
.tr-table .translit { font-size: .78rem; color: var(--muted); margin-top: 4px; font-style: italic; }
.tr-table .tgt { width: 100%; border: 1px solid transparent; background: transparent; resize: vertical; min-height: 2.6em; padding: 4px 6px; border-radius: 3px; font: inherit; line-height: 1.55; }
.tr-table .tgt:hover { border-color: var(--line); }
.tr-table .tgt:focus { border-color: var(--indigo-500); background: #fff; outline: 2px solid var(--indigo-100); }
.tr-table tr.edited .tgt { background: var(--info-bg); }
.tr-table tr.para td { padding: 4px; border: 0; background: var(--canvas); }
mark.gl { background: #FFE9CC; color: inherit; border-bottom: 2px solid var(--saffron); padding: 0 1px; border-radius: 2px; cursor: help; }
.prov-list { display: flex; flex-direction: column; gap: 8px; }
.prov { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; cursor: pointer; font-size: .85rem; }
.prov:has(input:checked) { border-color: var(--indigo); background: var(--indigo-50); }
.prov.na { opacity: .55; cursor: not-allowed; }
.prov input { margin-top: 4px; accent-color: var(--indigo); }
.prov .d { font-size: .76rem; color: var(--muted); }

/* ---------------------------------------------------------------- assistant */
.chat-shell { display: grid; grid-template-columns: 300px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; height: calc(100vh - 300px); min-height: 560px; overflow: hidden; }
.chat-side { border-right: 1px solid var(--line); padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; background: var(--canvas); }
.chat-side h3 { font-size: .86rem; margin: 0 0 8px; color: var(--indigo); }
.doc-pick { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.doc-pick label { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; padding: 5px 6px; border-radius: 4px; cursor: pointer; }
.doc-pick label:hover { background: var(--indigo-50); }
.doc-pick input { accent-color: var(--indigo); margin-top: 3px; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 22px 26px; display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; gap: 12px; max-width: 860px; }
.msg .who { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: .78rem; }
.msg.bot .who { background: var(--indigo); color: #fff; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.user .who { background: #FFE3C4; color: #7a3d00; }
.msg .bubble { padding: 11px 15px; border-radius: 12px; font-size: .94rem; line-height: 1.65; }
.msg.bot .bubble { background: var(--indigo-50); border: 1px solid var(--indigo-100); border-top-left-radius: 3px; }
.msg.user .bubble { background: #fff; border: 1px solid var(--line); border-top-right-radius: 3px; }
.msg .bubble p { margin: 0 0 8px; } .msg .bubble p:last-child { margin: 0; }
.msg .bubble ul { margin: 4px 0 8px; padding-left: 20px; }
.msg .tools { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; align-items: center; }
.cite { display: inline-flex; align-items: center; font-size: .7rem; font-weight: 700; color: var(--indigo); background: #fff; border: 1px solid var(--indigo-100); border-radius: 4px; padding: 0 5px; margin: 0 1px; cursor: pointer; vertical-align: 1px; }
.cite:hover { background: var(--indigo); color: #fff; }
.src-chip { display: inline-flex; gap: 6px; align-items: center; font-size: .74rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 2px 10px; cursor: pointer; color: var(--ink-2); }
.src-chip:hover { border-color: var(--indigo-500); color: var(--indigo); }
.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--indigo-500); margin-right: 3px; animation: blink 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .2; } }
.composer { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; }
.suggest button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: .8rem; cursor: pointer; color: var(--ink-2); }
.suggest button:hover { border-color: var(--indigo-500); color: var(--indigo); }
.compose-row { display: flex; gap: 8px; align-items: flex-end; }
.compose-row textarea { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; resize: none; min-height: 48px; max-height: 160px; line-height: 1.5; }
.compose-row textarea:focus { outline: 2px solid var(--indigo-100); border-color: var(--indigo-500); }
.mic { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--indigo); position: relative; flex: none; }
.mic svg { width: 21px; height: 21px; }
.mic.rec { background: var(--bad); color: #fff; border-color: var(--bad); }
.mic.rec::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--bad); opacity: .5; transform: scale(var(--lvl, 1)); transition: transform .08s; }
.send { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--indigo); color: #fff; cursor: pointer; display: grid; place-items: center; flex: none; }
.send svg { width: 20px; height: 20px; }
.interim { font-size: .82rem; color: var(--muted); font-style: italic; min-height: 1.2em; }

/* ---------------------------------------------------------------- about / traceability */
.trace td:first-child { font-weight: 700; color: var(--indigo); white-space: nowrap; }
.arch { width: 100%; height: auto; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--indigo); color: #E6E1F5; margin-top: 20px; font-size: .86rem; }
.site-footer .container { padding: 26px 0 18px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid rgba(255,255,255,.18); padding-bottom: 14px; margin-bottom: 14px; }
.site-footer nav a { color: #fff; text-decoration: none; padding: 2px 14px; border-right: 1px solid rgba(255,255,255,.3); }
.site-footer nav a:first-child { padding-left: 0; }
.site-footer nav a:last-child { border-right: 0; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer .cols { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
.site-footer p { margin: 2px 0; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1200px) {
  .viewer { grid-template-columns: 96px minmax(0, 1fr); }
  .viewer .side { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); max-height: none; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:nth-child(3) { border-right: 0; } .kpi:nth-child(-n+3) { border-bottom: 1px solid var(--line-soft); }
  .cap-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cap { border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 960px) {
  .g-2, .g-3, .g-4, .g-side, .g-side-l { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: 1fr; }
  .hero .visual { min-height: 260px; }
  .chat-shell { grid-template-columns: 1fr; height: auto; }
  .chat-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-log { min-height: 420px; }
  .identity .officer span, .gov-strip .ministry, .identity .status-pill { display: none; }
  .compare { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-bottom: 1px solid var(--line-soft); }
  .cap-list { grid-template-columns: 1fr; }
  .hero .copy { padding: 24px 20px; } .hero h1 { font-size: 1.55rem; }
  .identity .nic-word, .identity .poc-tag { display: none; }
  .page-title { font-size: 1.4rem; }
  .bar-row { grid-template-columns: 100px 1fr 34px; }
  .viewer { grid-template-columns: 1fr; } .thumbs { flex-direction: row; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .thumbs button { width: 70px; flex: none; }
  .summary-strip { flex-wrap: wrap; } .summary-strip > div { flex: 1 1 45%; }
  .gov-strip .tools > .opt { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .field-pop { opacity: 1; }
}
@media print {
  .gov-strip, .nav, .search-row, .site-footer, .page-band .actions, .no-print { display: none !important; }
  body { background: #fff; }
}

/* =====================================================================
   Enterprise shell (v2): sidebar + top bar
   ===================================================================== */
body.shell { background: #F6F5FA; }
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: calc(100vh - 37px); background: linear-gradient(90deg, var(--indigo) 0 264px, transparent 264px); }
html.side-collapsed .app { grid-template-columns: 72px minmax(0, 1fr); background: linear-gradient(90deg, var(--indigo) 0 72px, transparent 72px); }
.sidebar { background: var(--indigo); color: #DCD5F2; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; z-index: 35; }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.1); text-decoration: none; color: #fff; }
.side-brand svg { width: 40px; height: 40px; flex: none; }
.side-brand .t { line-height: 1.2; min-width: 0; }
.side-brand .t b { display: block; font-size: .95rem; font-weight: 600; white-space: nowrap; }
.side-brand .t span { font-size: .74rem; color: #BFB4E6; white-space: nowrap; }
.side-nav { flex: 1; overflow-y: auto; padding: 10px 10px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.side-group { margin-top: 14px; }
.side-group:first-child { margin-top: 2px; }
.side-group > .gl { font-size: .72rem; color: #A99CD8; padding: 0 10px 6px; white-space: nowrap; }
.side-nav a { display: flex; align-items: center; gap: 11px; color: #E7E2F7; text-decoration: none; padding: 8px 10px; border-radius: 7px; font-size: .9rem; white-space: nowrap; position: relative; }
.side-nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.side-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav a.active { background: #fff; color: var(--indigo); font-weight: 600; }
.side-nav a.active svg { opacity: 1; }
.side-nav a .count { margin-left: auto; font-size: .7rem; font-weight: 700; background: var(--saffron); color: #3a1d00; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.side-nav a.active .count { background: var(--indigo); color: #fff; }
.side-foot { border-top: 1px solid rgba(255,255,255,.1); padding: 10px; display: flex; align-items: center; gap: 8px; }
.side-foot button { background: rgba(255,255,255,.08); border: 0; color: #E7E2F7; border-radius: 6px; padding: 7px; cursor: pointer; display: grid; place-items: center; }
.side-foot button svg { width: 18px; height: 18px; }
.side-foot .ver { font-size: .72rem; color: #A99CD8; white-space: nowrap; }
html.side-collapsed .side-brand .t, html.side-collapsed .side-group > .gl, html.side-collapsed .side-nav a span, html.side-collapsed .side-nav a .count, html.side-collapsed .side-foot .ver { display: none; }
html.side-collapsed .side-nav a { justify-content: center; padding: 10px 0; }
html.side-collapsed .side-group { margin-top: 8px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 8px; }
html.side-collapsed .side-group:first-child { border-top: 0; }

.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 10px 24px; min-height: 62px; }
.topbar .searchbar { flex: 1; max-width: 760px; border-width: 1px; border-bottom-width: 3px; }
.topbar .searchbar input { padding: 9px 0; font-size: .93rem; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.scope-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; color: var(--ink-2); background: var(--indigo-50); white-space: nowrap; }
.scope-chip svg { width: 14px; height: 14px; color: var(--indigo); }
.bell { position: relative; }
.bell .badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; border-radius: 999px; background: var(--bad); color: #fff; font-size: .62rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 18px 40px rgba(41,19,108,.16); min-width: 300px; z-index: 60; padding: 6px; }
.menu a, .menu button.mi { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 9px 12px; border-radius: 6px; text-decoration: none; color: var(--ink); background: none; border: 0; cursor: pointer; font-size: .88rem; }
.menu a:hover, .menu button.mi:hover { background: var(--indigo-50); }
.menu a svg, .menu button.mi svg { width: 17px; height: 17px; color: var(--indigo-500); flex: none; }
.menu .mh { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.menu .mh b { display: block; }
.user-btn { display: flex; align-items: center; gap: 9px; border: 1px solid transparent; background: none; padding: 4px 8px 4px 4px; border-radius: 999px; cursor: pointer; }
.user-btn:hover { background: var(--indigo-50); }
.user-btn .who { text-align: left; line-height: 1.2; }
.user-btn .who b { display: block; font-size: .84rem; font-weight: 600; }
.user-btn .who span { font-size: .72rem; color: var(--muted); }
.shell .page-band { background: transparent; border: 0; }
.shell .page-band .container, .shell main .container { width: auto; margin: 0; padding-left: 28px; padding-right: 28px; }
.shell .page-band .container { padding-top: 22px; padding-bottom: 6px; }
.shell main { padding-top: 14px; }
.shell .page-title { font-size: 1.55rem; }
.shell .site-footer { margin-top: auto; }
.shell .site-footer .container { width: auto; padding-left: 28px; padding-right: 28px; }
.session-warn { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 8px; z-index: 210; display: flex; gap: 12px; align-items: center; font-size: .9rem; box-shadow: 0 12px 30px rgba(0,0,0,.3); }

/* ---------------------------------------------------------------- login */
body.login-page { background: #fff; min-height: 100vh; display: flex; flex-direction: column; }
.login-wrap { flex: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
.login-art { background: var(--indigo); color: #fff; padding: 46px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-art .brand { display: flex; align-items: center; gap: 14px; }
.login-art .brand svg { width: 54px; height: 54px; }
.login-art .brand b { display: block; font-size: 1.1rem; }
.login-art .brand span { color: #C9BFEA; font-size: .86rem; }
.login-art h1 { font-size: 2.3rem; line-height: 1.15; font-weight: 600; margin: 36px 0 10px; max-width: 18ch; }
.login-art .te { font-size: 1.15rem; color: #D9D1F3; margin: 0 0 18px; }
.login-art p.lead { color: #CFC6EE; max-width: 52ch; margin: 0; }
.ap-map { margin-top: auto; padding-top: 24px; display: flex; align-items: flex-end; gap: 34px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(12, 18px); grid-template-rows: repeat(9, 18px); gap: 3px; }
.tiles i { border-radius: 4px; background: rgba(255,255,255,.14); }
.tiles i.on { animation: tilepulse 3.6s ease-in-out infinite; }
@keyframes tilepulse { 0%, 100% { background: rgba(255,255,255,.14); } 50% { background: rgba(255,153,51,.85); } }
.login-figs { display: grid; grid-template-columns: repeat(2, auto); gap: 14px 34px; }
.login-figs b { display: block; font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.login-figs span { font-size: .8rem; color: #C9BFEA; }
.login-form-side { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #FAFAFC; }
.login-card { width: min(440px, 100%); }
.login-card h2 { margin: 0; font-size: 1.6rem; color: var(--indigo); font-weight: 600; }
.login-card .sub { color: var(--muted); margin: 4px 0 24px; }
.login-card form { display: flex; flex-direction: column; gap: 16px; }
.login-card .input { padding: 11px 12px; font-size: .98rem; }
.pw-wrap { position: relative; }
.pw-wrap .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.captcha-row { display: grid; grid-template-columns: 170px 40px 1fr; gap: 8px; align-items: center; }
.captcha-row img { border: 1px solid var(--line); border-radius: 6px; height: 50px; width: 170px; background: #f5f3fb; }
.otp-boxes { display: flex; gap: 10px; }
.otp-boxes input { width: 48px; height: 56px; text-align: center; font-size: 1.4rem; font-weight: 600; border: 1px solid var(--line); border-radius: 8px; }
.otp-boxes input:focus { border-color: var(--indigo); outline: 2px solid var(--indigo-100); }
.btn-lg { padding: 12px 18px; font-size: 1rem; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; margin: 6px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-box { margin-top: 22px; border: 1px dashed #C9BFEA; border-radius: 10px; padding: 12px 14px; background: #fff; }
.demo-box summary { cursor: pointer; font-size: .85rem; color: var(--indigo); font-weight: 600; }
.demo-acc { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: .8rem; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.demo-acc:last-child { border-bottom: 0; }
.demo-acc button { font-size: .75rem; }
.err { color: var(--bad); background: var(--bad-bg); border-radius: 6px; padding: 9px 12px; font-size: .86rem; }
.login-foot { font-size: .76rem; color: var(--muted); margin-top: 26px; line-height: 1.6; }

/* ---------------------------------------------------------------- library */
.lib { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.facets { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); scrollbar-width: thin; }
.facet { border-bottom: 1px solid var(--line-soft); }
.facet:last-child { border-bottom: 0; }
.facet > button.fh { display: flex; width: 100%; align-items: center; justify-content: space-between; background: none; border: 0; padding: 12px 16px; cursor: pointer; font-weight: 600; color: var(--indigo); font-size: .88rem; }
.facet > button.fh svg { width: 16px; height: 16px; transition: transform .15s; }
.facet[data-open="false"] > button.fh svg { transform: rotate(-90deg); }
.facet[data-open="false"] .fb { display: none; }
.fb { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 1px; }
.fb label { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; font-size: .83rem; padding: 4px 6px; border-radius: 4px; cursor: pointer; }
.fb label:hover { background: var(--indigo-50); }
.fb label input { accent-color: var(--indigo); margin: 0; }
.fb label .n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .76rem; }
.fb label span.lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb .more { background: none; border: 0; color: var(--indigo-500); font-size: .78rem; cursor: pointer; text-align: left; padding: 4px 6px; }
.fb .fsearch { margin: 0 0 6px; padding: 6px 9px; font-size: .8rem; }
.lib-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 14px; }
.lib-bar .total { font-size: .92rem; }
.lib-bar .total b { font-size: 1.1rem; color: var(--indigo); font-variant-numeric: tabular-nums; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.af { display: inline-flex; align-items: center; gap: 6px; background: var(--indigo); color: #fff; border-radius: 999px; padding: 3px 6px 3px 11px; font-size: .78rem; }
.af button { border: 0; background: rgba(255,255,255,.2); color: #fff; border-radius: 50%; width: 18px; height: 18px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.af button svg { width: 11px; height: 11px; }
.bulk-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--indigo); color: #fff; border-radius: var(--radius-m); padding: 9px 14px; }
.bulk-bar .btn { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.bulk-bar .btn:hover { background: rgba(255,255,255,.22); }
.bulk-bar select { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 4px; padding: 6px 8px; }
.bulk-bar select option { color: var(--ink); }
table.lib-table td { vertical-align: middle; }
table.lib-table .ttl { font-weight: 600; color: var(--ink); text-decoration: none; display: block; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.lib-table .ttl:hover { color: var(--indigo); text-decoration: underline; }
table.lib-table .sub { font-size: .76rem; color: var(--muted); }
table.lib-table input[type=checkbox] { accent-color: var(--indigo); width: 16px; height: 16px; }
.sens { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 600; }
.sens i { width: 8px; height: 8px; border-radius: 2px; }
.sens.Public i { background: #17784A; } .sens.Internal i { background: #1F5FA8; } .sens.Confidential i { background: #D88A0B; } .sens.Restricted i { background: #B42318; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.doc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; text-align: left; }
.doc-card:hover { border-color: var(--indigo-500); }
.doc-card .ic { width: 34px; height: 42px; border-radius: 4px; background: var(--indigo-50); color: var(--indigo); display: grid; place-items: center; border: 1px solid var(--indigo-100); }
.doc-card .ic svg { width: 18px; height: 18px; }
.doc-card b { font-size: .88rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pager { display: flex; align-items: center; gap: 6px; justify-content: flex-end; padding: 12px 14px; border-top: 1px solid var(--line-soft); }
.pager .pi { font-size: .82rem; color: var(--muted); margin-right: auto; }
.drawer-back { position: fixed; inset: 0; background: rgba(21,8,50,.35); z-index: 120; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: #fff; z-index: 121; display: flex; flex-direction: column; box-shadow: -20px 0 50px rgba(0,0,0,.2); animation: din .2s ease-out; }
@keyframes din { from { transform: translateX(30px); opacity: 0; } }
.drawer-h { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.drawer-h h2 { margin: 0; font-size: 1.1rem; color: var(--indigo); line-height: 1.35; }
.drawer-b { padding: 18px 20px; overflow-y: auto; flex: 1; }
.drawer-f { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--indigo-100); }
.timeline li { padding: 0 0 12px 16px; position: relative; font-size: .84rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--indigo-500); border: 2px solid #fff; }
.timeline .t { color: var(--muted); font-size: .76rem; }
.cat-browser { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.cat-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.cat-tile:hover { border-color: var(--indigo-500); background: var(--indigo-50); }
.cat-tile b { color: var(--indigo); font-size: .92rem; }
.cat-tile .te { font-size: .78rem; color: var(--muted); }
.cat-tile .n { font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 4px; }
.cat-tile .bar { height: 4px; border-radius: 4px; background: #ece9f3; overflow: hidden; }
.cat-tile .bar i { display: block; height: 100%; background: var(--indigo-500); }

/* ---------------------------------------------------------------- command centre */
.cc-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.cc-kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; }
.cc-kpi .k { font-size: .8rem; color: var(--ink-2); }
.cc-kpi .v { font-size: 1.65rem; font-weight: 600; color: var(--indigo); font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 2px; }
.cc-kpi .s { font-size: .74rem; color: var(--muted); }
.cc-kpi.alert .v { color: var(--bad); }
.dmap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 54px; gap: 5px; }
.dmap button { border: 0; border-radius: 6px; cursor: pointer; padding: 4px 5px; text-align: left; display: flex; flex-direction: column; justify-content: space-between; color: #fff; font-size: .62rem; line-height: 1.15; overflow: hidden; transition: transform .1s; }
.dmap button:hover, .dmap button:focus-visible { transform: scale(1.06); z-index: 2; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.dmap button b { font-size: .74rem; font-variant-numeric: tabular-nums; }
.dmap button.light { color: var(--ink); }
.scale { display: flex; align-items: center; gap: 8px; font-size: .74rem; color: var(--muted); margin-top: 10px; }
.scale i { display: block; width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #E9E4F6, #8C74D6, #29136C); }
.trend svg { width: 100%; height: 190px; display: block; }
.stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; background: #fff; }
.stage { padding: 14px 16px; border-right: 1px solid var(--line-soft); position: relative; }
.stage:last-child { border-right: 0; }
.stage .k { font-size: .78rem; color: var(--ink-2); }
.stage .v { font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--indigo); }
.stage::after { content: ""; position: absolute; right: -7px; top: 50%; width: 12px; height: 12px; background: #fff; border-top: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); transform: translateY(-50%) rotate(45deg); z-index: 1; }
.stage:last-child::after { display: none; }

/* ---------------------------------------------------------------- sources */
.src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.src-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.src-card .hd { display: flex; gap: 10px; align-items: center; }
.src-card .ic { width: 38px; height: 38px; border-radius: 9px; background: var(--indigo-100); color: var(--indigo); display: grid; place-items: center; flex: none; }
.src-card .ic svg { width: 20px; height: 20px; }
.src-card b { color: var(--ink); }
.src-card p { margin: 0; font-size: .82rem; color: var(--ink-2); flex: 1; }
.src-status { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; }
.src-status i { width: 8px; height: 8px; border-radius: 50%; background: #9AA0B4; }
.src-status.idle i { background: var(--ok); } .src-status.syncing i { background: var(--info); animation: blink 1s infinite; } .src-status.error i { background: var(--bad); }
.code-block { background: #1B1236; color: #E6E1F5; border-radius: 8px; padding: 12px 14px; font-family: ui-monospace, Consolas, monospace; font-size: .78rem; white-space: pre-wrap; word-break: break-all; }

@media (max-width: 1280px) { .cc-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stage:nth-child(3)::after { display: none; } }
@media (max-width: 1100px) { .lib { grid-template-columns: 1fr; } .facets { position: static; max-height: none; } }
@media (max-width: 900px) {
  .app, html.side-collapsed .app { grid-template-columns: 1fr; background: none; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; }
  html.side-open .sidebar { transform: none; box-shadow: 20px 0 50px rgba(0,0,0,.3); }
  html.side-collapsed .side-brand .t, html.side-collapsed .side-group > .gl, html.side-collapsed .side-nav a span { display: initial; }
  .topbar { padding: 8px 14px; } .user-btn .who, .scope-chip { display: none; }
  .shell .page-band .container, .shell main .container, .shell .site-footer .container { padding-left: 16px; padding-right: 16px; }
  .login-wrap { grid-template-columns: 1fr; } .login-art { padding: 28px 22px; } .login-art h1 { margin-top: 26px; font-size: 1.7rem; } .ap-map .tiles { display: none; }
  .dmap { grid-auto-rows: 40px; } .dmap button span { display: none; }
}
#menu-toggle { display: none; }
@media (max-width: 900px) { #menu-toggle { display: grid; } }
.lib-bar select.input, .lib-bar .input { width: auto; max-width: 260px; padding: 6px 8px; font-size: .86rem; }
.bulk-bar select { max-width: 220px; font-size: .84rem; }
.lib { grid-template-columns: 260px minmax(0, 1fr); }
table.lib-table th, table.lib-table td { padding: 9px 10px; }
table.lib-table td:nth-child(3) { min-width: 130px; }
table.lib-table .ttl { max-width: 380px; }
@media (max-width: 1100px) { .facets { max-height: 340px; overflow-y: auto; } }
@media (max-width: 900px) { .topbar .status-pill { display: none; } }
table.lib-table td:nth-child(3) { max-width: 170px; }
table.lib-table .conf .meter { width: 34px; } table.lib-table .conf { gap: 5px; font-size: .78rem; }

/* =====================================================================
   v3 — NIC portal header & theme (emblem · titles · NIC logo, white navigation)
   ===================================================================== */
.nic .gov-strip .wrap { display: flex; align-items: center; gap: 12px; min-height: 36px; padding: 0 24px; }
.nic .gov-strip .ministry .sep { color: #b9b3c9; margin: 0 6px; }
.nic-identity { background: #fff; border-bottom: 1px solid var(--line); }
.nic-identity .wrap { display: flex; align-items: center; gap: 18px; padding: 10px 24px; }
.nic-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); min-width: 0; }
.nic-brand .emblem { height: 66px; width: auto; flex: none; }
.nic-titles { display: flex; flex-direction: column; line-height: 1.22; border-left: 1px solid var(--line); padding-left: 14px; min-width: 0; }
.nic-titles .l1 { font-size: 1rem; color: var(--ink); }
.nic-titles .l2 { font-size: 1.12rem; font-weight: 700; color: #000; }
.nic-titles .l3 { font-size: 1.02rem; color: var(--indigo); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nic-titles .l3 .te { font-weight: 400; color: var(--muted); font-size: .92rem; }
.nic-right { margin-left: auto; display: flex; align-items: center; gap: 18px; flex: none; }
.nic-logo { height: 50px; width: auto; }
.env-tag { border: 1.5px solid var(--indigo); color: var(--indigo); border-radius: 999px; padding: 2px 10px; font-size: .74rem; font-weight: 600; }

.toolbar { position: sticky; top: 0; z-index: 45; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px rgba(41,19,108,.05);
  display: flex; align-items: center; gap: 10px; padding: 8px 24px; min-height: 60px; }
.toolbar .searchbar { flex: 1; max-width: 760px; position: relative; border: 1px solid var(--indigo); border-bottom-width: 4px; border-radius: 8px; }
.toolbar .searchbar input { padding: 9px 0; font-size: .94rem; }
.toolbar .pop { position: relative; }
.toolbar .top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.collapse-btn { display: inline-grid; }

body.nic .app { grid-template-columns: 250px minmax(0, 1fr); background: none; min-height: calc(100vh - 160px); }
html.side-collapsed body.nic .app { grid-template-columns: 64px minmax(0, 1fr); background: none; }
body.nic .sidebar { background: #fff; color: var(--ink); border-right: 1px solid var(--line); top: 60px; height: calc(100vh - 60px); }
body.nic .side-nav { padding: 12px 10px 16px; scrollbar-color: #d6d1e3 transparent; }
body.nic .side-group > .gl { color: var(--muted); font-size: .74rem; font-weight: 600; padding: 0 12px 6px; }
body.nic .side-nav a { color: var(--ink); border-radius: 6px; padding: 8px 12px; font-size: .9rem; }
body.nic .side-nav a svg { color: var(--indigo-500); opacity: 1; }
body.nic .side-nav a:hover { background: var(--indigo-50); color: var(--indigo); }
body.nic .side-nav a.active { background: var(--indigo-50); color: var(--indigo); font-weight: 600; box-shadow: inset 3px 0 0 var(--indigo); }
body.nic .side-nav a.active .count { background: var(--indigo); color: #fff; }
body.nic .side-foot { border-top: 1px solid var(--line-soft); padding: 10px 14px; }
body.nic .side-foot .ver { color: var(--muted); font-size: .72rem; }
html.side-collapsed body.nic .side-group { border-top-color: var(--line-soft); }
html.side-collapsed body.nic .side-nav a { padding: 10px 0; }
html.side-collapsed body.nic .side-nav a.active { box-shadow: inset 3px 0 0 var(--indigo); }

/* footer — NIC portal style */
.nic-footer { margin-top: 0; }
.nic-footer .wrap { padding: 30px 24px 18px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 30px; align-items: start; }
.nic-footer h2 { color: #fff; font-size: 1rem; font-weight: 600; margin: 0 0 10px; }
.nic-footer nav { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; }
.nic-footer nav a { border: 0; padding: 0; color: #E6E1F5; }
.nic-footer p { color: #D9D2F0; line-height: 1.6; }
.foot-logos { display: flex; align-items: center; gap: 18px; }
.foot-logos img:first-child { height: 46px; width: auto; }
.foot-logos img:last-child { height: 56px; width: auto; }
.foot-base { border-top: 1px solid rgba(255,255,255,.18); margin-top: 22px; padding-top: 14px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: .8rem; }
.foot-base p { margin: 0; }

/* ---------------------------------------------------------------- home: hero carousel */
.hero-c { position: relative; border-radius: 14px; overflow: hidden; background: var(--indigo); color: #fff; min-height: 330px; }
.hero-c .slide { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }
.hero-c .slide.on { opacity: 1; visibility: visible; transition: opacity .6s ease; position: relative; }
.hero-c .copy { padding: 38px 40px 60px 64px; display: flex; flex-direction: column; justify-content: center; }
.hero-c .kicker { font-size: .85rem; color: #CFC6EE; margin-bottom: 8px; }
.hero-c h2 { font-size: 2rem; line-height: 1.18; margin: 0; font-weight: 600; max-width: 22ch; }
.hero-c .te { color: #D9D1F3; margin: 8px 0 0; font-size: 1.05rem; }
.hero-c p.lead { color: #D3CAF0; margin: 12px 0 20px; max-width: 54ch; }
.hero-c .btn { border-color: rgba(255,255,255,.45); background: transparent; color: #fff; }
.hero-c .btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.hero-c .btn-primary { background: #fff; color: var(--indigo); border-color: #fff; }
.hero-c .btn-primary:hover { background: var(--indigo-100); color: var(--indigo); }
.hero-c .art { position: relative; display: grid; place-items: center; padding: 20px 64px 50px 10px;
  background: radial-gradient(110% 90% at 85% 15%, #4A2CA8 0%, transparent 60%); }
.hero-c .art svg { width: 100%; max-width: 420px; height: auto; }
.hero-c .arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--indigo);
  display: grid; place-items: center; cursor: pointer; z-index: 3; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.hero-c .arrow svg { width: 20px; height: 20px; }
.hero-c .arrow.prev { left: 14px; } .hero-c .arrow.next { right: 14px; }
.hero-c .dots { position: absolute; left: 64px; bottom: 20px; display: flex; gap: 8px; align-items: center; z-index: 3; }
.hero-c .dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.4); cursor: pointer; padding: 0; }
.hero-c .dots button[aria-current="true"] { background: var(--saffron); width: 26px; border-radius: 6px; }
.hero-c .dots .pause { width: auto; height: auto; background: none; color: #fff; display: grid; place-items: center; margin-left: 8px; }
.hero-c .dots .pause svg { width: 16px; height: 16px; }
.hero-figs { display: flex; gap: 26px; margin-top: 22px; flex-wrap: wrap; }
.hero-figs b { display: block; font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-figs span { font-size: .78rem; color: #CFC6EE; }

/* latest updates band — NIC "Latest News" pattern */
.updates { display: flex; background: var(--band); border-radius: 10px; overflow: hidden; align-items: stretch; min-height: 64px; }
.updates .lbl { padding: 0 24px; font-size: 1.25rem; display: flex; align-items: center; border-right: 1px solid #d4d4d4; white-space: nowrap; }
.updates .item { flex: 1; min-width: 0; padding: 10px 20px; display: flex; flex-direction: column; justify-content: center; }
.updates .item a { color: var(--ink); text-decoration: none; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.updates .item a:hover { color: var(--indigo); text-decoration: underline; }
.updates .item span { font-size: .78rem; color: var(--muted); }
.updates .ctl { display: flex; align-items: center; gap: 2px; padding: 0 12px; }
.updates .ctl button { border: 0; background: none; cursor: pointer; padding: 6px; color: var(--ink); display: grid; place-items: center; border-radius: 4px; }
.updates .ctl button:hover { background: #dedede; }
.updates .ctl svg { width: 18px; height: 18px; }

/* section headings in NIC style */
.nic-h { font-size: 1.5rem; font-weight: 600; color: var(--indigo); margin: 6px 0 12px; }
.nic-h .te { font-size: .95rem; color: var(--muted); font-weight: 400; margin-left: 10px; }

/* quick services — NIC services tiles */
.services { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.svc { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 10px 14px; text-align: center; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 8px; transition: border-color .12s, transform .12s; }
.svc:hover { border-color: var(--indigo); transform: translateY(-2px); }
.svc .ic { width: 52px; height: 52px; border-radius: 50%; background: var(--indigo-50); border: 1px solid var(--indigo-100); color: var(--indigo); display: grid; place-items: center; }
.svc .ic svg { width: 24px; height: 24px; }
.svc b { font-size: .86rem; font-weight: 600; line-height: 1.25; }
.svc span { font-size: .74rem; color: var(--muted); line-height: 1.3; }

@media (max-width: 1280px) { .services { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .hero-c .slide { grid-template-columns: 1fr; } .hero-c .art { display: none; } .hero-c .copy { padding: 30px 56px 60px; }
  .foot-grid { grid-template-columns: 1fr; }
  .nic-titles .l3 .te, .env-tag { display: none; }
}
@media (max-width: 900px) {
  body.nic .app, html.side-collapsed body.nic .app { grid-template-columns: 1fr; }
  body.nic .sidebar { top: 0; height: 100vh; }
  .collapse-btn { display: none; }
  .nic-identity .wrap, .toolbar, .nic .gov-strip .wrap { padding-left: 14px; padding-right: 14px; }
  .nic-logo { height: 36px; } .nic-brand .emblem { height: 50px; } .nic-titles .l3 { white-space: normal; }
  .nic .gov-strip .ministry span:not(:first-child) { display: none; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .updates .lbl { font-size: 1rem; padding: 0 12px; } .hero-c h2 { font-size: 1.5rem; } .hero-c .copy { padding: 24px 22px 60px; } .hero-c .dots { left: 22px; }
  .hero-c .arrow { display: none; }
}
@media (max-width: 560px) { .nic-right .nic-logo { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero-c .slide { transition: none; } }
.hero-c .scanbar { animation: scany 3.4s ease-in-out infinite alternate; }
@keyframes scany { from { transform: translateY(0); } to { transform: translateY(246px); } }
@media (prefers-reduced-motion: reduce) { .hero-c .scanbar { animation: none; } }
.login-art .brand { gap: 16px; }
.login-art .lg-emblem { height: 74px; width: auto; }
.login-art .lg-titles { border-left: 1px solid rgba(255,255,255,.25); padding-left: 16px; }
.login-art .lg-titles b { display: block; font-size: 1.1rem; }
.login-art .lg-titles span { color: #C9BFEA; font-size: .86rem; }
.login-art .lg-nic { height: 44px; width: auto; margin-left: auto; }
@media (max-width: 900px) { .login-art .lg-nic { display: none; } }
.hero-c h2 { max-width: 26ch; font-size: 1.9rem; }
@media (max-width: 900px) { .toolbar .status-pill { display: none; } .toolbar { gap: 6px; } }
.login-art .ap-map { margin-top: 44px; }
.login-art .login-figs { grid-template-columns: repeat(2, minmax(120px, auto)); }
