:root {
  --navy-900: #071a33;
  --navy-800: #0b2545;
  --navy-700: #123461;
  --blue: #0a66d8;
  --blue-600: #0853b4;
  --sky: #63b3ff;
  --tint: #eaf3ff;
  --signal: #ff7a1a;
  --ink: #0f2740;
  --body: #33485e;
  --muted: #5a6c80;
  --line: #dde5ee;
  --paper: #f5f8fb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.07);
  --shadow-md: 0 14px 34px -16px rgba(11, 37, 69, 0.28);
  --sans:
    "Avenir Next", Avenir, "Segoe UI Variable Text", "Segoe UI", system-ui,
    -apple-system, "Helvetica Neue", sans-serif;
  --mono:
    ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas,
    monospace;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
p {
  margin: 0;
}
:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
  border-radius: 4px;
}
[id] {
  scroll-margin-top: 92px;
}
.shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--navy-800);
  color: #fff;
  font-weight: 700;
}
.skip:focus {
  top: 12px;
}
.ui-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mono {
  font-family: var(--mono);
}

/* Per-language typography.
   The Latin stack has no CJK or Thai glyphs, so each language names its own
   system faces; no web fonts, because the site makes no third-party requests
   and a CJK webfont would be several megabytes. */
:root:lang(zh) {
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "PingFang SC", "Microsoft YaHei", monospace;
}
:root:lang(ja) {
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans CJK JP", "Source Han Sans JP", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Hiragino Sans", "Yu Gothic", monospace;
}
:root:lang(th) {
  --sans: "Thonburi", "Leelawadee UI", "Noto Sans Thai", "Sukhumvit Set", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Thonburi", "Leelawadee UI", monospace;
}
/* Negative tracking is a Latin display trick; on CJK it jams the squares
   together and on Thai it detaches combining marks from their base. */
:root:lang(zh) h1,
:root:lang(ja) h1,
:root:lang(th) h1,
:root:lang(zh) h2,
:root:lang(ja) h2,
:root:lang(th) h2,
:root:lang(zh) h3,
:root:lang(ja) h3,
:root:lang(th) h3,
:root:lang(zh) .brand,
:root:lang(ja) .brand,
:root:lang(th) .brand {
  letter-spacing: normal;
}
/* Thai has no spaces between words, so tracking destroys word grouping.
   Uppercase is a no-op for all three scripts. */
:root:lang(zh) .eyebrow,
:root:lang(ja) .eyebrow,
:root:lang(th) .eyebrow,
:root:lang(zh) .tag,
:root:lang(ja) .tag,
:root:lang(th) .tag,
:root:lang(zh) .footer-grid b,
:root:lang(ja) .footer-grid b,
:root:lang(th) .footer-grid b,
:root:lang(zh) .side-nav b,
:root:lang(ja) .side-nav b,
:root:lang(th) .side-nav b,
:root:lang(zh) .label-head,
:root:lang(ja) .label-head,
:root:lang(th) .label-head {
  letter-spacing: 0;
  text-transform: none;
}
/* Thai stacks vowels and tone marks above and below the baseline. */
:root:lang(th) body {
  line-height: 1.8;
}
:root:lang(th) .hero-copy > p,
:root:lang(th) .page-hero p {
  line-height: 1.75;
}
:root:lang(th) h1 {
  line-height: 1.25;
}
:root:lang(th) h2,
:root:lang(th) h3 {
  line-height: 1.4;
}
:root:lang(th) .article p,
:root:lang(th) .article li,
:root:lang(th) .qa > p {
  line-height: 1.9;
}
/* CJK reads better with a touch more leading than the Latin default. */
:root:lang(zh) .hero h1,
:root:lang(ja) .hero h1 {
  line-height: 1.15;
}
:root:lang(zh) .article p,
:root:lang(ja) .article p,
:root:lang(zh) .article li,
:root:lang(ja) .article li,
:root:lang(zh) .qa > p,
:root:lang(ja) .qa > p {
  line-height: 1.85;
}

