/* Warm, sunlit design system shared by every city directory in sites/ (one stylesheet, per-site accents).
   Self-hosted assets and local fonts only: zero external origins. */
:root {
  --ink: #1f1a17;
  --muted: #5d534b;
  --paper: #fffcf7;
  --surface: #ffffff;
  --warm-panel: #f7efe4;
  --accent: #c2411f;
  --accent-soft: #fdf0ec;
  --on-accent: #ffffff;
  --rule: #ece3d7;
  --shadow-soft: 0 10px 30px rgba(38, 25, 14, 0.06);
  --shadow-hover: 0 16px 36px rgba(38, 25, 14, 0.1);
  --font-display: ui-rounded, "SF Pro Rounded", "SF Pro Display", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-h2: 1.55rem;
  --text-body: 1.03125rem;
  --text-sm: 0.875rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5efe8;
    --muted: #b5a99d;
    --paper: #161311;
    --surface: #201c19;
    --warm-panel: #27221d;
    --accent: #f07b5c;
    --accent-soft: #2e221e;
    --on-accent: #161311;
    --rule: #352e28;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.28);
    --shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.42);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
img, svg { max-width: 100%; height: auto; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 70rem;
  margin: 0 auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.narrow { max-width: 45rem; margin-inline: auto; }

/* Light, airy navigation bar */
.site-header {
  position: relative;
  z-index: 40;
  padding-block: 1.25rem;
  background: var(--paper);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  min-width: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-mark {
  display: block;
  color: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  transition: color 180ms var(--ease), background-color 180ms var(--ease);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  background-color: var(--accent-soft);
}

/* Mobile menu: native <details>, hidden on desktop */
.nav-menu { display: none; }
.nav-menu > summary {
  list-style: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -0.4rem;
  border-radius: 12px;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary:hover,
.nav-menu[open] > summary {
  background-color: var(--accent-soft);
  color: var(--accent);
}
.nav-menu > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.nav-menu .icon-close,
.nav-menu[open] .icon-menu { display: none; }
.nav-menu[open] .icon-close { display: block; }
.nav-panel {
  position: absolute;
  top: calc(100% - 0.35rem);
  inset-inline: clamp(0.75rem, 3vw, 1.25rem);
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 18px;
  box-shadow: var(--shadow-hover);
  animation: nav-drop 180ms var(--ease);
}
@keyframes nav-drop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.nav-panel-links,
.nav-panel-quick {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-panel a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.5rem 0.9rem;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.nav-panel a:hover { background-color: var(--warm-panel); }
.nav-panel a[aria-current="page"] {
  color: var(--accent);
  background-color: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav-panel-links + .nav-panel-quick {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--rule);
}
.nav-panel-quick a {
  min-height: 44px;
  color: var(--muted);
  font-size: var(--text-sm);
}

@media (max-width: 680px) {
  .site-header { padding-block: 0.6rem; }
  .header-inner { gap: 0.75rem; }
  .brand { font-size: 1.2rem; gap: 0.5rem; }
  .site-nav { display: none; }
  .nav-menu { display: block; flex-shrink: 0; }
}

/* Sunlit Homepage Hero */
.hero-sunlit {
  padding-block: clamp(1.75rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
}
.hero-copy {
  max-width: 44rem;
  margin: 0 auto 2.25rem;
  text-align: center;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 5.4vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 1rem;
  color: var(--ink);
}
.hero-lead {
  font-size: var(--text-body);
  color: var(--muted);
  margin: 0 auto 1.75rem;
  max-width: 50ch;
}

/* Instant Hero Search Bar */
.hero-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 34rem;
  margin: 0 auto;
  padding: 0.45rem 0.45rem 0.45rem 1.1rem;
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.hero-search:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}
.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--text-sm);
  outline: none;
}
.hero-search button {
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 650;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms var(--ease), filter 180ms var(--ease);
}
.hero-search button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}
.quick-links {
  margin: 0.95rem 0 0;
  font-size: var(--text-sm);
  color: var(--muted);
}
.quick-links span { margin-right: 0.25rem; }
.quick-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 550;
}
.quick-links a:hover { color: var(--accent); text-decoration: underline; }

