/* VARUNA — design system. Two appearances share one set of tokens: [data-theme="dark"] (deep ocean night,
   glass panels, aqua/violet light) and [data-theme="light"] (clear daylight, white panels, deeper accents for
   contrast). Every colour below comes from these tokens; tints are mixed from them. */
:root, [data-theme="dark"] {
  --bg: #050b14; --bg2: #081322; --page-bg: radial-gradient(120% 80% at 80% -10%, #0c2240 0%, #050b14 55%);
  --surface: rgba(9, 20, 36, .8); --surface-solid: #0b1828; --surface2: rgba(12, 26, 46, .96); --surface3: #0f2038;
  --field: rgba(8, 20, 38, .9); --chrome: rgba(5, 11, 20, .9); --hover: rgba(56, 225, 255, .08);
  --ink: #e8f1ff; --ink2: #a9bdd6; --ink3: #7c92af; --line: rgba(130, 200, 255, .12); --line2: rgba(130, 200, 255, .22);
  --aqua: #38e1ff; --teal: #22d3a6; --violet: #8b7bff; --violet-ink: #b3a8ff; --amber: #ffb547; --coral: #ff6b6b; --green: #36d399; --blue: #2f8bff; --blue-ink: #7fb6ff; --pink: #ff7ad9;
  --core: #38e1ff; --related: #8b7bff; --exploratory: #ffb547; --none: #5d6f88; --on-accent: #04121f;
  --primary-grad: linear-gradient(135deg, #1fb7e0, #6e5cff);
  --shadow: 0 20px 60px rgba(0, 0, 0, .45), 0 0 0 1px var(--line); --shadow-sm: 0 10px 40px rgba(0, 0, 0, .35);
  --blur: blur(16px) saturate(1.2); --scrim: rgba(2, 6, 12, .6);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f3f6fa; --bg2: #e8eef6; --page-bg: linear-gradient(180deg, #f6f9fc 0%, #eef3f9 100%);
  --surface: #ffffff; --surface-solid: #ffffff; --surface2: #ffffff; --surface3: #f2f6fb;
  --field: #ffffff; --chrome: rgba(255, 255, 255, .94); --hover: rgba(14, 116, 144, .07);
  --ink: #0b1b2e; --ink2: #3b5169; --ink3: #4e6480; /* #5d738d was just under 4.5:1 on the light panels */ --line: rgba(15, 40, 80, .1); --line2: rgba(15, 40, 80, .2);
  --aqua: #0e7490; --teal: #0f766e; --violet: #5b4bd6; --violet-ink: #4c3fc0; --amber: #b45309; --coral: #c62828; --green: #047857; --blue: #1d4ed8; --blue-ink: #1d4ed8; --pink: #be185d;
  --core: #0e7490; --related: #5b4bd6; --exploratory: #b45309; --none: #64748b; --on-accent: #ffffff;
  --primary-grad: linear-gradient(135deg, #0e7490, #5b4bd6);
  --shadow: 0 16px 48px rgba(15, 40, 80, .14), 0 0 0 1px var(--line); --shadow-sm: 0 6px 24px rgba(15, 40, 80, .08);
  --blur: none; --scrim: rgba(15, 30, 55, .35);
  color-scheme: light;
}
:root { --r: 14px; --r2: 18px; --rail: 64px; --top: 60px;
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; --display: 'Space Grotesk', var(--font); --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
body { background: var(--page-bg); transition: background-color .3s, color .3s; }
a { color: var(--aqua); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: color-mix(in srgb, var(--aqua) 30%, transparent); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; } ::-webkit-scrollbar-track { background: transparent; }
.mono { font-family: var(--mono); font-feature-settings: 'zero' 1; }
.muted { color: var(--ink3); } .dim { color: var(--ink2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 200; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surface-solid); color: var(--ink); font-weight: 600; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
svg.i, .icon-btn svg, .prefs-chip svg, .theme-switch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- map stage (shown on the Map page only) ---------- */
#map { position: fixed; top: var(--top); left: var(--rail); right: 0; bottom: var(--live, 0px); z-index: 0; visibility: hidden; }
body:not(.route-map) #map * { visibility: hidden !important; }
body.route-map #map { visibility: visible; }
/* Space around the globe. */
body.map-globe #map { background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--aqua) 10%, var(--bg)) 0%, var(--bg) 60%); }
#map .maplibregl-ctrl-attrib { font-size: 10px; background: var(--chrome); color: var(--ink3); }
#map .maplibregl-ctrl-attrib a { color: var(--ink2); }
#map .maplibregl-ctrl-group { background: var(--surface2); border: 1px solid var(--line2); box-shadow: var(--shadow-sm); }
#map .maplibregl-ctrl-group button + button { border-top-color: var(--line); }
[data-theme="dark"] #map .maplibregl-ctrl-icon { filter: invert(1) hue-rotate(180deg); }
.maplibregl-popup-content { background: var(--surface2) !important; color: var(--ink); border: 1px solid var(--line2); border-radius: 12px !important; box-shadow: var(--shadow) !important; padding: 10px 12px !important; font: 12.5px/1.45 var(--font); }
.maplibregl-popup-tip { display: none; }

/* ---------- the VARUNA logo (owner, 26 Oct 2026) ----------
   A teal ring with a violet wave, "VARUNA" in a blue gradient and the tagline beneath: drawn, not an image, so its
   background is transparent in both appearances. A light runs round the ring and the wave ripples. The font size of
   .vlogo sets the whole logo's size. */
.vlogo { display: inline-flex; align-items: center; gap: .34em; font-size: 46px; }
.vl-mark { width: 1.75em; height: 1.75em; flex: none; fill: none; stroke-linecap: round; }
.vl-ring { stroke: #1a8aab; stroke-width: 6.5; }
.vl-glint { stroke: #8be6ff; stroke-width: 6.5; stroke-dasharray: 22 142; opacity: .5; transform-origin: 32px 32px; animation: vl-orbit 7s linear infinite; }
.vl-wave { stroke: #9a8de8; stroke-width: 5.5; transform-origin: 32px 32px; animation: vl-ripple 3.2s ease-in-out infinite; }
.vl-txt { display: grid; gap: .16em; text-align: left; }
.vl-name { font: 800 1em/1 var(--font); letter-spacing: .14em; background: linear-gradient(180deg, #4cc3f3 0%, #1b8bd6 52%, #0b5aa6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vl-tag { font: 400 .29em/1.2 var(--font); color: var(--ink3); letter-spacing: .02em; white-space: nowrap; }
@keyframes vl-orbit { to { transform: rotate(360deg); } }
@keyframes vl-ripple { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(-1); } }
@media (prefers-reduced-motion: reduce) { .vl-glint, .vl-wave { animation: none; } }
@media (max-width: 480px) { #boot .vlogo, .gate-card .vlogo { font-size: 34px; } }

/* ---------- boot ---------- */
#boot { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--page-bg); transition: opacity .8s ease, visibility .8s; }
body:not(.booting) #boot { opacity: 0; visibility: hidden; }
.boot-log { list-style: none; padding: 0; margin: 18px 0 0; font: 12px/1.9 var(--mono); color: var(--ink3); min-height: 100px; width: min(520px, 90vw); }
.boot-log li { opacity: 0; animation: rise .4s ease forwards; } .boot-log li b { color: var(--teal); font-weight: 600; } .boot-log li.err b { color: var(--amber); }
.boot-by { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 18px; color: var(--ink3); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; opacity: 0; animation: rise .8s .5s ease forwards; }
.boot-by img { height: 58px; width: auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wave { 0%, 100% { stroke-dashoffset: 120; } 50% { stroke-dashoffset: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes flash { 0% { background: color-mix(in srgb, var(--aqua) 22%, transparent); } 100% { background: transparent; } }

/* ---------- top bar ---------- */
#topbar { position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 14px 0 calc(var(--rail) + 6px); background: var(--chrome); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; min-width: 0; }
.brand .vlogo { font-size: 20px; gap: 8px; }
.brand .vl-mark { width: 34px; height: 34px; }
.brand .vl-tag { font-size: 9.5px; display: none; } /* under the name from 1400 px, where the top bar has room */
@media (min-width: 1400px) { .brand .vl-tag { display: block; } }
.brand-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-left: 10px; border-left: 1px solid var(--line2); }
.brand-by { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--ink3); letter-spacing: .04em; }
.brand-by .by-mark { height: 14px; width: auto; } .brand-by .by-word { height: 10px; width: auto; }
.byline-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 48px 0 0; color: var(--ink3); font-size: 11.5px; }
.byline-foot img { height: 16px; } .byline-foot .w { height: 11px; }
.search-wrap { position: relative; flex: 1; max-width: 640px; margin: 0 auto; min-width: 160px; }
.search-wrap .ico { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; fill: none; stroke: var(--ink3); stroke-width: 2; }
#q { width: 100%; height: 40px; border-radius: 999px; border: 1px solid var(--line2); background: var(--field); padding: 0 46px 0 42px; outline: none; transition: border-color .2s, box-shadow .2s; }
#q:focus { border-color: var(--aqua); box-shadow: 0 0 0 4px color-mix(in srgb, var(--aqua) 16%, transparent); }
.search-wrap kbd { position: absolute; right: 14px; top: 50%; translate: 0 -50%; font: 11px var(--mono); color: var(--ink3); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; }
.top-right { display: flex; align-items: center; gap: 8px; position: relative; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--field); color: var(--ink2); font-size: 12px; white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
.pill.warn .dot { background: var(--amber); }
.clock { font: 600 12px var(--mono); color: var(--ink2); white-space: nowrap; }
.lang, .account, .icon-btn, .prefs-chip { height: 32px; border-radius: 999px; border: 1px solid var(--line2); background: var(--field); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.lang { min-width: 42px; font-weight: 700; letter-spacing: .06em; }
/* The language menu (EN / FR / ES): a native list, drawn like the other top-bar buttons. */
select.lang { appearance: none; -webkit-appearance: none; font: inherit; font-weight: 700; padding: 0 12px; text-align: center; text-align-last: center; cursor: pointer; }
select.lang option { background: var(--surface); color: var(--ink); }
.gate-langs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.account { padding: 0 12px; font-weight: 600; font-size: 12.5px; }
.account .av { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-grad); color: #fff; font: 700 11px var(--font); margin-left: -6px; }
.icon-btn { width: 34px; position: relative; color: var(--ink2); }
.icon-btn b { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--coral); color: #fff; font: 700 10.5px/18px var(--font); }
.prefs-chip { padding: 0 12px; font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.prefs-chip[aria-pressed="true"] { color: var(--on-accent); background: var(--aqua); border-color: var(--aqua); }
.lang:hover, .account:hover, .icon-btn:hover, .prefs-chip:hover { border-color: var(--aqua); }
.theme-switch { display: inline-flex; height: 32px; padding: 2px; gap: 2px; border-radius: 999px; border: 1px solid var(--line2); background: var(--field); }
.theme-switch button { width: 28px; border: 0; border-radius: 999px; background: none; color: var(--ink3); display: grid; place-items: center; }
.theme-switch button svg { width: 15px; height: 15px; }
.theme-switch button.on { background: color-mix(in srgb, var(--aqua) 18%, transparent); color: var(--aqua); }
.pop.acct { left: auto; right: 0; top: calc(100% + 10px); width: min(420px, 92vw); }

/* ---------- rail ---------- */
#rail { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: var(--rail); display: flex; flex-direction: column; gap: 3px; padding: 70px 8px 12px; background: var(--chrome); border-right: 1px solid var(--line); backdrop-filter: blur(12px); transition: width .25s ease, box-shadow .25s; overflow: hidden; }
#rail:hover { width: 224px; box-shadow: 20px 0 60px color-mix(in srgb, #000 30%, transparent); }
#rail a { display: flex; align-items: center; gap: 14px; height: 42px; padding: 0 13px; border-radius: 12px; color: var(--ink2); white-space: nowrap; text-decoration: none; position: relative; transition: background .2s, color .2s; }
#rail a span { opacity: 0; transition: opacity .15s; } #rail:hover a span { opacity: 1; transition-delay: .08s; }
#rail a svg { flex: 0 0 22px; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#rail a:hover { background: var(--hover); color: var(--ink); }
#rail a.on { color: var(--aqua); background: linear-gradient(90deg, color-mix(in srgb, var(--aqua) 16%, transparent), transparent); }
#rail a.on::before { content: ''; position: absolute; left: -8px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--aqua); }
#rail .rail-bottom { margin-top: auto; }

/* ---------- main view ---------- */
#view { position: fixed; z-index: 10; top: var(--top); left: var(--rail); right: 0; bottom: var(--live, 0px); overflow: auto; outline: none; }
body.route-map #view { overflow: hidden; pointer-events: none; }
.page { padding: 26px 30px 60px; max-width: 1560px; margin: 0 auto; animation: rise .45s ease; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font: 700 30px/1.1 var(--display); margin: 0; letter-spacing: -.01em; }
.page-head p { margin: 6px 0 0; color: var(--ink2); max-width: 820px; }
.eyebrow { font: 600 11px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--aqua); }
h2.sec { font: 600 18px var(--display); margin: 30px 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2.sec small { font: 500 12px var(--font); color: var(--ink3); }

/* ---------- panels & cards ---------- */
.glass { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); backdrop-filter: var(--blur); box-shadow: var(--shadow-sm); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: 18px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.card h3 { margin: 0 0 10px; font: 600 15px var(--display); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card h3 small { font: 500 11px var(--font); color: var(--ink3); }
.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)); } .g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .span4 { grid-column: 1 / -1; }
@media (max-width: 1200px) { .g4, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } .span3 { grid-column: 1 / -1; } .clock, #live-pill { display: none; } }
@media (max-width: 900px) { .brand-text, .prefs-chip span { display: none; } }
/* The VARUNA logo is never squeezed (the name was once cut to "VARU" in French at 1440 px): the long labels on the right
   give way first (territories, live status end in "…"), the clock goes below 1500 px and "by Bay of Arabia" shows from
   1600 px. */
.brand, .brand .vlogo, .vl-mark, .vl-name { flex-shrink: 0; }
.top-right { min-width: 0; }
#terr-btn, #live-pill { min-width: 0; max-width: 260px; }
#terr-label, #live-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1599px) { .brand-text { display: none; } }
/* Wide screens: the search box keeps room for its placeholder (it was 160 px at 1783 px, "Search t"); the territory
   and live-status chips end in "…" a little earlier instead (review of 26 Oct 2026). */
@media (min-width: 1400px) { .search-wrap { min-width: 280px; } }
@media (max-width: 1499px) { .clock { display: none; } }
/* Phones: a smaller name and logo, tighter gaps, the account as its initial only, and the search box takes what is left. */
@media (max-width: 760px) {
  #topbar { gap: 8px; padding-right: 8px; }
  .brand { gap: 6px; } .brand .vlogo { font-size: 16px; gap: 6px; } .brand .vl-mark { width: 28px; height: 28px; } .brand .vl-name { letter-spacing: .1em; }
  .search-wrap { min-width: 40px; }
  .search-wrap:focus-within { position: fixed; top: 12px; left: 8px; right: 8px; max-width: none; min-width: 0; z-index: 45; } /* the magnifier opens a full-width search */
  .search-wrap:not(:focus-within) #q { padding: 0; color: transparent; } .search-wrap:not(:focus-within) #q::placeholder { color: transparent; }
  .account:has(.av) { padding: 0 5px; } .account:has(.av) #account-label { font-size: 0; } .account .av { margin-left: 0; }
}
@media (max-width: 480px) { #terr-btn { display: none; } } /* the territories stay in the Tenders filters and in Preferences */
@media (max-width: 760px) { .g2, .g3, .g4, .g6 { grid-template-columns: 1fr; } .span2, .span3 { grid-column: auto; } :root { --rail: 0px; } #rail { display: none; } .page { padding: 18px 16px 60px; } .search-wrap kbd, .theme-switch, .lang { display: none; } }

.kpi { padding: 16px 18px; }
.kpi .v { font: 700 30px/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--ink3); font-size: 12px; margin-top: 2px; }
.kpi .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--aqua), var(--violet)); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }

/* ---------- buttons, chips, badges ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--field); color: var(--ink); font-weight: 500; white-space: nowrap; transition: border-color .2s, background .2s, transform .1s; text-decoration: none !important; }
.btn:hover { border-color: var(--aqua); background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--primary-grad); border-color: transparent; color: #fff; box-shadow: 0 6px 20px color-mix(in srgb, var(--aqua) 22%, transparent); }
.btn.danger { color: var(--coral); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn.ghost { background: transparent; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn.on { border-color: var(--aqua); color: var(--aqua); }
.star { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line2); background: var(--field); color: var(--ink3); display: inline-grid; place-items: center; }
.star svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.star.on { color: var(--amber); border-color: var(--amber); } .star.on svg { fill: currentColor; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line2); background: var(--field); color: var(--ink2); font-size: 12px; cursor: pointer; user-select: none; transition: all .15s; white-space: nowrap; }
.chip:hover { color: var(--ink); background: var(--hover); }
.chip.on { color: var(--on-accent); background: var(--aqua); border-color: var(--aqua); font-weight: 600; }
.chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chip .x { opacity: .7; margin-left: 2px; }
.chip b { font: 600 11px var(--mono); opacity: .85; }
.badge { --c: var(--ink3); display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; font: 600 11px/1.6 var(--font); letter-spacing: .02em; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.badge.core { --c: var(--core); } .badge.related { --c: var(--violet-ink); } .badge.exploratory { --c: var(--amber); } .badge.none, .badge.closed, .badge.unknown { --c: var(--ink3); }
.badge.open { --c: var(--green); } .badge.closing { --c: var(--coral); } .badge.upcoming { --c: var(--blue-ink); } .badge.awarded { --c: var(--pink); }
.badge.extended { --c: var(--amber); } .badge.cancelled { --c: var(--coral); text-decoration: line-through; } .badge.retendered { --c: var(--violet-ink); }
.badge.project, .badge.plan, .badge.signal, .badge.test, .badge.funder { --c: var(--teal); }
.badge.new { --c: var(--coral); }
/* Light appearance: badge text a shade darker than its tint, so small labels keep a 4.5:1 contrast. */
[data-theme="light"] .badge { color: color-mix(in srgb, var(--c) 78%, #000); }
.badge.stale { --c: var(--amber); cursor: help; } .badge.stale::before { content: '⚠'; }
.amt-doubt { color: var(--amber); cursor: help; margin-left: 5px; font-size: 13px; }
.ns { color: var(--ink3); font-style: italic; }
.ns::before { content: '◌ '; font-style: normal; }

/* ---------- inputs ---------- */
.field { display: grid; gap: 6px; }
.field > label, label.lab { font-size: 11px; color: var(--ink3); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.inp, select.inp, textarea.inp { height: 36px; border-radius: 10px; border: 1px solid var(--line2); background: var(--field); padding: 0 12px; outline: none; min-width: 0; color: var(--ink); }
textarea.inp { height: auto; padding: 10px 12px; font: 13px/1.5 var(--font); resize: vertical; }
.inp:focus { border-color: var(--aqua); box-shadow: 0 0 0 3px color-mix(in srgb, var(--aqua) 14%, transparent); }
select.inp { padding-right: 28px; }
input[type=checkbox], input[type=radio], input[type=range] { accent-color: var(--aqua); }
.tg { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 12.5px; color: var(--ink2); cursor: pointer; user-select: none; }
.tg input { display: none; }
.tg .sw { width: 30px; height: 17px; border-radius: 10px; background: var(--line2); position: relative; flex: 0 0 auto; transition: background .2s; }
.tg .sw::after { content: ''; position: absolute; left: 2px; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--surface-solid); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.tg input:checked + .sw { background: var(--aqua); }
.tg input:checked + .sw::after { transform: translateX(13px); }
.tg:hover { color: var(--ink); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--field); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { border: 0; background: none; color: var(--ink2); padding: 5px 11px; border-radius: 8px; font-size: 12px; font-weight: 500; }
.seg button.on { background: color-mix(in srgb, var(--aqua) 18%, transparent); color: var(--ink); font-weight: 600; }
.seg.sm button { padding: 3px 8px; font-size: 11px; }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl th { position: sticky; top: 0; z-index: 1; text-align: left; font: 600 11px var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--ink3); padding: 10px 12px; background: var(--surface3); border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr.row { cursor: pointer; transition: background .15s; }
.tbl tr.row:hover td { background: var(--hover); }
.tbl .t-title { font-weight: 600; color: var(--ink); line-height: 1.35; }
.tbl .t-sub { color: var(--ink3); font-size: 12px; margin-top: 3px; }
.tbl .t-sub b { color: var(--ink2); font-weight: 600; }
.tbl tr.fresh td { animation: flash 2.4s ease; }

/* ---------- countdown ---------- */
.cd { display: inline-flex; flex-direction: column; gap: 3px; min-width: 120px; }
.cd .when { font: 600 12px var(--mono); }
.cd .left { font-size: 11px; color: var(--ink3); }
.cd .track { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.cd .track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--green), var(--amber), var(--coral)); }
.cd.over .when { color: var(--ink3); text-decoration: line-through; }

/* ---------- popovers, drawer, modal, toasts ---------- */
.pop { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 50; max-height: min(72vh, 640px); overflow: auto; padding: 8px; background: var(--surface2); border: 1px solid var(--line2); border-radius: 16px; backdrop-filter: blur(18px); box-shadow: var(--shadow); }
.pop .grp { padding: 8px 10px 4px; font: 600 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--aqua); display: flex; justify-content: space-between; gap: 10px; }
.pop .it { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--ink); text-decoration: none !important; }
.pop .it:hover, .pop .it.sel { background: var(--hover); }
.pop .it .s { color: var(--ink3); font-size: 12px; }
.pop .nlq { margin: 4px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--aqua) 9%, transparent); border: 1px solid var(--line2); cursor: pointer; }
#drawer { position: fixed; z-index: 60; top: var(--top); right: 0; bottom: 0; width: min(780px, 100vw); transform: translateX(105%); transition: transform .45s cubic-bezier(.2, .8, .2, 1); background: var(--surface-solid); border-left: 1px solid var(--line2); box-shadow: -30px 0 80px color-mix(in srgb, #000 35%, transparent); overflow: auto; }
#drawer.open { transform: none; }
#modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: var(--scrim); backdrop-filter: blur(3px); padding: 16px; }
#modal[hidden] { display: none; }
.modal { width: min(460px, 100%); max-height: 90vh; overflow: auto; padding: 24px; border-radius: 20px; background: var(--surface-solid); border: 1px solid var(--line2); box-shadow: var(--shadow); animation: rise .3s ease; }
.modal h2 { font: 700 22px var(--display); margin: 0 0 6px; }
.modal .field { margin-top: 12px; } .modal .inp { width: 100%; }
/* Sign-in wall: the only page a visitor sees when the portal needs an account */
body.gated #topbar, body.gated #rail, body.gated #view, body.gated #map { display: none; }
#gate { position: fixed; inset: 0; z-index: 89; display: grid; place-items: center; padding: 24px 16px; overflow: auto; background: var(--page-bg); }
.gate-card { width: min(400px, 100%); display: grid; justify-items: center; gap: 10px; text-align: center; }
.gate-card h1.gate-logo { margin: 0 0 6px; font-size: inherit; font-weight: inherit; }
.gate-card .vlogo { font-size: 44px; }
.gate-card form { width: 100%; display: grid; gap: 14px; margin-top: 12px; padding: 22px; border-radius: 18px; background: var(--surface-solid); border: 1px solid var(--line2); box-shadow: var(--shadow); text-align: left; }
.gate-card .inp { width: 100%; }
.gate-go { justify-content: center; width: 100%; }
.gate-note { font-size: 12.5px; max-width: 340px; margin: 4px 0 0; }
.gate-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: 8px; }
.gate-by { display: flex; align-items: center; gap: 8px; color: var(--ink3); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.gate-by img { height: 28px; width: auto; }
#toasts { position: fixed; z-index: 90; right: 18px; bottom: calc(18px + var(--live, 0px)); display: grid; gap: 8px; width: min(380px, calc(100vw - 36px)); }
.toast { padding: 12px 14px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line2); box-shadow: var(--shadow); animation: rise .35s ease; font-size: 13px; cursor: pointer; }
.toast b { color: var(--aqua); }
.toast .s { color: var(--ink3); font-size: 12px; margin-top: 2px; }
.skel { background: linear-gradient(90deg, var(--line), var(--line2), var(--line)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 10px; min-height: 16px; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink3); }
.note { padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--aqua) 6%, transparent); border: 1px solid var(--line); color: var(--ink2); font-size: 13px; }
.note.warn { background: color-mix(in srgb, var(--amber) 9%, transparent); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.offline-banner { position: fixed; z-index: 5000; top: 12px; left: 50%; translate: -50% 0; width: min(680px, calc(100% - 32px)); padding: 14px 18px; border-radius: 14px; background: var(--surface-solid); border: 1px solid color-mix(in srgb, var(--amber) 50%, transparent); color: var(--ink); font-size: 14px; line-height: 1.5; box-shadow: var(--shadow); }
.offline-banner b { color: var(--amber); }
.offline-banner .muted { font-size: 12px; margin-top: 4px; }
.chart { width: 100%; height: 300px; }
.chart.tall { height: 420px; } .chart.short { height: 220px; }
.split { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.kv { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; gap: 0; font-size: 13px; }
.kv > div { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.kv > div:nth-child(odd) { color: var(--ink3); }
.kv .ev { display: block; font-size: 11px; color: var(--ink3); margin-top: 2px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--ink3); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; }
.tabs button.on { color: var(--aqua); border-bottom-color: var(--aqua); }
/* On a phone the tabs wrap onto a second line rather than scrolling out of sight (Data Library, tender page). */
@media (max-width: 760px) { .tabs { flex-wrap: wrap; overflow-x: visible; } .tabs button { padding: 8px 10px; } }
.dotlive { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; margin-right: 6px; vertical-align: middle; }

/* ---------- phones: the menu becomes a bar along the bottom ---------- */
@media (max-width: 760px) {
  #rail { display: flex; top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: 58px; flex-direction: row; gap: 2px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); overflow-x: auto; border-right: 0; border-top: 1px solid var(--line); }
  #rail:hover { width: 100%; box-shadow: none; }
  #rail a { flex: 0 0 auto; height: 44px; padding: 0 12px; } #rail a span { display: none; } #rail a.on::before { display: none; }
  #rail .rail-bottom { margin-top: 0; }
  #view, #map { bottom: 58px; }
  #drawer { bottom: 58px; }
  .page-head h1 { font-size: 24px; }
  .explorer, .dm-layout, .cal-layout { grid-template-columns: minmax(0, 1fr); }
}
.view-root { min-height: 100%; }

/* ---------- territories in the yearly subscription ---------- */
.terr-ico { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.chip.terr { cursor: default; }
.chip.terr.locked { cursor: pointer; color: var(--ink3); border-style: dashed; background: transparent; }
.chip.terr.locked:hover, .chip.terr.locked:focus-visible { color: var(--ink); border-color: var(--amber); outline: none; }
.chip.terr.locked .terr-ico { color: var(--amber); }
.terr-btn { color: var(--ink); }
.sub-card { margin-bottom: 16px; }
.sub-card h3 { display: flex; align-items: center; gap: 8px; }
.sub-card h3 .terr-ico { width: 18px; height: 18px; color: var(--aqua); }
.sub-line { margin: 0 0 10px; }
.terr-regions { display: grid; gap: 12px; margin: 14px 0 6px; }
.terr-region .eyebrow { margin-bottom: 6px; }
.terr-title { display: flex; align-items: center; gap: 8px; }
.terr-title .terr-ico { width: 20px; height: 20px; color: var(--amber); }
.terr-pin { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; border: 1px dashed var(--amber); background: var(--surface-solid); color: var(--ink2); font-size: 11px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm); }
.terr-pin .terr-ico { width: 12px; height: 12px; color: var(--amber); }
.terr-pin:hover { color: var(--ink); }

/* ---------- my dashboard and add-ons ---------- */
.dash-search { display: flex; gap: 8px; min-width: min(460px, 100%); }
.dash-search .inp { flex: 1; }
.dash-kpis { margin-bottom: 16px; }
.dash-kpis a.kpi { color: inherit; text-decoration: none; }
.dash-kpis a.kpi:hover { border-color: var(--aqua); }
.dash-main { margin-bottom: 16px; }
.dash-track { margin-bottom: 16px; }
.dash-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dash-h h3 { margin: 0; }
.dash-h .spacer { flex: 1; }
.dash-list { display: grid; }
.dash-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
.dash-row:first-child { border-top: 0; }
.dash-row:hover { background: var(--hover); }
.dash-row .t-title { font-weight: 600; line-height: 1.3; }
.dash-row .t-sub { color: var(--ink3); font-size: 12px; margin-top: 2px; }
.addon-cards { gap: 10px; }
.addon-card { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 12px; color: inherit; text-decoration: none; background: var(--field); }
.addon-card:hover { border-color: var(--aqua); }
.addon-card .muted { font-size: 12px; }
.addons-card { margin-bottom: 16px; }
.addon-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.addon { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 12px; cursor: pointer; }
.addon.on { border-color: var(--aqua); }
.addon.tg { align-items: flex-start; padding: 10px 12px; font-size: 13px; }
.addon .addon-txt { display: grid; gap: 3px; }
.addon .addon-txt .muted { font-size: 12px; }
.addon-off { max-width: 720px; }
@media (max-width: 760px) { .dash-row { grid-template-columns: 1fr; } }

/* ---------- documents: how to get them, and where each button leads ---------- */
.doc-how { margin-bottom: 12px; }
.doc-how ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.doc-how .btn.sm { margin-left: 6px; }
.doc .doc-txt { flex: 1; min-width: 0; }
.doc .doc-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* The link to the official notice names the portal and the tender ID: on a narrow screen it wraps, and the button grows
   with it (a .btn is otherwise one 36 px line). */
.dt-actions .btn.primary { white-space: normal; text-align: left; height: auto; min-height: 36px; padding-top: 8px; padding-bottom: 8px; line-height: 1.35; overflow-wrap: anywhere; max-width: 100%; }
#rail a[hidden] { display: none; }
.sub-card h3 { justify-content: flex-start; }
/* Admin → Sign-in activity: attempts from an address or email with repeated failures */
.tbl tr.flag td { background: color-mix(in srgb, var(--coral) 7%, transparent); }
.tbl tr.flag td:first-child { box-shadow: inset 3px 0 0 var(--coral); }
/* Privacy notice (page and sign-in dialog) */
.privacy h3 { font-size: 15px; margin: 18px 0 6px; }
.privacy ul { margin: 4px 0 8px; padding-left: 20px; }
.privacy li { margin: 3px 0; }
.privacy p, .privacy li { font-size: 13.5px; line-height: 1.55; color: var(--ink2); }
.privacy-scroll { max-height: min(62vh, 640px); overflow: auto; padding-right: 6px; }

/* ---------- previews of built countries not unlocked for this account ---------- */
.chip.terr.preview { cursor: pointer; color: var(--ink2); border-style: dashed; border-color: var(--aqua); background: transparent; }
.chip.terr.preview .terr-ico { color: var(--aqua); }
.chip.terr.preview:hover, .chip.terr.preview:focus-visible { color: var(--ink); background: var(--hover); outline: none; }
.badge.teaser-badge { background: color-mix(in srgb, var(--aqua) 16%, transparent); color: var(--aqua); border: 1px solid color-mix(in srgb, var(--aqua) 40%, transparent); }
.teaser-counts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink2); margin: 6px 0; }
.teaser-counts b { color: var(--ink); font-size: 15px; }
.teaser-samples { display: grid; gap: 6px; margin-top: 6px; }
.teaser-sample { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 10px; color: inherit; text-decoration: none; }
.teaser-sample:hover { border-color: var(--aqua); }
.teaser-sample .t { font-weight: 600; line-height: 1.3; }
.teaser-sample .muted { font-size: 12px; }
.teaser-card { margin-bottom: 16px; }
.teaser-grid { gap: 12px; }
.teaser-country { border: 1px solid var(--line2); border-radius: 12px; padding: 12px; }
.teaser-country .tc-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.teaser-cta { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 14px; border: 1px dashed var(--aqua); border-radius: 12px; background: color-mix(in srgb, var(--aqua) 6%, transparent); }
.teaser-cta p { margin: 4px 0 10px; color: var(--ink2); }
.teaser-lock .terr-ico { width: 22px; height: 22px; color: var(--aqua); }
.teaser-dt .teaser-body { padding: 4px 2px; }
.terr-pin.preview { border-color: var(--aqua); color: var(--ink); }

/* ---------- Map tour: top-bar button + floating drop-down player (public/js/tour.js) ---------- */
/* a page shows the button only when it has its own video guide (GUIDES in tour.js) */
.tour-btn[hidden] { display: none; }
.tour-btn { position: relative; height: 32px; padding: 0 12px 0 5px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12.5px; font-weight: 600; color: var(--ink);
  border: 1px solid transparent; background: linear-gradient(var(--field), var(--field)) padding-box, linear-gradient(120deg, var(--aqua), var(--violet)) border-box; transition: box-shadow .25s, transform .2s; }
.tour-btn:hover { box-shadow: 0 0 0 4px color-mix(in srgb, var(--aqua) 14%, transparent), 0 6px 18px color-mix(in srgb, var(--violet) 22%, transparent); transform: translateY(-1px); }
.tour-btn.on { background: linear-gradient(120deg, color-mix(in srgb, var(--aqua) 16%, var(--field)), color-mix(in srgb, var(--violet) 16%, var(--field))) padding-box, linear-gradient(120deg, var(--aqua), var(--violet)) border-box; }
.tour-len { font: 600 10.5px var(--mono); color: var(--ink3); padding-left: 7px; border-left: 1px solid var(--line2); }
.tour-drop { position: relative; width: 24px; height: 24px; display: grid; place-items: center; }
.tour-drop svg { width: 22px; height: 22px; position: relative; z-index: 1; filter: drop-shadow(0 2px 4px color-mix(in srgb, var(--aqua) 40%, transparent)); }
.tour-drop .drop { fill: var(--aqua); }
.tour-drop .tri { fill: var(--on-accent); }
.tour-drop i { position: absolute; inset: 1px; border-radius: 50%; border: 1.5px solid var(--aqua); opacity: 0; pointer-events: none; }
.tour-btn.fresh .tour-drop i, .tour-btn:hover .tour-drop i { animation: tour-ripple 2.4s ease-out infinite; }
.tour-btn.fresh .tour-drop i + i, .tour-btn:hover .tour-drop i + i { animation-delay: 1.2s; }
@keyframes tour-ripple { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.1); opacity: 0; } }

