/* traveling-to-china.com — shared stylesheet
   Single container width everywhere so header, content and footer edges align. */

:root {
  /* brand */
  --brand: #C2410C;
  --brand-dark: #9A3412;
  --brand-darker: #7C2D12;
  --brand-soft: #FFF1EA;
  --brand-line: #F7C9B4;

  /* text — every value below clears WCAG AA (4.5:1) on white and --bg-soft.
     --faint is used at .78–.84rem, so it needs the full 4.5, not 3.0. */
  --ink: #12263F;
  --ink-2: #334E68;
  --body: #33383F;
  --muted: #5F6875;
  --faint: #6B7280;

  /* surfaces */
  --bg: #FFFFFF;
  --bg-soft: #FAF8F5;
  --bg-deep: #F2EFE9;
  --line: #E6E2DB;
  --line-soft: #F0EDE7;

  /* semantics */
  --ok: #0F6E56;
  --ok-soft: #E1F5EE;
  --warn: #854F0B;
  --warn-soft: #FAEEDA;
  --bad: #A32D2D;
  --bad-soft: #FCEBEB;
  --info: #185FA5;
  --info-soft: #E6F1FB;

  /* Brand tints: the badge text sits on the soft background, so both the
     brand colour and its tint are chosen to clear 4.5:1 together. */
  --alipay: #0D5FCC;
  --alipay-soft: #E8F1FF;
  --wechat: #046E38;
  --wechat-soft: #E4F7EC;

  /* form */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-xs: 0 1px 2px rgba(18, 38, 63, .05);
  --shadow-md: 0 2px 4px rgba(18, 38, 63, .06), 0 10px 28px rgba(18, 38, 63, .08);
  --head-h: 64px;
  --container: 1140px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
          "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.72;
  color: var(--body);
  background: var(--bg);
  padding-top: var(--head-h);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
/* Images keep their aspect ratio; icons get an explicit default size instead.
   A bare <svg viewBox="…"> has no intrinsic width, so without this rule it
   renders at 100% of its container — which is what made icons enormous
   wherever no component rule sized them. Every icon rule below overrides it. */
img { max-width: 100%; height: auto; }
svg {
  width: 1em;
  height: 1em;
  max-width: 100%;
  flex: none;
  vertical-align: -.125em;
  stroke-linecap: round;
  stroke-linejoin: round;
}

::selection { background: #FFD9C7; color: var(--brand-darker); }

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.28;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(1.85rem, 4.2vw, 2.6rem); }
h2 { font-size: clamp(1.32rem, 2.6vw, 1.6rem); }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.05em; padding-left: 1.35em; }
li { margin-bottom: .42em; }
li:last-child { margin-bottom: 0; }
strong { color: var(--ink); font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.2rem 0; }
code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--bg-deep);
  padding: .12em .4em;
  border-radius: 5px;
  color: var(--ink);
}

/* anchor targets must clear the fixed header */
h2[id], h3[id], h4[id], section[id] { scroll-margin-top: calc(var(--head-h) + 18px); }

/* visible, consistent keyboard focus */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ------------------------------------------------------------------ layout */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
/* kept for older pages: identical width, so nothing sits at a different edge */
.wrap-narrow { max-width: var(--container); }

/* readable text measure inside a full-width container */
.measure { max-width: 74ch; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 8px;
  font-size: .9rem;
  font-weight: 600;
  transition: top .16s ease;
}
.skip-link:focus { top: 0; text-decoration: none; }

/* ------------------------------------------------------------------ header */
.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: var(--head-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(18, 38, 63, .02);
}
.head-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  font-size: 1.03rem;
  letter-spacing: -.025em;
  white-space: nowrap;
  flex: none;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; flex: none; display: block; }
