/* One stylesheet for the public site. Colours and sizes live in custom
   properties; the dark palette repeats for no-JS visitors who prefer dark. */
:root {
  --bg: #ffffff; --bg-alt: #f7f8fa; --surface: #ffffff; --surface-2: #f2f4f7;
  --text: #14171f; --muted: #5a6272; --line: #e3e6ec; --line-strong: #cdd2dc;
  --accent: #2b54d9; --accent-hover: #2246bd; --accent-text: #ffffff; --accent-soft: #eef2fe;
  --good: #137a4b; --warn-bg: #fff6e0; --warn-line: #eed495; --warn-text: #5e4500; --bad: #b42323;
  --code-bg: #f4f5f8; --code-text: #1e2430;
  --fs-xs: 0.8125rem; --fs-sm: 0.875rem; --fs-md: 1rem; --fs-lg: 1.125rem; --fs-xl: 1.375rem; --fs-2xl: 1.75rem; --fs-3xl: 2.25rem; --fs-4xl: 3rem;
  --radius: 8px; --radius-lg: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0e1117; --bg-alt: #131720; --surface: #161b25; --surface-2: #1d2330;
  --text: #e8ebf1; --muted: #9aa3b4; --line: #272e3b; --line-strong: #3a4354;
  --accent: #7f9cf5; --accent-hover: #9db3f8; --accent-text: #0e1117; --accent-soft: #1c2542;
  --good: #4cc38a; --warn-bg: #2c2410; --warn-line: #5b4a1b; --warn-text: #f0d48a; --bad: #f28b82;
  --code-bg: #131821; --code-text: #d9deea;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0e1117; --bg-alt: #131720; --surface: #161b25; --surface-2: #1d2330;
    --text: #e8ebf1; --muted: #9aa3b4; --line: #272e3b; --line-strong: #3a4354;
    --accent: #7f9cf5; --accent-hover: #9db3f8; --accent-text: #0e1117; --accent-soft: #1c2542;
    --good: #4cc38a; --warn-bg: #2c2410; --warn-line: #5b4a1b; --warn-text: #f0d48a; --bad: #f28b82;
    --code-bg: #131821; --code-text: #d9deea;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--fs-md)/1.6 var(--font); overflow-wrap: break-word; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0; font-weight: 650; }
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: 0.875em; }
code { background: var(--code-bg); color: var(--code-text); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--code-bg); color: var(--code-text); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 1em; overflow-x: auto; line-height: 1.55; }
pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.25em; font-size: var(--fs-sm); display: block; overflow-x: auto; }
th, td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.wrap.narrow { max-width: 800px; }
.narrow-block { max-width: 760px; }
.muted { color: var(--muted); }
.lead { font-size: var(--fs-lg); color: var(--muted); margin: 14px 0 1.5em; }
.center { text-align: center; }
.center-row { justify-content: center; }
.empty { padding: 16px; background: var(--bg-alt); border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: var(--radius); z-index: 40; }
.skip:focus { left: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 550; padding: 9px 16px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.3; }
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-sm { padding: 6px 12px; font-size: var(--fs-sm); }
.btn-block { width: 100%; }
.link-btn { font: inherit; background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--text); background: none; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--surface-2); }

