/* ==========================================================================
   Travel With Egypt — Design System v8
   Google / AdSense-inspired: clean white surfaces, Google blue actions,
   warm Egyptian gold accents, Google Sans Flex typography, 8px spacing grid.
   ========================================================================== */

:root {
  /* Brand */
  --blue: #1a73e8;
  --blue-600: #1765cc;
  --blue-700: #174ea6;
  --blue-50: #e8f0fe;
  --blue-100: #d2e3fc;
  --gold: #f9ab00;
  --gold-600: #e37400;
  --gold-50: #fef7e0;
  --green: #188038;
  --green-50: #e6f4ea;
  --red: #d93025;
  --red-50: #fce8e6;

  /* Neutrals (Google grey) */
  --ink: #202124;
  --ink-2: #3c4043;
  --muted: #5f6368;
  --subtle: #80868b;
  --line: #dadce0;
  --line-soft: #e8eaed;
  --surface: #ffffff;
  --surface-2: #f8f9fa;
  --surface-3: #f1f3f4;

  /* Type */
  --font: 'Google Sans Flex', 'Google Sans', 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-read: 'Google Sans Flex', 'Roboto', 'Segoe UI', system-ui, sans-serif;

  /* Spacing (8px grid) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  /* Shape & elevation */
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;
  --e1: 0 1px 2px rgba(60,64,67,.30), 0 1px 3px 1px rgba(60,64,67,.15);
  --e2: 0 1px 2px rgba(60,64,67,.30), 0 2px 6px 2px rgba(60,64,67,.15);
  --e3: 0 4px 8px 3px rgba(60,64,67,.15), 0 1px 3px rgba(60,64,67,.30);

  --container: 1200px;
  --header-h: 64px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font); color: var(--ink); line-height: 1.25; margin: 0 0 var(--s3); font-weight: 500; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 var(--s4); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue-100); outline-offset: 2px; border-radius: 4px; }
.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; }
.skip-link { position: absolute; left: 16px; top: -48px; background: var(--blue); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); z-index: 1000; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s5); }
.container-narrow { max-width: 820px; }
.section { padding: var(--s8) 0; }
.section-tight { padding: var(--s7) 0; }
.section-alt { background: var(--surface-2); }
.section-blue { background: var(--blue-50); }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: var(--r-pill); border: 1px solid transparent;
  font-weight: 500; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background .15s, box-shadow .15s, border-color .15s; text-decoration: none !important;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-600); box-shadow: var(--e1); }
