/* finduniversity.io. The globe fills the screen; soft frosted panels float over it.
   Landing: a white page; all land is a grid of light dots, dots near universities are bigger and cobalt.
   Light theme by default; the theme button switches to dark (data-scheme="dark" on <html>).
   Colour carries meaning: cobalt = universities you can go to, amber = with restrictions for
   Russian citizens, grey = closed. Near-black marks the selected tab or chip. */
:root {
  --bg: #e7ebf1;
  --bg-2: #f5f7fa;
  --landing-bg: #ffffff;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, .74);
  --glass-strong: rgba(255, 255, 255, .94);
  --glass-border: rgba(255, 255, 255, .78);
  --ink: #191c24;
  --muted: #697083;
  --faint: #9aa1b0;
  --line: #e3e7ee;
  --line-strong: #cdd3dd;
  --hover: rgba(25, 28, 36, .045);
  --chip-bg: rgba(25, 28, 36, .055);
  --accent: #2e5be6;
  --accent-ink: #ffffff;
  --accent-soft: #e5ebfd;
  --dark: #22252e;
  --dark-ink: #ffffff;
  --ok: #1d9a68;
  --ok-soft: #dcf2e8;
  --warn: #c27a10;
  --warn-soft: #fbecd3;
  --bad: #c9433a;
  --bad-soft: #f9e0dd;
  --dot: #2e5be6;
  --dot-warn: #e8a13a;
  --dot-off: #b4bcc9;
  --dot-base: #c3cbd9;
  --dot-soft: #9cb0f1;
  --dot-hot: #2e5be6;                 /* the landing's densest dots (near many universities) */
  --dot-off-strong: #8a93a6;
  --land-dot: #c3cbd9;                /* the globe's land as dots: only with --globe-dots: 1 */
  --globe-dots: 0;                    /* 1: the globe's land is dots along the parallels, not a filled shape */
  --bar: #c9d5f8;
  --bar-hover: #9fb3f1;
  --silhouette: #edf0f4;
  --sphere-hi: #f7f9fc;
  --sphere-lo: #e1e8f1;
  --land: #ffffff;
  --coast: #b0bac8;
  --land-outline: #1d2232;            /* comic-book ink round the continents */
  --footer-bg: #2453df;
  --grat: rgba(40, 55, 90, .055);
  --rim: rgba(40, 55, 90, .14);
  --globe-shadow: rgba(30, 45, 80, .22);
  --shadow: 0 1px 2px rgba(23, 30, 48, .05), 0 12px 32px rgba(23, 30, 48, .09);
  --font-display: 'Unbounded Variable', 'Unbounded', 'Onest Variable', 'Onest', system-ui, sans-serif;
  --font-body: 'Onest Variable', 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --detail-w: 500px;
  --filters-w: 340px;
  --gap: 16px;
  --top: 86px;
  color-scheme: only light;          /* no automatic darkening by the browser */
}
/* dark: charcoal and white dots, like a night picture of the Earth - neutral greys, no navy. The globe's land
   is a grid of light dots along the parallels on a dark grey sphere; colour is left for what means something:
   the universities (blue - you can go, amber - with restrictions) and the links */
:root[data-scheme="dark"] {
  --bg: #111113;
  --bg-2: #19191c;
  --landing-bg: #111113;
  --surface: #1b1b1e;
  --glass: rgba(27, 27, 30, .78);
  --glass-strong: rgba(27, 27, 30, .96);
  --glass-border: rgba(255, 255, 255, .08);
  --ink: #ededef;
  --muted: #a2a2a8;
  --faint: #707077;
  --line: #2a2a2e;
  --line-strong: #3b3b40;
  --hover: rgba(255, 255, 255, .055);
  --chip-bg: rgba(255, 255, 255, .07);
  --accent: #9aaeff;
  --accent-ink: #111113;
  --accent-soft: #23273b;
  --dark: #ededef;
  --dark-ink: #111113;
  --ok: #45c18c;
  --ok-soft: #15281f;
  --warn: #f0ae4f;
  --warn-soft: #2d2415;
  --bad: #f07169;
  --bad-soft: #2e1b1b;
  --dot: #9aaeff;
  --dot-warn: #f2ad4e;
  --dot-off: #6c6c73;
  --dot-base: #505056;
  --dot-soft: #8f8f96;
  --dot-hot: #ffffff;
  --dot-off-strong: #8b8b92;
  --land-dot: #ececef;
  --globe-dots: 1;
  --bar: #38383e;
  --bar-hover: #515158;
  --silhouette: #1a1a1d;
  --sphere-hi: #2d2d31;
  --sphere-lo: #19191c;
  --land: #38383d;                    /* the globe zoomed in, past the dots */
  --land-outline: rgba(255, 255, 255, .22);
  --footer-bg: #19191c;
  --coast: #46464c;
  --grat: rgba(255, 255, 255, .04);
  --rim: rgba(255, 255, 255, .16);
  --globe-shadow: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 14px 34px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
:root[data-scheme="dark"] .site-footer { border-top: 1px solid var(--line); }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--font-body); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprite { display: none; }
svg { width: 18px; height: 18px; flex: none; }
[hidden] { display: none !important; }
.only-mobile { display: none !important; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  backdrop-filter: blur(20px) saturate(1.35);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  border-radius: 18px;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted);
}
.icon-btn:hover { color: var(--ink); background: var(--hover); }
.link-btn { border: 0; background: none; padding: 4px 0; color: var(--accent); font-weight: 550; }
.link-btn:hover { text-decoration: underline; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 550; white-space: nowrap;
}
.btn:hover { border-color: var(--line-strong); }
.btn-dark {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border: 0;
  border-radius: 12px; background: var(--dark); color: var(--dark-ink); font-weight: 600;
}
.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 700;
}
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; background: var(--faint); }
.dot-open { background: var(--ok); }
.dot-restricted { background: var(--warn); }
.dot-closed { background: var(--bad); }

