/*
 * Patawise Tools design system
 * shadcn/ui-inspired visual language in plain CSS. No framework, no build step.
 *
 *  1. Font
 *  2. Tokens (light, dark)
 *  3. Reset & base
 *  4. Typography
 *  5. Layout
 *  6. Header & footer
 *  7. Buttons
 *  8. Forms
 *  9. Segmented control & tabs
 * 10. Cards
 * 11. Tool shell & results
 * 12. Feedback (badge, alert, toast)
 * 13. Content (prose, FAQ, breadcrumb, table)
 * 14. Homepage
 * 15. Ad slot
 * 16. Utilities
 * 17. Motion & print
 */

/* 1. Font ------------------------------------------------------------------ */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 2. Tokens ---------------------------------------------------------------- */

:root {
  color-scheme: light;

  /* Surfaces: zinc neutrals */
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --card: #ffffff;
  --muted: #f4f4f5;
  --muted-strong: #e4e4e7;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --input: #e4e4e7;

  /* Text */
  --fg: #09090b;
  --fg-muted: #71717a;
  --fg-subtle: #a1a1aa;

  /* Brand: Patawise emerald */
  --primary: #047857;
  --primary-hover: #065f46;
  --primary-fg: #ffffff;
  --primary-soft: #ecfdf5;
  --primary-soft-fg: #065f46;
  --accent: #10b981;
  --ring: rgb(16 185 129 / 0.4);

  /* Status */
  --success: #15803d;
  --success-soft: #f0fdf4;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --info: #2563eb;
  --info-soft: #eff6ff;

  /* Type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem);
  --text-4xl: clamp(2rem, 1.5rem + 2.4vw, 3rem);

  /* Spacing: 4px scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Shape & depth */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-full: 999px;
  --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.04);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05), 0 1px 3px rgb(0 0 0 / 0.04);
  --shadow: 0 1px 3px rgb(0 0 0 / 0.06), 0 4px 12px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 30px -8px rgb(0 0 0 / 0.12), 0 4px 10px -4px rgb(0 0 0 / 0.06);

  /* Layout */
  --container: 1120px;
  --tool-width: 1040px;
  --content-width: 720px;
  --header-height: 64px;
  --gutter: clamp(1rem, 0.6rem + 1.6vw, 1.5rem);

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --duration: 150ms;
}

/* Dark tokens: applied by system preference unless the user chose light,
   or explicitly via data-theme="dark". Keep both blocks in sync. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #09090b;
    --bg-subtle: #0c0c0e;
    --card: #111113;
    --muted: #18181b;
    --muted-strong: #27272a;
    --border: #27272a;
    --border-strong: #3f3f46;
    --input: #27272a;
    --fg: #fafafa;
    --fg-muted: #a1a1aa;
    --fg-subtle: #71717a;
    --primary: #10b981;
    --primary-hover: #34d399;
    --primary-fg: #022c22;
    --primary-soft: rgb(16 185 129 / 0.12);
    --primary-soft-fg: #6ee7b7;
    --accent: #34e0a1;
    --ring: rgb(52 211 153 / 0.45);
    --success: #4ade80;
    --success-soft: rgb(74 222 128 / 0.1);
    --warning: #fbbf24;
    --warning-soft: rgb(251 191 36 / 0.1);
    --danger: #f87171;
    --danger-soft: rgb(248 113 113 / 0.1);
    --info: #60a5fa;
    --info-soft: rgb(96 165 250 / 0.1);
    --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow: 0 1px 3px rgb(0 0 0 / 0.4), 0 4px 12px -2px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 30px -8px rgb(0 0 0 / 0.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b;
  --bg-subtle: #0c0c0e;
  --card: #111113;
  --muted: #18181b;
  --muted-strong: #27272a;
  --border: #27272a;
  --border-strong: #3f3f46;
  --input: #27272a;
  --fg: #fafafa;
  --fg-muted: #a1a1aa;
  --fg-subtle: #71717a;
  --primary: #10b981;
  --primary-hover: #34d399;
  --primary-fg: #022c22;
  --primary-soft: rgb(16 185 129 / 0.12);
  --primary-soft-fg: #6ee7b7;
  --accent: #34e0a1;
  --ring: rgb(52 211 153 / 0.45);
  --success: #4ade80;
  --success-soft: rgb(74 222 128 / 0.1);
  --warning: #fbbf24;
  --warning-soft: rgb(251 191 36 / 0.1);
  --danger: #f87171;
  --danger-soft: rgb(248 113 113 / 0.1);
  --info: #60a5fa;
  --info-soft: rgb(96 165 250 / 0.1);
  --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow: 0 1px 3px rgb(0 0 0 / 0.4), 0 4px 12px -2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 30px -8px rgb(0 0 0 / 0.6);
}

/* 3. Reset & base ---------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + var(--space-4));
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

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

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-hover);
}

::selection {
  background: rgb(16 185 129 / 0.22);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin-block: var(--space-8);
}

.icon {
  width: 1.125rem;
  height: 1.125rem;
  flex: none;
}

.icon--sm {
  width: 1rem;
  height: 1rem;
}

.icon--lg {
  width: 1.5rem;
  height: 1.5rem;
}

/* 4. Typography ------------------------------------------------------------ */