.btn-outline { background: var(--surface); color: var(--blue); border-color: var(--line); }
.btn-outline:hover { background: var(--blue-50); border-color: var(--blue-100); }
.btn-tonal { background: var(--blue-50); color: var(--blue-700); }
.btn-tonal:hover { background: var(--blue-100); }
.btn-gold { background: var(--gold); color: #202124; }
.btn-gold:hover { background: #f29900; box-shadow: var(--e1); }
.btn-white { background: #fff; color: var(--blue-700); }
.btn-white:hover { box-shadow: var(--e2); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none !important; transition: background .15s;
}
.chip:hover { background: var(--surface-3); }
.chip.is-active, .chip[aria-current] { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-700); }
.tag { display: inline-block; font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--blue-700); background: var(--blue-50); padding: 3px 10px; border-radius: var(--r-pill); }
.tag-gold { color: #8a4b00; background: var(--gold-50); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: var(--s3); }
.link-arrow { font-weight: 500; white-space: nowrap; }
.link-arrow::after { content: " →"; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line-soft); }
.header-inner { display: flex; align-items: center; gap: var(--s5); height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; flex-shrink: 0; }
.brand img { width: 36px; height: 36px; }
.brand-name { font-size: 20px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; white-space: nowrap; }
.brand-name b { color: var(--blue); font-weight: 700; }
.main-nav { flex: 1; min-width: 0; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; }
.nav-link { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border-radius: var(--r-pill); color: var(--ink-2); font-size: 15px; font-weight: 500; white-space: nowrap; text-decoration: none !important; }
.nav-link:hover, .nav-item:focus-within > .nav-link { background: var(--surface-3); color: var(--ink); }
.nav-link.is-current { color: var(--blue); background: var(--blue-50); }
.caret { width: 16px; height: 16px; fill: currentColor; opacity: .7; }
.nav-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 300px; padding: var(--s3);
  background: var(--surface); border-radius: var(--r); box-shadow: var(--e3);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: all .15s ease; z-index: 50;
}
.nav-dropdown-wide { min-width: 520px; }
.nav-item:nth-last-child(-n+3) > .nav-dropdown { left: auto; right: 0; }
body { overflow-x: clip; }
.nav-item:hover > .nav-dropdown, .nav-item:focus-within > .nav-dropdown, .nav-item.is-open > .nav-dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: var(--s2) var(--s3) var(--s3); border-bottom: 1px solid var(--line-soft); margin-bottom: var(--s2); }
.dropdown-head strong { font-size: 15px; font-weight: 500; color: var(--ink); }
.dropdown-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-dropdown-wide .dropdown-grid { grid-template-columns: 1fr 1fr; }
.dropdown-grid a { display: block; padding: 9px 12px; border-radius: var(--r-sm); color: var(--ink-2); font-size: 14px; text-decoration: none !important; }
.dropdown-grid a:hover { background: var(--blue-50); color: var(--blue-700); }
.header-actions { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.header-search { display: flex; align-items: center; height: 40px; background: var(--surface-3); border-radius: var(--r-pill); padding: 0 6px 0 14px; width: 230px; border: 1px solid transparent; transition: all .15s; }
.header-search:focus-within { background: var(--surface); border-color: var(--line); box-shadow: var(--e1); }
.header-search input { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; font-size: 14px; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--line-soft); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.menu-toggle { display: none; }
.mobile-search { display: none; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: var(--s7) 0 var(--s6); background: linear-gradient(180deg, var(--blue-50) 0%, var(--surface) 100%); border-bottom: 1px solid var(--line-soft); }
.page-hero h1 { max-width: 900px; margin-bottom: var(--s3); }
.page-hero .lead, .page-hero-sub { font-size: 1.15rem; color: var(--muted); max-width: 760px; margin: 0; }
.page-hero .chip-row { margin-top: var(--s5); }
.category-hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s7); align-items: center; }
.category-hero-media { display: grid; gap: var(--s3); height: 360px; grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; }
.category-hero-media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-lg); background: var(--surface-3); }
.category-hero-media img:first-child { grid-row: span 2; }
.category-hero-media.count-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.category-hero-media.count-2 { grid-template-rows: 1fr; }
.category-hero-media.count-2 img:first-child { grid-row: auto; }
@media (max-width: 960px) { .category-hero-grid { grid-template-columns: 1fr; } .category-hero-media { height: 240px; } }
@media (max-width: 640px) { .category-hero-media { display: none; } }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: var(--s4); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs .sep { color: var(--subtle); }
.breadcrumbs [aria-current] { color: var(--ink-2); }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* ---------- Home hero ---------- */
.hero { position: relative; padding: var(--s8) 0 var(--s7); overflow: hidden; background: radial-gradient(1200px 400px at 85% 0%, var(--gold-50), transparent 60%), radial-gradient(900px 500px at 0% 100%, var(--blue-50), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s7); align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); margin-bottom: var(--s4); }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero .lead { font-size: 1.2rem; color: var(--muted); margin-bottom: var(--s5); max-width: 560px; }
.hero-search { display: flex; align-items: center; gap: var(--s2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 6px 6px 20px; box-shadow: var(--e1); max-width: 560px; transition: box-shadow .15s; }
.hero-search:focus-within { box-shadow: var(--e2); border-color: transparent; }
.hero-search svg { width: 20px; height: 20px; fill: var(--muted); flex-shrink: 0; }
.hero-search input { flex: 1; border: 0; outline: none; background: transparent; font-size: 16px; min-width: 0; height: 40px; }
.hero-popular { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s4); font-size: 14px; color: var(--muted); }
.hero-media { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; gap: var(--s3); height: 460px; }
.hero-media figure { margin: 0; border-radius: var(--r-lg); overflow: hidden; position: relative; background: var(--surface-3); }
.hero-media figure:first-child { grid-row: span 2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media figcaption { position: absolute; left: 12px; bottom: 12px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 13px; font-weight: 500; padding: 4px 12px; border-radius: var(--r-pill); }
.stat-row { display: flex; flex-wrap: wrap; gap: var(--s6); margin-top: var(--s6); }
.stat-row div strong { display: block; font-size: 1.8rem; font-weight: 500; color: var(--ink); line-height: 1.1; }
.stat-row div span { font-size: 14px; color: var(--muted); }

/* ---------- Section headings ---------- */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s5); margin-bottom: var(--s6); }
.section-head h2 { margin-bottom: var(--s2); }
.section-head p { color: var(--muted); margin: 0; max-width: 640px; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: var(--s5); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card:hover { box-shadow: var(--e2); border-color: transparent; transform: translateY(-2px); }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-3); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-media .tag { position: absolute; top: 12px; left: 12px; max-width: calc(100% - 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(255,255,255,.95); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: var(--s4) var(--s5) var(--s5); }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--muted); margin-bottom: var(--s2); }
.card-meta span + span::before { content: "·"; margin-right: 12px; color: var(--subtle); }
.card h3 { font-size: 1.12rem; line-height: 1.35; margin-bottom: var(--s2); }
.card h3 a { color: var(--ink); }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card:hover h3 a { color: var(--blue); text-decoration: none; }
.card p { font-size: 15px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: var(--s4); font-size: 14px; font-weight: 500; color: var(--blue); }