/* Language switcher */
.lang {
  position: relative;
}
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--body);
  cursor: pointer;
  font: 600 14px var(--sans);
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.lang-toggle:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.lang-toggle .ui-icon {
  width: 17px;
  height: 17px;
}
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  display: grid;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.lang-menu[hidden] {
  display: none;
}
.lang-menu a {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--body);
  font-size: 16px;
  white-space: nowrap;
}
.lang-menu a:hover {
  background: var(--paper);
  color: var(--blue);
}
.lang-menu a[aria-current] {
  color: var(--blue);
  font-weight: 700;
}
.lang-menu a[aria-current]::after {
  content: " ✓";
}

/* Language suggestion bar */
.lang-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: var(--navy-800);
  color: #dce8f5;
  font-size: 16px;
}
.lang-suggest .btn {
  padding: 7px 16px;
  font-size: 14px;
}
.lang-dismiss {
  padding: 7px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #9fb5cb;
  cursor: pointer;
  font: 14px var(--sans);
}
.lang-dismiss:hover {
  color: #fff;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.brand img {
  width: 30px;
  height: 30px;
}
.brand .word span {
  color: var(--navy-800);
}
.topbar nav {
  display: flex;
  align-self: stretch;
  gap: 4px;
  margin-right: auto;
}
.topbar nav a {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--body);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: inset 0 -2px transparent;
  transition:
    color 0.15s,
    box-shadow 0.15s;
}
.topbar nav a:hover,
.topbar nav a.active {
  color: var(--blue);
  box-shadow: inset 0 -2px var(--blue);
}
.mini-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  transition:
    border-color 0.15s,
    background 0.15s;
}
.mini-search:focus-within {
  border-color: var(--blue);
  background: #fff;
}
.mini-search input {
  width: 170px;
  padding: 9px 0 9px 16px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 16px var(--sans);
}
.mini-search button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
}

/* Hero */
.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 90% at 88% 0%, rgba(10, 102, 216, 0.55), transparent 70%),
    linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: #c9d8ea;
}
.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(100deg, transparent 5%, #000 70%);
  -webkit-mask-image: linear-gradient(100deg, transparent 5%, #000 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: center;
  padding: 72px 0 80px;
}
.hero-copy {
  min-width: 0;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sky);
  font: 600 12px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--signal);
}
.hero h1 {
  margin: 18px 0 20px;
  color: #fff;
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.hero h1 strong {
  color: var(--sky);
  font-weight: inherit;
}
/* The blue wordmark needs a light ground on the dark hero. */
.hero-brand {
  display: inline-flex;
  gap: 0.18em;
  align-items: center;
}
.hero-line {
  white-space: nowrap;
}
.hero-brand img {
  width: auto;
  height: 0.62em;
  padding: 0.1em 0.16em;
  border-radius: 0.12em;
  background: #fff;
  box-sizing: content-box;
}
.hero-copy > p {
  max-width: 540px;
  margin-bottom: 28px;
  font-size: 18px;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-bottom: 24px;
}
.hero-start {
  max-width: 100%;
  min-height: 44px;
  text-align: center;
}
.hero-task {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.hero-task:hover {
  text-decoration: underline;
}
.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  max-width: 540px;
  padding: 5px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
}
/* The input drops its own outline to sit flush in the box, so the box shows focus. */
.hero-search:focus-within {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}
.hero-search label {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
}
.hero-search input {
  width: 100%;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  font: 16px var(--sans);
}
.btn,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font: 700 16px var(--sans);
  transition: background 0.15s;
}
.btn:hover,
.hero-search button:hover {
  background: var(--blue-600);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  font-size: 14px;
}
.chips b {
  margin-right: 4px;
  color: #8fa6c0;
  font-weight: 600;
}
.chips a {
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #e3edf8;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.chips a:hover {
  border-color: var(--sky);
  background: rgba(99, 179, 255, 0.14);
}