.tour-player { position: fixed; z-index: 60; width: min(384px, calc(100vw - 24px)); --caret-x: 50%; filter: drop-shadow(0 22px 44px rgba(0, 0, 0, .38)) drop-shadow(0 0 1px color-mix(in srgb, var(--aqua) 60%, transparent)); }
.tour-player[hidden] { display: none; }
.tp-frame { position: relative; border-radius: 20px; padding: 12px 12px 10px; overflow: hidden; border: 1.5px solid transparent;
  background: radial-gradient(120% 70% at var(--caret-x) -10%, color-mix(in srgb, var(--aqua) 16%, transparent), transparent 60%) padding-box,
              linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box,
              linear-gradient(150deg, var(--aqua), color-mix(in srgb, var(--aqua) 30%, var(--violet)) 55%, var(--violet)) border-box; }
.tp-caret { position: absolute; top: -7px; left: calc(var(--caret-x) - 8px); width: 16px; height: 16px; rotate: 45deg; border-radius: 4px 0 0 0; z-index: 1;
  background: linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box, linear-gradient(135deg, var(--aqua), var(--aqua)) border-box; border: 1.5px solid transparent; border-right: 0; border-bottom: 0; }
.tp-drip { position: absolute; top: -14px; left: calc(var(--caret-x) - 5px); width: 10px; height: 13px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: linear-gradient(var(--aqua), var(--violet)); opacity: 0; z-index: 2; pointer-events: none; }

