/* 112 Help Me / 112帮助我 — refined official edition
   Calm, editorial, high-contrast, mobile-first. Logical properties for later RTL.
   No third-party fonts, images, or analytics at runtime. */

:root {
  --ink: #142c2c;
  --ink-soft: #1f3d3d;
  --paper: #f7f2ea;
  --paper-2: #efe8db;
  --card: #fffcf7;
  --line: #e0d7c8;
  --line-strong: #c4b8a6;
  --muted: #5e594f;
  --text: #1c1916;
  --clay: #b45214;
  --clay-dark: #8a3d0e;
  --crimson: #8a1f1f;
  --crimson-bg: #f8ece9;
  --official: #1d4d4f;
  --official-bg: #e7f1f1;
  --focus: #0b3d3d;
  --cream: #f6f1e8;
  --shadow: 0 1px 2px rgba(20, 44, 44, 0.04), 0 14px 36px rgba(20, 44, 44, 0.07);
  --radius: 16px;
  --max: 72rem;
  --font-serif: "Source Serif 4", "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --font-sans: "Source Sans 3", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --header-h: 4.35rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; }
a { color: var(--official); text-underline-offset: 0.15em; }
a:hover { color: var(--clay-dark); }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

h1, h2, h3, h4,
.page-title,
.brand-text strong {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.25;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -40rem;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; }

/* Header */
.site-header {
  background: var(--ink);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}
.page-index .site-header {
  background: rgba(14, 28, 28, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: none;
  position: fixed;
  inset-inline: 0;
  top: 0;
  width: 100%;
}
@media (prefers-reduced-motion: reduce) {
  .page-index .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(14, 28, 28, 0.88);
  }
}
.page-index .site-header.is-scrolled {
  background: rgba(14, 28, 28, 0.92);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.header-inner, .footer-inner, .wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}
.header-inner {
  width: min(100% - 1.5rem, 92rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  padding-block: 0.7rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  min-height: 44px;
}
.brand:hover { color: inherit; }
.logo-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 1.05rem;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-size: 1.08rem;
  font-weight: 600;
  color: inherit;
  letter-spacing: 0;
}
.brand-text span { font-size: 0.78rem; opacity: 0.82; font-weight: 400; }

.nav-toggle {
  margin-inline-start: auto;
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(246, 241, 232, 0.45);
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.85rem;
  font: inherit;
  cursor: pointer;
}
.site-nav { flex: 1 1 100%; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.site-nav a {
  color: var(--cream);
  text-decoration: none;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(246, 241, 232, 0.12);
}

@media (max-width: 899px) {
  .site-nav { display: none; }
  .site-nav[data-open="true"] { display: block; }
}

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.92rem;
}
.lang-switch a {
  color: var(--cream);
  text-decoration: none;
  min-height: 44px;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}
.lang-switch a[aria-current="true"] {
  background: var(--cream);
  color: var(--ink);
  font-weight: 650;
}
.lang-more {
  position: relative;
}
.lang-more summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(246, 241, 232, 0.35);
  display: inline-flex;
  align-items: center;
  color: var(--cream);
  font: inherit;
  font-size: 0.92rem;
}
.lang-more summary::-webkit-details-marker { display: none; }
.lang-more summary::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  margin-inline-start: 0.45rem;
  border-inline-end: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-0.1rem);
}
.lang-more[open] summary {
  background: rgba(246, 241, 232, 0.12);
}
.lang-more ul {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: #132626;
  border: 1px solid rgba(246, 241, 232, 0.2);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 12.5rem;
  z-index: 60;
}
.lang-more .soon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.25rem 0.7rem;
  border-radius: 8px;
  color: var(--cream);
  opacity: 0.8;
  cursor: not-allowed;
}
.lang-more .soon em {
  font-style: normal;
  font-size: 0.75rem;
  opacity: 0.75;
}

@media (min-width: 1080px) {
  .nav-toggle { display: none; }
  .header-inner { flex-wrap: nowrap; }
  .site-nav { flex: 1 1 auto; display: block; min-width: 0; }
  .site-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
    justify-content: flex-end;
    gap: 0;
  }
  .site-nav a { padding-inline: 0.45rem; font-size: 0.86rem; }
  .lang-switch { margin-inline-start: 0.2rem; flex: 0 0 auto; flex-wrap: nowrap; }
}


