@font-face { font-family: "Inter"; src: url("/fonts/inter-var-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --bg: #f4f6f9; --panel: #ffffff; --panel-2: #f8fafc; --line: #dfe4ec; --line-2: #c9d1dd;
  --ink: #142033; --ink-2: #4a5870; --ink-3: #566275;
  --accent: #1f5fa8; --accent-2: #174a85; --accent-soft: #e6eef8;
  --ok: #1e8a4c; --ok-soft: #e3f3ea; --warn: #b86e00; --warn-soft: #fdf1dc; --fail: #c23b3b; --fail-soft: #fbe6e6;
  --st-sub: #1e8a4c; --st-started: #1f5fa8; --st-prep: #6a4fb3; --st-up: #9aa6b8; --st-done: #0e5c33; --st-trans: #b86e00; --st-none: #d5dbe4;
  --r: 6px; --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --shadow: 0 1px 2px rgba(20,32,51,.06), 0 2px 8px rgba(20,32,51,.05);
  --t-xs: 11.5px; --t-sm: 13px; --t-md: 14.5px; --t-lg: 16.5px; --t-xl: 26px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font-ui); font-size: var(--t-md); color: var(--ink); background: var(--bg); font-variant-numeric: tabular-nums; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 1000; }
.skip:focus { left: 8px; top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* shell */
.top { height: 56px; background: #0f2747; color: #fff; display: flex; align-items: center; gap: var(--s4); padding: 0 var(--s5); position: sticky; top: 0; z-index: 50; }
.top .brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15.5px; color: #fff; }
.top .brand .mk { width: 28px; height: 28px; border-radius: var(--r); background: #fff; color: #0f2747; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.top .brand small { display: block; font-weight: 450; color: #b9c7da; font-size: 11.5px; letter-spacing: .02em; }
.top .search { flex: 1; max-width: 460px; }
.top .search input { width: 100%; height: 34px; border-radius: var(--r); border: 1px solid #2c4a73; background: #173560; color: #fff; padding: 0 12px; font: inherit; font-size: 13.5px; }
.top .search input::placeholder { color: #a9bad2; }
.top .sp { flex: 1; }
.top select, .top .pill { height: 32px; border-radius: var(--r); border: 1px solid #2c4a73; background: #173560; color: #fff; font: inherit; font-size: 13px; padding: 0 10px; }
.top .pill { display: inline-flex; align-items: center; gap: 6px; }
.top a.pill:hover { text-decoration: none; background: #1d4074; }
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 56px); }
.rail { background: var(--panel); border-right: 1px solid var(--line); padding: var(--s4) var(--s3); position: sticky; top: 56px; height: calc(100vh - 56px); overflow: auto; }
.rail h4 { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: var(--s4) var(--s2) var(--s2); font-weight: 650; }
.rail a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r); color: var(--ink-2); font-size: 14px; font-weight: 500; }
.rail a:hover { background: var(--panel-2); text-decoration: none; color: var(--ink); }
.rail a.on { background: var(--accent-soft); color: var(--accent-2); font-weight: 650; }
.rail .ct { margin-left: auto; font-size: 12px; color: var(--ink-3); }
main { padding: var(--s5) var(--s6) var(--s6); min-width: 0; }
.crumbs { font-size: var(--t-sm); color: var(--ink-3); margin-bottom: 6px; }
.head { display: flex; align-items: flex-end; gap: var(--s4); margin-bottom: var(--s4); flex-wrap: wrap; }
.head h1 { margin: 0; font-size: 23px; font-weight: 700; letter-spacing: -.01em; }
.head p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; max-width: 860px; }
.head .act { margin-left: auto; display: flex; gap: var(--s2); flex-wrap: wrap; }

/* panels */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s4); }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.panel > .ph { display: flex; align-items: center; gap: var(--s2); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel > .ph h2, .panel > .ph h3 { margin: 0; font-size: var(--t-lg); font-weight: 650; }
.panel > .ph .sub { color: var(--ink-3); font-size: var(--t-sm); }
.panel > .ph .r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.panel > .pb { padding: 14px 16px; }
.panel > .pb.flush { padding: 0; }
.kpi { font-size: var(--t-xl); font-weight: 750; letter-spacing: -.01em; }
.kpi small { font-size: 13px; color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.eyebrow { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 650; }
.muted { color: var(--ink-3); }
.note { font-size: var(--t-sm); color: var(--ink-3); }

/* buttons, inputs */
.btn { height: 34px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: var(--panel-2); text-decoration: none; }
.btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.pri:hover { background: var(--accent-2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=search], select, textarea { font: inherit; font-size: 14px; color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r); padding: 6px 10px; background: #fff; min-height: 34px; }
textarea { width: 100%; min-height: 72px; resize: vertical; }
label.f { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 0 0 4px; }
.row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: var(--s3); }

/* tables */
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 650; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); position: sticky; top: 0; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:hover td { background: #fafbfd; }
table.t td.num, table.t th.num { text-align: right; }
.mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); }

