/* ──────────────────────────────────────────────────────────────
   Yunifly, rebuilt 2026-11-22. An editorial, paper-and-ink system for a small logistics team:
   warm paper ground, navy ink, hairline rules instead of floating cards, the serif for headings
   (English), tabular figures for dates, red kept for the quote button alone. Page archetypes get
   their own shapes (route, reference, process, editorial, home, tool) from shared parts.
   One stylesheet, no build step. Chinese pages use the reader's CJK sans.
   ────────────────────────────────────────────────────────────── */

:root {
  --navy: #102A43;
  --navy-deep: #0B1F33;
  --ink: #1B2533;
  --muted: #566476;          /* 5.9:1 on paper */
  --paper: #FBFAF7;
  --paper-2: #F3F0E8;        /* warm panels */
  --white: #FFFFFF;
  --line: #DCE0E5;
  --line-strong: #B9C1CB;
  --red: #C8303F;            /* the quote button only (white text 5.2:1) */
  --red-hover: #A92634;
  --link: #1F5A89;           /* 6.8:1 on paper */
  --sky: #4B8FC6;
  --sky-pale: #E8F1F8;
  --amber: #8A5A00;          /* warnings text (6.1:1) */
  --amber-pale: #FBF1DC;
  --serif: "Yunifly Serif", Georgia, "Times New Roman", serif;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --font-hans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
               "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", Roboto, sans-serif;
  --font-hant: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC",
               "Noto Sans CJK TC", "Source Han Sans TC", "Segoe UI", Roboto, sans-serif;
  --measure: 70ch;
  --radius: 6px;
  /* Legacy names still read by the route selector block below. */
  --soft: #F4F6F8; --soft-2: #ECEFF3; --sky-soft: #B9D6EE; --sky-ink: var(--link);
}

