/* =============================================================================
   Serbia → Schengen — editorial theme overrides for MkDocs Material.
   Swiss Modernism 2.0 + magazine editorial. Light = default; dark = slate.
   Pure CSS overlay; preserves Material's nav/search/mobile drawer.
   ========================================================================== */

/* ---------- Typography: PT Sans (Cyrillic-first) ------------------------- */
@import url('https://fonts.googleapis.com/css2?family=PT+Sans:ital,wght@0,400;0,700;1,400&family=PT+Mono&display=swap');

/* ---------- Tokens: shared ----------------------------------------------- */
:root {
  --accent: #e87b35;
  --accent-hover: #d97706;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --max-width: 1280px;
  --sidebar-primary-width: 200px;
  --sidebar-secondary-width: 200px;

  /* Spacing scale (8px base) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;

  /* Font stack */
  --font: 'PT Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'PT Mono', 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 200ms;
  --t-page: 300ms;
}

/* ---------- Light scheme (DEFAULT) --------------------------------------- */
[data-md-color-scheme="default"] {
  --bg-primary: #fafafa;
  --bg-secondary: #f4f4f5;
  --bg-card: #ffffff;
  --bg-card-hover: #fafaf9;
  --text-primary: #09090b;
  --text-secondary: #3f3f46;
  --text-muted: #71717a;
  --border: #e4e4e7;
  --border-light: #d4d4d8;
  --accent-glow: rgba(232, 123, 53, 0.10);
  --accent-soft: rgba(232, 123, 53, 0.05);
  --header-bg: rgba(250, 250, 250, 0.85);
  --code-bg: #f4f4f5;
  --shadow-sm: 0 1px 2px rgba(9, 9, 11, 0.04), 0 1px 1px rgba(9, 9, 11, 0.03);
  --shadow-md: 0 4px 12px rgba(9, 9, 11, 0.06), 0 1px 3px rgba(9, 9, 11, 0.04);
  --shadow-lg: 0 12px 32px -8px rgba(9, 9, 11, 0.10), 0 4px 12px rgba(9, 9, 11, 0.05);

  --md-default-bg-color: var(--bg-primary);
  --md-default-fg-color: var(--text-primary);
  --md-default-fg-color--light: var(--text-secondary);
  --md-default-fg-color--lighter: var(--text-muted);
  --md-default-fg-color--lightest: var(--border);
  --md-primary-fg-color: var(--bg-primary);
  --md-primary-fg-color--light: var(--bg-secondary);
  --md-primary-fg-color--dark: var(--bg-primary);
  --md-primary-bg-color: var(--text-primary);
  --md-primary-bg-color--light: var(--text-secondary);
  --md-accent-fg-color: var(--accent);
  --md-accent-fg-color--transparent: var(--accent-glow);
  --md-accent-bg-color: #ffffff;
  --md-typeset-a-color: var(--accent);
  --md-code-bg-color: var(--code-bg);
  --md-code-fg-color: var(--text-primary);
  --md-footer-bg-color: var(--bg-secondary);
  --md-footer-bg-color--dark: var(--bg-primary);
  --md-footer-fg-color: var(--text-secondary);
}

/* ---------- Dark scheme (slate, vaclav) ---------------------------------- */
[data-md-color-scheme="slate"] {
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-card: #18181b;
  --bg-card-hover: #1f1f23;
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border: #27272a;
  --border-light: #3f3f46;
  --accent-glow: rgba(232, 123, 53, 0.15);
  --accent-soft: rgba(232, 123, 53, 0.08);
  --header-bg: rgba(10, 10, 11, 0.85);
  --code-bg: #131316;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, 0.5);

  --md-default-bg-color: var(--bg-primary);
  --md-default-fg-color: var(--text-primary);
  --md-default-fg-color--light: var(--text-secondary);
  --md-default-fg-color--lighter: var(--text-muted);
  --md-default-fg-color--lightest: var(--border);
  --md-primary-fg-color: var(--bg-primary);
  --md-primary-fg-color--light: var(--bg-secondary);
  --md-primary-fg-color--dark: var(--bg-primary);
  --md-primary-bg-color: var(--text-primary);
  --md-primary-bg-color--light: var(--text-secondary);
  --md-accent-fg-color: var(--accent);
  --md-accent-fg-color--transparent: var(--accent-glow);
  --md-accent-bg-color: var(--text-primary);
  --md-typeset-a-color: var(--accent);
  --md-code-bg-color: var(--code-bg);
  --md-code-fg-color: var(--text-primary);
  --md-footer-bg-color: var(--bg-secondary);
  --md-footer-bg-color--dark: var(--bg-primary);
  --md-footer-fg-color: var(--text-secondary);
}