h1,
h2,
h3,
h4 {
  color: var(--fg);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: -0.035em;
}

h2 {
  font-size: var(--text-2xl);
}

h3 {
  font-size: var(--text-lg);
}

p {
  text-wrap: pretty;
}

.lead {
  color: var(--fg-muted);
  font-size: var(--text-lg);
  line-height: 1.55;
  max-width: 62ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--primary);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-muted {
  color: var(--fg-muted);
}

.text-sm {
  font-size: var(--text-sm);
}

code,
kbd,
.mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

:not(pre) > code:not(.output-box__text) {
  padding: 0.15em 0.4em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--muted);
}

kbd {
  padding: 0.1em 0.45em;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: var(--text-xs);
}

/* 5. Layout ---------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--tool {
  max-width: calc(var(--tool-width) + var(--gutter) * 2);
}

.container--narrow {
  max-width: calc(var(--content-width) + var(--gutter) * 2);
}

.section {
  padding-block: var(--space-12);
}

.section--sm {
  padding-block: var(--space-8);
}

.stack > * + * {
  margin-top: var(--stack-gap, var(--space-4));
}

.stack--tight {
  --stack-gap: var(--space-2);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cluster-gap, var(--space-3));
}

.cluster--tight {
  --cluster-gap: var(--space-2);
}

.grid {
  display: grid;
  gap: var(--grid-gap, var(--space-4));
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--grid-min, 280px)), 1fr));
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  background: var(--fg);
  color: var(--bg);
  font-weight: 500;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  color: var(--bg);
}

/* 6. Header & footer ------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--fg);
  font-size: var(--text-base);
  font-weight: 650;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: none;
}

.brand:hover {
  color: var(--fg);
}

.brand__logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.brand__suffix {
  color: var(--fg-muted);
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.site-nav__link {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease);
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
  background: var(--muted);
  color: var(--fg);
}

.site-footer {
  margin-top: var(--space-16);
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--fg-muted);
  font-size: var(--text-sm);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-8);
  padding-block: var(--space-12);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.site-footer__about {
  max-width: 34ch;
}

.site-footer__title {
  margin-bottom: var(--space-3);
  color: var(--fg);
  font-size: var(--text-sm);
  font-weight: 600;
}

.site-footer__list {
  display: grid;
  gap: var(--space-2);
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--fg-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--fg);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-6);
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
}

/* Theme toggle: shows the icon for the theme you would switch to */
.theme-toggle__sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle__sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle__moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle__moon {
    display: none;
  }
}

/* 7. Buttons --------------------------------------------------------------- */