/* horizontal list card */
.list-card { display: grid; grid-template-columns: 112px 1fr; gap: var(--s4); align-items: center; padding: var(--s3) 0; border-bottom: 1px solid var(--line-soft); position: relative; }
.list-card:last-child { border-bottom: 0; }
.list-card img { width: 112px; height: 76px; object-fit: cover; border-radius: var(--r-sm); }
.list-card h3 { font-size: 15px; margin: 0 0 4px; line-height: 1.35; }
.list-card h3 a { color: var(--ink); }
.list-card h3 a::after { content: ""; position: absolute; inset: 0; }
.list-card:hover h3 a { color: var(--blue); }
.list-card span { font-size: 13px; color: var(--muted); }

/* feature (lead) card */
.feature-card { display: grid; grid-template-columns: 1.2fr 1fr; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-xl); overflow: hidden; position: relative; transition: box-shadow .2s; }
.feature-card:hover { box-shadow: var(--e2); }
.feature-card .card-media { aspect-ratio: auto; min-height: 340px; }
.feature-card .feature-body { padding: var(--s6) var(--s6); display: flex; flex-direction: column; justify-content: center; }
.feature-card h2, .feature-card h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: var(--s3); }
.feature-card h2 a, .feature-card h3 a { color: var(--ink); }
.feature-card h2 a::after, .feature-card h3 a::after { content: ""; position: absolute; inset: 0; }
.feature-card p { color: var(--muted); }

/* destination tiles */
.tile-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 3 / 4; display: block; color: #fff; text-decoration: none !important; background: var(--ink); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.72) 100%); }
.tile:hover img { transform: scale(1.06); }
.tile-body { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--s5); z-index: 1; }
.tile-body small { display: block; font-size: 13px; opacity: .9; margin-bottom: 2px; }
.tile-body h3 { color: #fff; font-size: 1.35rem; margin: 0; }
.tile-body span { display: inline-block; margin-top: var(--s2); font-size: 13px; background: rgba(255,255,255,.2); padding: 3px 10px; border-radius: var(--r-pill); backdrop-filter: blur(4px); }

/* topic cards (category with icon) */
.topic-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.topic-card { position: relative; display: flex; gap: var(--s4); align-items: center; padding: var(--s4); background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); transition: box-shadow .2s, border-color .2s; text-decoration: none !important; }
.topic-card:hover { box-shadow: var(--e1); border-color: var(--blue-100); }
.topic-card img { width: 64px; height: 64px; border-radius: var(--r); object-fit: cover; flex-shrink: 0; }
.topic-card h3 { font-size: 16px; margin: 0 0 2px; color: var(--ink); }
.topic-card:hover h3 { color: var(--blue); }
.topic-card span { font-size: 13px; color: var(--muted); }

/* collection cards (big category cards) */
.collection-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-xl); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.collection-card:hover { box-shadow: var(--e2); transform: translateY(-2px); }
.collection-card .card-media { aspect-ratio: 16 / 9; }
.collection-card .collection-body { padding: var(--s5); display: flex; flex-direction: column; flex: 1; }
.collection-card h3 { font-size: 1.3rem; margin-bottom: var(--s2); }
.collection-card h3 a { color: var(--ink); }
.collection-card h3 a::after { content: ""; position: absolute; inset: 0; }
.collection-card p { color: var(--muted); font-size: 15px; }
.collection-card .sub-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: var(--s3); position: relative; z-index: 1; }
.collection-card .sub-links a { font-size: 13px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-2); }
.collection-card .sub-links a:hover { background: var(--blue-50); color: var(--blue-700); text-decoration: none; }