/* ---------- Body / global ------------------------------------------------- */
html,
body,
input,
button,
.md-typeset {
  font-family: var(--font);
}

body,
.md-main,
.md-container {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Subtle warm gradient (light) — sits behind everything. */
[data-md-color-scheme="default"] body {
  background-image:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(232, 123, 53, 0.04), transparent 70%);
  background-attachment: fixed;
}

[data-md-color-scheme="slate"] body {
  background-image: none;
}

.md-typeset {
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
}

/* ---------- Page-enter animation ----------------------------------------- */
@keyframes page-enter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.md-content article {
  animation: page-enter var(--t-page) var(--ease) both;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-property: color, background-color, border-color, opacity !important;
    transition-duration: 200ms !important;
  }
  .md-content article { transform: none !important; }
}

/* ---------- Layout: variant D — no left sidebar, top dropdown nav -------- */
.md-grid {
  max-width: var(--max-width);
}

.md-main__inner {
  margin-top: var(--space-3);
}

/* Hide Material's left primary sidebar globally — we replaced it with top
   header dropdowns (see .tab-dropdown). The DOM remains so JS can read the
   nav tree to populate the dropdowns. */
.md-sidebar--primary {
  display: none !important;
}

@media screen and (min-width: 76.25em) {
  .md-sidebar--secondary {
    width: var(--sidebar-secondary-width);
  }
  .md-content {
    max-width: none;
    margin-left: 0;
    margin-right: var(--sidebar-secondary-width);
  }
}

