:root {
  --ink: #17202a;
  --muted: #5f6975;
  --paper: #fbfaf6;
  --white: #ffffff;
  --line: #dfddd5;
  --red: #b7352a;
  --jade: #2e7d6b;
  --gold: #c28a28;
  --blue: #2f5f8f;
  --charcoal: #24272b;
  --shadow: 0 18px 55px rgba(23, 32, 42, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(23, 32, 42, 0.86);
  color: var(--white);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  gap: 10px;
  font-weight: 800;
  min-width: 0;
  text-decoration: none;
  white-space: nowrap;
}

.brand-group {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: var(--red);
  font-weight: 900;
}

.page-switch {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 20px;
  font-size: 0.92rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--white);
}

.hero {
  position: relative;
  min-height: 84vh;
  display: grid;
  align-items: end;
  padding: clamp(80px, 10vw, 138px) clamp(18px, 5vw, 74px) 34px;
  overflow: hidden;
  color: var(--white);
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("./assets/beijing-hero.jpg");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(14, 17, 22, 0.78) 0%, rgba(14, 17, 22, 0.52) 46%, rgba(14, 17, 22, 0.2) 100%),
    linear-gradient(0deg, rgba(14, 17, 22, 0.86) 0%, rgba(14, 17, 22, 0.12) 44%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(790px, 100%);
}

.kicker {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .kicker {
  color: #f3c36d;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 7.4rem;
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy {
  width: min(690px, 100%);
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.18rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  text-decoration: none;
  font-weight: 800;
}

.button.primary {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.arrival-panel {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(690px, 100%);
  margin-top: 62px;
  background: rgba(255, 255, 255, 0.26);
  box-shadow: var(--shadow);
}

.arrival-panel > div {
  padding: 16px;
  background: rgba(23, 32, 42, 0.7);
}

.label,
.arrival-panel span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.arrival-panel strong {
  display: block;
  margin-top: 4px;
  color: var(--white);
  font-size: 1.28rem;
}

.quick-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.quick-strip article {
  min-height: 150px;
  padding: 24px clamp(18px, 3vw, 34px);
  background: var(--white);
}

.quick-strip p {
  margin: 12px 0 0;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 900;
}

.red {
  background: var(--red);
}

.jade {
  background: var(--jade);
}

.gold {
  background: var(--gold);
}

.blue {
  background: var(--blue);
}

.section {
  padding: clamp(58px, 8vw, 104px) clamp(18px, 5vw, 74px);
}

.section-heading {
  width: min(860px, 100%);
  margin-bottom: 32px;
}

.section-heading.split {
  width: 100%;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

h2 {
  margin: 0;
  font-size: 4.1rem;
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  line-height: 1.15;
}

.section-heading p:not(.kicker) {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.planning-grid,
.practical-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.info-block,
.practical-grid article {
  padding: 26px;
  background: var(--white);
}

ul {
  margin: 14px 0 0;
  padding-left: 19px;
  color: var(--muted);
}

li + li {
  margin-top: 9px;
}

.transport-band {
  background: var(--charcoal);
  color: var(--white);
}

.transport-band .kicker {
  color: #f3c36d;
}

.transport-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.transport-grid article {
  padding: 30px;
  background: rgba(255, 255, 255, 0.07);
}

.transport-grid p,
.transport-band .section-heading p {
  color: rgba(255, 255, 255, 0.72);
}

.route-code {
  display: inline-grid;
  min-width: 54px;
  min-height: 34px;
  place-items: center;
  margin-bottom: 18px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 900;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  background: var(--white);
}

.segment {
  min-height: 36px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.segment.active {
  background: var(--ink);
  color: var(--white);
}

.route-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.route-card {
  min-height: 250px;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(23, 32, 42, 0.06);
}

.route-card.is-hidden {
  display: none;
}

.day {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--red);
  font-weight: 900;
  text-transform: uppercase;
}

.route-card p,
.place-card p,
.food-columns p,
.practical-grid p {
  color: var(--muted);
}

.visual-section {
  background: #eef1ed;
}

.place-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.place-card {
  min-width: 0;
  border: 1px solid rgba(23, 32, 42, 0.12);
  background: var(--white);
}

.place-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #d7d3c7;
}

.place-card div {
  padding: 22px;
}

.food-layout {
  background: var(--white);
}

.food-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.food-columns article {
  padding: 28px;
  background: var(--paper);
}

.tools-section {
  background: #f0f3f6;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr 1.15fr;
  gap: 20px;
}

.tool-block {
  padding: 26px;
  border: 1px solid rgba(23, 32, 42, 0.12);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(23, 32, 42, 0.06);
}

.tool-block label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  color: var(--muted);
}

input,
select {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  margin: 3px 0 0;
  accent-color: var(--jade);
  flex: 0 0 auto;
}

input[type="range"] {
  accent-color: var(--red);
}

.progress-text {
  margin: 18px 0 0;
  font-weight: 900;
  color: var(--jade);
}

.budget-result {
  display: grid;
  gap: 6px;
  margin-top: 20px;
  padding: 18px;
  background: var(--ink);
  color: var(--white);
}

.budget-result strong {
  font-size: 1.8rem;
}

.budget-result small {
  color: rgba(255, 255, 255, 0.68);
}

.phrase-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.phrase-list p {
  margin: 0;
  padding: 12px;
  border-left: 4px solid var(--gold);
  background: var(--paper);
}

.phrase-list strong,
.phrase-list span {
  display: block;
}

.phrase-list strong {
  font-size: 1.08rem;
}

.phrase-list span {
  margin-top: 4px;
  color: var(--muted);
}

.phrase-list p.is-hidden {
  display: none;
}

.practical {
  background: var(--paper);
}

.sources {
  padding-top: 46px;
  background: var(--ink);
  color: var(--white);
}

.sources .kicker {
  color: #f3c36d;
}

.sources .section-heading p {
  color: rgba(255, 255, 255, 0.7);
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.source-links a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  text-decoration: none;
}

.source-links a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 74px);
  background: #11161d;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--white);
  font-weight: 800;
}

@media (max-width: 1100px) {
  h1 {
    font-size: 5.2rem;
  }

  h2 {
    font-size: 3.2rem;
  }

  .planning-grid,
  .quick-strip,
  .route-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tools-grid {
    grid-template-columns: 1fr 1fr;
  }

  .phrases {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    min-height: 78vh;
    padding-top: 74px;
  }

  .arrival-panel,
  .quick-strip,
  .planning-grid,
  .transport-grid,
  .place-grid,
  .food-columns,
  .tools-grid,
  .practical-grid {
    grid-template-columns: 1fr;
  }

  .section-heading.split {
    align-items: flex-start;
    flex-direction: column;
  }

  .route-list {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand-group {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  h1 {
    font-size: 3.2rem;
  }

  .page-switch {
    min-height: 32px;
    padding: 5px 8px;
  }

  .hero-actions,
  .source-links {
    flex-direction: column;
  }

  .button,
  .source-links a {
    width: 100%;
  }

  .section,
  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }
}
