/* =====================================================================
   VisChat visual layer — editorial "warm paper" design.
   Every selector starts with `html` so this file wins over the base
   stylesheet no matter which one the bundler emits last.
   Palette: warm paper + ink + one crimson accent.
   ===================================================================== */

html:root {
  --bg: #ffffff;
  --fg: #17191f;
  --muted: #5d6470;
  --line: #e9e2d8;
  --line-strong: #d6ccbe;
  --soft: #f4eee5;
  --radius: 14px;
  --radius-sm: 9px;

  --accent: #b0122c;
  --accent-ink: #7e0c1e;
  --accent-soft: #fbeef0;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Source Serif 4",
    Georgia, "Songti SC", "Noto Serif CJK SC", SimSun, serif;
  --shadow-sm: 0 1px 2px rgba(23, 25, 31, 0.05), 0 8px 20px -14px rgba(23, 25, 31, 0.2);
  --shadow-md: 0 2px 4px rgba(23, 25, 31, 0.05), 0 22px 44px -28px rgba(23, 25, 31, 0.34);
}

html {
  color-scheme: light;
}

/* ---------------------------------------------------------------- type */

html body {
  background: var(--bg);
  color: var(--fg);
  font-size: 17px;
  line-height: 1.72;
}

html h1,
html h2,
html h3,
html h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
}

html h1 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 2.9rem);
  line-height: 1.1;
  margin-bottom: 0.45em;
}

html h2 {
  font-size: clamp(1.38rem, 1.1rem + 1.1vw, 1.8rem);
  line-height: 1.2;
}

html h3 {
  font-size: 1.16rem;
}

/* CJK and Arabic read better in the UI sans */
html :lang(zh) h1,
html :lang(zh) h2,
html :lang(zh) h3,
html :lang(zh) h4,
html :lang(ar) h1,
html :lang(ar) h2,
html :lang(ar) h3,
html :lang(ar) h4,
html :lang(ja) h1,
html :lang(ja) h2,
html :lang(ja) h3 {
  font-family: var(--font);
  letter-spacing: 0;
}

html p,
html li {
  text-wrap: pretty;
}

html ::selection {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

html :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

html .lead,
html .hero p.lead {
  font-size: 1.13rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 680px;
}

html a {
  color: var(--accent-ink);
}

html a:hover {
  color: var(--accent);
}

html .muted {
  color: var(--muted);
}

html .wrap {
  padding: 0 22px;
}

html .block {
  padding: 34px 0;
}

/* -------------------------------------------------------------- header */

html .site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 32px -30px rgba(23, 25, 31, 0.75);
}

html .site-header .bar {
  height: auto;
  min-height: 66px;
}

html .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
}

html .brand span {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
}

html .brand::before {
  content: "华";
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(150deg, var(--accent) 0%, var(--accent-ink) 100%);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  transform: rotate(-2deg);
  box-shadow: 0 8px 16px -10px rgba(176, 18, 44, 0.9);
}