/* ------------------------------------------------------------------ frame */
.app {
  position: fixed; inset: 0; overflow: hidden;
  background: radial-gradient(110% 95% at 52% 46%, var(--bg-2) 0%, var(--bg) 68%);
}
.app::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: var(--landing-bg); opacity: 0; transition: opacity .9s ease;
}
.app[data-view="landing"]::before { opacity: 1; }
/* the Telegram app (html.tg, set in the page's head): straight to the globe, the landing never shows */
html.tg .landing, html.tg .cta-dock, html.tg .app::before { display: none !important; }
.stage { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; touch-action: none; display: block; }
.stage:focus-visible { outline: none; }
.app[data-view="list"] .stage, .app[data-view="map"] .stage { visibility: hidden; }
.mapbox { position: absolute; inset: 0; z-index: 2; background: var(--bg); }

.chrome { transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
.app[data-view="landing"] .chrome { opacity: 0; visibility: hidden; transform: translateY(12px); }
.app.is-morphing .chrome { opacity: 0; transform: translateY(12px); pointer-events: none; }
.topbar { transition-delay: .05s; }
.bottombar { transition-delay: .15s; }

.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; flex: none; }
.brand .mark { width: 26px; height: 26px; color: var(--accent); }
.brand span { font: 650 16px/1 var(--font-display); letter-spacing: -.02em; }

/* ------------------------------------------------------------------ landing: a page that scrolls over the canvas */
/* overscroll none: no rubber band at the end, which would pull a white strip out from under the blue footer */
/* Safari on an iPhone could lose the text of this page when it came back from the globe (the dots stayed):
   so no -webkit-overflow-scrolling, no visibility toggling of the scroller and no canvas at z-index -1 under
   the text - each is a known way to get a WebKit layer left unpainted */
.landing {
  position: absolute; inset: 0; z-index: 3; overflow-x: hidden; overflow-y: auto; overscroll-behavior: none;
  transition: opacity .4s ease; scrollbar-width: none;
}
.landing::-webkit-scrollbar { display: none; }
/* its own scrollbar instead (app.js): seen on every screen, white over the blue footer */
.scroll-rail {
  position: fixed; top: 14px; bottom: 14px; right: 6px; width: 6px; z-index: 6; border-radius: 6px;
  background: rgba(23, 30, 48, .09); cursor: pointer; touch-action: none; transition: width .15s ease, background-color .25s;
}
.scroll-rail i {
  position: absolute; left: 0; right: 0; top: 0; height: var(--h, 40px); transform: translateY(var(--t, 0px));
  border-radius: inherit; background: var(--accent); transition: background-color .25s;
}
.scroll-rail.is-dark { background: rgba(255, 255, 255, .22); }
.scroll-rail.is-dark i { background: #fff; }
:root[data-scheme="dark"] .scroll-rail:not(.is-dark) { background: rgba(255, 255, 255, .12); }
@media (hover: hover) and (pointer: fine) {
  .scroll-rail:hover, .scroll-rail.is-drag { width: 10px; }
  .scroll-rail i { cursor: grab; }
  .scroll-rail.is-drag i { cursor: grabbing; }
}
@media (pointer: coarse) { .scroll-rail { right: 4px; width: 4px; pointer-events: none; } }
/* leaving: it fades out and lets every touch through (app.js also makes it inert for the keyboard and screen
   readers); coming back it fades in */
.app:not([data-view="landing"]) .landing { opacity: 0; pointer-events: none; }
.app:not([data-view="landing"]) .landing * { pointer-events: none !important; }
/* the landing's dots: a canvas inside the page, under the text (stage.js sets its top and height to cover
   the map, the globe of block 2 and the way between), so it scrolls with the page itself */
.landing-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 0; z-index: 0; display: block; pointer-events: none; }
/* the blocks of the page above that canvas, each a layer of its own */
.hero, .author, .pixels, .site-footer { position: relative; z-index: 1; }
.hero { min-height: 100%; display: flex; flex-direction: column; padding: 26px 32px 30px; }
.landing-brand { align-self: flex-start; }
.landing-brand .mark { width: 30px; height: 30px; }
.landing-brand span { font-size: 18px; }
/* the heading sits halfway between the logo and the map (equal room above and below it); the map takes the
   height that is left, but never more than its own width allows; the button is under the map. On a tall
   screen the spare height goes to three auto margins: around the heading and under the button */
.landing-title {
  flex: none; align-self: center; margin: auto; padding: clamp(28px, 5.5vh, 60px) 0; text-align: center; max-width: 22ch;
  font: 600 clamp(26px, 3vw, 46px)/1.1 var(--font-display); letter-spacing: -.025em;
}
.landing-map { flex: 1 1 auto; min-height: 200px; max-height: calc((100vw - 64px) / 2.18); pointer-events: none; }
.landing-copy { flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  margin: clamp(20px, 2.8vh, 32px) 0 auto; }
.cta-slot { width: 180px; height: 58px; }            /* the button's place in the layout (app.js sizes it to the button) */
/* the button itself stays on the screen (fixed) at the bottom; --cta-up (app.js) lifts it into its slot under
   the map while the page is at the top. Scrolled: it goes down to the bottom of the screen and waits there.
   The footer has a button of its own: when the footer comes up, this one goes down off the screen. The moves
   are CSS transitions, not tied to each scroll frame, so nothing shakes on a phone */