/* Bright, Un-dimmed Framed Saigon Photo */
.hero-photo-wrap {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--rule);
  aspect-ratio: 21 / 9;
  background: var(--warm-panel);
}
@media (max-width: 700px) {
  .hero-photo-wrap { aspect-ratio: 16 / 10; border-radius: 18px; }
}
.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  display: block;
}

/* Inner Page Intro */
.page-intro {
  padding-block: 1.75rem 0.75rem;
}
.page-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 0.65rem;
}
.jump-link { margin: 0.85rem 0 0; font-size: var(--text-sm); font-weight: 650; }
.jump-link a { color: var(--accent); text-decoration: none; }
.jump-link a:hover { text-decoration: underline; }
#providers { scroll-margin-top: 1rem; }
.intro-lead {
  color: var(--muted);
  max-width: 58ch;
  margin: 0;
}
.intro-body { margin-top: 0.85rem; }
.intro-body p { color: var(--muted); max-width: 62ch; margin: 0 0 0.6rem; }
.breadcrumb {
  font-size: var(--text-sm);
  color: var(--muted);
  margin: 0 0 0.65rem;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }

/* Sections & Typography (Strict 3-size body discipline) */
.section { padding-block: clamp(2rem, 4.5vw, 3.25rem); }
.section-head { margin-bottom: 1.5rem; max-width: 44rem; }
.section-head p { color: var(--muted); margin: 0.35rem 0 0; }

h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}
h3 {
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 720;
  line-height: 1.3;
  margin: 0;
}
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1.25rem; padding-left: 1.35rem; font-size: var(--text-body); }
li { margin-bottom: 0.45rem; }
a { color: var(--accent); text-underline-offset: 0.2em; }
.prose h2 { margin-top: 2.25rem; }
.prose p, .prose li { max-width: 65ch; }
.checked { color: var(--muted); font-size: var(--text-sm); margin-top: 2rem; }
/* "Checked <date> · Checked by … · How we check →": one calm line that wraps cleanly on phones. */
.checked-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0;
  max-width: 100%;
  margin: 2rem 0 1rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 0.6rem;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.prose .checked-strip { max-width: 65ch; }
.checked-strip .checked-item { min-width: 0; }
.checked-strip a.checked-item { font-weight: 600; text-decoration: none; white-space: nowrap; }
.checked-strip a.checked-item:hover,
.checked-strip a.checked-item:focus-visible { text-decoration: underline; }
.checked-strip time { color: var(--ink); font-variant-numeric: tabular-nums; }
.checked-sep { white-space: pre; }
.provider-body .checked-strip { margin: 1.25rem 0 0; }

/* Bento Category Showcase */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 960px) {
  .bento-grid, .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .bento-grid, .cat-grid { grid-template-columns: 1fr; }
}
.cat-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 1.35rem;
  box-shadow: var(--shadow-soft);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}
.cat-featured {
  grid-column: span 2;
  background: var(--accent-soft);
  border-color: var(--rule);
  padding: 1.65rem;
}
@media (max-width: 600px) {
  .cat-featured { grid-column: span 1; }
}
.cat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}
.icon-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.cat-featured .icon-bubble {
  background: var(--surface);
  width: 3rem;
  height: 3rem;
}
.cat-card:hover .icon-bubble {
  background: var(--accent);
  color: var(--on-accent);
}
.cat-meta {
  font-size: var(--text-sm);
  color: var(--muted);
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.cat-card p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Warm Guides Panel */
.warm-panel {
  background: var(--warm-panel);
  border-radius: 24px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  gap: 1.75rem 3rem;
  align-items: start;
}
@media (max-width: 780px) {
  .warm-panel { grid-template-columns: 1fr; }
}
.panel-lead p { color: var(--muted); margin: 0; }
.guide-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.guide-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.15rem 1.35rem;
  text-decoration: none;
  color: inherit;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease);
}
.guide-card:hover {
  transform: translateX(3px);
  border-color: var(--accent);
}
.guide-card h3 { color: var(--ink); margin-bottom: 0.25rem; }
.guide-card p { color: var(--muted); font-size: var(--text-sm); margin: 0; }
.guide-arrow {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* Sister Site Card */
.sister-card {
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-radius: 22px;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-soft);
}
.sister-card p { color: var(--muted); margin: 0.25rem 0 0; max-width: 50ch; }
.btn-secondary {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 650;
  text-decoration: none;
  color: var(--on-accent);
  background: var(--accent);
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 180ms var(--ease), filter 180ms var(--ease);
}
.btn-secondary:hover { transform: translateY(-1px); filter: brightness(1.06); }

