:root {
  color-scheme: light;

  /* Theme colors */
  --color-main-background: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #cbd5e1;
  --color-control-border: #64748b;
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-link: #2563eb;
  --color-accent: #2563eb;
  --color-on-primary: #ffffff;
  --color-interactive-wash: rgba(37, 99, 235, 0.1);
  --color-focus-ring: #2563eb;
  --color-disabled-background: #cbd5e1;
  --color-disabled-text: #0f172a;
  --color-success: #047857;
  --color-error: #b91c1c;
  --color-warning: #b45309;
  --color-warning-wash: rgba(180, 83, 9, 0.12);
  --color-file-surface: #ffffff;
  --color-beam-line: rgba(37, 99, 235, 0.24);
  --color-beam-glow: rgba(37, 99, 235, 0.18);
  --color-beam-comet: #2563eb;

  /* Component color roles */
  --color-carbon: var(--color-text-primary);
  --color-paper-white: var(--color-surface);
  --color-linen: var(--color-main-background);
  --color-mist: var(--color-surface);
  --color-fog: var(--color-border);
  --color-ash: var(--color-text-secondary);
  --color-graphite: var(--color-text-secondary);

  /* Typography */
  --font-openrunde: "OpenRunde", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --text-caption: 12px;
  --leading-caption: 1.33;
  --tracking-caption: -0.32px;
  --text-body: 16px;
  --leading-body: 1.5;
  --tracking-body: -0.32px;
  --text-subheading: 18px;
  --leading-subheading: 1.33;
  --tracking-subheading: -0.32px;
  --text-heading-sm: 24px;
  --leading-heading-sm: 1.17;
  --tracking-heading-sm: -0.31px;
  --text-heading: 36px;
  --leading-heading: 1.22;
  --tracking-heading: -0.61px;
  --text-heading-lg: 48px;
  --leading-heading-lg: 1;
  --tracking-heading-lg: -0.34px;
  --text-display: 60px;
  --leading-display: 1.13;
  --tracking-display: -3px;

  /* Spacing */
  --spacing-4: 4px;
  --spacing-8: 8px;
  --spacing-12: 12px;
  --spacing-16: 16px;
  --spacing-20: 20px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --spacing-48: 48px;
  --spacing-64: 64px;

  /* Layout */
  --page-max-width: 1200px;
  --section-gap: 64px;
  --card-padding: 24px;
  --element-gap: 16px;

  /* Border radius */
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 24px;
  --radius-3xl-2: 32px;
  --radius-tags: 9999px;
  --radius-cards: 16px;
  --radius-images: 8px;
  --radius-inputs: 8px;
  --radius-tables: 24px;
  --radius-buttons: 9999px;

  /* Shadows */
  --shadow-subtle: rgba(0, 0, 0, 0.08) 0px 1px 1px 1px, rgba(0, 0, 0, 0.06) 0px 0px 0px 0.5px;
  --shadow-subtle-2: rgba(0, 0, 0, 0.08) 0px 1px 1px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
  --shadow-subtle-3: rgba(0, 0, 0, 0.06) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 8px 16px 0px, rgba(0, 0, 0, 0.02) 0px 0px 0px 1px;
}

/* Dark theme */
[data-theme="dark"] {
  color-scheme: dark;

  --color-main-background: #0f172a;
  --color-surface: #1e293b;
  --color-border: #334155;
  --color-control-border: #64748b;
  --color-text-primary: #f8fafc;
  --color-text-secondary: #cbd5e1;
  --color-link: #60a5fa;
  --color-accent: #60a5fa;
  --color-interactive-wash: rgba(96, 165, 250, 0.14);
  --color-focus-ring: #60a5fa;
  --color-disabled-background: #334155;
  --color-disabled-text: #cbd5e1;
  --color-success: #6ee7b7;
  --color-error: #fca5a5;
  --color-warning: #fbbf24;
  --color-warning-wash: rgba(251, 191, 36, 0.14);
  --color-beam-line: rgba(96, 165, 250, 0.28);
  --color-beam-glow: rgba(96, 165, 250, 0.2);
  --color-beam-comet: #60a5fa;

  --shadow-subtle: rgba(0, 0, 0, 0.5) 0px 1px 1px 1px, rgba(0, 0, 0, 0.4) 0px 0px 0px 0.5px;
  --shadow-subtle-2: rgba(0, 0, 0, 0.5) 0px 1px 1px 0px, rgba(0, 0, 0, 0.4) 0px 0px 0px 1px;
  --shadow-subtle-3: rgba(0, 0, 0, 0.5) 0px 1px 3px 0px, rgba(0, 0, 0, 0.4) 0px 8px 16px 0px, rgba(0, 0, 0, 0.3) 0px 0px 0px 1px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-openrunde);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  color: var(--color-carbon);
  background: var(--color-main-background);
}