/* Shipping-label quick calculator */
.label-card {
  position: relative;
  padding: 22px 24px 18px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--body);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.65);
}
.label-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  font: 600 12px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.label-head span:first-child {
  padding: 3px 8px;
  background: var(--ink);
  color: #fff;
}
.label-route {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.label-route .ui-icon {
  width: 15px;
  height: 15px;
  color: var(--signal);
}
.label-card h2 {
  margin: 16px 0 4px;
  font-size: 22px;
}
.label-card > p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}
.barcode {
  height: 34px;
  margin-top: 16px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px,
    transparent 2px 5px,
    var(--ink) 5px 6px,
    transparent 6px 8px,
    var(--ink) 8px 12px,
    transparent 12px 14px,
    var(--ink) 14px 15px,
    transparent 15px 19px,
    var(--ink) 19px 22px,
    transparent 22px 23px
  );
  opacity: 0.88;
}
.label-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  white-space: nowrap;
  margin-top: 8px;
  color: var(--muted);
  font: 12px var(--mono);
}
.label-foot a {
  color: var(--blue);
  font-weight: 600;
}

/* Forms shared by calculators */
.calc-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.calc-form.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.calc-form label {
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.calc-form .span-2 {
  grid-column: span 2;
}
.calc-form .full,
.calc-form .dims {
  grid-column: 1 / -1;
}
.calc-form .dims {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.calc-form select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c9d5e2;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: 16px var(--sans);
}
.calc-form select:focus {
  border-color: var(--blue);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(10, 102, 216, 0.18);
}
/* Only the fields the selected pricing model uses are shown; the rest are
   disabled by app.js so they cannot block validation. */
.calc-form[data-mode="flat"] .tiered-only,
.calc-form[data-mode="tiered"] .flat-only,
.calc-form:not(.divisor-custom) .custom-divisor {
  display: none;
}
.calc-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c9d5e2;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: 16px var(--mono);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.calc-form input:focus {
  border-color: var(--blue);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(10, 102, 216, 0.18);
}
.calc-form .btn {
  align-self: end;
  min-height: 44px;
  padding-inline: 14px;
}
.calc-form output {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-column: 1 / -1;
  gap: 2px 12px;
  align-items: baseline;
  padding: 12px 14px;
  border: 1px dashed #c3d3e4;
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--muted);
  font-size: 14px;
}
.calc-form output.has-result {
  border: 1px solid #b9d6fb;
  background: var(--tint);
  color: var(--ink);
}
.calc-form output strong {
  color: var(--blue-600);
  font: 700 22px var(--mono);
  letter-spacing: -0.02em;
}
.calc-form output small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 14px;
}

/* Sections */
.section {
  padding: 72px 0 0;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.section-head h2 {
  font-size: 28px;
  letter-spacing: -0.03em;
}
.section-head p {
  margin-top: 6px;
  color: var(--muted);
}
.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.more .ui-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.15s;
}
a:hover > .more .ui-icon,
.more:hover .ui-icon {
  transform: translateX(3px);
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
a.card {
  transition:
    transform 0.18s,
    box-shadow 0.18s,
    border-color 0.18s;
}
a.card:hover {
  border-color: #b9d0ea;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Topic grid */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.platform-example-grid,
.topic-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.topic {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
}
.topic > .ui-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--tint);
  color: var(--blue);
}
.topic b {
  color: var(--ink);
  font-size: 18px;
}
.topic small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.topic.lead {
  grid-column: span 2;
  justify-content: space-between;
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #c9d8ea;
}
.topic.lead > .ui-icon {
  background: rgba(255, 255, 255, 0.1);
  color: var(--sky);
}
.topic.lead b {
  color: #fff;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.topic.lead small {
  max-width: 420px;
  color: #b6c8dc;
  font-size: 16px;
}
.topic.lead .more {
  margin-top: 10px;
  color: var(--sky);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  counter-reset: step;
}
.steps > * {
  position: relative;
  padding: 24px 22px 26px;
  border-left: 1px solid var(--line);
  transition: background 0.15s;
}
.steps > :first-child {
  border-left: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}