/* Directory Filter Bar */
.directory-bar {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-soft);
}
.control-row {
  display: grid;
  grid-template-columns: minmax(14rem, 2fr) repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}
@media (max-width: 680px) {
  .control-row { grid-template-columns: 1fr; }
}
.directory-bar input,
.directory-bar select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
/* Typeahead suggestions (assets/suggest.js) for the hero and filter-bar searches */
.suggest-wrap { position: relative; min-width: 0; }
.hero-search { position: relative; }
.suggest-list {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  max-height: min(24rem, 60vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  text-align: left;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: var(--shadow-hover);
}
.suggest-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  cursor: pointer;
  line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
}
.suggest-option[aria-selected="true"] { background: var(--accent-soft); }
.suggest-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.suggest-label,
.suggest-detail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.suggest-label { font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
.suggest-detail { font-size: 0.78rem; color: var(--muted); }
.suggest-label mark {
  background: transparent;
  color: var(--accent);
  font-weight: 750;
}
.suggest-badge {
  flex: none;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--muted);
  background: var(--paper);
}
.suggest-badge-p { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.filter-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.8rem;
}
.result-count {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.reset-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}
.reset-btn:hover { text-decoration: underline; }

/* Friendly Listing Cards */
.listing-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.listing-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 1.35rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.listing-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
@media (max-width: 700px) {
  .listing-card { flex-direction: column; align-items: flex-start; }
}
.listing-main { min-width: 0; }
.listing-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.85rem;
  margin-bottom: 0.35rem;
}
.listing-top h3 a { color: var(--ink); text-decoration: none; }
.listing-top h3 a:hover { color: var(--accent); text-decoration: underline; }
.listing-cat { font-size: var(--text-sm); color: var(--accent); font-weight: 600; }
.listing-summary { margin: 0 0 0.5rem; color: var(--ink); max-width: 62ch; }
.listing-facts {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.listing-action {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}
@media (max-width: 700px) {
  .listing-action { align-items: flex-start; }
}
.card-tools { display: flex; gap: 0.45rem; align-items: center; }
.tool-btn,
.saved-toggle,
.copy-phrase-btn {
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease), color 180ms var(--ease);
}
.tool-btn:hover,
.saved-toggle:hover,
.copy-phrase-btn:hover { border-color: var(--accent); color: var(--accent); }
.tool-btn[aria-pressed="true"],
.saved-toggle[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.tool-muted { color: var(--muted); border-color: transparent; background: transparent; padding-inline: 0.4rem; }
.tool-muted:hover { color: var(--accent); border-color: transparent; }
.filter-actions { display: flex; align-items: center; gap: 0.65rem; }

/* Feedback bar & modal dialog */
.feedback-bar {
  margin-top: 2.25rem;
  padding: 1rem 1.25rem;
  background: var(--warm-panel);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.25rem;
}
.feedback-bar p { margin: 0; font-size: var(--text-sm); color: var(--muted); }
.feedback-bar-actions { display: flex; align-items: center; gap: 0.9rem; font-size: var(--text-sm); }

.feedback-dialog {
  width: min(30rem, calc(100vw - 2rem));
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-hover);
}
.feedback-dialog::backdrop { background: rgba(15, 12, 10, 0.55); }
.dialog-inner { padding: 1.5rem; }
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.25rem;
}
.dialog-head h2 { margin: 0; }
.dialog-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
}
.dialog-close:hover { color: var(--ink); }
.dialog-target { color: var(--muted); font-size: var(--text-sm); margin: 0 0 1rem; }
.feedback-form { display: flex; flex-direction: column; gap: 1rem; }
.reason-group {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.reason-group legend { font-weight: 650; font-size: var(--text-sm); margin-bottom: 0.45rem; }
.reason-group label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--text-sm);
  cursor: pointer;
}
.field-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: var(--text-sm);
  font-weight: 600;
}
.field-label span { font-weight: 400; color: var(--muted); }
.field-label input,
.field-label textarea {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
.field-note { margin: -0.6rem 0 0; font-size: var(--text-xs, 0.8rem); color: var(--muted); }
.dialog-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.feedback-status:empty { display: none; }
.feedback-status:focus { outline: none; }
.feedback-status:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.feedback-status:not(:empty) {
  margin: 0.5rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  font-weight: 600;
}
.feedback-fallback {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: var(--text-sm);
}

/* Interactive checklists (phrase cards live further down) */
.checklist-li { list-style: none; margin-left: -1.35rem; }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
}
.check-item input { margin-top: 0.35rem; accent-color: var(--accent); flex-shrink: 0; }
.checklist-li.is-checked > label > span { color: var(--muted); text-decoration: line-through; }
.visit-btn {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 650;
  text-decoration: none;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}
