/* AirportIQ - visual system v2 */
:root {
  --navy-950: #060d1c;
  --navy-900: #0a1628;
  --navy-800: #0f2444;
  --navy-700: #163661;
  --navy-600: #1e4a82;
  --sky-500:  #2563eb;
  --sky-400:  #3b82f6;
  --sky-300:  #60a5fa;
  --sky-100:  #dbeafe;
  --amber:    #f59e0b;
  --amber-d:  #d97706;
  --amber-l:  #fbbf24;
  --paper:    #ffffff;
  --bg:       #f8fafc;
  --bg-warm:  #fef9f0;
  --ink:      #0b1220;
  --ink-2:    #1e293b;
  --slate:    #475569;
  --muted:    #64748b;
  --line:     #e2e8f0;
  --line-2:   #cbd5e1;
  --good:     #15803d;
  --bad:      #b91c1c;
  --shadow-sm: 0 1px 2px rgba(10, 22, 40, .06);
  --shadow:    0 1px 3px rgba(10, 22, 40, .07), 0 8px 24px -12px rgba(10, 22, 40, .18);
  --shadow-lg: 0 4px 12px rgba(10, 22, 40, .10), 0 24px 48px -16px rgba(10, 22, 40, .25);
  --r:        12px;
  --r-sm:     8px;
  --r-xs:     6px;
  --maxw:     1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--sky-500); text-decoration: none; }
a:hover { color: var(--sky-400); text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Type scale - Inter body, Fraunces for display */
h1, h2, h3, h4 {
  font-family: "Fraunces", "Inter", Georgia, serif;
  color: var(--navy-900);
  margin: 0 0 .4em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}
h1 { font-size: clamp(2.1rem, 4vw + .8rem, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 1.6vw + .8rem, 2rem); margin-top: 2.4rem; }
h3 { font-size: 1.2rem; margin-top: 1.6rem; font-weight: 600; }
h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--sky-500); margin-bottom: .6em; font-family: "Inter", sans-serif; font-weight: 700; }
p { margin: 0 0 1.1em; color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.eyebrow { display: inline-block; font-family: "Inter", sans-serif; font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--amber-d); font-weight: 700; margin-bottom: 12px; }

code, .mono { font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; backdrop-filter: saturate(1.4) blur(10px); background-color: rgba(255,255,255,.92); }
.header-row { display: flex; align-items: center; gap: 28px; padding: 14px 24px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: "Fraunces", serif; font-size: 1.35rem; color: var(--navy-900); font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); border-radius: 9px; box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(96,165,250,.18); }
.brand-words strong { color: var(--navy-900); font-weight: 700; }
.brand-words em { font-style: normal; color: var(--amber-d); font-weight: 700; }
.brand.small { font-size: 1rem; gap: 9px; }
.brand.small .brand-mark { width: 28px; height: 28px; border-radius: 7px; }

.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { color: var(--ink-2); padding: 8px 12px; font-weight: 500; font-size: .94rem; border-radius: var(--r-xs); }
.nav a:hover { color: var(--navy-800); background: var(--sky-100); text-decoration: none; }
.nav a.active { color: var(--navy-900); background: var(--sky-100); }

.quick-search { margin-left: auto; display: flex; gap: 0; }
.quick-search input { padding: 9px 14px; border: 1px solid var(--line-2); border-radius: var(--r-xs) 0 0 var(--r-xs); background: var(--bg); width: 240px; font-size: .92rem; font-family: inherit; }
.quick-search input:focus { outline: 2px solid var(--sky-300); outline-offset: -2px; border-color: var(--sky-400); background: var(--paper); }
.quick-search button { padding: 9px 14px; background: var(--navy-800); color: white; border: 0; border-radius: 0 var(--r-xs) var(--r-xs) 0; cursor: pointer; font-weight: 600; }
.quick-search button:hover { background: var(--navy-900); }

