/* ==========================================================================
   XFM Humanizer — design system
   Zero external dependencies. System font stack only.
   Palette: indigo primary on neutral reading surfaces.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --primary: hsl(231 74% 52%);
  --primary-hover: hsl(231 74% 45%);
  --primary-soft: hsl(231 74% 97%);
  --primary-ring: hsl(231 74% 52% / 0.28);
  --primary-foreground: hsl(0 0% 100%);

  --background: hsl(0 0% 100%);
  --surface: hsl(231 24% 98.6%);
  --surface-2: hsl(231 20% 96.4%);
  --surface-inset: hsl(231 22% 97.4%);
  --foreground: hsl(231 24% 12%);
  --muted-foreground: hsl(231 11% 44%);
  --subtle-foreground: hsl(231 10% 56%);
  --border: hsl(231 20% 90%);
  --border-strong: hsl(231 18% 84%);

  --success: hsl(158 64% 38%);
  --success-soft: hsl(158 60% 96%);
  --warning: hsl(32 90% 42%);
  --warning-soft: hsl(36 92% 96%);
  --danger: hsl(0 68% 48%);
  --danger-soft: hsl(0 76% 97%);

  --shadow-xs: 0 1px 2px hsl(231 24% 12% / 0.05);
  --shadow-sm: 0 1px 3px hsl(231 24% 12% / 0.07), 0 1px 2px hsl(231 24% 12% / 0.04);
  --shadow-md: 0 4px 16px -2px hsl(231 24% 12% / 0.09), 0 2px 6px -2px hsl(231 24% 12% / 0.05);
  --shadow-lg: 0 18px 44px -12px hsl(231 30% 20% / 0.16), 0 6px 16px -8px hsl(231 30% 20% / 0.09);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 999px;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas,
    "Liberation Mono", Menlo, monospace;

  --container: 1120px;
  --reading: 760px;
  --header-h: 60px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: hsl(231 82% 68%);
    --primary-hover: hsl(231 82% 74%);
    --primary-soft: hsl(231 40% 17%);
    --primary-ring: hsl(231 82% 68% / 0.3);
    --primary-foreground: hsl(231 40% 10%);

    --background: hsl(231 22% 8%);
    --surface: hsl(231 20% 11%);
    --surface-2: hsl(231 18% 14%);
    --surface-inset: hsl(231 20% 10%);
    --foreground: hsl(231 20% 95%);
    --muted-foreground: hsl(231 12% 65%);
    --subtle-foreground: hsl(231 11% 55%);
    --border: hsl(231 16% 20%);
    --border-strong: hsl(231 14% 28%);

    --success: hsl(158 58% 58%);
    --success-soft: hsl(158 40% 14%);
    --warning: hsl(38 88% 62%);
    --warning-soft: hsl(36 60% 14%);
    --danger: hsl(0 72% 68%);
    --danger-soft: hsl(0 46% 16%);

    --shadow-xs: 0 1px 2px hsl(0 0% 0% / 0.3);
    --shadow-sm: 0 1px 3px hsl(0 0% 0% / 0.35);
    --shadow-md: 0 4px 16px -2px hsl(0 0% 0% / 0.45);
    --shadow-lg: 0 18px 44px -12px hsl(0 0% 0% / 0.6);
  }
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.021em;
  font-weight: 700;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

ul,
ol,
dl,
dd {
  margin: 0;
}

[hidden] {
  display: none !important;
}

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

::selection {
  background: var(--primary-ring);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 16px;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.reading {
  max-width: var(--reading);
}

.section {
  padding-block: 76px;
}

.section--tight {
  padding-block: 52px;
}

.section--surface {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 660px;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-title {
  font-size: clamp(1.65rem, 1.2rem + 1.9vw, 2.35rem);
}

.section-sub {
  margin-top: 14px;
  font-size: 1.0625rem;
  color: var(--muted-foreground);
}

.stack > * + * {
  margin-top: 16px;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.0625rem;
  white-space: nowrap;
}

.brand__mark {
  width: 26px;
  height: 26px;
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.nav a:hover {
  color: var(--foreground);
  background: var(--surface-2);
}

.nav a[aria-current="page"] {
  color: var(--foreground);
  font-weight: 600;
}

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

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
  cursor: pointer;
}

.nav-toggle svg {
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease),
    color 0.15s var(--ease), transform 0.1s var(--ease), box-shadow 0.15s var(--ease);
}

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

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn--outline {
  background: var(--background);
  border-color: var(--border-strong);
  color: var(--foreground);
}

.btn--outline:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--muted-foreground);
}

.btn--ghost {
  background: transparent;
  color: var(--muted-foreground);
}

.btn--ghost:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--foreground);
}

.btn--lg {
  padding: 13px 26px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn--sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

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

.btn__spinner {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: 66px 56px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% 0 auto 50%;
  width: min(900px, 130vw);
  height: 620px;
  translate: -50% 0;
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--primary) 13%, transparent),
    transparent 66%
  );
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__title {
  margin-top: 18px;
  font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.4rem);
  letter-spacing: -0.032em;
}

.hero__lede {
  margin-top: 18px;
  max-width: 620px;
  font-size: 1.125rem;
  color: var(--muted-foreground);
}

.hero--center {
  text-align: center;
}

.hero--center .hero__lede {
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   7. Tool
   -------------------------------------------------------------------------- */
