:root {
  color-scheme: light dark;
  --ink: #15312f;
  --muted: #536765;
  --paper: #fbfcf8;
  --panel: #ffffff;
  --line: #cfdbd5;
  --brand: #0e5b55;
  --brand-dark: #083d39;
  --accent: #d9ff76;
  --soft: #edf6f0;
  --warning: #fff5d6;
  --focus: #ef7d00;
  --shadow: 0 14px 40px rgba(20, 60, 55, .09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.65 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.shell { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }
.reading-column { width: min(780px, 100%); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; transform: translateY(-150%); background: #fff; color: #000; }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(207,219,213,.85); background: rgba(251,252,248,.94); backdrop-filter: blur(12px); }
.header-inner { min-height: 72px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; max-width: 330px; color: var(--ink); font-weight: 760; line-height: 1.15; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px; color: var(--accent); background: var(--brand-dark); }
.primary-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.primary-nav a { color: var(--ink); font-size: .94rem; font-weight: 650; text-decoration: none; }
.primary-nav a:hover { color: var(--brand); }
.menu-toggle { display: none; margin-left: auto; padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--panel); }

.hero { padding-block: clamp(42px, 7vw, 82px) 34px; text-align: center; }
.eyebrow { margin: 0 0 9px; color: var(--brand); font-size: .78rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.16; letter-spacing: -.025em; }
h1 { max-width: 900px; margin: 0 auto 18px; font-size: clamp(2.2rem, 6vw, 4.35rem); }
h2 { margin: 2.3rem 0 .8rem; font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.12rem; }
.lede { max-width: 720px; margin: 0 auto 28px; color: var(--muted); font-size: clamp(1.06rem, 2vw, 1.25rem); }
.page-layout { padding-block: 42px 72px; }
.page-layout h1 { margin-inline: 0; font-size: clamp(2rem, 5vw, 3.55rem); }
.page-layout .lede { margin-inline: 0; }
.breadcrumbs { display: flex; gap: 8px; margin-bottom: 28px; color: var(--muted); font-size: .88rem; }

.tool-shell { overflow: hidden; width: min(820px, 100%); margin: 26px auto 12px; border: 1px solid #b8c9c1; border-radius: 22px; background: #f7fbf8; box-shadow: var(--shadow); }
.secure-tool-frame { display: block; width: 100%; height: 660px; border: 0; background: #f7fbf8; transition: height .15s ease-out; }
.privacy-line { max-width: 760px; margin: 12px auto 24px; color: var(--muted); font-size: .91rem; text-align: center; }
.trust-strip { border-block: 1px solid var(--line); background: var(--soft); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding-block: 25px; }
.trust-grid div { display: grid; gap: 3px; }
.trust-grid span { color: var(--muted); font-size: .9rem; }
.content-section { padding-block: 6px; }
.content-section p, .content-section li { color: #334b48; }
.content-section li + li { margin-top: .45rem; }
.content-section code { white-space: normal; overflow-wrap: anywhere; word-break: break-all; padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--soft); }
details { margin: 11px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
summary { cursor: pointer; font-weight: 720; }
.notice { padding: 14px 16px; border-left: 4px solid #bd8a00; background: var(--warning); color: #4c3a05; }
.review-note { margin-top: 36px; color: var(--muted); font-size: .88rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: -10px 0 24px; color: var(--muted); font-size: .9rem; }
.toc { margin: 24px 0 34px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.toc ol { columns: 2; gap: 30px; margin: 10px 0 0; padding-left: 20px; }
.toc li { break-inside: avoid; margin: 5px 0; }
.content-section { scroll-margin-top: 92px; }
.content-section table { width: 100%; margin: 20px 0; border-collapse: collapse; font-size: .94rem; }
.content-section th, .content-section td { padding: 11px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.content-section th { background: var(--soft); }
.content-section ol { padding-left: 22px; }
.resource-list { padding-left: 22px; }
.resource-list li + li { margin-top: 12px; }
.flow-diagram { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; margin: 24px 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); text-align: center; }
.flow-diagram span { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-weight: 700; }
.flow-diagram small { color: var(--muted); font-weight: 500; }
.flow-diagram i { grid-column: 1 / -1; color: var(--muted); font-size: .88rem; }

.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.card { display: grid; gap: 6px; min-height: 128px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: var(--panel); text-decoration: none; box-shadow: 0 5px 18px rgba(20, 60, 55, .04); }
.card:hover { border-color: var(--brand); transform: translateY(-1px); }
.card span { color: var(--muted); }
.ad-reserve { display: grid; place-items: center; min-height: 140px; margin: 42px 0; border: 1px dashed #aebdb6; border-radius: 14px; color: #71817b; background: #f3f5f1; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.ad-reserve .adsbygoogle { width: 100%; min-width: 0; }
.cta-cluster { display: grid; gap: 12px; margin: 36px 0; }
.cta-card { display: flex; justify-content: space-between; gap: 22px; align-items: center; padding: 20px 22px; border: 1px solid var(--brand); border-radius: 15px; color: var(--ink); background: var(--soft); text-decoration: none; }
.cta-card span { display: grid; gap: 4px; }
.cta-card small { color: var(--muted); font-size: .92rem; }
.cta-card b { flex: 0 0 auto; color: var(--brand); }
.cta-safety { border-color: #bd8a00; background: var(--warning); }
.related-content, .sources { margin-top: 44px; padding-top: 4px; border-top: 1px solid var(--line); }
.compact-card { min-height: 100px; }
.author-box { margin-top: 44px; padding: 20px 22px; border-left: 4px solid var(--brand); background: var(--soft); }
.author-box p { margin-bottom: 0; color: var(--muted); }

.button { padding: 10px 14px; border: 1px solid var(--brand); border-radius: 10px; color: #fff; background: var(--brand); cursor: pointer; }
.button.secondary { color: var(--ink); background: var(--panel); }

.site-footer { margin-top: 72px; border-top: 1px solid var(--line); background: #0b302d; color: #e9f4ef; }
.footer-service-copy { padding-top: 36px; }
.footer-service-copy p { max-width: 1050px; margin: 0; color: #c6d8d2; font-size: .88rem; line-height: 1.65; }
.footer-service-copy a { color: #e9f4ef; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding-block: 44px; }
.footer-grid div { display: grid; align-content: start; gap: 8px; }
.footer-grid strong { margin-bottom: 4px; color: var(--accent); }
.footer-grid a, .link-button { width: fit-content; color: #e9f4ef; font-size: .9rem; }
.link-button { padding: 0; border: 0; background: transparent; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-block: 18px 28px; border-top: 1px solid rgba(255,255,255,.16); font-size: .82rem; }
.footer-bottom p { margin: 0; }

@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .primary-nav { position: absolute; top: 64px; right: 16px; left: 16px; display: none; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
  .primary-nav.is-open { display: grid; }
  .trust-grid, .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .toc ol { columns: 1; }
  .flow-diagram { grid-template-columns: 1fr; }
  .flow-diagram b { transform: rotate(90deg); }
  .flow-diagram i { grid-column: auto; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 22px, 1160px); }
  .brand span:last-child { max-width: 190px; font-size: .88rem; }
  .hero { padding-top: 32px; }
  .trust-grid, .card-grid, .footer-grid { grid-template-columns: 1fr; }
  .secure-tool-frame { height: 760px; }
  .footer-bottom { display: grid; }
  .cta-card { align-items: flex-start; flex-direction: column; }
}

@media (prefers-color-scheme: dark) {
  :root { --ink: #e9f4ef; --muted: #aabdb6; --paper: #091a19; --panel: #102624; --line: #36504c; --brand: #9fe7d5; --brand-dark: #b7f4e5; --soft: #122c29; --warning: #3b310f; --shadow: 0 14px 40px rgba(0,0,0,.28); }
  .site-header { background: rgba(9,26,25,.94); }
  .content-section p, .content-section li { color: #c4d4cf; }
  .tool-shell, .secure-tool-frame { background: #0d201e; }
  .ad-reserve { color: #9aaba5; background: #10201e; }
  .notice { color: #f7e4a9; }
}

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