a {
  color: inherit;
}

::selection {
  color: var(--color-on-primary);
  background: var(--color-primary-hover);
}

:where(a, button, summary, [role="button"], [tabindex]):focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 3px;
}

.container {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Navigation pill ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 8px 0;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--color-paper-white);
  border: 1px solid var(--color-fog);
  border-radius: var(--radius-tags);
  box-shadow: var(--shadow-subtle-2);
  padding: 8px 12px;
  max-width: var(--page-max-width);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  color: var(--color-carbon);
  text-decoration: none;
  letter-spacing: var(--tracking-body);
  white-space: nowrap;
}

.logo-img {
  display: block;
  width: 200px;
  height: 48px;
  object-fit: contain;
  object-position: center;
  flex: 0 0 auto;
  border-radius: var(--radius-lg);
}

.footer-logo-img {
  width: 240px;
  height: 58px;
}

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

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

.btn.btn-menu {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-control-border);
  border-radius: 50%;
  color: var(--color-graphite);
}

.btn-menu svg {
  width: 18px;
  height: 18px;
}

.nav-links a {
  color: var(--color-carbon);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.32px;
  padding: 4px 0;
}

.nav-links a:hover {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--color-accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-buttons);
  font-family: var(--font-openrunde);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.32px;
  padding: 10px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  color: var(--color-disabled-text);
  background: var(--color-disabled-background);
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-subtle);
}

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

.btn-success {
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-subtle);
}

.btn-success:hover {
  background: var(--color-primary-hover);
}

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

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

.btn-theme {
  width: 38px;
  height: 38px;
  padding: 0;
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid var(--color-control-border);
  border-radius: 50%;
  color: var(--color-graphite);
}

.btn-theme:hover {
  color: var(--color-link);
  border-color: var(--color-accent);
}

.theme-icon {
  width: 18px;
  height: 18px;
}

.theme-icon-sun {
  display: none;
}

[data-theme="dark"] .theme-icon-sun {
  display: block;
}

[data-theme="dark"] .theme-icon-moon {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 48px;
  text-align: center;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}

.hero-copy {
  text-align: left;
}

.hero-copy .hero-sub {
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 24px auto 0;
}

.hero-actions .btn {
  width: 150px;
  border: 1px solid transparent;
  padding: 8px 14px;
}

.hero-actions .hero-howto-btn {
  border: 1px solid var(--color-accent);
  background: transparent;
  color: var(--color-link);
  font-weight: 500;
}

.hero-actions .hero-howto-btn:hover {
  background: var(--color-interactive-wash);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-paper-white);
  border: 1px solid var(--color-fog);
  border-radius: var(--radius-tags);
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.32px;
  color: var(--color-carbon);
  text-decoration: none;
  margin-bottom: 24px;
  transition: border-color 0.15s ease;
}

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

.chip-new {
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chip-arrow {
  color: var(--color-carbon);
  font-size: 14px;
}

.hero-kicker {
  margin: 0 0 12px;
  color: var(--color-link);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
}

.grad {
  color: inherit;
}

.hero-sub {
  max-width: 480px;
  margin: 0 auto;
  color: var(--color-graphite);
  font-size: 15px;
  letter-spacing: var(--tracking-body);
}

/* ---------- Hero beam diagram ---------- */
.hero-beam {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 300px;
  justify-self: center;
}

.beam-grid {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.beam-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.beam-row-bottom {
  justify-content: center;
}

.beam-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 10;
}

.beam-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--color-fog);
  background: var(--color-file-surface);
  box-shadow: 0 0 20px -12px rgba(0, 0, 0, 0.8);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.beam-dot:hover,
.beam-dot:focus-visible {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-subtle-2);
  transform: translateY(-2px);
}

.beam-dot svg {
  width: 22px;
  height: 22px;
}

.beam-dot-center {
  width: 64px;
  height: 64px;
  border: none;
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-subtle-2);
}

.beam-dot-center svg {
  width: 28px;
  height: 28px;
}

.beam-caption {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-graphite);
  white-space: nowrap;
}

.beam-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.trust-row {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.trust-row li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-ash);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: var(--tracking-caption);
}

.trust-row li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-fog);
}

/* ---------- Converter band ---------- */
.band {
  padding: 40px 0;
  background: var(--color-main-background);
}