/* Hero - editorial / magazine style */
.hero { position: relative; overflow: hidden; background: var(--navy-950); color: white; }
.hero-bg { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,22,40,.0), rgba(6,13,28,.55)); }
.hero-bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .58; z-index: 0; }
.hero-overlay { position: absolute; inset: 0;
  background:
    radial-gradient(80% 90% at 88% 10%, rgba(245, 158, 11, .22) 0%, transparent 55%),
    linear-gradient(105deg, rgba(6, 13, 28, .94) 0%, rgba(10, 22, 40, .78) 42%, rgba(15, 36, 68, .35) 72%, rgba(15, 36, 68, .18) 100%);
}
.hero-inner { position: relative; padding: 84px 0 96px; }
.hero .eyebrow { color: var(--amber-l); }
.hero h1 { color: white; max-width: 760px; letter-spacing: -0.025em; }
.hero h1 em { font-style: italic; color: var(--amber-l); font-weight: 400; }
.hero p.lede { color: rgba(255,255,255,.86); font-size: clamp(1.05rem, .4vw + .9rem, 1.2rem); max-width: 640px; margin: 18px 0 0; }
.hero-form { margin-top: 32px; display: flex; gap: 0; max-width: 600px; background: white; padding: 6px; border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.hero-form .leading { display: inline-flex; align-items: center; padding: 0 4px 0 12px; color: var(--muted); }
.hero-form input { flex: 1; border: 0; padding: 14px 12px; font-size: 1.02rem; outline: none; background: transparent; color: var(--ink); font-family: inherit; }
.hero-form input::placeholder { color: var(--muted); }
.hero-form button { background: var(--amber); color: var(--navy-900); border: 0; padding: 0 26px; font-weight: 700; border-radius: 9px; cursor: pointer; font-size: 1rem; font-family: inherit; transition: background .15s ease; }
.hero-form button:hover { background: var(--amber-d); color: white; }
.hero-cta-row { margin-top: 14px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero-cta-row a { color: rgba(255,255,255,.78); font-size: .9rem; }
.hero-cta-row a:hover { color: white; }
.hero-cta-row a code { background: rgba(255,255,255,.08); padding: 2px 7px; border-radius: 4px; color: var(--amber-l); border: 1px solid rgba(255,255,255,.12); }
.hero-stats { display: flex; gap: 40px; margin-top: 44px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.10); }
.hero-stats .stat { color: white; }
.hero-stats .stat .n { display: block; font-family: "Fraunces", serif; font-size: 2rem; font-weight: 700; color: white; line-height: 1; }
.hero-stats .stat .l { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; opacity: .65; margin-top: 6px; }

/* Sections */
.section { padding: 64px 0; }
.section.tight { padding: 40px 0; }
.section.warm { background: var(--bg-warm); }
.section.dark { background: var(--navy-900); color: rgba(255,255,255,.86); }
.section.dark h2, .section.dark h3, .section.dark h4 { color: white; }
.section.dark p { color: rgba(255,255,255,.78); }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .sub { color: var(--muted); font-size: .96rem; max-width: 520px; }
.section-head a.see-all { font-weight: 600; color: var(--sky-500); white-space: nowrap; }
.section-head a.see-all:hover { color: var(--sky-400); }

/* Feature cards */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.feature { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 22px 20px; color: inherit; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; position: relative; overflow: hidden; }
.feature::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sky-400); transform: scaleY(0); transform-origin: top; transition: transform .2s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); text-decoration: none; }
.feature:hover::before { transform: scaleY(1); }
.feature .row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.feature .city { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.feature h3 { margin: 0 0 6px; font-size: 1.1rem; font-family: "Fraunces", serif; line-height: 1.2; }
.feature .iata-stamp { display: inline-block; font-family: "JetBrains Mono", monospace; background: var(--navy-900); color: var(--amber-l); padding: 3px 8px; border-radius: 5px; font-size: .82rem; font-weight: 700; letter-spacing: .04em; }
.feature .desc { color: var(--ink-2); font-size: .92rem; margin: 8px 0 0; }
.feature .badges { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }

/* Badges */
.badge { background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; letter-spacing: .02em; }
.badge.amber { background: #fffbea; border-color: #fde7a3; color: var(--amber-d); }
.badge.sky   { background: var(--sky-100); border-color: #bfdbfe; color: var(--sky-500); }
.badge.navy  { background: var(--navy-800); border-color: var(--navy-800); color: white; }

/* Layout w/ sidebar */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: flex-start; }
.aside { position: sticky; top: 86px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.panel h4 { margin-top: 0; }
.panel ul { list-style: none; padding: 0; margin: 0; }
.panel li { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; color: var(--ink-2); }
.panel li:last-child { border-bottom: 0; }
.panel li strong { color: var(--ink); }

/* Recommended editorial block */
.recommended { border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; background: var(--paper); }
.recommended h4 { color: var(--sky-500); margin-top: 0; display: flex; align-items: center; gap: 8px; }
.recommended h4::before { content: ""; display: inline-block; width: 14px; height: 2px; background: var(--amber); }
.rec-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.rec-item a, .rec-item .rec-card { display: block; color: var(--ink); padding: 8px 10px; margin: 0 -10px; border-radius: 6px; }
.rec-item a:hover { background: var(--sky-100); text-decoration: none; }
.rec-item .rec-title { display: block; font-weight: 600; font-size: .94rem; color: var(--navy-900); line-height: 1.3; }
.rec-item .rec-source { display: block; font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; font-weight: 600; }
.rec-item .rec-snippet { display: block; font-size: .85rem; color: var(--slate); margin-top: 4px; line-height: 1.45; }

/* Detail head - gradient page banner */
.detail-head { position: relative; background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 60%, var(--navy-700) 100%); color: white; padding: 52px 0 44px; overflow: hidden; }
.detail-head::after { content: ""; position: absolute; right: -120px; top: -100px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(245,158,11,.18), transparent 70%); pointer-events: none; }
.detail-head .container { position: relative; z-index: 1; }
.detail-head h1 { color: white; margin-bottom: .25em; max-width: 820px; }
.detail-head .lede { color: rgba(255,255,255,.84); font-size: 1.06rem; margin: 0; max-width: 720px; }
.crumbs { color: rgba(255,255,255,.65); font-size: .85rem; margin-bottom: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: rgba(255,255,255,.85); }
.crumbs a:hover { color: var(--amber-l); }
.crumbs .sep { color: rgba(255,255,255,.35); }

.codes { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.code-pill { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 10px; padding: 10px 14px; color: white; min-width: 86px; }
.code-pill .lbl { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; opacity: .65; margin-bottom: 4px; font-weight: 600; }
.code-pill .val { font-family: "JetBrains Mono", monospace; font-size: 1.15rem; font-weight: 700; letter-spacing: .04em; color: var(--amber-l); }

/* Fact tables */
.fact-table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.fact-table th, .fact-table td { padding: 14px 18px; text-align: left; vertical-align: top; font-size: .94rem; border-bottom: 1px solid var(--line); }
.fact-table tr:last-child th, .fact-table tr:last-child td { border-bottom: 0; }
.fact-table th { background: var(--bg); color: var(--navy-800); width: 38%; font-weight: 600; }
.fact-table td { color: var(--ink); }
.fact-table code { background: var(--bg); padding: 2px 7px; border-radius: 4px; font-size: .9em; color: var(--navy-800); }

/* KPI strips */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 22px 0 8px; }
.kpi { background: linear-gradient(180deg, var(--paper), var(--bg)); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 16px; }
.kpi .n { font-family: "Fraunces", serif; font-size: 1.7rem; font-weight: 700; color: var(--navy-900); line-height: 1; }
.kpi .l { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 6px; font-weight: 600; }
.kpi .delta { font-size: .8rem; color: var(--good); margin-top: 4px; font-weight: 600; }

/* Carriers */
.carriers { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.carrier-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
.carrier-card:hover { border-color: var(--sky-400); text-decoration: none; transform: translateY(-1px); }
.carrier-card .iata { background: var(--navy-800); color: white; font-family: "JetBrains Mono", monospace; padding: 4px 8px; border-radius: 5px; font-size: .82rem; font-weight: 700; letter-spacing: .04em; }
.carrier-card .name { font-weight: 600; font-size: .92rem; line-height: 1.25; color: var(--ink); }
.carrier-card .cat { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 2px; font-weight: 600; }

/* Directory tables */
table.dir { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
table.dir th, table.dir td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: .92rem; }
table.dir thead th { background: var(--navy-900); color: white; font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; border-bottom: 0; }
table.dir tr:last-child td { border-bottom: 0; }
table.dir tbody tr:hover td { background: var(--sky-100); }
table.dir code { background: var(--bg); padding: 2px 7px; border-radius: 4px; font-size: .9em; color: var(--navy-800); }

/* Pagination */
.pager { display: flex; gap: 4px; justify-content: center; margin: 32px 0; flex-wrap: wrap; align-items: center; }
.pager a, .pager span { padding: 9px 13px; border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--paper); color: var(--ink-2); font-size: .9rem; font-weight: 500; }
.pager a:hover { background: var(--sky-100); color: var(--navy-800); border-color: var(--sky-300); text-decoration: none; }
.pager .current { background: var(--navy-900); color: white; border-color: var(--navy-900); }

/* State / region grids */
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.state-grid a { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink); transition: border-color .15s ease, transform .15s ease; font-weight: 500; }
.state-grid a:hover { border-color: var(--sky-400); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.state-grid .n { color: var(--sky-500); font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.region-card { display: block; padding: 22px 22px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); color: inherit; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.region-card:hover { border-color: var(--sky-400); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.region-card .code { font-family: "JetBrains Mono", monospace; font-size: .76rem; color: var(--amber-d); font-weight: 700; letter-spacing: .08em; }
.region-card h3 { margin: 4px 0 6px; font-size: 1.15rem; }
.region-card .sub { color: var(--muted); font-size: .88rem; margin: 0 0 10px; }
.region-card .stats { display: flex; gap: 14px; font-size: .84rem; color: var(--ink-2); }
.region-card .stats strong { color: var(--navy-800); font-family: "JetBrains Mono", monospace; }

/* Article prose */
.prose p { font-size: 1.02rem; }
.prose h2, .prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.4em; color: var(--ink-2); }
.prose li { margin-bottom: .4em; }
.prose .pullquote { border-left: 4px solid var(--amber); padding: 6px 0 6px 18px; margin: 22px 0; color: var(--navy-800); font-family: "Fraunces", serif; font-size: 1.18rem; font-style: italic; line-height: 1.5; }
.prose .callout { border: 1px solid var(--sky-300); background: var(--sky-100); color: var(--navy-900); padding: 16px 20px; border-radius: var(--r); margin: 22px 0; }
.prose .callout strong { color: var(--navy-900); }

/* Filter chips */
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 18px; }
.chip { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; font-size: .85rem; color: var(--ink-2); font-weight: 500; }
.chip:hover { border-color: var(--sky-400); color: var(--navy-800); text-decoration: none; }
.chip.active { background: var(--navy-900); color: white; border-color: var(--navy-900); }

/* AdSense */
.ad-slot { display: block; min-height: 90px; margin: 28px 0; border: 1px dashed var(--line-2); border-radius: var(--r-sm); background:
  repeating-linear-gradient(-45deg, var(--bg-warm), var(--bg-warm) 10px, #f7eecf 10px, #f7eecf 20px);
  color: var(--muted); font-size: .8rem; text-align: center; padding: 36px 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }

/* Footer */
.site-footer { background: var(--navy-950); color: rgba(255,255,255,.80); padding: 56px 0 28px; margin-top: 80px; }
.site-footer h4 { color: white; }
.site-footer .brand { color: white; }
.site-footer .brand-words strong { color: white; }
.site-footer .muted { color: rgba(255,255,255,.50); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 22px; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { padding: 5px 0; }
.link-list a { color: rgba(255,255,255,.74); font-size: .92rem; }
.link-list a:hover { color: var(--amber-l); }
.copyright { padding-top: 8px; font-size: .82rem; color: rgba(255,255,255,.45); }

.footer-rec { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: var(--r); padding: 18px 20px; margin-bottom: 22px; }
.footer-rec h4 { color: var(--amber-l); margin-bottom: 14px; font-size: .76rem; }
.footer-rec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px; }
.footer-rec-grid a, .footer-rec-grid .frec { color: rgba(255,255,255,.85); display: block; padding: 6px 0; border-bottom: 1px dotted rgba(255,255,255,.10); font-size: .9rem; }
.footer-rec-grid a:hover { color: var(--amber-l); }
.footer-rec-grid a small, .footer-rec-grid .frec small { display: block; color: rgba(255,255,255,.45); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; margin-top: 2px; font-weight: 600; }

/* Tag list (compact link runs) */
.tag-run { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tag-run a { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); border-radius: 5px; font-size: .82rem; color: var(--ink-2); background: var(--paper); font-weight: 500; }
.tag-run a:hover { background: var(--sky-100); color: var(--navy-800); border-color: var(--sky-300); text-decoration: none; }

/* Skip link */
.skip { position: absolute; left: -9999px; top: 0; padding: 8px 14px; background: var(--amber); color: var(--navy-900); font-weight: 700; }
.skip:focus { left: 16px; top: 12px; z-index: 100; }

/* Nav toggle (mobile-only hamburger) */
.nav-toggle-cb { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--line-2); border-radius: var(--r-xs); padding: 8px 10px; cursor: pointer; color: var(--navy-900); margin-left: auto; user-select: none; -webkit-user-select: none; }
.nav-toggle svg { display: block; }
.nav-toggle .i-close { display: none; }
.nav-toggle-cb:checked ~ .nav-toggle .i-open { display: none; }
.nav-toggle-cb:checked ~ .nav-toggle .i-close { display: block; }
.nav-toggle-cb:focus-visible ~ .nav-toggle { outline: 2px solid var(--sky-400); outline-offset: 2px; }

/* ==== Tablet ==== */
@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; }
  .quick-search input { width: 200px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid > :nth-child(4) { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 36px; }
  .aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-grid > :nth-child(4) { grid-column: auto; }
  .hero-inner { padding: 64px 0 72px; }
  .section { padding: 52px 0; }
  .detail-head { padding: 44px 0 36px; }
  h2 { margin-top: 1.8rem; }
}