.tool {
  margin-top: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--background);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.tool__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.presets {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.presets__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--subtle-foreground);
  margin-right: 2px;
}

.chip {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--background);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

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

.tool__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pane + .pane {
  border-left: 1px solid var(--border);
}

.pane__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-inset);
}

.pane__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: var(--subtle-foreground);
}

.pane__label--accent {
  color: var(--primary);
}

.pane__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--subtle-foreground);
  font-variant-numeric: tabular-nums;
}

.pane__body {
  position: relative;
  flex: 1;
  display: flex;
  min-height: 300px;
}

.editor {
  width: 100%;
  min-height: 300px;
  padding: 16px;
  border: 0;
  background: transparent;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.72;
  color: var(--foreground);
}

.editor::placeholder {
  color: var(--subtle-foreground);
}

.editor:focus {
  outline: none;
}

.output {
  width: 100%;
  padding: 16px;
  font-size: 0.9375rem;
  line-height: 1.72;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-y: auto;
  max-height: 560px;
}

.output:empty {
  display: none;
}

.output-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 40px 24px;
  text-align: center;
  color: var(--subtle-foreground);
  font-size: 0.875rem;
}

.output-placeholder svg {
  width: 30px;
  height: 30px;
  opacity: 0.45;
}

.pane--output.is-filled .output-placeholder {
  display: none;
}

.pane--output:not(.is-filled) .output {
  display: none;
}

.tool__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.tool__controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.field {
  display: flex;
  align-items: center;
  gap: 7px;
}

.field__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--subtle-foreground);
}

.select {
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--background);
  font-size: 0.8125rem;
  cursor: pointer;
}

.tool__note {
  font-size: 0.75rem;
  color: var(--subtle-foreground);
}

.tool__note strong {
  color: var(--foreground);
  font-weight: 600;
}

.output-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Signal meters */
.meters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-inset);
}

.meter {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
}

.meter__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.meter__name {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--subtle-foreground);
}

.meter__value {
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.meter__track {
  margin-top: 9px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  width: 0;
  border-radius: var(--radius-full);
  background: var(--muted-foreground);
  transition: width 0.5s var(--ease), background 0.3s var(--ease);
}

.meter__fill[data-level="good"] {
  background: var(--success);
}

.meter__fill[data-level="warn"] {
  background: var(--warning);
}

.meter__fill[data-level="bad"] {
  background: var(--danger);
}

.meter__caption {
  margin-top: 7px;
  font-size: 0.6875rem;
  color: var(--subtle-foreground);
}

.verdict {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--muted-foreground);
}

.verdict[data-level="good"] {
  background: var(--success-soft);
  color: var(--success);
}

.verdict[data-level="warn"] {
  background: var(--warning-soft);
  color: var(--warning);
}

.verdict[data-level="bad"] {
  background: var(--danger-soft);
  color: var(--danger);
}

