/* ChinaTravel.fly — page-type layer for subpages
   Consumes the same --site-* root tokens as site.css so Nudge keeps working here. */

/* ── subpage hero band ─────────────────────────────────────── */
.subhero {
  position: relative;
  min-height: calc(480px * var(--site-space));
  display: flex;
  align-items: flex-end;
  padding: calc(150px * var(--site-space)) 0 calc(56px * var(--site-space));
  overflow: hidden;
  isolation: isolate;
}
.subhero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
}
.subhero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6, 7, 11, .82) 0%, rgba(6, 7, 11, .42) 46%, var(--site-bg) 100%),
    radial-gradient(120% 80% at 12% 100%, rgba(232, 68, 42, .16), transparent 60%);
}
.subhero .wrap { width: min(1320px, 92vw); }

/* ink hero for pages with no honest photograph */
.subhero.is-ink {
  background:
    radial-gradient(90% 120% at 8% 0%, rgba(232, 68, 42, .10), transparent 55%),
    linear-gradient(165deg, #0b0e15 0%, #06070b 62%);
}
.subhero.is-ink::after {
  background: linear-gradient(180deg, rgba(6, 7, 11, .2) 0%, transparent 40%, var(--site-bg) 100%);
}
.subhero-glyph {
  position: absolute;
  right: -3vw;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-cjk);
  font-size: clamp(200px, 34vw, 500px);
  line-height: .78;
  color: color-mix(in srgb, var(--site-fg) 5%, transparent);
  z-index: -1;
  pointer-events: none;
  user-select: none;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: calc(10px * var(--site-space));
  align-items: center;
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: calc(11px * var(--site-type));
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--site-muted);
  margin-bottom: calc(22px * var(--site-space));
}
.crumbs a { color: var(--site-muted); text-decoration: none; transition: color var(--t-fast, 180ms) ease; }
.crumbs a:hover { color: var(--site-accent); }
.crumbs i { font-style: normal; opacity: .45; }
.crumbs b { color: var(--site-fg); font-weight: 500; }

.subhero h1 {
  font-family: var(--font-display, "Bodoni Moda", serif);
  font-weight: 500;
  font-size: calc(clamp(46px, 7.2vw, 104px) * var(--site-type));
  line-height: .96;
  letter-spacing: -.025em;
  margin: 0 0 calc(18px * var(--site-space));
}
.subhero .lede {
  max-width: 62ch;
  font-size: calc(17px * var(--site-type));
  line-height: 1.62;
  color: color-mix(in srgb, var(--site-fg) 82%, transparent);
}
.subhero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: calc(26px * var(--site-space));
  margin-top: calc(30px * var(--site-space));
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: calc(11px * var(--site-type));
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--site-muted);
}
.subhero-meta b { color: var(--site-accent); font-weight: 500; }

/* ── quick facts rail ──────────────────────────────────────── */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--site-border);
  border-block: 1px solid var(--site-border);
}
.facts > div {
  flex: 1 1 210px;
  background: var(--site-surface);
  padding: calc(24px * var(--site-space)) calc(22px * var(--site-space));
}
.facts dt {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: calc(10px * var(--site-type));
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--site-muted);
  margin-bottom: calc(9px * var(--site-space));
}
.facts dd { margin: 0; font-size: calc(16px * var(--site-type)); font-weight: 600; letter-spacing: -.01em; }
.facts dd small { display: block; margin-top: 5px; font-weight: 400; color: var(--site-muted); font-size: calc(13px * var(--site-type)); }