.tp-head { display: flex; align-items: center; gap: 10px; margin: 0 2px 10px; }
.tp-mark { width: 26px; height: 26px; fill: none; stroke: var(--aqua); stroke-width: 3.5; stroke-linecap: round; flex: none; }
.tp-mark path { stroke: var(--violet); }
.tp-names { display: grid; line-height: 1.25; min-width: 0; }
.tp-title { font: 700 13.5px var(--display); letter-spacing: .01em; color: var(--ink); }
.tp-sub { font-size: 11.5px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-eq { margin-left: auto; display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.tp-eq i { width: 3px; height: 4px; border-radius: 2px; background: linear-gradient(var(--aqua), var(--violet)); opacity: .5; transition: height .3s; }
.tour-player.playing .tp-eq i { opacity: 1; animation: tp-eq 1s ease-in-out infinite; }
.tour-player.playing .tp-eq i:nth-child(2) { animation-delay: -.3s; }
.tour-player.playing .tp-eq i:nth-child(3) { animation-delay: -.6s; }
.tour-player.playing .tp-eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes tp-eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* language strip on the frame: one tab per spoken language (with its length); a liquid pill slides under the one chosen */
.tp-langs { position: relative; display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); margin: 0 0 10px; padding: 3px; border-radius: 999px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line2); isolation: isolate; }
.tp-langs[hidden] { display: none; }
.tp-slide { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n, 2)); border-radius: 999px; overflow: hidden;
  background: linear-gradient(120deg, var(--aqua), var(--violet)); box-shadow: 0 4px 14px color-mix(in srgb, var(--aqua) 35%, transparent);
  transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .55s cubic-bezier(.34, 1.4, .5, 1); }