@font-face {
  font-family: "Yunifly Serif"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/yunifly-serif-7629fafe.woff2") format("woff2");
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; scroll-behavior: smooth; }
body {
  font-family: var(--font); font-size: 1.0625rem; color: var(--ink); background: var(--paper);
  line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { color: var(--navy); line-height: 1.22; text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 1.08rem; font-weight: 700; }
p, li, dd, td { text-wrap: pretty; }
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); text-decoration-thickness: 2px; }
strong, b { font-weight: 700; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 3px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main:focus { outline: none; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

:lang(zh-Hans) { font-family: var(--font-hans); }
:lang(zh-Hant) { font-family: var(--font-hant); }
html:lang(zh-Hans) body, html:lang(zh-Hant) body { line-height: 1.85; line-break: strict; overflow-wrap: anywhere; }
html:lang(zh-Hans) :is(h1, h2, h3), html:lang(zh-Hant) :is(h1, h2, h3) { font-family: inherit; font-weight: 700; letter-spacing: .01em; line-height: 1.4; }
[lang="en"], [lang="en-US"] { font-family: var(--font); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ── Buttons and links ───────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  border: 1.5px solid transparent; border-radius: var(--radius); cursor: pointer; text-decoration: none;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; padding: 12px 22px; text-align: center;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hover); color: #fff; }
.btn-quiet, .btn-outline { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn-quiet:hover, .btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-small { min-height: 38px; padding: 8px 14px; font-size: .93rem; }
.text-link { font-weight: 700; color: var(--navy); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.text-link::after { content: " →"; }
.text-link:hover { color: var(--red-hover); }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--amber); background: var(--amber-pale); border-radius: 3px; padding: 1px 6px; vertical-align: 2px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* ── Header ───────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 250, 247, .97); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-word { height: 21px; width: auto; max-width: none; }
.brand-tagline { margin-top: 3px; font-size: .7rem; font-weight: 700; color: var(--muted); letter-spacing: .05em; white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1199px) { .brand-tagline { display: none; } }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-nav { display: flex; align-items: center; gap: 2px; }
.header-link, .nav-toggle {
  display: inline-flex; align-items: center; gap: 5px; padding: 10px 10px; border-radius: var(--radius);
  font: inherit; font-size: .94rem; font-weight: 600; color: var(--navy); text-decoration: none; white-space: nowrap;
  background: none; border: 0; cursor: pointer;
}
.header-link:hover, .nav-toggle:hover { background: var(--paper-2); color: var(--navy); }
.header-link[aria-current="page"], .nav-toggle.is-current { box-shadow: inset 0 -2px 0 var(--navy); border-radius: 0; }
.nav-toggle svg { width: 16px; height: 16px; }
.nav-toggle .caret { width: 13px; height: 13px; transition: transform .15s ease; }
.nav-item { position: relative; }
.nav-item:hover .caret, .nav-item.open .caret, .nav-item:focus-within .caret { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: 300px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 16px 36px rgba(16, 42, 67, .12); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease, visibility .12s;
}
.nav-item::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.nav-item:hover .nav-dropdown, .nav-item:focus-within .nav-dropdown, .nav-item.open .nav-dropdown { opacity: 1; visibility: visible; transform: none; }
.nav-dropdown a { display: block; padding: 7px 10px; border-radius: 4px; font-size: .93rem; color: var(--ink); text-decoration: none; }
.nav-dropdown a:hover, .nav-dropdown a[aria-current] { background: var(--paper-2); color: var(--navy); }
.dd-hub { border-bottom: 1px solid var(--line); margin-bottom: 6px; padding-bottom: 10px !important; }
.dd-hub strong { display: block; color: var(--navy); }
.dd-hub small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.45; margin-top: 2px; }
.dd-list { list-style: none; }
.dd-list--routes { display: grid; grid-template-columns: 1fr 1fr; }
.nav-item--lang .nav-dropdown { left: auto; right: 0; width: 170px; }
.nav-dropdown--lang a[aria-current="true"] { font-weight: 700; }
.site-header .header-quick-cta { display: none; margin-left: auto; }

.flag { display: inline-block; width: 16px; height: 12px; object-fit: cover; border-radius: 1px; box-shadow: 0 0 0 1px rgba(16, 42, 67, .15); vertical-align: -1px; }
.flag--large { width: 24px; height: 18px; }
.flag-label { display: inline-flex; align-items: center; gap: 6px; }
.route-label { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.route-arrow { color: var(--muted); }

.lang-hint { background: var(--navy); color: #fff; font-size: .92rem; }
.lang-hint .container { display: flex; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.lang-hint p { flex: 1; display: flex; align-items: center; gap: 8px; }
.lang-hint p svg { width: 18px; height: 18px; flex: none; }
.lang-hint a { color: #fff; }
.lang-hint-close { background: none; border: 0; color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 4px 8px; }

.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px 6px; margin-right: -6px; }
.menu-toggle-box { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 24px; height: 20px; }
.menu-toggle .bar { display: block; height: 2px; width: 100%; background: var(--navy); transition: transform .25s ease, opacity .2s ease; }
.menu-open .menu-toggle .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle .bar:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { display: none; grid-template-rows: 0fr; visibility: hidden; background: var(--paper); border-top: 1px solid var(--line); transition: grid-template-rows .35s cubic-bezier(.22, 1, .36, 1), visibility .35s; }
.menu-open .mobile-menu { grid-template-rows: 1fr; visibility: visible; }
.mobile-menu-inner { overflow: hidden; min-height: 0; }
.mobile-menu-scroll { max-height: calc(100dvh - 66px); overflow-y: auto; padding: 4px 16px 24px; }
.mobile-menu a:not(.btn), .msub-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 13px 0; border: 0; border-bottom: 1px solid var(--line); background: none;
  font: inherit; font-weight: 600; color: var(--navy); text-decoration: none; text-align: left; cursor: pointer;
}
.mobile-menu a[aria-current="page"] { color: var(--red); }
.msub-toggle .caret { width: 16px; height: 16px; transition: transform .2s ease; }
.msub.open .msub-toggle .caret { transform: rotate(180deg); }
.msub-panel { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .3s ease, visibility .3s; }
.msub.open .msub-panel { grid-template-rows: 1fr; visibility: visible; }
.msub-inner { overflow: hidden; min-height: 0; }
.mobile-menu .msub-inner a { padding-left: 14px; font-weight: 500; justify-content: flex-start; }
.mobile-menu .msub-hub { font-weight: 700 !important; }
.mobile-menu-ctas { padding-top: 18px; }
.mobile-menu-ctas .btn { width: 100%; }
.mobile-lang { display: flex; gap: 6px; padding-top: 16px; }
.mobile-menu .mobile-lang a { flex: 1; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; font-size: .9rem; }
.mobile-menu .mobile-lang a[aria-current="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Section scaffolding ─────────────────────────── */
.section-title { font-size: clamp(1.6rem, 3vw, 2.15rem); margin-bottom: 10px; }
.section-sub { color: var(--muted); max-width: 62ch; margin-bottom: 32px; font-size: 1.05rem; }
.eyebrow, .doc-kicker {
  font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}
html:lang(zh-Hans) :is(.eyebrow, .doc-kicker), html:lang(zh-Hant) :is(.eyebrow, .doc-kicker) { letter-spacing: .04em; text-transform: none; }
.doc-kicker-quiet { font-weight: 500; }

/* ── Home ─────────────────────────────────────────── */
.home-hero { border-bottom: 1px solid var(--line); background:
  linear-gradient(var(--paper), var(--paper)) padding-box; padding: 56px 0 72px; }
.home-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.home-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.35rem); line-height: 1.08; letter-spacing: -.02em; margin-bottom: 20px; }
.home-lead { font-size: 1.14rem; max-width: 56ch; color: var(--ink); margin-bottom: 28px; }
.home-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.pacific-map { width: 100%; height: auto; display: block; }
.map-gridline { stroke: #E6E1D5; stroke-width: 1; }
.map-sea { fill: #9AA6B3; font: italic 600 13px var(--serif); letter-spacing: .12em; }
.map-arc { fill: none; stroke: var(--navy); stroke-width: 1.2; stroke-dasharray: 3 5; opacity: .55; }
.map-dot { fill: var(--navy); }
.map-dot--us { fill: var(--red); }
.map-ring { fill: none; stroke: var(--red); stroke-width: 1.2; opacity: .5; }
.map-label { fill: var(--ink); font: 600 12.5px var(--font); }
.map-label--us { font-size: 14px; font-weight: 700; fill: var(--navy); }
html:lang(zh-Hans) .map-label, html:lang(zh-Hant) .map-label { font-family: inherit; }

.home-hero + .route-finder .container { margin-top: -40px; }
.rulebooks, .home-routes, .home-roles, .home-guides, .home-company { padding: 72px 0; }
.home-routes, .home-guides { border-top: 1px solid var(--line); }
.home-roles { background: var(--paper-2); }
.rulebook-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 2px solid var(--navy); }
.rulebook { padding: 28px 32px 32px 0; }
.rulebook + .rulebook { padding: 28px 0 32px 32px; border-left: 1px solid var(--line); }
.rulebook-kicker { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
html:lang(zh-Hans) .rulebook-kicker, html:lang(zh-Hant) .rulebook-kicker { letter-spacing: .04em; }
.rulebook h3 { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; margin-bottom: 12px; }
html:lang(zh-Hans) .rulebook h3, html:lang(zh-Hant) .rulebook h3 { font-family: inherit; font-weight: 700; }
.rulebook > p { margin-bottom: 18px; }
.rulebook-steps { list-style: none; counter-reset: step; margin-bottom: 20px; border-top: 1px solid var(--line); }
.rulebook-steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .97rem; }
.rulebook-steps li::before { content: counter(step); grid-row: span 2; font-family: var(--mono); font-size: .9rem; color: var(--muted); padding-top: 2px; }
.rulebook-steps strong { color: var(--navy); }
.special-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-special { background: var(--navy); color: #E7EDF4; }
.home-special .special-grid { border-color: rgba(255, 255, 255, .15); }
.special { padding: 44px 36px 44px 0; }
.special + .special { padding-left: 36px; border-left: 1px solid rgba(255, 255, 255, .15); }
.special h3 { color: #fff; font-family: var(--serif); font-weight: 600; font-size: 1.45rem; margin-bottom: 10px; }
html:lang(zh-Hans) .special h3, html:lang(zh-Hant) .special h3 { font-family: inherit; font-weight: 700; }
.special p { margin-bottom: 16px; max-width: 52ch; }
.home-special .text-link { color: #fff; text-decoration-color: #FF7A85; }
.company-grid { max-width: 760px; }
.home-company h2 { font-size: 1.6rem; margin-bottom: 12px; }
.home-company p { margin-bottom: 12px; }

/* ── Tables (content tables, the route table, specs) ── */
.table-wrap { overflow-x: auto; margin: 18px 0 26px; border-top: 2px solid var(--navy); -webkit-overflow-scrolling: touch; }
.table-wrap table, .spec-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table-wrap caption { text-align: left; font-weight: 700; padding: 8px 0; }
.table-wrap th, .table-wrap td, .spec-table th, .spec-table td { text-align: left; vertical-align: top; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line); }
.table-wrap thead th { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
html:lang(zh-Hans) .table-wrap thead th, html:lang(zh-Hant) .table-wrap thead th { letter-spacing: .02em; font-size: .86rem; }
.table-wrap tbody th { font-weight: 700; color: var(--navy); }
.table-wrap td { min-width: 9em; }
.route-table td a { font-weight: 600; }
.route-table-sister th, .route-table-sister td { background: var(--paper-2); }
.route-table-sister th, .route-table-sister td { padding-left: 10px; }

/* ── Document pages (route, guides, hubs, company) ── */
.doc-head { padding: 34px 0 34px; border-bottom: 1px solid var(--line); }
.doc-head h1 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.12; letter-spacing: -.015em; max-width: 24ch; margin-bottom: 14px; }
html:lang(zh-Hans) .doc-head h1, html:lang(zh-Hant) .doc-head h1 { max-width: 30em; }
.doc-lead { font-size: 1.16rem; max-width: 62ch; color: var(--ink); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 16px; font-size: .88rem; color: var(--muted); }
.doc-meta a { color: var(--muted); }
.doc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 22px; }
.route-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--navy); font-weight: 600; }
.breadcrumbs { margin-bottom: 18px; font-size: .86rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 4px; color: var(--line-strong); }
.breadcrumbs a { color: var(--muted); }

.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; padding-top: 36px; padding-bottom: 56px; }
.doc-grid--single { grid-template-columns: minmax(0, var(--measure)); }
.doc-grid--editorial.doc-grid--single { grid-template-columns: minmax(0, 66ch); }
.doc-main { min-width: 0; max-width: var(--measure); }
.doc-main--wide { max-width: none; }
.doc-side { position: relative; }
.toc { position: sticky; top: 96px; font-size: .9rem; border-left: 2px solid var(--line); padding-left: 16px; }
.toc-title { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; display: grid; gap: 6px; }
.toc a { color: var(--ink); text-decoration: none; line-height: 1.4; display: block; }
.toc a:hover { color: var(--link); text-decoration: underline; }
.side-quote { position: sticky; top: calc(96px + var(--toc-h, 0px)); margin-top: 28px; padding: 16px; background: var(--paper-2); border-radius: var(--radius); font-size: .92rem; }
.side-quote p { font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.doc-side .toc + .side-quote { position: static; }

.doc-main > section, .doc-main > nav { margin-bottom: 40px; }
.doc-main h2 { font-size: clamp(1.35rem, 2.2vw, 1.65rem); margin-bottom: 14px; }
.doc-main h3 { margin: 22px 0 8px; }
.doc-main p, .doc-main ul, .doc-main ol { margin-bottom: 14px; }
.doc-main ul, .doc-main ol { padding-left: 1.3em; }
.doc-main li { margin-bottom: 6px; }
.doc-main li::marker { color: var(--muted); }
.callout { margin: 18px 0; padding: 14px 18px; border-left: 3px solid var(--navy); background: var(--sky-pale); }
.callout p { margin: 0 !important; }
.callout-risk { border-left-color: var(--amber); background: var(--amber-pale); }

.brief { padding: 22px 24px; background: var(--paper-2); border-top: 3px solid var(--navy); }
.brief h2 { font-family: var(--font); font-size: .8rem !important; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px !important; }
.brief ul { list-style: none; padding: 0 !important; margin: 0 !important; display: grid; gap: 10px; }
.brief li { padding-left: 22px; position: relative; margin: 0 !important; }
.brief li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

.plan-list { list-style: none; padding: 0 !important; border-top: 1px solid var(--line); }
.plan-list > li { display: grid; grid-template-columns: minmax(130px, 210px) 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); margin: 0 !important; }
.plan-when { font-family: var(--mono); font-size: .86rem; line-height: 1.5; color: var(--navy); font-weight: 600; padding-top: 2px; }
html:lang(zh-Hans) .plan-when, html:lang(zh-Hant) .plan-when { font-family: inherit; }
.plan-step { min-width: 0; }

.roles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--navy); }
.role { padding: 16px 18px 6px 0; }
.role + .role { padding-left: 18px; border-left: 1px solid var(--line); }
.role h3 { font-size: .82rem !important; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px !important; }
html:lang(zh-Hans) .role h3, html:lang(zh-Hant) .role h3 { letter-spacing: .02em; font-size: .95rem !important; }
.role--us h3 { color: var(--navy); }
.role--you h3 { color: var(--link); }
.role--official h3 { color: var(--amber); }
.role ul { padding-left: 1.1em !important; font-size: .95rem; }
.home-roles .roles-grid { background: transparent; }