/* CTA / newsletter band */
.cta-band { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s6); align-items: center; padding: var(--s7); border-radius: var(--r-xl); background: linear-gradient(135deg, var(--blue-700) 0%, var(--blue) 100%); color: #fff; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: rgba(249,171,0,.22); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.88); margin: 0; }
.cta-links { display: grid; gap: var(--s3); position: relative; z-index: 1; }
.cta-links a { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); background: rgba(255,255,255,.12); color: #fff; padding: var(--s4) var(--s5); border-radius: var(--r); font-weight: 500; text-decoration: none !important; transition: background .15s; }
.cta-links a:hover { background: rgba(255,255,255,.22); }
.cta-links small { display: block; font-weight: 400; opacity: .85; font-size: 13px; }

/* steps / features */
.feature-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.feature-box { padding: var(--s5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft); }
.feature-box .num { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-50); color: var(--blue-700); font-weight: 600; margin-bottom: var(--s3); }
.feature-box:nth-child(2) .num { background: var(--gold-50); color: #8a4b00; }
.feature-box:nth-child(3) .num { background: var(--green-50); color: var(--green); }
.feature-box h3 { font-size: 1.1rem; }
.feature-box p { color: var(--muted); margin: 0; font-size: 15px; }

/* month strip */
.month-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s3); }
.month-chip { display: block; padding: var(--s4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-soft); text-decoration: none !important; transition: all .15s; }
.month-chip:hover { border-color: var(--blue-100); background: var(--blue-50); }
.month-chip strong { display: block; color: var(--ink); font-weight: 500; }
.month-chip span { font-size: 13px; color: var(--muted); }

/* FAQ */
.faq-list { display: grid; gap: var(--s2); }
.faq-item { border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: var(--s4) var(--s5); font-weight: 500; display: flex; justify-content: space-between; gap: var(--s4); align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--blue); line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { border-bottom: 1px solid var(--line-soft); }
.faq-answer { padding: var(--s4) var(--s5); color: var(--ink-2); }
.faq-answer p:last-child { margin: 0; }