.tp-slide i { position: absolute; inset: 0 -20%; background: radial-gradient(45% 130% at 10% 130%, rgba(255, 255, 255, .34), transparent 60%), radial-gradient(40% 120% at 90% -30%, rgba(255, 255, 255, .22), transparent 60%); animation: tp-slosh 4s ease-in-out infinite alternate; }
@keyframes tp-slosh { from { transform: translateX(-10%); } to { transform: translateX(10%); } }
.tp-lang { position: relative; z-index: 1; min-width: 0; height: 30px; padding: 0 10px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 999px; background: none; color: var(--ink2); font-size: 12px; font-weight: 600; cursor: pointer; transition: color .3s; }
.tp-lang:hover { color: var(--ink); }
.tp-lang.on { color: var(--on-accent); }
.tp-lang:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.tp-code { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; border: 1.5px solid currentColor; font: 800 8.5px var(--mono); letter-spacing: .04em; opacity: .8; transition: background .3s, color .3s, border-color .3s; }
.tp-lang.on .tp-code { opacity: 1; background: var(--on-accent); border-color: var(--on-accent); color: var(--violet); }
.tour-player.playing .tp-lang.on .tp-code { animation: tp-voice 1.6s ease-in-out infinite; }
@keyframes tp-voice { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--on-accent) 55%, transparent); } 60% { box-shadow: 0 0 0 5px transparent; } }
.tp-lname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-ldur { font: 600 10.5px var(--mono); opacity: .7; font-variant-numeric: tabular-nums; }