/* Emergency strip */
.life-banner {
  background: var(--crimson-bg);
  color: var(--crimson);
  border-block: 1px solid #e8cfc9;
}
.life-banner .wrap {
  padding-block: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}
.page-index .life-banner { display: none; }

main { padding-block: 0 4rem; flex: 1; }
.page-index main { padding-top: 0; }
main > .wrap { padding-top: 1.75rem; }
.page-index main > .wrap { padding-top: 3rem; }
.page-title {
  font-size: clamp(1.75rem, 3.4vw, 2.45rem);
  line-height: 1.22;
  margin: 0 0 0.6rem;
  color: var(--ink);
}
.lede {
  font-size: 1.16rem;
  color: var(--ink-soft);
  max-width: 42rem;
  margin: 0 0 1.5rem;
  line-height: 1.65;
}
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--clay);
  margin: 0 0 0.7rem;
}

.section-head {
  margin: 2.75rem 0 1.15rem;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
}
.section-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  max-width: 40rem;
}

/* Full-bleed home hero */
.home-hero {
  position: relative;
  isolation: isolate;
  color: var(--cream);
  padding: 6.4rem 0 0;
  margin-bottom: 0;
}
.home-hero-media,
.home-hero-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.home-hero-media { overflow: hidden; }
.home-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}
.home-hero-shade {
  z-index: 1;
  background:
    linear-gradient(to top, var(--paper) 0, rgba(247, 242, 234, 0.96) 3.6rem, rgba(247, 242, 234, 0.18) 11rem, transparent 17rem),
    linear-gradient(to bottom, rgba(10, 22, 22, 0.72) 0, rgba(10, 22, 22, 0.42) 32%, rgba(10, 22, 22, 0.22) 58%, rgba(10, 22, 22, 0.28) 100%),
    linear-gradient(to right, rgba(10, 22, 22, 0.42), transparent 62%);
  pointer-events: none;
}
.home-hero-inner {
  position: relative;
  z-index: 2;
}
.home-hero .kicker {
  color: #f0c7a6;
}
.home-hero h1 {
  color: #fbf8f2;
  font-size: clamp(2rem, 5.2vw, 3.25rem);
  font-weight: 600;
  max-width: 16em;
  margin: 0 0 0.85rem;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.22);
}
.hero-lede {
  font-size: 1.16rem;
  line-height: 1.65;
  max-width: 38rem;
  margin: 0 0 1rem;
  color: rgba(251, 248, 242, 0.94);
}
.hero-life {
  max-width: 38rem;
  margin: 0 0 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #f6e4d6;
  line-height: 1.55;
}
.home-hero .lookup {
  margin: 0 0 0;
  transform: translateY(1.75rem);
  position: relative;
  z-index: 3;
}

/* Inner page hero */
.page-hero {
  position: relative;
  isolation: isolate;
  color: var(--cream);
  min-height: 16.5rem;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.page-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.page-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  display: block;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(10, 22, 22, 0.82) 0%, rgba(10, 22, 22, 0.42) 55%, rgba(10, 22, 22, 0.22) 100%);
  pointer-events: none;
}
.page-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 3.4rem 0 2.3rem;
}
.page-hero .page-title {
  color: #fbf8f2;
  max-width: 22em;
}
.page-hero .lede {
  color: rgba(246, 241, 232, 0.92);
  margin-bottom: 0;
}

/* Cards / grid */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  box-shadow: var(--shadow);
}
.grid-3, .grid-2, .tax-grid {
  display: grid;
  gap: 1.2rem;
}
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3, .tax-grid { grid-template-columns: repeat(3, 1fr); }
}

