/**
 * ==========================================================================
 * BuildMateCalc — main.css · Design System v1.0.0
 * ==========================================================================
 * Premium light aesthetic · Sora (headings) + Inter (body) · indigo primary.
 * Dark mode via `data-theme="dark"` on <html> (JS, localStorage, defaults to
 * prefers-color-scheme). Mobile-first. No jQuery.
 *
 * CLASS CONTRACT — other workers depend on these exact names:
 *
 * Buttons:        .btn .btn-primary .btn-secondary
 * Forms:          .field .input .select .textarea
 *                 input[type=range] (custom styled)
 *                 .switch (label toggle; child: <input type=checkbox> + .switch__track > .switch__thumb)
 * Cards:          .card .tool-card .category-card .result-card
 * Tool UI:        .tool-shell .tool-ui .tool-results
 * Results:        .stat .stat-value .stat-label
 *                 .progress (> .progress__bar)
 *                 .bar-chart .bar (rows: .bar-row > .bar-label + .bar-track > .bar + .bar-value)
 * Tables:         .table-scroll (wrapper, horizontal scroll on small screens)
 * Feedback:       .alert-error .badge .badge--popular .disclaimer (amber box)
 * Tool content:   .tool-about .tool-howto .tool-faq
 * Articles:       .toc .related-tool .byline .lead
 * Ads:            .ad-slot (.ad-slot:empty{display:none})
 * Homepage:       .hero .search-input
 * Global:         :focus-visible ring, print styles, prefers-reduced-motion.
 * ==========================================================================
 */

/* ------------------------------------------------------------------ */
/* 1. Tokens                                                           */
/* ------------------------------------------------------------------ */
:root {
  --pt-primary: #ea580c;
  --pt-primary-strong: #c2410c;
  --pt-primary-ink: #9a3412;
  --pt-primary-50: #fff7ed;
  --pt-primary-100: #ffedd5;
  --pt-primary-200: #fed7aa;

  --pt-ink: #0f172a;
  --pt-ink-soft: #334155;
  --pt-muted: #64748b;
  --pt-faint: #94a3b8;

  --pt-bg: #ffffff;
  --pt-bg-soft: #f8fafc;
  --pt-bg-tint: #f1f5f9;
  --pt-border: #e2e8f0;
  --pt-border-strong: #cbd5e1;

  --pt-success: #16a34a;
  --pt-success-bg: #f0fdf4;
  --pt-success-border: #bbf7d0;
  --pt-warn: #d97706;
  --pt-warn-bg: #fffbeb;
  --pt-warn-border: #fde68a;
  --pt-danger: #dc2626;
  --pt-danger-bg: #fef2f2;
  --pt-danger-border: #fecaca;

  --pt-radius-sm: 8px;
  --pt-radius: 12px;
  --pt-radius-lg: 16px;
  --pt-radius-xl: 24px;

  --pt-shadow-sm: 0 1px 2px rgb(15 23 42 / 0.06);
  --pt-shadow: 0 4px 12px -2px rgb(15 23 42 / 0.08), 0 2px 6px -2px rgb(15 23 42 / 0.05);
  --pt-shadow-lg: 0 12px 32px -8px rgb(234 88 12 / 0.18), 0 4px 12px -4px rgb(15 23 42 / 0.08);

  --pt-font-heading: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pt-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --pt-container: 1200px;
  --pt-header-h: 72px;
}

/* Dark theme — applied by JS (localStorage, default prefers-color-scheme). */
html[data-theme="dark"] {
  --pt-primary: #fb923c;
  --pt-primary-strong: #fdba74;
  --pt-primary-ink: #fed7aa;
  --pt-primary-50: #431407;
  --pt-primary-100: #312e81;
  --pt-primary-200: #9a3412;

  --pt-ink: #f1f5f9;
  --pt-ink-soft: #cbd5e1;
  --pt-muted: #94a3b8;
  --pt-faint: #64748b;

  --pt-bg: #0b1220;
  --pt-bg-soft: #0f172a;
  --pt-bg-tint: #16213a;
  --pt-border: #1e293b;
  --pt-border-strong: #334155;

  --pt-success: #4ade80;
  --pt-success-bg: #052e16;
  --pt-success-border: #14532d;
  --pt-warn: #fbbf24;
  --pt-warn-bg: #451a03;
  --pt-warn-border: #92400e;
  --pt-danger: #f87171;
  --pt-danger-bg: #450a0a;
  --pt-danger-border: #7f1d1d;

  --pt-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --pt-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.45), 0 2px 6px -2px rgb(0 0 0 / 0.3);
  --pt-shadow-lg: 0 12px 32px -8px rgb(0 0 0 / 0.55), 0 4px 12px -4px rgb(0 0 0 / 0.35);
}