html .nav a {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

html .nav {
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}

/* the header is crowded: keep the star, drop the label */
html .mylist-link span {
  display: none;
}

html .mylist-link {
  font-size: 0.95rem;
}

html .nav a:hover {
  color: var(--fg);
  text-decoration: none;
}

/* the section you are on — a token, not a hard-coded colour, so it also
   works when the operating system asks for dark mode */
html .nav a.is-current {
  color: var(--fg);
  font-weight: 600;
}

html .menu-toggle,
html .lang-switch select {
  border-color: var(--line-strong);
  border-radius: 999px;
  background: var(--card);
}

/* keep the header on one line: tighter gaps and smaller action buttons */
html .site-header .bar {
  gap: 10px;
}

html .header-actions {
  gap: 8px;
}

html .header-actions .btn,
html .header-actions button,
html .header-actions .auth-btn {
  padding: 8px 13px;
  font-size: 0.86rem;
}

html .lang-switch select {
  padding: 7px 10px;
  font-size: 0.86rem;
}

@media (max-width: 1100px) {
  html .header-cta {
    display: none;
  }
}

/* very tight header widths: the shortlist star is the first thing to go */
@media (max-width: 1330px) {
  html .mylist-link {
    display: none;
  }
}

/* --------------------------------------------------- header fit ladder */
/* The nav is wider than a 1440px laptop, and a clipped first item reads as
   broken. Drop the least-used links first, in reverse order; every one of
   them is still reachable from the menu drawer and the footer. */

html .nav {
  gap: 13px;
}

@media (max-width: 1560px) {
  html .nav a:nth-child(6) {
    display: none; /* Discover China */
  }
}

@media (max-width: 1400px) {
  html .nav a:nth-child(5) {
    display: none; /* Why China */
  }
}

@media (max-width: 1250px) {
  html .nav a:nth-child(4) {
    display: none; /* Life in China */
  }
}

@media (max-width: 1150px) {
  html .nav a:nth-child(3) {
    display: none; /* Visa */
  }
}

/* ---------------------------------------------------------------- hero */

html .hero {
  position: relative;
  padding: 52px 0 30px;
}

html .hero::before {
  content: "";
  position: absolute;
  inset: -60px -60vw 30% -60vw;
  background: #ffffff;
  pointer-events: none;
  z-index: -1;
}

html .hero h1 + .lead {
  margin-top: 0.2em;
}

/* home hero: copy column + photo panel */
html .hero-home {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 36px;
  align-items: center;
  padding: 44px 0 32px;
}

html .hero-home .hero-copy {
  min-width: 0;
}

html .hero-kicker {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}

html .hero-photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--soft);
}

html .hero-photo img {
  display: block;
  width: 100%;
  height: clamp(230px, 26vw, 340px);
  object-fit: cover;
}

html .hero-facts {
  margin: 16px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

html .hero-search {
  display: flex;
  gap: 8px;
  margin: 16px 0 4px;
  max-width: 520px;
}

html .hero-search input[type='search'] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  font: inherit;
  font-size: 0.98rem;
  color: var(--fg);
  box-shadow: var(--shadow-sm);
}

html .hero-search input[type='search']:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

html .hero-search .btn {
  padding: 12px 20px;
  white-space: nowrap;
}

html .city-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

html .city-chips .chip {
  padding: 8px 16px;
  font-size: 0.95rem;
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

html .city-chips .chip:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-1px);
  text-decoration: none;
}

html .why-note {
  margin: 16px 0 0;
  padding: 12px 16px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--accent-ink);
}

@media (max-width: 900px) {
  html .hero-home {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  html .hero-photo {
    order: -1;
  }

  html .hero-photo img {
    height: 190px;
  }
}

html .header-cta {
  padding: 9px 16px;
  font-size: 0.9rem;
  box-shadow: 0 10px 20px -16px rgba(176, 18, 44, 0.9);
}

@media (max-width: 900px) {
  html .header-cta {
    display: none;
  }
}

/* phones: the brand suffix and the sign-in button need to give way */
@media (max-width: 620px) {
  html .brand span {
    display: none;
  }

  html .site-header .bar {
    gap: 8px;
  }

  html .header-actions {
    gap: 6px;
  }

  html .header-actions .btn,
  html .header-actions button,
  html .header-actions .auth-btn,
  html .auth-widget a,
  html .auth-widget button,
  html .auth-widget .btn {
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  html .lang-switch select {
    padding: 6px 8px;
    font-size: 0.78rem;
  }

  html .menu-toggle {
    padding: 7px 10px;
    font-size: 0.8rem;
  }

  html .hero-home {
    padding-top: 30px;
  }

  html .hero-photo img {
    height: 200px;
  }
}

html .hero-cta a,
html .home-start a {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--fg);
  font-size: 0.94rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

html .hero-cta a:hover,
html .home-start a:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-1px);
  text-decoration: none;
}

html .crumbs {
  font-size: 0.86rem;
  color: var(--muted);
  padding-top: 18px;
}

html .crumbs a {
  color: var(--muted);
}

html .crumbs a:hover {
  color: var(--accent);
}

/* ----------------------------------------------------- titles & labels */