@media screen and (max-width: 76.1875em) {
  .md-sidebar--secondary {
    display: none;
  }
  .md-content {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

/* Homepage = full-width, no right TOC either. */
.home-page {
  width: 100%;
}

body[data-md-page="home"] .md-sidebar--secondary,
.md-content article > .home-page ~ * { /* defensive */ }

/* When the home page wrapper is in the article, hide the right TOC too. */
.md-content article:has(.home-page) ~ .md-sidebar--secondary,
.md-main__inner:has(.home-page) .md-sidebar--secondary {
  display: none;
}

/* Fallback for browsers without :has() — toggle via body class set by JS. */
body.is-home .md-sidebar--secondary {
  display: none;
}

body.is-home .md-content {
  margin-right: 0;
}

/* ---------- Header -------------------------------------------------------- */
.md-header {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  color: var(--text-primary);
  transition: background-color var(--t-fast) var(--ease);
}

.md-header__title {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.md-header__button.md-logo svg,
.md-header__button.md-logo img {
  fill: var(--accent);
  color: var(--accent);
}

.md-header__button[for^="__palette"] {
  color: var(--text-secondary);
}

.md-header__button[for^="__palette"]:hover {
  color: var(--accent);
}

/* ---------- Tabs nav (lowercase, accent underline) ----------------------- */
.md-tabs {
  background: transparent;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 2.4rem;
  z-index: 3;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: var(--header-bg);
}

.md-tabs__list {
  contain: layout;
}

.md-tabs__link {
  color: var(--text-secondary);
  opacity: 1;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  margin: 0 var(--space-2) 0 0;
  padding: 12px 0;
  position: relative;
  border-bottom: 2px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

/* Lowercase the tab labels (CSS-only) */
.md-tabs__item .md-tabs__link {
  text-transform: lowercase;
}

.md-tabs__link:hover {
  color: var(--text-primary);
}

.md-tabs__link--active {
  color: var(--accent);
  font-weight: 700;
  border-bottom-color: var(--accent);
}

/* ---------- Search (header) ---------------------------------------------- */
.md-search__form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.md-search__form:hover,
[data-md-toggle="search"]:checked ~ .md-header .md-search__form {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.md-search__input {
  color: var(--text-primary);
  font-family: var(--font);
}

.md-search__input::placeholder {
  color: var(--text-muted);
}

/* ---------- Sidebar / nav ------------------------------------------------- */
.md-nav {
  font-size: 14px;
}

.md-nav__title {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.md-nav__link {
  color: var(--text-secondary);
  transition: color var(--t-fast) var(--ease);
}

.md-nav__link:hover,
.md-nav__link:focus {
  color: var(--accent);
}

.md-nav__link--active,
.md-nav__item--active > .md-nav__link {
  color: var(--accent);
  font-weight: 700;
}

/* Right-rail TOC: active item gets accent left-border + soft bg */
.md-sidebar--secondary .md-nav__link--active,
.md-sidebar--secondary .md-nav__link--passed {
  border-left: 2px solid transparent;
}

.md-sidebar--secondary .md-nav__link--active {
  border-left-color: var(--accent);
  background: var(--accent-glow);
  padding-left: 8px;
  margin-left: -10px;
  border-radius: 4px;
}

/* ---------- Typography ---------------------------------------------------- */
.md-typeset a {
  color: var(--accent);
  transition: color var(--t-fast) var(--ease);
}

.md-typeset a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.md-typeset h1 {
  color: var(--text-primary);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 var(--space-3);
}

.md-typeset h2 {
  color: var(--text-primary);
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 36px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: var(--space-6) 0 var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--border);
}

.md-typeset h3 {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: var(--space-4) 0 var(--space-1);
}

.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.005em;
}

.md-typeset p,
.md-typeset li {
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
}

.md-typeset small,
.md-typeset .small {
  font-size: 14px;
}

.md-typeset hr {
  border-color: var(--border);
}

.md-typeset blockquote {
  border-left: 3px solid var(--accent);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  color: var(--text-secondary);
}

.md-typeset code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 1px 6px;
}

[data-md-color-scheme="slate"] .md-typeset code {
  color: #f5a86a;
}

.md-typeset pre > code,
.md-typeset .highlight pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

.md-typeset table:not([class]) {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  overflow: hidden;
}

.md-typeset table:not([class]) th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.md-typeset table:not([class]) td {
  border-top: 1px solid var(--border);
  color: var(--text-primary);
}

/* Anchor permalink visible on heading hover */
.md-typeset .headerlink {
  color: var(--text-muted);
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.md-typeset h1:hover .headerlink,
.md-typeset h2:hover .headerlink,
.md-typeset h3:hover .headerlink,
.md-typeset h4:hover .headerlink {
  opacity: 1;
  color: var(--accent);
}

/* ---------- Hero ---------------------------------------------------------- */
.hero {
  padding: var(--space-8) 0 var(--space-6);
  margin-bottom: var(--space-4);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  margin: var(--space-2) auto var(--space-2);
  max-width: 760px;
}

.hero h1 .accent,
.md-typeset .hero h1 .accent {
  color: var(--accent);
  font-weight: 700;
}

[data-md-color-scheme="slate"] .hero h1 {
  background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-md-color-scheme="slate"] .hero h1 .accent {
  -webkit-text-fill-color: var(--accent);
}

.hero .lead,
.md-typeset .hero .lead {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.55;
  margin: 0 auto var(--space-3);
}

/* Hero search bar: full-width up to 600px, prominent card */
.hero-search,
.md-typeset .hero-search {
  margin: var(--space-3) auto var(--space-3);
  max-width: 600px;
  position: relative;
}

.hero-search__input {
  width: 100%;
  padding: 16px 20px 16px 48px;
  font-size: 16px;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  outline: none;
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.hero-search__input::placeholder {
  color: var(--text-muted);
}

.hero-search__input:hover {
  border-color: var(--border-light);
}

.hero-search__input:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 0 4px var(--accent-glow);
}

.hero-search__icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
}

/* ---------- Build version pill (fixed, bottom-right) ----------------- */
.build-version-corner {
  position: fixed;
  bottom: 8px;
  right: 8px;
  z-index: 60;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: rgba(244, 244, 245, 0.85);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  text-decoration: none !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0.6;
  transition: opacity 150ms var(--ease), color 150ms var(--ease);
}
[data-md-color-scheme="slate"] .build-version-corner {
  background: rgba(24, 24, 27, 0.85);
  color: var(--text-muted);
}
.build-version-corner:hover {
  opacity: 1;
  color: var(--accent);
}

/* ---------- Hero live-search: spotlight pattern ----------------------- */
/* The previous backdrop element was a <div> appended to <body> covering the
   whole viewport at z-index 90. It also covered the input itself (because
   nested form's z-index couldn't escape its ancestor stacking context),
   making the input look dimmed.
   New approach: replace the backdrop with a giant box-shadow ON THE FORM.
   box-shadow renders OUTSIDE the element's border-box, so the form's
   interior stays bright while everything around it gets dimmed. No backdrop
   element, no z-index gymnastics, no hit-test issues. */
.hero-search,
.md-typeset .hero-search {
  position: relative;
  z-index: 95;
  isolation: isolate;
  border-radius: var(--radius-sm);
  transition: box-shadow 180ms var(--ease);
}
.hero-search--open .hero-search,
.hero-search--open .md-typeset .hero-search {
  /* 100vmax shadow ≈ infinite spotlight dim. */
  box-shadow:
    var(--shadow-md),
    0 0 0 4px var(--accent-glow),
    0 0 0 100vmax rgba(9, 9, 11, 0.55);
}
[data-md-color-scheme="default"] .hero-search--open .hero-search,
[data-md-color-scheme="default"] .hero-search--open .md-typeset .hero-search {
  box-shadow:
    var(--shadow-md),
    0 0 0 4px var(--accent-glow),
    0 0 0 100vmax rgba(9, 9, 11, 0.45);
}
/* Backdrop element kept in DOM as a no-op so JS doesn't error if we later
   want to swap techniques. Hidden permanently. */
.hero-search__backdrop {
  display: none !important;
}

.hero-search__results {
  position: absolute;
  z-index: 100;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  max-height: min(60vh, 520px);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
}
.hero-search--open .hero-search__results {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-search__hint,
.hero-search__empty {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}
.hero-search__example {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  margin: 0 2px;
  transition: border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.hero-search__example:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.hero-search__hit {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid transparent;
  transition: background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.hero-search__hit + .hero-search__hit { margin-top: 2px; }
.hero-search__hit:hover,
.hero-search__hit:focus {
  background: var(--accent-glow);
  border-color: var(--accent-soft, rgba(232,123,53,0.3));
  text-decoration: none;
  color: var(--text-primary);
}

.hero-search__hit-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.hero-search__hit-crumb {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.hero-search__hit-snip {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 2px;
}
.hero-search__hit mark {
  background: var(--accent-glow);
  color: var(--accent);
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 600;
}

/* Hero metric strip — SINGLE LINE with `|` separators.
   Forced via !important because Material's .md-typeset ul / li rules have
   equal selector specificity and (depending on order) can fight ours. */
.hero-metrics,
.md-typeset .hero-metrics,
ul.hero-metrics {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 0 !important;
  margin: var(--space-2) auto 0 !important;
  padding: 0 !important;
  list-style: none !important;
  white-space: nowrap !important;
}

.hero-metrics li,
.md-typeset .hero-metrics li,
ul.hero-metrics > li {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 var(--space-2) !important;
  font-size: 12px !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  color: var(--text-muted) !important;
  position: relative !important;
  white-space: nowrap !important;
}

.hero-metrics li + li::before,
.md-typeset .hero-metrics li + li::before {
  content: "|" !important;
  display: inline-block !important;
  margin: 0 6px 0 -10px !important;
  color: var(--border-light) !important;
  font-weight: 400 !important;
}

/* Eyebrow tag */
.eyebrow,
.md-typeset .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* ---------- Section labels ----------------------------------------------- */
.section {
  padding: var(--space-1) 0 var(--space-4);
}

.section--countries h2,
.md-typeset .section--countries h2 {
  margin: 0 0 var(--space-3);
  border-bottom: none;
  padding-bottom: 0;
  font-size: clamp(22px, 2vw, 28px);
}

.section-label,
.md-typeset .section-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-1);
}

/* ---------- Country grid (Bento with featured emphasis) ------------------ */
.country-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  margin: var(--space-2) 0 var(--space-6);
}

.country-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-2) calc(var(--space-2) + 4px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
  transition:
    border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease);
}

.country-card:hover,
.country-card:focus-visible {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--text-primary);
  outline: none;
}

.country-card .card-head {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: 2px;
}

.country-card .flag {
  font-size: 28px;
  line-height: 1;
}

.country-card .name,
.country-card strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.country-card .card-summary,
.country-card p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.country-card .card-more,
.md-typeset .country-card .card-more {
  margin-top: auto;
  padding-top: var(--space-1);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.country-card:hover .card-more,
.country-card:focus-visible .card-more {
  color: var(--accent);
}

/* Featured cards: bigger flag, accent border tint, soft gradient */
.country-card--featured {
  background:
    linear-gradient(180deg, var(--accent-soft) 0%, var(--bg-card) 60%);
  border-color: var(--border-light);
}

.country-card--featured .flag {
  font-size: 40px;
}

.country-card--featured .name,
.country-card--featured strong {
  font-size: 20px;
}

[data-md-color-scheme="slate"] .country-card--featured {
  background:
    linear-gradient(180deg, rgba(232, 123, 53, 0.08) 0%, var(--bg-card) 60%);
}

/* ---------- Theory section (2-column on home) --------------------------- */
.theory-block,
.md-typeset .theory-block {
  margin: var(--space-6) 0 var(--space-3);
  padding: var(--space-3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: start;
}

.theory-block__intro,
.md-typeset .theory-block__intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.theory-block .theory-label,
.md-typeset .theory-block .theory-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--space-1);
}

.theory-block__title,
.md-typeset .theory-block__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 var(--space-1);
  line-height: 1.2;
}

