:root {
  --navy: #0d2340;
  --navy-2: #163a63;
  --accent: #c8102e;
  --accent-2: #a50d26;
  --gold: #b8933f;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1b2430;
  --muted: #5d6b7c;
  --line: #e2e6eb;
  --ok: #157347;
  --ok-bg: #e5f4ec;
  --info: #0b5cad;
  --info-bg: #e6f0fb;
  --warn: #8a5a00;
  --warn-bg: #fdf3dd;
  --bad: #b02a37;
  --bad-bg: #fbe7e9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--navy-2); }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
code { background: #eef1f5; padding: 2px 6px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
main.container { padding-top: 28px; padding-bottom: 48px; min-height: 60vh; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.inline { display: inline; }
.prewrap { white-space: pre-wrap; }

/* Top bar */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; flex-wrap: wrap; }
.logo { color: #fff; text-decoration: none; font-weight: 700; display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.logo-mark { background: var(--accent); color: #fff; border-radius: 6px; padding: 4px 7px; font-size: .8rem; letter-spacing: .05em; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a, .nav .linklike { color: #d5deea; text-decoration: none; padding: 8px 10px; border-radius: 6px; font-size: .93rem; }
.nav a:hover, .nav a.active, .nav .linklike:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav a.btn { color: #fff; background: var(--accent); margin-left: 6px; }
.nav-toggle, .nav-burger { display: none; }
@media (max-width: 860px) {
  .nav-burger { display: block; cursor: pointer; font-size: 1.4rem; padding: 6px 10px; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav a.btn { margin-left: 0; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--accent-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: .875rem; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.btn-ghost:hover { background: #eef1f5; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-danger { background: var(--bad); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--navy-2); cursor: pointer; text-decoration: underline; }
.linklike.danger { color: var(--bad); }

/* Marketing */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 72px 0 80px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.9rem); }
.hero .lead { color: #d5deea; }
.hero .muted { color: #a9b8cb; }
.hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.hero-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15); border-radius: 14px; padding: 28px; }
.hero-card h3 { color: #fff; }
.steps-mini { list-style: none; padding: 0; margin: 0; }
.steps-mini li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.steps-mini li:last-child { border: 0; }
.steps-mini span { background: var(--gold); color: var(--navy); border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; font-weight: 700; flex: none; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--gold); margin-bottom: .5em; }
.lead { font-size: 1.12rem; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 12px; }
.section { padding: 64px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 24px 0 32px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.ticks, .dots { padding-left: 0; list-style: none; }
.ticks li, .dots li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.dots li::before { content: "•"; position: absolute; left: 8px; color: var(--accent); font-weight: 700; }
.note { background: var(--warn-bg); border-left: 4px solid var(--gold); padding: 14px 18px; border-radius: 6px; margin-top: 24px; }
.timeline-h { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 24px; }
.timeline-h > div { background: var(--bg); border-radius: var(--radius); padding: 20px; }
.timeline-h .num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: 10px; }
.pricing { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.price-card { background: #fff; border: 2px solid var(--navy); border-radius: 14px; padding: 32px; box-shadow: var(--shadow); position: sticky; top: 90px; }
.price { font-size: 2.6rem; font-weight: 800; color: var(--navy); margin: .2em 0; }
.faq { background: var(--bg); border-radius: 8px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.faq p { margin: 10px 0 0; }
@media (max-width: 900px) {
  .hero-inner, .grid-3, .split, .pricing { grid-template-columns: 1fr; }
  .timeline-h { grid-template-columns: 1fr 1fr; }
  .price-card { position: static; }
}
@media (max-width: 520px) { .timeline-h { grid-template-columns: 1fr; } }

/* Footer */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; font-size: .9rem; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }

/* Cards / layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-2.wide-left { grid-template-columns: 2fr 1fr; }
.grid-dash { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.stack > .card:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .grid-2, .grid-2.wide-left, .grid-dash { grid-template-columns: 1fr; } }

.next-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 22px 26px; margin-bottom: 20px; flex-wrap: wrap; }
.next-card h3 { color: #fff; margin-bottom: .25em; }
.next-card p { margin: 0; color: #d5deea; }
.next-card.calm { background: var(--ok-bg); color: var(--text); }
.next-card.calm h3 { color: var(--ok); }
.next-card.calm p { color: var(--text); }

/* Tracker */
.tracker { list-style: none; padding: 0; margin: 0; }
.tracker li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; position: relative; }
.tracker li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 42px; bottom: -6px; width: 2px; background: var(--line); }
.tracker li.done:not(:last-child)::after { background: var(--ok); }
.tracker .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #eef1f5; color: var(--muted); font-weight: 700; font-size: .85rem; }
.tracker li.done .dot { background: var(--ok); color: #fff; }
.tracker li.current .dot { background: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(200,16,46,.15); }
.tracker small { display: block; color: var(--muted); }
.tracker li:not(.done):not(.current) strong { color: var(--muted); }
.tracker .owner { font-size: .75rem; color: var(--muted); background: #eef1f5; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }

/* Key-value, activity */
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; } .kv dt { margin-top: 6px; } }
ol.plain { margin: 0; padding-left: 20px; }
.activity { list-style: none; padding: 0; margin: 0; max-height: 420px; overflow: auto; }
.activity li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.activity li.internal { background: var(--warn-bg); padding-left: 8px; padding-right: 8px; }
.activity time { color: var(--muted); font-size: .8rem; white-space: nowrap; }

/* Badges & alerts */
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-muted { background: #eef1f5; color: var(--muted); }
.flash, .info { background: var(--info-bg); color: var(--info); border-radius: 8px; padding: 12px 16px; margin: 16px 0; }
.flash { margin-bottom: 0; }
.alert { background: var(--bad-bg); color: var(--bad); border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.note-inline { color: var(--bad); }

/* Forms */
.form label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 14px; color: var(--navy); }
.form label small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }
.form input:not([type=checkbox]):not([type=file]), .form select, .form textarea, .search input, .inline-form input {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; color: var(--text);
  border: 1px solid #cfd6df; border-radius: 8px; background: #fff;
}
.form input[type=file] { display: block; margin-top: 10px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--navy-2); outline-offset: 0; border-color: var(--navy-2); }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.form label.check { display: flex; gap: 10px; font-weight: 400; color: var(--text); align-items: flex-start; }
.form label.check input { margin-top: 4px; }
.auth-card { max-width: 520px; margin: 24px auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px; box-shadow: var(--shadow); }
.search { display: flex; gap: 8px; margin: 14px 0; max-width: 520px; }
.search input { margin: 0; }
.inline-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.inline-form input { margin: 0; flex: 1 1 160px; padding: 6px 10px; }

/* Tables */
.table-wrap { overflow-x: auto; padding: 0; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.table tr.total td { font-weight: 700; border-top: 2px solid var(--navy); }
.table.compact td { padding: 8px 6px; }
.card > .table td:first-child { padding-left: 0; }

/* Checklist */
.check-item { border-top: 1px solid var(--line); padding: 14px 0; }
.check-item:first-child { border-top: 0; }
.check-head { display: flex; gap: 12px; }
.check-head p { margin: 4px 0 0; }
.check-icon { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #cfd6df; display: grid; place-items: center; font-weight: 700; color: #fff; }
.check-icon.ok { background: var(--ok); border-color: var(--ok); }
.check-icon.pending { background: var(--info); border-color: var(--info); }

/* Admin */
.stage-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { text-decoration: none; background: #fff; border: 1px solid var(--line); color: var(--text); padding: 5px 12px; border-radius: 99px; font-size: .85rem; }
.pill b { color: var(--muted); margin-left: 4px; }
.pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pill.active b { color: #c9d4e3; }

#sumsub-websdk-container { min-height: 520px; }

/* ---------- SEO content pages ---------- */
.article-wrap { padding-top: 24px; padding-bottom: 56px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs .sep { margin: 0 8px; }
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.article { max-width: 760px; }
.article h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.article h2 { margin-top: 1.8em; }
.article section ul, .article section ol { padding-left: 22px; }
.article section li { margin-bottom: 6px; }
.article-side { position: sticky; top: 90px; }
.tldr { background: var(--info-bg); border-left: 4px solid var(--navy-2); padding: 16px 20px; border-radius: 8px; margin: 18px 0 22px; }
.facts { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; }
.facts caption { text-align: left; font-weight: 700; color: var(--navy); padding: 0 0 8px; }
.facts th { text-transform: none; letter-spacing: 0; font-size: .92rem; width: 45%; color: var(--muted); font-weight: 600; padding-left: 14px; }
.cta-box { background: #fff; border: 2px solid var(--navy); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.cta-box .btn { margin-top: 8px; }
.card-link { display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--navy-2); transform: translateY(-2px); }
.card-link h3 { color: var(--navy); }
.related { margin-top: 48px; }
.sources li { margin-bottom: 4px; }
.country-links { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.footer-links h4 { font-size: .9rem; margin-bottom: 8px; }
.footer-links ul { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.footer-links li { margin-bottom: 4px; }
.quiz fieldset { border: 0; border-bottom: 1px solid var(--line); padding: 10px 0 12px; margin: 0 0 6px; }
.quiz legend { font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.quiz label.check { display: inline-flex; margin-right: 18px; margin-bottom: 0; }
.result { border-radius: var(--radius); padding: 22px; margin: 16px 0 24px; }
.result-ok { background: var(--ok-bg); } .result-warn { background: var(--warn-bg); } .result-bad { background: var(--bad-bg); }
@media (max-width: 960px) { .article-grid { grid-template-columns: 1fr; } .article-side { position: static; } }
@media (max-width: 700px) { .footer-links { grid-template-columns: 1fr; } }

/* ---------- Language switcher & CJK typography ---------- */
.topbar-right { display: flex; align-items: center; gap: 6px; margin-left: auto; margin-right: 8px; }
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; cursor: pointer; color: #d5deea; padding: 8px 10px; border-radius: 6px; font-size: .9rem; white-space: nowrap; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover, .lang-switch[open] summary { color: #fff; background: rgba(255,255,255,.08); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(16,24,40,.18); min-width: 150px; padding: 6px; z-index: 20; }
.lang-menu a { display: block; padding: 8px 12px; color: var(--text); text-decoration: none; border-radius: 6px; font-size: .92rem; }
.lang-menu a:hover { background: var(--bg); }
.lang-menu a.active { font-weight: 700; color: var(--navy); background: var(--info-bg); }
@media (min-width: 861px) { .topbar-right { order: 2; margin-right: 0; margin-left: 8px; } .nav { order: 1; margin-left: auto; } }
body.lang-zh { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Roboto, sans-serif; }
body.lang-zh .eyebrow { letter-spacing: .02em; }
body.lang-zh h1, body.lang-zh h2, body.lang-zh h3 { line-height: 1.35; }