html .section-title {
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

html .section-title h2 {
  margin: 0;
}

/* --------------------------------------------------------------- cards */

html .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

html .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

html .card h3 {
  margin-top: 0;
}

html .kpi.card {
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
}

html .kpi-n {
  font-family: var(--serif);
  font-size: 2.05rem;
  line-height: 1.05;
  color: var(--accent-ink);
}

html .kpi-l {
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

html .tag {
  border-color: var(--line-strong);
  color: var(--muted);
  background: var(--card);
  border-radius: 999px;
}

html .chart-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

html .chart-title {
  font-family: var(--serif);
}

html .campus-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

html .campus-card img {
  transition: transform 0.5s ease;
}

html .campus-card:hover img {
  transform: scale(1.04);
}

/* --------------------------------------------- buttons, chips, filters */

html .btn {
  border-radius: 999px;
  padding: 12px 22px;
  border: 1px solid var(--accent);
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-ink) 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 12px 24px -18px rgba(176, 18, 44, 0.95);
}

html .btn:hover {
  opacity: 1;
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}

html .btn.ghost {
  background: var(--card);
  color: var(--accent-ink);
  border-color: var(--line-strong);
  box-shadow: none;
}

html .btn.ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
}

html .chip {
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
}

html .chip.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
}

html .select,
html .filterbar input,
html .filterbar select {
  border-color: var(--line-strong);
  border-radius: 10px;
  background: var(--card);
}

html .filterbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

@media (max-width: 760px) {
  html .filterbar {
    position: relative;
    top: auto;
    z-index: auto;
    background: var(--card);
    box-shadow: none;
  }
}

/* ------------------------------------------------------- answer pages */

html .page-band {
  position: relative;
  margin: 4px 0 26px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--soft);
}

html .page-band img {
  display: block;
  width: 100%;
  height: clamp(190px, 21vw, 300px);
  object-fit: cover;
}

html .page-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 22, 26, 0) 55%, rgba(20, 22, 26, 0.24) 100%);
  pointer-events: none;
}

@media (max-width: 620px) {
  html .page-band img {
    height: 168px;
  }
}

/* the one-line answer, pulled out of the text flow */
html .answer-short {
  background: var(--card);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

html .answer-block[data-astro-cid] h2::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 10px;
  border-radius: 2px;
  background: var(--accent);
  vertical-align: 2px;
}

html .answer-block[data-astro-cid] h2,
html .answer-faq[data-astro-cid] h2 {
  margin-top: 1.7em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid var(--line);
}

html .answer-list[data-astro-cid] li {
  margin-bottom: 10px;
}

html .answer-list[data-astro-cid] li::marker {
  color: var(--accent);
}

html .answer-faq[data-astro-cid] details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

html .answer-faq[data-astro-cid] details[open] {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--card) 0%, var(--accent-soft) 170%);
}

html .answer-faq[data-astro-cid] summary {
  font-family: var(--font);
  font-weight: 600;
  list-style: none;
}

html .answer-faq[data-astro-cid] summary::-webkit-details-marker {
  display: none;
}

html .answer-faq[data-astro-cid] summary::after {
  content: "+";
  float: right;
  margin-left: 12px;
  color: var(--accent);
  font-weight: 600;
}

html .answer-faq[data-astro-cid] details[open] summary::after {
  content: "–";
}

html .answer-cta[data-astro-cid] {
  background: linear-gradient(135deg, var(--card) 0%, var(--soft) 100%);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px;
  margin: 34px 0 10px;
  box-shadow: var(--shadow-sm);
}

html .answer-cta[data-astro-cid] h2,
html .answer-cta[data-astro-cid] h3 {
  margin-top: 0;
}

html .answer-more[data-astro-cid] a {
  color: var(--accent-ink);
}

/* ------------------------------------------------------------ consult */

html .consult-note[data-astro-cid] {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

html .consult-step-n[data-astro-cid] {
  font-family: var(--serif);
  color: var(--accent);
}

/* ------------------------------------------------------------- tables */

html .compare-table-wrap {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--card);
}

html table.info {
  font-size: 0.95rem;
}

html table.info thead th,
html .dt-table thead th {
  background: var(--soft);
  font-family: var(--font);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
}