.theory-block__lead,
.md-typeset .theory-block__lead {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.theory-block__list,
.md-typeset .theory-block__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.theory-block__list li,
.md-typeset .theory-block__list li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.theory-block__list a,
.md-typeset .theory-block__list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}

.theory-block__list a::after {
  content: "→";
  color: var(--text-muted);
  margin-left: var(--space-2);
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.theory-block__list a:hover {
  background: var(--accent-glow);
  border-color: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

.theory-block__list a:hover::after {
  color: var(--accent);
  transform: translateX(2px);
}

/* ---------- Theory card (single big clickable block) -------------------- */
.theory-card,
.md-typeset .theory-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-6) 0 var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg,
    var(--accent-glow) 0%,
    transparent 60%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-primary);
  transition: transform var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
  box-shadow: var(--shadow-sm);
}

.theory-card:hover,
.md-typeset .theory-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--text-primary);
}

.theory-card__label,
.md-typeset .theory-card__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--bg-card);
  border: 1px solid var(--accent-soft, var(--accent));
  border-radius: 999px;
  padding: 4px 12px;
  flex-shrink: 0;
}

.theory-card__title,
.md-typeset .theory-card__title {
  display: block;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.theory-card__lead,
.md-typeset .theory-card__lead {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 560px;
}

.theory-card__cta,
.md-typeset .theory-card__cta {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease);
}