.verdict__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* Exact counts, shown beneath the signal meters. */
.stats {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-inset);
  font-size: 0.8125rem;
  color: var(--subtle-foreground);
}

.stats > span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.stats strong {
  color: var(--foreground);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* Notices */
.notice {
  display: flex;
  gap: 11px;
  padding: 12px 14px;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.875rem;
}

.notice__icon {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 2px;
}

.notice__body strong {
  display: block;
  margin-bottom: 3px;
  font-weight: 600;
}

.notice--warn {
  border-left-color: var(--warning);
}

.notice--warn .notice__icon {
  color: var(--warning);
}

.notice--error {
  border-left-color: var(--danger);
}

.notice--error .notice__icon {
  color: var(--danger);
}

.notice--info {
  border-left-color: var(--primary);
}

.notice--info .notice__icon {
  color: var(--primary);
}

.notice code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 26px;
  font-size: 0.8125rem;
  color: var(--subtle-foreground);
}

.trust-row__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-row svg {
  width: 14px;
  height: 14px;
  color: var(--success);
}

/* --------------------------------------------------------------------------
   8. Before / after comparison
   -------------------------------------------------------------------------- */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 34px;
}

.compare__card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.compare__card--after {
  border-color: color-mix(in srgb, var(--primary) 34%, transparent);
  background: var(--primary-soft);
}

.compare__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.compare__tag {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: var(--subtle-foreground);
}

.compare__tag--accent {
  color: var(--primary);
}

.compare__badge {
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.compare__badge--bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.compare__badge--good {
  background: var(--success-soft);
  color: var(--success);
}

.compare__text {
  font-size: 0.9375rem;
  line-height: 1.72;
  color: var(--foreground);
}

.compare__card--before .compare__text {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* --------------------------------------------------------------------------
   9. Feature grid
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

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

.card__title {
  font-size: 1.0625rem;
  font-weight: 650;
}

.card__text {
  margin-top: 8px;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

.checks {
  list-style: none;
  padding: 0;
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 32px;
}

.checks li {
  display: flex;
  gap: 11px;
}

.checks__mark {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--success);
}

.checks__title {
  font-weight: 600;
}

.checks__text {
  margin-top: 3px;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

.bullets {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 11px;
}

.bullets li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.bullets li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--primary);
}

/* Numbered signals */
.signals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 34px;
  list-style: none;
  padding: 0;
  counter-reset: signal;
}

.signals li {
  padding-top: 18px;
  border-top: 2px solid var(--border);
}

.signals__num {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.signals__title {
  margin-top: 9px;
  font-size: 1.0625rem;
  font-weight: 650;
}

.signals__text {
  margin-top: 7px;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

/* Use cases */
.usecases {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--background);
}

.usecases > div {
  padding: 22px 18px;
}

.usecases > div + div {
  border-left: 1px solid var(--border);
}

.usecases__num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.usecases__title {
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 650;
}

.usecases__text {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* --------------------------------------------------------------------------
   10. FAQ
   -------------------------------------------------------------------------- */
.faq {
  margin-top: 30px;
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  margin-top: 7px;
  border-right: 2px solid var(--subtle-foreground);
  border-bottom: 2px solid var(--subtle-foreground);
  rotate: 45deg;
  transition: rotate 0.2s var(--ease);
}

.faq details[open] summary::after {
  rotate: 225deg;
}

.faq__answer {
  padding-bottom: 20px;
  max-width: 68ch;
  color: var(--muted-foreground);
}

.faq__cats {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 26px;
}

/* --------------------------------------------------------------------------
   11. Pricing
   -------------------------------------------------------------------------- */
.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 28px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
}

.billing-toggle button {
  padding: 7px 17px;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.billing-toggle button[aria-pressed="true"] {
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-xs);
}

.billing-toggle__save {
  margin-left: 5px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.6875rem;
  font-weight: 700;
}

.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 34px;
  align-items: start;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
}

.plan--featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  position: relative;
}

.plan__badge {
  position: absolute;
  top: -11px;
  left: 22px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.plan__num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--subtle-foreground);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.plan__name {
  margin-top: 8px;
  font-size: 1.25rem;
  font-weight: 700;
}