html table.info tbody tr:nth-child(even),
html .dt-table tbody tr:nth-child(even) {
  background: var(--card-2);
}

html table.info tbody tr:hover,
html .dt-table tbody tr:hover {
  background: var(--accent-soft);
}

/* ------------------------------------------------------------- footer */

html .site-footer {
  margin-top: 56px;
  background: #14161a;
  color: #cfc8bd;
  border-top: none;
}

html .site-footer h4 {
  color: #f4efe6;
  letter-spacing: 0.12em;
}

html .site-footer a {
  color: #b9b1a4;
}

html .site-footer a:hover {
  color: #fff;
}

html .site-footer .muted {
  color: #a8a094;
}

html .site-footer .disclaimer {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: #a8a094;
  font-size: 0.82rem;
  line-height: 1.6;
}

html .site-footer .disclaimer strong {
  color: #f4efe6;
}

html .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 22px;
  padding-top: 16px;
  color: #948c80;
}

/* -------------------------------------------------------- misc blocks */

/* --------------------------------------------- reading experience */

html .read-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-ink) 100%);
  pointer-events: none;
}

html .toc {
  margin: 0 0 30px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

html .toc-title {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

html .toc ol {
  margin: 0;
  padding-left: 1.1rem;
  columns: 2;
  column-gap: 28px;
}

html .toc li {
  margin: 0 0 6px;
  break-inside: avoid;
  font-size: 0.94rem;
}

html .toc a {
  color: var(--muted);
  text-decoration: none;
}

html .toc a:hover,
html .toc a.is-current {
  color: var(--accent-ink);
}

html .toc a.is-current {
  font-weight: 600;
}

@media (max-width: 700px) {
  html .toc ol {
    columns: 1;
  }
}

html .app-banner {
  background: #14161a;
  color: #f4efe6;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

html .app-banner a {
  color: #fff;
  border-bottom: 1px solid var(--accent);
}

html .uni-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--card);
}

html .uni-hero-media {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

html .uni-sources a {
  color: var(--accent-ink);
}

html .mylist-link {
  color: var(--muted);
}

html .mylist-link:hover {
  color: var(--accent);
}

html .stars-num {
  color: var(--accent-ink);
}

/* =====================================================================
   Polish pass — reading comfort for long pages, plus a header that does
   not clip when the active nav item renders bold.
   Everything here uses design tokens, so dark mode follows automatically.
   ===================================================================== */

/* The brand suffix is decorative: it is the first thing to give way when
   the bar needs room, long before any navigation item is dropped. */
@media (max-width: 1500px) {
  html .brand span {
    display: none;
  }
}

/* Long-form text was running the full content width on a laptop, which is
   tiring to read. Cap the measure, and give paragraphs a little more air. */
html .guide p,
html .guide li,
html .guide blockquote,
html .answer-block p,
html .answer-block li,
html .answer-faq p,
html .aud-steps p,
html .uni-profile p {
  max-width: 72ch;
}

html .guide p,
html .answer-block p {
  line-height: 1.78;
  margin-bottom: 1.05em;
}

html .guide ul,
html .guide ol,
html .answer-block ul,
html .answer-block ol {
  max-width: 72ch;
}

html .guide li,
html .answer-block li {
  margin-bottom: 0.45em;
  line-height: 1.7;
}

html .guide li::marker,
html .answer-block li::marker {
  color: var(--accent);
}

/* Links inside prose should be visible as links without shouting. */
html .guide a:not(.btn),
html .answer-block a:not(.btn),
html .answer-faq a:not(.btn),
html .uni-profile a:not(.btn) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
}

html .guide a:not(.btn):hover,
html .answer-block a:not(.btn):hover {
  text-decoration-thickness: 2px;
}

/* Figures and any illustration dropped into prose. */
html .guide img,
html .answer-block img {
  border-radius: var(--radius-sm);
}

html .guide figure {
  margin: 24px 0;
}

html .guide figcaption {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--muted);
}

/* Tables: roomier cells and a scroll affordance on narrow screens. */
html .compare-table-wrap,
html .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