.tp-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 13px; overflow: hidden; background: #02070e; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line2); }
.tp-screen video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-screen::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 -40px 50px -30px rgba(2, 8, 18, .55); }
.tp-shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .10) 48%, transparent 60%); translate: -100% 0; }
.tour-player.entering .tp-shine { animation: tp-shine 1.1s .45s ease-out both; }
@keyframes tp-shine { to { translate: 100% 0; } }
.tp-big { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 58px; height: 58px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28); display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .28), rgba(255, 255, 255, .06)); backdrop-filter: blur(6px); color: #fff; transition: opacity .25s, scale .25s; box-shadow: 0 8px 26px rgba(0, 0, 0, .35); }
.tp-big svg { width: 26px; height: 26px; margin-left: 3px; }
.tour-player.playing .tp-big { opacity: 0; scale: .85; pointer-events: none; }
.tour-player.playing .tp-screen:hover .tp-big { opacity: .9; scale: 1; }
.tour-player.playing .tp-big svg { margin-left: 0; }
/* changing language: the new video washes in from its tab's side, with a ring spreading like a ripple */
.tp-screen.swapping video { animation: tp-wipe .75s cubic-bezier(.3, .8, .3, 1) both; }
@keyframes tp-wipe { from { clip-path: circle(0% at var(--wipe-x, 50%) 50%); filter: saturate(1.5) brightness(1.2); } to { clip-path: circle(150% at var(--wipe-x, 50%) 50%); filter: none; } }
.tp-ripple { position: absolute; left: var(--wipe-x, 50%); top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--aqua) 75%, #fff); opacity: 0; pointer-events: none; }
.tp-screen.swapping .tp-ripple { animation: tp-ring .85s ease-out both; }
@keyframes tp-ring { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(14); } }