.photo-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  padding: 0;
  min-width: 0;
}
.photo-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-2);
}
.photo-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-card-body {
  padding: 1.15rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.entry-card h2,
.photo-card .entry-card h2,
.entry-card .photo-card-body h2 {
  margin: 0 0 0.4rem;
  font-size: 1.3rem;
  color: var(--ink);
}
.photo-card-body h2 { margin: 0 0 0.4rem; font-size: 1.3rem; }
.photo-card-body p,
.entry-card p { margin: 0 0 1rem; color: var(--muted); }
.photo-card-body .btn { margin-top: auto; align-self: flex-start; }

.tax-card { /* fallback if used without photo */ }
.tax-card.photo-card { background: var(--card); }
.tax-card .photo-card-media { aspect-ratio: 5 / 3; }
.tax-card .photo-card-body { padding: 1rem 1.1rem 1.15rem; }
.tax-card h3 { margin: 0 0 0.3rem; font-size: 1.12rem; color: var(--ink); }
.tax-card p { margin: 0; color: var(--muted); font-size: 1rem; }
.tax-card.emergency-only {
  box-shadow: var(--shadow), 0 0 0 1px #e0b3ab;
}
.tax-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 44px;
}
.tax-link:hover { color: inherit; }
.tax-link:hover h3 { color: var(--clay-dark); }

/* Buttons */
.btn, button.btn, a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 1.1rem;
  border-radius: 10px;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  gap: 0.4rem;
}
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: var(--ink-soft); color: #fff; }
.btn-accent { background: var(--clay); color: #fff; }
.btn-accent:hover { background: var(--clay-dark); color: #fff; }
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn-danger { background: var(--crimson); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* Emergency lookup */
.lookup {
  background: var(--card);
  border: 1px solid var(--ink);
  border-radius: 20px;
  padding: 1.4rem 1.35rem 1.5rem;
  box-shadow: 0 18px 48px rgba(20, 44, 44, 0.12);
  margin-bottom: 1.8rem;
}
.lookup h2 {
  margin: 0 0 0.45rem;
  color: var(--ink);
  font-size: clamp(1.3rem, 2vw, 1.55rem);
}
.lookup .hint { color: var(--muted); margin: 0 0 1.1rem; max-width: 44rem; }
.lookup label { font-size: 1rem; }
.lookup input[type="search"] {
  min-height: 56px;
  font-size: 1.125rem;
}
label { display: block; font-weight: 650; margin-bottom: 0.35rem; color: var(--ink); }
input[type="text"], input[type="search"], input[type="email"], input[type="tel"],
select, textarea {
  width: 100%;
  min-height: 48px;
  font: inherit;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
textarea { min-height: 8rem; resize: vertical; }
.combo { position: relative; }
.combo-list {
  position: absolute;
  z-index: 20;
  inset-inline: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  max-height: 16rem;
  overflow: auto;
  box-shadow: var(--shadow);
  display: none;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
}
.combo-list.open { display: block; }
.combo-list li button {
  width: 100%;
  text-align: start;
  background: none;
  border: 0;
  font: inherit;
  padding: 0.65rem 0.7rem;
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
}
.combo-list li button[aria-selected="true"],
.combo-list li button:hover { background: var(--official-bg); }

.number-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.65rem; }
.number-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.9rem 1.05rem;
  background: var(--crimson-bg);
  border-radius: 12px;
  border: 1px solid #e8cfc9;
}
.number-item.secondary { background: var(--paper-2); border-color: var(--line); }
.dial {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--crimson);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-variant-numeric: tabular-nums;
}
.dial:hover { color: var(--clay-dark); }
.number-meta { flex: 1 1 12rem; }
.number-meta .svc { font-weight: 650; color: var(--ink); }
.number-meta .src { font-size: 0.88rem; color: var(--muted); }
.empty-state, .notice {
  padding: 0.95rem 1.05rem;
  border-radius: 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

/* Principles — typographic, quiet */
.principles {
  margin-block: 3.5rem 1.5rem;
  padding-block: 0.5rem 0;
}
.principles h2 {
  margin: 0 0 1.2rem;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
}
.principles ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
  counter-reset: p;
  max-width: 46rem;
}
.principles li {
  border-top: 1px solid var(--line);
  padding: 1.2rem 0 1.2rem 3.4rem;
  position: relative;
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.principles li:last-child { border-bottom: 1px solid var(--line); }
.principles li::before {
  counter-increment: p;
  content: counter(p, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 0;
  top: 1.2rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--clay-dark);
  letter-spacing: 0.02em;
}

/* Directory tools */
.toolbar {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}
@media (min-width: 700px) {
  .toolbar { grid-template-columns: 1.4fr 1fr auto; align-items: end; }
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.filter-chips button {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  font: inherit;
  padding: 0.2rem 0.9rem;
  cursor: pointer;
}
.filter-chips button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.country-block { margin-bottom: 1.4rem; }
.country-block h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--ink);
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--line);
}
.result-count { color: var(--muted); margin: 0 0 1rem; font-size: 0.98rem; }

