/* ClickWebTools — site stylesheet
   1) Design tokens (Modernist system)  2) Base + components  3) Site layout  4) Dark theme
   Zero radius, 2px rules, single red accent. Edit tokens in :root to retheme the whole site. */

:root {
  --color-bg: #ffffff;
  --color-surface: #f7f7f6;
  --color-text: #201e1d;
  --color-accent: #ec3013;
  --color-divider: color-mix(in srgb, #201e1d 40%, transparent);
  --color-neutral-100: #f8f4f4; --color-neutral-200: #f0efee; --color-neutral-300: #d7d3d3;
  --color-neutral-400: #bab6b6; --color-neutral-500: #9b9797; --color-neutral-600: #7d7979;
  --color-neutral-700: #605d5d; --color-neutral-800: #444141; --color-neutral-900: #2d2b2b;
  --color-accent-100: #fff2ef; --color-accent-200: #ffe0d9; --color-accent-300: #ffc4b8;
  --color-accent-400: #ff9783; --color-accent-500: #ff563c; --color-accent-600: #dd2b0f;
  --color-accent-700: #ae1800; --color-accent-800: #7c1405; --color-accent-900: #4d170e;
  --font-heading: "Archivo", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow-sm: 0 1px 2px color-mix(in srgb, #2d2b2b 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2d2b2b 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2d2b2b 22%, transparent);
  --footer-bg: #2f2d2c; --footer-text: #f3f2f2; --footer-muted: #bab6b6;
  color-scheme: light;
}
[data-theme="dark"] {
  --color-bg: #181716; --color-surface: #232120; --color-text: #eeecec;
  --color-divider: color-mix(in srgb, #eeecec 34%, transparent);
  --color-accent-100: #3a1a14; --color-accent-700: #ff9783; --color-accent-800: #ffc4b8;
  --color-neutral-100: #2d2b2b; --color-neutral-200: #2a2827; --color-neutral-600: #9b9797;
  --color-neutral-700: #bab6b6; --color-neutral-800: #d7d3d3;
  --shadow-md: 0 0 0 1px color-mix(in srgb, #eeecec 10%, transparent), 0 6px 18px rgba(0,0,0,.45);
  --shadow-lg: 0 0 0 1px color-mix(in srgb, #eeecec 12%, transparent), 0 12px 32px rgba(0,0,0,.5);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font-family: var(--font-body); font-size: 16px; line-height: 1.55; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 800; line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 8px; }
p { margin: 0 0 12px; }
a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent); }
img, svg { display: block; max-width: 100%; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; 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; left: 16px; top: -60px; z-index: 100; background: var(--color-text); color: var(--color-bg); padding: 10px 14px; font-weight: 600; }
.skip-link:focus { top: 12px; color: var(--color-bg); }
.muted { color: var(--color-neutral-700); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- components ---------- */
.btn { display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px; min-height: 40px; cursor: pointer; text-decoration: none; font-family: var(--font-heading); font-weight: 800; font-size: 14px; line-height: 1.2; color: var(--color-text); background: transparent; border: 1px solid transparent; padding: 8px 14px; border-radius: 0; white-space: nowrap; }
.btn:hover { color: var(--color-text); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-600); color: #fff; }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-ghost { color: var(--color-accent-700); padding-inline: 8px; }
.btn-ghost:hover { color: var(--color-accent-700); background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-icon { width: 40px; height: 40px; padding: 0; justify-content: center; }
.btn-light { background: var(--color-bg); color: var(--color-text); min-height: 48px; min-width: 220px; }
.btn-light:hover { background: var(--color-surface); }
.field > label, .field-label { display: block; font-size: 12px; margin-bottom: 5px; color: var(--color-neutral-700); }
.field .hint { display: block; margin-top: 5px; font-size: 12px; color: var(--color-neutral-700); }
.input { width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; font-size: 16px; color: var(--color-text); caret-color: var(--color-accent); background: var(--color-bg); border: 1px solid var(--color-divider); border-radius: 0; }
.input:hover { border-color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 260px; resize: vertical; line-height: 1.55; }
select.input { appearance: auto; }
input[type="color"].input { padding: 2px; cursor: pointer; }
.seg-scroll { max-width: 100%; overflow-x: auto; }
.seg { display: inline-flex; border: 1px solid var(--color-divider); background: var(--color-bg); }
.seg-opt { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 7px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { background: var(--color-accent); color: #fff; }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--color-accent); }
.tag { display: inline-flex; align-items: center; font-size: 12px; padding: 4px 10px; text-decoration: none; }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-text); }
a.tag-outline:hover { background: var(--color-accent-100); color: var(--color-text); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--color-neutral-700); padding: 8px; border-bottom: 2px solid var(--color-divider); }
.table td { padding: 8px; border-bottom: 1px solid var(--color-divider); }
.table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.icon-box { flex: none; display: grid; place-items: center; width: 48px; height: 48px; background: var(--color-accent); color: #fff; }
.icon-box svg { width: 24px; height: 24px; }
.icon-box.lg { width: 60px; height: 60px; }
.icon-box.lg svg { width: 30px; height: 30px; }
.icon-sm { width: 18px; height: 18px; flex: none; color: var(--color-accent); }
.kicker { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--color-accent-700); }

/* ruled grid: cells share 2px rules */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); border-top: 2px solid var(--color-divider); border-left: 2px solid var(--color-divider); }
.grid > * { border-right: 2px solid var(--color-divider); border-bottom: 2px solid var(--color-divider); background: var(--color-bg); }
.grid.fit { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--color-bg); border-bottom: 2px solid var(--color-divider); }
.site-header .bar { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--color-text); text-decoration: none; font-family: var(--font-heading); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand:hover { color: var(--color-text); }
.brand .wm b { color: var(--color-accent); font-weight: inherit; }
.nav-links { display: flex; gap: 20px; white-space: nowrap; }
.nav-links a { color: var(--color-text); text-decoration: none; font-size: 15px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-accent); }
.search-btn { min-width: 180px; font-weight: 400; font-family: var(--font-body); }
.search-btn kbd { margin-left: auto; font: 600 11px var(--font-body); border: 1px solid var(--color-divider); padding: 1px 6px; }
.menu-btn, .search-icon-btn { display: none; }
.mobile-nav { display: none; border-top: 2px solid var(--color-divider); padding: 8px 24px 16px; }
.mobile-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--color-divider); color: var(--color-text); text-decoration: none; font-weight: 600; }
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav.open { display: block; }
@media (max-width: 1099px) {
  .nav-links, .search-btn { display: none; }
  .menu-btn, .search-icon-btn { display: inline-flex; }
}