.conversion-walkthrough {
  --walkthrough-border: var(--color-fog);
  --walkthrough-step-background: var(--color-paper-white);
  --walkthrough-title: var(--color-carbon);
  --walkthrough-caption: var(--color-graphite);
}

.conversion-walkthrough .walkthrough-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.conversion-walkthrough .walkthrough-step {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--walkthrough-border);
  border-radius: var(--radius-xl);
  background: var(--walkthrough-step-background);
}

.walkthrough-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--walkthrough-border);
  border-radius: calc(var(--radius-xl) - 1px) calc(var(--radius-xl) - 1px) 0 0;
  object-fit: cover;
}

.walkthrough-step-copy {
  padding: 11px 12px 12px;
}

.walkthrough-step-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.walkthrough-step-number {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 12px;
  font-weight: 700;
}

.walkthrough-step-title {
  margin: 0;
  color: var(--walkthrough-title);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.walkthrough-caption {
  margin: 7px 0 0;
  color: var(--walkthrough-caption);
  font-size: 13px;
  line-height: 1.45;
}

.converter-howto {
  scroll-margin-top: 96px;
  max-width: 920px;
  margin: 20px auto 0;
  padding: 16px;
  border: 1px solid var(--walkthrough-border);
  border-radius: var(--radius-cards);
  background: var(--color-mist);
  color: var(--walkthrough-title);
}

.converter-howto h2 {
  margin: 0 0 14px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: var(--tracking-heading-sm);
}

.converter-card {
  scroll-margin-top: 96px;
  background: var(--color-paper-white);
  border-radius: var(--radius-cards);
  box-shadow: var(--shadow-subtle-3);
  padding: var(--card-padding);
  max-width: 720px;
  margin: 0 auto;
}

/* Converter tabs and tool dropdown */
.converter-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  margin-bottom: 24px;
  background: var(--color-main-background);
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-tags);
}

.converter-tab {
  border: 0;
  border-radius: calc(var(--radius-tags) - 2px);
  padding: 10px 14px;
  background: transparent;
  color: var(--color-graphite);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.converter-tab:hover,
.converter-tab:focus-visible {
  color: var(--color-link);
}

.converter-tab.is-active {
  background: var(--color-paper-white);
  color: var(--color-link);
  box-shadow: var(--shadow-subtle);
}

.converter-tab-panel {
  animation: tab-panel-in 0.2s ease both;
}

.converter-tab-panel.is-switching {
  animation: tab-panel-in 0.2s ease both;
}

@keyframes tab-panel-in {
  from { opacity: 0.35; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mobile-nav-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.tool-select-group {
  margin-bottom: 16px;
}

.tool-select-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--color-graphite);
  margin-bottom: 8px;
}

.tool-select-wrap {
  display: inline-block;
  width: 100%;
  max-width: 340px;
}

.dropdown {
  position: relative;
  width: 100%;
}

.dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-openrunde);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.32px;
  color: var(--color-carbon);
  background: var(--color-paper-white);
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-tags);
  padding: 10px 18px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dropdown-trigger:hover {
  border-color: var(--color-accent);
}

.dropdown-trigger:focus-visible,
.dropdown[data-open="true"] .dropdown-trigger {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-subtle);
}

.dropdown-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-caret {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--color-graphite);
  transition: transform 0.15s ease;
}

.dropdown[data-open="true"] .dropdown-caret {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--color-paper-white);
  border: 1px solid var(--color-fog);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-subtle-3);
  padding: 6px;
  max-height: 320px;
  overflow: auto;
  opacity: 0;
  transform: translateY(-6px) scale(0.99);
  transform-origin: top center;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.dropdown[data-open="true"] .dropdown-menu {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  padding: 9px 12px;
  font-family: var(--font-openrunde);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.32px;
  color: var(--color-carbon);
  text-align: left;
  cursor: pointer;
  transition: background 0.1s ease;
}

.dropdown-group-label {
  padding: 10px 12px 5px;
  color: var(--color-ash);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dropdown-group-label:not(:first-child) {
  margin-top: 4px;
  border-top: 1px solid var(--color-fog);
}

.dropdown-item:hover,
.dropdown-item:focus-visible {
  background: var(--color-interactive-wash);
}

.dropdown-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.dropdown-item-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--color-graphite);
}

.dropdown-item.is-selected .dropdown-item-icon svg {
  fill: var(--color-accent);
}

.dropdown-item.is-selected {
  color: var(--color-link);
  background: var(--color-interactive-wash);
}

.dropdown-item-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-item-check {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--color-accent);
  opacity: 0;
  transition: opacity 0.1s ease;
}

.dropdown-item.is-selected .dropdown-item-check {
  opacity: 1;
}