.tp-level { height: 16px; margin: 8px 2px 2px; }
.tp-level svg { width: 100%; height: 100%; display: block; overflow: hidden; }
.tp-wave path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.tp-wave.base path { stroke: var(--line2); stroke-width: 2; }
.tp-wave.on path { stroke: url(#tp-grad); stroke-width: 3; }
#tp-grad .s1 { stop-color: var(--aqua); }
#tp-grad .s2 { stop-color: var(--violet); }
.tp-wave { animation: tp-flow 7s linear infinite; animation-play-state: paused; }
.tour-player.playing .tp-wave { animation-play-state: running; }
@keyframes tp-flow { to { transform: translateX(-400px); } }
.tp-fill { transition: width .35s linear; }

.tp-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.tp-time { font: 600 11px var(--mono); color: var(--ink3); min-width: 74px; font-variant-numeric: tabular-nums; }
.tp-transport, .tp-sound { display: inline-flex; align-items: center; gap: 5px; }
.tp-bar button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line2); background: var(--field); color: var(--ink2); display: grid; place-items: center; transition: border-color .2s, color .2s, transform .15s, background .2s; }
.tp-bar button:hover { border-color: var(--aqua); color: var(--ink); }
.tp-bar button:active { transform: scale(.92); }
.tp-bar svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tp-bar svg .fill, .tp-big svg .fill { fill: currentColor; stroke: none; }
.tp-bar svg text { font: 800 6.6px var(--font); fill: currentColor; stroke: none; text-anchor: middle; }
.tp-bar .tp-play { width: 40px; height: 40px; border: 0; color: var(--on-accent); background: linear-gradient(135deg, var(--aqua), var(--violet)); box-shadow: 0 6px 18px color-mix(in srgb, var(--aqua) 35%, transparent); }
.tp-bar .tp-play:hover { color: var(--on-accent); filter: brightness(1.08); }
.tp-bar .tp-play svg { width: 19px; height: 19px; }
.tp-meter { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; padding: 0 2px; }
.tp-meter i { width: 3.5px; border-radius: 2px; background: var(--line2); transition: background .2s; }
.tp-meter i:nth-child(1) { height: 5px; }
.tp-meter i:nth-child(2) { height: 7px; }
.tp-meter i:nth-child(3) { height: 9px; }
.tp-meter i:nth-child(4) { height: 11px; }
.tp-meter i:nth-child(5) { height: 13px; }
.tp-meter i:nth-child(6) { height: 15px; }
.tp-meter i.on { background: linear-gradient(var(--violet), var(--aqua)); }