.spec-table th { width: 34%; font-weight: 700; color: var(--navy); }
.spec-table { border-top: 2px solid var(--navy); }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 28px 14px 0; font-weight: 700; color: var(--navy); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.3rem; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq-answer { padding-bottom: 8px; }

.sources { font-size: .93rem; padding-top: 20px; border-top: 1px solid var(--line); }
.sources-list { padding-left: 1.5em !important; }
.sources-list li { margin-bottom: 4px; }
.sources-note { color: var(--muted); }
.next-reading ul { list-style: none; padding: 0 !important; border-top: 1px solid var(--line); }
.next-reading li { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0 !important; }
.next-reading a { font-weight: 700; }
.next-reading span { display: block; color: var(--muted); font-size: .93rem; }
.other-way { font-weight: 600; }
.other-way a { margin-left: 6px; }

/* Process guides: numbered sections. */
.doc-grid--process .doc-main { counter-reset: phase; }
.doc-grid--process .doc-section { counter-increment: phase; position: relative; padding-left: 52px; }
.doc-grid--process .doc-section::before {
  content: counter(phase); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--navy); color: var(--navy); font-family: var(--mono); font-size: .92rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
/* Editorial guides: a quieter, bookish column. */
.doc-grid--editorial .doc-main > .doc-section > p:first-of-type { font-size: 1.06rem; }
.doc-grid--editorial .doc-section h2 { font-size: 1.45rem; }