.tool-info h2 {
  margin: 0 0 6px;
  font-size: var(--text-heading-sm);
  font-weight: 500;
  line-height: var(--leading-heading-sm);
  letter-spacing: var(--tracking-heading-sm);
  color: var(--color-carbon);
}

.tool-info p {
  margin: 0 0 16px;
  color: var(--color-graphite);
  font-size: 15px;
}

.tool-info .tool-warning {
  margin: -4px 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--color-warning);
  border-radius: var(--radius-inputs);
  background: var(--color-warning-wash);
  color: var(--color-warning);
  font-size: 14px;
  line-height: var(--leading-body);
}

/* Dropzone */
.dropzone {
  border: 1.5px dashed var(--color-control-border);
  background: var(--color-main-background);
  border-radius: var(--radius-inputs);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-dragover {
  border-color: var(--color-accent);
  background: var(--color-interactive-wash);
}

.dz-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 16px;
  margin-bottom: 10px;
}

.dz-main {
  font-weight: 500;
  font-size: 16px;
  color: var(--color-carbon);
  margin: 0;
  letter-spacing: var(--tracking-body);
}

.dz-sub {
  color: var(--color-ash);
  margin: 4px 0 0;
  font-size: 14px;
  letter-spacing: var(--tracking-caption);
}

.dz-browse {
  color: var(--color-link);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dz-files {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  text-align: left;
}

.dz-files li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--color-paper-white);
  border: 1px solid var(--color-fog);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 6px;
}

.dz-files .file-name {
  flex: 1 1 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-carbon);
}

.dz-files li:has(.file-order-controls) {
  flex-wrap: wrap;
}

.file-order-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.file-order-controls .btn {
  padding: 6px 10px;
  font-size: 13px;
}

.dz-files .file-size {
  color: var(--color-ash);
  flex: 0 0 auto;
}

.dz-files .file-bad {
  color: var(--color-error);
  font-size: 13px;
  flex: 0 0 auto;
}

/* Actions */
.converter-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

/* Status */
.status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  color: var(--color-graphite);
  font-size: 15px;
  letter-spacing: -0.32px;
}

.status.is-loading {
  color: var(--color-text-secondary);
}

.status.is-error {
  color: var(--color-error);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-fog);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: 0 0 auto;
}

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

/* Result */
.result {
  margin-top: 16px;
  border: 1px solid var(--color-success);
  border-radius: var(--radius-cards);
  box-shadow: var(--shadow-subtle-3);
  padding: 20px;
}

#btn-download {
  display: flex;
  margin: 12px auto 0;
  padding: 8px 16px;
  font-size: 13px;
}

.result h3 {
  margin: 0 0 4px;
  font-size: var(--text-subheading);
  font-weight: 500;
  letter-spacing: var(--tracking-subheading);
  color: var(--color-success);
}

.result p {
  margin: 0 0 14px;
  color: var(--color-graphite);
  font-size: 14px;
}

.result .result-warning {
  margin: 4px 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--color-warning);
  border-radius: var(--radius-inputs);
  background: var(--color-warning-wash);
  color: var(--color-warning);
  font-size: 14px;
  line-height: var(--leading-body);
}

.converter-note {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 14px;
  margin: 20px 0 0;
}

/* Manual advertising stays collapsed until AdSense reports a filled unit. */
.ad-placement {
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
  overflow: hidden;
  text-align: center;
}

