/*
 * stanford.si - Curated Directories
 *
 * A refined, atmospheric editorial design stylesheet, built for the photograph-led travel
 * guides and shared by every directory on the hub.
 * Elegant serif & humanist sans typography, organic warm amber/gold accents,
 * silky smooth transitions, and high-performance layout styling.
 */

:root {
  /* Dark Mode (Default) - Deep Midnight & Warm Amber */
  --bg: #090c10;
  --bg-surface: #121622;
  --bg-raised: #181d2c;
  --bg-sunk: #06080e;
  --bg-glass: rgba(18, 22, 34, 0.78);

  --ink: #f6f7fa;
  --ink-soft: #a2adb9;
  --ink-faint: #636d7d;

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --accent: #e5b378;
  --accent-hover: #f5c58e;
  --accent-ink: #0d0903;
  --accent-soft: rgba(229, 179, 120, 0.12);
  --accent-soft-strong: rgba(229, 179, 120, 0.24);
  --accent-border: rgba(229, 179, 120, 0.28);

  --warm: #f5b971;
  --teal: #4fd1c5;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);

  --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, monospace;

  --gutter: 24px;
  --measure: 1200px;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #faf9f5;
    --bg-surface: #ffffff;
    --bg-raised: #ffffff;
    --bg-sunk: #f2efe7;
    --bg-glass: rgba(250, 249, 245, 0.88);

    --ink: #121620;
    --ink-soft: #485264;
    --ink-faint: #778192;

    --line: rgba(18, 22, 32, 0.08);
    --line-strong: rgba(18, 22, 32, 0.16);

    --accent: #b87333;
    --accent-hover: #a06126;
    --accent-ink: #ffffff;
    --accent-soft: rgba(184, 115, 51, 0.09);
    --accent-soft-strong: rgba(184, 115, 51, 0.18);
    --accent-border: rgba(184, 115, 51, 0.26);

    --shadow-sm: 0 2px 8px rgba(18, 22, 32, 0.04);
    --shadow: 0 10px 30px rgba(18, 22, 32, 0.07);
    --shadow-lg: 0 24px 60px rgba(18, 22, 32, 0.1);
  }
}

:root[data-theme="light"] {
  --bg: #faf9f5;
  --bg-surface: #ffffff;
  --bg-raised: #ffffff;
  --bg-sunk: #f2efe7;
  --bg-glass: rgba(250, 249, 245, 0.88);

  --ink: #121620;
  --ink-soft: #485264;
  --ink-faint: #778192;

  --line: rgba(18, 22, 32, 0.08);
  --line-strong: rgba(18, 22, 32, 0.16);

  --accent: #b87333;
  --accent-hover: #a06126;
  --accent-ink: #ffffff;
  --accent-soft: rgba(184, 115, 51, 0.09);
  --accent-soft-strong: rgba(184, 115, 51, 0.18);
  --accent-border: rgba(184, 115, 51, 0.26);

  --shadow-sm: 0 2px 8px rgba(18, 22, 32, 0.04);
  --shadow: 0 10px 30px rgba(18, 22, 32, 0.07);
  --shadow-lg: 0 24px 60px rgba(18, 22, 32, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 7%, transparent) 0%, transparent 55%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

img { max-width: 100%; display: block; }
a { color: inherit; transition: color 0.2s ease, border-color 0.2s ease; }

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip:focus { left: 0; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------------------------------------------------------------- header */

.masthead {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg-glass);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 70px;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-weight: 700; letter-spacing: -.02em; font-size: 1.1rem;
  text-decoration: none; color: var(--ink);
}
.brand .mark {
  font-family: var(--serif); font-size: 0.95rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  padding: 4px 9px; border-radius: 7px; box-shadow: var(--shadow-sm);
  display: inline-block; line-height: 1;
}
.brand .brand-name {
  font-family: var(--serif); font-weight: 600; font-size: 1.22rem; letter-spacing: -0.01em;
}
.brand .tag {
  color: var(--ink-faint); font-family: var(--sans); font-weight: 400; font-size: .82rem;
  letter-spacing: 0; border-left: 1px solid var(--line-strong); padding-left: 10px; margin-left: 2px;
}
.masthead nav { display: flex; align-items: center; gap: 24px; font-size: .95rem; font-weight: 500; }
.masthead nav a { color: var(--ink-soft); text-decoration: none; position: relative; padding-block: 4px; }
.masthead nav a:hover { color: var(--ink); }
.masthead nav a::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
  background: var(--accent); transition: width 0.25s ease; border-radius: 2px;
}
.masthead nav a:hover::after { width: 100%; }