/* Pre-JS paint: honour OS preference until main.js sets data-theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --pt-primary: #fb923c;
    --pt-primary-strong: #fdba74;
    --pt-primary-ink: #fed7aa;
    --pt-primary-50: #431407;
    --pt-primary-100: #312e81;
    --pt-primary-200: #9a3412;
    --pt-ink: #f1f5f9;
    --pt-ink-soft: #cbd5e1;
    --pt-muted: #94a3b8;
    --pt-faint: #64748b;
    --pt-bg: #0b1220;
    --pt-bg-soft: #0f172a;
    --pt-bg-tint: #16213a;
    --pt-border: #1e293b;
    --pt-border-strong: #334155;
    --pt-success: #4ade80;
    --pt-success-bg: #052e16;
    --pt-success-border: #14532d;
    --pt-warn: #fbbf24;
    --pt-warn-bg: #451a03;
    --pt-warn-border: #92400e;
    --pt-danger: #f87171;
    --pt-danger-bg: #450a0a;
    --pt-danger-border: #7f1d1d;
    --pt-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --pt-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.45), 0 2px 6px -2px rgb(0 0 0 / 0.3);
    --pt-shadow-lg: 0 12px 32px -8px rgb(0 0 0 / 0.55), 0 4px 12px -4px rgb(0 0 0 / 0.35);
  }
}

/* ------------------------------------------------------------------ */
/* 2. Reset & base                                                     */
/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--pt-font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--pt-ink);
  background: var(--pt-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--pt-font-heading);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--pt-ink);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin: 0 0 1em; }

a {
  color: var(--pt-primary);
  text-decoration: none;
  transition: color 0.18s ease;
}
a:hover { color: var(--pt-primary-strong); }

ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }

::selection { background: var(--pt-primary-200); }

/* Visible focus for keyboard users — everywhere. */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--pt-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Screen-reader-only + skip link. */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 200;
  background: var(--pt-primary); color: #fff;
  padding: 10px 18px; border-radius: var(--pt-radius-sm);
  font-weight: 600; transition: top 0.2s ease;
}
.skip-link:focus-visible { top: 12px; color: #fff; }

/* ------------------------------------------------------------------ */
/* 3. Layout                                                           */
/* ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--pt-container);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) { .container { padding: 0 32px; } }

.site-main { min-height: 60vh; padding: 40px 0 72px; }
@media (min-width: 768px) { .site-main { padding: 56px 0 96px; } }

.section { padding: 48px 0; }
.section--tint { background: var(--pt-bg-soft); }
.section__head { max-width: 720px; margin: 0 0 32px; }
.section__title { margin-bottom: 0.35em; }
.section__sub { color: var(--pt-muted); font-size: 1.075rem; margin: 0; }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid--2, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ------------------------------------------------------------------ */
/* 4. Header & navigation                                              */
/* ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--pt-header-h);
  background: color-mix(in srgb, var(--pt-bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--pt-border);
}
.site-header__inner {
  height: var(--pt-header-h);
  display: flex; align-items: center; gap: 20px;
}
.site-brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.site-brand .custom-logo { width: auto; max-height: 40px; }
.site-brand__name {
  font-family: var(--pt-font-heading); font-weight: 800; font-size: 1.35rem;
  color: var(--pt-ink); letter-spacing: -0.02em; white-space: nowrap;
}
.site-brand__name span { color: var(--pt-primary); }
a.site-brand:hover .site-brand__name { color: var(--pt-ink); }

.primary-nav ul {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.primary-nav a {
  display: block; padding: 10px 14px; border-radius: var(--pt-radius-sm);
  color: var(--pt-ink-soft); font-weight: 500; font-size: 0.95rem;
}
.primary-nav a:hover { color: var(--pt-primary); background: var(--pt-primary-50); }
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a { color: var(--pt-primary); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* Dark-mode toggle. */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--pt-border); background: var(--pt-bg);
  color: var(--pt-ink-soft); cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--pt-primary); color: var(--pt-primary); transform: rotate(12deg); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Hamburger (mobile). */
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--pt-radius-sm);
  border: 1px solid var(--pt-border); background: var(--pt-bg);
  color: var(--pt-ink); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 899px) {
  .primary-nav {
    position: fixed; inset: var(--pt-header-h) 0 auto 0;
    background: var(--pt-bg); border-bottom: 1px solid var(--pt-border);
    box-shadow: var(--pt-shadow-lg);
    padding: 12px 20px 20px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }
  .primary-nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .primary-nav a { padding: 12px 14px; font-size: 1rem; }
}
@media (min-width: 900px) { .nav-toggle { display: none; } }

/* Breadcrumbs. */
.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 0.875rem; color: var(--pt-muted); margin-bottom: 24px;
}
.breadcrumbs a { color: var(--pt-muted); }
.breadcrumbs a:hover { color: var(--pt-primary); }
.breadcrumbs .sep { color: var(--pt-faint); }
.breadcrumbs [aria-current="page"] { color: var(--pt-ink-soft); font-weight: 500; }