.legal-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; padding: 18px 0; border-top: 2px solid var(--navy); border-bottom: 1px solid var(--line); margin-bottom: 32px; font-size: .95rem; }
.legal-facts dt { font-weight: 700; color: var(--navy); }

.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 36px 0 24px; }
.two-up h2 { font-size: 1.3rem; margin-bottom: 8px; }
.guide-group { margin-bottom: 40px; }
.guide-group h2 { font-size: 1.35rem; margin-bottom: 12px; }
.guide-list { list-style: none; padding: 0 !important; border-top: 1px solid var(--line); }
.guide-list li { padding: 16px 0; border-bottom: 1px solid var(--line); margin: 0 !important; }
.guide-list a { font-weight: 700; font-size: 1.08rem; color: var(--navy); }
.guide-list p { margin: 4px 0 2px !important; color: var(--ink); }
.guide-list small { color: var(--muted); }
.guide-list--home { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; border-top: 0; margin-bottom: 24px; }
.guide-list--home li { border-top: 1px solid var(--line); border-bottom: 0; }

/* ── Closing invitation ───────────────────────────── */
.closing { background: var(--navy); color: #E7EDF4; padding: 52px 0; }
.closing-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 56px; align-items: center; }
.closing h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 8px; }
.closing p { max-width: 58ch; }
.closing-actions { display: grid; gap: 8px; justify-items: start; }
.closing-email { color: #fff; font-weight: 600; }
.closing-email:hover { color: #fff; }
.closing-note { font-size: .86rem; color: #B7C4D3; }

/* ── Contact ──────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; padding-top: 36px; padding-bottom: 64px; }
.contact-grid > section { padding: 24px 0; border-top: 1px solid var(--line); }
.contact-way { border-top: 2px solid var(--navy) !important; }
.contact-grid h2 { font-size: 1.35rem; margin-bottom: 10px; }
.contact-grid p { margin-bottom: 14px; }
.contact-address { font-size: 1.15rem; font-weight: 700; }
.contact-ready ul { padding-left: 1.2em; }
.contact-ready li { margin-bottom: 6px; }

/* ── Planner ──────────────────────────────────────── */
.planner { padding-top: 32px; padding-bottom: 56px; max-width: 900px; }
.planner-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 14px; align-items: end; padding: 20px; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--navy); }
.planner-field label { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.planner-field select, .planner-field input { width: 100%; min-height: 46px; padding: 8px 12px; font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: var(--radius); }
.planner-field select:focus, .planner-field input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(16, 42, 67, .15); }
.planner-status { min-height: 1.6em; margin: 14px 0 6px; font-weight: 600; color: var(--navy); }
.planner-route { margin: 20px 0 40px; }
.planner-route h2 { font-size: 1.45rem; margin-bottom: 8px; }
.planner-intro { margin-bottom: 16px; }
.planner-variant-note { font-weight: 700; color: var(--navy); margin: 10px 0; }
.planner-date { display: block; font-size: .98rem; color: var(--navy); }
.planner-date:empty { display: none; }
.planner-offset { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); }
.planner-note { display: block; color: var(--ink); font-size: .95rem; margin-top: 2px; }
.planner-late { display: block; margin-top: 6px; color: var(--amber); font-weight: 700; font-size: .92rem; }
.planner-steps li.is-late .planner-date { color: var(--amber); text-decoration: line-through; }
.planner-quote { margin-top: 16px; }
.planner-how { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); max-width: var(--measure); }
.planner-how h2 { font-size: 1.35rem; margin-bottom: 12px; }
.planner-how p { margin-bottom: 12px; }