/* ---------- sections ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; margin: 0 0 28px; padding: 0; list-style: none; color: var(--color-neutral-700); }
.crumbs li + li::before { content: "/"; margin-right: 8px; }
.page { padding-top: 32px; padding-bottom: 64px; }
.sec { padding: 72px 0 64px; border-top: 2px solid var(--color-divider); }
.sec.alt { background: var(--color-surface); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.sec-head .num { font-size: 13px; font-weight: 800; color: var(--color-accent); letter-spacing: .08em; }
.sec-head h2 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.02em; }
.sec-head .more { margin-left: auto; font-weight: 600; }
.arrow { width: 18px; height: 18px; }

/* hero */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 56px; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--color-neutral-700); }
.eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--color-accent); }
.hero h1 { margin: 0; font-size: clamp(42px, 6.4vw, 80px); line-height: .98; letter-spacing: -0.035em; max-width: 11ch; text-wrap: balance; }
.hero .lead { margin: 0; font-size: 19px; max-width: 44ch; color: var(--color-neutral-700); text-wrap: pretty; }
.search-box { position: relative; max-width: 580px; }
.search-field { display: flex; align-items: center; border: 2px solid var(--color-text); background: var(--color-bg); box-shadow: var(--shadow-md); }
.search-field svg { margin-left: 16px; width: 20px; height: 20px; flex: none; }
.search-field input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 17px; padding: 16px 12px; color: var(--color-text); outline: none; }
.search-field .btn { margin: 5px; min-width: 112px; min-height: 44px; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 10; background: var(--color-bg); border: 2px solid var(--color-text); box-shadow: var(--shadow-lg); }
.search-results[hidden] { display: none; }
.search-results a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--color-divider); color: var(--color-text); text-decoration: none; }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--color-surface); color: var(--color-text); }
.search-results .cat { margin-left: auto; font-size: 12px; color: var(--color-neutral-700); }
.search-results p { margin: 0; padding: 14px; color: var(--color-neutral-700); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips .tag { white-space: nowrap; padding: 6px 10px; font-size: 13px; }
.chips .label { font-size: 13px; color: var(--color-neutral-700); margin-right: 4px; }
.demo { border: 2px solid var(--color-text); background: var(--color-bg); box-shadow: var(--shadow-lg); min-width: 0; }
.demo-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 2px solid var(--color-divider); background: var(--color-surface); font-size: 13px; font-weight: 600; }
.demo-head::before { content: ""; width: 10px; height: 10px; background: var(--color-accent); }
.demo-head span { margin-left: auto; font-weight: 400; color: var(--color-neutral-700); font-size: 12px; }
.demo-body { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 19px; }
.sentence .input { width: 110px; font-size: 19px; min-height: 48px; }
.demo-result { border-top: 2px solid var(--color-text); padding-top: 16px; }
.demo-result output { display: block; font-family: var(--font-heading); font-weight: 800; font-size: clamp(56px, 7vw, 92px); line-height: 1; letter-spacing: -0.03em; color: var(--color-accent); word-break: break-all; }
.label-sm { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-neutral-700); }
.demo-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--color-neutral-700); }
.stats-strip { border-top: 2px solid var(--color-divider); }
.stats-strip .grid { border-top: 0; }
.stats-strip .grid > div { display: flex; align-items: baseline; gap: 12px; padding: 22px 24px; }
.stats-strip b { font-family: var(--font-heading); font-size: 36px; letter-spacing: -0.02em; }
.stats-strip b.accent { color: var(--color-accent); }
.stats-strip span { white-space: nowrap; font-size: 14px; color: var(--color-neutral-700); }