.site-header { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--text); margin-right: 12px; }
.logo:hover { text-decoration: none; }
.logo img { display: block; }
.nav { display: flex; align-items: center; gap: 2px; flex: 1; font-size: var(--fs-sm); }
.nav > a, .nav-drop > summary, .nav-actions > a:not(.btn) { color: var(--muted); padding: 6px 9px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.nav > a:hover, .nav-drop > summary:hover, .nav-actions > a:not(.btn):hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-drop { position: relative; }
.nav-drop > summary { list-style: none; }
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop > summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 2px 2px 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.nav-drop-list { position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; box-shadow: 0 6px 20px rgb(0 0 0 / 0.08); }
.nav-drop-list a { display: block; padding: 7px 9px; border-radius: 6px; color: var(--text); }
.nav-drop-list a:hover { background: var(--surface-2); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-toggle { display: none; order: 3; }
.theme-toggle { order: 2; }

.notice { font-size: var(--fs-sm); padding: 10px 0; }
.notice-warn { background: var(--warn-bg); color: var(--warn-text); border-bottom: 1px solid var(--warn-line); }

.hero { padding: 64px 0 56px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero h1 { font-size: var(--fs-4xl); line-height: 1.1; letter-spacing: -0.025em; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.console { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); font-size: var(--fs-sm); overflow: hidden; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); }
.console-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.console-title { font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--good); font-size: var(--fs-xs); font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.console-body { padding: 16px; display: grid; gap: 14px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-label { display: block; color: var(--muted); font-size: var(--fs-xs); }
.stat-value { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -0.01em; }
.meter { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); }
.meter-sample { width: 32%; }
.console-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.field-view { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; min-width: 0; }
.field-view span { display: block; color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field-view strong { font-weight: 600; }
.console-url code { display: block; margin-top: 4px; padding: 8px 10px; font-size: var(--fs-xs); border: 1px solid var(--line); }
.console figcaption { padding: 8px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-xs); }

.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { margin-bottom: 20px; }
.section-lead { margin-top: -10px; margin-bottom: 20px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feature-grid article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.feature-grid h2, .feature-grid h3 { font-size: var(--fs-md); margin: 0 0 6px; font-weight: 620; }
.feature-grid p { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: var(--fs-xs); font-weight: 600; margin-bottom: 10px; background: var(--surface); }
.steps h3 { font-size: var(--fs-md); margin-bottom: 4px; font-weight: 620; }
.steps p { color: var(--muted); font-size: 0.9375rem; margin: 0; }

.packs { margin-bottom: 1.25em; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.seg { cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg span { display: block; padding: 6px 14px; font-size: var(--fs-sm); font-weight: 550; color: var(--muted); border-radius: 6px; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.packs.is-enhanced { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 0 32px; align-items: center; }
.packs.is-enhanced .segmented { grid-column: 1 / -1; justify-self: start; }
.packs.is-enhanced .pack-grid { grid-template-columns: minmax(0, 1fr); }
.packs.is-enhanced .pack-notes { margin-top: 0; }
.packs.is-enhanced .pack:not(.is-selected) { display: none; }
.pack { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.pack header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.pack h3 { font-size: var(--fs-md); }
.pack-volume { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.pack-price { font-size: var(--fs-3xl); font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 4px; }
.pack-per { font-size: var(--fs-sm); margin-bottom: 16px; }
.pack-state { margin: 0; padding: 9px 12px; border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font-size: var(--fs-sm); text-align: center; }
.pack-off .pack-price { color: var(--muted); }
.pack-notes { margin: 16px 0 0; padding-left: 18px; color: var(--muted); font-size: var(--fs-sm); }

.code-tabs { margin-bottom: 1.25em; }
.tab-list { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 8px; }
.tab-list button { font: inherit; font-size: var(--fs-sm); font-weight: 550; color: var(--muted); padding: 6px 12px; background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; }
.tab-list button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.code-title { font-size: var(--fs-sm); margin: 12px 0 6px; }
.code-tabs.is-enhanced .code-title { display: none; }
.code-tabs.is-enhanced .code-panel:not(.is-active) { display: none; }
.code-block { position: relative; }
.code-block pre { margin: 0; min-height: 3em; }
.copy { position: absolute; top: 8px; right: 8px; font: inherit; font-size: var(--fs-xs); padding: 3px 9px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.copy:hover { color: var(--text); }

.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 580; }
.faq details p { margin: 10px 0 2px; color: var(--muted); }

.page { padding-top: 28px; padding-bottom: 64px; }
.page > h1, article.page > h1 { margin-bottom: 8px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 18px; padding: 0; font-size: var(--fs-sm); color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 4px; color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.prose { margin-top: 20px; }
.prose h2 { font-size: var(--fs-xl); margin: 1.6em 0 0.5em; }
.prose h3 { margin: 1.2em 0 0.4em; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 0.35em; }
.page > h2, .wrap > h2 { font-size: var(--fs-xl); margin: 1.6em 0 0.5em; }
.draft { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 12px 14px; margin: 14px 0; font-size: var(--fs-sm); }
.draft p { margin: 0 0 4px; }
.draft p:last-child { margin: 0; }
.privacy-note { background: var(--accent-soft); border-radius: var(--radius); padding: 10px 14px; font-size: var(--fs-sm); }
.post-list article { padding: 18px 0; border-bottom: 1px solid var(--line); }
.post-list h2 { font-size: var(--fs-xl); margin-bottom: 4px; }
.post-list p { margin: 0 0 6px; }
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 40px; padding: 22px 24px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cta-band h2 { font-size: var(--fs-lg); margin-bottom: 4px; }
.cta-band p { margin: 0; }
.country-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 16px; font-size: var(--fs-sm); }
.country-list li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.code { font-family: var(--mono); color: var(--muted); margin-right: 6px; }

.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; margin: 0 0 1.5em; display: grid; gap: 14px; min-width: 0; }
.tool > * { min-width: 0; }
.field { display: grid; gap: 4px; font-size: var(--fs-sm); font-weight: 550; min-width: 0; }
.field.grow { flex: 1 1 200px; }
.field-row { display: flex; flex-wrap: wrap; gap: 12px; }
input[type="text"], input[type="number"], input[type="password"], input[type="email"], input[type="url"], select, textarea {
  font: inherit; font-weight: 400; width: 100%; padding: 8px 10px; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 6px; }
textarea { font-family: var(--mono); font-size: var(--fs-sm); resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.check { display: flex; gap: 8px; align-items: center; font-size: var(--fs-sm); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-status { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.tool-status:empty { display: none; }
.tool-status.is-error { color: var(--bad); }
.tool-status.is-ok { color: var(--good); }
.tool-errors { margin: 0; padding-left: 18px; color: var(--bad); font-size: var(--fs-sm); }
.kv { margin: 0 0 1em; display: grid; gap: 0; }
.kv > div { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: var(--fs-sm); }
.kv dd { margin: 0; }
.mono { font-family: var(--mono); }
.result { padding: 14px 16px; background: var(--bg-alt); border-radius: var(--radius); }
.result-value { font-size: var(--fs-2xl); font-weight: 650; margin: 0 0 2px; letter-spacing: -0.015em; }
.result p:last-child { margin: 0; }

.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding-top: 40px; font-size: var(--fs-sm); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand { font-weight: 650; margin-bottom: 6px; }
.site-footer h2 { font-size: var(--fs-sm); margin-bottom: 10px; font-weight: 620; }
.site-footer nav a { display: block; color: var(--muted); padding: 2px 0; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 24px; margin-top: 28px; border-top: 1px solid var(--line); }
.footer-bottom p { margin: 0; }
.footer-langs { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); }
.footer-langs a { color: var(--muted); text-decoration: underline; }
.footer-langs span[aria-current] { color: var(--text); font-weight: 600; }
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 14px 16px; box-shadow: 0 8px 30px rgb(0 0 0 / 0.15); font-size: var(--fs-sm); }
.consent p { margin: 0 0 10px; }
.consent-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 1000px) {
  .feature-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero { padding: 40px 0; }
  .nav-toggle { display: inline-flex; }
  .header-row { flex-wrap: wrap; }
  .logo { margin-right: auto; }
  .nav { order: 4; flex: 1 0 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 12px; font-size: var(--fs-md); }
  .js .nav { display: none; }
  .js .nav.is-open { display: flex; }
  .nav > a, .nav-drop > summary, .nav-actions > a:not(.btn) { display: block; padding: 10px 4px; }
  .nav-drop-list { position: static; border: 0; box-shadow: none; padding: 0 0 4px 12px; background: none; }
  .nav-drop-list a { padding: 8px 4px; }
  .nav-actions { margin: 8px 0 0; padding-top: 12px; border-top: 1px solid var(--line); justify-content: space-between; }
}
@media (max-width: 720px) {
  .packs.is-enhanced { grid-template-columns: minmax(0, 1fr); }
  .packs.is-enhanced .pack-notes { margin-top: 16px; }
  .feature-grid, .feature-grid-4 { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .section { padding: 40px 0; }
  h1, .hero h1 { font-size: var(--fs-2xl); }
  .hero h1 { font-size: 2rem; }
  h2 { font-size: var(--fs-xl); }
  .stat-value { font-size: var(--fs-lg); }
  .console-fields { grid-template-columns: repeat(2, 1fr); }
  .kv > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .tool { padding: 14px; }
  .cta-band { padding: 18px; }
  .cta-actions .btn { flex: 1 1 auto; }
}