/* ── Footer ───────────────────────────────────────── */
.site-footer { background: var(--navy-deep); color: #C5D1DE; padding: 52px 0 26px; font-size: .92rem; }
.footer-cols { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer-logo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; text-decoration: none; }
.footer-logo .brand-mark { width: 38px; height: 38px; }
.footer-logo .brand-word { height: 20px; }
.footer-brand p { margin-bottom: 10px; }
.footer-operator { color: #9FB1C4; font-size: .86rem; }
.footer-email { display: flex; align-items: center; gap: 8px; }
.footer-email svg { width: 16px; height: 16px; }
.site-footer a { color: #E3EAF2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-col h2 { font-family: var(--font); font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 10px; }
html:lang(zh-Hans) .footer-col h2, html:lang(zh-Hant) .footer-col h2 { letter-spacing: .04em; font-size: .9rem; }
.footer-h2-gap { margin-top: 22px; }
.footer-col ul { list-style: none; }
.footer-col li { padding: 3px 0; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .84rem; }
.footer-lang, .footer-legal { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.footer-lang a[aria-current="true"] { color: #fff; font-weight: 700; }

/* ── Misc ─────────────────────────────────────────── */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80; max-width: 520px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 36px rgba(8, 20, 40, .2); }
.consent[hidden] { display: none; }
.consent-inner { padding: 18px 20px; }
.consent h2 { font-family: var(--font); font-size: 1.02rem; margin-bottom: 6px; }
.consent p { font-size: .92rem; }
.consent-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.consent-actions .btn { flex: 1 1 140px; }
.draft-banner { background: var(--amber-pale); color: #5c4400; text-align: center; padding: 8px 16px; font-weight: 700; font-size: .9rem; }
.nf-section { padding: 64px 0; }
.nf-section h1 { font-size: 2rem; margin-bottom: 10px; }
.nf-lead { color: var(--muted); margin-bottom: 22px; }
.nf-ctas, .hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.route-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.route-pills a { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); text-decoration: none; color: var(--navy); font-size: .92rem; }
.route-pills a:hover { border-color: var(--navy); }

.sticky-cta { display: none; }
@media (max-width: 720px) {
  .sticky-cta { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(251, 250, 247, .97); border-top: 1px solid var(--line); }
  .sticky-cta .btn { width: 100%; }
  body:has(.sticky-cta) { padding-bottom: 70px; }
  body:has(.menu-open) .sticky-cta { display: none; }
  .consent { bottom: 82px; }
}

/* ── Route selector (home page, pages/_route_finder) ─────────────────────────
   A white card between the hero and the first section: departure, destination, the quote button.
   The two tiles are comboboxes (route_finder_controller.js). Yunifly's palette: navy focus ring,
   red accent stripe and plane badge, soft tile grounds. The card overlaps the hero's bottom edge on
   wide screens so the eye lands on it right after the headline. */
.route-finder { position: relative; z-index: 3; padding: 0 0 56px; scroll-margin-top: 92px; }
.route-finder .container { margin-top: -44px; }
.rf-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 30px 16px;
  box-shadow: 0 24px 60px rgba(16, 42, 67, .16), 0 2px 6px rgba(16, 42, 67, .05);
}
.rf-card::before {
  content: ""; position: absolute; left: 30px; top: -2px; width: 64px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--red) 0 62%, var(--navy) 0);
}
.rf-head { margin-bottom: 18px; }
.rf-title { font-size: clamp(1.25rem, 2.2vw, 1.5rem); margin: 0; color: var(--navy); }
.rf-title:focus { outline: none; }
.rf-sub { margin-top: 4px; color: var(--muted); font-size: .97rem; max-width: 46em; }

.rf-grid {
  display: grid; align-items: center; gap: 0 10px;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr) auto;
  grid-template-areas: "from badge to go" "status status status status";
}
.rf-field--from { grid-area: from; }
.rf-field--to { grid-area: to; }
.rf-badge { grid-area: badge; }
.rf-go { grid-area: go; }
.rf-status { grid-area: status; }