/* docked pages (dashboard): the player lives in the empty band left of the page; a drop flies there from the button,
   splashes, and the window unfurls from the landing point. When the band is too narrow, the page slides right for it. */
.tour-player.docked .tp-caret, .tour-player.docked .tp-drip { display: none; }
.tour-player.docked.entering .tp-frame { animation-delay: 0s; }
.tp-flight { position: fixed; left: 0; top: 0; z-index: 61; pointer-events: none; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: linear-gradient(var(--aqua), var(--violet)); box-shadow: 0 0 14px color-mix(in srgb, var(--aqua) 65%, transparent); }
.tp-splash { position: fixed; z-index: 61; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; pointer-events: none;
  border: 2px solid var(--aqua); animation: tp-splash .65s ease-out both; }
@keyframes tp-splash { 0% { opacity: .95; transform: scale(.3); } 100% { opacity: 0; transform: scale(4.2); border-width: 1px; } }
#view { transition: padding-left .55s cubic-bezier(.3, .8, .3, 1); }
body.guide-push #view { padding-left: var(--guide-push, 0px); }

/* the drop falls from the button, then the window unfurls from the caret; closing pours it back up */
.tour-player.entering .tp-drip { animation: tp-drip .42s cubic-bezier(.5, 0, .9, .4) both; }
.tour-player.entering .tp-frame, .tour-player.entering .tp-caret { animation: tp-unfurl .78s .22s cubic-bezier(.2, .9, .25, 1.06) both; }
.tour-player.leaving .tp-frame, .tour-player.leaving .tp-caret { animation: tp-pour .4s cubic-bezier(.5, 0, .75, .2) both; }
@keyframes tp-drip { 0% { opacity: 0; translate: 0 -26px; scale: .5 .7; } 40% { opacity: 1; } 85% { opacity: 1; translate: 0 6px; scale: 1 1.15; } 100% { opacity: 0; translate: 0 10px; scale: 1.8 .4; } }
@keyframes tp-unfurl { 0% { clip-path: circle(0 at var(--caret-x) 0); opacity: .6; translate: 0 -8px; } 60% { opacity: 1; } 100% { clip-path: circle(160% at var(--caret-x) 0); opacity: 1; translate: 0 0; } }
@keyframes tp-pour { 0% { clip-path: circle(160% at var(--caret-x) 0); opacity: 1; } 100% { clip-path: circle(0 at var(--caret-x) 0); opacity: .3; translate: 0 -10px; } }
@media (prefers-reduced-motion: reduce) {
  .tour-player.entering .tp-frame, .tour-player.entering .tp-caret, .tour-player.leaving .tp-frame, .tour-player.leaving .tp-caret { animation: none; }
  .tour-player.entering .tp-drip, .tour-btn .tour-drop i, .tp-wave, .tour-player.playing .tp-eq i, .tour-player.entering .tp-shine { animation: none !important; }
  .tp-slide i, .tour-player.playing .tp-lang.on .tp-code, .tp-screen.swapping video, .tp-screen.swapping .tp-ripple { animation: none !important; }
  .tp-slide, #view { transition: none; }
  .tp-splash { display: none; }
}
@media (max-width: 1800px) { .tour-len { display: none; } }
@media (max-width: 1560px) { .tour-label { display: none; } .tour-btn { padding: 0; width: 34px; justify-content: center; } }
@media (max-width: 420px) { .tp-ldur { display: none; } .tp-time { min-width: 0; font-size: 10px; } .tp-bar button { width: 27px; height: 27px; } .tp-bar .tp-play { width: 36px; height: 36px; } }

