/* 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: #5d738d; --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); }
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: 0; 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; }

/* ---------- 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-ring svg { width: 120px; height: 120px; fill: none; stroke-width: 3; stroke-linecap: round; }
.boot-ring .r1 { stroke: color-mix(in srgb, var(--aqua) 30%, transparent); stroke-dasharray: 60 280; animation: spin 2.4s linear infinite; transform-origin: center; }
.boot-ring .r2 { stroke: color-mix(in srgb, var(--violet) 55%, transparent); stroke-dasharray: 30 220; animation: spin 1.6s linear infinite reverse; transform-origin: center; }
.boot-ring .wave { stroke: var(--aqua); stroke-dasharray: 120; animation: wave 2.2s ease-in-out infinite; }
.boot-title { font: 700 40px/1 var(--display); letter-spacing: .32em; padding-left: .32em; background: linear-gradient(90deg, var(--aqua), var(--violet), var(--aqua)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 3s linear infinite; }
.boot-sub { color: var(--ink2); letter-spacing: .04em; }
.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-mark { width: 30px; height: 30px; fill: none; stroke: var(--aqua); stroke-width: 5; stroke-linecap: round; }
.brand-mark path { stroke: var(--violet); animation: glow 3s ease-in-out infinite; }
.brand-name { font: 700 19px/1 var(--display); letter-spacing: .26em; }
.brand-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-left: 10px; border-left: 1px solid var(--line2); }
.brand-tag { color: var(--ink3); font-size: 11px; line-height: 1.18; max-width: 205px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; } /* the full tagline on two short lines, so the search box keeps its width */
.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; }
.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.notif, .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: 0; 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; } }
@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); }
.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 10px 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 .boot-ring svg { width: 84px; height: 84px; }
.gate-card h1.boot-title { margin: 0; font-size: 34px; }
.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: 18px; 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); }
.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; }
.dt-actions .btn.primary { white-space: normal; text-align: left; }
#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); }
.gate-update { margin-top: 10px; }
/* 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; } }

.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; }

.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)); }

/* 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; }
}
@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-time { min-width: 0; font-size: 10px; } .tp-bar button { width: 27px; height: 27px; } .tp-bar .tp-play { width: 36px; height: 36px; } }