.plan__tagline {
  margin-top: 5px;
  font-size: 0.8125rem;
  color: var(--subtle-foreground);
  min-height: 2.4em;
}

.plan__spec {
  margin-top: 16px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.plan__price {
  margin-top: 18px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan__amount {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.plan__period {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.plan__billing {
  margin-top: 7px;
  font-size: 0.75rem;
  color: var(--subtle-foreground);
  min-height: 1.432em;
}

.plan .btn {
  margin-top: 16px;
}

.plan__features {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  display: grid;
  gap: 10px;
  font-size: 0.875rem;
}

.plan__features li {
  display: flex;
  gap: 9px;
}

.plan__features svg {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 3px;
  color: var(--primary);
}

.plan-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 30px;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* --------------------------------------------------------------------------
   12. CTA band
   -------------------------------------------------------------------------- */
.cta {
  padding: 48px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  text-align: center;
}

.cta__title {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
}

.cta__text {
  margin: 14px auto 0;
  max-width: 560px;
  color: var(--muted-foreground);
}

.cta__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

/* --------------------------------------------------------------------------
   13. Landing page (article) layout
   -------------------------------------------------------------------------- */
.article {
  padding-block: 56px 76px;
}

.article__title {
  font-size: clamp(1.9rem, 1.4rem + 2.6vw, 2.85rem);
  letter-spacing: -0.03em;
}

.article__promise {
  margin-top: 18px;
  font-size: 1.1875rem;
  color: var(--muted-foreground);
}

.article__cta {
  margin-top: 26px;
}

.article section {
  margin-top: 60px;
}

.article__h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.tag {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: all 0.15s var(--ease);
}

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

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.related-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.related-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.related-card__title {
  font-size: 0.9375rem;
  font-weight: 650;
}

.related-card__text {
  margin-top: 7px;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.article__footer-cta {
  margin-top: 64px;
}

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 76px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 34px;
  padding-block: 52px;
}

.site-footer__desc {
  margin-top: 14px;
  max-width: 300px;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.site-footer h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--foreground);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.site-footer ul a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.15s var(--ease);
}

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

.site-footer__bottom {
  padding-block: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--subtle-foreground);
}

/* --------------------------------------------------------------------------
   15. Utilities
   -------------------------------------------------------------------------- */
.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;
}

.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.is-hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   16. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .grid--4,
  .signals {
    grid-template-columns: repeat(2, 1fr);
  }

  .plans {
    grid-template-columns: repeat(2, 1fr);
  }

  .usecases {
    grid-template-columns: repeat(2, 1fr);
  }

  .usecases > div + div {
    border-left: 0;
  }

  .usecases > div {
    border-top: 1px solid var(--border);
  }

  .usecases > div:nth-child(-n + 2) {
    border-top: 0;
  }

  .usecases > div:nth-child(odd) {
    border-right: 1px solid var(--border);
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 20px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--background);
    box-shadow: var(--shadow-md);
  }

  .nav:not(.is-open) {
    display: none;
  }

  .nav a {
    padding: 11px 12px;
  }

  .tool__grid {
    grid-template-columns: 1fr;
  }

  .pane + .pane {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .compare,
  .checks,
  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

  .section {
    padding-block: 56px;
  }

  .usecases {
    grid-template-columns: 1fr;
  }

  .usecases > div {
    border-right: 0 !important;
    border-top: 1px solid var(--border);
  }

  .usecases > div:first-child {
    border-top: 0;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 620px) {
  .plans,
  .signals,
  .grid--4,
  .related-grid,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-block: 44px 40px;
  }

  .tool__foot {
    flex-direction: column;
    align-items: stretch;
  }

  .tool__controls {
    justify-content: space-between;
  }

  .output-actions {
    justify-content: flex-end;
  }

  .cta {
    padding: 34px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   17. Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .tool__bar,
  .tool__foot,
  .cta__actions,
  .nav-toggle {
    display: none !important;
  }

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

  .tool,
  .card,
  .compare__card,
  .plan {
    border-color: #ccc;
    box-shadow: none;
    break-inside: avoid;
  }

  .section {
    padding-block: 24px;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    color: #555;
  }
}