.btn {
  --btn-bg: var(--primary);
  --btn-fg: var(--primary-fg);
  --btn-border: transparent;
  --btn-bg-hover: var(--primary-hover);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: 0 var(--space-4);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--text-sm);
  font-weight: 550;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: background-color var(--duration) var(--ease), border-color var(--duration) var(--ease),
    color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
  user-select: none;
}

.btn:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-fg);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.btn--secondary {
  --btn-bg: var(--muted);
  --btn-fg: var(--fg);
  --btn-bg-hover: var(--muted-strong);
  box-shadow: none;
}

.btn--outline {
  --btn-bg: var(--bg);
  --btn-fg: var(--fg);
  --btn-border: var(--border);
  --btn-bg-hover: var(--muted);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--fg-muted);
  --btn-bg-hover: var(--muted);
  box-shadow: none;
}

.btn--ghost:hover {
  color: var(--fg);
}

.btn--sm {
  min-height: 32px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}

.btn--lg {
  min-height: 48px;
  padding: 0 var(--space-6);
  font-size: var(--text-base);
}

.btn--icon {
  width: 40px;
  padding: 0;
}

.btn--icon.btn--sm {
  width: 32px;
}

.btn--block {
  width: 100%;
}

/* Copy button: swaps icon/label when .is-copied is set by core.js */
.btn__idle,
.btn__done {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.btn .btn__done {
  display: none;
}

.btn.is-copied .btn__idle {
  display: none;
}

.btn.is-copied .btn__done {
  display: inline-flex;
}

.btn.is-copied {
  --btn-fg: var(--success);
}

/* 8. Forms ----------------------------------------------------------------- */

.field {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  color: var(--fg);
  font-size: var(--text-sm);
  font-weight: 550;
}

.field__optional {
  color: var(--fg-muted);
  font-size: var(--text-xs);
  font-weight: 400;
}

.field__hint {
  color: var(--fg-muted);
  font-size: var(--text-xs);
  line-height: 1.5;
}

.field__error {
  display: none;
  color: var(--danger);
  font-size: var(--text-xs);
  font-weight: 500;
}

.field.is-invalid .field__error {
  display: block;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font-size: var(--text-base); /* 16px prevents iOS zoom on focus */
  line-height: 1.4;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  appearance: none;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--fg-subtle);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--border-strong);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.field.is-invalid .input,
.field.is-invalid .textarea,
.input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field.is-invalid .input:focus,
.input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent);
}

.input--mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.textarea--mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.select {
  padding-right: var(--space-10);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right var(--space-3) center;
  background-repeat: no-repeat;
  background-size: 16px;
  cursor: pointer;
}

/* Parameter name shown next to a label, e.g. utm_source */
.field__param {
  padding: 0.1em 0.4em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--muted);
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
}

.select--sm {
  width: auto;
  min-height: 34px;
  padding-block: var(--space-1);
  font-size: var(--text-sm);
}

/* Input with a prefix/suffix (currency, %, ×) */
.input-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.input-group:hover {
  border-color: var(--border-strong);
}

.input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.field.is-invalid .input-group {
  border-color: var(--danger);
}

.input-group .input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.input-group .input:focus {
  box-shadow: none;
}

.input-group__addon {
  display: flex;
  align-items: center;
  padding: 0 var(--space-3);
  color: var(--fg-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
}

.input-group__addon:first-child {
  padding-right: 0;
}

.input-group__addon:last-child {
  padding-left: 0;
}

/* Character counter shown next to a label or under a field */
.counter {
  color: var(--fg-muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.counter.is-near {
  color: var(--warning);
}

.counter.is-over {
  color: var(--danger);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  cursor: pointer;
}

.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.form-grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 640px) {
  .form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid__full {
    grid-column: 1 / -1;
  }
}

/* 9. Segmented control & tabs ---------------------------------------------- */

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius);
  background: var(--muted);
}

.segmented__option {
  position: relative;
}

/* Full-width variant: options share the width equally */
.segmented--block {
  display: flex;
  width: 100%;
}