.visit-btn:hover { background: var(--accent); color: var(--on-accent); }

/* At-a-glance comparison table (category pages) */
.compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}
.compare-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.compare-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}
.compare-table caption {
  caption-side: top;
  text-align: left;
  padding: 0.9rem 1.1rem 0.25rem;
  color: var(--muted);
  font-weight: 600;
}
.compare-table th,
.compare-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid var(--rule);
}
.compare-table thead th {
  color: var(--muted);
  font-weight: 650;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.compare-table tbody tr:last-child > * { border-bottom: 0; }
.compare-table tbody tr:hover { background: var(--accent-soft); }
.compare-table tbody th { font-weight: 650; min-width: 10rem; }
.compare-table tbody th a { color: var(--ink); text-decoration: none; }
.compare-table tbody th a:hover { color: var(--accent); text-decoration: underline; }
.compare-table .compare-date { white-space: nowrap; color: var(--muted); }

/* Area hubs */
.area-intro { padding-bottom: 0; }
.area-intro p:last-child { margin-bottom: 0; }
.area-links { font-size: var(--text-sm); font-weight: 600; }

/* FAQ accordions (native <details>) */
.prose details {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  margin: 0 0 0.75rem;
  max-width: 65ch;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.prose details:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); }
.prose details[open] { border-color: var(--accent); box-shadow: var(--shadow-soft); }
.prose summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
  border-radius: 14px;
}
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.2rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-25%) rotate(45deg);
  transition: transform 200ms var(--ease);
}
.prose details[open] > summary::after { transform: translateY(25%) rotate(-135deg); }
.prose summary:hover { color: var(--accent); }
.prose summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prose details[open] > summary { border-bottom: 1px solid var(--rule); border-radius: 14px 14px 0 0; }
.prose details > :not(summary) { margin-inline: 1.1rem; }
.prose details > summary + * { margin-top: 0.85rem; }
.prose details > :last-child:not(summary) { margin-bottom: 1rem; }

