/* Shared structure for all four sites. Each site's styles.css sets the tokens
   (colors, type, radius, shadows) and its own hero and signature sections. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight, 600); margin: 0; text-wrap: balance; letter-spacing: var(--tracking, -0.025em); line-height: 1.1; color: var(--heading, var(--text)); }
h1 { font-size: clamp(40px, 5.4vw, 68px); line-height: 1.03; }
h2 { font-size: clamp(30px, 3.4vw, 44px); }
h3 { font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.9em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.lead { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 54ch; }

/* Buttons */
.btn, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--font); color: var(--brand-ink); background: var(--brand);
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: 13px 20px; cursor: pointer;
  text-decoration: none; white-space: nowrap; box-shadow: var(--btn-shadow, none);
  transition: background-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover, button:hover { background: var(--brand-hover); }
.btn:active, button:active { transform: translateY(1px); }
button:disabled { opacity: .6; cursor: wait; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: none; }
.btn-secondary:hover { background: var(--surface-2); }
.btn-lg { padding: 16px 26px; font-size: 16px; }

/* Forms */
input, select, textarea {
  font: 400 15px/1.4 var(--font); width: 100%; padding: 12px 14px; color: var(--text); background: var(--field, var(--surface));
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 120px; resize: vertical; font-family: var(--mono); font-size: 13.5px; }
input::placeholder, textarea::placeholder { color: var(--placeholder, var(--muted)); opacity: .75; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
input[type="checkbox"] { width: 16px; height: 16px; padding: 0; accent-color: var(--brand); }
.field { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); }
.field span { font-weight: 400; color: var(--muted); margin-left: 4px; }
.field input, .field select, .field textarea { display: block; margin-top: 6px; }
.inline { display: flex; gap: 10px; }
.stack { display: grid; gap: 14px; align-content: start; }