.brand em { font-style: normal; color: var(--brand); }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}
.site-nav > a {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: .92rem;
  font-weight: 550;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.site-nav > a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.site-nav > a.is-active { color: var(--brand); background: var(--brand-soft); font-weight: 650; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  flex: none;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle:hover { background: var(--bg-soft); }

/* The full domain plus a 40px toggle does not fit on a 320px screen. */
@media (max-width: 380px) {
  .head-inner { gap: 8px; }
  .brand { font-size: .94rem; gap: 8px; }
  .brand-mark { width: 25px; height: 25px; }
}

@media (max-width: 940px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: var(--head-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 12px 14px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - var(--head-h));
    overflow-y: auto;
  }
  .site-nav.is-open { display: flex; }
  .site-nav > a {
    padding: 12px 12px;
    border-radius: 8px;
    font-size: 1rem;
    border-bottom: 1px solid var(--line-soft);
  }
  .site-nav > a:last-child { border-bottom: 0; }
}

/* -------------------------------------------------------------------- hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 3.6rem 0 3.2rem;
  background:
    radial-gradient(900px 320px at 12% -10%, #FFF1EA 0%, rgba(255, 241, 234, 0) 70%),
    linear-gradient(180deg, #FBF9F6 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--line) .9px, transparent .9px);
  background-size: 22px 22px;
  opacity: .5;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 78%);
}
.hero > .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 20ch; margin-bottom: .6em; }
.hero .lede {
  font-size: clamp(1rem, 1.9vw, 1.12rem);
  color: var(--ink-2);
  max-width: 62ch;
  margin-bottom: 0;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--brand-line);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 1.15rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  list-style: none;
  padding-left: 0;
}
.hero-stats li { margin: 0; font-size: .9rem; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.hero-stats svg { width: 16px; height: 16px; color: var(--brand); flex: none; }

/* ----------------------------------------------------------------- notices */
.notice {
  position: relative;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  margin: 0 0 1.5rem;
  font-size: .95rem;
}
.notice p:last-child { margin-bottom: 0; }
.notice > p:first-of-type { margin-top: 0; }
.notice-warn { border-left-color: var(--warn); background: var(--warn-soft); border-color: #F0DDB8; }
.notice-bad { border-left-color: var(--bad); background: var(--bad-soft); border-color: #F2D4D4; }
.notice-ok { border-left-color: var(--ok); background: var(--ok-soft); border-color: #C9E9DC; }
.notice-info { border-left-color: var(--info); background: var(--info-soft); border-color: #CFE3F7; }
.notice-title {
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: .35em;
  font-size: .96rem;
}
/* flex-start + a small nudge keeps the icon on the first line's optical centre
   whether the title wraps to one line or three */
.notice-title svg { width: 18px; height: 18px; flex: none; margin-top: .3em; }
.notice-warn .notice-title svg { color: var(--warn); }
.notice-bad .notice-title svg { color: var(--bad); }
.notice-ok .notice-title svg { color: var(--ok); }
.notice-info .notice-title svg { color: var(--info); }

/* -------------------------------------------------------------------- cards */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 20px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
a.card { display: block; color: inherit; }
a.card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-line);
}
a.card h3 { color: var(--ink); }

/* Card copy — replaces a repeated inline font-size on every hub card.
   Scoped to grid children so it cannot restyle the compatibility form card. */
.grid > .card p { font-size: .92rem; }
.grid > .card > p:last-child { margin-bottom: 0; }
.card-cta { background: var(--brand-soft); border-color: var(--brand-line); }

/* long country lists in the visa guide */
.country-list { font-size: .93rem; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- QR matrix */
.qr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .qr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .qr-grid { grid-template-columns: minmax(0, 1fr); } }

.qr-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.qr-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line); }
.qr-card-top { padding: 15px 16px 13px; border-bottom: 1px solid var(--line-soft); }
.qr-app {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.qr-app.alipay { color: var(--alipay); background: var(--alipay-soft); }
.qr-app.wechat { color: var(--wechat); background: var(--wechat-soft); }
.qr-card h3 { font-size: 1.04rem; margin: 0 0 4px; }
.qr-scope { font-size: .84rem; color: var(--muted); margin: 0; line-height: 1.5; }

.qr-amount {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line-soft);
}
.qr-amount b { font-size: 1.32rem; color: var(--ink); letter-spacing: -.02em; }
.qr-amount span { font-size: .8rem; color: var(--muted); }

.qr-stage { padding: 18px 16px 14px; display: flex; justify-content: center; }
.qr-box {
  position: relative;
  width: 100%;
  max-width: 200px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}
.qr-box img { display: block; width: 100%; border-radius: 5px; }
.qr-box.is-locked img { filter: blur(7px); opacity: .5; pointer-events: none; }
.qr-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255, 255, 255, .84);
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: .88rem;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
  padding: 10px;
  text-align: center;
  transition: background .15s ease;
}
.qr-lock:hover { background: rgba(255, 255, 255, .94); }
.qr-box:not(.is-locked) .qr-lock { display: none; }
.qr-lock svg { width: 21px; height: 21px; color: var(--brand); }
.qr-hint { font-size: .78rem; color: var(--faint); text-align: center; margin: 8px 0 0; }