.theme-toggle {
  background: var(--bg-surface); border: 1px solid var(--line-strong);
  color: var(--ink-soft); padding: 7px 9px; border-radius: 100px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent-border); transform: scale(1.05); }
.theme-toggle svg { display: block; }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }

:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

@media (max-width: 640px) {
  .brand .tag { display: none; }
  .brand .brand-name { font-size: 1.05rem; }
  .masthead nav { gap: 14px; font-size: .88rem; }
}
/* The brand already links to the hub, so on a phone its nav link gives way
   to keep the theme toggle on screen. */
@media (max-width: 440px) {
  .masthead nav .nav-hub { display: none; }
}

/* ------------------------------------------------------------ breadcrumb */

.crumbs {
  font-size: .84rem; color: var(--ink-faint);
  padding-block: 20px 0; font-weight: 500;
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; align-items: center; }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--line-strong); font-size: 1.1rem; line-height: 1; }
.crumbs a { color: var(--ink-faint); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs li[aria-current="page"] { color: var(--ink-soft); font-weight: 600; }

/* ------------------------------------------------------------------ hero */

.hero { padding-block: 38px 18px; }
.hero-grid {
  display: grid; gap: 36px;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 26px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: .75rem; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  padding: 5px 14px; border-radius: 100px; margin: 0 0 18px; width: fit-content;
}
.eyebrow .flag { font-size: 1.15rem; letter-spacing: 0; line-height: 1; }

h1 {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 5.2vw, 3.8rem);
  line-height: 1.08; letter-spacing: -.02em;
  margin: 0 0 18px; font-weight: 600;
  color: var(--ink);
}
.lede { font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 26px; max-width: 48ch; line-height: 1.6; }

.hero-figure {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); background: var(--bg-sunk);
  border: 1px solid var(--line);
  transition: transform 0.4s ease, border-color 0.4s ease;
}
.hero-figure:hover { border-color: var(--line-strong); }
.hero-figure img { width: 100%; height: clamp(260px, 40vw, 440px); object-fit: cover; object-position: center 35%; display: block; }
.hero-figure figcaption {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 34px 22px 16px;
  background: linear-gradient(to top, rgba(6, 8, 14, .95) 0%, rgba(6, 8, 14, .5) 60%, rgba(6, 8, 14, 0) 100%);
  color: #fff; font-size: .84rem; backdrop-filter: blur(2px);
}
.hero-figure figcaption strong { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; }
.hero-figure figcaption a { color: var(--accent); text-decoration: none; }
.hero-figure figcaption a:hover { text-decoration: underline; }

.stat-row {
  display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0;
}
.stat-row div {
  margin: 0; flex: 1 1 120px;
  background: var(--bg-surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 16px;
  box-shadow: var(--shadow-sm); transition: border-color 0.2s ease;
}
.stat-row div:hover { border-color: var(--line-strong); }
.stat-row dt { font-size: .68rem; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 3px; font-weight: 600; }
.stat-row dd { margin: 0; font-family: var(--serif); font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; color: var(--accent); line-height: 1.1; }
.stat-row dd small { font-size: .82rem; font-weight: 400; color: var(--ink-soft); font-family: var(--sans); }

/* --------------------------------------------------------------- section */

section { padding-block: 52px; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }

.section-head { margin-bottom: 30px; max-width: 64ch; }
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.2vw, 2.3rem); letter-spacing: -.02em;
  margin: 0 0 10px; font-weight: 600; line-height: 1.15; color: var(--ink);
}
.section-head p { margin: 0; color: var(--ink-soft); font-size: 1.04rem; }