/* Site header */
.site-head { position: sticky; top: 0; z-index: 5; background: var(--head-bg); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 20px var(--font-display); letter-spacing: -0.02em; text-decoration: none; color: var(--heading, var(--text)); }
.logo svg { width: 28px; height: 28px; flex: none; }
.links { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.links a { text-decoration: none; color: var(--muted); }
.links a:hover { color: var(--text); }
.head-cta { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.head-cta a:not(.btn) { text-decoration: none; color: var(--muted); }
.head-cta .btn { padding: 10px 16px; }

/* Sections */
.section { padding: 104px 0; }
.section-tint { background: var(--tint); border-block: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 48px; display: grid; gap: 16px; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }

.surface { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 28px; }

/* Assurances row under a hero */
.assure { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; padding: 0; margin: 0; font-size: 14.5px; color: var(--muted); }
.assure li { display: flex; align-items: center; gap: 8px; }
.assure li::before { content: ''; width: 16px; height: 16px; border-radius: 50%; background: var(--brand-soft) no-repeat center / 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.5l2.5 2.5 4.5-5.5'/%3E%3C/svg%3E"); }

/* Status pills and results */
.badge { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px/1 var(--font); padding: 6px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin: 0 10px 8px 0; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-valid, .badge-matched { background: var(--ok-soft); color: var(--ok); }
.badge-invalid, .badge-not_found, .badge-no-match, .badge-error { background: var(--bad-soft); color: var(--bad); }
.badge-risky, .badge-unknown { background: var(--warn-soft); color: var(--warn); }
.result-meta { display: inline; font-size: 13.5px; color: var(--muted); }
.result-meta a { color: var(--brand-text, var(--brand)); font-weight: 600; }
.result-error { color: var(--bad); font-size: 14.5px; }
.result-json { font: 400 12.5px/1.6 var(--mono); background: var(--code-bg); color: var(--code-text); border-radius: var(--radius-sm); padding: 16px; margin: 6px 0 0; overflow: auto; max-height: 380px; }

/* Pricing */
.packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.pack { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 26px 24px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.pack.is-featured { background: var(--feature-bg); border-color: var(--feature-border); box-shadow: var(--shadow-lg); color: var(--feature-text); }
.pack-flag { position: absolute; top: 22px; right: 20px; margin: 0; font: 600 12px/1 var(--font); padding: 6px 10px; border-radius: 999px; background: var(--feature-flag-bg); color: var(--feature-flag-text); }
.pack-name { font: 600 15px var(--font); letter-spacing: 0; color: inherit; opacity: .8; }
.pack-price { font: var(--display-weight, 600) 48px/1.1 var(--font-display); letter-spacing: -0.03em; margin-top: 14px; font-variant-numeric: tabular-nums; }
.pack-credits { font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 6px; }
.pack-rate { font-size: 13.5px; opacity: .7; margin-bottom: 24px; }
.pack-buy { margin-top: auto; width: 100%; }
.pack:not(.is-featured) .pack-buy { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: none; }
.pack:not(.is-featured) .pack-buy:hover { background: var(--surface-2); }
.pack.is-featured .pack-buy { background: var(--feature-btn-bg); color: var(--feature-btn-text); }

.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.price-row h3 { margin-bottom: 6px; }
.price-row form { margin-top: 16px; }
[data-payg-preview], [data-calc-out] { display: block; font-size: 14px; color: var(--muted); margin-top: 10px; min-height: 22px; }
.costs { list-style: none; padding: 0; margin: 18px 0 0; }
.costs li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--border); font-size: 14.5px; }
.costs b { font-weight: 600; white-space: nowrap; }

/* FAQ */
.faq { max-width: 760px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 36px 22px 0; font: 600 17px var(--font); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 18px; font: 400 24px/1 var(--font); color: var(--muted); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 36px 24px 0; color: var(--muted); max-width: 66ch; }

/* Closing call to action */
.closer { text-align: center; display: grid; gap: 20px; justify-items: center; padding: 72px 32px; border-radius: calc(var(--radius) + 8px); background: var(--closer-bg); color: var(--closer-text); }
.closer h2 { color: inherit; max-width: 18ch; }
.closer p { opacity: .8; max-width: 46ch; }
.closer .btn { background: var(--closer-btn-bg); color: var(--closer-btn-text); }

.site-foot { padding: 40px 0 56px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--border); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.site-foot nav { display: flex; gap: 24px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--text); }

/* Code windows */
.window { background: var(--code-bg); color: var(--code-text); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--code-border, transparent); }
.window-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.08); font: 500 12.5px var(--mono); color: var(--code-dim); }
.window-bar i { display: flex; gap: 6px; }
.window-bar i::before, .window-bar i::after, .window-bar i b { content: ''; width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.16); display: block; }
.window pre { margin: 0; padding: 20px; font: 400 13px/1.7 var(--mono); overflow-x: auto; }
.tk { color: var(--code-key); } .ts { color: var(--code-str); } .tc { color: var(--code-dim); } .tn { color: var(--code-num); }