.ad-placement.is-filled {
  margin-top: var(--spacing-32);
  margin-bottom: var(--spacing-32);
  padding: var(--spacing-12) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.ad-label {
  display: none;
  margin-bottom: var(--spacing-8);
  color: var(--color-text-secondary);
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ad-placement.is-filled .ad-label {
  display: block;
}

.article-author {
  color: inherit;
  font-weight: 600;
}

.article-review-note {
  margin: -4px 0 24px;
  color: var(--color-text-secondary);
  font-size: 14px;
}

/* ---------- Homepage tool directory ---------- */
.tool-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tool-directory-card {
  display: block;
  padding: 20px;
  border: 1px solid var(--color-fog);
  border-radius: var(--radius-cards);
  background: var(--color-mist);
  color: var(--color-carbon);
  font-weight: 600;
  text-decoration: none;
}

.tool-directory-card:hover {
  border-color: var(--color-accent);
}

.tool-directory {
  padding: var(--section-gap) 0;
  background: var(--color-linen);
  scroll-margin-top: 90px;
}

.tool-directory h2 {
  margin: 0 0 12px;
  text-align: center;
  font-size: var(--text-heading);
  font-weight: 500;
  letter-spacing: var(--tracking-heading);
}

.tool-directory-intro {
  max-width: 680px;
  margin: 0 auto 32px;
  color: var(--color-graphite);
  text-align: center;
}

.tool-directory-card span {
  display: block;
  margin-top: 7px;
  color: var(--color-graphite);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
}

/* ---------- PDF tool guides ---------- */
.tool-guides {
  background: var(--color-paper-white);
  padding: var(--section-gap) 0;
}

.tool-guides h2 {
  margin: 0 0 14px;
  color: var(--color-carbon);
  font-size: var(--text-heading);
  font-weight: 500;
  letter-spacing: var(--tracking-heading);
  text-align: center;
}

.tool-guides-intro {
  max-width: 680px;
  margin: 0 auto 32px;
  color: var(--color-graphite);
  font-size: 15px;
  line-height: 1.65;
  text-align: center;
}

.tool-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 880px;
  margin: 0 auto;
}

.tool-guide {
  padding: 24px;
  border: 1px solid var(--color-fog);
  border-radius: var(--radius-cards);
  background: var(--color-mist);
}

.tool-guide h3 {
  margin: 0 0 8px;
  color: var(--color-carbon);
  font-size: var(--text-subheading);
  font-weight: 600;
}

.tool-guide p {
  margin: 0 0 16px;
  color: var(--color-graphite);
  font-size: 14px;
  line-height: 1.65;
}

.tool-guide-link {
  color: var(--color-link);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Guide library and FAQ ---------- */
.guide-library {
  padding: var(--section-gap) 0;
  background: var(--color-paper-white);
  scroll-margin-top: 78px;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--color-link);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
}

.guide-library h2,
.faq-heading h2 {
  max-width: 760px;
  margin: 0 auto 14px;
  color: var(--color-carbon);
  font-size: var(--text-heading);
  font-weight: 500;
  letter-spacing: var(--tracking-heading);
  line-height: var(--leading-heading);
  text-align: center;
}

.section-intro {
  max-width: 700px;
  margin: 0 auto 34px;
  color: var(--color-graphite);
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
}

.guide-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.guide-library-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 26px;
  border: 1px solid var(--color-fog);
  border-radius: var(--radius-cards);
  background: var(--color-mist);
}

.guide-number {
  color: var(--color-link);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.guide-library-card h3 {
  margin: 28px 0 10px;
  color: var(--color-carbon);
  font-size: 20px;
  line-height: 1.3;
}

.guide-library-card p {
  margin: 0 0 22px;
  color: var(--color-graphite);
  font-size: 14px;
  line-height: 1.7;
}

.guide-library-card a {
  margin-top: auto;
  color: var(--color-link);
  font-size: 14px;
  font-weight: 600;
  text-underline-offset: 3px;
}

.tested-examples {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 36px;
  align-items: center;
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--color-fog);
  border-radius: var(--radius-cards);
  background: var(--color-linen);
}

.tested-examples .section-kicker {
  text-align: left;
}

.tested-examples h3 {
  margin: 0 0 10px;
  color: var(--color-carbon);
  font-size: 22px;
  line-height: 1.3;
}

.tested-examples p:last-child {
  margin: 0;
  color: var(--color-graphite);
  font-size: 14px;
  line-height: 1.7;
}

.tested-example-links {
  display: grid;
  gap: 8px;
}

.tested-example-links a {
  padding: 12px 14px;
  border: 1px solid var(--color-fog);
  border-radius: 9px;
  background: var(--color-paper-white);
  color: var(--color-link);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.tested-example-links a:hover {
  border-color: var(--color-accent);
}

.faq-section {
  padding: var(--section-gap) 0;
  background: var(--color-paper-white);
  border-top: 1px solid var(--color-fog);
}

.faq-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.4fr);
  gap: 64px;
  align-items: start;
}

.faq-heading {
  position: sticky;
  top: 116px;
}

.faq-heading .section-kicker,
.faq-heading h2 {
  text-align: left;
}

.faq-heading p:last-child {
  color: var(--color-graphite);
  line-height: 1.75;
}

.faq-list details {
  border-top: 1px solid var(--color-fog);
  padding: 20px 0;
}

.faq-list details:last-child {
  border-bottom: 1px solid var(--color-fog);
}

.faq-list summary {
  cursor: pointer;
  color: var(--color-carbon);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.faq-list summary:hover,
.faq-list details[open] summary {
  color: var(--color-link);
}

.faq-list details p {
  margin: 12px 28px 0 0;
  color: var(--color-graphite);
  font-size: 14px;
  line-height: 1.75;
}

/* ---------- Editorial guides ---------- */
.article-shell {
  padding: 52px 0 80px;
  background: var(--color-main-background);
}

.article-page {
  max-width: 820px;
}

.article-breadcrumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--color-ash);
  font-size: 13px;
}