.qr-card-body { padding: 0 16px 16px; }

/* ------------------------------------------------------------------- steps */
/* Numbered procedures. Plain <ol> markers are too quiet on a page that is
   mostly instructions, so every step gets a numbered badge plus a connector
   line. Used inside QR cards (compact) and in article bodies (default). */
.steps {
  list-style: none;
  margin: 0 0 1.15em;
  padding: 0;
  counter-reset: step;
  font-size: .97rem;
}
.steps:last-child { margin-bottom: 0; }
.steps li {
  position: relative;
  counter-increment: step;
  padding-left: 40px;
  margin-bottom: .8em;
  line-height: 1.72;
}
.steps li:last-child { margin-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: .06em;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--brand-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .84rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 34px;
  bottom: -.7em;
  width: 1px;
  background: var(--brand-line);
}
.steps li.done { color: var(--ok); font-weight: 650; }
.steps li.done::before {
  content: "\2713";
  background: var(--ok-soft);
  color: var(--ok);
  border-color: #A7DEC9;
  font-size: .95rem;
}

/* compact variant: inside the QR cards */
.qr-card-body .steps { font-size: .88rem; }
.qr-card-body .steps li {
  padding-left: 31px;
  margin-bottom: .58em;
  line-height: 1.6;
}
.qr-card-body .steps li::before {
  width: 21px;
  height: 21px;
  font-size: .74rem;
  top: .08em;
}
.qr-card-body .steps li:not(:last-child)::after {
  left: 10px;
  top: 27px;
  bottom: -.5em;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: var(--bg-soft);
  padding: 3px;
  border-radius: 9px;
}
.tab {
  flex: 1;
  padding: 7px 8px;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.tab[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-xs); }

details.more { margin-top: 14px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
details.more summary {
  cursor: pointer;
  font-size: .87rem;
  font-weight: 650;
  color: var(--brand);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; margin-left: auto; font-weight: 700; }
details.more[open] summary::after { content: "\2212"; }
details.more .more-body { font-size: .87rem; padding-top: 11px; }
details.more .more-body h4 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 1em 0 .4em;
}
details.more .more-body h4:first-child { margin-top: 0; }
details.more .more-body ul { padding-left: 1.2em; margin-bottom: .6em; }
details.more .more-body li { margin-bottom: .28em; }

.demo-flag {
  display: block;
  text-align: center;
  font-size: .76rem;
  font-weight: 650;
  color: var(--warn);
  background: var(--warn-soft);
  padding: 6px 10px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

/* --------------------------------------------- wide two-up QR codes (home) */
/* The hub shows only two codes, so they get the full container width. At that
   width a stacked card wastes the space, so code and steps sit side by side. */
.qr-duo { align-items: start; }
@media (min-width: 960px) {
  .qr-duo .qr-card {
    display: grid;
    grid-template-columns: 212px minmax(0, 1fr);
    column-gap: 20px;
  }
  .qr-duo .qr-card-top { grid-column: 1 / -1; }
  .qr-duo .qr-amount { grid-column: 1 / -1; }
  .qr-duo .qr-stage {
    grid-column: 1;
    grid-row: 3;
    padding: 18px 0 12px 16px;
  }
  .qr-duo .demo-flag {
    grid-column: 1;
    grid-row: 4;
    border-radius: 0 0 0 var(--radius);
  }
  .qr-duo .qr-card-body {
    grid-column: 2;
    grid-row: 3 / span 2;
    align-self: start;
    padding: 20px 16px 16px 0;
  }
  .qr-duo .steps { font-size: .9rem; }
}

/* ------------------------------------------------------------------- tables */
.table-scroll {
  overflow-x: auto;
  margin-bottom: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: .91rem; min-width: 540px; }
th, td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
th {
  background: var(--bg-soft);
  color: var(--ink);
  font-weight: 650;
  font-size: .84rem;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #FCFBF9; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.pill {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill-ok { color: var(--ok); background: var(--ok-soft); }
.pill-warn { color: var(--warn); background: var(--warn-soft); }
.pill-bad { color: var(--bad); background: var(--bad-soft); }
.pill-info { color: var(--info); background: var(--info-soft); }
.pill-rule { color: var(--ink-2); background: var(--bg-soft); border: 1px solid var(--line); }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 650;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(124, 45, 18, .18), 0 6px 16px rgba(194, 65, 12, .18);
}
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--muted); }
.btn-sm { padding: 9px 16px; font-size: .88rem; }