/* ---------- Dashboard ---------- */
.app { padding: 40px 0 96px; display: grid; gap: 24px; }
.app-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.app-title h1 { font-size: 30px; }
.stats { display: grid; grid-template-columns: 1.1fr 1fr 1.3fr; gap: 16px; }
.stat-label { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.stat-big { font: var(--display-weight, 600) 52px/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--heading, var(--text)); }
.stat-value { font: 500 14px var(--mono); word-break: break-all; }
.keybox { background: var(--brand-soft); border-color: var(--brand); }
.keybox code { display: block; font: 500 13.5px/1.5 var(--mono); word-break: break-all; margin: 8px 0 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.app h2 { font-size: 22px; letter-spacing: -0.015em; }
.app h3 { font-size: 17px; }
.app .packs .pack-price { font-size: 38px; }
.form-inline { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.form-inline .field { flex: 1; min-width: 150px; }
.table-scroll { overflow-x: auto; }
table.log { width: 100%; border-collapse: collapse; font-size: 14px; }
.log th, .log td { text-align: left; padding: 11px 8px 11px 0; border-bottom: 1px solid var(--border); }
.log th { font-weight: 500; color: var(--muted); font-size: 13px; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.pos { color: var(--ok); font-weight: 600; }
.auth { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 880px; margin: 72px auto 120px; }
.auth form { display: grid; gap: 16px; align-content: start; }
.auth h2 { font-size: 26px; }

.flash { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); width: max-content; max-width: min(480px, calc(100vw - 32px)); padding: 13px 18px; border-radius: var(--radius-sm); background: var(--toast-bg, #14161c); color: #fff; font-size: 14.5px; z-index: 20; box-shadow: 0 12px 32px -8px rgba(0,0,0,.4); }
.flash-error { background: var(--bad); color: #fff; }

@media (max-width: 980px) {
  .packs { grid-template-columns: 1fr 1fr; }
  .price-row, .two, .stats, .auth { grid-template-columns: 1fr; }
  .links { display: none; }
  .section { padding: 72px 0; }
}
@media (max-width: 560px) {
  .packs { grid-template-columns: 1fr; }
  .inline { flex-direction: column; }
  .head-cta a:not(.btn) { display: none; }
  .closer { padding: 48px 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.btn-small { padding: 9px 12px; font-size: 13.5px; margin-top: 14px; }
[data-login-note] a { color: var(--brand-text, var(--brand)); font-weight: 600; }

/* ---------- Inner pages ---------- */
.links a[aria-current="page"] { color: var(--text); font-weight: 600; }
.page-hero { padding: 80px 0 72px; }
.page-hero .wrap { display: grid; gap: 22px; justify-items: start; }
.page-hero h1 { font-size: clamp(36px, 4.6vw, 58px); max-width: 18ch; }
.page-hero.center .wrap { justify-items: center; text-align: center; }
.page-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.more-link { display: inline-block; margin-top: 28px; font-weight: 600; color: var(--brand-text, var(--brand)); text-underline-offset: 4px; }

.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.points div { display: grid; gap: 10px; align-content: start; padding-top: 20px; border-top: 2px solid var(--border-strong); }
.points p { color: var(--muted); font-size: 15.5px; }

.specs { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.specs div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); font-size: 15px; }
.specs dt { font-weight: 600; }
.specs dd { margin: 0; color: var(--muted); }

.buy { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; padding: 40px; }
.buy-price { font: var(--display-weight, 600) 56px/1 var(--font-display); letter-spacing: -0.035em; color: var(--heading, var(--text)); }
.buy-what { font-weight: 600; font-size: 18px; margin: 10px 0 4px; }
.buy-actions { display: grid; gap: 10px; justify-items: stretch; min-width: 240px; }
.buy-actions small { text-align: center; color: var(--muted); font-size: 13.5px; }
.buy-actions small a { color: inherit; }

/* ---------- Checkout ---------- */
.checkout { padding: 56px 0 104px; }
.checkout h1 { font-size: clamp(30px, 3.6vw, 42px); margin-bottom: 28px; }
.co-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: start; }
.co-grid h2 { font-size: 19px; letter-spacing: -0.01em; margin-bottom: 16px; }
.options { display: grid; gap: 10px; }
.option { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); }
.option:has(input[type="radio"]:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.option input[type="radio"] { width: 18px; height: 18px; accent-color: var(--brand); padding: 0; }
.option b { display: block; }
.option small { color: var(--muted); font-size: 13.5px; }
.option strong { font: 600 18px var(--font-display); font-variant-numeric: tabular-nums; }
.option-amount { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.option-amount input { width: 96px; padding: 8px 10px; }
.co-side { position: sticky; top: 92px; display: grid; gap: 18px; }
.receipt { margin: 0; }
.receipt div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 600; text-align: right; word-break: break-all; }
.co-total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.co-total span:last-child { font: var(--display-weight, 600) 34px/1 var(--font-display); letter-spacing: -0.03em; color: var(--heading, var(--text)); }
.co-side button { width: 100%; }
.co-fine { font-size: 13.5px; color: var(--muted); }
.co-fine a, [data-co-note] a { color: var(--brand-text, var(--brand)); font-weight: 600; }
.co-result { max-width: 620px; margin: 40px auto 0; display: grid; gap: 18px; justify-items: start; }
.co-result .badge { margin: 0; }
.co-result .receipt { width: 100%; }
.co-result h1 { margin: 0; }

@media (max-width: 980px) {
  .points, .specs, .co-grid { grid-template-columns: 1fr; }
  .buy { grid-template-columns: 1fr; padding: 28px; }
  .co-side { position: static; }
}
@media (max-width: 560px) { .specs div { grid-template-columns: 1fr; gap: 2px; } .option { grid-template-columns: auto 1fr; } .option strong, .option-amount { grid-column: 2; } }