.article-breadcrumbs a,
.article-page a {
  color: var(--color-link);
  text-underline-offset: 3px;
}

.article-page h1 {
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--color-carbon);
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.article-deck {
  margin: 0 0 14px;
  color: var(--color-graphite);
  font-size: 18px;
  line-height: 1.7;
}

.article-meta {
  margin: 0 0 36px;
  color: var(--color-ash);
  font-size: 13px;
}

.article-toc {
  margin: 36px 0 46px;
  padding: 24px 26px;
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-cards) var(--radius-cards) 0;
  background: var(--color-mist);
}

.article-toc strong {
  color: var(--color-carbon);
}

.article-toc ol {
  margin: 12px 0 0;
  padding-left: 20px;
}

.article-toc li {
  margin: 7px 0;
  color: var(--color-graphite);
}

.article-page h2 {
  margin: 48px 0 14px;
  color: var(--color-carbon);
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.03em;
  scroll-margin-top: 96px;
}

.article-page h3 {
  margin: 30px 0 10px;
  color: var(--color-carbon);
  font-size: 19px;
}

.article-page p,
.article-page li {
  color: var(--color-graphite);
  font-size: 16px;
  line-height: 1.82;
}

.article-page ul,
.article-page ol {
  padding-left: 24px;
}

.article-page li {
  margin: 7px 0;
}

.article-quick-start {
  margin: 0 0 24px;
  padding: 20px 22px;
  border: 1px solid var(--color-fog);
  border-radius: var(--radius-cards);
  background: var(--color-mist);
}

.article-page .article-quick-start h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.article-page .article-quick-start .walkthrough-steps {
  margin: 0;
  padding: 0;
}

.article-page .article-quick-start .walkthrough-step {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

.article-page .article-quick-start .walkthrough-step-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
}

.article-page .article-quick-start .walkthrough-caption {
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.article-quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.article-quick-actions .btn {
  color: var(--color-on-primary);
  text-decoration: none;
}

.article-page code {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--color-mist);
  color: var(--color-carbon);
  overflow-wrap: anywhere;
}

.article-callout {
  margin: 32px 0;
  padding: 22px 24px;
  border: 1px solid var(--color-fog);
  border-radius: var(--radius-cards);
  background: var(--color-linen);
}

.article-callout strong {
  display: block;
  margin-bottom: 5px;
  color: var(--color-carbon);
}

.article-callout p {
  margin: 0;
  font-size: 14px;
}

.example-report {
  margin: 48px 0;
  padding: 28px;
  border: 1px solid var(--color-fog);
  border-radius: var(--radius-cards);
  background: var(--color-paper-white);
  box-shadow: var(--shadow-subtle-3);
}

.article-page .example-report h2 {
  margin-top: 4px;
}

.example-kicker {
  margin: 0;
  color: var(--color-accent) !important;
  font-size: 12px !important;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.example-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 26px 0;
  align-items: start;
}

.example-preview {
  margin: 0;
  min-width: 0;
}

.example-preview-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.example-preview-trigger:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.example-preview img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border: 1px solid var(--color-fog);
  border-radius: 10px;
  background: #fff;
}

.example-preview--contain img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.example-preview--alpha img {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #dfe4e8 25%, transparent 25%),
    linear-gradient(-45deg, #dfe4e8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dfe4e8 75%),
    linear-gradient(-45deg, transparent 75%, #dfe4e8 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.image-lightbox {
  width: calc(100vw - 40px);
  height: calc(100vh - 40px);
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.image-lightbox[open] {
  display: grid;
  place-items: center;
}

.image-lightbox::backdrop {
  background: rgba(6, 14, 29, 0.82);
  backdrop-filter: blur(4px);
}

.image-lightbox img {
  display: block;
  margin: auto;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.image-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(6, 14, 29, 0.78);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox-close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.example-preview figcaption {
  margin-top: 8px;
  color: var(--color-ash);
  font-size: 13px;
  line-height: 1.5;
}

.example-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--color-fog);
  border-radius: 10px;
  background: var(--color-fog);
}

.example-facts div {
  padding: 16px;
  background: var(--color-mist);
}

.example-facts strong,
.example-facts span {
  display: block;
}

.example-facts strong {
  margin-bottom: 4px;
  color: var(--color-carbon);
  font-size: 14px;
}

.example-facts span {
  color: var(--color-graphite);
  font-size: 13px;
  line-height: 1.55;
}

.example-downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.example-downloads a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--color-fog);
  border-radius: 10px;
  background: var(--color-mist);
  font-weight: 600;
  text-decoration: none;
}