.cta-dock { position: fixed; left: 0; right: 0; bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px)); z-index: 5;
  display: flex; justify-content: center; pointer-events: none; opacity: 0;
  transform: translateY(calc(-1 * var(--cta-up, 0px)));
  transition: transform .55s cubic-bezier(.22, .8, .24, 1), opacity .45s ease; }
.cta-dock.is-placed { opacity: 1; }
.cta-dock.is-docked { transform: none; }
.cta-dock.is-away { transform: translateY(calc(100% + 48px)); }
.cta-dock .cta { margin: 0; pointer-events: auto; }
.landing-status { color: var(--bad); font-size: 14px; }
.landing-demo { color: var(--muted); font-size: 12.5px; max-width: 86ch; padding: 7px 14px; border-radius: 12px; background: var(--chip-bg); }

/* block 2: the author on the left, the dot globe (drawn on the canvas into #landing-globe) on the right */
.author {
  min-height: 92%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
  gap: clamp(24px, 5vw, 80px); padding: 40px clamp(24px, 7vw, 120px) 56px;
}
.author-text { display: flex; flex-direction: column; gap: 14px; max-width: 520px; justify-self: end; }
.author-title { font: 650 clamp(32px, 4.2vw, 60px)/1.04 var(--font-display); letter-spacing: -.035em; }
.author-lead { color: var(--muted); font-size: clamp(15px, 1.3vw, 18px); }
.author-links { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.author-link {
  display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 12px; border-radius: 18px; max-width: 420px;
  color: var(--ink); text-decoration: none; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(23, 30, 48, .04); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.author-link:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(46, 91, 230, .14); }
.author-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 13px; }
.author-icon svg { width: 46px; height: 46px; }
.author-icon-tg { background: #e8f6fd; }               /* Telegram's own plane on a light tile */
:root[data-scheme="dark"] .author-icon-gh { box-shadow: 0 0 0 1px rgba(255, 255, 255, .16); }   /* the black tile on a dark card */
.author-icon-tg svg { width: 26px; height: 26px; margin: 2px 2px 0 0; }
.author-link-text { display: flex; flex-direction: column; min-width: 0; }
.author-link-text b { font-weight: 650; font-size: 16px; overflow-wrap: anywhere; }
.author-link-text small { color: var(--muted); font-size: 13px; }
.author-globe { width: min(100%, 560px, 64vh); aspect-ratio: 1; justify-self: start; pointer-events: none; }

/* white to blue in pixels, like a dissolve (drawn by app.js) */
/* opaque, so nothing drawn on the canvas below shows through while scrolling; it overlaps the footer by 2 px */
.pixels { display: block; width: 100%; height: 240px; margin-bottom: -2px; position: relative; image-rendering: pixelated; image-rendering: crisp-edges; }
.site-footer { position: relative; background: var(--footer-bg); color: #fff; padding: 10px clamp(24px, 7vw, 120px) 32px; }
.site-footer a, .site-footer button { color: #fff; }
/* the brand, then one column per .foot-col, however many there are (a single offline file has no "Страны") */
.foot-top { display: grid; grid-template-columns: minmax(0, 1.6fr); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 32px 40px; padding: 28px 0 40px; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 420px; }
.foot-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.foot-logo .mark { width: 30px; height: 30px; }
.foot-logo span { font: 650 20px/1 var(--font-display); letter-spacing: -.02em; }
.foot-brand p { color: rgba(255, 255, 255, .82); font-size: 14.5px; line-height: 1.5; }
.foot-cta {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 23px; margin-top: 4px;
  background: #fff; color: var(--footer-bg) !important; font-weight: 650; text-decoration: none; transition: transform .15s;
}
.foot-cta:hover { transform: translateY(-1px); }
.foot-cta svg { width: 18px; height: 18px; }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 14.5px; }
.foot-col h3 { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .66); margin-bottom: 4px; }
.foot-col a, .foot-col button { padding: 0; border: 0; background: none; font: inherit; text-align: left; text-decoration: none; opacity: .92; }
.foot-col a:hover, .foot-col button:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.foot-src { color: rgba(255, 255, 255, .66); font-size: 12.5px; line-height: 1.5; margin-top: 4px; }
.foot-col .foot-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-weight: 650; opacity: 1; }
.foot-more svg { width: 16px; height: 16px; flex: none; transition: transform .15s; }
.foot-col .foot-more:hover { text-decoration: none; }
.foot-more:hover span { text-decoration: underline; text-underline-offset: 3px; }
.foot-more:hover svg { transform: translateX(2px); }
.foot-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .22); color: rgba(255, 255, 255, .7); font-size: 12.5px; line-height: 1.5;
}
.foot-bottom span:last-child { max-width: 70ch; }
.foot-lang { display: inline-flex; gap: 16px; }
.foot-lang a { color: rgba(255, 255, 255, .72); text-decoration: none; }
.foot-lang a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-lang a[aria-current="true"] { color: #fff; font-weight: 650; }

/* RU / EN: the same page at / and /en/ (i18n.py). Top right of the landing, in the tools bar of the globe */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--chip-bg); }
.lang-switch a {
  display: inline-grid; place-items: center; min-width: 38px; height: 30px; padding: 0 9px; border-radius: 999px;
  color: var(--muted); font-size: 13px; font-weight: 650; letter-spacing: .05em; text-decoration: none; transition: color .15s, background-color .15s;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(23, 30, 48, .14); }