/* ----------------------------------------------------------------- sections */
.section { padding: 3.4rem 0; }
.section-soft {
  padding: 3.4rem 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
/* consecutive soft bands: keep one border, keep the rhythm */
.section-soft + .section-soft { border-top: 0; padding-top: 0; }
@media (max-width: 620px) {
  .section { padding: 2.4rem 0; }
  .section-soft { padding: 2.4rem 0; }
}
.section-head { margin-bottom: 1.8rem; }
.section-head h2 { margin-bottom: .32em; }
.section-head p { color: var(--muted); margin: 0; max-width: 64ch; }
.eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .55rem;
  display: block;
}
/* step counter used above section headings — solid so it reads as a marker */
.eyebrow.is-step {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 4px 11px;
  border-radius: 999px;
  letter-spacing: .09em;
  font-size: .72rem;
}

/* --------------------------------------------------------- article + aside */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 48px;
  align-items: start;
}
.layout-main { min-width: 0; }
.layout-side {
  position: sticky;
  top: calc(var(--head-h) + 24px);
  min-width: 0;
}
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .layout-side {
    position: static;
    order: -1;
    margin-bottom: 1.8rem;
  }
}

.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
.side-card h4 {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 0 0 .7em;
}
/* Scoped to <ul> descendants only. An unscoped `.side-card a` used to beat
   `.btn` on specificity and restyle the CTA button: dark text on the orange
   fill, a grey left border, and block display instead of centring. */
.side-card ul { list-style: none; padding: 0; margin: 0; }
.side-card li { margin: 0; }
.side-card ul a {
  display: block;
  padding: 6px 0 6px 12px;
  border-left: 2px solid var(--line);
  color: var(--ink-2);
  font-size: .88rem;
  line-height: 1.5;
  transition: border-color .15s ease, color .15s ease;
}
.side-card ul a:hover { color: var(--brand); border-left-color: var(--brand-line); text-decoration: none; }
.side-card ul a.is-current { color: var(--brand); border-left-color: var(--brand); font-weight: 650; }