/* ------------------------------------------------------------------ */
/* 5. Hero                                                             */
/* ------------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 64px; text-align: center;
  background:
    radial-gradient(640px 320px at 15% 0%, var(--pt-primary-100) 0%, transparent 60%),
    radial-gradient(560px 300px at 85% 20%, var(--pt-primary-50) 0%, transparent 60%),
    var(--pt-bg);
}
html[data-theme="dark"] .hero {
  background:
    radial-gradient(640px 320px at 15% 0%, rgb(129 140 248 / 0.14) 0%, transparent 60%),
    radial-gradient(560px 300px at 85% 20%, rgb(129 140 248 / 0.08) 0%, transparent 60%),
    var(--pt-bg);
}
.hero__inner { max-width: 780px; margin: 0 auto; }
.hero__eyebrow {
  display: inline-block; margin-bottom: 18px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--pt-primary); background: var(--pt-primary-50);
  border: 1px solid var(--pt-primary-100);
  padding: 6px 14px; border-radius: 999px;
}
.hero h1 { margin-bottom: 0.5em; }
.hero__sub { font-size: 1.15rem; color: var(--pt-muted); max-width: 620px; margin: 0 auto 32px; }
.hero__search { max-width: 560px; margin: 0 auto; position: relative; }
.hero__meta { margin-top: 20px; font-size: 0.9rem; color: var(--pt-muted); }
@media (min-width: 768px) { .hero { padding: 104px 0 88px; } }

/* Live search input. */
.search-input {
  width: 100%;
  font: 500 1.05rem var(--pt-font-body);
  color: var(--pt-ink);
  background: var(--pt-bg);
  border: 2px solid var(--pt-border-strong);
  border-radius: 999px;
  padding: 16px 56px 16px 24px;
  box-shadow: var(--pt-shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-input::placeholder { color: var(--pt-faint); }
.search-input:hover { border-color: var(--pt-primary-200); }
.search-input:focus { border-color: var(--pt-primary); box-shadow: 0 0 0 4px var(--pt-primary-100); outline: none; }
.hero__search .search-icon {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; color: var(--pt-faint); pointer-events: none;
}
.search-no-results {
  display: none; padding: 40px 20px; text-align: center;
  color: var(--pt-muted); font-size: 1.05rem;
}
.search-no-results.is-visible { display: block; }

/* ------------------------------------------------------------------ */
/* 6. Buttons                                                          */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem var(--pt-font-body);
  padding: 13px 26px; border-radius: var(--pt-radius);
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--pt-primary); color: #fff;
  box-shadow: 0 6px 16px -6px rgb(234 88 12 / 0.5);
}
.btn-primary:hover { background: var(--pt-primary-strong); color: #fff; box-shadow: 0 8px 20px -6px rgb(234 88 12 / 0.6); }

.btn-secondary {
  background: var(--pt-bg); color: var(--pt-primary);
  border-color: var(--pt-primary-200);
}
.btn-secondary:hover { background: var(--pt-primary-50); border-color: var(--pt-primary); color: var(--pt-primary-strong); }

.btn--sm { padding: 9px 18px; font-size: 0.9rem; border-radius: var(--pt-radius-sm); }
.btn--lg { padding: 16px 34px; font-size: 1.075rem; }
.btn--block { width: 100%; }

/* ------------------------------------------------------------------ */
/* 7. Forms — custom styled controls, never default browser styling    */
/* ------------------------------------------------------------------ */
.field { margin-bottom: 18px; }
.field > label,
.field__label {
  display: block; font-weight: 600; font-size: 0.925rem;
  color: var(--pt-ink-soft); margin-bottom: 8px;
}
.field__hint { font-size: 0.85rem; color: var(--pt-muted); margin-top: 6px; }
.field__error { font-size: 0.85rem; color: var(--pt-danger); margin-top: 6px; font-weight: 500; }

.input, .select, .textarea {
  width: 100%;
  font: 500 1rem var(--pt-font-body);
  color: var(--pt-ink);
  background: var(--pt-bg);
  border: 2px solid var(--pt-border);
  border-radius: var(--pt-radius);
  padding: 12px 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  appearance: none; -webkit-appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--pt-faint); font-weight: 400; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--pt-border-strong); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--pt-primary); outline: none;
  box-shadow: 0 0 0 4px var(--pt-primary-100);
}
.textarea { min-height: 120px; resize: vertical; }

.select {
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.select:disabled, .input:disabled, .textarea:disabled {
  background: var(--pt-bg-tint); color: var(--pt-muted); cursor: not-allowed;
}

/* Input with unit / prefix affixes. */
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--pt-radius) 0 0 var(--pt-radius); }
.input-group__affix {
  display: inline-flex; align-items: center; padding: 0 16px;
  background: var(--pt-bg-tint); border: 2px solid var(--pt-border);
  border-left: 0; border-radius: 0 var(--pt-radius) var(--pt-radius) 0;
  color: var(--pt-muted); font-weight: 600; white-space: nowrap;
}