.hero { position: relative; }
.lang-hero { position: absolute; top: 26px; right: 32px; z-index: 2; }
.lang-tools { margin-left: 4px; }
.lang-tools a { height: 34px; min-width: 36px; }
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 6px; height: 58px; padding: 0 26px 0 32px; border: 0; border-radius: 29px;
  background: var(--accent); color: var(--accent-ink); font-weight: 650; font-size: 17px; letter-spacing: .005em;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 38%, transparent);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 14px 30px color-mix(in srgb, var(--accent) 45%, transparent); }
.cta svg { width: 20px; height: 20px; transition: transform .2s ease; }
.cta:hover svg { transform: translateX(3px); }
.cta:active { transform: translateY(1px); }
.landing-demo { color: var(--muted); font-size: 12.5px; max-width: 86ch; padding: 7px 14px; border-radius: 12px; background: var(--chip-bg); }

/* ------------------------------------------------------------------ top bar: brand and filters on the left, search in the middle */
.topbar { position: absolute; z-index: 20; left: var(--gap); right: var(--gap); top: var(--gap); height: 0; pointer-events: none; }
.topleft { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.topleft > *, .topcenter > * { pointer-events: auto; }
.brandbar { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 20px 0 14px; color: var(--ink); text-decoration: none; }
.brandbar .mark { width: 28px; height: 28px; color: var(--accent); }
.brandbar span { font: 650 16px/1 var(--font-display); letter-spacing: -.02em; white-space: nowrap; }
.fbtn {
  position: relative; display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 18px 0 15px; border-radius: 16px;
  font-weight: 600; font-size: 14.5px; color: var(--ink); transition: background .15s, color .15s;
}
.fbtn:hover { background: var(--glass-strong); }
.fbtn[aria-expanded="true"] { background: var(--dark); color: var(--dark-ink); border-color: var(--dark); }
.fbtn .badge { margin-left: 1px; }
.topcenter {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 480px));
  display: flex; flex-direction: column; gap: 8px; pointer-events: none; transition: left .4s ease, width .4s ease;
}
.app.has-detail .topcenter { left: calc((100% - var(--detail-w) - var(--gap)) / 2); width: min(560px, max(300px, calc(100% - var(--detail-w) - var(--gap) - 480px))); }
.searchbar { position: relative; display: flex; align-items: center; height: 54px; padding: 7px; }
.search input {
  width: 100%; height: 40px; padding: 0 14px 0 40px; border-radius: 12px; border: 1px solid transparent;
  background: var(--chip-bg); font-size: 15px;
}
.search input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.search-icon { position: absolute; left: 20px; top: 18px; color: var(--muted); pointer-events: none; }
.activebar { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.activebar .achip, .activebar .reset-all {
  display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 9px 0 13px; border-radius: 17px; border: 1px solid var(--glass-border);
  background: var(--glass-strong); box-shadow: var(--shadow); font-size: 13.5px; white-space: nowrap;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.activebar .achip svg { width: 14px; height: 14px; color: var(--muted); }
.activebar .achip:hover { background: var(--surface); }
.activebar .reset-all { padding: 0 14px; border: 0; background: var(--dark); color: var(--dark-ink); font-weight: 600; }

/* ------------------------------------------------------------------ dashboard panel (only while a university is open) */
.rightpanel {
  position: absolute; z-index: 10; right: var(--gap); top: var(--top); bottom: var(--top); width: var(--detail-w);
  display: none; flex-direction: column; overflow: hidden; background: var(--glass-strong);
}
.app.has-detail .rightpanel { display: flex; animation: panel-in .35s cubic-bezier(.2, .7, .2, 1); }
@keyframes panel-in { from { opacity: 0; transform: translateX(18px); } }
.rows-empty { padding: 30px 16px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rows-empty b { color: var(--ink); font-size: 15px; }
.sortpill select {
  height: 34px; max-width: 240px; padding: 0 26px 0 12px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); font-size: 13.5px; font-weight: 550; cursor: pointer;
}

.detail { display: flex; flex-direction: column; height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.detail:focus { outline: none; }
.d-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 2px; padding: 10px 10px 8px;
  background: var(--glass-strong); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.d-bar .spacer { flex: 1; }
.d-back { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 6px; border: 0; border-radius: 10px; background: var(--chip-bg); font-weight: 600; font-size: 14px; }
.d-back:hover { background: var(--hover); }
.fav[aria-pressed="true"] { color: var(--dot-warn); }
.d-body { padding: 8px 20px 32px; display: flex; flex-direction: column; gap: 18px; }
.d-head { display: flex; flex-direction: column; gap: 6px; }
.pill-state { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 6px; border-radius: 8px; font-size: 12.5px; font-weight: 600; }
.pill-state svg { width: 14px; height: 14px; }
.pill-state.is-ok { background: var(--ok-soft); color: var(--ok); }
.pill-state.is-manual { background: var(--accent-soft); color: var(--accent); }
.d-title { font-size: 23px; line-height: 1.2; font-weight: 750; letter-spacing: -.01em; }
.d-local { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.d-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; color: var(--muted); }
.d-meta a { display: inline-flex; align-items: center; gap: 4px; font-weight: 550; }
.d-meta svg { width: 14px; height: 14px; }
.d-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 6px; margin-top: 2px; font-size: 12.5px; }
.d-fields-label { color: var(--muted); margin-right: 2px; }
.d-fields .tag { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.d-fields-src { color: var(--faint); font-size: 12px; }

.visa { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--chip-bg); }
.visa.v-open { background: var(--ok-soft); }
.visa.v-restricted { background: var(--warn-soft); }
.visa.v-closed { background: var(--bad-soft); }
.visa-label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.visa-note { font-size: 14px; }
.visa-more { font-size: 13px; color: var(--muted); }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.kpi-label { font-size: 12.5px; color: var(--muted); }
.kpi-value { font: 650 21px/1.15 var(--font-display); letter-spacing: -.03em; white-space: nowrap; }
.kpi-value small { font: 500 13px/1 var(--font-body); letter-spacing: 0; color: var(--muted); margin-right: 5px; }
.kpi-value.is-free { color: var(--ok); }
.kpi-value.is-none { font: 500 14.5px/1.3 var(--font-body); color: var(--muted); letter-spacing: 0; padding-top: 3px; }
.kpi-sub { font-size: 12px; color: var(--muted); line-height: 1.35; }
.kpi .origin { margin-top: auto; padding-top: 3px; }

.sec { display: flex; flex-direction: column; gap: 9px; }
.sec-title { font-size: 16px; font-weight: 700; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.sec-title small { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.sec-empty { color: var(--muted); font-size: 13.5px; }
.rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.row { padding: 11px 14px; display: flex; flex-direction: column; gap: 5px; }
.row + .row { border-top: 1px solid var(--line); }
.row-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px; }
.row-value { font-weight: 650; font-size: 14.5px; }
.row-usd { color: var(--muted); font-size: 13.5px; }
.row-text { font-size: 13.5px; line-height: 1.45; }
.row-tags { display: flex; flex-wrap: wrap; gap: 5px; font-size: 12px; color: var(--muted); }
.tag { padding: 2px 7px; border-radius: 6px; background: var(--chip-bg); }
.src { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 12px; font-size: 12.5px; color: var(--muted); }
.src a { display: inline-flex; align-items: center; gap: 3px; overflow-wrap: anywhere; }
.src svg { width: 13px; height: 13px; }
.mark { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.mark svg { width: 14px; height: 14px; }
.mark.ok { color: var(--ok); }
.mark.no { color: var(--muted); font-weight: 500; }
.mark.manual { color: var(--accent); }
.quote { font-size: 12.5px; }
.quote summary { cursor: pointer; color: var(--muted); list-style: none; display: inline-flex; gap: 4px; }
.quote summary::-webkit-details-marker { display: none; }
.quote summary::before { content: "+"; font-weight: 700; width: 10px; }
.quote[open] summary::before { content: "−"; }
.quote blockquote { margin: 6px 0 2px; padding: 8px 12px; border-left: 3px solid var(--line-strong); background: var(--chip-bg); border-radius: 0 8px 8px 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; line-height: 1.45; }
.kv ul { margin: 0; padding-left: 18px; }
.list-plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
/* "Всё о стране": the country's own page (seo.py) */
.sec-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 13.5px; font-weight: 600; text-decoration: none; }
.sec-more svg { width: 15px; height: 15px; flex: none; transition: transform .15s; }
.sec-more:hover span { text-decoration: underline; }
.sec-more:hover svg { transform: translateX(2px); }
.lite { padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 13.5px; }
.lite b { color: var(--ink); }
.d-foot { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

/* ------------------------------------------------------------------ bottom bar */
.bottombar {
  position: absolute; z-index: 20; left: var(--gap); right: var(--gap); bottom: var(--gap); height: 54px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; pointer-events: none;
}
.bottombar > * { pointer-events: auto; }
.tools { justify-self: start; display: flex; align-items: center; gap: 2px; height: 54px; padding: 6px; }
.tool { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px 0 12px; border: 0; border-radius: 12px; background: transparent; font-weight: 550; font-size: 14px; }
.tool:hover { background: var(--hover); }
.tool b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--chip-bg); font-size: 12px; display: inline-grid; place-items: center; }
.tool[aria-pressed="true"] { background: var(--dark); color: var(--dark-ink); }
.tool[aria-pressed="true"] b { background: rgba(255, 255, 255, .18); }
.tool-icon { width: 40px; padding: 0; justify-content: center; color: var(--muted); }
.seg { justify-self: center; display: flex; gap: 4px; padding: 5px; height: 50px; border-radius: 25px; }
.seg button { height: 38px; padding: 0 20px; border: 0; border-radius: 19px; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; }
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"] { background: var(--dark); color: var(--dark-ink); }
.chipsbar { justify-self: end; display: flex; align-items: center; gap: 8px; width: min(460px, 100%); min-width: 0; }
.cchips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 18px 6px; margin: -18px 0; flex: 1; min-width: 0; }
.cchips::-webkit-scrollbar { display: none; }
.cchip {
  display: inline-flex; align-items: center; height: 42px; padding: 0 16px; flex: none; border-radius: 21px;
  border: 1px solid var(--glass-border); background: var(--glass-strong); font-weight: 550; font-size: 14px; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(23, 30, 48, .06), 0 4px 12px rgba(23, 30, 48, .08);
}
.cchip[aria-pressed="true"] { background: var(--dark); color: var(--dark-ink); border-color: var(--dark); }

.zoom {
  position: absolute; z-index: 12; right: var(--gap); bottom: calc(var(--gap) + 66px);
  display: flex; flex-direction: column; padding: 4px; gap: 2px; border-radius: 14px; transition: right .3s ease, opacity .5s;
}
.app.has-detail .zoom { right: calc(var(--gap) * 2 + var(--detail-w)); }
.zoom button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; display: grid; place-items: center; color: var(--ink); }
.zoom button:hover { background: var(--hover); }
.app[data-view="list"] .zoom { display: none; }
.app[data-view="list"].has-detail .rightpanel { z-index: 25; }