.segmented--block .segmented__option {
  flex: 1;
}

.segmented--block .segmented__option span {
  justify-content: center;
  width: 100%;
}

.segmented__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented__option span,
.segmented > button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 32px;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: calc(var(--radius) - 3px);
  background: transparent;
  color: var(--fg-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.segmented__option span:hover,
.segmented > button:hover {
  color: var(--fg);
}

.segmented__option input:checked + span,
.segmented > button[aria-pressed="true"],
.segmented > button[aria-selected="true"] {
  background: var(--bg);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
}

.segmented__option input:focus-visible + span,
.segmented > button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs__tab {
  position: relative;
  padding: var(--space-3) var(--space-3);
  border: 0;
  background: none;
  color: var(--fg-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
}

.tabs__tab:hover {
  color: var(--fg);
}

.tabs__tab[aria-selected="true"] {
  color: var(--fg);
}

.tabs__tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto var(--space-2) -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--fg);
}

/* Tabs that switch between modes of a tool */
.tool-tabs {
  margin-bottom: var(--space-4);
}

.tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* 10. Cards ---------------------------------------------------------------- */

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.card__body {
  padding: var(--space-6);
}

.card__header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
}

.card__title {
  font-size: var(--text-base);
  font-weight: 600;
}

.card__description {
  margin-top: var(--space-1);
  color: var(--fg-muted);
  font-size: var(--text-sm);
}

.card__footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Tool card: homepage grid and related tools */
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease),
    transform var(--duration) var(--ease);
}

.tool-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.tool-card:focus-within {
  box-shadow: 0 0 0 3px var(--ring);
}

.tool-card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary-soft-fg);
}