/* ==== Mobile ==== */
@media (max-width: 720px) {
  :root { --maxw: 100%; }
  .container { padding: 0 18px; }

  /* Header reflow: brand + hamburger on row 1; nav + search collapse below */
  .header-row { gap: 10px; padding: 12px 18px; flex-wrap: wrap; row-gap: 10px; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .brand { font-size: 1.2rem; gap: 10px; }
  .brand-mark { width: 32px; height: 32px; }
  .nav { display: none; width: 100%; order: 4; flex-direction: column; gap: 0; padding: 8px 0 4px; border-top: 1px solid var(--line); margin-top: 4px; }
  .nav a { padding: 12px 10px; border-radius: var(--r-xs); font-size: 1rem; min-height: 44px; display: flex; align-items: center; }
  .quick-search { display: none; width: 100%; order: 5; margin: 0; }
  .quick-search input { width: 100%; border-radius: var(--r-xs) 0 0 var(--r-xs); padding: 11px 14px; }
  .quick-search button { padding: 0 18px; min-width: 52px; }
  .nav-toggle-cb:checked ~ .nav { display: flex; }
  .nav-toggle-cb:checked ~ .quick-search { display: flex; }

  /* Hero refinements for small screens */
  .hero-inner { padding: 52px 0 60px; }
  .hero p.lede { margin-top: 14px; }
  .hero-form { flex-wrap: wrap; padding: 8px; gap: 6px; }
  .hero-form .leading { padding-left: 8px; }
  .hero-form input { width: 100%; min-width: 0; padding: 12px 8px; flex: 1 1 100%; order: 2; }
  .hero-form .leading { order: 1; }
  .hero-form button { width: 100%; order: 3; padding: 12px 22px; min-height: 44px; border-radius: 9px; }
  .hero-cta-row { gap: 10px 14px; font-size: .9rem; margin-top: 16px; }
  .hero-cta-row > span { width: 100%; color: rgba(255,255,255,.55); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
  .hero-stats { gap: 18px 28px; margin-top: 32px; padding-top: 22px; }
  .hero-stats .stat .n { font-size: 1.65rem; }

  /* Section spacing tighter */
  .section { padding: 44px 0; }
  .section.tight { padding: 32px 0; }
  .section-head { margin-bottom: 18px; gap: 10px; }
  .section-head a.see-all { font-size: .9rem; }

  /* Detail page */
  .detail-head { padding: 36px 0 30px; }
  .detail-head::after { width: 280px; height: 280px; right: -100px; top: -90px; }
  .crumbs { font-size: .8rem; gap: 4px; }
  .codes { gap: 8px; margin-top: 18px; }
  .code-pill { padding: 8px 12px; min-width: 76px; flex: 1 0 calc(50% - 4px); }
  .code-pill .val { font-size: 1.05rem; }

  /* Tables wrap-or-scroll */
  table.dir, .fact-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.dir th, table.dir td, .fact-table th, .fact-table td { padding: 10px 12px; font-size: .88rem; }
  .fact-table th { width: auto; }

  /* Cards */
  .feature-grid { grid-template-columns: 1fr; }
  .state-grid { grid-template-columns: repeat(2, 1fr); }
  .region-grid { grid-template-columns: 1fr; }
  .carriers { grid-template-columns: 1fr 1fr; }

  /* Footer */
  .site-footer { padding: 44px 0 24px; margin-top: 56px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-rec-grid { grid-template-columns: 1fr; }

  /* Pager - hide middle pages */
  .pager { gap: 4px; }
  .pager a, .pager span { padding: 10px 12px; min-height: 40px; }

  /* Touch target boost */
  .chip, .badge, .nav a, .footer-grid a, .link-list a, .pager a, .feature, .state-grid a { min-height: 36px; }
  button, .quick-search button, .hero-form button { min-height: 44px; }
}

@media (max-width: 420px) {
  .container { padding: 0 14px; }
  h1 { font-size: clamp(1.85rem, 8vw, 2.4rem); }
  .hero h1 { letter-spacing: -0.02em; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
  .codes { gap: 6px; }
  .code-pill { min-width: 0; }
  .state-grid { grid-template-columns: 1fr; }
  .carriers { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}

/* Focus ring polish */
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--sky-400);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