/* Custom range slider. */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 28px; background: transparent; cursor: pointer;
  --range-fill: 50%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(to right, var(--pt-primary) var(--range-fill), var(--pt-border) var(--range-fill));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -7px; border-radius: 50%;
  background: #fff; border: 3px solid var(--pt-primary);
  box-shadow: var(--pt-shadow); transition: transform 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.12); }
input[type="range"]::-moz-range-track {
  height: 8px; border-radius: 999px; background: var(--pt-border);
}
input[type="range"]::-moz-range-progress {
  height: 8px; border-radius: 999px; background: var(--pt-primary);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--pt-primary);
  box-shadow: var(--pt-shadow);
}
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type="range"] { flex: 1; }
.range-value {
  min-width: 72px; text-align: center; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--pt-primary-ink);
  background: var(--pt-primary-50); border-radius: var(--pt-radius-sm);
  padding: 6px 10px; font-size: 0.95rem;
}

/* Toggle switch. Markup:
   <label class="switch"><input type="checkbox"><span class="switch__track"><span class="switch__thumb"></span></span> Label</label> */
.switch {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; font-weight: 500; color: var(--pt-ink-soft);
  user-select: none; -webkit-user-select: none;
}
.switch input {
  position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.switch__track {
  position: relative; flex-shrink: 0;
  width: 48px; height: 27px; border-radius: 999px;
  background: var(--pt-border-strong);
  transition: background 0.2s ease;
}
.switch__thumb {
  position: absolute; top: 3px; left: 3px;
  width: 21px; height: 21px; border-radius: 50%;
  background: #fff; box-shadow: var(--pt-shadow-sm);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.switch input:checked + .switch__track { background: var(--pt-primary); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(21px); }
.switch input:focus-visible + .switch__track {
  outline: 3px solid var(--pt-primary); outline-offset: 2px;
}

/* Custom checkboxes & radios (opt-in via .check class). */
.check {
  display: inline-flex; align-items: flex-start; gap: 10px;
  cursor: pointer; font-weight: 500; color: var(--pt-ink-soft);
}
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  flex-shrink: 0; width: 22px; height: 22px; margin-top: 2px;
  border: 2px solid var(--pt-border-strong); border-radius: 6px;
  background: var(--pt-bg); display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.check__box svg { width: 14px; height: 14px; color: #fff; opacity: 0; transform: scale(0.5); transition: 0.15s ease; }
.check input:checked + .check__box { background: var(--pt-primary); border-color: var(--pt-primary); }
.check input:checked + .check__box svg { opacity: 1; transform: scale(1); }
.check input:focus-visible + .check__box { outline: 3px solid var(--pt-primary); outline-offset: 2px; }
.check--radio .check__box { border-radius: 50%; }
.check--radio .check__box::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; opacity: 0; transform: scale(0.4); transition: 0.15s ease;
}
.check--radio .check__box svg { display: none; }
.check--radio input:checked + .check__box::after { opacity: 1; transform: scale(1); }

/* ------------------------------------------------------------------ */
/* 8. Cards                                                            */
/* ------------------------------------------------------------------ */
.card {
  background: var(--pt-bg);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-lg);
  padding: 28px;
  box-shadow: var(--pt-shadow-sm);
}

/* Tool card (homepage grids, related tools). */
.tool-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--pt-bg);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-lg);
  padding: 24px;
  box-shadow: var(--pt-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}
a.tool-card { color: inherit; }
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pt-shadow-lg);
  border-color: var(--pt-primary-200);
}
.tool-card__top { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-card__title {
  font-family: var(--pt-font-heading); font-weight: 700; font-size: 1.1rem;
  color: var(--pt-ink); letter-spacing: -0.01em;
}
.tool-card:hover .tool-card__title { color: var(--pt-primary); }
.tool-card__desc { color: var(--pt-muted); font-size: 0.94rem; flex: 1; }
.tool-card__cta { font-weight: 600; font-size: 0.92rem; color: var(--pt-primary); }

/* Category card (homepage). */
.category-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--pt-bg);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-lg);
  padding: 28px 24px;
  box-shadow: var(--pt-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}
a.category-card { color: inherit; }
.category-card:hover {
  transform: translateY(-4px); box-shadow: var(--pt-shadow-lg);
  border-color: var(--pt-primary-200);
}
.category-card__icon {
  width: 52px; height: 52px; border-radius: var(--pt-radius);
  background: var(--pt-primary-50); color: var(--pt-primary);
  display: inline-flex; align-items: center; justify-content: center;
}
.category-card__icon svg { width: 26px; height: 26px; }
.category-card__title {
  font-family: var(--pt-font-heading); font-weight: 700; font-size: 1.2rem; color: var(--pt-ink);
}
.category-card__desc { color: var(--pt-muted); font-size: 0.94rem; margin: 0; }
.category-card__count { font-size: 0.85rem; font-weight: 600; color: var(--pt-primary); }