/* ---------------------------------------------------------------- places */

.places { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.place {
  background: var(--bg-surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color .3s ease, transform .3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .3s ease;
}
.place:hover {
  border-color: var(--accent-border);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.place-img { position: relative; background: var(--bg-sunk); aspect-ratio: 16 / 10; overflow: hidden; }
.place-img img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.place:hover .place-img img { transform: scale(1.06); }

.place-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.place-body h3 { margin: 0; font-family: var(--serif); font-size: 1.35rem; letter-spacing: -.015em; font-weight: 600; line-height: 1.25; }
.place-body h3 a { text-decoration: none; color: var(--ink); }
.place-body h3 a:hover { color: var(--accent); }
.place-kind { font-size: .81rem; color: var(--accent); font-weight: 600; letter-spacing: .02em; }
.place-body p { margin: 0; font-size: .94rem; color: var(--ink-soft); line-height: 1.6; }
.place-foot { margin-top: auto; padding-top: 14px; font-size: .76rem; color: var(--ink-faint); border-top: 1px solid var(--line); }
.place-foot a { color: var(--ink-faint); text-decoration: underline; text-underline-offset: 2px; }
.place-foot a:hover { color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--sans); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
  padding: 4px 10px; border-radius: 100px;
  background: var(--bg-glass); color: var(--accent);
  border: 1px solid var(--accent-border); box-shadow: var(--shadow-sm);
}
.place-img .badge { position: absolute; top: 12px; left: 12px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* ---------------------------------------------------------------- esim */

.esim { background: var(--bg-surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.esim-head {
  padding: 24px 28px; border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: baseline; justify-content: space-between;
  background: var(--bg-raised);
}
.esim-head h2 { margin: 0; font-family: var(--serif); font-size: 1.45rem; letter-spacing: -.02em; font-weight: 600; }
.esim-head p { margin: 4px 0 0; color: var(--ink-soft); font-size: .94rem; }
.esim-from { text-align: right; }
.esim-from .amount { font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--accent); display: block; line-height: 1; }
.esim-from .label { font-size: .72rem; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
@media (max-width: 560px) { .esim-from { text-align: left; } }

table.packages { width: 100%; border-collapse: collapse; font-size: .96rem; }
table.packages caption { text-align: left; padding: 14px 28px; color: var(--ink-faint); font-size: .84rem; border-bottom: 1px solid var(--line); }
table.packages th, table.packages td { padding: 14px 28px; text-align: left; border-bottom: 1px solid var(--line); }
table.packages thead th {
  font-size: .72rem; letter-spacing: .11em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600; border-bottom-color: var(--line-strong); background: var(--bg-surface);
}
table.packages tbody tr { transition: background 0.2s ease; }
table.packages tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
table.packages tbody tr:last-child td { border-bottom: 0; }
table.packages .num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
table.packages .price { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; color: var(--accent); }
table.packages .cheapest td { background: var(--accent-soft); }
table.packages .go { text-align: right; }
table.packages .go a {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent); color: var(--accent-ink);
  padding: 7px 16px; border-radius: 100px;
  font-size: .85rem; font-weight: 650; text-decoration: none; white-space: nowrap;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}
table.packages .go a:hover { filter: brightness(1.1); transform: scale(1.04); text-decoration: none; }
@media (max-width: 640px) {
  table.packages thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.packages tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
  table.packages td { border: 0; padding: 0; }
  table.packages td.go { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

.esim-foot { padding: 20px 28px; border-top: 1px solid var(--line); background: var(--bg-sunk); font-size: .88rem; color: var(--ink-soft); }
.networks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.networks span {
  font-size: .78rem; padding: 4px 11px; border-radius: 100px;
  border: 1px solid var(--line-strong); color: var(--ink-soft); background: var(--bg-surface);
}
.networks span b { font-weight: 600; color: var(--ink); }

.cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--accent-ink);
  padding: 14px 28px; border-radius: 100px;
  font-weight: 650; text-decoration: none; font-size: 1rem;
  box-shadow: var(--shadow); transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
.cta:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--accent-ink); }

.pills { display: flex; flex-wrap: wrap; gap: 9px; margin: 20px 0 0; padding: 0; list-style: none; }
.pills li {
  font-size: .84rem; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 100px; padding: 6px 14px;
  background: var(--bg-surface); box-shadow: var(--shadow-sm);
}

/* ------------------------------------------------------------------ prose */

.prose { max-width: 68ch; font-size: 1.05rem; }
.prose p { color: var(--ink-soft); line-height: 1.7; }
.prose h3 { font-family: var(--serif); font-size: 1.45rem; color: var(--ink); margin-top: 28px; margin-bottom: 10px; }

.faq { max-width: 76ch; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-surface); margin-bottom: 12px; overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq details:hover { border-color: var(--line-strong); }
.faq details[open] { border-color: var(--accent-border); }
.faq summary {
  cursor: pointer; padding: 18px 24px; font-family: var(--serif); font-size: 1.2rem; font-weight: 600;
  list-style: none; position: relative; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--sans);
  color: var(--accent); font-size: 1.4rem; font-weight: 400; line-height: 1;
  transition: transform 0.2s ease; flex-shrink: 0; margin-left: 16px;
}
.faq details[open] summary::after { content: "\2212"; transform: rotate(180deg); }
.faq details p { margin: 0; padding: 0 24px 20px; color: var(--ink-soft); font-size: .98rem; line-height: 1.65; }

/* -------------------------------------------------------------- directory */

.search-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; position: relative; }
.search-row input {
  flex: 1 1 260px; min-width: 0;
  background: var(--bg-surface); border: 1px solid var(--line-strong);
  color: var(--ink); border-radius: 100px; padding: 14px 22px 14px 48px;
  font: inherit; font-size: 1rem; box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23a2adb9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 18px center;
}
.search-row input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft-strong);
}
.search-row input::placeholder { color: var(--ink-faint); }