html table.info th,
html table.info td,
html .dt-table th,
html .dt-table td {
  padding: 10px 14px;
}

html table.info td {
  color: var(--fg);
}

/* The consult box inside guides reads better as a tinted card with a spine. */
html .guide-consult {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px;
}

html .guide-updated {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 0.86rem;
}

/* FAQ rows: make the whole row feel clickable. */
html .answer-faq details {
  transition: background 0.15s ease, border-color 0.15s ease;
}

html .answer-faq details:hover {
  border-color: var(--line-strong);
}

html .answer-faq details[open] {
  border-color: var(--accent);
}

html .ans-faq summary:hover,
html .aud-faq summary:hover,
html .answer-faq summary:hover {
  color: var(--accent-ink);
}

/* The "more answers" list reads better as a two-column list on wide screens. */
@media (min-width: 900px) {
  html .answer-more {
    columns: 2;
    column-gap: 32px;
  }

  html .answer-more li {
    break-inside: avoid;
  }
}

/* --- Cost calculator: left-middle dock (overrides the component defaults) ---------------
   The widget ships bottom-right; the site keeps it on the left edge, vertically centred,
   with the panel opening to the right of the handle. Selectors start with `html` so they win
   over the scoped component styles (same convention as the rest of this file). */
html [data-cc] .cc-fab {
  left: 18px;
  right: auto;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

html [data-cc] .cc-panel {
  left: 74px;
  right: auto;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  width: min(380px, calc(100vw - 92px));
  overflow-x: hidden;
}

/* Keep the handle clear of the panel on wide screens: the panel opens to its
   right so the handle stays visible and clickable as a close target. */
@media (min-width: 521px) {
  html [data-cc] .cc-panel {
    left: 206px;
  }
}

@media (min-width: 900px) {
  html [data-cc] .cc-fab {
    right: 16px;
    left: auto;
    width: 56px;
    height: 56px;
    padding: 0;
    justify-content: center;
  }

  html [data-cc] .cc-fab-txt {
    display: none;
  }

  html [data-cc] .cc-panel {
    right: 82px;
    left: auto;
  }
}

/* Long country names used to push a native select past the panel edge and
   force a horizontal scrollbar. */
html [data-cc] .cc-cur {
  min-width: 0;
}

html [data-cc] .cc-cur label {
  flex: 0 0 auto;
}

html [data-cc] .cc-cur select {
  min-width: 96px;
  max-width: 64%;
  text-overflow: ellipsis;
}

@media (max-width: 520px) {
  html [data-cc] .cc-panel {
    left: 62px;
    width: calc(100vw - 76px);
  }
}

/* --- Cost calculator: necessary vs optional costs (2026-10-03 evening) -----------------
   The widget script moves books/one-off rows into an optional group that stays out of the
   total unless the visitor ticks the box; these rules style that group and the rate note. */
html [data-cc] .cc-group {
  margin: 10px 0 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f766e;
  letter-spacing: 0.01em;
}

html [data-cc] .cc-group-ess {
  margin-top: 4px;
}

html [data-cc] .cc-group-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
}

html [data-cc] .cc-opt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
}

html [data-cc] .cc-row-opt input {
  border-style: dashed;
}

html [data-cc] .cc-row-opt:not(.cc-row-opt-on) input {
  opacity: 0.55;
}

html [data-cc] .cc-fab-ico {
  width: auto;
  min-width: 22px;
  padding: 0 4px;
  font-size: 0.7rem;
  letter-spacing: 0;
}

html [data-cc] .cc-rate {
  margin: -2px 0 10px;
  font-size: 0.7rem;
  line-height: 1.45;
  color: #94a3b8;
}

/* Mobile navigation: primary destinations stay within thumb reach, while
   informational/secondary sections remain in a compact top strip. */
html .mobile-topnav,
html .mobile-bottom-nav,
html .mobile-compose-fab,
html .mobile-header-search {
  display: none;
}