/* ------------------------------------------------------------------ tooltip, about, toast */
.tip {
  position: absolute; left: 0; top: 0; z-index: 30; pointer-events: none; max-width: 300px;
  display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 12px; font-size: 13px;
  background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--shadow);
}
.tip b { font-weight: 650; }
.tip span { color: var(--muted); }
.tip .tip-hint { font-size: 12px; color: var(--faint); }
.about {
  position: absolute; z-index: 40; left: var(--gap); bottom: calc(var(--gap) + 66px); width: min(440px, calc(100% - 32px));
  max-height: calc(100% - 180px); overflow: auto; padding: 16px 18px 18px; background: var(--glass-strong);
}
.about-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.about-head h2 { font-size: 16px; }
.about-body { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; line-height: 1.5; }
.about-body p { max-width: 62ch; }
.about-body .legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); }
.about-body .legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--dot); }
.lg.w { background: var(--dot-warn); }
.lg.o { background: var(--dot-off); }
.lg.r { background: transparent; border: 1.5px solid var(--dot); box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 6px var(--dot); }
/* "Данные собраны из открытых источников": over the bottom bar when the search opens, until "Понятно" */
.notice {
  position: absolute; z-index: 22; left: 0; right: 0; bottom: calc(var(--gap) + 66px); margin: 0 auto;
  width: min(620px, calc(100% - 2 * var(--gap))); display: flex; align-items: center; gap: 14px;
  padding: 14px 14px 14px 18px; border-radius: 20px;
}
.notice-icon { width: 22px; height: 22px; flex: none; color: var(--accent); }
.notice-text { flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.notice-text b { color: var(--ink); font-size: 14.5px; font-weight: 650; }
.notice-ok { flex: none; }
.toast {
  position: fixed; left: 50%; bottom: 86px; transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 12px; background: var(--dark); color: var(--dark-ink); font-size: 14px; box-shadow: var(--shadow);
}
.backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(10, 14, 30, .38); }