/* filters / forms */
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-end; padding: var(--s4); background: var(--surface-2); border-radius: var(--r-lg); margin-bottom: var(--s5); }
.filter-bar label { display: grid; gap: 4px; font-size: 13px; font-weight: 500; color: var(--muted); flex: 1; min-width: 180px; }
.field, .filter-bar input, .filter-bar select, .form input, .form select, .form textarea {
  height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 15px; width: 100%;
}
.form textarea { height: auto; padding: 12px 14px; min-height: 140px; }
.field:focus, .filter-bar input:focus, .filter-bar select:focus, .form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-100); }
.form { display: grid; gap: var(--s4); }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.result-count { font-size: 14px; color: var(--muted); margin: 0 0 var(--s4); }
.empty-state { text-align: center; padding: var(--s7) var(--s5); background: var(--surface-2); border-radius: var(--r-lg); color: var(--muted); }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: var(--s6); }
.pagination a { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 10px; border-radius: 50%; color: var(--ink-2); font-weight: 500; text-decoration: none !important; }
.pagination a:hover { background: var(--surface-3); }
.pagination a[aria-current] { background: var(--blue); color: #fff; }
.notice { padding: var(--s4) var(--s5); border-radius: var(--r); background: var(--green-50); color: #0d652d; margin-bottom: var(--s5); }

/* ---------- Layout with sidebar ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s7); align-items: start; }
.layout > *, .legal-grid > * { min-width: 0; }
.sidebar { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: var(--s5); }
.widget { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: var(--s5); }
.widget h3 { font-size: 15px; font-weight: 600; letter-spacing: .02em; margin-bottom: var(--s3); color: var(--ink); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li a { display: block; padding: 8px 0; color: var(--ink-2); font-size: 14px; border-bottom: 1px solid var(--line-soft); }
.widget li:last-child a { border-bottom: 0; }
.widget li a:hover { color: var(--blue); text-decoration: none; }
.widget-search { display: flex; gap: 6px; }
.widget-search input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 0 14px; font-size: 14px; }
.toc-list a.is-active { color: var(--blue); font-weight: 500; }

/* ---------- Article ---------- */
.article-header { padding: var(--s6) 0 var(--s5); }
.article-header h1 { font-size: clamp(2rem, 4vw, 2.9rem); max-width: 900px; margin-bottom: var(--s4); }
.article-header .lead { font-size: 1.2rem; color: var(--muted); max-width: 820px; margin-bottom: var(--s5); }
.article-tags { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4) 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.byline-who { display: flex; align-items: center; gap: var(--s3); }
.byline-who img { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); padding: 4px; }
.byline-who strong { display: block; font-size: 15px; font-weight: 500; }
.byline-who span { font-size: 13px; color: var(--muted); }
.share-row { display: flex; gap: 6px; }
.article-figure { margin: var(--s5) 0 var(--s6); }
.article-figure img { width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--r-xl); background: var(--surface-3); }
.article-figure figcaption { font-size: 13px; color: var(--muted); margin-top: var(--s2); }
.article-figure figcaption a { color: var(--muted); text-decoration: underline; }
.climate-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3); margin: 0 0 var(--s6); }
.climate-strip div { padding: var(--s4); border-radius: var(--r); background: var(--surface-2); }
.climate-strip span { display: block; font-size: 12px; color: var(--muted); }
.climate-strip strong { font-size: 1.15rem; font-weight: 500; }
.toc-box { border: 1px solid var(--line-soft); border-radius: var(--r-lg); background: var(--surface-2); padding: var(--s4) var(--s5); margin-bottom: var(--s6); }
.toc-box summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; }
.toc-box summary::-webkit-details-marker { display: none; }
.toc-box summary span { color: var(--muted); font-weight: 400; font-size: 14px; }
.toc-box ol { margin: var(--s3) 0 0; padding-left: 20px; columns: 2; column-gap: var(--s6); }
.toc-box li { margin: 4px 0; break-inside: avoid; font-size: 15px; }

/* prose */
.prose { font-family: var(--font-read); font-size: 18px; line-height: 1.75; color: var(--ink-2); max-width: 760px; }
.prose > * + * { margin-top: 0; }
.prose p { margin: 0 0 1.2em; }
.prose h2 { font-size: 1.65rem; margin: 2em 0 .6em; color: var(--ink); scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h3 { font-size: 1.28rem; margin: 1.6em 0 .5em; color: var(--ink); }
.prose h4 { font-size: 1.08rem; margin: 1.4em 0 .4em; }
.prose ul, .prose ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--blue); }
.prose a { color: var(--blue); text-decoration: underline; text-decoration-color: var(--blue-100); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.prose a:hover { text-decoration-color: var(--blue); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose blockquote { margin: 1.6em 0; padding: var(--s4) var(--s5); border-left: 4px solid var(--gold); background: var(--gold-50); border-radius: 0 var(--r) var(--r) 0; color: var(--ink); }
.prose img { border-radius: var(--r-lg); margin: 1.5em 0; }
.prose figure { margin: 1.8em 0; }
.prose figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 600; color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line-soft); margin: 2em 0; }
.quick-answer-card {
  background: linear-gradient(135deg, #f0f6ff 0%, #ffffff 100%);
  border: 1.5px solid #c2e7ff;
  border-left: 4px solid var(--blue);
  border-radius: var(--r-lg);
  padding: var(--s5) var(--s6);
  margin: 0 0 1.8em;
  box-shadow: 0 3px 12px rgba(26, 115, 232, 0.06);
}
.quick-answer-card .qa-header {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s3);
}
.quick-answer-card .qa-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e8f0fe;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.quick-answer-card .qa-badge-wrap {
  display: flex;
  flex-direction: column;
}
.quick-answer-card .qa-pill {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue-700);
}
.quick-answer-card .qa-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.quick-answer-card .qa-question-box {
  background: rgba(26, 115, 232, 0.07);
  border-radius: var(--r);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s4);
  display: flex;
  align-items: baseline;
  gap: var(--s3);
}
.quick-answer-card .qa-q-badge {
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}
.quick-answer-card .qa-question-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue-900, #0d47a1);
  margin: 0;
  line-height: 1.4;
}
.quick-answer-card .qa-answer-quote {
  border-left: 3px solid var(--blue);
  padding-left: var(--s4);
  margin: 0;
  font-style: normal;
}
.quick-answer-card .qa-body {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
}
.quick-answer-card .qa-body p {
  margin: 0 0 0.5em;
}
.quick-answer-card .qa-body p:last-child {
  margin: 0;
}

