/* LIVA public site — black & white, dossier / research-desk aesthetic. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-2: #0a0a0a;
  --panel: #0c0c0c;
  --line: #1c1c1c;
  --line-2: #2a2a2a;
  --ink: #f2f2f2;
  --ink-2: #a8a8a8;
  --muted: #6b6b6b;
  --dim: #3a3a3a;
  --sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1120px;
}
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
/* faint grid, like graph paper under glass */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 100%);
}
body > * { position: relative; z-index: 1; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input { font-family: inherit; font-size: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }

/* nav */
.nav { border-bottom: 1px solid var(--line); background: rgba(5,5,5,0.92); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 30; }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 56px; }
.wordmark { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.wordmark:hover { text-decoration: none; }
.wordmark img { height: 22px; width: auto; filter: brightness(0) invert(1); opacity: 0.95; }
.wordmark .wm { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.32em; font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links a { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 8px 12px; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a.active { color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 18px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; border-radius: 0; white-space: nowrap; transition: background .12s, color .12s; }
.btn:hover { background: var(--ink); color: #000; text-decoration: none; }
.btn.solid { background: var(--ink); color: #000; }
.btn.solid:hover { background: #fff; }
.btn.quiet { border-color: var(--line-2); color: var(--ink-2); }
.btn.quiet:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.nav-links .btn { margin-left: 14px; padding: 7px 14px; }

/* strip */
.strip { border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }
.strip .wrap { display: flex; flex-wrap: wrap; gap: 4px 32px; min-height: 34px; align-items: center; padding-top: 6px; padding-bottom: 6px; }
.strip .v { color: var(--ink); }
.strip .dot { display: inline-block; width: 6px; height: 6px; background: var(--ink); margin-right: 10px; vertical-align: 1px; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* hero */
.hero { padding: 110px 0 70px; }
.hero h1 { font-family: var(--mono); font-weight: 500; font-size: clamp(28px, 4.2vw, 46px); line-height: 1.12; letter-spacing: -0.01em; max-width: 820px; margin: 18px 0 22px; }
.hero h1 .cursor { display: inline-block; width: 0.55em; height: 1em; background: var(--ink); vertical-align: -0.12em; margin-left: 6px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero p { color: var(--ink-2); max-width: 560px; font-size: 15px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* figures */
.figures { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-right: 0; }
.fig { padding: 20px 22px; border-right: 1px solid var(--line); }
.fig .v { font-family: var(--mono); font-size: 34px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; margin-top: 10px; }
.fig .s { color: var(--muted); font-size: 12.5px; margin-top: 8px; }

/* world map */
.map-wrap { margin-top: 14px; border: 1px solid var(--line); background: var(--panel); padding: 10px 10px 8px; }
.world { width: 100%; height: auto; display: block; }
.world .country { fill: #141414; stroke: #262626; stroke-width: 0.6; vector-effect: non-scaling-stroke; }
.world .country.on { fill: #202020; stroke: #3a3a3a; }
.world .mark .disc { fill: rgba(255,255,255,0.14); stroke: #f2f2f2; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.world .mark .halo { fill: none; stroke: rgba(255,255,255,0.22); stroke-width: 0.8; vector-effect: non-scaling-stroke; animation: halo 3.2s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes halo { 0% { opacity: 0.9; transform: scale(0.7); } 100% { opacity: 0; transform: scale(1.35); } }
.world .lbl { font-family: var(--mono); font-size: 11px; fill: var(--ink); letter-spacing: 0.08em; paint-order: stroke; stroke: #0c0c0c; stroke-width: 3px; stroke-linejoin: round; }
.world .mark:hover .disc { fill: rgba(255,255,255,0.3); }
.world .leader { stroke: rgba(255,255,255,0.45); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.world .inset-frame { fill: none; stroke: rgba(255,255,255,0.35); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.world .inset-bg { fill: #0a0a0a; }
.world .inset-title { font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; fill: var(--muted); }
.map-cap { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; padding: 8px 4px 0; border-top: 1px solid var(--line); margin-top: 6px; }
@media (max-width: 620px) { .world .lbl { font-size: 16px; } }

/* sections */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.section h2 { font-family: var(--mono); font-weight: 500; font-size: 20px; letter-spacing: -0.005em; margin: 14px 0 22px; }
.section p { color: var(--ink-2); max-width: 640px; }
.section p + p { margin-top: 12px; }
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 56px 1fr 2fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.row .n { font-family: var(--mono); color: var(--muted); font-size: 12px; }
.row .k { font-size: 15px; color: var(--ink); }
.row .d { font-size: 13.5px; color: var(--ink-2); }

/* panel + table */
.panel { border: 1px solid var(--line); background: var(--panel); }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.panel-head .right { margin-left: auto; letter-spacing: 0.04em; text-transform: none; }
.table-scroll { overflow-x: auto; }
table.term { width: 100%; border-collapse: collapse; font-size: 13px; }
table.term th { text-align: left; font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.term td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
table.term td:first-child { color: var(--ink); }
table.term tr:last-child td { border-bottom: 0; }
table.term td.num, table.term th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.term tr:hover td { background: rgba(255,255,255,0.03); }
table.term .tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
table.term a { color: var(--ink); }
.bar { display: inline-block; height: 4px; background: var(--ink); vertical-align: middle; margin-right: 10px; opacity: 0.85; }

/* definitions */
.defs { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-right: 0; border-bottom: 0; }
.def { padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.def h4 { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.def p { font-size: 13.5px; color: var(--ink-2); max-width: none; }
.band { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--line); border-right: 0; }
.band .b { padding: 18px 20px; border-right: 1px solid var(--line); }
.band .pct { font-family: var(--mono); font-size: 30px; font-weight: 500; }
.band .which { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.note { border-left: 1px solid var(--ink); padding: 4px 0 4px 18px; color: var(--ink-2); font-size: 13.5px; margin-top: 28px; max-width: 720px; }

/* login */
.login-wrap { min-height: calc(100vh - 92px); display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login { width: 100%; max-width: 400px; }
.login .panel-body { padding: 26px 24px 20px; }
.login h1 { font-family: var(--mono); font-weight: 500; font-size: 18px; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field input { width: 100%; background: #000; border: 1px solid var(--line-2); border-radius: 0; padding: 10px 12px; color: var(--ink); font-size: 14px; font-family: var(--mono); }
.field input::placeholder { color: var(--dim); }
.field input:focus { outline: none; border-color: var(--ink); }
.row-login { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); margin: 2px 0 18px; }
.row-login label { display: flex; align-items: center; gap: 8px; }
.row-login input { accent-color: #fff; }
.row-login a { color: var(--muted); }
.row-login a:hover { color: var(--ink); }
.submit { width: 100%; padding: 12px; }
.msg { margin-top: 12px; font-size: 13px; min-height: 18px; font-family: var(--mono); }
.msg.error { color: #e05d5d; }
.msg.success { color: #8bd49c; }
.login .fine { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); text-align: center; margin-top: 18px; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 22px 0 40px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.foot .right { margin-left: auto; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .figures { grid-template-columns: repeat(2, 1fr); border-right: 1px solid var(--line); }
  .fig { border-bottom: 1px solid var(--line); }
  .row { grid-template-columns: 44px 1fr; }
  .row .d { grid-column: 2; }
  .defs, .band { grid-template-columns: 1fr; border-right: 1px solid var(--line); }
  .def, .band .b { border-right: 0; }
  .hero { padding: 70px 0 48px; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 18px; }
  .nav-links a:not(.btn) { display: none; }
  .nav .wrap { gap: 12px; }
  .figures { grid-template-columns: 1fr 1fr; }
  table.term th, table.term td { padding: 9px 10px; }
}