.example-downloads a:hover {
  border-color: var(--color-accent);
}

.example-downloads span {
  flex: 0 0 auto;
  color: var(--color-ash);
  font-size: 12px;
  font-weight: 500;
}

.comparison-wrap {
  margin: 26px 0 36px;
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.comparison-table caption {
  padding: 0 0 10px;
  color: var(--color-carbon);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.comparison-table th,
.comparison-table td {
  padding: 14px;
  border: 1px solid var(--color-fog);
  color: var(--color-graphite);
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.comparison-table th {
  background: var(--color-mist);
  color: var(--color-carbon);
  font-weight: 600;
}

.article-cta {
  margin: 48px 0;
  padding: 30px;
  border: 1px solid var(--color-fog);
  border-radius: var(--radius-cards);
  background: var(--color-paper-white);
  color: var(--color-carbon);
  box-shadow: var(--shadow-subtle-3);
}

.article-cta h2,
.article-cta p {
  color: inherit;
}

.article-cta h2 {
  margin-top: 0;
}

.article-cta .btn {
  margin-top: 8px;
}

.article-cta .btn-success {
  color: var(--color-on-primary);
}

.article-cta-centered {
  text-align: center;
}

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

.related-guides a {
  padding: 20px;
  border: 1px solid var(--color-fog);
  border-radius: var(--radius-cards);
  background: var(--color-mist);
  font-weight: 600;
}

/* ---------- Features ---------- */
.features {
  background: var(--color-linen);
  padding: var(--section-gap) 0;
}

.features h2 {
  text-align: center;
  font-size: var(--text-heading);
  font-weight: 500;
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  margin: 0 0 48px;
  color: var(--color-carbon);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}

.feature {
  background: transparent;
  padding: var(--spacing-32) 16px;
  text-align: center;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-on-primary);
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--color-on-primary);
}

.feature h3 {
  margin: 0 0 8px;
  font-size: var(--text-subheading);
  font-weight: 500;
  line-height: var(--leading-subheading);
  letter-spacing: var(--tracking-subheading);
  color: var(--color-carbon);
}

.feature p {
  margin: 0;
  color: var(--color-graphite);
  font-size: 15px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-paper-white);
  border-top: 1px solid var(--color-fog);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}

.footer-brand .logo {
  margin-bottom: 8px;
}

.footer-brand p {
  color: var(--color-ash);
  font-size: 14px;
  margin: 0;
  max-width: 280px;
}

.footer-col h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.32px;
  color: var(--color-carbon);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--color-graphite);
  text-decoration: none;
  font-size: 14px;
}

.footer-col a:hover {
  color: var(--color-link);
}