/* Official resource cards */
.hub-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: var(--shadow);
}
.hub-card .org {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--official);
}
.hub-card h3 { margin: 0; font-size: 1.1rem; }
.hub-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.ext-link { font-weight: 650; }

/* Forms */
.form-grid { display: grid; gap: 1rem; }
@media (min-width: 700px) {
  .form-grid.two { grid-template-columns: 1fr 1fr; }
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  margin: 0 0 1.1rem;
  background: var(--card);
}
legend { font-weight: 700; color: var(--ink); padding-inline: 0.3rem; }
.help { font-size: 0.92rem; color: var(--muted); margin: 0.25rem 0 0; }
.req { color: var(--crimson); }
.check-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0.5rem 0;
}
.check-row input { width: 1.2rem; height: 1.2rem; margin-top: 0.3rem; flex: 0 0 auto; }
.check-row label { font-weight: 500; margin: 0; }
.preview-box {
  background: var(--official-bg);
  border: 1px solid #c5d6d6;
  border-radius: 12px;
  padding: 1.1rem 1.15rem;
  margin-top: 1.1rem;
  display: none;
}
.preview-box.show { display: block; }
.draft-text {
  white-space: pre-wrap;
  background: #fff;
  border-radius: 8px;
  padding: 0.8rem;
  border: 1px solid var(--line);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.95rem;
}

/* Teams table */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
}
table.data th, table.data td {
  text-align: start;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data th { background: var(--paper-2); color: var(--ink); font-size: 0.92rem; }
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--official-bg);
  color: var(--official);
}
.badge.warn { background: #f3e6d0; color: #6a3e06; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #e8e2d6;
  padding: 2.4rem 0 2.6rem;
  margin-top: auto;
  font-size: 0.98rem;
}
.site-footer a { color: var(--cream); }
.footer-grid {
  display: grid;
  gap: 1.4rem;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-preview {
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
  opacity: 0.8;
}
.disclaimer {
  border-top: 1px solid rgba(246, 241, 232, 0.2);
  margin-top: 1.3rem;
  padding-top: 1.05rem;
  font-size: 0.9rem;
  opacity: 0.95;
}
.muted { color: var(--muted); }
.tiny { font-size: 0.88rem; color: var(--muted); }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 2.2rem 0; }

/* Language gateway */
.gateway {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--ink);
  color: var(--cream);
}
.gateway-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}
.gateway-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gateway-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10, 22, 22, 0.7), rgba(10, 22, 22, 0.55) 50%, rgba(10, 22, 22, 0.72));
}
.gateway main { flex: 1; display: grid; align-items: center; position: relative; z-index: 1; }
.gateway-panel {
  width: min(100% - 2rem, 44rem);
  margin: 2rem auto;
  background: rgba(255, 252, 247, 0.96);
  color: var(--text);
  border-radius: 20px;
  padding: 2.2rem 1.6rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}
.gateway-panel .logo-mark { margin-inline: auto; width: 64px; height: 64px; font-size: 1.4rem; }
.gateway-panel .page-title { margin-top: 0.9rem; }
.lang-pick { display: grid; grid-template-columns: 1fr; gap: 0.55rem; margin-top: 1.2rem; }
@media (min-width: 32rem) {
  .lang-pick { grid-template-columns: 1fr 1fr; }
}
.lang-pick a { min-height: 48px; font-size: 1.05rem; justify-content: center; }

.prose h2 { color: var(--ink); margin-top: 2.2rem; font-size: 1.4rem; }
.prose h3 { color: var(--ink-soft); }
.prose ul, .prose ol { padding-inline-start: 1.2rem; }
.prose ol.principle-list {
  list-style: none;
  padding: 0;
  counter-reset: p;
  max-width: 46rem;
}
.prose ol.principle-list li {
  border-top: 1px solid var(--line);
  padding-block: 1.05rem;
  padding-inline-start: 3.2rem;
  padding-inline-end: 0;
  position: relative;
}
.prose ol.principle-list li:last-child { border-bottom: 1px solid var(--line); }
.prose ol.principle-list li::before {
  counter-increment: p;
  content: counter(p, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 0;
  top: 1.05rem;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--clay-dark);
}
.sources-box { font-size: 0.95rem; color: var(--muted); }
.sources-box a { color: var(--official); }