.theory-card:hover .theory-card__cta {
  transform: translateX(4px);
}

@media (max-width: 768px) {
  .theory-card,
  .md-typeset .theory-card {
    grid-template-columns: 1fr;
    text-align: left;
    gap: var(--space-2);
    padding: var(--space-3);
  }
  .theory-card__cta { text-align: right; }
}

@media (max-width: 720px) {
  .theory-block,
  .md-typeset .theory-block {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
}

/* ---------- Page footnote / footer strip --------------------------------- */
.page-footnote {
  margin: var(--space-6) 0 var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  align-items: center;
}

.page-footnote a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

.page-footnote a:hover {
  color: var(--accent);
}

.page-footnote .footnote-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Country page polish ------------------------------------------ */
.back-link,
.md-typeset .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  margin-bottom: var(--space-3);
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}

.back-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg-card-hover);
  text-decoration: none;
}

/* First paragraph after the H1 of a country page: editorial pull quote */
.md-content article > h1 + p,
.md-content article > .back-link + h1 + p {
  font-size: 18px;
  color: var(--text-primary);
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px;
  margin: var(--space-2) 0 var(--space-4);
  background: transparent;
  line-height: 1.55;
}

/* Bold-leading paragraphs in case sections look like editorial card */
.md-content article h2 + p > strong:first-child,
.md-content article h2 ~ p > strong:first-child {
  /* style strong inside paragraph */
}

/* ---------- Buttons / CTA ------------------------------------------------- */
.md-typeset .md-button {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 0 0 0 var(--accent-glow);
  transition: box-shadow var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}

.md-typeset .md-button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 0 24px -2px var(--accent-glow);
  color: #fff;
}

/* ---------- Footer (Material) -------------------------------------------- */
.md-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.md-footer-meta {
  background: var(--bg-primary);
}

/* ---------- Admonitions --------------------------------------------------- */
.md-typeset .admonition,
.md-typeset details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: none;
  color: var(--text-primary);
  font-size: 15px;
}

.md-typeset .admonition-title,
.md-typeset summary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 700;
}