/* ── hub: city grid ────────────────────────────────────────── */
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: calc(22px * var(--site-space));
}
.city-grid.is-compact { grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); }
.city {
  position: relative;
  display: block;
  border-radius: var(--site-radius);
  overflow: hidden;
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  text-decoration: none;
  color: inherit;
  isolation: isolate;
}
.city-img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform calc(760ms * var(--site-motion)) cubic-bezier(.2, .8, .2, 1);
}
.city::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 7, 11, .05) 34%, rgba(6, 7, 11, .9) 100%);
  z-index: 1;
}
.city:hover .city-img,
.city:focus-visible .city-img { transform: scale(1.09); }
.city-body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: calc(20px * var(--site-space));
}
.city-body h3 {
  font-family: var(--font-display, "Bodoni Moda", serif);
  font-size: calc(29px * var(--site-type));
  font-weight: 500;
  letter-spacing: -.015em;
  margin: 0 0 calc(4px * var(--site-space));
  display: flex;
  align-items: baseline;
  gap: calc(9px * var(--site-space));
}
.city-body h3 em { font-family: var(--font-cjk); font-size: .5em; color: var(--site-accent); font-weight: 400; font-style: normal; }
.city-body p { margin: 0; font-size: calc(14px * var(--site-type)); line-height: 1.55; color: color-mix(in srgb, var(--site-fg) 78%, transparent); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.city-tag {
  position: absolute;
  top: calc(16px * var(--site-space));
  left: calc(16px * var(--site-space));
  z-index: 2;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(6, 7, 11, .62);
  backdrop-filter: blur(6px);
  border: 1px solid var(--site-border);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: calc(10px * var(--site-type));
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--site-fg);
}
.city-win {
  position: absolute;
  top: calc(16px * var(--site-space));
  right: calc(16px * var(--site-space));
  z-index: 2;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: calc(10px * var(--site-type));
  letter-spacing: .1em;
  color: var(--gold, #d9a441);
  background: rgba(6, 7, 11, .55);
  padding: 5px 9px;
  border-radius: 6px;
}
.city.is-out { display: none; }

/* ── detail: sticky rail + prose columns ───────────────────── */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(320px * var(--site-space));
  gap: calc(56px * var(--site-space));
  align-items: start;
}
.cols > aside { position: sticky; top: calc(110px * var(--site-space)); }
@media (max-width: 980px) {
  .cols { grid-template-columns: 1fr; gap: calc(34px * var(--site-space)); }
  .cols > aside { position: static; }
}

.railbox {
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: var(--site-surface);
  padding: calc(24px * var(--site-space));
}
.railbox + .railbox { margin-top: calc(18px * var(--site-space)); }
.railbox h4 {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: calc(10px * var(--site-type));
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--site-muted);
  margin: 0 0 calc(16px * var(--site-space));
  padding-bottom: calc(12px * var(--site-space));
  border-bottom: 1px solid var(--site-border);
}
.railbox ol, .railbox ul { margin: 0; padding: 0; list-style: none; }
.railbox li {
  display: flex;
  justify-content: space-between;
  gap: calc(14px * var(--site-space));
  padding: calc(9px * var(--site-space)) 0;
  font-size: calc(14px * var(--site-type));
  border-bottom: 1px dashed color-mix(in srgb, var(--site-border) 70%, transparent);
}
.railbox li:last-child { border-bottom: 0; }
.railbox li b { font-weight: 600; text-align: left; }
.railbox li span { color: var(--site-muted); font-family: var(--font-mono, monospace); font-size: calc(12px * var(--site-type)); white-space: nowrap; }