.country-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.country-grid a {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-surface); text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.country-grid a:hover {
  border-color: var(--accent-border); background: var(--bg-raised);
  transform: translateY(-2px); box-shadow: var(--shadow);
}
.country-grid .flag { font-size: 1.4rem; line-height: 1; flex: none; }
.country-grid .nm { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.country-grid .nm b { font-family: var(--serif); font-weight: 600; font-size: 1.08rem; letter-spacing: -.01em; color: var(--ink); }
.country-grid .nm em {
  font-style: normal; font-size: .78rem; color: var(--ink-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.country-grid li.hide { display: none; }

.empty { color: var(--ink-faint); font-style: italic; padding: 30px 0; font-size: 1.05rem; }

/* ------------------------------------------------------------------ home */

.home-hero { padding-block: 64px 40px; text-align: center; }
.home-hero h1 { max-width: 18ch; margin-inline: auto; font-size: clamp(2.6rem, 5.8vw, 4.4rem); }
.home-hero .lede { margin-inline: auto; max-width: 58ch; font-size: 1.2rem; }

.feature-row { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 12px; }
.feature {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 24px; background: var(--bg-surface); box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.feature:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.feature h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 1.28rem; letter-spacing: -.01em; color: var(--ink); font-weight: 600; }
.feature p { margin: 0; color: var(--ink-soft); font-size: .94rem; line-height: 1.6; }

/* Contact: the computatus.com form, in this site's clothes. */
.contact { margin-top: 56px; }
.contact-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact h3 { margin: 0 0 12px; font-family: var(--serif); font-size: 1.45rem; letter-spacing: -.01em; color: var(--ink); font-weight: 600; }
.contact-intro p { margin: 0; color: var(--ink-soft); line-height: 1.65; max-width: 46ch; }
.contact-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; background: var(--bg-surface); box-shadow: var(--shadow-sm);
}
.contact-card h3 { color: var(--accent); }
.contact-form { display: grid; gap: 18px; }
.contact-form label { display: block; margin-bottom: 6px; font-size: .86rem; font-weight: 600; color: var(--ink-soft); }
.contact-form input, .contact-form textarea {
  width: 100%; box-sizing: border-box;
  background: var(--bg-sunk); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  color: var(--ink); padding: 12px 16px; font: inherit; font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft-strong);
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--ink-faint); }
.contact-send { width: 100%; justify-content: center; border: 0; cursor: pointer; font: inherit; font-weight: 650; }
.contact-send:disabled { filter: grayscale(0.6); opacity: .6; cursor: not-allowed; transform: none; }
.contact-status { margin: 0; text-align: center; font-size: .95rem; min-height: 1.4em; }
.contact-status.success { color: var(--teal); }
.contact-status.error { color: #f08a7e; }

/* ---------------------------------------------------------------- footer */

footer.site {
  border-top: 1px solid var(--line); margin-top: 30px;
  padding-block: 46px 56px; background: var(--bg-sunk);
  font-size: .88rem; color: var(--ink-soft);
}
footer.site .cols { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
footer.site h4 { margin: 0 0 12px; font-family: var(--sans); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
footer.site p { margin: 0 0 12px; line-height: 1.65; }
footer.site a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
footer.site a:hover { color: var(--accent); }
footer.site .fine { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: .82rem; }

/* ------------------------------------------------------------------- 404 */

.center-page { min-height: 62vh; display: grid; place-content: center; text-align: center; gap: 16px; }
.center-page h1 { font-family: var(--serif); font-size: 4rem; margin: 0; color: var(--accent); }

/* Available to screen readers, absent from the page. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ------------------------------------------- connectivity note details */

.aside-section { border-top: 1px solid var(--line); }
.aside-section .section-head h2 { font-family: var(--serif); font-size: 1.35rem; letter-spacing: -.015em; }
.aside-section .section-head p { font-size: .95rem; }

.esim-details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.esim-details > summary {
  cursor: pointer; list-style: none; padding: 18px 24px;
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  font-size: 1rem; border-radius: var(--radius); transition: background 0.2s ease;
}
.esim-details > summary:hover { background: var(--bg-raised); }
.esim-details > summary::-webkit-details-marker { display: none; }
.esim-details > summary::after {
  content: "+"; margin-left: auto; color: var(--accent);
  font-size: 1.4rem; line-height: 1; font-weight: 400; transition: transform 0.2s ease;
}
.esim-details[open] > summary::after { content: "\2212"; transform: rotate(180deg); }
.esim-details[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; background: var(--bg-raised); }
.esim-summary-main { font-weight: 600; font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.esim-summary-from { font-family: var(--sans); font-size: .88rem; color: var(--accent); font-weight: 600; }
.esim-details > .esim { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.esim-details .esim-foot { background: transparent; }
.esim-cta { margin: 0; padding: 4px 24px 8px; }
.esim-details .aside { padding: 0 24px 20px; margin: 12px 0 0; }

.cta-quiet {
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent-border);
  padding: 10px 20px; font-size: .94rem; border-radius: 100px;
}
.cta-quiet:hover { background: var(--accent-soft); filter: none; color: var(--accent-hover); }

.aside { font-size: .85rem; color: var(--ink-faint); line-height: 1.6; }
.aside a { color: var(--ink-faint); text-decoration: underline; text-underline-offset: 2px; }
.aside a:hover { color: var(--accent); }

.stat-row dd.sm { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--ink-soft); }

footer.site .fine.disclaimer { margin-top: 12px; padding-top: 0; border-top: 0; }

/* ------------------------------------------------ hub and directory tiles */

/* The masthead is sticky, so an in-page jump has to land below it. */
[id] { scroll-margin-top: 88px; }

.dir-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.dir-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: border-color .3s ease, transform .3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .3s ease;
}
.dir-card:hover { border-color: var(--accent-border); transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.dir-img { position: relative; aspect-ratio: 16 / 9; background: var(--bg-sunk); overflow: hidden; }
.dir-img img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.dir-card:hover .dir-img img { transform: scale(1.05); }
.dir-mono {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); font-size: 5rem; font-weight: 600; line-height: 1; color: var(--accent);
  background: radial-gradient(circle at 30% 20%, var(--accent-soft-strong), transparent 62%), var(--bg-sunk);
}
.dir-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dir-body h3 { margin: 0; font-family: var(--serif); font-size: 1.45rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.dir-body h3 a { color: var(--ink); text-decoration: none; }
/* The title's link covers the whole card; the credit link sits above it. */
.dir-body h3 a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.dir-card:hover h3 a { color: var(--accent); }
.dir-body p { margin: 0; color: var(--ink-soft); font-size: .94rem; line-height: 1.6; }
.dir-body .dir-stats { font-size: .8rem; color: var(--accent); font-weight: 600; letter-spacing: .02em; }
.dir-body .dir-credit {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: .74rem; color: var(--ink-faint); position: relative; z-index: 2;
}
.dir-credit a { color: var(--ink-faint); text-decoration: underline; text-underline-offset: 2px; }
.dir-credit a:hover { color: var(--accent); }

.soon-label {
  margin: 28px 0 12px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; color: var(--ink-faint);
}
.dir-group .section-head + .soon-label { margin-top: 0; }
.soon-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.soon-grid li {
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  padding: 13px 16px; color: var(--ink-faint);
}
.soon-grid b { display: block; font-family: var(--serif); font-size: 1.1rem; font-weight: 600; color: var(--ink-soft); letter-spacing: -.01em; }
.soon-grid span { display: block; margin-top: 2px; font-size: .8rem; line-height: 1.5; }

/* ---------------------------------------------------------- ranked lists */

.hero-grid.solo { grid-template-columns: 1fr; }
.hero-grid.solo .lede { max-width: 64ch; }

.entries { list-style: none; margin: 0; padding: 0; }
.entries > li { display: flex; min-width: 0; }
.entries > li > .place { flex: 1; min-width: 0; }
/* Science images are often diagrams drawn on a transparent background - the
   Planck constant is a black "h" - which vanish on the dark theme. They sit
   on white, as they do on Wikipedia. Travel photographs are opaque and keep
   the sunk background. */
.entry .place-img,
.dir-img,
main[data-kind="list"] .hero-figure,
main[data-kind="directory"] .hero-figure { background: #fff; }

/* A lead about a constant can carry thirty digits with no break in them. */
.entry .place-body p { overflow-wrap: anywhere; }

.rank {
  position: absolute; top: 12px; left: 12px;
  min-width: 36px; height: 36px; padding: 0 10px;
  display: inline-grid; place-items: center; border-radius: 100px;
  font-family: var(--serif); font-size: 1.12rem; font-weight: 700; line-height: 1; color: var(--accent);
  background: var(--bg-glass); border: 1px solid var(--accent-border); box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.entry-mono {
  position: relative; height: 62px; border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 10% 0%, var(--accent-soft-strong), transparent 70%), var(--bg-sunk);
}

.prose .notes { margin: 0 0 18px; padding-left: 20px; color: var(--ink-soft); }
.prose .notes li { margin-bottom: 6px; line-height: 1.6; }
.prose .notes b { color: var(--ink); font-weight: 600; }

/* A cuisine list's way into the country's travel guide. */
.list-travel { margin: 22px 0 0; }

/* Where a place is: links to the travel guides that cover it. */
.entry .entry-where { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; }
.entry .entry-where a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.entry .entry-where a:hover { color: var(--accent); }
.entry .entry-where .flag { font-size: 1rem; }