/* ---------- Responsive: country grid breakpoints ------------------------- */
@media (max-width: 1200px) {
  .country-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .country-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero {
    padding: var(--space-6) 0 var(--space-4);
  }
  .country-card--featured .flag { font-size: 32px; }
}

@media (max-width: 480px) {
  .country-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .country-card .name,
  .country-card strong {
    font-size: 17px;
  }
  .hero {
    padding: var(--space-4) 0 var(--space-3);
  }
  .hero-search__input {
    padding: 14px 16px 14px 44px;
    font-size: 15px;
  }
}

/* =============================================================================
   Variant D — interactive Schengen map (from variant-c)
   ========================================================================== */
.section--map {
  padding: var(--space-3) 0 var(--space-4);
}

.map-heading,
.md-typeset .map-heading {
  font-size: clamp(22px, 2vw, 28px);
  margin: 0 0 var(--space-1);
  border-bottom: none;
  padding-bottom: 0;
}

.map-lede,
.md-typeset .map-lede {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 var(--space-3);
  max-width: 720px;
  line-height: 1.55;
}

.europe-map {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  /* Wider container — viewBox is cropped to EU so the SVG fills the frame. */
  max-width: 1100px;
  margin: 0 auto;
}

.europe-map__svg {
  width: 100%;
  height: auto;
  display: block;
  /* Larger map = primary visual. Cropped viewBox (80 40 440 620) means the
     aspect ratio is ~0.71. Cap height at 75vh so on tall screens it doesn't
     dominate the entire scroll, but it still gets ~720px on a 1080p display. */
  max-height: min(75vh, 720px);
  min-height: 480px;
}

@media (max-width: 768px) {
  .europe-map__svg {
    min-height: 360px;
  }
}

.country-path {
  fill: #d4d4d8;
  stroke: var(--bg-card);
  stroke-width: 0.6;
  pointer-events: none;
}

[data-md-color-scheme="slate"] .country-path {
  fill: #3f3f46;
  stroke: var(--bg-primary);
}