/* sight rows */
.sights { display: grid; gap: calc(26px * var(--site-space)); }
.sight {
  display: grid;
  grid-template-columns: calc(190px * var(--site-space)) minmax(0, 1fr);
  gap: calc(24px * var(--site-space));
  align-items: center;
  padding-bottom: calc(26px * var(--site-space));
  border-bottom: 1px solid var(--site-border);
}
.sight:last-child { border-bottom: 0; }
.sight img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--site-radius) * .7);
  display: block;
}
.sight-no {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: calc(11px * var(--site-type));
  letter-spacing: .18em;
  color: var(--site-accent);
}
.sight h3 {
  font-family: var(--font-display, "Bodoni Moda", serif);
  font-size: calc(27px * var(--site-type));
  font-weight: 500;
  margin: calc(5px * var(--site-space)) 0 calc(8px * var(--site-space));
  letter-spacing: -.015em;
}
.sight h3 span { font-family: var(--font-cjk); font-size: .52em; color: var(--site-muted); margin-left: calc(8px * var(--site-space)); }
.sight p { margin: 0; font-size: calc(15px * var(--site-type)); line-height: 1.66; color: color-mix(in srgb, var(--site-fg) 80%, transparent); }
.sight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: calc(16px * var(--site-space));
  margin-top: calc(11px * var(--site-space));
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: calc(11px * var(--site-type));
  letter-spacing: .1em;
  color: var(--site-muted);
}
.sight-meta em { font-style: normal; color: var(--gold, #d9a441); }
@media (max-width: 700px) { .sight { grid-template-columns: 1fr; } }

/* day plan */
.dayplan { display: grid; gap: calc(20px * var(--site-space)); counter-reset: day; }
.day {
  display: grid;
  grid-template-columns: calc(78px * var(--site-space)) minmax(0, 1fr);
  gap: calc(22px * var(--site-space));
  padding: calc(20px * var(--site-space)) calc(22px * var(--site-space));
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: color-mix(in srgb, var(--site-surface) 70%, transparent);
}
.day-time {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: calc(12px * var(--site-type));
  letter-spacing: .08em;
  color: var(--site-accent);
  padding-top: 3px;
}
.day h4 { font-size: calc(17px * var(--site-type)); margin: 0 0 calc(6px * var(--site-space)); font-weight: 600; }
.day p { margin: 0; font-size: calc(14.5px * var(--site-type)); line-height: 1.62; color: color-mix(in srgb, var(--site-fg) 78%, transparent); }

/* ── article typography ────────────────────────────────────── */
.art { max-width: calc(720px * var(--site-type)); margin: 0 auto; }
.art-head { text-align: center; padding-bottom: calc(40px * var(--site-space)); }
.art-head h1 {
  font-family: var(--font-display, "Bodoni Moda", serif);
  font-weight: 500;
  font-size: calc(clamp(38px, 5.4vw, 72px) * var(--site-type));
  line-height: 1.02;
  letter-spacing: -.022em;
  margin: calc(20px * var(--site-space)) 0;
}
.byline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(14px * var(--site-space));
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: calc(11px * var(--site-type));
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--site-muted);
}
.byline b { color: var(--site-fg); font-weight: 500; }
.art-cover { margin: calc(34px * var(--site-space)) 0 calc(48px * var(--site-space)); }
.art-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--site-radius); display: block; }
.art-cover figcaption {
  margin-top: calc(11px * var(--site-space));
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: calc(11.5px * var(--site-type));
  letter-spacing: .06em;
  color: var(--site-muted);
}

.art-body { font-size: calc(17.5px * var(--site-type)); line-height: 1.78; }
.art-body > p { margin: 0 0 calc(24px * var(--site-space)); }
.art-body > p:first-of-type::first-letter {
  font-family: var(--font-display, "Bodoni Moda", serif);
  float: left;
  font-size: 3.5em;
  line-height: .82;
  padding: calc(6px * var(--site-space)) calc(12px * var(--site-space)) 0 0;
  color: var(--site-accent);
}
.art-body h2 {
  font-family: var(--font-display, "Bodoni Moda", serif);
  font-weight: 500;
  font-size: calc(33px * var(--site-type));
  letter-spacing: -.018em;
  margin: calc(46px * var(--site-space)) 0 calc(18px * var(--site-space));
  padding-top: calc(22px * var(--site-space));
  border-top: 1px solid var(--site-border);
}
.art-body h3 { font-size: calc(20px * var(--site-type)); font-weight: 600; margin: calc(32px * var(--site-space)) 0 calc(12px * var(--site-space)); }
.art-body a { color: var(--site-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.art-body ul { margin: 0 0 calc(24px * var(--site-space)); padding-left: calc(20px * var(--site-space)); }
.art-body li { margin-bottom: calc(9px * var(--site-space)); }
.art-body strong { font-weight: 700; }

.pull {
  margin: calc(42px * var(--site-space)) 0;
  padding: calc(6px * var(--site-space)) 0 calc(6px * var(--site-space)) calc(26px * var(--site-space));
  border-left: 2px solid var(--site-accent);
  font-family: var(--font-display, "Bodoni Moda", serif);
  font-style: italic;
  font-size: calc(25px * var(--site-type));
  line-height: 1.4;
  letter-spacing: -.012em;
  color: color-mix(in srgb, var(--site-fg) 92%, transparent);
}
.pull cite {
  display: block;
  margin-top: calc(14px * var(--site-space));
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-style: normal;
  font-size: calc(11px * var(--site-type));
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--site-muted);
}

.art-fig { margin: calc(40px * var(--site-space)) calc(-56px * var(--site-space)); }
.art-fig img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--site-radius); display: block; }
.art-fig figcaption {
  margin-top: calc(10px * var(--site-space));
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: calc(11.5px * var(--site-type));
  color: var(--site-muted);
  letter-spacing: .05em;
}
@media (max-width: 900px) { .art-fig { margin-inline: 0; } }