/* Notices */
.notice {
  background: var(--warm-panel);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
}
.notice p { margin: 0; color: var(--muted); }
.empty-state { color: var(--muted); font-style: italic; margin-top: 1rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
  padding-block: 1.75rem 2.5rem;
  color: var(--muted);
  font-size: var(--text-sm);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.footer-inner p { margin: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .nav-panel { animation: none; }
}

/* Provider detail pages (/providers/<id>/) */
.provider-kicker {
  margin: 0 0 0.35rem;
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--accent);
}
.provider-intro h1 { overflow-wrap: anywhere; }
.provider-intro .intro-lead { color: var(--ink); max-width: 62ch; }
.provider-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.25rem;
}
.visit-btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--text-body);
  padding: 0.7rem 1.35rem;
}
.visit-btn-primary:hover { filter: brightness(1.08); }
.provider-body { padding-top: 1.25rem; }
.provider-facts {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.provider-facts > div {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 0.25rem 1.25rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--rule);
}
.provider-facts > div:first-child { border-top: 0; }
.provider-facts dt { font-size: var(--text-sm); font-weight: 650; color: var(--muted); padding-top: 0.1rem; }
.provider-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.provider-facts a,
.provider-sources a,
.provider-guide-link a { color: var(--accent); }
@media (max-width: 600px) {
  .provider-facts > div { grid-template-columns: 1fr; padding: 0.75rem 1rem; }
}
.provider-sources,
.provider-note { font-size: var(--text-sm); color: var(--muted); margin: 1rem 0 0; overflow-wrap: anywhere; }
.provider-more { padding-top: 0.5rem; }
.provider-related {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 0.75rem;
}
.provider-related a {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  height: 100%;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 180ms var(--ease), transform 180ms var(--ease);
}
.provider-related a:hover { border-color: var(--accent); transform: translateY(-2px); }
.provider-related strong { font-weight: 700; }
.provider-related span { font-size: var(--text-sm); color: var(--muted); }
.provider-guide-link { margin: 1.1rem 0 0; font-size: var(--text-sm); font-weight: 650; }
@media (prefers-reduced-motion: reduce) {
  .provider-related a { transition: none; }
  .provider-related a:hover { transform: none; }
}

/* Inline SVG figures in guides (charts and diagrams). Colors come from the
   theme tokens so the same markup reads in light and dark mode. */