/* Result card (inside tool results). */
.result-card {
  background: var(--pt-bg);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-lg);
  padding: 24px;
  box-shadow: var(--pt-shadow-sm);
}
.result-card--highlight {
  border-color: var(--pt-primary-200);
  background: linear-gradient(180deg, var(--pt-primary-50), var(--pt-bg) 70%);
}

/* ------------------------------------------------------------------ */
/* 9. Tool page shell                                                  */
/* ------------------------------------------------------------------ */
.tool-shell { max-width: 880px; margin: 0 auto; }

.tool-ui {
  background: var(--pt-bg);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-xl);
  padding: 28px;
  box-shadow: var(--pt-shadow);
  margin: 32px 0;
}
@media (min-width: 768px) { .tool-ui { padding: 40px; } }

.tool-results { margin-top: 8px; }
.tool-results[hidden] { display: none; }

.tool-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Stat blocks. */
.stat-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 20px 0; }
@media (min-width: 600px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .stat-grid--3 { grid-template-columns: repeat(3, 1fr); } .stat-grid--4 { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: var(--pt-bg-soft);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  padding: 20px;
  text-align: center;
}
.stat--primary {
  background: linear-gradient(135deg, var(--pt-primary) 0%, var(--pt-primary-strong) 100%);
  border-color: transparent; color: #fff;
}
.stat--primary .stat-value { color: #fff; }
.stat--primary .stat-label { color: rgb(255 255 255 / 0.82); }
.stat-value {
  font-family: var(--pt-font-heading); font-weight: 800;
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
  letter-spacing: -0.02em; color: var(--pt-primary-ink);
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.stat-label {
  font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--pt-muted); margin-top: 6px;
}
.stat-sub { font-size: 0.85rem; color: var(--pt-muted); margin-top: 4px; }

/* Progress bars. */
.progress {
  height: 12px; border-radius: 999px;
  background: var(--pt-bg-tint); overflow: hidden;
  border: 1px solid var(--pt-border);
}
.progress__bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--pt-primary), var(--pt-primary-strong));
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress--success .progress__bar { background: linear-gradient(90deg, #22c55e, var(--pt-success)); }
.progress--warn .progress__bar { background: linear-gradient(90deg, #f59e0b, var(--pt-warn)); }
.progress--danger .progress__bar { background: linear-gradient(90deg, #ef4444, var(--pt-danger)); }

/* CSS bar charts. Rows: .bar-row > .bar-label + .bar-track > .bar + .bar-value */
.bar-chart { margin: 20px 0; }
.bar-row { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.bar-label {
  width: 130px; flex-shrink: 0; font-size: 0.875rem; font-weight: 500;
  color: var(--pt-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bar-track {
  flex: 1; height: 22px; border-radius: 8px;
  background: var(--pt-bg-tint); border: 1px solid var(--pt-border); overflow: hidden;
}
.bar {
  display: block; height: 100%; border-radius: 7px;
  background: linear-gradient(90deg, var(--pt-primary), var(--pt-primary-strong));
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 3px;
}
.bar--success { background: linear-gradient(90deg, #22c55e, var(--pt-success)); }
.bar--warn { background: linear-gradient(90deg, #f59e0b, var(--pt-warn)); }
.bar-value {
  min-width: 84px; text-align: right; font-size: 0.875rem; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--pt-ink-soft);
}
@media (max-width: 560px) {
  .bar-label { width: 92px; font-size: 0.8rem; }
  .bar-value { min-width: 64px; font-size: 0.8rem; }
}

/* Tables. */
.table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--pt-border); border-radius: var(--pt-radius);
  margin: 20px 0; background: var(--pt-bg);
}
.table-scroll table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 560px; }
.table-scroll caption { text-align: left; font-weight: 700; padding: 14px 18px; font-family: var(--pt-font-heading); }
.table-scroll th, .table-scroll td { padding: 12px 18px; text-align: left; border-bottom: 1px solid var(--pt-border); }
.table-scroll th {
  background: var(--pt-bg-soft); font-weight: 600; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--pt-muted);
  white-space: nowrap;
}
.table-scroll tbody tr:last-child th, .table-scroll tbody tr:last-child td { border-bottom: 0; }
.table-scroll tbody tr:hover { background: var(--pt-bg-soft); }
.table-scroll td.num, .table-scroll th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll tr.total-row td { font-weight: 700; background: var(--pt-primary-50); }

/* Feedback. */
.alert-error {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--pt-danger-bg); border: 1px solid var(--pt-danger-border);
  color: var(--pt-danger); border-radius: var(--pt-radius);
  padding: 14px 18px; font-weight: 500; margin: 16px 0;
}
.alert-error svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; }
.alert-success {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--pt-success-bg); border: 1px solid var(--pt-success-border);
  color: var(--pt-success); border-radius: var(--pt-radius);
  padding: 14px 18px; font-weight: 500; margin: 16px 0;
}

.badge {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--pt-primary); background: var(--pt-primary-50);
  border: 1px solid var(--pt-primary-100);
  padding: 4px 12px; border-radius: 999px; line-height: 1.5;
}
.badge--popular { color: #fff; background: linear-gradient(135deg, #f59e0b, #d97706); border-color: transparent; }
.badge--success { color: var(--pt-success); background: var(--pt-success-bg); border-color: var(--pt-success-border); }

.disclaimer {
  background: var(--pt-warn-bg); border: 1px solid var(--pt-warn-border);
  border-left: 4px solid var(--pt-warn);
  border-radius: var(--pt-radius); padding: 16px 20px;
  color: var(--pt-ink-soft); font-size: 0.92rem; margin: 24px 0;
}
.disclaimer strong { color: var(--pt-warn); }
.disclaimer p:last-child { margin-bottom: 0; }

/* Tool content sections (populated by tool template parts / articles). */
.tool-about, .tool-howto, .tool-faq { margin: 48px 0; }
.tool-about h2, .tool-howto h2, .tool-faq h2 { margin-bottom: 18px; }
.tool-howto ol { counter-reset: step; list-style: none; padding: 0; }
.tool-howto ol > li {
  counter-increment: step; position: relative;
  padding: 14px 14px 14px 58px; margin-bottom: 12px;
  background: var(--pt-bg); border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
}
.tool-howto ol > li::before {
  content: counter(step);
  position: absolute; left: 14px; top: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--pt-primary); color: #fff;
  font: 700 0.95rem var(--pt-font-heading);
  display: inline-flex; align-items: center; justify-content: center;
}
.tool-faq details {
  border: 1px solid var(--pt-border); border-radius: var(--pt-radius);
  margin-bottom: 10px; background: var(--pt-bg); overflow: hidden;
}
.tool-faq summary {
  cursor: pointer; font-weight: 600; padding: 16px 20px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.tool-faq summary::-webkit-details-marker { display: none; }
.tool-faq summary::after {
  content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--pt-primary); flex-shrink: 0;
  transition: transform 0.2s ease;
}
.tool-faq details[open] summary::after { transform: rotate(45deg); }
.tool-faq details > div { padding: 0 20px 18px; color: var(--pt-ink-soft); }

/* ------------------------------------------------------------------ */
/* 10. Articles                                                        */
/* ------------------------------------------------------------------ */
.lead { font-size: 1.2rem; color: var(--pt-ink-soft); line-height: 1.7; }

.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  font-size: 0.9rem; color: var(--pt-muted);
  padding: 16px 0; margin: 20px 0 8px;
  border-top: 1px solid var(--pt-border); border-bottom: 1px solid var(--pt-border);
}
.byline__item { display: inline-flex; align-items: center; gap: 6px; }
.byline__item svg { width: 16px; height: 16px; }
.byline time { font-variant-numeric: tabular-nums; }

.article-body { max-width: 760px; }
.article-body > *:first-child { margin-top: 0; }
.article-body h2 { margin-top: 2.2em; }
.article-body h3 { margin-top: 1.8em; }
.article-body img { border-radius: var(--pt-radius-lg); box-shadow: var(--pt-shadow); margin: 24px 0; }
.article-body blockquote {
  border-left: 4px solid var(--pt-primary); margin: 24px 0; padding: 12px 20px;
  background: var(--pt-primary-50); border-radius: 0 var(--pt-radius) var(--pt-radius) 0;
  color: var(--pt-ink-soft); font-style: italic;
}
.article-body code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em; background: var(--pt-bg-tint);
  border: 1px solid var(--pt-border); border-radius: 6px; padding: 2px 7px;
}
.article-body pre {
  background: var(--pt-ink); color: #e2e8f0; border-radius: var(--pt-radius);
  padding: 20px; overflow-x: auto; font-size: 0.9rem; line-height: 1.6; margin: 24px 0;
}
.article-body pre code { background: none; border: 0; padding: 0; color: inherit; }

.toc {
  background: var(--pt-bg-soft); border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-lg); padding: 22px 26px; margin: 28px 0;
}
.toc__title {
  font-family: var(--pt-font-heading); font-weight: 700; font-size: 1rem;
  margin-bottom: 12px; color: var(--pt-ink);
}
.toc ol, .toc ul { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--pt-ink-soft); font-size: 0.95rem; }
.toc a:hover { color: var(--pt-primary); }