@media (min-width: 900px) {
  .home-hero { padding-top: 7.2rem; }
  .home-hero h1 { margin-bottom: 1rem; }
}


/* Language dropdown (current language on the summary) */
.lang-switch { margin-inline-start: auto; }
@media (min-width: 1080px) {
  .lang-switch { margin-inline-start: 0.2rem; }
}
.lang-more a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0.25rem 0.7rem;
  border-radius: 8px;
  color: var(--cream);
  text-decoration: none;
}
.lang-more a:hover,
.lang-more a[aria-current="true"] {
  background: rgba(246, 241, 232, 0.14);
}
.lang-more a[aria-current="true"] {
  font-weight: 650;
}

/* Verification / matching process */
.process-strip {
  margin-top: 3rem;
  padding: 1.6rem 1.5rem 1.7rem;
  background: var(--official-bg);
  border: 1px solid #c9d9d9;
  border-radius: var(--radius);
  max-width: 46rem;
}
.process-strip h2 { margin: 0 0 0.6rem; font-size: 1.35rem; }
.process-strip p { margin: 0 0 1rem; }
.process-flow { margin-bottom: 1.6rem; }
.process-flow h2 { margin: 0 0 0.85rem; }
ol.steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  counter-reset: step;
  max-width: 46rem;
}
ol.steps li {
  position: relative;
  padding-block: 0.85rem;
  padding-inline-start: 3.1rem;
  border-top: 1px solid var(--line);
}
ol.steps li:last-child { border-bottom: 1px solid var(--line); }
ol.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 0;
  top: 0.85rem;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--clay-dark);
}

/* Script-specific typography */
html[lang="ar"] {
  --font-serif: "Noto Naskh Arabic", "Noto Sans Arabic", "Source Serif 4", serif;
  --font-sans: "Noto Sans Arabic", "Noto Naskh Arabic", "Source Sans 3", sans-serif;
}
html[lang="ar"] body { line-height: 1.9; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4,
html[lang="ar"] .page-title, html[lang="ar"] .brand-text strong {
  letter-spacing: 0;
  line-height: 1.5;
}
html[lang="my"] {
  --font-serif: "Noto Sans Myanmar", "Source Serif 4", sans-serif;
  --font-sans: "Noto Sans Myanmar", "Source Sans 3", sans-serif;
}
html[lang="km"] {
  --font-serif: "Noto Sans Khmer", "Source Serif 4", sans-serif;
  --font-sans: "Noto Sans Khmer", "Source Sans 3", sans-serif;
}
html[lang="th"] {
  --font-serif: "Noto Sans Thai", "Source Serif 4", sans-serif;
  --font-sans: "Noto Sans Thai", "Source Sans 3", sans-serif;
}
html[lang="my"] body,
html[lang="km"] body,
html[lang="th"] body { line-height: 1.9; }
html[lang="my"] h1, html[lang="my"] h2, html[lang="my"] h3,
html[lang="km"] h1, html[lang="km"] h2, html[lang="km"] h3,
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3,
html[lang="my"] .page-title, html[lang="km"] .page-title, html[lang="th"] .page-title {
  letter-spacing: 0;
  line-height: 1.45;
}

/* RTL refinements — most layout already uses logical properties */
[dir="rtl"] .brand-text { text-align: start; }
[dir="rtl"] .photo-card-body .btn,
[dir="rtl"] .entry-card .photo-card-body .btn { align-self: flex-start; }
[dir="rtl"] .combo-list { text-align: start; }
[dir="rtl"] .lang-more ul { inset-inline-end: 0; inset-inline-start: auto; }
[dir="rtl"] .skip-link { border-radius: 0 0 8px 8px; }
[dir="rtl"] input, [dir="rtl"] textarea, [dir="rtl"] select {
  text-align: start;
}