.country-path--easy   { fill: #22c55e; }
.country-path--medium { fill: #f59e0b; }
.country-path--hard   { fill: #dc2626; }

.country-path[data-slug] {
  cursor: pointer;
  pointer-events: auto;
  transition: fill 200ms var(--ease), stroke-width 200ms var(--ease);
}

.country-path[data-slug]:hover,
.country-path[data-slug]:focus {
  fill: var(--accent);
  stroke: #000;
  stroke-width: 1.5;
}

[data-md-color-scheme="slate"] .country-path[data-slug]:hover {
  stroke: #fff;
}

.map-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.map-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 13px;
  color: var(--text-secondary);
}

.map-legend li {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.map-legend .dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.dot--easy   { background: #22c55e; }
.dot--medium { background: #f59e0b; }
.dot--hard   { background: #dc2626; }
.dot--none   { background: #d4d4d8; border: 1px solid var(--border-light); }

.non-europe-cluster {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.non-europe-cluster__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.non-europe-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  background: var(--bg-card-hover);
  transition: background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}

.non-europe-card:hover {
  background: var(--accent-glow);
  color: var(--accent);
  text-decoration: none;
}

.non-europe-card .flag { font-size: 20px; line-height: 1; }
.non-europe-card .name { font-weight: 700; font-size: 14px; }

.map-tooltip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  max-width: 280px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 150ms var(--ease), transform 150ms var(--ease);
}

.map-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.map-tooltip__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.map-tooltip__flag { font-size: 18px; line-height: 1; }

.map-tooltip__name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
}

.map-tooltip__badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
}

.map-tooltip__badge--easy   { background: #22c55e; }
.map-tooltip__badge--medium { background: #f59e0b; }
.map-tooltip__badge--hard   { background: #dc2626; }

.map-tooltip__summary {
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .map-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =============================================================================
   Variant D — comparison table (from variant-b)
   ========================================================================== */
.quick-pick,
.md-typeset .quick-pick {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: 0 0 var(--space-2);
}

.quick-pick__chip {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}

.quick-pick__chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.quick-pick__chip[data-active] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.compare-table-wrap {
  margin: 0 0 var(--space-4);
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.compare-table,
.md-typeset .compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: transparent;
  border: 0;
  margin: 0;
  border-radius: 0;
  overflow: visible;
}

.compare-table thead th,
.md-typeset .compare-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 10px 12px;
  white-space: nowrap;
}

[data-md-color-scheme="slate"] .compare-table thead th {
  background: #18181b;
}

.compare-table th[data-sortable] {
  cursor: pointer;
  user-select: none;
  padding-right: 24px;
  position: sticky;
}

.compare-table th[data-sortable]::after {
  content: "▲▼";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0.5;
}

.compare-table th[data-sortable][data-sort-dir="asc"]::after {
  content: "▲";
  opacity: 1;
  color: var(--accent);
}

.compare-table th[data-sortable][data-sort-dir="desc"]::after {
  content: "▼";
  opacity: 1;
  color: var(--accent);
}

.compare-table tbody tr,
.md-typeset .compare-table tbody tr {
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease);
}

.compare-table tbody tr:nth-child(odd) { background: #ffffff; }
.compare-table tbody tr:nth-child(even) { background: #fafaf9; }

[data-md-color-scheme="slate"] .compare-table tbody tr:nth-child(odd) { background: #18181b; }
[data-md-color-scheme="slate"] .compare-table tbody tr:nth-child(even) { background: #1a1a1c; }

.compare-table tbody tr:hover,
.md-typeset .compare-table tbody tr:hover {
  background: var(--accent-glow);
}

.compare-table td,
.md-typeset .compare-table td {
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid var(--border);
  color: var(--text-primary);
  white-space: nowrap;
  vertical-align: middle;
}

.compare-table .col-name a,
.md-typeset .compare-table .col-name a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
}

.compare-table .col-name a:hover { color: var(--accent); }

.compare-table .col-name .flag { font-size: 20px; line-height: 1; }
.compare-table .col-name .name { letter-spacing: -0.01em; }

.compare-table .col-fee { font-variant-numeric: tabular-nums; font-weight: 600; }
.compare-table .col-updated { color: var(--text-muted); font-size: 13px; }

.compare-table .col-action {
  text-align: right;
  width: 36px;
}

.compare-table .col-action a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 18px;
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  display: inline-block;
}

.compare-table tr:hover .col-action a {
  color: var(--accent);
  transform: translateX(2px);
}

.compare-table .multi {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}
.compare-table .multi--yes  { color: #15803d; background: rgba(34, 197, 94, 0.15); }
.compare-table .multi--no   { color: #b91c1c; background: rgba(239, 68, 68, 0.15); }
.compare-table .multi--rare { color: #b45309; background: rgba(245, 158, 11, 0.18); }

[data-md-color-scheme="slate"] .compare-table .multi--yes  { color: #4ade80; }
[data-md-color-scheme="slate"] .compare-table .multi--no   { color: #f87171; }
[data-md-color-scheme="slate"] .compare-table .multi--rare { color: #fbbf24; }

@media (min-width: 720px) {
  .compare-table .col-name    { width: 22%; }
  .compare-table .col-fee     { width: 80px; }
  .compare-table .col-updated { width: 110px; }
}

@media (max-width: 720px) {
  .compare-table thead th,
  .compare-table td { padding: 8px 10px; font-size: 13px; }
  .compare-table .col-name .name { font-size: 14px; }
}

/* =============================================================================
   Variant D — header dropdown menus (replaces the left sidebar nav).
   The .md-tabs__item gets a relative position so we can absolutely position
   a panel below. Hover/focus on desktop, click toggle on touch devices.
   ========================================================================== */
.md-tabs__item {
  position: relative;
}

.tab-caret {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  opacity: 0.7;
  transform: translateY(-1px);
}

.md-tabs__item--has-dropdown .md-tabs__link {
  cursor: pointer;
}

.tab-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  max-width: 360px;
  max-height: 70vh;
  overflow-y: auto;
  margin-top: -2px;
  padding: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 180ms var(--ease),
              transform 180ms var(--ease),
              visibility 180ms var(--ease);
  z-index: 9999;
}

.tab-dropdown.tab-dropdown--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tab-dropdown__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tab-dropdown__item {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tab-dropdown__link {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}

.tab-dropdown__link:hover,
.tab-dropdown__link:focus {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent-soft);
  text-decoration: none;
  outline: none;
}

/* On mobile (Material's drawer is hamburger), don't show dropdowns. */
@media (max-width: 76.1875em) {
  .tab-dropdown {
    display: none;
  }
}

/* When more than ~10 items, switch to two columns for readability. */
.tab-dropdown__list:has(> :nth-child(10)) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px 4px;
  min-width: 360px;
}