.related-tool {
  display: flex; gap: 18px; align-items: center;
  background: linear-gradient(135deg, var(--pt-primary-50), var(--pt-bg));
  border: 1px solid var(--pt-primary-100);
  border-radius: var(--pt-radius-lg); padding: 24px; margin: 32px 0;
}
.related-tool__icon {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: var(--pt-radius);
  background: var(--pt-primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.related-tool__icon svg { width: 28px; height: 28px; }
.related-tool__body { flex: 1; }
.related-tool__label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pt-primary); }
.related-tool__title { font-family: var(--pt-font-heading); font-weight: 700; font-size: 1.15rem; margin: 2px 0 6px; }
.related-tool__title a { color: var(--pt-ink); }
.related-tool__title a:hover { color: var(--pt-primary); }
.related-tool__desc { color: var(--pt-muted); font-size: 0.93rem; margin: 0; }
@media (max-width: 560px) { .related-tool { flex-direction: column; align-items: flex-start; } }

/* Article / blog cards. */
.post-card {
  display: flex; flex-direction: column;
  background: var(--pt-bg); border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-lg); overflow: hidden;
  box-shadow: var(--pt-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--pt-shadow-lg); }
.post-card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card__meta { font-size: 0.82rem; color: var(--pt-muted); display: flex; gap: 12px; }
.post-card__title { font-size: 1.15rem; margin: 0; }
.post-card__title a { color: var(--pt-ink); }
.post-card__title a:hover { color: var(--pt-primary); }
.post-card__excerpt { color: var(--pt-muted); font-size: 0.94rem; flex: 1; }