.guide-figure {
  margin: 1.75rem 0;
  padding: 1rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
}
.guide-figure svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  font-family: inherit;
  overflow: visible;
}
.guide-figure.is-compact svg { max-width: 560px; }
.guide-figure figcaption {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.45;
  margin-top: 0.75rem;
  max-width: 65ch;
}
.guide-figure text { fill: var(--ink); font-size: 15px; }
.guide-figure .gf-sm { font-size: 13px; }
.guide-figure .gf-lg { font-size: 17px; }
.guide-figure .gf-b { font-weight: 700; }
.guide-figure .gf-mid { text-anchor: middle; }
.guide-figure .gf-end { text-anchor: end; }
.guide-figure .gf-muted { fill: var(--muted); }
.guide-figure .gf-accent-text { fill: var(--accent); }
.guide-figure .gf-on-accent { fill: var(--on-accent); }
.guide-figure .gf-panel { fill: var(--warm-panel); stroke: var(--rule); stroke-width: 1; }
.guide-figure .gf-paper { fill: var(--paper); stroke: var(--rule); stroke-width: 1; }
.guide-figure .gf-accent { fill: var(--accent); }
.guide-figure .gf-tint { fill: var(--accent); fill-opacity: 0.16; }
.guide-figure .gf-tint-line { fill: var(--accent); fill-opacity: 0.16; stroke: var(--accent); stroke-width: 1.5; }
.guide-figure .gf-outline { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.guide-figure .gf-hollow { fill: var(--warm-panel); stroke: var(--muted); stroke-width: 1.5; }
.guide-figure .gf-dot { fill: var(--muted); }
.guide-figure .gf-grid { stroke: var(--rule); stroke-width: 1; fill: none; }
.guide-figure .gf-axis { stroke: var(--muted); stroke-width: 1.25; fill: none; }
.guide-figure .gf-link { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.guide-figure .gf-step { stroke: var(--accent); stroke-width: 2.5; fill: none; stroke-linejoin: round; }
.guide-figure .gf-dash { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 6 5; fill: none; }
.guide-figure .gf-dash-box { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 6 5; }
.guide-figure .gf-arrowhead { fill: var(--muted); }
@media (max-width: 600px) {
  .guide-figure { padding: 0.75rem 0.5rem; margin-inline: -0.25rem; }
}
/* Wide charts (640-unit viewBox) shrink more on phones, so their text starts larger. */
.guide-figure.is-wide text { font-size: 16px; }
.guide-figure.is-wide .gf-sm { font-size: 14.5px; }

/* Inline cheat-sheet signup card (guide and tool pages; never a popup) */
.signup-section { padding-top: 0; }
.signup-card {
  background: var(--accent-soft);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: clamp(1.15rem, 3.5vw, 1.6rem);
  min-width: 0;
}
.signup-card h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0 0 0.4rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.signup-lead { margin: 0 0 1rem; color: var(--muted); font-size: var(--text-sm); max-width: 60ch; }
.signup-form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: stretch; }
.signup-form input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  max-width: 100%;
  font: inherit;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
}
.signup-form input[type="email"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.signup-form button { border: 0; cursor: pointer; font-family: var(--font-sans); }
.signup-form button:disabled { opacity: 0.6; cursor: progress; }
.signup-note { margin: 0.65rem 0 0; font-size: var(--text-sm); color: var(--muted); }
.signup-status { margin: 0.65rem 0 0; font-size: var(--text-sm); color: var(--ink); font-weight: 600; }
.signup-status:empty { display: none; }
.signup-status:focus { outline: none; }
.signup-done { margin: 0.75rem 0 0; }
@media (max-width: 480px) {
  .signup-form button { flex: 1 1 100%; }
}

.print-actions { margin: 1rem 0 1.5rem; }
.print-actions button { border: 0; cursor: pointer; font-family: var(--font-sans); }

/* "Compare saved (N)" button, strip and side-by-side dialog (assets/interact.js) */
.compare-btn {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 650;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}
.compare-btn:hover { background: var(--accent); color: var(--on-accent); }
.compare-btn:focus-visible,
.compare-remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.filter-actions { flex-wrap: wrap; justify-content: flex-end; }
.card-tools { flex-wrap: wrap; }
.compare-strip { padding-block: 0 1.75rem; }
.compare-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  max-width: 45rem;
  padding-block: 0.75rem;
  border-top: 1px solid var(--rule);
}
.compare-strip-inner > p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
}
.compare-dialog { width: min(60rem, calc(100vw - 1.5rem)); max-width: calc(100vw - 1.5rem); }
.compare-dialog .dialog-inner { padding: 1.25rem; min-width: 0; }
.compare-body { min-width: 0; }
.compare-dialog-wrap { max-width: 100%; overflow-x: auto; margin: 0; box-shadow: none; overscroll-behavior-x: contain; }
.compare-side { min-width: 0; width: 100%; table-layout: auto; }
.compare-side th,
.compare-side td { padding: 0.6rem 0.85rem; min-width: 9.5rem; overflow-wrap: anywhere; }
.compare-side thead th { text-transform: none; letter-spacing: 0; font-size: var(--text-sm); color: var(--ink); white-space: normal; }
.compare-side tbody th {
  min-width: 7rem;
  width: 7rem;
  color: var(--muted);
  font-weight: 650;
  font-size: 0.82rem;
  overflow-wrap: normal;
  word-break: normal;
}
.compare-side .compare-corner { min-width: 7rem; width: 7rem; }
.compare-side tbody th,
.compare-side .compare-corner {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
}
.compare-side tbody tr:hover { background: transparent; }
.compare-provider a { display: block; color: var(--ink); font-weight: 700; text-decoration: none; }
.compare-provider a:hover { color: var(--accent); text-decoration: underline; }
.compare-remove {
  margin-top: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.1rem 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.compare-remove:hover { color: var(--accent); }
.compare-visit { font-weight: 650; color: var(--accent); white-space: nowrap; }
.compare-side time { white-space: nowrap; color: var(--muted); }
.compare-empty,
.compare-foot { margin: 0.5rem 0; font-size: var(--text-sm); color: var(--muted); }
.compare-empty { margin-bottom: 1rem; }
@media (max-width: 600px) {
  .compare-dialog .dialog-inner { padding: 1rem; }
  .compare-side th,
  .compare-side td { min-width: 8.5rem; padding: 0.55rem 0.7rem; }
  .compare-side tbody th,
  .compare-side .compare-corner { min-width: 6.5rem; width: 6.5rem; }
}

/* "Related providers" handoff strip on guides and tools with relatedCategories: */
.related-providers { padding-top: 0.5rem; }
.related-providers h2 { margin-top: 0; }
.related-lead { margin: 0 0 1rem; font-size: var(--text-sm); color: var(--muted); }
.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 0.75rem;
}
.related-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 0;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  transition: border-color 180ms var(--ease);
}
.related-card:hover { border-color: var(--accent); }
.related-card-head { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.related-card-head a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.related-card-head a:hover { color: var(--accent); text-decoration: underline; }
.related-cat { font-size: 0.8rem; font-weight: 600; color: var(--accent); }
.related-summary { margin: 0; font-size: var(--text-sm); color: var(--muted); }
.related-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0; }
.related-tag {
  font-size: 0.75rem;
  line-height: 1.4;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--warm-panel);
  color: var(--muted);
}
.related-tag-lang { background: transparent; border: 1px solid var(--rule); padding-block: 0; }
.related-card .tool-btn { margin-top: auto; }
.related-browse { margin: 1.1rem 0 0; font-size: var(--text-sm); font-weight: 650; }
@media (prefers-reduced-motion: reduce) {
  .related-card, .compare-btn { transition: none; }
}