/* ------------------------------------------------------------------ catalogue (list view) */
.catalog {
  position: absolute; z-index: 5; inset: 0; display: none; overflow-y: auto;
  padding: var(--top) var(--gap) var(--top) calc(var(--gap) * 2 + var(--filters-w));
  background: radial-gradient(110% 95% at 52% 46%, var(--bg-2) 0%, var(--bg) 68%);
}
.app[data-view="list"] .catalog { display: block; }
.catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.catalog-title { font-size: 18px; font-weight: 700; }
.catalog-title small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.ucard {
  position: relative; height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 14px;
  border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--shadow);
  content-visibility: auto; contain-intrinsic-size: auto 170px;
}
.ucard:hover { box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.ucard-top { display: flex; align-items: flex-start; gap: 8px; }
.ucard-title { flex: 1; font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.ucard-link { color: var(--ink); text-decoration: none; }
.ucard-link::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.ucard .fav { position: relative; z-index: 1; margin: -6px -6px 0 0; }
.ucard-local { font-size: 13px; color: var(--muted); margin-top: -4px; overflow-wrap: anywhere; }
.ucard-place { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.ucard-place .vis { display: inline-flex; align-items: center; gap: 6px; }
.ucard-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.fact { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 9px; border-radius: 8px; background: var(--chip-bg); font-size: 12.5px; color: var(--muted); }
.fact b { color: var(--ink); font-weight: 650; }
.fact-main { background: var(--accent-soft); }
.fact-free { background: var(--ok-soft); }
.fact-free b { color: var(--ok); }
.ucard-state { margin-top: auto; font-size: 12px; color: var(--faint); }
.ucard-state.s-blocked, .ucard-state.s-failed { color: var(--warn); }
.more { display: flex; justify-content: center; padding: 18px 0 8px; }

/* ------------------------------------------------------------------ filters: a panel under the filter button; a sidebar in the list view */
.filters {
  position: absolute; z-index: 30; left: var(--gap); top: calc(var(--gap) + 120px); bottom: calc(var(--gap) + 66px); width: var(--filters-w);
  display: flex; flex-direction: column; overflow: hidden; background: var(--glass-strong);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}
.filters.is-open, .app[data-view="list"] .filters {
  opacity: 1; visibility: visible; transform: none; transition: opacity .22s ease, transform .22s ease, visibility 0s;
}
.app[data-view="landing"] .filters { display: none; }
.app[data-view="list"] .filters { z-index: 15; top: calc(var(--gap) + 66px); }
.app[data-view="list"] .fbtn { display: none; }
.app[data-view="list"] .filters-close, .app[data-view="list"] .filters-foot { display: none; }
.filters-head { display: flex; align-items: center; gap: 10px; padding: 16px 12px 4px 20px; }
.filters-title { font: 650 18px/1.2 var(--font-display); letter-spacing: -.02em; margin-right: auto; }
.filters-body { overflow-y: auto; padding: 0 20px 20px; display: flex; flex-direction: column; overscroll-behavior: contain; scrollbar-width: thin; }
.filters-foot { padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.filters-foot .btn-dark { width: 100%; }
.fgroup { padding: 16px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.fgroup:first-child { border-top: 0; padding-top: 8px; }
.fhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fgroup-title { font-size: 14.5px; font-weight: 650; }
.fval { font-size: 13px; color: var(--muted); white-space: nowrap; }
.fval b { color: var(--accent); font-weight: 650; }
.fgroup-sub { font-size: 12.5px; color: var(--muted); margin-top: -6px; }
.fgroup-note { font-size: 12px; color: var(--muted); line-height: 1.4; }
.check { display: flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; font-size: 14px; }
.check input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); flex: none; }
.check .cnt, .switch .cnt { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.check.is-empty { color: var(--faint); }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 36px; font-size: 14px; }
.switch input { appearance: none; -webkit-appearance: none; width: 40px; height: 24px; border-radius: 12px; background: var(--line-strong); position: relative; margin: 0; cursor: pointer; flex: none; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); transition: transform .18s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }
.field { width: 100%; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.field:focus { outline: none; border-color: var(--accent); }

/* money: histogram + two-handle slider + two amount fields */
.hist { height: 46px; margin: 2px 11px -4px; cursor: pointer; }
.hist svg { display: block; width: 100%; height: 100%; }
.hist rect { fill: var(--line-strong); transition: fill .12s; }
.hist rect.in { fill: var(--accent); }
.dual { position: relative; height: 26px; --a: 0%; --b: 100%; }
.dual-track { position: absolute; left: 11px; right: 11px; top: 11px; height: 4px; border-radius: 2px; background: var(--line); }
.dual-fill { position: absolute; top: 0; bottom: 0; left: var(--a); right: calc(100% - var(--b)); border-radius: 2px; background: var(--accent); }
.dual input[type="range"] {
  position: absolute; left: 0; top: 0; width: 100%; height: 26px; margin: 0; padding: 0;
  -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none; outline: none;
}
.dual input.on-top { z-index: 2; }
.dual input[type="range"]::-webkit-slider-runnable-track { height: 26px; background: transparent; border: 0; }
.dual input[type="range"]::-moz-range-track { height: 26px; background: transparent; border: 0; }
.dual input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; cursor: grab;
  background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 1px 2px rgba(20, 30, 60, .2), 0 3px 8px rgba(20, 30, 60, .12);
  transition: transform .12s, box-shadow .12s;
}
.dual input[type="range"]::-moz-range-thumb {
  pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; cursor: grab;
  background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 1px 2px rgba(20, 30, 60, .2), 0 3px 8px rgba(20, 30, 60, .12);
}
.dual input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.12); }
.dual input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-soft); }
.pfields { display: grid; grid-template-columns: 1fr 12px 1fr; align-items: center; gap: 8px; }
.pfield {
  display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px; min-width: 0;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: text;
}
.pfield:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pfield span { font-size: 12.5px; color: var(--muted); }
.pfield input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; padding: 0; background: transparent; font-size: 14.5px; font-weight: 600; }
.pdash { height: 1.5px; border-radius: 1px; background: var(--line-strong); }