/* ------------------------------------------------------------------ */
/* 11. Ad slots                                                        */
/* ------------------------------------------------------------------ */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  min-height: 90px; margin: 32px auto; max-width: 970px;
}
.ad-slot:empty { display: none; }
.ad-slot--below-header { margin-top: 0; }
.ad-slot--in-article { margin: 40px auto; }
.ad-slot--below-content { margin-bottom: 0; }

/* ------------------------------------------------------------------ */
/* 12. Footer                                                          */
/* ------------------------------------------------------------------ */
.site-footer {
  background: var(--pt-bg-soft);
  border-top: 1px solid var(--pt-border);
  padding: 64px 0 0; margin-top: 48px;
}
.footer-grid {
  display: grid; gap: 36px; grid-template-columns: 1fr;
  padding-bottom: 48px;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand p { color: var(--pt-muted); font-size: 0.94rem; max-width: 320px; }
.footer-col__title {
  font-family: var(--pt-font-heading); font-weight: 700; font-size: 0.95rem;
  margin-bottom: 18px; color: var(--pt-ink);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--pt-muted); font-size: 0.94rem; }
.footer-col a:hover { color: var(--pt-primary); }
.footer-bottom {
  border-top: 1px solid var(--pt-border);
  padding: 22px 0;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  font-size: 0.88rem; color: var(--pt-muted);
}
.footer-bottom .footer-menu ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.footer-bottom .footer-menu a { color: var(--pt-muted); }
.footer-bottom .footer-menu a:hover { color: var(--pt-primary); }

/* ------------------------------------------------------------------ */
/* 13. Homepage sections                                               */
/* ------------------------------------------------------------------ */
.how-it-works { counter-reset: step; }
.how-step {
  position: relative; padding-top: 8px;
  background: var(--pt-bg); border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-lg); padding: 28px 24px; box-shadow: var(--pt-shadow-sm);
}
.how-step__num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--pt-primary); color: #fff;
  font: 700 1.1rem var(--pt-font-heading);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.how-step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.how-step p { color: var(--pt-muted); font-size: 0.95rem; margin: 0; }

.cta-band {
  background: linear-gradient(135deg, var(--pt-primary) 0%, var(--pt-primary-strong) 100%);
  border-radius: var(--pt-radius-xl); color: #fff;
  padding: 56px 32px; text-align: center; margin: 64px 0 0;
  box-shadow: var(--pt-shadow-lg);
}
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { color: rgb(255 255 255 / 0.85); max-width: 560px; margin: 0 auto 28px; }
.cta-band .btn-secondary {
  background: #fff; border-color: #fff; color: var(--pt-primary);
}
.cta-band .btn-secondary:hover { background: var(--pt-primary-50); color: var(--pt-primary-strong); }

.faq-teaser { max-width: 800px; margin: 0 auto; }

/* Category section titles on the A–Z grid. */
.tool-group { margin-bottom: 48px; }
.tool-group:last-child { margin-bottom: 0; }
.tool-group__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; }
.tool-group__head h2 { margin: 0; font-size: 1.4rem; }
.tool-group__count { font-size: 0.88rem; color: var(--pt-muted); font-weight: 500; }