.notebox {
  margin: calc(40px * var(--site-space)) 0;
  padding: calc(26px * var(--site-space));
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: linear-gradient(150deg, color-mix(in srgb, var(--site-accent) 9%, var(--site-surface)), var(--site-surface));
}
.notebox h4 {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: calc(10px * var(--site-type));
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--site-accent);
  margin: 0 0 calc(15px * var(--site-space));
}
.notebox p { margin: 0 0 calc(11px * var(--site-space)); font-size: calc(15px * var(--site-type)); line-height: 1.62; }
.notebox p:last-child { margin: 0; }

/* ── subpage section band ──────────────────────────────────── */
.band { padding-block: var(--pad); position: relative; }
.band-alt { background: #070a0f; }
.band-tight { padding-block: calc(56px * var(--site-space)); }

/* portrait figure inside an article column */
.art-fig.is-tall img { aspect-ratio: 4 / 5; max-width: calc(520px * var(--site-space)); margin-inline: auto; }
@media (max-width: 900px) { .art-fig.is-tall img { max-width: 100%; } }

.nextlinks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--site-border);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  overflow: hidden;
}
.nextlinks a {
  display: block;
  padding: calc(24px * var(--site-space));
  background: var(--site-surface);
  text-decoration: none;
  color: inherit;
  transition: background calc(280ms * var(--site-motion)) ease;
}
.nextlinks a:hover { background: color-mix(in srgb, var(--site-accent) 12%, var(--site-surface)); }
.nextlinks small {
  display: block;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: calc(10px * var(--site-type));
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--site-muted);
  margin-bottom: calc(8px * var(--site-space));
}
.nextlinks b { font-family: var(--font-display, "Bodoni Moda", serif); font-size: calc(21px * var(--site-type)); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .city-img { transition: none; }
  .subhero-bg { transform: none; }
}

/* cards without photography */
.city-glyph {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  font-family: var(--font-cjk);
  font-size: clamp(64px, 7vw, 110px);
  line-height: 1;
  color: color-mix(in srgb, var(--site-fg) 10%, transparent);
  background:
    radial-gradient(110% 90% at 78% 10%, rgba(232, 68, 42, .14), transparent 60%),
    linear-gradient(160deg, #0c1017, #07090e);
}

/* ── three-up photo strip ──────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(14px * var(--site-space));
  margin: calc(8px * var(--site-space)) 0 calc(48px * var(--site-space));
}
.gallery figure { margin: 0; overflow: hidden; }
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: calc(var(--site-radius) * .8);
  display: block;
}
.gallery figcaption {
  margin-top: calc(10px * var(--site-space));
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: calc(10px * var(--site-type));
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--site-muted);
  line-height: 1.5;
}
@media (max-width: 720px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure:last-child { grid-column: 1 / -1; }
  .gallery figure:last-child img { aspect-ratio: 16 / 9; }
}

/* ── sight row without a photograph ────────────────────────── */
.sight.is-type .sight-glyph {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: calc(var(--site-radius) * .7);
  border: 1px solid var(--site-border);
  background:
    radial-gradient(120% 90% at 72% 12%, rgba(232, 68, 42, .16), transparent 62%),
    linear-gradient(158deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, 0));
  font-family: var(--font-cjk);
  font-size: calc(clamp(54px, 7vw, 86px) * var(--site-type));
  line-height: 1;
  color: color-mix(in srgb, var(--site-fg) 24%, transparent);
  user-select: none;
}