.footer-bottom {
  border-top: 1px solid var(--color-fog);
  padding-top: 20px;
  color: var(--color-ash);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom nav {
  display: flex;
  gap: 20px;
}

.footer-bottom nav a {
  color: var(--color-ash);
  text-decoration: none;
}

.footer-bottom nav a:hover {
  color: var(--color-link);
}

/* ---------- Legal pages ---------- */
.legal {
  padding: 48px 28px 64px;
  max-width: 800px;
}

.legal h1 {
  margin: 0 0 6px;
  font-size: var(--text-heading-lg);
  font-weight: 600;
  line-height: var(--leading-heading-lg);
  letter-spacing: var(--tracking-heading-lg);
}

.legal h2 {
  margin: 28px 0 8px;
  font-size: var(--text-heading-sm);
  font-weight: 500;
  color: var(--color-carbon);
  scroll-margin-top: 96px;
}

.legal p {
  color: var(--color-graphite);
  text-align: justify;
}

.legal .muted {
  color: var(--color-ash);
  font-size: 14px;
}

.legal a {
  color: var(--color-link);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-beam {
    height: 260px;
  }

  .hero-copy {
    width: 100%;
    justify-self: center;
    text-align: center;
  }

  .hero-copy .hero-sub {
    margin: 0 auto;
  }

  .guide-library-grid {
    grid-template-columns: 1fr;
  }

  .guide-library-card {
    min-height: 0;
  }

  .guide-library-card h3 {
    margin-top: 16px;
  }

  .tested-examples {
    grid-template-columns: 1fr;
    gap: 22px;
  }

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

@media (max-width: 720px) {
  .home-page main {
    display: flex;
    flex-direction: column;
  }

  .home-page .hero {
    order: 1;
  }

  .home-page .band {
    order: 2;
  }

  .home-page .hero-beam {
    display: none;
  }

  .home-page .hero-kicker {
    display: none;
  }

  .home-page .tool-directory {
    order: 3;
  }

  .home-page .tool-guides {
    order: 4;
  }

  .home-page .guide-library {
    order: 5;
  }

  .home-page .features {
    order: 6;
  }

  .home-page .faq-section {
    order: 7;
  }

  .nav-pill {
    position: relative;
  }

  .nav-actions {
    gap: 10px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    z-index: 60;
    width: min(240px, calc(100vw - 40px));
    transform: translateX(-50%);
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px;
    background: var(--color-paper-white);
    border: 1px solid var(--color-fog);
    border-radius: var(--radius-cards);
    box-shadow: var(--shadow-subtle-3);
  }

  .nav-links.is-open {
    display: flex;
    animation: mobile-nav-in 0.16s ease both;
  }

  .btn.btn-menu {
    display: inline-flex;
  }

  .nav-links a {
    width: 100%;
    padding: 10px 12px;
    text-align: center;
    border-radius: var(--radius-lg);
  }

  .nav-links a:hover {
    color: var(--color-link);
    background: var(--color-interactive-wash);
    text-decoration: none;
  }

  .converter-card {
    padding: 20px;
  }

  .conversion-walkthrough .walkthrough-steps {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .converter-howto {
    padding: 14px;
  }

  .walkthrough-step-copy {
    padding: 9px 10px;
  }

  .walkthrough-step-title,
  .article-page .article-quick-start .walkthrough-step-title {
    font-size: 13px;
  }

  .walkthrough-caption,
  .article-page .article-quick-start .walkthrough-caption {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.4;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero {
    padding: 32px 0 24px;
  }

  .band {
    padding: 32px 0;
  }

  .faq-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .faq-heading {
    position: static;
  }
}

@media (max-width: 560px) {
  .logo-img {
    width: 150px;
  }

  .legal {
    padding: 32px 20px 48px;
  }

  .tool-guide-grid {
    grid-template-columns: 1fr;
  }

  .article-shell {
    padding: 32px 0 56px;
  }

  .article-page {
    padding: 0 20px;
  }

  .article-page h1 {
    font-size: 36px;
  }

  .article-deck {
    font-size: 16px;
  }

  .article-quick-start {
    padding: 16px;
  }

  .example-report,
  .tested-examples {
    padding: 20px;
  }

  .example-preview-grid,
  .example-facts,
  .example-downloads {
    grid-template-columns: 1fr;
  }

  .related-guides {
    grid-template-columns: 1fr;
  }

  .converter-tabs {
    gap: 3px;
    padding: 4px;
  }

  .converter-tab {
    padding: 10px 6px;
    font-size: 13px;
  }

  .converter-actions {
    flex-direction: column;
  }

  .tool-directory-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 404 page ---------- */
/* Short page: let main grow so the footer sits at the bottom of the viewport. */
.page-not-found {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.page-not-found main {
  flex: 1 0 auto;
}

/* No footer grid here, so drop the second divider and the gap above it. */
.page-not-found .site-footer {
  padding-top: 24px;
}

.page-not-found .footer-bottom {
  border-top: none;
  padding-top: 0;
}

.not-found {
  max-width: 720px;
  padding-top: 56px;
  padding-bottom: 72px;
  text-align: center;
}

.not-found-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 28px;
}

.nf-file {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 92px;
  height: 116px;
  padding: 38px 14px 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px 26px 10px 10px;
  background: var(--color-surface);
  box-shadow: var(--shadow-subtle-3);
}

.nf-file--missing {
  border: 2px dashed var(--color-control-border);
  background: transparent;
  box-shadow: none;
  justify-content: center;
  padding: 14px;
}

.nf-file-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-tags);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nf-file--missing .nf-file-tag {
  position: static;
  align-self: center;
  padding: 0;
  background: none;
  color: var(--color-text-secondary);
  font-size: 34px;
  font-weight: 600;
}

.nf-file-line {
  height: 6px;
  border-radius: 3px;
  background: var(--color-border);
}

.nf-file-line--short {
  width: 60%;
}

.nf-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 20px;
  transform: rotate(90deg);
}

.nf-path {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--color-interactive-wash);
  color: var(--color-text-primary);
  word-break: break-all;
}

.nf-heading {
  margin: 48px 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.nf-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nf-tools a {
  display: block;
  padding: 12px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nf-tools a:hover,
.nf-tools a:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-link);
}

.nf-report {
  margin: 32px 0 0;
  color: var(--color-text-secondary);
  font-size: 14px;
}

@media (max-width: 560px) {
  .not-found {
    padding-top: 32px;
  }

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

  .nf-tools li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