/* cards */
.cat-card, .tool-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; min-height: 230px; color: var(--color-text); text-decoration: none; }
.cat-card:hover, .tool-card:hover { color: var(--color-text); background: var(--color-surface); }
.cat-card .top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.cat-card .n { font-size: 13px; font-weight: 800; color: var(--color-neutral-600); }
.cat-card h3 { font-size: 22px; margin: 0; }
.cat-card p, .tool-card p { margin: 0; font-size: 14px; color: var(--color-neutral-700); flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-top: 12px; border-top: 1px solid var(--color-divider); font-size: 13px; font-weight: 600; }
.all-card { background: var(--color-accent) !important; color: #fff; justify-content: space-between; }
.all-card:hover { background: var(--color-accent-600) !important; color: #fff; }
.all-card strong { font-family: var(--font-heading); font-size: 34px; line-height: 1.02; letter-spacing: -0.02em; }
.all-card .card-foot { border-top-color: #fff; }
.tool-card { padding: 20px; min-height: 170px; gap: 8px; }
.tool-card:hover { background: var(--color-accent-100); }
.tool-card .meta { display: flex; align-items: center; gap: 8px; }
.tool-card h3 { font-size: 19px; margin: 0; }
.tool-card .go { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.feature { padding: 28px 24px; display: flex; flex-direction: column; gap: 12px; }
.feature svg { width: 28px; height: 28px; color: var(--color-accent); }
.feature h3 { font-size: 20px; margin: 0; }
.feature p { margin: 0; color: var(--color-neutral-700); }
.featured { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); border: 2px solid var(--color-divider); }
.featured > div { padding: 32px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.featured .ink { background: #201e1d; color: #f3f2f2; }
.featured .ink .kicker { color: #ff9783; }
.featured .ink p { color: #cfcbcb; }
.featured pre { margin: 8px 0 0; padding: 16px; border: 1px solid rgba(243,242,242,.25); font: 13px/1.6 var(--font-mono); color: #e6e3e3; overflow: hidden; }
.featured h3 { font-size: 32px; margin: 0; letter-spacing: -0.02em; }
.featured .btn { align-self: flex-start; min-width: 220px; margin-top: 8px; }
.mini-stats { margin-top: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.mini-stats > div { padding: 14px; }
.mini-stats b { display: block; font-family: var(--font-heading); font-size: 28px; }
.mini-stats span { font-size: 12px; color: var(--color-neutral-700); }
.articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 32px 24px; }
.article-card { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 2px solid var(--color-text); color: var(--color-text); text-decoration: none; }
.article-card:hover { color: var(--color-accent); }
.article-card .meta { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--color-neutral-700); }
.article-card h3 { font-size: 23px; margin: 0; }
.article-card p { margin: 0; font-size: 15px; color: var(--color-neutral-700); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 56px; }
.prose-lg p { font-size: 17px; line-height: 1.6; max-width: 56ch; }
.faq { border-top: 2px solid var(--color-text); }
.faq details { border-bottom: 1px solid var(--color-divider); }
.faq summary { display: flex; gap: 12px; align-items: baseline; padding: 16px 0; cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; color: var(--color-accent); font-weight: 800; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--color-neutral-700); max-width: 70ch; }
.poster { background: var(--color-accent); color: #fff; }
.poster .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 32px; align-items: end; padding-top: 72px; padding-bottom: 72px; }
.poster .big { margin: 0; font-family: var(--font-heading); font-weight: 800; font-size: clamp(34px, 4.6vw, 60px); line-height: 1; letter-spacing: -0.03em; text-wrap: balance; }
.poster .side { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.poster .side p { margin: 0; font-size: 18px; max-width: 40ch; }

/* ads: reserved space prevents layout shift */
.ad-wrap { padding: 16px 24px; }
.ad-wrap.top { border-bottom: 2px solid var(--color-divider); }
.ad-wrap.bottom { padding: 32px 24px; border-top: 2px solid var(--color-divider); }
.ad-slot { margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--color-surface); border: 1px dashed var(--color-neutral-400); color: var(--color-neutral-600); font-size: 11px; overflow: hidden; }
.ad-slot.leader { width: min(728px, 100%); height: 90px; }
.ad-slot.inline { width: 100%; min-height: 120px; margin-top: 40px; }
.ad-slot.rect { width: 100%; min-height: 250px; }
.ad-slot .ad-label { letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.ad-slot.filled { border: 0; background: transparent; }

/* ---------- tool page ---------- */
.title-row { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.title-row h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1; letter-spacing: -0.03em; text-wrap: balance; }
.intro { font-size: 18px; max-width: 62ch; color: var(--color-neutral-700); margin: 0 0 16px; text-wrap: pretty; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tool-shell { border: 2px solid var(--color-text); background: var(--color-surface); }
.tool-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 2px solid var(--color-divider); font-size: 13px; color: var(--color-neutral-700); }
.tool-top svg { width: 14px; height: 14px; }
.tool-top .btn { margin-left: auto; }
.t-fields { padding: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; background: var(--color-bg); }
.t-fields .wide { grid-column: 1 / -1; }
.t-results { border-top: 2px solid var(--color-divider); padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; background: var(--color-surface); }
.t-primary { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; }
.t-primary .main { flex: 1 1 240px; min-width: 0; }
.t-primary .val { font-family: var(--font-heading); font-weight: 800; font-size: 56px; line-height: 1.05; color: var(--color-accent); word-break: break-word; }
.t-primary .val.sm { font-size: 26px; }
.t-primary .sub { font-size: 15px; font-weight: 600; margin-top: 6px; }
.swatch { width: 88px; height: 88px; flex: none; border: 2px solid var(--color-text); }
.t-items { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.t-items > div { display: flex; gap: 8px; align-items: flex-start; padding: 14px 16px; }
.t-items .lbl { font-size: 12px; color: var(--color-neutral-700); }
.t-items .v { font-size: 18px; font-weight: 800; word-break: break-word; }
.t-items .grow { flex: 1; min-width: 0; }
.t-err { margin: 0; color: var(--color-accent-700); font-weight: 600; }
.t-note { margin: 0; font-size: 13px; color: var(--color-neutral-700); max-width: 80ch; }
.t-bar { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; padding: 12px 16px; background: var(--color-bg); border-bottom: 2px solid var(--color-divider); }
.t-bar .inline-field { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.t-bar .inline-field .input { width: 90px; min-height: 40px; }
.t-bar .push { margin-left: auto; }
.t-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); border-top: 0; border-left: 0; border-bottom: 2px solid var(--color-divider); }
.t-stats > div { padding: 14px 16px; border-bottom: 0; }
.t-stats b { display: block; font-family: var(--font-heading); font-size: 30px; line-height: 1.1; }
.t-stats span { font-size: 12px; color: var(--color-neutral-700); }
.t-io { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 2px; background: var(--color-divider); }
.t-io > div { background: var(--color-bg); padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.t-io label { font-size: 12px; color: var(--color-neutral-700); }
.t-io textarea[readonly] { background: var(--color-surface); }
.mono { font-family: var(--font-mono) !important; font-size: 13px !important; }
.t-foot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 12px 16px; border-top: 2px solid var(--color-divider); background: var(--color-bg); }
.t-foot .info { margin: 0; font-size: 14px; color: var(--color-neutral-700); }
.t-foot .info.over { color: var(--color-accent-700); font-weight: 700; }
.t-foot .actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.t-rows > div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 18px 20px; background: var(--color-bg); border-bottom: 2px solid var(--color-divider); }
.t-rows > div:last-child { border-bottom: 0; }
.t-rows .input { width: 120px; }
.t-rows .out { margin-left: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.t-rows output { font-family: var(--font-heading); font-weight: 800; font-size: 28px; }
.t-rows .pair { display: flex; flex-direction: column; }
.t-rows .t-err { flex-basis: 100%; font-size: 13px; font-weight: 400; }
.t-convert { padding: 8px 20px 20px; background: var(--color-surface); border-top: 2px solid var(--color-divider); }
.t-convert td.v { font-family: var(--font-heading); font-weight: 800; font-size: 17px; word-break: break-all; }
.t-convert td.c { text-align: right; width: 70px; }
.t-convert tr.from td:first-child { font-weight: 800; }
.layout-tool { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; margin-top: 64px; align-items: start; }
.layout-tool .main { display: flex; flex-direction: column; gap: 56px; min-width: 0; }
.layout-tool > aside { display: none; }
@media (min-width: 1100px) {
  .layout-tool { grid-template-columns: minmax(0, 1fr) 300px; }
  .layout-tool > aside { display: flex; flex-direction: column; gap: 36px; position: sticky; top: 96px; }
  .related-inline { display: none; }
}
.h2n { font-size: clamp(24px, 2.6vw, 30px); margin: 0 0 18px; padding-top: 16px; border-top: 2px solid var(--color-text); display: flex; gap: 14px; align-items: baseline; }
.h2n span { font-size: 13px; color: var(--color-accent); }
.steps { list-style: none; margin: 0; padding: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.steps li { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.steps b { font-family: var(--font-heading); font-size: 34px; line-height: 1; color: var(--color-accent); }
.formula { margin: 0; padding: 20px; background: var(--color-surface); border: 1px solid var(--color-divider); font: 14px/1.75 var(--font-mono); white-space: pre-wrap; overflow-x: auto; }
.examples { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.examples p { margin: 0; padding: 20px; font-size: 15px; }
.side-h { margin: 0 0 8px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-neutral-700); }
.toc { display: flex; flex-direction: column; border-top: 2px solid var(--color-text); }
.toc a { display: flex; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--color-divider); color: var(--color-text); text-decoration: none; font-size: 14px; }
.toc a:hover { color: var(--color-accent); }
.toc a span { font-size: 12px; font-weight: 800; color: var(--color-accent); }
.rel-list { border-top: 2px solid var(--color-text); }
.rel-list a { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--color-divider); color: var(--color-text); text-decoration: none; }
.rel-list a:hover { color: var(--color-accent); }
.rel-list b { display: block; font-size: 15px; }
.rel-list small { display: block; font-size: 13px; color: var(--color-neutral-700); }
section[id] { scroll-margin-top: 96px; }

/* ---------- category, doc, contact, error ---------- */
.cat-title { display: flex; align-items: center; gap: 20px; margin-bottom: 12px; }
.cat-title h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1; letter-spacing: -0.03em; }
.other-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.doc { max-width: 720px; }
.doc h1 { margin: 8px 0 16px; font-size: clamp(32px, 4.5vw, 48px); line-height: 1.05; text-wrap: balance; }
.doc .lede { font-size: 20px; line-height: 1.5; margin: 0 0 24px; }
.doc .body { border-top: 2px solid var(--color-text); padding-top: 8px; }
.doc h2 { margin: 32px 0 10px; font-size: 24px; }
.doc p, .doc li { font-size: 17px; line-height: 1.65; }
.doc ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.doc pre { margin: 8px 0 18px; padding: 16px; background: var(--color-surface); border: 1px solid var(--color-divider); font: 14px/1.7 var(--font-mono); white-space: pre-wrap; }
.doc .tools-box { margin: 32px 0 8px; }
.doc .tools-box .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.doc .tools-box a { padding: 16px; display: flex; flex-direction: column; gap: 4px; color: var(--color-text); text-decoration: none; }
.doc .tools-box a:hover { background: var(--color-surface); }
.doc .tools-box small { font-size: 13px; color: var(--color-neutral-700); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 48px; align-items: start; }
.form-card { border: 2px solid var(--color-text); background: var(--color-surface); }
.form-card form { padding: 24px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.form-card .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.form-card textarea.input { min-height: 180px; }
.field .err { display: block; margin-top: 5px; font-size: 13px; font-weight: 600; color: var(--color-accent-700); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-size: 14px; font-weight: 600; }
.form-status.bad { color: var(--color-accent-700); }
.form-done { padding: 32px 24px; display: flex; flex-direction: column; gap: 12px; }
.error-page { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 48px; padding: 64px 0 80px; }
.error-page .code { font-family: var(--font-heading); font-weight: 800; font-size: 120px; line-height: .9; color: var(--color-accent); letter-spacing: -0.04em; }
.error-page .copy { display: flex; flex-direction: column; gap: 16px; }
.pop-list { border-top: 2px solid var(--color-text); }
.pop-list a { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--color-divider); color: var(--color-text); text-decoration: none; font-size: 18px; font-weight: 600; }
.pop-list a:hover { color: var(--color-accent); }
.pop-list small { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--color-neutral-700); }

/* ---------- footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 32px; padding-top: 40px; padding-bottom: 24px; }
.site-footer .brand-f { font-family: var(--font-heading); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.site-footer .brand-f span { color: #ff9783; }
.site-footer p { margin: 10px 0 0; font-size: 14px; color: var(--footer-muted); max-width: 28ch; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.site-footer h2 { font: 600 11px var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--footer-muted); margin: 0 0 4px; }
.site-footer a { color: var(--footer-text); text-decoration: none; }
.site-footer a:hover { color: #ff9783; }
.site-footer .legal { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 16px; padding-bottom: 32px; border-top: 1px solid rgba(243,242,242,.18); font-size: 13px; color: var(--footer-muted); }

/* ---------- overlays ---------- */
.toast { position: fixed; left: 24px; bottom: 24px; z-index: 60; background: var(--color-text); color: var(--color-bg); padding: 12px 18px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); }
.toast[hidden] { display: none; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: start center; padding: 10vh 16px 16px; background: color-mix(in srgb, #2d2b2b 50%, transparent); }
.dialog-backdrop[hidden] { display: none; }
.search-dialog { width: min(640px, 100%); background: var(--color-bg); border: 2px solid var(--color-text); box-shadow: var(--shadow-lg); }
.search-dialog .row { display: flex; align-items: center; border-bottom: 2px solid var(--color-divider); }
.search-dialog .row svg { margin-left: 16px; width: 20px; height: 20px; flex: none; }
.search-dialog input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 18px; padding: 16px 12px; color: var(--color-text); outline: none; }
.search-dialog .list { max-height: 60vh; overflow: auto; }
.search-dialog .list a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-bottom: 1px solid var(--color-divider); color: var(--color-text); text-decoration: none; }
.search-dialog .list a:hover, .search-dialog .list a[aria-selected="true"] { background: var(--color-surface); }
.search-dialog .list small { font-size: 13px; color: var(--color-neutral-700); }
.search-dialog .list p { margin: 0; padding: 16px; color: var(--color-neutral-700); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .site-header, .site-footer, .ad-wrap, .ad-slot, .poster { display: none !important; } }

/* reserve space while a tool module loads (prevents layout shift) */
.tool-shell [data-tool-ui] { min-height: 320px; }
.tool-shell [data-tool-ui]:has(.t-rows) { min-height: 0; }

/* footer: follow + translate */
.site-footer .cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.follow { display: flex; flex-direction: column; gap: 4px; }
.follow a { display: flex; align-items: center; gap: 12px; min-height: 36px; font-size: 16px; color: var(--footer-text); }
.follow a svg { flex: none; }
.follow a:hover { color: #ff9783; }
.site-footer .legal { align-items: center; }
.translate { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.translate label { font-size: 13px; color: var(--footer-muted); }
.translate .row { display: flex; gap: 6px; }
.translate select.input { width: auto; min-height: 36px; padding: 4px 8px; font-size: 14px; background: #232120; color: var(--footer-text); border-color: rgba(243,242,242,.28); }
.translate .btn { min-height: 36px; color: var(--footer-text); border-color: rgba(243,242,242,.4); }
.translate .btn:hover { background: rgba(243,242,242,.1); color: #fff; }
@media (max-width: 760px) { .translate { margin-left: 0; } }


/* ad sizes: leader 728x90, square 300x300 (both scale down on small screens without shifting layout) */
.ad-slot.leader { width: min(728px, 100%); height: auto; aspect-ratio: 728 / 90; min-height: 0; }
.ad-slot.square { width: min(300px, 100%); aspect-ratio: 1 / 1; height: auto; }
.ad-row { display: flex; justify-content: center; margin-top: 40px; }
.ad-row.tight { margin-top: 48px; }
.ad-slot.direct { position: relative; border: 0; background: transparent; }
.ad-slot.direct a, .ad-slot.direct img { display: block; width: 100%; height: 100%; }
.ad-slot.direct img { object-fit: cover; }
.ad-slot .ad-tag { position: absolute; top: 0; right: 0; padding: 1px 6px; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: rgba(32,30,29,.75); color: #fff; }
.square-inline { display: flex; justify-content: flex-start; }
@media (min-width: 1100px) { .square-inline { display: none; } }

/* accounts */
.account-btn { gap: 8px; }
@media (max-width: 600px) { .account-btn span { display: none; } .account-btn { width: 40px; padding: 0; justify-content: center; } }
.auth-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 48px; align-items: start; }
.auth-card { border: 2px solid var(--color-text); background: var(--color-surface); }
.auth-card form { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.auth-card .switch { padding: 14px 24px; border-top: 2px solid var(--color-divider); font-size: 14px; background: var(--color-bg); }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check-line input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--color-accent); flex: none; }
.account-grid { margin: 24px 0 32px; }
.account-grid > div { padding: 20px; }
.account-grid .v { font-size: 18px; font-weight: 800; word-break: break-word; }
.cf-turnstile { min-height: 65px; }

/* homepage: category grid + 300x600 half-page ad (desktop only) */
.browse-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.side-ad { display: none; }
@media (min-width: 1100px) {
  .browse-split { grid-template-columns: minmax(0, 1fr) 300px; }
  .cats3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cats3 .span2 { grid-column: span 2; }
  .side-ad { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 96px; }
}
.side-ad-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--color-neutral-600); }
.ad-slot.halfpage { width: 300px; height: 600px; }

/* blog article: 300x600 sticky sidebar on desktop; 300x300 in-article on smaller screens */
.article-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; align-items: start; }
@media (min-width: 1100px) {
  .article-split { grid-template-columns: minmax(0, 720px) 300px; justify-content: space-between; }
  .article-mid-ad { display: none !important; }
}

/* phones: leaderboards become 320x100 (standard mobile banner) */
@media (max-width: 767px) { .ad-slot.leader { width: min(320px, 100%); aspect-ratio: 320 / 100; } }
.ad-slot.direct picture { display: block; width: 100%; height: 100%; }
.ad-slot.halfpage { max-width: 100%; }

.square-inline .ad-slot, .article-mid-ad .ad-slot { margin: 0; }

/* homepage: "Why use" features + 300x300 (beside on desktop, below on smaller screens) */
.why-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.why-ad { display: flex; flex-direction: column; gap: 6px; }
.ad-slot.square { width: 300px; height: 300px; max-width: 100%; }
@media (min-width: 1100px) {
  .why-split { grid-template-columns: minmax(0, 1fr) 300px; }
  .why2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why-ad { position: sticky; top: 96px; }
}
.why-ad .ad-slot { margin: 0; }

/* audit fixes: no iOS zoom on focus (inputs ≥16px on phones); square ads stay square when the column is narrower than 300px */
@media (max-width: 767px) { .input, input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="search"], input[type="date"], input[type="datetime-local"], select, textarea { font-size: 16px; } }
.ad-slot.square { height: auto; aspect-ratio: 1 / 1; }