/* Phrase & message cards (assets/interact.js turns "Vietnamese phrases" / "Ready-to-send" lists into these) */
.prose ul.phrase-list {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 1.75rem;
  display: grid;
  gap: 0.8rem;
  max-width: 65ch;
}
.prose .phrase-list > li.phrase-item { margin: 0; padding: 0; max-width: none; min-width: 0; }
.phrase-card {
  position: relative;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.phrase-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
  opacity: 0.85;
}
.phrase-card[data-lang="en"]::before { opacity: 0.4; }
.phrase-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem 0.55rem 1.15rem;
  background: var(--warm-panel);
  border-bottom: 1px solid var(--rule);
}
.phrase-lang {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid transparent;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
}
.phrase-card[data-lang="en"] .phrase-lang { color: var(--muted); background: var(--surface); border-color: var(--rule); }
.phrase-card .copy-phrase-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.95rem;
  margin-left: auto;
  background: var(--surface);
  white-space: nowrap;
}
.phrase-card .copy-phrase-btn svg { flex-shrink: 0; }
.phrase-card .copy-phrase-btn.is-copied,
.phrase-card .copy-phrase-btn.is-copied:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.copy-phrase-btn:focus-visible,
.phrase-toggle-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.phrase-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.phrase-toggle-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 650;
  line-height: 1.2;
  min-height: 2rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.phrase-toggle-btn:hover { color: var(--ink); }
