:root {
  color-scheme: light;
  --ink: #14242d;
  --ink-soft: #3d5059;
  --muted: #596a72;
  --paper: #f2f5ef;
  --surface: #ffffff;
  --surface-alt: #e8eeea;
  --line: #c8d3cd;
  --accent: #bd4b28;
  --accent-dark: #87331c;
  --blue: #245b78;
  --green: #176b55;
  --warning: #8a5d04;
  --focus: #1368ce;
  --shadow: 0 18px 50px rgba(20, 36, 45, .09);
  --shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.68 Aptos, "Segoe UI", "PingFang SC", "Microsoft JhengHei", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .18em; }
button, input, select { font: inherit; }
button, .button { min-height: 44px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.shell { width: min(var(--shell), calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; color: #fff; background: var(--ink); }
.skip-link:focus { top: 12px; }

.site-header { border-bottom: 1px solid var(--line); background: rgba(242, 245, 239, .96); }
.header-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; min-height: 76px; gap: 24px; }
.brand { font-family: "Arial Narrow", Aptos, sans-serif; font-size: 18px; font-weight: 900; letter-spacing: .06em; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--accent); }
.site-nav, .language-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a, .language-nav a { padding: 10px 11px; color: var(--ink-soft); font-size: 14px; font-weight: 700; text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav a:hover, .language-nav a:hover, .language-nav a[aria-current="page"] { color: var(--ink); border-color: var(--accent); }
.menu-button { display: none; padding: 8px 13px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); cursor: pointer; }

.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(290px, .7fr); gap: 22px 44px; padding-block: 66px 50px; }
.hero-copy { align-self: center; max-width: 720px; }
.eyebrow { margin: 0 0 14px; color: var(--accent-dark); font-family: "Arial Narrow", Aptos, sans-serif; font-size: 12px; font-weight: 900; letter-spacing: .14em; }
h1, h2, h3 { font-family: "Arial Narrow", Aptos, "PingFang SC", sans-serif; text-wrap: balance; }
h1 { margin: 0; max-width: 760px; font-size: clamp(42px, 6.1vw, 78px); line-height: .98; letter-spacing: -.055em; }
.hero-lead { max-width: 680px; margin: 26px 0 0; color: var(--ink-soft); font-size: clamp(17px, 2vw, 20px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 17px; border: 1px solid var(--ink); font-weight: 800; text-decoration: none; transition: color .2s ease, background .2s ease, border-color .2s ease; }
.button.primary { color: #fff; background: var(--ink); }
.button.primary:hover { background: var(--blue); border-color: var(--blue); }
.button.secondary { background: transparent; }
.button.secondary:hover { background: var(--surface); }
.benefit-panel { align-self: end; padding: 26px; border: 1px solid var(--ink); background: var(--surface); box-shadow: 10px 10px 0 var(--surface-alt); }
.panel-label { margin: 0 0 24px; color: var(--green); font-size: 12px; font-weight: 900; letter-spacing: .1em; }
.benefit-panel h2 { margin: 0; font-size: 31px; line-height: 1.08; }
.benefit-panel p { color: var(--ink-soft); }
.benefit-panel sup { color: var(--accent); }
.code-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.code-row span { color: var(--muted); font-size: 13px; }
.pending-code { padding: 5px 8px; color: var(--warning); background: #fff1c7; font-family: ui-monospace, Consolas, monospace; }
.invite-code { padding: 5px 9px; border: 1px solid var(--accent); color: var(--ink); background: #fff8df; font-family: ui-monospace, Consolas, monospace; letter-spacing: .08em; }
.copy-code { width: 100%; min-height: 44px; margin-top: 12px; border: 1px solid var(--ink); color: var(--ink); background: transparent; font: inherit; font-weight: 800; cursor: pointer; }
.copy-code:hover, .copy-code:focus-visible { color: #fff; background: var(--ink); }
.draft-note { margin-bottom: 0; font-size: 13px; }
.hero-figure { grid-column: 1 / -1; margin: 20px 0 0; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }

.route-section { padding-block: 40px 80px; }
.section-heading { max-width: 760px; margin-bottom: 34px; }
.section-heading h2 { margin: 0; font-size: clamp(32px, 4vw, 50px); line-height: 1.05; letter-spacing: -.035em; }
.section-heading p:last-child { color: var(--ink-soft); }
.route-layout { display: grid; grid-template-columns: 220px 1fr; gap: 44px; }
.route-index { position: sticky; top: 20px; align-self: start; margin: 0; padding: 0; list-style: none; counter-reset: route; border-top: 1px solid var(--ink); }
.route-index li { border-bottom: 1px solid var(--line); }
.route-index a { display: block; min-height: 48px; padding: 12px 4px; font-weight: 800; text-decoration: none; }
.route-index a:hover { color: var(--accent-dark); }
.route-content { border-top: 1px solid var(--ink); }
.link-group { display: grid; grid-template-columns: minmax(180px, .42fr) minmax(0, 1fr); gap: 26px; padding: 30px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 18px; }
.link-group h3 { margin: 8px 0 0; font-size: 25px; line-height: 1.15; }
.step-no { color: var(--accent); font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.article-list { margin: 0; padding: 0; list-style: none; }
.article-list li + li { border-top: 1px solid var(--line); }
.article-list a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .65fr); gap: 18px; min-height: 60px; padding: 12px 0; text-decoration: none; }
.article-list a:hover strong { color: var(--accent-dark); }
.article-list strong { font-size: 17px; }
.article-list span { color: var(--muted); font-size: 13px; }

.tool-band { padding-block: 66px; color: #f5faf7; background: var(--ink); }
.tool-band .eyebrow { color: #f3a489; }
.tool-band .section-heading p:last-child { color: #c1ced1; }
.section-heading.compact { margin-bottom: 28px; }
.tool-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid #5d6b70; border-left: 1px solid #5d6b70; }
.tool-grid a { display: flex; min-height: 190px; flex-direction: column; padding: 18px; border-right: 1px solid #5d6b70; border-bottom: 1px solid #5d6b70; text-decoration: none; transition: background .2s ease; }
.tool-grid a:hover { background: #223a45; }
.tool-grid span { color: #f3a489; font: 12px ui-monospace, Consolas, monospace; }
.tool-grid strong { margin-top: 45px; font-size: 18px; line-height: 1.2; }
.tool-grid small { margin-top: auto; color: #c1ced1; }
.trust-strip { display: flex; align-items: center; justify-content: space-between; gap: 26px; padding-block: 34px; }
.trust-strip p { margin: 0; color: var(--ink-soft); }
.trust-strip a { flex: 0 0 auto; font-weight: 800; }
.quick-section { padding-block: 22px 58px; }
.quick-links { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-links a { min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); color: var(--ink-soft); background: var(--surface); font-weight: 800; text-decoration: none; }
.quick-links a:hover { border-color: var(--accent); color: var(--accent-dark); }

.editor-note { padding-block: 34px 72px; }
.editor-note-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr); gap: 42px; padding: 34px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.editor-note h2 { max-width: 570px; margin: 0; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.02; letter-spacing: -.04em; }
.editor-note-layout > div { max-width: 640px; }
.editor-note-layout p { margin: 0 0 16px; color: var(--ink-soft); font-size: 17px; }
.editor-note-layout a { display: inline-block; margin-top: 6px; font-weight: 900; }

.site-footer { padding-block: 46px; border-top: 1px solid var(--line); background: var(--surface-alt); }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; }
.footer-grid p { max-width: 520px; color: var(--muted); }
.footer-grid nav { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 8px 20px; }
.footer-grid nav a { min-height: 44px; padding: 8px; font-weight: 700; }

.page-hero { padding-block: 64px 38px; border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 900px; font-size: clamp(38px, 6vw, 68px); }
.page-hero .summary { max-width: 760px; color: var(--ink-soft); font-size: 19px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 9px 22px; margin-top: 24px; color: var(--muted); font-size: 13px; }
.article-cover { margin-block: 32px 0; }
.article-cover img { display: block; width: 100%; height: auto; max-height: 520px; border: 1px solid var(--line); object-fit: cover; box-shadow: var(--shadow); }
.article-layout { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 46px; justify-content: center; padding-block: 44px 90px; }
.article-toc { position: sticky; top: 18px; align-self: start; padding: 16px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.article-toc strong { display: block; margin-bottom: 10px; font-size: 12px; letter-spacing: .08em; }
.article-toc a { display: block; padding: 7px 0; color: var(--ink-soft); font-size: 13px; text-decoration: none; }
.article-toc a:hover { color: var(--accent-dark); }
.article-body { min-width: 0; }
.article-body h2 { margin: 48px 0 12px; font-size: 31px; line-height: 1.16; scroll-margin-top: 20px; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { margin: 30px 0 8px; font-size: 22px; }
.article-body p, .article-body li { color: #263b45; }
.article-body p { margin: 0 0 18px; }
.article-body li + li { margin-top: 8px; }
.article-body table { width: 100%; margin: 24px 0; border-collapse: collapse; background: var(--surface); }
.article-body th, .article-body td { padding: 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-body th { background: var(--surface-alt); }
.evidence-figure { margin: 30px 0; }
.evidence-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.evidence-figure figcaption { margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.answer-box, .warning-box, .disclosure-box { margin: 24px 0; padding: 18px 20px; border-left: 4px solid var(--blue); background: var(--surface); }
.warning-box { border-color: var(--warning); background: #fff8df; }
.disclosure-box { border-color: var(--accent); }
.code-status { display: inline-block; padding: 4px 8px; color: var(--warning); background: #fff1c7; font-family: ui-monospace, Consolas, monospace; }
.article-body .code-status { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; width: min(100%, 520px); padding: 12px; color: var(--ink); }
.article-body .code-status .copy-code { width: auto; min-width: 148px; margin: 0; padding-inline: 14px; }
.copy-result { flex-basis: 100%; color: var(--muted); font-family: var(--font-sans); font-size: 13px; }
.copy-result:empty { display: none; }
.affiliate-disclosure { margin: 18px 0 10px; color: var(--muted); font-size: 14px; }
.faq-item { padding: 18px 0; border-top: 1px solid var(--line); }
.faq-item h3 { margin-top: 0; }
.byline { padding: 18px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* Core guides deliberately use different reading patterns. */
.guide-walkthrough .article-body > h2 { counter-increment: walkthrough; position: relative; padding-top: 24px; }
.guide-walkthrough .article-body { counter-reset: walkthrough; }
.guide-walkthrough .article-body > h2::before { content: "0" counter(walkthrough); position: absolute; top: 0; color: var(--accent); font: 12px ui-monospace, Consolas, monospace; letter-spacing: .12em; }
.decision-line { margin: 24px 0 34px; padding: 22px 24px; border: 1px solid var(--ink); background: var(--surface); box-shadow: 8px 8px 0 var(--surface-alt); }
.decision-line strong { display: block; margin-bottom: 8px; color: var(--accent-dark); font-size: 13px; letter-spacing: .08em; }
.decision-line p { margin-bottom: 0; font-size: 18px; }
.evidence-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 30px 0; }
.evidence-pair .evidence-figure { margin: 0; }

.guide-ledger .article-cover { display: none; }
.guide-ledger .article-layout { grid-template-columns: minmax(0, 1fr); max-width: 1020px; padding-top: 22px; }
.guide-ledger .article-toc { position: static; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 16px 0; }
.guide-ledger .article-toc strong { flex-basis: 100%; }
.guide-ledger .article-toc a { min-height: 44px; padding: 10px 0; }
.guide-ledger .article-body { max-width: 850px; margin-inline: auto; }
.ledger-story { margin: 30px 0; padding: 28px; color: #f5faf7; background: var(--ink); }
.ledger-story .eyebrow { color: #f3a489; }
.ledger-story p { color: #e2ebE7; }
.ledger-story strong { color: #fff; }
.formula-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 24px 0; border: 1px solid var(--ink); background: var(--ink); }
.formula-strip p { margin: 0; padding: 18px; color: var(--ink); background: var(--surface); }

.guide-field .article-cover { display: none; }
.guide-field .page-hero { color: #fff; background: var(--ink); box-shadow: 0 0 0 100vmax var(--ink); clip-path: inset(0 -100vmax); border: 0; }
.guide-field .page-hero .eyebrow { color: #f3a489; }
.guide-field .page-hero .summary, .guide-field .page-hero .meta-row { color: #c1ced1; }
.guide-field .article-layout { padding-top: 64px; }
.security-baseline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 28px 0 38px; border: 1px solid var(--ink); background: var(--ink); }
.security-baseline div { min-height: 150px; padding: 18px; background: var(--surface); }
.security-baseline span { color: var(--accent); font: 12px ui-monospace, Consolas, monospace; }
.security-baseline strong { display: block; margin-top: 30px; font-size: 18px; line-height: 1.2; }
.incident-card { margin: 28px 0; padding: 24px; border-left: 6px solid var(--accent); color: #fff; background: var(--ink); }
.incident-card p, .incident-card li { color: #e2ebe7; }
.extended-notes { margin: 34px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.extended-notes summary { min-height: 58px; padding: 16px 4px; color: var(--ink); font-size: 18px; font-weight: 900; cursor: pointer; }
.extended-notes summary::marker { color: var(--accent); }
.extended-notes[open] summary { border-bottom: 1px solid var(--line); }
.extended-notes-body { padding: 4px 18px 22px; }

.tool-page { max-width: 820px; padding-block: 54px 90px; }
.directory-section { padding-block: 70px; }
.directory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.directory-grid nav { padding: 20px; border-top: 2px solid var(--ink); background: var(--surface); }
.directory-grid strong, .directory-grid a { display: block; }
.directory-grid strong { margin-bottom: 12px; font-size: 13px; letter-spacing: .04em; }
.directory-grid a { padding: 7px 0; color: var(--ink-soft); font-size: 14px; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.directory-grid a:hover { color: var(--accent-dark); }
.calculator { margin-top: 28px; padding: 26px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field label { display: block; margin-bottom: 7px; font-weight: 800; }
.field input, .field select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #87969c; color: var(--ink); background: #fff; }
.calculator button { margin-top: 18px; padding: 10px 18px; border: 0; color: #fff; background: var(--blue); font-weight: 800; cursor: pointer; }
.calculator button:hover { background: var(--ink); }
.result { min-height: 52px; margin-top: 20px; padding: 14px 16px; border: 1px solid var(--line); background: var(--surface-alt); font-weight: 800; }
.method-note { color: var(--muted); font-size: 14px; }

@media (max-width: 980px) {
  .header-row { grid-template-columns: auto auto 1fr; }
  .menu-button { display: inline-flex; justify-self: end; }
  .site-nav { display: none; grid-column: 1 / -1; padding-bottom: 12px; }
  .site-nav.is-open { display: grid; grid-template-columns: repeat(2, 1fr); }
  .language-nav { justify-self: end; }
  .hero { grid-template-columns: 1fr; }
  .benefit-panel { max-width: 620px; }
  .route-layout, .article-layout { grid-template-columns: 1fr; }
  .route-index, .article-toc { position: static; }
  .route-index { display: flex; flex-wrap: wrap; gap: 6px 16px; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-note-layout { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 28px, var(--shell)); }
  .header-row { gap: 10px; min-height: 66px; }
  .brand { font-size: 15px; }
  .language-nav a { padding: 10px 6px; font-size: 12px; }
  .hero { padding-block: 42px 34px; }
  h1 { font-size: clamp(38px, 13vw, 56px); }
  .hero-actions { display: grid; }
  .benefit-panel { padding: 20px; box-shadow: 6px 6px 0 var(--surface-alt); }
  .link-group { grid-template-columns: 1fr; gap: 14px; }
  .article-list a { grid-template-columns: 1fr; gap: 3px; }
  .tool-grid { grid-template-columns: 1fr; }
  .directory-grid { grid-template-columns: 1fr; }
  .tool-grid a { min-height: 140px; }
  .trust-strip, .footer-grid { display: grid; grid-template-columns: 1fr; }
  .footer-grid nav { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .article-body table { display: block; overflow-x: auto; }
  .evidence-pair, .formula-strip, .security-baseline { grid-template-columns: 1fr; }
  .editor-note { padding-block: 12px 46px; }
  .editor-note-layout { gap: 24px; padding-block: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