/* Article keywords cloud */
.article-keywords-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: var(--s4);
  padding-top: var(--s3);
  border-top: 1px solid var(--line-soft);
}
.article-keywords-bar .kw-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.article-keywords-bar .kw-pill {
  font-size: 12px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--ink-soft);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
}
.article-keywords-bar .kw-focus {
  background: #e8f0fe;
  color: var(--blue-700);
  border-color: #c2e7ff;
  font-weight: 600;
}

/* Enhanced Callout Boxes for High-Engagement Reading */
.callout-box {
  border-radius: var(--r-lg);
  padding: var(--s4) var(--s5);
  margin: 1.8em 0;
  border-left: 4px solid var(--blue);
  background: var(--surface-2);
}
.callout-tip {
  background: #f0fdf4;
  border-left-color: #16a34a;
  color: #14532d;
}
.callout-tip h4 {
  color: #15803d;
  margin: 0 0 .4em;
  font-size: 1rem;
}
.callout-warning {
  background: #fffbeb;
  border-left-color: #d97706;
  color: #78350f;
}
.callout-warning h4 {
  color: #b45309;
  margin: 0 0 .4em;
  font-size: 1rem;
}
.callout-rule {
  background: #eff6ff;
  border-left-color: var(--blue);
  color: #1e3a8a;
}
.callout-rule h4 {
  color: var(--blue-700);
  margin: 0 0 .4em;
  font-size: 1rem;
}

/* Visitor Specifications Table */
.visitor-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 14.5px;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.visitor-table th {
  background: var(--blue-700, #1557b0);
  color: #fff;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
}
.visitor-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
.visitor-table tr:nth-child(even) td {
  background: var(--surface-2);
}

.prose .tip, .prose .note, .prose .callout, .prose #ai-quick-answer, .prose .quick-answer {
  background: var(--blue-50); border-radius: var(--r-lg); padding: var(--s5); margin: 0 0 1.6em; color: var(--ink);
}
.prose #ai-quick-answer h2, .prose .quick-answer h2 { font-size: 1.1rem; margin: 0 0 .5em; color: var(--blue-700); }
.prose #ai-quick-answer p:last-child { margin: 0; }
.prose .callout-gold { background: var(--gold-50); }
.prose .key-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s3); margin: 0 0 1.6em; padding: 0; list-style: none; }
.prose .key-facts li { margin: 0; padding: var(--s3) var(--s4); background: var(--surface-2); border-radius: var(--r); font-size: 15px; }
.prose .key-facts li::marker { content: ""; }
.prose .key-facts b { display: block; font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

/* human-written introduction (top of every rewritten article) */
.prose .human-intro { margin-bottom: 2.2em; padding-bottom: 1.6em; border-bottom: 1px solid var(--line-soft); }
.prose .human-intro > h2:first-child { margin-top: 0; }
.prose .human-intro .tip { background: var(--gold-50); }

/* legacy article markup */
.prose .table-responsive { overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--line-soft); border-radius: var(--r); }
.prose .table-responsive table { margin: 0; display: table; }
.prose .content-data-table { width: 100%; min-width: 560px; }
.prose .article-callout { background: var(--gold-50); border-radius: var(--r-lg); padding: var(--s5); margin: 1.6em 0; }
.prose .article-callout h4 { margin-top: 0; }
.prose .article-callout p:last-child { margin: 0; }
.prose .article-visual-gallery { display: none; }
.prose .internal-cluster-box { background: var(--surface-2); border-radius: var(--r-lg); padding: var(--s5); margin: 2em 0; }
.prose .icb-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); align-items: flex-start; }
.prose .icb-header h3 { margin: 4px 0 var(--s3); }
.prose .icb-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.prose .icb-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px var(--s4); }
.prose .icb-grid li::marker { content: ""; }
.prose .icb-grid a, .prose .btn-outline-sm { text-decoration: none; font-size: 15px; }
.prose .btn-outline-sm { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: #fff; }

.author-box { display: flex; gap: var(--s4); align-items: flex-start; padding: var(--s5); background: var(--surface-2); border-radius: var(--r-lg); margin: var(--s7) 0 var(--s6); max-width: 760px; }
.author-box img { width: 56px; height: 56px; border-radius: 50%; background: #fff; padding: 6px; flex-shrink: 0; }
.author-box strong { display: block; margin-bottom: 4px; }
.author-box p { margin: 0; font-size: 15px; color: var(--muted); }
.article-section { margin-top: var(--s7); }
.article-section > h2 { font-size: 1.5rem; }
.next-links { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* ---------- Ads (AdSense look) ---------- */
.ad-wrap { margin: var(--s5) auto; text-align: center; }
.adsense-container { margin: var(--s6) 0; padding: var(--s2) 0 var(--s3); text-align: center; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); min-height: 100px; }
.adsense-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); margin-bottom: 6px; }
.ad-slot-sidebar { border: 1px solid var(--line-soft); border-radius: var(--r); padding: var(--s3); min-height: 280px; }