.steps > :last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}
.steps a:hover {
  background: #fff;
}
.step-shot {
  display: grid;
  aspect-ratio: 8 / 5;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  place-items: center;
}
.step-shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.shot-source,
.step-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.step-figure {
  margin: 18px 0;
}
.step-figure img {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps > ::before {
  content: "0" counter(step);
  counter-increment: step;
  display: block;
  margin-bottom: 14px;
  color: var(--signal);
  font: 700 14px var(--mono);
  letter-spacing: 0.06em;
}
.steps b {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 18px;
}
.steps small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.steps b a {
  color: inherit;
}
.steps b a:hover {
  color: var(--blue);
}
.step-promo {
  display: grid;
  aspect-ratio: 8 / 5;
  align-content: center;
  justify-items: center;
  gap: 2px;
  margin-bottom: 16px;
  padding: 10px;
  border: 1.5px dashed #9fc3ee;
  border-radius: var(--radius-sm);
  background: var(--tint);
  text-align: center;
}
.steps .step-promo small {
  font-size: 12px;
  line-height: 1.35;
}
.step-promo strong {
  color: var(--signal);
  font-size: clamp(20px, 1.8vw, 28px);
  line-height: 1.15;
  word-break: keep-all;
}
.promo-strip {
  margin-top: 16px;
  padding: 18px 20px 20px;
  border: 1.5px dashed #9fc3ee;
  border-radius: var(--radius);
  background: var(--tint);
}
.promo-strip p {
  margin: 0 0 14px;
  color: var(--body);
  font-size: 15px;
  line-height: 1.55;
}
.promo-strip strong {
  color: var(--ink);
}
.promo-strip ul {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.code-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1px 4px;
  width: 100%;
  min-height: 52px;
  padding: 8px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--navy-800);
  font: 700 15px var(--mono);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    border-color 0.15s,
    color 0.15s;
}
.code-chip small {
  grid-column: 1 / -1;
  color: var(--muted);
  font: 500 12px/1.25 var(--sans);
  letter-spacing: 0;
}
.code-chip.done small {
  color: rgba(255, 255, 255, 0.8);
}
.code-chip svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--blue);
}
.code-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.code-chip.done {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.code-chip.done svg {
  color: #fff;
}

/* Main grid */
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  padding: 72px 0 88px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.feature {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.feature-art {
  position: relative;
  display: grid;
  place-items: center;
  height: 112px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 24px
      24px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 /
      24px 24px,
    linear-gradient(135deg, var(--navy-700), var(--blue));
  color: #fff;
}
.feature-art.alt {
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 24px
      24px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 /
      24px 24px,
    linear-gradient(135deg, var(--navy-900), var(--navy-700));
}
.feature-art.warm {
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 24px
      24px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 /
      24px 24px,
    linear-gradient(135deg, var(--blue-600), #3d8bff);
}
.feature-art .ui-icon {
  width: 46px;
  height: 46px;
  stroke-width: 1.4;
}
.feature-art span {
  position: absolute;
  left: 14px;
  top: 12px;
  font: 600 12px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}
.feature-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px 20px;
}
.feature-body b {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.3;
}
.feature-body small {
  flex: 1;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.feature-body .more {
  margin-top: 8px;
}
.push {
  margin-top: 56px;
}
.guide-list {
  border-top: 1px solid var(--line);
  counter-reset: guide;
}
.guide-list > a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 8px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.guide-list > a:hover {
  background: var(--paper);
}
.guide-list > a::before {
  content: "0" counter(guide);
  counter-increment: guide;
  color: #93a5b8;
  font: 600 16px var(--mono);
}
.guide-list b {
  display: block;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}
.guide-list small {
  color: var(--muted);
  font-size: 14px;
}
.tag {
  display: inline-block;
  margin-bottom: 2px;
  color: var(--blue);
  font: 600 12px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.guide-list .ui-icon,
.tool-link > .ui-icon:last-child,
.faq .ui-icon {
  width: 18px;
  height: 18px;
  color: #93a5b8;
  transition:
    transform 0.15s,
    color 0.15s;
}
.guide-list > a:hover .ui-icon,
.tool-link:hover > .ui-icon:last-child,
.faq a:hover .ui-icon {
  color: var(--blue);
  transform: translateX(3px);
}

/* Rail */
.rail {
  display: grid;
  gap: 20px;
  align-content: start;
}
.rail-card {
  overflow: hidden;
}
.rail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 0;
}
.rail-head h2 {
  font-size: 18px;
}
.rail-head .ui-icon {
  color: var(--blue);
}
.rail-card > p {
  padding: 6px 20px 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.code-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 16px 16px;
}
.code-grid a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition:
    border-color 0.15s,
    background 0.15s;
}
.code-grid a:hover {
  border-color: var(--blue);
  background: var(--tint);
}
.iso {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  grid-row: span 2;
  border-radius: var(--radius-sm);
  background: var(--navy-800);
  color: #fff;
  font: 700 12px var(--mono);
  letter-spacing: 0.04em;
}
.code-grid b {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}
.code-grid small {
  color: var(--blue);
  font: 600 12px var(--mono);
  letter-spacing: 0.04em;
}
.rail-cta {
  display: flex;
  margin: 0 16px 16px;
}
.tool-link {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  transition: background 0.15s;
}
.rail-head + .tool-link {
  margin-top: 14px;
}
.tool-link:hover,
.faq a:hover {
  background: var(--paper);
}
.tool-link > .ui-icon:first-child {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: var(--radius-sm);
  background: var(--tint);
  color: var(--blue);
}
.tool-link b {
  display: block;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.3;
}
.tool-link small {
  color: var(--muted);
  font-size: 14px;
}
.faq a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  transition: background 0.15s;
}

/* Footer */
footer {
  background: var(--navy-900);
  color: #a9bdd3;
  font-size: 16px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  padding: 56px 0 44px;
}
.footer-grid .brand {
  color: var(--sky);
}
.footer-grid .brand .word span {
  color: #fff;
}
.footer-grid p {
  max-width: 300px;
  margin-top: 14px;
  line-height: 1.55;
}
.footer-grid b {
  display: block;
  margin-bottom: 14px;
  color: #fff;
  font: 600 12px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-grid div > a:not(.brand) {
  display: block;
  width: fit-content;
  margin-bottom: 9px;
  transition: color 0.15s;
}
.footer-grid div > a:not(.brand):hover {
  color: #fff;
}
.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #8097b0;
  font-size: 12px;
}

/* Inner pages */
.page-hero p.updated {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}
.page-hero .shell {
  position: relative;
  padding: 52px 0 56px;
}
.crumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  color: #8fa6c0;
  font-size: 14px;
}
.crumbs a:hover {
  color: #fff;
}
.page-hero h1 {
  margin: 14px 0 12px;
  color: #fff;
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
}
.page-hero p {
  max-width: 640px;
  font-size: 18px;
  line-height: 1.55;
}
.content-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 56px;
  padding: 56px 0 88px;
}
.search-result {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 20px 22px;
  border: 1px solid #b9d6fb;
  border-radius: var(--radius);
  background: var(--tint);
}
.search-result h1 {
  font-size: clamp(22px, 3vw, 32px);
  overflow-wrap: anywhere;
}
.search-result ul {
  display: grid;
  gap: 4px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.search-result li a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 6px 0;
  color: var(--blue-600);
  font-weight: 600;
}
.search-result li a:hover {
  text-decoration: underline;
}
.search-result li span {
  min-width: 56px;
  color: var(--muted);
  font: 600 12px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.article {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0 20px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}
.article:first-of-type {
  padding-top: 0;
}
.article > .ui-icon {
  width: 52px;
  height: 52px;
  padding: 13px;
  border-radius: var(--radius-sm);
  background: var(--tint);
  color: var(--blue);
}
.article > div {
  max-width: 680px;
}
.article h2 {
  margin: 2px 0 12px;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.article p,
.article li {
  font-size: 16px;
  line-height: 1.7;
}
.article ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.article li {
  position: relative;
  padding-left: 26px;
}
.article li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}
.qa {
  border-bottom: 1px solid var(--line);
}
.qa:first-of-type {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
.qa summary {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker {
  display: none;
}
.qa summary::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.18s;
}
.qa[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}
.qa summary h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.qa summary:hover h3 {
  color: var(--blue);
}
.qa > p {
  padding: 0 34px 18px 0;
  color: var(--body);
  font-size: 16px;
  line-height: 1.7;
}

.related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.related a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.related a:hover {
  border-color: var(--blue);
  background: var(--tint);
}
.related .ui-icon {
  width: 15px;
  height: 15px;
}

/* The beginner guide keeps the next action close to each completed stage. */
.platform-example {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.platform-example h2 {
  margin-bottom: 12px;
  font-size: 28px;
}
.platform-example p,
.platform-example li {
  line-height: 1.7;
}
.platform-example .starter-route {
  margin-top: 24px;
}
.starter-intro {
  margin: 32px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--tint);
}
.starter-intro p {
  margin: 12px 0 20px;
  line-height: 1.65;
}
.starter-content {
  max-width: 880px;
  padding-bottom: 64px;
  overflow-wrap: anywhere;
}
.starter-content > section,
.starter-basics,
.starter-route {
  margin-top: 36px;
}
.starter-route ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.starter-route a {
  display: flex;
  gap: 8px;
  min-height: 44px;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--tint);
  color: var(--blue);
  font-weight: 600;
}
.starter-basics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.starter-basics .card,
.starter-example {
  padding: 24px;
}
.starter-basics h2 {
  font-size: 22px;
}
.starter-basics ul {
  padding-left: 20px;
  margin-top: 16px;
}
.starter-basics li + li {
  margin-top: 12px;
}
.starter-content p,
.starter-content li {
  line-height: 1.7;
}
.starter-steps {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.starter-step {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.step-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.step-number {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--navy-800);
  color: #fff;
  font: 700 18px var(--mono);
}
.step-where {
  color: var(--muted);
  font-size: 12px;
}
.step-heading h3 {
  font-size: 22px;
}
.step-check {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 3px solid var(--blue);
  background: var(--tint);
}
.starter-step .qa {
  margin-top: 16px;
}
.starter-step .qa summary {
  font-weight: 600;
}
.step-next {
  display: inline-flex;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  align-items: center;
  margin-top: 12px;
  white-space: normal;
}
.starter-example {
  border-radius: var(--radius);
  background: var(--paper);
}
.starter-example p {
  margin-top: 12px;
}
.starter-resources ul {
  margin: 16px 0 24px;
  padding: 0;
  list-style: none;
}
.starter-resources a:not(.btn) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--blue);
}
.mobile-toc {
  display: none;
}
.side-nav {
  position: sticky;
  top: 96px;
  align-self: start;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}