.tool-card__title {
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.tool-card__title a {
  color: var(--fg);
  text-decoration: none;
}

/* Whole card is clickable via the title link */
.tool-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.tool-card__title a:focus-visible {
  outline: none;
}

.tool-card__summary {
  color: var(--fg-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.tool-card__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: auto;
  color: var(--primary);
  font-size: var(--text-sm);
  font-weight: 550;
}

.tool-card__cta .icon {
  transition: transform var(--duration) var(--ease);
}

.tool-card:hover .tool-card__cta .icon {
  transform: translateX(3px);
}

/* 11. Tool shell & results ------------------------------------------------- */

.page-header {
  padding-top: var(--space-8);
  padding-bottom: var(--space-6);
}

.page-header h1 {
  margin-top: var(--space-4);
}

.page-header .lead {
  margin-top: var(--space-3);
}

.page-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

/* The interactive area: inputs + results, framed as one surface */
.tool {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

@media (min-width: 860px) {
  .tool--split {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }

  .tool--split .tool__output {
    border-top: 0;
    border-left: 1px solid var(--border);
  }
}

.tool__input,
.tool__output {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-6);
  min-width: 0;
}

@media (min-width: 640px) {
  .tool__input,
  .tool__output {
    padding: var(--space-8);
  }
}

.tool__output {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

.tool__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.tool__section-title {
  color: var(--fg-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tool__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tool__options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.tool__options--stack {
  display: grid;
  gap: var(--space-4);
}

.tool__option-select {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--fg);
  font-size: var(--text-sm);
}

.tool__noscript {
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: var(--text-sm);
}

.privacy-note {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--fg-muted);
  font-size: var(--text-xs);
}

.privacy-note .icon {
  color: var(--primary);
}

/* Result card */
.result {
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.result__label {
  color: var(--fg-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

.result__value {
  margin-top: var(--space-1);
  color: var(--fg);
  font-size: clamp(2rem, 1.6rem + 1.8vw, 2.75rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.result__value.is-empty {
  color: var(--fg-subtle);
}

.result__unit {
  margin-left: 0.15em;
  color: var(--fg-muted);
  font-size: 0.55em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.result__note {
  margin-top: var(--space-3);
  color: var(--fg-muted);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.result--primary {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: linear-gradient(180deg, var(--primary-soft), var(--card) 70%);
}

.result--primary.result--success {
  border-color: color-mix(in srgb, var(--success) 40%, var(--border));
  background: linear-gradient(180deg, var(--success-soft), var(--card) 70%);
}

.result--primary.result--danger {
  border-color: color-mix(in srgb, var(--danger) 40%, var(--border));
  background: linear-gradient(180deg, var(--danger-soft), var(--card) 70%);
}

.stat__value.is-positive {
  color: var(--success);
}

.stat__value.is-negative {
  color: var(--danger);
}

.result--success .result__value {
  color: var(--success);
}

.result--warning .result__value {
  color: var(--warning);
}

.result--danger .result__value {
  color: var(--danger);
}

/* Secondary metrics under the main result */
.stats {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
}

.stat {
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.stat__label {
  color: var(--fg-muted);
  font-size: var(--text-xs);
  font-weight: 500;
}

.stat__value {
  margin-top: var(--space-1);
  font-size: var(--text-xl);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Generated output (e.g., a UTM URL) with copy action */
.output-box {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.output-box__text {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.url-part--sep,
.url-part--key {
  color: var(--fg-muted);
}

.url-part--value {
  color: var(--primary);
  font-weight: 600;
}

.url-part--other {
  color: var(--fg);
}

.output-box__text.is-empty {
  color: var(--fg-muted);
  font-family: var(--font-sans);
}

/* Output column that stays in view while long inputs scroll (desktop) */
@media (min-width: 860px) {
  .tool--sticky-output {
    overflow: visible;
  }

  .tool--sticky-output .tool__output {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  }

  .tool__sticky {
    position: sticky;
    top: calc(var(--header-height) + var(--space-6));
  }
}

.tool__sticky {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* Ad copy fields with per-field issue notes */
.ad-field__issues {
  display: grid;
  gap: var(--space-1);
  padding: 0;
  list-style: none;
}

.ad-field__issues:empty {
  display: none;
}

.ad-field__issue {
  position: relative;
  padding-left: var(--space-4);
  font-size: var(--text-xs);
  line-height: 1.5;
}

.ad-field__issue::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 0.25rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.ad-field__issue--error {
  color: var(--danger);
  font-weight: 500;
}

.ad-field__issue--warning {
  color: var(--warning);
}

.ad-more > summary {
  width: fit-content;
  list-style: none;
}

.ad-more > summary::-webkit-details-marker {
  display: none;
}

.ad-more[open] > summary {
  display: none;
}

/* Search result ad preview: always light, like a real results page */
.serp-frame {
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--muted);
}

.serp {
  max-width: 600px;
  margin-inline: auto;
  padding: var(--space-4);
  border-radius: 12px;
  background: #ffffff;
  color: #202124;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
  transition: max-width var(--duration) var(--ease);
}

.serp[data-device="mobile"] {
  max-width: 360px;
}

.serp.is-placeholder .serp__title,
.serp.is-placeholder .serp__desc {
  color: #70757a; /* 4.6:1 on white: visibly placeholder, still readable */
}

.serp__sponsored {
  margin-bottom: 8px;
  color: #202124;
  font-size: 14px;
  font-weight: 700;
}

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

.serp__favicon {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #dadce0;
  border-radius: 50%;
  background: #f1f3f4;
  color: #5f6368;
  font-size: 13px;
  font-weight: 700;
}

.serp__site-text {
  min-width: 0;
  line-height: 1.3;
}

.serp__name {
  color: #202124;
  font-size: 14px;
}

.serp__url {
  overflow: hidden;
  color: #4d5156;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.serp__title {
  margin-top: 10px;
  color: #1a0dab;
  font-size: 20px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.serp[data-device="mobile"] .serp__title {
  font-size: 18px;
}

.serp__desc {
  margin-top: 6px;
  color: #4d5156;
  font-size: 14px;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

/* 12. Feedback ------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 24px;
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg);
  color: var(--fg-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
}

.badge .icon {
  width: 0.875rem;
  height: 0.875rem;
}

.badge--primary {
  border-color: transparent;
  background: var(--primary-soft);
  color: var(--primary-soft-fg);
}

.badge--success {
  border-color: transparent;
  background: var(--success-soft);
  color: var(--success);
}

.badge--warning {
  border-color: transparent;
  background: var(--warning-soft);
  color: var(--warning);
}

.badge--danger {
  border-color: transparent;
  background: var(--danger-soft);
  color: var(--danger);
}

.alert {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.alert > .icon {
  margin-top: 2px;
}

.alert--compact {
  padding: var(--space-3) var(--space-4);
}

.alert__title {
  font-weight: 600;
}

.alert--info {
  border-color: color-mix(in srgb, var(--info) 25%, transparent);
  background: var(--info-soft);
}

.alert--info > .icon {
  color: var(--info);
}

.alert--success {
  border-color: color-mix(in srgb, var(--success) 25%, transparent);
  background: var(--success-soft);
}

.alert--success > .icon {
  color: var(--success);
}

.alert--warning {
  border-color: color-mix(in srgb, var(--warning) 25%, transparent);
  background: var(--warning-soft);
}

.alert--warning > .icon {
  color: var(--warning);
}

.alert--danger {
  border-color: color-mix(in srgb, var(--danger) 25%, transparent);
  background: var(--danger-soft);
}

.alert--danger > .icon {
  color: var(--danger);
}

.toast-region {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  left: var(--space-4);
  z-index: 90;
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  pointer-events: none;
}

@media (min-width: 640px) {
  .toast-region {
    left: auto;
    justify-items: end;
  }
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--fg);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-in 200ms var(--ease);
}

.toast .icon {
  color: var(--success);
}

.toast--error .icon {
  color: var(--danger);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

/* 13. Content -------------------------------------------------------------- */

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  color: var(--fg-muted);
  font-size: var(--text-sm);
  list-style: none;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.breadcrumb li + li::before {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  opacity: 0.6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.breadcrumb a {
  color: var(--fg-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--fg);
}

.breadcrumb [aria-current="page"] {
  color: var(--fg);
  font-weight: 500;
}

/* Long-form explanatory content */
.prose {
  max-width: var(--content-width);
  color: var(--fg);
  font-size: var(--text-base);
  line-height: 1.75;
}

.prose > * + * {
  margin-top: var(--space-4);
}

.prose h2 {
  margin-top: var(--space-12);
  font-size: var(--text-2xl);
}

.prose h3 {
  margin-top: var(--space-8);
  font-size: var(--text-lg);
}

.prose h2 + *,
.prose h3 + * {
  margin-top: var(--space-3);
}

.prose > :first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: color-mix(in srgb, var(--fg) 82%, var(--fg-muted));
}

.prose ul,
.prose ol {
  padding-left: var(--space-6);
}

.prose li + li {
  margin-top: var(--space-2);
}

.prose li::marker {
  color: var(--fg-subtle);
}

.prose strong {
  color: var(--fg);
  font-weight: 600;
}

.prose blockquote {
  padding-left: var(--space-4);
  border-left: 3px solid var(--accent);
  color: var(--fg-muted);
}

/* Formula / worked example callout */
.formula {
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.table th {
  background: var(--bg-subtle);
  color: var(--fg-muted);
  font-weight: 600;
}

.table tr:last-child td {
  border-bottom: 0;
}

/* Tables of generated URLs */
.table--urls td {
  vertical-align: middle;
}

.table--urls td:first-child {
  color: var(--fg-subtle);
  font-variant-numeric: tabular-nums;
}

.table--urls .url-cell {
  min-width: 260px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.5;
  word-break: break-all;
}

.table--urls th {
  white-space: nowrap;
}

/* Key/value tables (e.g. parsed parameters) share column widths */
.table--kv th:first-child,
.table--kv td:first-child {
  width: 40%;
}

.table--kv td:last-child {
  overflow-wrap: anywhere;
}

.table .counter {
  margin-left: var(--space-2);
}

.table .nowrap {
  white-space: nowrap;
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* FAQ accordion (native <details>, no JS) */
.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.faq__item + .faq__item {
  border-top: 1px solid var(--border);
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  color: var(--fg);
  font-weight: 550;
  list-style: none;
  cursor: pointer;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question:hover {
  color: var(--primary);
}

.faq__question .icon {
  color: var(--fg-muted);
  transition: transform 200ms var(--ease);
}

.faq__item[open] .faq__question .icon {
  transform: rotate(180deg);
}

.faq__question:focus-visible {
  outline-offset: -2px;
}

.faq__answer {
  padding: 0 var(--space-5) var(--space-5);
  color: var(--fg-muted);
  line-height: 1.7;
}

.faq__answer > * + * {
  margin-top: var(--space-3);
}

/* 14. Homepage ------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: var(--space-16) var(--space-12);
  text-align: center;
  isolation: isolate;
}

/* Subtle grid + glow backdrop */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: 0.6;
}

.hero::after {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  z-index: -1;
  width: min(720px, 90vw);
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(16 185 129 / 0.16), transparent);
  transform: translateX(-50%);
}

.hero h1 {
  max-width: 18ch;
  margin-inline: auto;
}

.hero .lead {
  margin: var(--space-5) auto 0;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-6);
  margin-top: var(--space-8);
  padding: 0;
  color: var(--fg-muted);
  font-size: var(--text-sm);
  list-style: none;
}

.hero__trust li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.hero__trust .icon {
  color: var(--primary);
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
  margin-bottom: var(--space-6);
}

.section-heading h2 {
  font-size: var(--text-xl);
}

.section-heading p {
  color: var(--fg-muted);
  font-size: var(--text-sm);
}

.category + .category {
  margin-top: var(--space-12);
}

/* Pre-launch placeholder card (not clickable) */
.tool-card--soon {
  background: var(--bg-subtle);
  box-shadow: none;
}

.tool-card--soon:hover {
  border-color: var(--border);
  box-shadow: none;
  transform: none;
}

.tool-card--soon .badge {
  align-self: flex-start;
  margin-top: auto;
}

.feature {
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.feature h3 {
  margin-top: var(--space-4);
  font-size: var(--text-base);
  font-weight: 600;
}

.feature p {
  margin-top: var(--space-2);
  color: var(--fg-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* Error pages */
.error-page {
  padding-block: var(--space-20) var(--space-12);
  text-align: center;
}

.error-page__code {
  color: var(--primary);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.error-page h1 {
  margin-top: var(--space-3);
}

.error-page .lead {
  margin: var(--space-4) auto 0;
}

/* Contact / info cards on text pages */
.info-card {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.info-card h2,
.info-card h3 {
  font-size: var(--text-base);
  font-weight: 600;
}

.info-card p {
  margin-top: var(--space-1);
  color: var(--fg-muted);
  font-size: var(--text-sm);
}

.legal-updated {
  margin-top: var(--space-4);
  color: var(--fg-muted);
  font-size: var(--text-sm);
}

/* 15. Ad slot -------------------------------------------------------------- */

/* Height is reserved up front so late-loading ads never shift the layout. */
.ad-slot {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  margin-block: var(--space-10);
}

.ad-slot__label {
  color: var(--fg-subtle);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-slot__unit {
  width: 100%;
  min-height: 280px;
}

@media (min-width: 768px) {
  .ad-slot__unit {
    min-height: 250px;
  }
}

/* 16. Utilities ------------------------------------------------------------ */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.divider {
  height: 1px;
  background: var(--border);
}

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

[hidden] {
  display: none !important;
}

/* 17. Motion & print ------------------------------------------------------- */

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

@media print {
  .site-header,
  .site-footer,
  .ad-slot,
  .btn,
  .skip-link,
  .toast-region {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .tool,
  .card,
  .result {
    box-shadow: none;
    border-color: #ccc;
  }
}