/* ---------- Tables (month matrix etc.) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--r-lg); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); text-align: center; white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
.data-table thead th { background: var(--surface-2); font-weight: 600; color: var(--ink); }
.data-table a { display: block; color: var(--ink-2); border-radius: var(--r-sm); padding: 4px 6px; }
.data-table a:hover { background: var(--blue-50); color: var(--blue-700); text-decoration: none; }
.data-table small { display: block; color: var(--muted); font-size: 11px; }

/* archive index */
.index-group { padding: var(--s5) 0; border-bottom: 1px solid var(--line-soft); }
.index-group h2 { font-size: 1.3rem; }
.index-group[data-level="2"] { padding-left: var(--s5); }
.index-group[data-level="3"], .index-group[data-level="4"] { padding-left: var(--s7); }
.index-group[data-level="2"] h2 { font-size: 1.15rem; }
.index-group[data-level="3"] h2, .index-group[data-level="4"] h2 { font-size: 1.02rem; }
.index-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px var(--s5); list-style: none; margin: var(--s3) 0 0; padding: 0; }
.index-links a { display: block; padding: 6px 0; color: var(--ink-2); font-size: 15px; }
.index-links a:hover { color: var(--blue); }
.index-links small { color: var(--subtle); font-size: 12px; }

/* hotels */
.amenities { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s3); }
.amenities span { font-size: 12px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-2); }
.price { font-size: 14px; color: var(--muted); }
.price strong { color: var(--ink); font-size: 1.1rem; font-weight: 500; }

/* itineraries */
.itinerary { padding: var(--s6); border: 1px solid var(--line-soft); border-radius: var(--r-xl); margin-bottom: var(--s5); background: var(--surface); }
.itinerary-head { display: flex; justify-content: space-between; gap: var(--s5); flex-wrap: wrap; margin-bottom: var(--s3); }
.itinerary-head h2 { margin: var(--s3) 0 4px; }
.timeline { list-style: none; margin: var(--s5) 0 0; padding: 0; border-left: 2px solid var(--blue-100); }
.timeline li { position: relative; display: grid; grid-template-columns: 72px 1fr; gap: var(--s4); padding: 0 0 var(--s5) var(--s5); }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); }
.timeline-day { font-weight: 600; color: var(--blue-700); font-size: 14px; padding-top: 2px; }
.timeline h3 { font-size: 1.05rem; margin-bottom: 4px; }
.timeline p { color: var(--muted); margin: 0; font-size: 15px; }
.calc { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s6); align-items: start; background: var(--surface); padding: var(--s6); border-radius: var(--r-xl); box-shadow: var(--e1); }
.calc input[type=range] { height: auto; padding: 0; border: 0; accent-color: var(--blue); }
.calc-result { background: var(--blue-50); border-radius: var(--r-lg); padding: var(--s5); }
.calc-result > span { font-size: 13px; color: var(--muted); }
.calc-result strong { display: block; font-size: 2.6rem; font-weight: 500; color: var(--blue-700); line-height: 1.2; }
.calc-result small { color: var(--muted); }
.calc-result ul { list-style: none; padding: 0; margin: var(--s4) 0 0; }
.calc-result li { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--blue-100); font-size: 14px; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; padding: var(--s5); } .itinerary { padding: var(--s5); } .timeline li { grid-template-columns: 1fr; gap: 2px; } }