/* chips, status */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.st-ok { background: var(--ok-soft); color: #136636; border-color: #bfe3cd; }
.st-warn { background: var(--warn-soft); color: #7a4a00; border-color: #f2d7a6; }
.st-fail { background: var(--fail-soft); color: #9c2a2a; border-color: #f0c3c3; }
.st-info { background: var(--accent-soft); color: var(--accent-2); border-color: #c7d9ef; }
.bar { height: 8px; background: #e8ecf2; border-radius: 4px; position: relative; overflow: visible; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 4px; }
.bar > b { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--ink); }

/* wheels */
.wheel { display: flex; align-items: center; gap: var(--s4); }
.wheel svg { flex: none; }
.legend { display: grid; gap: 4px; font-size: 13px; }
.legend span { display: flex; align-items: center; gap: 6px; }

/* filter bar */
.fbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: var(--s4); box-shadow: var(--shadow); }
.fbar select, .fbar input { height: 32px; min-height: 32px; font-size: 13px; padding: 0 8px; max-width: 190px; }
.fbar .fl { font-size: 11.5px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; }
.fbar .sep { width: 1px; height: 22px; background: var(--line); }

/* tree */
.tree .node { display: grid; grid-template-columns: 1fr 200px 210px 70px; gap: 12px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.tree .node.l0 { background: var(--panel-2); font-weight: 650; }
.tree .node.l1 { padding-left: 32px; font-weight: 600; }
.tree .node.l2 { padding-left: 52px; }
.tree .node.l3 { padding-left: 72px; font-size: 13.5px; }
.tree .lvl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 650; margin-right: 6px; }
.stackbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #eef1f5; }
.stackbar i { display: block; height: 100%; }

/* modal + toast */
.scrim { position: fixed; inset: 0; background: rgba(15,39,71,.35); display: grid; place-items: center; z-index: 200; }
.modal { background: #fff; border-radius: var(--r); width: min(560px, 92vw); max-height: 88vh; overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.modal .ph { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal .ph h2 { margin: 0; font-size: 17px; }
.modal .pb { padding: 16px 18px; }
.modal .pf { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; bottom: 20px; right: 20px; background: #0f2747; color: #fff; padding: 10px 16px; border-radius: var(--r); font-size: 13.5px; z-index: 300; box-shadow: var(--shadow); }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: var(--s4); flex-wrap: wrap; }
.tabs a { padding: 9px 14px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--accent-2); border-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--ink); }

/* report canvas */
.canvas { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 28px 32px; }
.canvas h2 { font-size: 20px; margin: 0 0 4px; }
.blk { border: 1px dashed transparent; border-radius: var(--r); padding: 10px; margin: 0 -10px 10px; position: relative; }
.blk:hover { border-color: var(--line-2); }
.blk .tools { position: absolute; right: 6px; top: 6px; display: none; gap: 4px; }
.blk:hover .tools, .blk:focus-within .tools { display: flex; }

/* public site */
.pub { background: #fff; min-height: 100vh; }
.pub .ptop { background: #0f2747; color: #fff; }
.pub .ptop .in { max-width: 1180px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pub .ptop .ttl { font-weight: 700; font-size: 17px; }
.pub .ptop .ttl small { display: block; font-weight: 450; font-size: 12.5px; color: #b9c7da; }
.pub .ptop nav { display: flex; gap: 4px; flex-wrap: wrap; }
.pub .ptop nav a { color: #dce6f3; padding: 6px 10px; border-radius: var(--r); font-size: 14px; font-weight: 550; }
.pub .ptop nav a.on, .pub .ptop nav a:hover { background: #1d4074; color: #fff; text-decoration: none; }
.pub .lang { margin-left: auto; display: inline-flex; border: 1px solid #3b5d8c; border-radius: var(--r); overflow: hidden; }
.pub .lang a { color: #dce6f3; padding: 6px 12px; font-size: 13.5px; font-weight: 650; }
.pub .lang a.on { background: #fff; color: #0f2747; }
.pub .lang a:hover { text-decoration: none; }
.pub .hero { background: linear-gradient(180deg, #eef3f9, #fff); border-bottom: 1px solid var(--line); }
.pub .hero .in { max-width: 1180px; margin: 0 auto; padding: 28px 24px 22px; }
.pub .hero h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.01em; }
.pub .hero p { margin: 0; color: var(--ink-2); max-width: 820px; font-size: 15.5px; }
.pub .body { max-width: 1180px; margin: 0 auto; padding: 24px; }
.pub .goal { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: #fff; box-shadow: var(--shadow); }
.pub .goal h2 { margin: 0 0 6px; font-size: 18px; }
.pub p a, .pub .note a { text-decoration: underline; }
.pub footer { border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12.5px; }
.pub footer .in { max-width: 1180px; margin: 0 auto; padding: 16px 24px; }
.map { height: 620px; border-radius: var(--r); border: 1px solid var(--line); }
.leaflet-container { font-family: var(--font-ui); }
.leaflet-popup-content { font-size: 13.5px; line-height: 1.45; min-width: 280px; }
.leaflet-popup-content h3 { margin: 0 0 4px; font-size: 15px; }
.embedded .ptop, .embedded footer { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; display: none; }
  main { padding: 16px; }
  .c3, .c4, .c5, .c6, .c7, .c8 { grid-column: span 12; }
  .tree .node { grid-template-columns: 1fr 110px; }
  .tree .node > :nth-child(3), .tree .node > :nth-child(4) { display: none; }
  .map { height: 460px; }
  .top .search { display: none; }
}
@media print {
  .top, .rail, .no-print, .fbar { display: none !important; }
  .shell { display: block; } main { padding: 0; }
  .panel { box-shadow: none; }
}
