/* RERA Intelligence — design system. Language borrowed from Proximus: quiet paper,
   glass surfaces, one accent, things rise a few px and fade in on one curve. */
:root {
  --sans: ui-sans-serif, "SF Pro Display", "Inter", "Segoe UI Variable", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ink: #0e1424; --ink-2: #344054; --muted: #5d6779; --faint: #7d8799;
  --line: rgba(14, 20, 36, .08); --line-2: rgba(14, 20, 36, .05);
  --paper: #f4f5f7; --card: #ffffff; --glass: rgba(255, 255, 255, .88); --soft: rgba(23, 25, 30, .045);
  --accent: #3558ff; --accent-ink: #1f3fe0; --accent-soft: #eef1ff; --accent-line: #d6ddff;
  --hi: #e5484d; --hi-soft: #feecec; --mid: #c27a05; --mid-soft: #fff4df; --lo: #2f9e66; --lo-soft: #e8f6ee;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.4, .5, 1);
  --shadow: 0 1px 2px rgba(10, 12, 20, .05), 0 12px 32px -8px rgba(10, 12, 20, .16);
  --lift: 0 1px 2px rgba(10, 12, 20, .05), 0 4px 14px -6px rgba(10, 12, 20, .12);
  --r: 20px; --r-sm: 12px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01"; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ------------------------------------------------------------ chrome */
.cls { background: #7a1414; color: #ffe3e3; font: 700 11px/1 var(--mono); letter-spacing: .18em; text-align: center; padding: 6px 8px; text-transform: uppercase; }
.topbar { position: sticky; top: 0; z-index: 50; background: var(--glass); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); }
.topbar .in { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 22px; padding: 0 24px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--ink); }
.brand img { width: 26px; height: 26px; }
.brand b { font-size: 17px; font-weight: 750; letter-spacing: -.04em; }
.brand .st { font-size: 12px; font-weight: 650; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 2px 8px; letter-spacing: .02em; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13.5px; font-weight: 560; padding: 8px 12px; border-radius: 10px; white-space: nowrap; transition: background .15s, color .15s; }
.nav a svg { width: 16px; height: 16px; opacity: .8; }
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav a.on { background: var(--ink); color: #fff; }
.nav a.on svg { opacity: 1; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.who .av { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.who button { border: 1px solid var(--line); background: var(--card); padding: 6px 11px; border-radius: 9px; cursor: pointer; font-size: 12.5px; }
.who button:hover { background: var(--soft); }
@media (max-width: 1560px) { .who .em { display: none; } }
@media (max-width: 1400px) { .nav a svg { display: none; } .who > a { display: none; } }
@media (max-width: 1100px) { .nav a { padding: 8px 9px; font-size: 13px; } .brand .st { display: none; } }

.page { max-width: 1180px; margin: 0 auto; padding: 34px 24px 70px; }
.page.wide { max-width: 1320px; }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 44px; line-height: 1.6; }

/* ------------------------------------------------------------ type */
.hero { margin-bottom: 26px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
h1.t { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; letter-spacing: -.04em; margin: 10px 0 10px; font-weight: 760; }
p.lead { font-size: 16.5px; line-height: 1.55; color: var(--muted); margin: 0; max-width: 760px; }
.k { font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
h3.h { margin: 0; font-size: 16px; letter-spacing: -.015em; font-weight: 680; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .sm { font-size: 13.5px; } .xs { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--lift); }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: 1fr 1fr; } .g2, .g-side { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .g3, .g4 { grid-template-columns: 1fr; } }
.mt { margin-top: 16px; } .mt2 { margin-top: 24px; }

.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px 15px; box-shadow: var(--lift); position: relative; overflow: hidden; }
.kpi .v { font-size: 30px; font-weight: 750; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 15px; font-weight: 650; color: var(--muted); letter-spacing: -.01em; }
.kpi .l { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.kpi.accent { background: linear-gradient(160deg, #3558ff, #2238c9); color: #fff; border-color: transparent; }
.kpi.accent .l { color: rgba(255,255,255,.78); }
.kpi .ic { position: absolute; right: 14px; top: 14px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.kpi .ic svg { width: 16px; height: 16px; }
.kpi.accent .ic { background: rgba(255,255,255,.16); color: #fff; }

/* ------------------------------------------------------------ controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: var(--ink); color: #fff; height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 620; font-size: 14px; cursor: pointer; transition: transform .12s var(--ease), background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover:not(:disabled) { background: #1d2740; box-shadow: var(--lift); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.blue { background: var(--accent); } .btn.blue:hover:not(:disabled) { background: var(--accent-ink); }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); } .btn.ghost:hover:not(:disabled) { background: var(--soft); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn svg { width: 16px; height: 16px; }
.field { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; height: 50px; box-shadow: var(--lift); transition: border-color .15s, box-shadow .15s; }
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field svg { width: 18px; height: 18px; color: var(--faint); flex: none; }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.field input::placeholder { color: var(--faint); }
textarea.ta { width: 100%; min-height: 140px; resize: vertical; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font: inherit; font-size: 15px; line-height: 1.55; background: var(--card); color: var(--ink); box-shadow: var(--lift); }
textarea.ta:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
select.sel { appearance: none; -webkit-appearance: none; height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 36px 0 14px; font: inherit; font-size: 14px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23667085' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 13px center; color: var(--ink); cursor: pointer; box-shadow: var(--lift); }
select.sel:focus { outline: 0; border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); padding: 7px 13px; border-radius: 99px; font-size: 13.5px; font-weight: 540; cursor: pointer; transition: all .15s var(--ease); }
.chip:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip svg { width: 14px; height: 14px; }
.seg { display: inline-flex; background: var(--soft); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 13px; border-radius: 9px; font-size: 13px; font-weight: 580; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--lift); }

/* ------------------------------------------------------------ badges */
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 640; padding: 3px 9px; border-radius: 99px; background: var(--soft); color: var(--ink-2); white-space: nowrap; margin: 0 4px 4px 0; }
.tag.hi { background: var(--hi-soft); color: #b42318; } .tag.mid { background: var(--mid-soft); color: #9a5b00; } .tag.lo { background: var(--lo-soft); color: #1f7a4c; } .tag.bl { background: var(--accent-soft); color: var(--accent-ink); }
.tag.ai { background: #f2edff; color: #5b3cc4; }
.tag .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.risk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 3px 9px 3px 7px; border-radius: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.risk .d { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.risk.hi { background: var(--hi-soft); color: #b42318; } .risk.mid { background: var(--mid-soft); color: #9a5b00; } .risk.lo { background: var(--lo-soft); color: #1f7a4c; }

/* ------------------------------------------------------------ tables & lists */
table.tb { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tb th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 10px; border-bottom: 1px solid var(--line); background: var(--paper); }
table.tb th:first-child { border-top-left-radius: 10px; } table.tb th:last-child { border-top-right-radius: 10px; }
table.tb td { padding: 12px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tb tr { transition: background .12s; }
table.tb tbody tr:hover td { background: #fafbff; }
table.tb a { font-weight: 620; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.sp { flex: 1; }
.li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line-2); }
.li:first-child { border-top: 0; }
.li .ic { width: 34px; height: 34px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.li .ic svg { width: 16px; height: 16px; }
.li .b { min-width: 0; flex: 1; }
.li .t1 { font-weight: 620; font-size: 14px; }
.li .t2 { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

/* ------------------------------------------------------------ charts */
.bars .br { display: grid; grid-template-columns: 150px 1fr 48px; align-items: center; gap: 12px; font-size: 13px; padding: 5px 0; }
.bars .tr { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.bars .fl { height: 100%; border-radius: 99px; background: var(--accent); transform-origin: left; animation: grow .7s var(--ease) both; }
.bars .vv { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 600; }
@keyframes grow { from { transform: scaleX(0); } }
.cols { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 150px; padding-top: 18px; }
.cols .c { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; position: relative; cursor: default; }
.cols .c .b { width: 70%; max-width: 34px; background: var(--accent); border-radius: 4px 4px 0 0; transform-origin: bottom; animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * 30ms); opacity: .92; transition: opacity .12s; }
.cols .c:hover .b { opacity: 1; filter: brightness(1.08); }
.cols .c .y { font-size: 12px; color: var(--muted); margin-top: 6px; }
.cols .c .tip { position: absolute; bottom: calc(var(--h) + 24px); background: var(--ink); color: #fff; font-size: 12.5px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; opacity: 0; transform: translateY(4px); transition: all .15s; pointer-events: none; }
.cols .c:hover .tip { opacity: 1; transform: none; }
.cols .c .lab { font-size: 12.5px; color: var(--ink-2); font-weight: 650; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.cols:after { content: ""; position: absolute; left: 0; right: 0; bottom: 22px; height: 1px; background: var(--line); }
@keyframes rise { from { transform: scaleY(0); } }
.gauge { display: flex; align-items: center; gap: 18px; }
.gauge svg { flex: none; }

/* ------------------------------------------------------------ hub */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .tiles { grid-template-columns: 1fr; } }
a.tile { position: relative; display: flex; flex-direction: column; gap: 10px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--lift); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; overflow: hidden; min-height: 210px; }
a.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent-line); color: var(--ink); }
a.tile .ti { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
a.tile .ti svg { width: 22px; height: 22px; }
a.tile h3 { margin: 4px 0 0; font-size: 18px; letter-spacing: -.025em; font-weight: 700; }
a.tile p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; flex: 1; }
a.tile .go { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 620; color: var(--accent); }
a.tile .go svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
a.tile:hover .go svg { transform: translateX(4px); }
a.tile.feature { grid-column: span 2; background: linear-gradient(135deg, #0e1424 0%, #1b2a6b 60%, #3558ff 140%); color: #fff; border: 0; }
a.tile.feature p { color: rgba(255,255,255,.75); } a.tile.feature .go { color: #fff; }
a.tile.feature .ti { background: rgba(255,255,255,.12); color: #fff; }
a.tile.feature .art { position: absolute; right: -30px; bottom: -40px; width: 340px; opacity: .9; pointer-events: none; }
@media (max-width: 620px) { a.tile.feature { grid-column: span 1; } a.tile.feature .art { display: none; } }
.heroband { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: end; margin-bottom: 28px; }
@media (max-width: 900px) { .heroband { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ chat */
.chatwrap { max-width: 860px; margin: 0 auto; }
.thread { display: flex; flex-direction: column; gap: 16px; padding-bottom: 120px; }
.bub { max-width: 86%; animation: enter .3s var(--ease) both; }
.bub.u { align-self: flex-end; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 18px 18px 6px 18px; font-size: 15px; }
.bub.a { align-self: flex-start; display: flex; gap: 12px; }
.bub.a .av { width: 34px; height: 34px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.bub.a .av svg { width: 18px; height: 18px; }
.bub.a .tx { background: var(--card); border: 1px solid var(--line); border-radius: 6px 18px 18px 18px; padding: 14px 18px; font-size: 15px; line-height: 1.62; box-shadow: var(--lift); white-space: pre-wrap; min-width: 0; }
.bub.a .tx b { font-weight: 680; }
.srcs { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: 6px; white-space: normal; }
.srcs a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent-ink); padding: 4px 10px; border-radius: 8px; }
.srcs a:hover { background: var(--accent); color: #fff; }
.composer { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 24px 22px; background: linear-gradient(to top, var(--paper) 62%, rgba(244,245,247,0)); z-index: 20; }
.composer .in { max-width: 860px; margin: 0 auto; display: flex; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 8px 8px 8px 18px; box-shadow: var(--shadow); }
.composer .in:focus-within { border-color: var(--accent); }
.composer input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 15.5px; background: transparent; color: var(--ink); min-width: 0; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.welcome { text-align: center; padding: 30px 0 22px; }
.welcome .orb { width: 64px; height: 64px; border-radius: 22px; margin: 0 auto 16px; background: linear-gradient(150deg, #3558ff, #1b2a6b); display: grid; place-items: center; color: #fff; box-shadow: 0 12px 30px -10px rgba(53, 88, 255, .6); }
.welcome .orb svg { width: 30px; height: 30px; }
.sugg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; text-align: left; }
@media (max-width: 620px) { .sugg { grid-template-columns: 1fr; } }
.sugg button { border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 13px 15px; font-size: 14px; text-align: left; cursor: pointer; color: var(--ink-2); box-shadow: var(--lift); transition: all .15s var(--ease); line-height: 1.45; }
.sugg button:hover { border-color: var(--accent-line); color: var(--ink); transform: translateY(-1px); }
.sugg button span { display: block; font-size: 12.5px; font-weight: 700; color: var(--accent); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 3px; }

/* ------------------------------------------------------------ verdict / report */
.verdict { position: relative; background: linear-gradient(160deg, #f4f6ff, #ffffff); border: 1px solid var(--accent-line); border-radius: 18px; padding: 20px 22px 20px 26px; font-size: 16.5px; line-height: 1.6; letter-spacing: -.005em; }
.verdict:before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.flag { display: flex; gap: 10px; align-items: flex-start; background: var(--mid-soft); color: #7a4a00; border-radius: 14px; padding: 12px 14px; font-size: 13px; margin-top: 12px; line-height: 1.5; }
.flag svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
details.sec { border: 1px solid var(--line); border-radius: 14px; margin-top: 10px; background: var(--card); overflow: hidden; }
details.sec > summary { list-style: none; cursor: pointer; padding: 14px 18px; font-weight: 640; font-size: 14.5px; display: flex; align-items: center; gap: 10px; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary:before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .2s var(--ease); margin-right: 2px; }
details.sec[open] > summary:before { transform: rotate(45deg); }
details.sec > summary:hover { background: var(--paper); }
details.sec .body { padding: 2px 20px 18px 38px; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.cite { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.cite:first-child { border-top: 0; }
.cite .cn { font-weight: 680; font-family: var(--mono); font-size: 12.5px; background: var(--paper); border-radius: 7px; padding: 3px 8px; white-space: nowrap; }
.cite .pt { color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dl.kv { display: grid; grid-template-columns: 180px 1fr; gap: 0; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); padding: 10px 0; border-top: 1px solid var(--line-2); }
dl.kv dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--line-2); }
dl.kv dt:first-of-type, dl.kv dd:first-of-type { border-top: 0; }
dl.kv dd ul { margin: 0; padding-left: 18px; } dl.kv dd li { margin: 2px 0; }
@media (max-width: 620px) { dl.kv { grid-template-columns: 1fr; } dl.kv dd { border-top: 0; padding-top: 0; } }

/* ------------------------------------------------------------ upload */
.drop { position: relative; border: 1.5px dashed #c5cbe0; border-radius: 22px; padding: 46px 24px; text-align: center; background: radial-gradient(ellipse at top, #f4f6ff, #fff 70%); cursor: pointer; transition: all .2s var(--ease); }
.drop:hover, .drop.over { border-color: var(--accent); background: radial-gradient(ellipse at top, #e9eeff, #fff 70%); }
.drop .ico { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--accent); }
.drop .ico svg { width: 26px; height: 26px; }
.drop h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.steps { display: grid; gap: 4px; margin-top: 4px; }
.step { display: flex; align-items: center; gap: 12px; padding: 10px 4px; font-size: 14px; color: var(--faint); transition: color .2s; }
.step .s { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; font-size: 12.5px; font-weight: 700; }
.step.on { color: var(--ink); font-weight: 600; } .step.on .s { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.step.done { color: var(--ink-2); } .step.done .s { background: var(--lo); border-color: var(--lo); color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .7s linear infinite; display: inline-block; vertical-align: -3px; }

/* ------------------------------------------------------------ timeline */
.tl { position: relative; padding-left: 30px; }
.tl:before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent-line), var(--line)); }
.tl .ev { position: relative; padding: 2px 0 20px; animation: enter .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.tl .ev .dot { position: absolute; left: -26px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 3px solid var(--accent); }
.tl .ev.app .dot { border-color: var(--hi); }
.tl .ev.final .dot { background: var(--accent); }
.tl .ev .dt { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.tl .ev .ti { font-weight: 650; font-size: 14.5px; margin: 2px 0 6px; }

.note { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 14px; padding: 11px 14px; line-height: 1.55; margin-top: 16px; }
.note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.err { background: var(--hi-soft); color: #b42318; border-radius: 12px; padding: 11px 14px; font-size: 13.5px; margin-top: 12px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.skel { background: linear-gradient(90deg, var(--soft) 25%, rgba(23,25,30,.08) 50%, var(--soft) 75%); background-size: 200% 100%; animation: shim 1.2s infinite; border-radius: 10px; }
@keyframes shim { to { background-position: -200% 0; } }
.snip { font-size: 13px; color: var(--ink-2); border-left: 3px solid var(--accent-line); padding: 6px 12px; margin: 8px 0 0; background: var(--paper); border-radius: 0 10px 10px 0; line-height: 1.55; }

@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.rise > * { animation: enter .4s var(--ease) both; }
.rise > *:nth-child(2) { animation-delay: .04s; } .rise > *:nth-child(3) { animation-delay: .08s; } .rise > *:nth-child(4) { animation-delay: .12s; }
.rise > *:nth-child(5) { animation-delay: .16s; } .rise > *:nth-child(6) { animation-delay: .2s; } .rise > *:nth-child(7) { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------ monitor (full-bleed map) */
body.mon { overflow: hidden; }
.mapstage { position: relative; height: calc(100dvh - 62px - 23px); }
#map { position: absolute; inset: 0; }
.mpanel { position: absolute; z-index: 10; left: 14px; top: 14px; bottom: 14px; width: 410px; display: flex; flex-direction: column; min-height: 0;
  background: rgba(255,255,255,.93); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); }
.mpanel .ph { padding: 18px 20px 12px; border-bottom: 1px solid var(--line-2); }
.mpanel .pb { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 20px 20px; scrollbar-width: thin; }
.mpanel .pb > * { animation: enter .3s var(--ease) both; }
.mkpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 4px; }
.mkpis div { background: var(--paper); border-radius: 14px; padding: 10px 12px; }
.mkpis b { display: block; font-size: 20px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.mkpis span { font-size: 12.5px; color: var(--muted); line-height: 1.3; display: block; }
.locrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 11px 10px; margin: 0 -10px; border-radius: 12px; cursor: pointer; transition: background .12s; }
.locrow:hover { background: var(--paper); }
.locrow .n { font-weight: 650; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.locrow .m { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.locrow .spark { grid-column: 1 / -1; height: 5px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.locrow .spark i { display: block; height: 100%; border-radius: 99px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--hi); box-shadow: 0 0 0 0 rgba(229,72,77,.5); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(229,72,77,0); } 100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); } }
.pcard { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-top: 10px; background: var(--card); transition: border-color .15s, box-shadow .15s; }
.pcard:hover { border-color: var(--accent-line); box-shadow: var(--lift); }
.pcard .tt { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcard .tt a { font-weight: 680; font-size: 14px; color: var(--ink); }
.pcard .tt a:hover { color: var(--accent); }
.feed .fi { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.feed .fi:first-child { border-top: 0; }
.feed .fi .dt { width: 84px; flex: none; color: var(--muted); font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; padding-top: 1px; }
.dock { position: absolute; z-index: 10; left: calc(410px + 28px); right: 14px; bottom: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; pointer-events: none; }
.dock > * { pointer-events: auto; }
.glass { background: rgba(255,255,255,.93); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); }
.tline { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; flex: 1; min-width: 300px; max-width: 640px; }
.tline .play { width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.tline .play svg { width: 16px; height: 16px; }
.tline .yr { font-size: 22px; font-weight: 760; letter-spacing: -.04em; width: 64px; font-variant-numeric: tabular-nums; }
.tline input[type=range] { flex: 1; accent-color: var(--accent); }
.tline .lb { font-size: 12.5px; color: var(--muted); line-height: 1.3; width: 110px; }
.tools { display: flex; gap: 4px; padding: 5px; }
.tools button { border: 0; background: transparent; height: 38px; padding: 0 12px; border-radius: 12px; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.tools button:hover { background: var(--soft); }
.tools button.on { background: var(--ink); color: #fff; }
.tools button svg { width: 16px; height: 16px; }
.legend { position: absolute; z-index: 9; right: 14px; top: 14px; padding: 12px 14px; font-size: 13px; width: 228px; }
.legend .lr { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--ink-2); }
.legend .sw { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.maplibregl-popup-content { border-radius: 14px !important; padding: 12px 14px !important; box-shadow: var(--shadow) !important; font: 13px/1.45 var(--sans); }
.maplibregl-ctrl-group { border-radius: 12px !important; box-shadow: var(--lift) !important; }
.hint { position: absolute; z-index: 9; left: 438px; top: 14px; padding: 9px 14px; font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.hint svg { width: 15px; height: 15px; color: var(--accent); }
@media (max-width: 860px) {
  .mapstage { height: auto; display: flex; flex-direction: column; }
  #map { position: relative; height: 58vh; }
  .mpanel { position: relative; left: 0; top: 0; bottom: auto; width: auto; margin: 12px; max-height: none; }
  .dock { position: relative; left: 0; right: 0; bottom: 0; margin: 0 12px 12px; }
  .legend, .hint { display: none; }
  body.mon { overflow: auto; }
}
@media print { .topbar, .cls, .composer, .no-print { display: none !important; } body { background: #fff; } .card { box-shadow: none; } }

/* ------------------------------------------------------------ phones */
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .cls { font-size: 10px; letter-spacing: .12em; padding: 5px 6px; }
  .topbar .in { flex-wrap: wrap; height: auto; padding: 10px 14px 0; gap: 8px 12px; }
  .brand b { font-size: 16px; }
  .who { margin-left: auto; }
  .who .em, .who > a { display: none; }
  .who button { padding: 5px 9px; font-size: 12px; }
  .nav { order: 3; flex: 0 0 100%; margin: 0 -14px; padding: 2px 10px 8px; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .nav a { padding: 7px 11px; font-size: 13px; scroll-snap-align: start; }
  .nav a svg { display: none; }
  .page { padding: 22px 16px 60px; }
  .heroband { gap: 18px; margin-bottom: 20px; }
  h1.t { font-size: 27px; }
  p.lead { font-size: 15px; }
  .card { padding: 16px; border-radius: 18px; }
  .kpi { padding: 13px 14px; } .kpi .v { font-size: 23px; } .kpi .ic { width: 26px; height: 26px; right: 10px; top: 10px; }
  .g4 { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .grid { gap: 12px; }
  .row.wrap > .btn, .row.wrap > .sel { width: 100%; }
  table.tb { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .bars .br { grid-template-columns: 110px 1fr 42px; gap: 8px; font-size: 13px; }
  .cols { height: 130px; }
  .seg { flex-wrap: wrap; } .seg button { flex: 1 1 auto; }
  .chips { gap: 6px; } .chip { padding: 6px 11px; font-size: 12.5px; }
  .verdict { font-size: 15px; padding: 16px 16px 16px 20px; }
  details.sec .body { padding: 2px 14px 16px 18px; }
  .drop { padding: 30px 16px; }
  a.tile { min-height: 0; padding: 18px; }
  a.tile.feature { min-height: 200px; }
  .bub { max-width: 94%; } .bub.a .tx { padding: 12px 14px; font-size: 14.5px; }
  .composer { padding: 10px 12px 14px; } .composer .in { padding: 6px 6px 6px 14px; } .composer .btn { padding: 0 14px; }
  .sugg { margin-top: 16px; }
  .welcome { padding: 10px 0 14px; }
  .tl { padding-left: 26px; }
  .cite { flex-wrap: wrap; gap: 6px 10px; } .cite .pt { white-space: normal; flex-basis: 100%; order: 3; }
  /* monitor */
  .mapstage { height: auto; }
  #map { height: 52vh; min-height: 340px; }
  .mpanel { margin: 10px 10px 0; border-radius: 18px; }
  .mpanel .pb { max-height: none; overflow: visible; }
  .dock { margin: 10px; gap: 8px; }
  .tline { min-width: 0; flex: 1 1 100%; max-width: none; }
  .tools { flex-wrap: wrap; flex: 1 1 100%; justify-content: space-between; }
  .mkpis b { font-size: 18px; }
}
@media (max-width: 359px) {
  .g4 { grid-template-columns: 1fr !important; }
  h1.t { font-size: 24px; }
}