/* chips: visa status, what the university has, exams */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 18px;
  border: 1px solid transparent; background: var(--chip-bg); font-size: 13.5px; font-weight: 550; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.chip:hover { border-color: var(--line-strong); background: var(--surface); }
.chip .cnt { color: var(--muted); font-size: 12px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: var(--dark-ink); }
.chip[aria-pressed="true"] .cnt { color: inherit; opacity: .7; }
.chip.is-empty:not([aria-pressed="true"]) { opacity: .5; }
.fsearch { position: relative; }
.fsearch svg { position: absolute; left: 12px; top: 11px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.fsearch .field { padding-left: 37px; }
.country-list { display: flex; flex-direction: column; max-height: 264px; overflow-y: auto; margin: 0 -8px; padding: 0 2px; scrollbar-width: thin; }
.country-list .check { padding: 0 8px; border-radius: 10px; min-height: 34px; }
.country-list .check:hover { background: var(--hover); }
.fields-none { font-size: 12.5px; color: var(--muted); }

/* "Заметили неточность?" (about box and the end of every dashboard) */
.fb { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); }
.fb-title { font-size: 15px; font-weight: 700; }
.fb-text { font-size: 13.5px; line-height: 1.45; }
.fb-text a { font-weight: 600; }
.fb-form { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.fb-area { height: auto; min-height: 78px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fb-send { height: 40px; }
.fb-send:disabled { opacity: .6; cursor: progress; }
.fb-msg { font-size: 13px; color: var(--muted); }
.fb-msg.is-ok { color: var(--ok); font-weight: 600; }
.fb-msg.is-bad { color: var(--bad); }
.fb-note { font-size: 12px; color: var(--muted); }
.fb-open { align-self: flex-start; height: 38px; background: var(--surface); }

/* ------------------------------------------------------------------ Leaflet map */
.leaflet-container { font: 13px/1.4 var(--font-body); background: var(--bg); }
.leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent) !important; color: var(--muted) !important; font-size: 11px; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-tooltip { background: var(--glass-strong); color: var(--ink); border: 1px solid var(--glass-border); box-shadow: var(--shadow); border-radius: 10px; font-size: 13px; padding: 6px 9px; }
.leaflet-tooltip::before { display: none; }
.country-label { font: 600 12px/1.1 var(--font-body); color: var(--muted); white-space: nowrap; text-align: center; text-shadow: 0 0 3px var(--land), 0 0 3px var(--land), 0 0 6px var(--land); pointer-events: none; }
.app[data-view="map"] .leaflet-control-container .leaflet-bottom { bottom: calc(var(--top) - 10px); }
.app[data-view="map"] .leaflet-control-container .leaflet-right { right: var(--gap); }
.app[data-view="map"].has-detail .leaflet-control-container .leaflet-right { right: calc(var(--gap) * 2 + var(--detail-w)); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1279px) {
  :root { --detail-w: 460px; --filters-w: 320px; }
}
@media (max-width: 1099px) {
  .app.has-detail .topcenter { left: 50%; width: min(560px, calc(100% - 480px)); }
  .chipsbar { width: min(300px, 100%); }
  /* the brand on a row of its own, the columns under it sharing the width */
  .foot-top { display: flex; flex-wrap: wrap; gap: 32px 24px; }
  .foot-brand { flex: 1 1 100%; max-width: none; }
  .foot-brand p { max-width: 560px; }
  .foot-col { flex: 1 1 0; min-width: 130px; }
}
@media (max-width: 759px) {
  :root { --gap: 10px; --top: 118px; }
  .only-mobile { display: inline-grid !important; }
  /* phone: the logo on top, the map in the middle of the screen, the heading halfway between the logo and
     the map, the button a little under the map; then the globe over the author. The height is in svh (the
     screen with the browser's bars shown): when the address bar hides during the scroll, nothing here moves */
  .hero { display: grid; grid-template-rows: 1fr auto 1fr; grid-template-columns: minmax(0, 1fr); min-height: 100%; min-height: 100svh;
    padding: 52px 16px 26px; position: relative; }
  .landing-brand { position: absolute; top: 16px; left: 16px; }
  .lang-hero { top: 12px; right: 14px; }
  .catalog-title { font-size: 16px; }
  .catalog-title small { display: block; margin: 2px 0 0; }
  .sortpill select { max-width: 196px; }
  .landing-title { align-self: center; margin: 0 auto; padding: 0; }
  .landing-map { height: auto; aspect-ratio: 2.18; min-height: 0; max-height: none; margin: 0; }
  .landing-copy { align-self: start; margin: clamp(40px, 7.5vh, 68px) 0 0; }
  .author { grid-template-columns: 1fr; gap: 22px; padding: 24px 20px 40px; min-height: 0; }
  .author-globe { order: -1; justify-self: center; width: min(88vw, 420px); }
  .cta-dock { bottom: max(16px, calc(env(safe-area-inset-bottom) + 10px)); }
  .author-text { justify-self: stretch; }
  .author-link { max-width: none; }
  .pixels { height: 170px; }
  .foot-top { display: grid; grid-auto-flow: row; grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .foot-brand { grid-column: 1 / -1; }
  /* the countries across the whole width, in two columns */
  .foot-countries { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; align-items: start; justify-items: start; }
  .foot-countries h3, .foot-countries .foot-more { grid-column: 1 / -1; }
  .cta { height: 54px; font-size: 16px; }
  /* row 1: brand mark + search; row 2: filter button + views */
  .topleft { gap: 8px; }
  .brandbar { width: 50px; height: 50px; padding: 0; justify-content: center; border-radius: 16px; }
  .brandbar span { display: none; }
  .fbtn { width: 50px; height: 42px; padding: 0; justify-content: center; border-radius: 14px; }
  .fbtn span:not(.badge) { display: none; }
  .fbtn .badge { position: absolute; top: -5px; right: -5px; margin: 0; }
  .topcenter, .app.has-detail .topcenter { left: 60px; right: 0; width: auto; transform: none; }
  .searchbar { height: 50px; padding: 5px; }
  .search-icon { left: 17px; top: 16px; }
  .activebar, .tools, .chipsbar, .zoom { display: none !important; }
  .bottombar { left: 70px; top: 68px; bottom: auto; height: 42px; grid-template-columns: 1fr; }
  .seg { height: 42px; padding: 3px; }
  .seg button { height: 34px; padding: 0 15px; font-size: 13.5px; }
  .app.has-detail .rightpanel { inset: 0; width: auto; border-radius: 0; z-index: 40; }
  .catalog { padding: var(--top) var(--gap) 24px; }
  .app[data-view="list"] .fbtn { display: inline-flex; }
  .app[data-view="list"] .filters { opacity: 0; visibility: hidden; }
  .filters, .app[data-view="list"] .filters, .app[data-view="list"] .filters.is-open { left: 0; right: 0; top: 0; bottom: 0; width: auto; border-radius: 0; z-index: 50; }
  .app[data-view="list"] .filters.is-open { opacity: 1; visibility: visible; }
  .app[data-view="list"] .filters-close, .app[data-view="list"] .filters-foot { display: flex; }
  .about { left: var(--gap); right: var(--gap); bottom: auto; top: 120px; width: auto; }
  .d-body { padding: 6px 16px 32px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .toast { bottom: 24px; }
  .notice { bottom: max(var(--gap), calc(env(safe-area-inset-bottom) + 6px)); flex-wrap: wrap; align-items: flex-start; gap: 10px 12px; padding: 14px; }
  .notice-icon { margin-top: 1px; }
  .notice-text { flex-basis: calc(100% - 34px); font-size: 13px; }
  .notice-ok { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