.phrase-toggle-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 1px 3px rgba(38, 25, 14, 0.18);
}
.phrase-body { padding: 0.95rem 1.1rem 1rem 1.25rem; }
.prose .phrase-text {
  margin: 0;
  max-width: none;
  font-style: normal;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.phrase-slot {
  color: inherit;
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0.05em 0.12em;
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.phrase-body.is-swapping { animation: phrase-swap 240ms var(--ease); }
@keyframes phrase-swap {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.phrase-note {
  display: grid;
  gap: 0.2rem;
  margin: 0 1.1rem 0 1.25rem;
  padding: 0.7rem 0 0.9rem;
  border-top: 1px dashed var(--rule);
}
.phrase-note-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.prose .phrase-note-text {
  margin: 0;
  max-width: none;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.phrase-note-alt { font-style: normal; }
@media (max-width: 480px) {
  .phrase-card-head { padding-left: 0.95rem; }
  .phrase-body { padding: 0.85rem 0.9rem 0.9rem 1.05rem; }
  .phrase-note { margin: 0 0.9rem 0 1.05rem; }
  .phrase-toggle-btn { padding-inline: 0.7rem; }
  .phrase-card .copy-phrase-btn { padding-inline: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .phrase-body.is-swapping { animation: none; }
  .phrase-toggle-btn { transition: none; }
}

/* Official chat link (listing.messaging): a calm secondary button beside "Visit website" */
.listing-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  max-width: 100%;
}
@media (max-width: 700px) {
  .listing-links { justify-content: flex-start; }
}
.btn-msg {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  font-size: var(--text-sm);
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: calc(0.55rem - 1px) 0.95rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: border-color 180ms var(--ease), color 180ms var(--ease), background-color 180ms var(--ease);
}
.listing-links .visit-btn { line-height: 1.2; }
.btn-msg:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.btn-msg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-msg-icon { flex-shrink: 0; width: 1rem; height: 1rem; color: var(--accent); }
.btn-msg span { overflow: hidden; text-overflow: ellipsis; }
.btn-msg-lg { font-size: var(--text-body); padding: calc(0.7rem - 1px) 1.25rem; }
.compare-msg { white-space: normal; }

/* Print: just the page content, so the cheat sheets fit on 1–2 pages */
@media print {
  :root {
    --ink: #000;
    --muted: #333;
    --paper: #fff;
    --surface: #fff;
    --warm-panel: #fff;
    --accent: #000;
    --accent-soft: #fff;
    --rule: #bbb;
    color-scheme: light;
  }
  body { background: #fff; color: #000; font-size: 10.5pt; line-height: 1.4; }
  .site-header, .site-footer, .feedback-bar, .feedback-dialog, .signup-section, .signup-card,
  .print-actions, .breadcrumb, .copy-phrase-btn, .skip-link, .jump-link, .sister-card,
  .compare-btn, .compare-strip, .compare-dialog, .related-card .tool-btn { display: none !important; }
  .container, .narrow { max-width: none; padding-inline: 0; }
  .section, .page-intro { padding-block: 0 !important; margin: 0 !important; }
  .page-intro h1 { font-size: 16pt; margin: 0 0 0.25rem; }
  .intro-lead { font-size: 10pt; margin: 0 0 0.5rem; }
  .prose h2 { font-size: 12.5pt; margin: 0.9rem 0 0.3rem; break-after: avoid; page-break-after: avoid; }
  .prose p, .prose ul { margin: 0.3rem 0; max-width: none; }
  .prose li { font-size: 10.5pt; line-height: 1.4; margin: 0.15rem 0; }
  .prose th, .prose td { border-bottom: 1px solid #bbb; padding: 0.15rem 0.5rem 0.15rem 0; }
  .prose table { font-size: 9.5pt; break-inside: avoid; page-break-inside: avoid; }
  .prose a { color: #000; text-decoration: underline; }
  .phrase-card { box-shadow: none; border: 1px solid #bbb; border-radius: 6px; break-inside: avoid; page-break-inside: avoid; }
  .phrase-card::before { width: 3px; background: #000; }
  .phrase-card-head { background: none; padding: 0.2rem 0.5rem 0.1rem 0.75rem; border-bottom: 0; }
  .phrase-lang { padding: 0; border: 0; background: none; color: #333; font-size: 7.5pt; }
  .phrase-toggle { padding: 0; border: 0; background: none; }
  .phrase-toggle-btn { padding: 0; min-height: 0; background: none !important; color: #333 !important; box-shadow: none !important; font-size: 7.5pt; text-transform: uppercase; letter-spacing: 0.06em; }
  .phrase-toggle-btn[aria-pressed="false"] { display: none; }
  .phrase-body { padding: 0.1rem 0.5rem 0.3rem 0.75rem; }
  .prose .phrase-text { font-size: 10.5pt; line-height: 1.4; }
  .phrase-slot { background: none; font-weight: 700; padding: 0; }
  .phrase-note { margin: 0 0.5rem 0 0.75rem; padding: 0.2rem 0 0.35rem; }
  .prose .phrase-note-text { font-size: 9pt; color: #333; }
  .btn-msg { border: 0; padding: 0; }
  @page { margin: 12mm; }
}