@media (max-width: 1099px) {
  :root {
    --vc-mobile-nav-height: 64px;
  }

  body {
    padding-bottom: calc(var(--vc-mobile-nav-height) + env(safe-area-inset-bottom));
  }

  html .site-header {
    box-shadow: 0 8px 24px -22px rgba(23, 25, 31, 0.9);
  }

  html .site-header .bar {
    min-height: 56px;
    padding-block: 7px;
    padding-inline: 12px;
  }

  html .mobile-header-search {
    display: flex;
    min-width: 110px;
    max-width: 360px;
    height: 38px;
    flex: 1 1 240px;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--soft);
  }

  html .mobile-header-search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 4px 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--fg);
    font: inherit;
    font-size: 0.82rem;
  }

  html .mobile-header-search input::placeholder {
    color: var(--muted);
  }

  html .mobile-header-search button {
    display: inline-grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
  }

  html .mobile-header-search svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
  }

  html .mobile-topnav {
    display: block;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--header-bg) 94%, transparent);
  }

  html .mobile-topnav-track {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding: 0 12px;
    -webkit-overflow-scrolling: touch;
  }

  html .mobile-topnav-track::-webkit-scrollbar {
    display: none;
  }

  html .mobile-topnav a {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 40px;
    padding: 9px 10px 10px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
  }

  html .mobile-topnav a::after {
    content: "";
    position: absolute;
    right: 19%;
    bottom: 2px;
    left: 19%;
    height: 2px;
    border-radius: 99px;
    background: transparent;
  }

  html .mobile-topnav a.is-current {
    color: var(--accent);
    font-weight: 700;
  }

  html .mobile-topnav a.is-current::after {
    background: var(--accent);
  }

  html .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 82;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(var(--vc-mobile-nav-height) + env(safe-area-inset-bottom));
    padding: 5px 6px max(5px, env(safe-area-inset-bottom));
    border-top: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    background: color-mix(in srgb, var(--header-bg) 96%, transparent);
    box-shadow: 0 -12px 30px -24px rgba(15, 23, 42, 0.55);
    backdrop-filter: saturate(180%) blur(18px);
  }

  html .mobile-bottom-nav a {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
  }

  html .mobile-bottom-nav a:hover {
    color: var(--fg);
    text-decoration: none;
  }

  html .mobile-bottom-nav a.is-current {
    color: var(--accent);
  }

  html .mobile-nav-icon {
    display: inline-flex;
    width: 34px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
  }

  html .mobile-nav-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  html .mobile-bottom-nav a.is-current .mobile-nav-icon {
    background: var(--accent-soft);
  }

  html .mobile-compose-fab {
    position: fixed;
    right: 16px;
    bottom: calc(var(--vc-mobile-nav-height) + env(safe-area-inset-bottom) + 16px);
    z-index: 83;
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 12px 26px -12px rgba(176, 18, 44, 0.95);
  }

  html .mobile-compose-fab:hover {
    color: #fff;
    background: var(--accent-ink);
    text-decoration: none;
    transform: translateY(-1px);
  }

  html .mobile-compose-fab svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }

  html .app-banner {
    display: none;
  }

  html .cookie-banner {
    bottom: calc(var(--vc-mobile-nav-height) + env(safe-area-inset-bottom) + 10px);
  }

  body:has(.app-banner:not([hidden])) .cookie-banner {
    bottom: calc(var(--vc-mobile-nav-height) + env(safe-area-inset-bottom) + 68px);
  }

  html [data-cc] .cc-fab {
    top: auto;
    right: auto;
    bottom: calc(var(--vc-mobile-nav-height) + env(safe-area-inset-bottom) + 10px);
    left: 12px;
    transform: none;
  }

  html [data-cc] .cc-panel {
    top: auto;
    right: 12px;
    bottom: calc(var(--vc-mobile-nav-height) + env(safe-area-inset-bottom) + 70px);
    left: 12px;
    width: auto;
    max-height: min(58vh, 560px);
    transform: none;
  }
}

@media (max-width: 620px) {
  html .auth-widget {
    display: none;
  }
}

@media (max-width: 380px) {
  html .mobile-bottom-nav a {
    font-size: 0.62rem;
  }

  html .mobile-nav-icon {
    width: 31px;
  }
}