/* ── in-page table of contents ─────────────────────────────── */
.toc {
  margin: calc(36px * var(--site-space)) auto calc(20px * var(--site-space));
  max-width: calc(740px * var(--site-space));
  padding: calc(24px * var(--site-space)) calc(26px * var(--site-space));
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: rgba(255, 255, 255, .025);
}
.toc .eyebrow { margin: 0 0 calc(14px * var(--site-space)); }
.toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
  display: grid;
  gap: calc(9px * var(--site-space));
}
.toc li { counter-increment: toc; font-size: calc(15.5px * var(--site-type)); display: flex; align-items: baseline; }
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: .72em;
  color: var(--site-accent);
  margin-right: calc(12px * var(--site-space));
  flex: none;
}
.toc a { color: var(--site-fg); text-decoration: none; transition: color var(--t-fast, 180ms) ease; }
.toc a:hover { color: var(--site-accent); }

/* ── FAQ ───────────────────────────────────────────────────── */
.faq {
  margin-top: calc(64px * var(--site-space));
  padding-top: calc(38px * var(--site-space));
  border-top: 1px solid var(--site-border);
  max-width: calc(860px * var(--site-space));
}
.faq h2 {
  font-family: var(--font-display, "Bodoni Moda", serif);
  font-weight: 500;
  font-size: calc(clamp(28px, 3.4vw, 40px) * var(--site-type));
  letter-spacing: -.02em;
  margin: 0 0 calc(26px * var(--site-space));
}
.faq dl > div {
  padding: calc(18px * var(--site-space)) 0;
  border-bottom: 1px solid var(--site-border);
}
.faq dt { font-weight: 600; font-size: calc(17px * var(--site-type)); }
.faq dd {
  margin: calc(8px * var(--site-space)) 0 0;
  font-size: calc(15.5px * var(--site-type));
  line-height: 1.72;
  color: color-mix(in srgb, var(--site-fg) 78%, transparent);
  max-width: 78ch;
}

/* ── data table for comparison pages ───────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: calc(30px * var(--site-space)) 0;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
}
.table-wrap table { width: 100%; border-collapse: collapse; font-size: calc(14.5px * var(--site-type)); }
.table-wrap th,
.table-wrap td { text-align: left; padding: calc(13px * var(--site-space)) calc(16px * var(--site-space)); border-bottom: 1px solid var(--site-border); vertical-align: top; }
.table-wrap th {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-weight: 500;
  font-size: .72em;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--site-muted);
  white-space: nowrap;
}
.table-wrap tr:last-child td { border-bottom: 0; }

/* ── article lead paragraph ────────────────────────────────── */
.art-body > p.art-lead {
  font-family: var(--font-display, "Bodoni Moda", serif);
  font-size: calc(clamp(21px, 2.4vw, 27px) * var(--site-type));
  line-height: 1.5;
  letter-spacing: -.01em;
  color: var(--site-fg);
  margin-bottom: calc(30px * var(--site-space));
}
.art-body > p.art-lead::first-letter { all: unset; }

@media (max-width: 720px) {
  .sight.is-type { grid-template-columns: calc(110px * var(--site-space)) minmax(0, 1fr); }
  .sight.is-type .sight-glyph { font-size: calc(40px * var(--site-type)); }
  .faq { margin-top: calc(44px * var(--site-space)); }
}