.side-nav b {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font: 600 12px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.side-nav a {
  display: block;
  margin-left: -21px;
  padding: 7px 0 7px 20px;
  border-left: 2px solid transparent;
  color: var(--body);
  font-size: 16px;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.side-nav a:hover,
.side-nav a.current {
  border-color: var(--blue);
  color: var(--blue);
}
.side-nav a.current {
  font-weight: 700;
}
.calculator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.calculator {
  padding: 26px;
}
.calculator.wide {
  grid-column: 1 / -1;
}
.calculator.wide .calc-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.calculator-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
}
.calculator-head .ui-icon {
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--tint);
  color: var(--blue);
}
.calculator h2 {
  font-size: 22px;
}
.calculator > p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}
.calculator-example {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.calculator-example h3 {
  font-size: 16px;
}
.calculator-example dl {
  margin: 12px 0;
}
.calculator-example dt {
  margin-top: 10px;
  font-weight: 700;
}
.calculator-example dd {
  margin: 2px 0 0;
}
.calculator-example p {
  color: var(--muted);
}
.guide-section {
  margin-top: 28px;
}
.guide-section h3 {
  margin-bottom: 10px;
  font-size: 18px;
}
.note {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.note .ui-icon {
  margin-top: 2px;
  color: var(--blue);
}
/* The one "before you buy" checklist on each page */
.confirm-box {
  display: grid;
  gap: 14px;
  margin-top: 32px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.confirm-head {
  display: flex;
  gap: 10px;
  align-items: center;
}
.confirm-head .ui-icon {
  width: 22px;
  height: 22px;
  color: var(--blue);
}
.confirm-head h2 {
  font-size: 22px;
}
.confirm-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: confirm;
}
.confirm-list li {
  position: relative;
  padding-left: 32px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  counter-increment: confirm;
}
.confirm-list li::before {
  content: counter(confirm);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--blue);
  font: 600 12px/1 var(--mono);
}
.confirm-foot {
  color: var(--muted);
  font-size: 14px;
}
.starter-content .confirm-list {
  grid-template-columns: minmax(0, 1fr);
}
.tracking-table {
  max-width: 100%;
  overflow-x: auto;
  margin: 20px 0;
}
.content-page > div,
.article > div {
  min-width: 0;
}
.tracking-table table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
  line-height: 1.65;
}
.tracking-table caption {
  text-align: left;
  font-weight: 700;
  padding-bottom: 12px;
}
.article .tracking-scroll-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.tracking-table th,
.tracking-table td {
  padding: 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.tracking-table thead {
  background: var(--tint);
}
.coupon-verification {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.6;
}
.coupon-verification dt {
  margin-top: 10px;
  font-weight: 700;
}
.coupon-verification dd {
  margin: 2px 0 0;
  color: var(--muted);
}
.country-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.country-detail article {
  display: flex;
  flex-direction: column;
  padding: 24px;
}
.country-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}
.country-head .iso {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.country-detail h2 {
  font-size: 22px;
}
.country-detail h3 {
  font-size: 16px;
}
.destination-resources {
  margin: 12px 0 18px;
  padding-left: 20px;
}
.destination-resources a {
  display: inline-block;
  padding-block: 6px;
  color: var(--blue);
  text-decoration: underline;
}
.promo-details {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.promo-details summary {
  cursor: pointer;
  min-height: 32px;
  color: var(--muted);
  font-size: 14px;
}
.promo-details > p {
  margin-top: 12px;
}
.country-detail p {
  flex: 1;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}
.coupon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 18px;
  border: 1.5px dashed #9fc3ee;
  border-radius: var(--radius-sm);
  background: var(--tint);
}
.coupon code {
  color: var(--navy-800);
  font: 700 22px var(--mono);
  letter-spacing: 0.12em;
}
.copy {
  min-width: 112px;
  padding: 9px 14px;
  font-size: 14px;
}
.copy.done {
  background: #12805c;
}
.copy .ui-icon {
  width: 16px;
  height: 16px;
}
/* A card with a live campaign takes the full row; dense flow back-fills the gap it leaves. */
.country-detail {
  grid-auto-flow: row dense;
}
.country-detail .has-campaign {
  grid-column: 1 / -1;
}
.campaign {
  margin-bottom: 18px;
  border: 1.5px solid var(--signal);
  border-radius: var(--radius);
  background: #fff7f0;
}
.campaign .rail-head h3 {
  font-size: 18px;
}
.campaign .rail-head .ui-icon {
  color: var(--signal);
}
.campaign > p,
.campaign > h4,
.campaign-codes,
.campaign-steps {
  margin: 0;
  padding: 10px 20px 0;
}
.country-detail .campaign p {
  flex: none;
  margin-bottom: 0;
}
.campaign-period strong {
  margin-right: 6px;
  color: var(--ink);
}
.campaign h4 {
  font-size: 16px;
}
.campaign-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}
.campaign-codes li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border: 1.5px dashed #f5b27d;
  border-radius: var(--radius-sm);
  background: #fff;
}
.campaign-codes code {
  display: block;
  color: var(--navy-800);
  font: 700 18px var(--mono);
  letter-spacing: 0.06em;
}
.campaign-codes small {
  color: var(--muted);
  font-size: 14px;
}
.campaign-codes .copy {
  min-width: 0;
}
.campaign-steps {
  padding-left: 40px;
  color: var(--body);
  font-size: 16px;
  line-height: 1.7;
}
.country-detail .campaign-source {
  padding-bottom: 16px;
  font-size: 12px;
}
@media (max-width: 680px) {
  .campaign-codes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1280px) {
  .topbar {
    position: relative;
  }
  .topbar-inner {
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 12px 0 0;
  }
  .lang {
    order: 2;
    margin-left: auto;
  }
  .topbar nav {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    gap: 0 4px;
    margin-inline: -10px;
  }
  .topbar nav a {
    min-height: 44px;
    padding: 0 10px;
  }
  [id] {
    scroll-margin-top: 20px;
  }
}
@media (max-width: 1080px) {
  .hero-grid {
    gap: 40px;
  }
  .main-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
  }
  .mini-search input {
    width: 110px;
  }
}
@media (max-width: 950px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding: 52px 0 60px;
  }
  .label-card {
    max-width: 540px;
  }
  .topic-grid,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps > :nth-child(odd) {
    border-left: 0;
  }
  .steps > :nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .steps > * {
    border-radius: 0 !important;
  }
  /* The fifth step (promo codes) takes a full row. */
  .steps > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .steps > :last-child:nth-child(odd) .step-promo {
    aspect-ratio: auto;
    padding: 18px;
  }
  .promo-strip ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .main-grid,
  .content-page {
    grid-template-columns: 1fr;
  }
  .main-grid {
    gap: 56px;
  }
  .rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rail .faq {
    grid-column: span 2;
  }
  .content-page .side-nav {
    display: none;
  }
  .mobile-toc {
    display: block;
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
  }
  .mobile-toc summary {
    padding: 14px 18px;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
  }
  .mobile-toc nav {
    padding: 0 18px 12px;
  }
  .mobile-toc a {
    display: block;
    padding: 10px 0;
    min-height: 44px;
    color: var(--blue);
  }
  .mobile-toc + .content-page {
    padding-top: 24px;
  }
}
@media (max-width: 680px) {
  .topbar nav a[data-secondary] {
    display: none;
  }
  .hero-actions {
    gap: 6px 16px;
    margin-bottom: 18px;
  }
  .starter-basics,
  .starter-route ol {
    grid-template-columns: 1fr;
  }
  .shell {
    width: calc(100% - 32px);
  }
  .brand {
    font-size: 20px;
  }
  .mini-search input {
    width: 104px;
  }
  .hero-copy > p,
  .page-hero p {
    font-size: 16px;
  }
  .hero-search button {
    padding-inline: 16px;
  }
  .label-card {
    padding: 18px 16px 14px;
  }
  .section {
    padding-top: 56px;
  }
  .section-head {
    flex-direction: column;
    align-items: start;
    gap: 8px;
  }
  .section-head h2 {
    font-size: 22px;
  }
  .topic-grid,
  .steps,
  .feature-grid,
  .rail,
  .calculator-grid,
  .country-detail {
    grid-template-columns: 1fr;
  }
  /* Five steps would stack into a long column; swipe through them instead. */
  .steps {
    grid-auto-columns: 78%;
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
  }
  .steps > :nth-child(n) {
    border-top: 0;
    border-left: 1px solid var(--line);
    scroll-snap-align: start;
  }
  .steps > :first-child {
    border-left: 0;
  }
  .steps > :last-child:nth-child(odd) {
    grid-column: auto;
  }
  .promo-strip {
    padding: 16px;
  }
  .promo-strip ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topic.lead,
  .rail .faq {
    grid-column: auto;
  }
  .steps > * {
    border-left: 0;
  }
  .steps > * + * {
    border-top: 1px solid var(--line);
  }
  .main-grid {
    padding: 56px 0 64px;
  }
  .calculator {
    padding: 20px;
  }
  .calculator.wide .calc-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .article {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 32px 0;
  }
  .article > .ui-icon {
    width: 44px;
    height: 44px;
    padding: 11px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
    padding: 44px 0 32px;
  }
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 950px) {
  .code-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* An odd last destination spans the row instead of sitting alone. */
  .code-grid a:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .confirm-box {
    padding: 20px;
  }
  .confirm-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 680px) {
  /* Tool forms read top to bottom on phones; size stays on one row. */
  .calculator .calc-form,
  .calculator.wide .calc-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .calculator .calc-form .span-2 {
    grid-column: auto;
  }
  .page-hero .shell {
    padding: 28px 0 32px;
  }
  .page-hero .eyebrow {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
/* Promo code inside a tutorial step. */
.step-promo {
  max-width: 640px;
  margin-top: 16px;
}
.step-promo p {
  margin-bottom: 10px;
}