/* ---------- VARUNA Live: the shared bar at the foot of every page (public/js/livebar.js) ---------- */
body.has-live { --live: 34px; }
/* Deep green, the same in light and dark themes; text and labels chosen for contrast on it (owner, 22 Oct 2026). */
#livebar, #livebar-pill { --lb-bg: linear-gradient(90deg, #064e3b, #065f46 40%, #047857); --lb-ink: #ecfdf5; --lb-ink2: #d1fae5; --lb-src: #b7e4d2; --lb-line: rgba(236, 253, 245, .22); }
#livebar { position: fixed; z-index: 25; left: var(--rail); right: 0; bottom: 0; height: var(--live, 34px); display: flex; align-items: center; gap: 10px; padding: 0 6px 0 10px;
  background: var(--lb-bg); border-top: 1px solid #022c22; box-shadow: 0 -4px 14px rgba(2, 44, 34, .18); font-size: 12.5px; color: var(--lb-ink2); }
#livebar[hidden], #livebar-pill[hidden] { display: none; }
.lb-tag { display: inline-flex; align-items: center; gap: 7px; flex: none; font: 700 11px var(--display, var(--font)); letter-spacing: .08em; text-transform: uppercase; color: #ffffff; padding-right: 10px; border-right: 1px solid var(--lb-line); }
.lb-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(187, 247, 208, .7); animation: lb-beat 2.4s ease-out infinite; flex: none; display: inline-block; }
@keyframes lb-beat { 0% { box-shadow: 0 0 0 0 rgba(187, 247, 208, .65); } 70%, 100% { box-shadow: 0 0 0 7px rgba(187, 247, 208, 0); } }
.lb-track { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.lb-run { display: inline-flex; white-space: nowrap; animation: lb-scroll var(--lb-dur, 120s) linear infinite; will-change: transform; }
.lb-set { display: inline-flex; align-items: center; padding-right: 28px; }
@keyframes lb-scroll { to { transform: translateX(-50%); } }
#livebar:hover .lb-run, #livebar:focus-within .lb-run { animation-play-state: paused; }
.lb-item { display: inline-flex; align-items: baseline; gap: 7px; color: var(--lb-ink); text-decoration: none; padding: 2px 6px; border-radius: 6px; }
a.lb-item:hover, a.lb-item:focus-visible { color: #ffffff; background: rgba(255, 255, 255, .14); outline: none; } a.lb-item:hover .lb-text { text-decoration: underline; text-underline-offset: 2px; }
.lb-label { font-weight: 700; font-size: 11px; letter-spacing: .03em; text-transform: uppercase; }
.lb-src { font-style: normal; font-size: 11px; color: var(--lb-src); }
.lb-sep { color: rgba(236, 253, 245, .45); padding: 0 12px; }
.lb-item.t-new .lb-label { color: #bae6fd; }
.lb-item.t-closing .lb-label { color: #fde68a; }
.lb-item.t-change .lb-label { color: #ddd6fe; }
.lb-item.t-award .lb-label { color: #fef9c3; }
.lb-item.t-project .lb-label { color: #bfdbfe; }
.lb-item.t-figures .lb-label, .lb-item.t-status .lb-label { color: #ffffff; }
.lb-item.t-varuna .lb-label { color: #a5f3fc; }
.lb-btn { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--lb-ink2); cursor: pointer; font-size: 14px; line-height: 1; }
.lb-btn:hover, .lb-btn:focus-visible { border-color: var(--lb-line); color: #ffffff; background: rgba(255, 255, 255, .14); outline: none; }
#livebar-pill { position: fixed; z-index: 25; left: calc(var(--rail) + 12px); bottom: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid #022c22; background: var(--lb-bg); color: #ffffff; font: 700 11px var(--font); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; box-shadow: 0 4px 14px rgba(2, 44, 34, .3); }
/* Sign-in page: one insight — tenders open now, out of every record (owner, 24 Oct 2026) */
.gate-insight { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0 2px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface-solid); color: var(--ink2); font-size: 13px; line-height: 1.4; }
.gate-insight b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.gate-insight[hidden] { display: none; }
.gate-insight.waiting { visibility: hidden; } /* its place is kept while the counts load (no jump) */
@media (prefers-reduced-motion: reduce) {
  .lb-run { animation: none; } .lb-set[aria-hidden="true"] { display: none; } .lb-track { overflow-x: auto; mask-image: none; } .lb-dot { animation: none; }
}
@media (max-width: 760px) { .lb-tag { font-size: 10px; padding-right: 6px; } .lb-src { display: none; } }