/* 404. */
.error-404 { text-align: center; padding: 64px 0; max-width: 560px; margin: 0 auto; }
.error-404__code {
  font-family: var(--pt-font-heading); font-weight: 800;
  font-size: clamp(5rem, 16vw, 9rem); line-height: 1;
  background: linear-gradient(135deg, var(--pt-primary), var(--pt-primary-strong));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ------------------------------------------------------------------ */
/* 14. Utilities & motion                                              */
/* ------------------------------------------------------------------ */
.text-center { text-align: center; }
.text-muted { color: var(--pt-muted); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: 32px; } .mb-4 { margin-bottom: 32px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------------------------------------------------ */
/* 14b. Back-to-top button                                             */
/* ------------------------------------------------------------------ */
.to-top {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #ea580c;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35), 0 2px 6px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
  pointer-events: none;
}
.to-top:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.to-top:hover { background: #c2410c; }
.to-top:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.5), 0 8px 24px rgba(79, 70, 229, 0.35);
}
.to-top svg { width: 22px; height: 22px; }
html[data-theme="dark"] .to-top {
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
}
@media (prefers-reduced-motion: reduce) {
  .to-top { transition: none; }
}

/* ------------------------------------------------------------------ */
/* 14c. Flagship 404 + HTML sitemap                                     */
/* ------------------------------------------------------------------ */
.error-404--flagship { position: relative; max-width: 680px; padding: 72px 0 16px; }
.error-404__glow {
  position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  width: min(560px, 90vw); height: 340px; pointer-events: none;
  background:
    radial-gradient(closest-side, rgb(234 88 12 / 0.22), transparent 70%),
    radial-gradient(closest-side at 30% 60%, rgb(139 92 246 / 0.16), transparent 70%);
  filter: blur(10px);
}
html[data-theme="dark"] .error-404__glow {
  background:
    radial-gradient(closest-side, rgb(129 140 248 / 0.30), transparent 70%),
    radial-gradient(closest-side at 30% 60%, rgb(167 139 250 / 0.22), transparent 70%);
}
.error-404--flagship .error-404__code {
  font-size: clamp(6rem, 22vw, 12rem); position: relative;
  text-shadow: 0 0 60px rgb(234 88 12 / 0.25);
}
.error-404__eyebrow {
  display: inline-block; margin: 18px 0 0; padding: 6px 16px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--pt-primary-ink); background: var(--pt-primary-50);
  border: 1px solid var(--pt-primary-100); border-radius: 999px;
}
html[data-theme="dark"] .error-404__eyebrow {
  color: var(--pt-primary-200); background: rgb(234 88 12 / 0.16);
  border-color: rgb(234 88 12 / 0.35);
}
.error-404--flagship h1 { margin: 16px 0 12px; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.error-404__links { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.error-404__links-label { width: 100%; font-size: 0.9rem; color: var(--pt-muted); margin-bottom: 2px; }
.pill-link {
  display: inline-block; padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--pt-border-strong); background: var(--pt-bg);
  color: var(--pt-ink-soft); font-weight: 600; font-size: 0.92rem; text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.pill-link:hover {
  border-color: var(--pt-primary); color: var(--pt-primary-ink);
  transform: translateY(-1px); text-decoration: none;
}
html[data-theme="dark"] .pill-link:hover { color: var(--pt-primary-200); }
.page-head { padding: 56px 0 8px; }
.page-head h1 { margin-bottom: 12px; }
.sitemap-jump { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 28px 0 8px; }
.sitemap-group { margin: 32px 0; }
.sitemap-group__title {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 1.25rem; margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 2px solid var(--pt-primary-100);
}
.sitemap-list { list-style: none; margin: 0; padding: 0; columns: 3; column-gap: 32px; }
.sitemap-list li { break-inside: avoid; margin-bottom: 8px; }
.sitemap-list a { color: var(--pt-ink-soft); text-decoration: none; }
.sitemap-list a:hover { color: var(--pt-primary-ink); text-decoration: underline; }
html[data-theme="dark"] .sitemap-list a:hover { color: var(--pt-primary-200); }
.sitemap-list--articles { columns: 2; }
.sitemap-list--articles time { color: var(--pt-faint); font-size: 0.85rem; margin-left: 8px; white-space: nowrap; }
@media (max-width: 768px) {
  .sitemap-list, .sitemap-list--articles { columns: 2; }
  .error-404--flagship { padding: 48px 0 8px; }
}
@media (max-width: 520px) {
  .sitemap-list, .sitemap-list--articles { columns: 1; }
}

/* ------------------------------------------------------------------ */
/* 15. Print                                                           */
/* ------------------------------------------------------------------ */
@media print {
  .site-header, .site-footer, .ad-slot, .breadcrumbs,
  .tool-actions, .theme-toggle, .nav-toggle, .cta-band,
  .related-tool, .search-input, .hero__search, .to-top { display: none !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
  .site-main { padding: 0; }
  .tool-ui, .card, .result-card, .stat {
    box-shadow: none; border: 1px solid #ccc; break-inside: avoid;
  }
  a { color: #000; text-decoration: underline; }
  .tool-faq details > div { display: block; }
}