.rf-field {
  position: relative; display: flex; flex-direction: column; justify-content: center; min-width: 0;
  min-height: 64px; padding: 8px 44px 8px 16px; border-radius: 12px; cursor: text;
  background: var(--soft); border: 1.5px solid var(--line);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  scroll-margin-top: 104px; -webkit-tap-highlight-color: rgba(16, 42, 67, .1);
}
.rf-field:hover { border-color: #b7c1d4; }
.rf-field:focus-within, .rf-field.is-open {
  background: #fff; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(16, 42, 67, .14);
}
.rf-label { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); line-height: 1.3; cursor: inherit; }
html:lang(zh-Hans) .rf-label, html:lang(zh-Hant) .rf-label { letter-spacing: .02em; font-size: .86rem; }
.rf-input {
  width: 100%; min-width: 0; padding: 2px 0 0; border: 0; background: transparent; outline: none;
  font: inherit; font-size: 1.06rem; font-weight: 700; line-height: 1.4; color: var(--navy);
  text-overflow: ellipsis; cursor: inherit;
}
/* The tile carries the focus ring (border and halo above), not the bare text field inside it. */
.rf-input:focus-visible { outline: none; }
.rf-input::placeholder { color: var(--muted); font-weight: 500; opacity: 1; }
.rf-caret {
  position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  color: var(--muted); pointer-events: none; transition: transform .2s ease;
}
.rf-field.is-open .rf-caret { transform: rotate(180deg); color: var(--navy); }
/* Waiting for the departure: visibly unavailable, still readable. */
.rf-field.is-waiting { background: var(--soft-2); border-style: dashed; cursor: not-allowed; padding-right: 16px; }
.rf-field.is-waiting:hover { border-color: var(--line); }
.rf-input:disabled { cursor: inherit; opacity: 1; -webkit-text-fill-color: currentColor; }
.rf-field.is-waiting .rf-caret { display: none; }
.rf-field.is-waiting .rf-input::placeholder { font-size: .94rem; }
/* Fixed to the United States (any other departure): a quiet confirmed state with a tick. */
.rf-field.is-fixed { background: var(--sky-pale); border-color: var(--sky-soft); cursor: default; }
.rf-field.is-fixed .rf-caret { display: none; }
.rf-field.is-fixed::after {
  content: ""; position: absolute; right: 19px; top: 50%; width: 6px; height: 12px; margin-top: -8px;
  border: solid var(--navy); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

.rf-badge {
  justify-self: center; position: relative; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1.5px solid var(--line); color: var(--red);
  box-shadow: 0 4px 12px rgba(16, 42, 67, .08);
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
/* The plane icon points up and to the right: turned to follow the route. */
.rf-badge svg { width: 19px; height: 19px; transform: rotate(45deg); }
.rf-card.is-complete .rf-badge { background: var(--navy); border-color: var(--navy); color: #fff; }
.rf-card.is-leaving .rf-badge svg { animation: rf-takeoff .65s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes rf-takeoff {
  50% { transform: rotate(45deg) translate(3px, -3px); }
  100% { transform: rotate(45deg); }
}

.rf-go { display: inline-flex; align-items: center; justify-content: center; min-height: 60px; margin-left: 8px; padding: 0 30px; white-space: nowrap; }
.rf-status { min-height: 1.6em; margin-top: 12px; font-size: .9rem; color: var(--muted); }
.rf-card.is-leaving .rf-status { color: var(--navy); font-weight: 700; }
.rf-note { margin-top: 2px; font-size: .86rem; color: var(--muted); }
.rf-noscript { margin-top: 6px; font-size: .9rem; color: var(--muted); }

/* The country list: under its field (or above it when the screen has more room there). */
.rf-list {
  position: absolute; z-index: 30; left: -1.5px; right: -1.5px; top: calc(100% + 8px);
  max-height: 340px; overflow-y: auto; overscroll-behavior: contain; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 44px rgba(16, 42, 67, .2); cursor: default; text-align: left;
}
.rf-list[hidden] { display: none; }
.rf-field.is-above .rf-list { top: auto; bottom: calc(100% + 8px); }
.rf-group { padding: 10px 12px 4px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
html:lang(zh-Hans) .rf-group, html:lang(zh-Hant) .rf-group { letter-spacing: .02em; font-size: .82rem; }
.rf-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 10px 12px; border-radius: 8px;
  font-size: .97rem; font-weight: 600; line-height: 1.35; color: var(--ink); cursor: pointer;
  -webkit-tap-highlight-color: rgba(16, 42, 67, .1);
}
.rf-option:hover { background: var(--soft); }
.rf-option.is-active { background: var(--sky-pale); color: var(--navy); box-shadow: inset 3px 0 0 var(--red); }
.rf-option[aria-selected="true"] { font-weight: 800; color: var(--navy); }
.rf-option[aria-selected="true"]::after {
  content: ""; flex: none; width: 6px; height: 11px; margin: -3px 4px 0 0;
  border: solid var(--navy); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.rf-empty { padding: 12px; font-size: .93rem; color: var(--muted); }

/* Reached from the header's quote link: one soft ring, so the eye lands on the card. */
.rf-card::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; pointer-events: none;
  border: 2px solid var(--red); opacity: 0;
}
.rf-card.is-glowing::after { animation: rf-glow 1.6s ease-out; }
@keyframes rf-glow {
  0% { opacity: .7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.025, 1.06); }
}

@media (max-width: 1023px) {
  .route-finder { padding: 0 0 40px; }
  .route-finder .container { margin-top: 0; padding-top: 28px; }
  .rf-grid {
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
    grid-template-areas: "from badge to" "status status go";
    row-gap: 14px;
  }
  .rf-go { margin-left: 0; width: 100%; }
  .rf-status { margin-top: 0; }
}
@media (max-width: 600px) {
  .route-finder { padding: 0 0 28px; scroll-margin-top: 72px; }
  .route-finder .container { padding-top: 20px; }
  .rf-card { padding: 22px 16px 12px; border-radius: 16px; }
  .rf-card::before { left: 16px; width: 56px; }
  .rf-head { margin-bottom: 16px; }
  .rf-title { font-size: 1.25rem; }
  .rf-sub { font-size: .93rem; line-height: 1.55; }
  /* Stacked: the badge sits on the seam between the two tiles, its plane pointing down. */
  .rf-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "from" "badge" "to" "go" "status"; row-gap: 0; }
  .rf-badge { width: 34px; height: 34px; margin: -9px 0; }
  .rf-field--from.is-open + .rf-badge { visibility: hidden; }
  .rf-badge svg { width: 17px; height: 17px; transform: rotate(135deg); }
  @keyframes rf-takeoff {
    50% { transform: rotate(135deg) translate(3px, -3px); }
    100% { transform: rotate(135deg); }
  }
  .rf-field { min-height: 62px; scroll-margin-top: 76px; }
  .rf-go { min-height: 52px; margin-top: 14px; }
  .rf-status { margin-top: 10px; text-align: center; }
  .rf-note { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .rf-field, .rf-badge, .rf-caret { transition: none; }
  .rf-card.is-leaving .rf-badge svg, .rf-card.is-glowing::after { animation: none; }
}


/* ── Responsive ─────────────────────────────────── */
@media (max-width: 1023px) {
  .header-actions { display: none; }
  .site-header .header-quick-cta { display: inline-flex; }
  .menu-toggle { display: inline-flex; }
  .mobile-menu { display: grid; }
  .home-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .home-hero-map { max-width: 560px; }
  .home-hero + .route-finder .container { margin-top: 0; }
  .doc-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .doc-side { display: none; }
  .doc-main { max-width: var(--measure); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .rulebook-grid, .special-grid, .two-up, .contact-grid, .guide-list--home { grid-template-columns: 1fr; }
  .rulebook, .rulebook + .rulebook { padding: 24px 0; border-left: 0; }
  .rulebook + .rulebook { border-top: 1px solid var(--line); }
  .special, .special + .special { padding: 32px 0; border-left: 0; }
  .special + .special { border-top: 1px solid rgba(255, 255, 255, .15); }
  .roles-grid { grid-template-columns: 1fr; }
  .role, .role + .role { padding: 14px 0 4px; border-left: 0; }
  .role + .role { border-top: 1px solid var(--line); }
  .plan-list > li { grid-template-columns: 1fr; gap: 2px; }
  .closing-inner { grid-template-columns: 1fr; }
  .planner-form { grid-template-columns: 1fr; }
  .planner-form .btn { width: 100%; }
  .legal-facts { grid-template-columns: 1fr; gap: 2px; }
  .legal-facts dd { margin-bottom: 8px; }
  .dd-list--routes { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  body { font-size: 1rem; }
  .header-bar { min-height: 58px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-word { height: 18px; }
  .brand-tagline { font-size: .62rem; }
  .home-hero { padding: 32px 0 40px; }
  .home-lead { font-size: 1.04rem; }
  .home-ctas .btn { flex: 1 1 100%; }
  .rulebooks, .home-routes, .home-roles, .home-guides, .home-company { padding: 48px 0; }
  .doc-head { padding: 24px 0; }
  .doc-lead { font-size: 1.05rem; }
  .doc-actions .btn { width: 100%; }
  .doc-grid { padding-top: 24px; }
  .doc-grid--process .doc-section { padding-left: 0; }
  .doc-grid--process .doc-section::before { position: static; margin-bottom: 8px; }
  .brief { padding: 18px 16px; }
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
  .footer-base { flex-direction: column; }
  .table-wrap td { min-width: 8em; }
  .lang-hint .container { flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .brand-tagline { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