.side-cta {
  background: linear-gradient(158deg, #1E3A5F 0%, #12263F 100%);
  border-color: #12263F;
}
.side-cta h4 { color: #9FB5CC; }
.side-cta p { font-size: .88rem; line-height: 1.62; margin: 0 0 1em; color: #C6D5E5; }
/* The brand-shadow glow is invisible against the dark card, so drop it. */
.side-cta .btn { width: 100%; box-shadow: none; }
.side-cta .cta-fine { font-size: .78rem; line-height: 1.5; color: #8FA6BF; margin: .75em 0 0; }
.side-cta .cta-fine a { color: #C6D5E5; text-decoration: underline; text-underline-offset: 2px; }
.side-cta .cta-fine a:hover { color: #fff; }

/* collapsed on small screens so it does not push the article down */
@media (max-width: 1000px) {
  .side-toc { display: none; }
}

/* ------------------------------------------------------------- app/affiliate */
.app-list { display: grid; gap: 12px; }
.app-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 15px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.app-row:hover { border-color: var(--brand-line); box-shadow: var(--shadow-xs); }
.app-icon {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  border: 1px solid var(--line-soft);
}
.app-icon svg { width: 21px; height: 21px; }
.app-body { flex: 1; min-width: 0; }
.app-body h4 { margin: 0 0 3px; font-size: .99rem; }
.app-body p { margin: 0 0 .55em; font-size: .89rem; color: var(--muted); }
.app-links { display: flex; flex-wrap: wrap; gap: 10px; }
/* :not(.btn) — the eSIM step block puts real buttons in here, and an
   unqualified rule would shrink them to link size. */
.app-links a:not(.btn) { font-size: .84rem; font-weight: 600; }

/* ------------------------------------------------------------------ footer */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 3rem 0 1.6rem;
  font-size: .9rem;
  margin-top: 1rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.05fr;
  gap: 26px;
}
@media (max-width: 1000px) { .foot-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 26px; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.site-foot h4 {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .75em;
}
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: .4em; }
.site-foot a { color: var(--ink-2); }
.site-foot a:hover { color: var(--brand); }
.foot-note {
  border-top: 1px solid var(--line);
  margin-top: 2.2rem;
  padding-top: 1.3rem;
  color: var(--muted);
  font-size: .83rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: baseline;
  justify-content: space-between;
}
.foot-note p { margin: 0; }
.foot-note p:first-child { flex: 1 1 420px; }
.foot-about { font-size: .9rem; color: var(--muted); max-width: 34ch; }
.foot-policy { font-size: .87rem; }

/* -------------------------------------------------------------------- misc */
.breadcrumb {
  font-size: .84rem;
  color: var(--faint);
  margin-bottom: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.breadcrumb a { color: var(--faint); }
.breadcrumb a:hover { color: var(--brand); }
/* Decorative separator, but it still needs to be visible — --line is 1.3:1,
   which is effectively invisible on white. */
.breadcrumb span { color: #A9A29A; }

.faq-item { border-bottom: 1px solid var(--line-soft); padding: 16px 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { font-size: 1.02rem; margin: 0 0 .38em; }
.faq-item p { margin: 0; font-size: .94rem; }

/* two-up FAQ: fills the container, keeps the line length readable */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 44px;
}
.faq-grid > .section-head { grid-column: 1 / -1; }
.faq-grid > .faq-item:nth-last-child(-n + 2) { border-bottom: 0; }
@media (max-width: 760px) {
  .faq-grid { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .faq-grid > .faq-item:nth-last-child(2) { border-bottom: 1px solid var(--line-soft); }
}

.reassure {
  background: linear-gradient(140deg, #E6F1FB 0%, #FFF6F1 100%);
  border: 1px solid #D3E5F7;
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  text-align: center;
}
.reassure h2 { margin-bottom: .45em; }
.reassure p { color: var(--ink-2); margin: 0 auto; max-width: 60ch; }

.next-step {
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  padding: 22px;
  background: linear-gradient(180deg, #FFF6F2 0%, #FFF1EA 100%);
}
.next-step h3 { margin: 0 0 .35em; color: var(--brand-darker); }
.next-step p { margin: 0 0 .95em; font-size: .93rem; }

.sources {
  font-size: .86rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  margin-top: 2.4rem;
}
.sources h4 {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .55em;
}
.sources ul { padding-left: 1.2em; }
.sources li { margin-bottom: .35em; }

.updated {
  font-size: .84rem;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* back to top */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 55;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: #fff; color: var(--brand); }
.to-top svg { width: 19px; height: 19px; }

/* ------------------------------------------------------------------- forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

.field { margin-bottom: 0; }
.field > label {
  display: block;
  font-size: .85rem;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 5px;
}
.field select,
.field input:not([type="radio"]) {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: .93rem;
  color: var(--body);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.field select:focus,
.field input:not([type="radio"]):focus {
  border-color: var(--brand);
  outline: 2px solid var(--brand-soft);
  outline-offset: 1px;
}

.form-legend {
  display: block;
  font-size: .85rem;
  font-weight: 650;
  color: var(--ink);
  padding: 0;
  margin: 0 0 6px;
}
.radio-row { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 2px; }
.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .93rem;
  font-weight: 500;
  color: var(--body);
  cursor: pointer;
}
.radio-row input { width: 17px; height: 17px; accent-color: var(--brand); margin: 0; }

.form-actions { margin-top: 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form-note { font-size: .82rem; color: var(--muted); margin: 0; }
#form-note { margin: 14px 0 0; }
#compat-report { max-width: 680px; }
#compat-report .form-intro { font-size: .9rem; color: var(--muted); }
.form-extra { margin-top: 14px; }

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

@media print {
  .site-head, .site-foot, .to-top, .layout-side, .nav-toggle { display: none !important; }
  body { padding-top: 0; font-size: 12pt; }
  .layout { display: block; }
  .hero { padding: 1rem 0; }
  a { color: #000; }
}