/* legal / long pages */
.legal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s7); align-items: start; }
.legal-main h2 { font-size: 1.45rem; margin-top: var(--s6); }
.legal-main h2:first-child { margin-top: 0; }
.legal-main ul { padding-left: 1.3em; }
.legal-main li { margin: 6px 0; }

/* credits */
.credit-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s4); }
.credit-list article { padding: var(--s4); border: 1px solid var(--line-soft); border-radius: var(--r); font-size: 14px; }
.credit-list h2 { font-size: 15px; margin-bottom: 6px; }
.credit-list p { margin: 0 0 4px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--line-soft); margin-top: var(--s8); padding: var(--s8) 0 var(--s5); color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s6); }
.footer-brand p { color: var(--muted); font-size: 15px; margin: var(--s4) 0; max-width: 360px; }
.footer-col h4 { font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); margin-bottom: var(--s4); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--muted); font-size: 15px; }
.footer-col a:hover { color: var(--blue); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s4); margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: var(--s5); }
.footer-bottom a { color: var(--muted); }

/* ---------- Floating UI ---------- */
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--blue); z-index: 200; transition: width .1s linear; }
.to-top { position: fixed; right: 20px; bottom: 20px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--surface); color: var(--blue); box-shadow: var(--e2); cursor: pointer; font-size: 20px; opacity: 0; visibility: hidden; transition: all .2s; z-index: 90; }
.to-top.is-visible { opacity: 1; visibility: visible; }
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto; background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: var(--s4) var(--s5); display: flex; gap: var(--s4); align-items: center; box-shadow: var(--e3); z-index: 300; font-size: 14px; }
.cookie-banner p { margin: 0; flex: 1; }
.cookie-banner a { color: #8ab4f8; }
.cookie-banner[hidden] { display: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: var(--r-sm); font-size: 14px; z-index: 400; box-shadow: var(--e2); }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .header-search { width: 40px; padding: 0; background: transparent; }
  .header-search input { display: none; }
  .header-search:focus-within { box-shadow: none; border-color: transparent; }
}
@media (max-width: 1100px) {
  .nav-link { padding: 0 9px; font-size: 14px; }
  .card-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { aspect-ratio: 4 / 3; }
}
@media (max-width: 960px) {
  .menu-toggle { display: inline-grid; }
  .header-search { display: none; }
  .site-header { backdrop-filter: none; background: var(--surface); }
  .main-nav { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: 99; background: var(--surface); padding: var(--s4) var(--s5) var(--s7); overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s; flex: none; }
  .main-nav.is-open { transform: none; visibility: visible; }
  .mobile-search { display: flex; margin-bottom: var(--s4); }
  .mobile-search input { flex: 1; height: 44px; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 0 16px; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { height: 48px; width: 100%; justify-content: space-between; border-radius: var(--r-sm); font-size: 16px; }
  .nav-dropdown, .nav-dropdown-wide { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; min-width: 0; padding: 0 0 var(--s3) var(--s3); display: none; }
  .nav-item.is-open > .nav-dropdown { display: block; }
  .nav-dropdown-wide .dropdown-grid { grid-template-columns: 1fr; }
  .dropdown-head { display: none; }
  .hero-grid, .layout, .legal-grid, .feature-card, .cta-band, .category-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-media { height: 320px; }
  .sidebar { position: static; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-row { grid-template-columns: 1fr; }
  .month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature-card .card-media { min-height: 240px; }
  .feature-card .feature-body { padding: var(--s5); }
  .cta-band { padding: var(--s6) var(--s5); }
}
@media (max-width: 640px) {
  .container { padding: 0 var(--s4); }
  .section { padding: var(--s7) 0; }
  .brand-name { font-size: 18px; }
  .card-grid, .card-grid-2, .card-grid-4 { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: 1fr 1fr; gap: var(--s3); }
  .tile-body { padding: var(--s4); }
  .tile-body h3 { font-size: 1.1rem; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .hero { padding: var(--s6) 0; }
  .hero-media { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .toc-box ol { columns: 1; }
  .prose { font-size: 17px; }
  .byline { flex-direction: column; align-items: flex-start; }
  .index-group[data-level] { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .sidebar, .adsense-container, .to-top, .cookie-banner, .share-row { display: none !important; }
  .layout { display: block; }
}
