/* MyConvert public site — light, sharp edition.
   Warm white paper, black hairlines, one electric blue accent, zero radius.
   The file badge stays the one colourful element; everything else is line work. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fafaf7;
  --surface: #ffffff;
  --surface-2: #f3f3ee;
  --ink: #0e1013;
  --ink-2: #3c414a;
  --ink-3: #6a707b;
  --line: #e2e2dc;
  --line-strong: #0e1013;
  --action: #2340ff;
  --action-hover: #1530db;
  --action-soft: #eef0ff;
  --action-ink: #ffffff;
  --ok: #0f7a47;
  --ok-soft: #e6f5ec;
  --bad: #c4262c;
  --bad-soft: #fdeceb;
  --focus: #2340ff;
  --hl: #fff27a;

  --f-pdf: #e2363c;
  --f-image: #079283;
  --f-doc: #2563eb;
  --f-sheet: #15803d;
  --f-slide: #ea6a16;
  --f-media: #7c3aed;
  --f-audio: #c0368f;
  --f-archive: #b77f06;
  --f-data: #4b5563;

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 0;
  --r-md: 0;
  --r-lg: 0;
  --hard: 4px 4px 0 var(--ink);
  --hard-lg: 8px 8px 0 var(--ink);
  --shadow-drop: var(--hard);
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--action);
}

main { flex: 1 0 auto; }

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.3rem, 1.4rem + 3.6vw, 4.1rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.3vw, 2.2rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0 0 1em; }

::selection { background: var(--hl); color: var(--ink); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

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

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 8px 14px;
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; color: var(--paper); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Small uppercase label used above section titles. */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 14px;
  font: 600 0.74rem/1 var(--font-mono);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--action); }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--surface);
  --btn-ink: var(--ink);
  --btn-line: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--btn-line); border-radius: 0;
  background: var(--btn-bg); color: var(--btn-ink);
  font: 600 0.95rem/1.2 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}
.btn:hover { color: var(--btn-ink); text-decoration: none; transform: translate(-2px, -2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: none; box-shadow: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary { --btn-bg: var(--action); --btn-ink: var(--action-ink); --btn-line: var(--ink); }
.btn-primary:hover { --btn-bg: var(--action-hover); box-shadow: 3px 3px 0 var(--ink); }
.btn-large { min-height: 56px; padding: 14px 28px; font-size: 1.05rem; }
.btn-quiet { --btn-bg: transparent; --btn-line: transparent; color: var(--ink-2); padding-inline: 12px; }
.btn-quiet:hover { --btn-bg: var(--surface-2); transform: none; box-shadow: none; }
.btn-danger { --btn-ink: var(--bad); --btn-line: var(--bad); }
.btn-block { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}

/* ---------- File badge ---------- */

.fbadge {
  --c: var(--f-data);
  --w: 40px;
  position: relative; flex: none;
  width: var(--w); height: calc(var(--w) * 1.24);
  background: var(--c);
  clip-path: polygon(0 0, 70% 0, 100% 24%, 100% 100%, 0 100%);
  color: #fff;
  display: inline-flex; align-items: flex-end; justify-content: flex-start;
  padding: 0 0 calc(var(--w) * 0.13) calc(var(--w) * 0.12);
}
.fbadge::after {
  content: ""; position: absolute; top: 0; right: 0;
  width: 30%; height: 24%;
  background: rgba(255, 255, 255, 0.5);
}
.fbadge > span {
  font: 600 calc(var(--w) * 0.25)/1 var(--font-mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.fbadge[data-family="pdf"] { --c: var(--f-pdf); }
.fbadge[data-family="image"] { --c: var(--f-image); }
.fbadge[data-family="doc"] { --c: var(--f-doc); }
.fbadge[data-family="sheet"] { --c: var(--f-sheet); }
.fbadge[data-family="slide"] { --c: var(--f-slide); }
.fbadge[data-family="media"] { --c: var(--f-media); }
.fbadge[data-family="audio"] { --c: var(--f-audio); }
.fbadge[data-family="archive"] { --c: var(--f-archive); }
.fbadge-sm { --w: 26px; }
.fbadge-lg { --w: 68px; }

.pair { display: inline-flex; align-items: center; gap: 8px; }
.pair-arrow { width: 16px; height: 16px; color: var(--ink); flex: none; }
.fbadge-lg + .pair-arrow, .pair-lg .pair-arrow { width: 28px; height: 28px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--ink); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 66px; }

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 1.3rem/1 var(--font-display); letter-spacing: -0.04em;
  color: var(--ink); text-decoration: none; margin-right: auto;
}
.logo:hover { color: var(--ink); text-decoration: none; }
.logo-mark { width: 30px; height: 30px; }

.site-nav { display: flex; align-items: stretch; align-self: stretch; gap: 0; }
.site-nav a {
  display: inline-flex; align-items: center;
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  padding: 0 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--action); }
.site-nav .btn { align-self: center; margin-left: 12px; padding: 8px 16px; min-height: 40px; border-bottom: 1px solid var(--ink); margin-bottom: 0; color: var(--ink); }
.site-nav .btn:hover { border-bottom-color: var(--ink); }

.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center;
    border: 1px solid var(--ink); border-radius: 0; background: var(--surface); color: var(--ink); cursor: pointer;
  }
  .nav-toggle svg { width: 20px; height: 20px; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--surface); border-bottom: 1px solid var(--ink);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); margin: 0; }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); box-shadow: inset 3px 0 0 var(--action); padding-left: 12px; }
  .site-nav .btn { margin: 14px 0 0; align-self: stretch; }
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 96px; padding: 56px 0 32px;
  border-top: 1px solid var(--ink); background: var(--surface);
  color: var(--ink-2); font-size: 0.93rem;
}
.footer-grid {
  display: grid; gap: 32px;
  grid-template-columns: minmax(220px, 1.4fr) repeat(auto-fit, minmax(150px, 1fr));
}
.footer-grid h2 {
  font: 600 0.74rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 16px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid a, .footer-link { color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover, .footer-link:hover { color: var(--ink); text-decoration: underline; }
.footer-about p { max-width: 34ch; margin-top: 14px; }
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-about { grid-column: 1 / -1; }
}
.footer-base {
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line);
  color: var(--ink-3); font: 500 0.8rem var(--font-mono); letter-spacing: 0.02em;
}
.footer-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* ---------- Home hero ---------- */

.hero {
  padding: clamp(32px, 6vw, 80px) 0 clamp(40px, 6vw, 80px);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid; gap: 0 clamp(28px, 4vw, 64px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-areas: "copy drop" "finder drop";
  grid-template-rows: auto 1fr;
  align-items: start;
}
.hero-copy { grid-area: copy; align-self: end; }
.hero-drop { grid-area: drop; align-self: center; }
.hero-finder-wrap { grid-area: finder; }
.hero h1 { max-width: 12ch; margin-bottom: 22px; }
.hero-copy .eyebrow { background: var(--surface); padding: 6px 10px 6px 0; }
.hero-sub { font-size: 1.15rem; color: var(--ink-2); max-width: 44ch; margin-bottom: 28px; background: color-mix(in srgb, var(--paper) 85%, transparent); }
.hero-proof { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 24px 0 0; padding: 0; color: var(--ink); font-size: 0.9rem; }
.hero-proof li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; background: var(--surface); border: 1px solid var(--ink);
  font-weight: 500;
}
.hero-proof svg { width: 16px; height: 16px; color: var(--ok); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "copy" "drop" "finder"; grid-template-rows: auto; row-gap: 8px; }
  .hero h1 { max-width: 16ch; }
  .hero-finder-wrap { margin-top: 24px; }
  .hero-sub { margin-bottom: 20px; }
}

/* Format finder: "From [ ] to [ ]" */
.finder {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 10px; border: 1px solid var(--ink);
  background: var(--surface); max-width: 560px;
}
.finder label { font: 600 0.78rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); padding-left: 6px; }
.finder select {
  flex: 1 1 96px; min-width: 0; min-height: 44px; padding: 8px 34px 8px 12px;
  border: 1px solid var(--line); border-radius: 0;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e1013' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  color: var(--ink); font: 600 0.95rem var(--font-body);
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
.finder select:hover { border-color: var(--ink); }
.finder .btn { flex: 1 0 100%; }
@media (min-width: 1100px) { .finder .btn { flex: 0 0 auto; } }
.finder-note { font-size: 0.9rem; color: var(--ink-3); margin: 10px 0 0 4px; }

/* ---------- Converter widget ---------- */

.converter {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--ink);
  box-shadow: var(--hard-lg);
  padding: clamp(12px, 2vw, 18px);
}
@media (max-width: 520px) { .converter { box-shadow: var(--hard); } }

.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 300px; padding: 32px 20px;
  background:
    linear-gradient(var(--surface-2), var(--surface-2)) padding-box;
  border: 1.5px dashed color-mix(in srgb, var(--ink) 35%, transparent);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dropzone:hover { border-color: var(--ink); }
.dropzone.is-drag { border-color: var(--action); border-style: solid; background: var(--action-soft); }
.converter[data-mode="tool"] .dropzone { min-height: 240px; }

.file-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.file-input:focus-visible + .drop-content .btn { outline: 2px solid var(--focus); outline-offset: 3px; }

.drop-content { position: relative; pointer-events: none; display: flex; flex-direction: column; align-items: center; }
.drop-content .btn { pointer-events: none; }
.drop-title { font: 700 1.3rem/1.2 var(--font-display); letter-spacing: -0.02em; margin: 18px 0 6px; }
.drop-hint { color: var(--ink-3); font-size: 0.9rem; margin: 12px 0 0; max-width: 42ch; }

/* Badge fan inside the drop zone. The one load-time motion on the site. */
.fan { position: relative; width: 190px; height: 92px; }
.fan .fbadge {
  --w: 58px;
  position: absolute; left: 50%; top: 6px;
  margin-left: calc(var(--w) / -2);
  transform: translateX(var(--x)) rotate(var(--r));
  transform-origin: 50% 110%;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: drop-shadow(2px 2px 0 var(--ink));
}
.fan .fbadge:nth-child(1) { --x: -66px; --r: -12deg; }
.fan .fbadge:nth-child(2) { --x: -22px; --r: -4deg; }
.fan .fbadge:nth-child(3) { --x: 22px; --r: 4deg; }
.fan .fbadge:nth-child(4) { --x: 66px; --r: 12deg; }
.dropzone.is-drag .fan .fbadge:nth-child(1) { --x: -84px; --r: -18deg; }
.dropzone.is-drag .fan .fbadge:nth-child(2) { --x: -30px; --r: -7deg; }
.dropzone.is-drag .fan .fbadge:nth-child(3) { --x: 30px; --r: 7deg; }
.dropzone.is-drag .fan .fbadge:nth-child(4) { --x: 84px; --r: 18deg; }

.fan-2 .fbadge:nth-child(1) { --x: -34px; --r: -8deg; }
.fan-2 .fbadge:nth-child(2) { --x: 34px; --r: 8deg; }
.dropzone.is-drag .fan-2 .fbadge:nth-child(1) { --x: -50px; --r: -14deg; }
.dropzone.is-drag .fan-2 .fbadge:nth-child(2) { --x: 50px; --r: 14deg; }

@media (prefers-reduced-motion: no-preference) {
  .fan .fbadge { animation: fan-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .fan .fbadge:nth-child(2) { animation-delay: 0.06s; }
  .fan .fbadge:nth-child(3) { animation-delay: 0.12s; }
  .fan .fbadge:nth-child(4) { animation-delay: 0.18s; }
}
@keyframes fan-in {
  from { opacity: 0; transform: translateX(0) translateY(18px) rotate(0deg); }
}

.converter-panel { padding: 6px 4px 4px; }
.converter-panel[hidden] { display: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.panel-title { font: 700 1.1rem/1.3 var(--font-display); margin: 0; }

.file-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 0; border: 1px solid var(--line); }
.file-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 12px;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.file-row:last-child { border-bottom: 0; }
.file-row.is-dragging { opacity: 0.5; }
.file-row.is-over { box-shadow: inset 0 0 0 2px var(--action); }
.file-row[draggable="true"] { cursor: grab; }
.file-meta { min-width: 0; flex: 1; }
.file-name { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { display: block; font: 500 0.78rem var(--font-mono); color: var(--ink-3); }
.file-row.is-bad { background: var(--bad-soft); box-shadow: inset 3px 0 0 var(--bad); }
.file-row.is-bad .file-size { color: var(--bad); }
.file-order { display: flex; gap: 2px; }
.icon-btn {
  width: 36px; height: 36px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 0; background: transparent; color: var(--ink-3); cursor: pointer;
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); background: var(--surface); }
.icon-btn:disabled { opacity: 0.3; cursor: default; border-color: transparent; }
.icon-btn svg { width: 18px; height: 18px; }

.panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.panel-actions .btn-primary { flex: 1 1 220px; }

.quality {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 0 14px; padding: 0; border: 0;
}
.quality legend { float: left; font: 600 0.76rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); margin-right: 6px; padding: 0; }
.segmented { display: inline-flex; border: 1px solid var(--ink); background: var(--surface); }
.segmented label { position: relative; }
.segmented label + label { border-left: 1px solid var(--ink); }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: block; padding: 7px 14px; font-weight: 600; font-size: 0.88rem; color: var(--ink-2); }
.segmented input:checked + span { background: var(--ink); color: var(--surface); }
.segmented input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -4px; }
.quality-note { flex-basis: 100%; font-size: 0.86rem; color: var(--ink-3); margin: 0; }

.progress-wrap { padding: 28px 8px 16px; text-align: center; }
.progress-label { font: 700 1.15rem/1.3 var(--font-display); margin: 0 0 4px; }
.progress-detail { color: var(--ink-3); font: 500 0.82rem var(--font-mono); margin: 0 0 16px; min-height: 1.5em; }
.progress {
  height: 12px; background: var(--surface); overflow: hidden;
  border: 1px solid var(--ink);
}
.progress-bar {
  display: block; height: 100%; width: 0;
  background: repeating-linear-gradient(-45deg, var(--action) 0 8px, var(--action-hover) 8px 16px);
  transition: width 0.3s ease;
}
.progress.is-indeterminate .progress-bar {
  width: 35% !important;
  animation: slide 1.2s ease-in-out infinite;
}
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { .progress.is-indeterminate .progress-bar { animation: none; width: 100% !important; opacity: 0.4; } }

.result { display: grid; gap: 18px; padding: 18px 8px 8px; }
.result-head { display: flex; align-items: center; gap: 14px; }
.result-icon {
  width: 48px; height: 48px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ok); color: #fff;
}
.result-icon svg { width: 26px; height: 26px; }
.result-title { font: 700 1.35rem/1.2 var(--font-display); margin: 0; }
.result-sub { color: var(--ink-3); margin: 2px 0 0; font-size: 0.92rem; }
.result-row { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 760px) { .result-row.has-ad { grid-template-columns: minmax(0, 1fr) 300px; } }
.result-actions { display: grid; gap: 10px; }
.result-actions .btn-primary { width: 100%; }
.result-more { display: flex; flex-wrap: wrap; gap: 8px; }
.share-box {
  display: flex; gap: 8px; align-items: center;
  padding: 6px 6px 6px 12px; border: 1px solid var(--ink); background: var(--surface-2);
}
.share-box input { flex: 1; min-width: 0; min-height: 0; border: 0; padding: 0; background: transparent; color: var(--ink); font: 500 0.85rem var(--font-mono); }
.share-box input:focus { box-shadow: none; }
.keep-note {
  display: flex; gap: 10px; align-items: center; margin: 0;
  padding: 12px 14px; background: var(--action-soft); color: var(--ink); font-size: 0.93rem;
  border-left: 3px solid var(--action);
}
.keep-note a { font-weight: 600; }
.ref { font: 500 0.76rem var(--font-mono); color: var(--ink-3); margin: 0; }

.chooser { padding: 8px 4px 4px; }
.chooser-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.choice {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 12px; border: 1px solid var(--line); border-radius: 0; background: var(--surface);
  color: var(--ink); font: 600 0.95rem var(--font-body); cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.choice:hover:not(:disabled) { border-color: var(--ink); box-shadow: var(--hard); }
.choice:disabled { opacity: 0.5; cursor: not-allowed; }
.choice small { display: block; font-weight: 400; color: var(--ink-3); font-size: 0.82rem; }

.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  background: var(--bad-soft); color: var(--ink); border: 1px solid var(--bad); border-left-width: 4px;
}
.alert svg { width: 20px; height: 20px; color: var(--bad); flex: none; margin-top: 2px; }
.alert p { margin: 0; }
.alert-ok { background: var(--ok-soft); border-color: var(--ok); }
.alert-ok svg { color: var(--ok); }
.alert[hidden] { display: none; }
.converter .alert { margin: 12px 4px 4px; }

.challenge { display: grid; justify-items: center; gap: 12px; padding: 20px 8px; text-align: center; }
.noscript { margin: 12px 4px 0; color: var(--bad); }

/* ---------- Sections ---------- */

.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--ink); }
.section-head h2 { margin: 0; }
.section-head p:not(.eyebrow) { margin: 8px 0 0; color: var(--ink-2); max-width: 60ch; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }

/* Tool directory: bordered grid cells, one per category. */
.directory {
  display: grid; gap: 0;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  border-top: 1px solid var(--ink); border-left: 1px solid var(--ink);
}
.dir-col { border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 20px 20px 16px; background: var(--surface); }
.dir-col h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 1.1rem; margin-bottom: 12px; }
.dir-col h3 a { color: inherit; text-decoration: none; }
.dir-col h3 a:hover { text-decoration: underline; }
.dir-count { font: 600 0.75rem var(--font-mono); color: var(--ink-3); padding: 2px 6px; border: 1px solid var(--line); }
.dir-list { list-style: none; margin: 0; padding: 0; }
.dir-list a {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 6px; margin: 0 -6px; border-top: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem;
}
.dir-list li:first-child a { border-top: 0; }
.dir-list a:hover { color: var(--action); background: var(--action-soft); text-decoration: none; }
.dir-list .pair { gap: 4px; }
.dir-list .pair-arrow { width: 12px; height: 12px; }

/* Steps: a real sequence, so numbers are earned. */
.steps {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step;
  border-left: 1px solid var(--ink);
}
.steps li { counter-increment: step; position: relative; padding: 4px 28px 8px; border-right: 1px solid var(--ink); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; margin-bottom: 20px;
  font: 700 3rem/1 var(--font-display); letter-spacing: -0.04em; color: var(--action);
}
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--ink-2); margin: 0; }
@media (max-width: 560px) {
  .steps { border-left: 0; border-top: 1px solid var(--ink); }
  .steps li { border-right: 0; border-bottom: 1px solid var(--ink); padding: 20px 0; }
}

.promise { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.promise li { display: flex; gap: 16px; align-items: flex-start; padding: 24px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--paper); }
.promise svg { width: 28px; height: 28px; color: var(--action); flex: none; margin-top: 2px; }
.promise strong { display: block; font-family: var(--font-display); font-size: 1.1rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.promise span { color: var(--ink-2); }

/* FAQ accordion */
.faq { border-top: 1px solid var(--ink); }
.faq-narrow { max-width: 840px; }
.faq details { border-bottom: 1px solid var(--ink); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 2px; font: 600 1.06rem/1.35 var(--font-display); letter-spacing: -0.01em;
}
.faq summary:hover { color: var(--action); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ink); font: 500 1.1rem/1 var(--font-mono); color: var(--ink);
}
.faq details[open] summary::after { content: "−"; background: var(--ink); color: var(--surface); }
.faq details > div { padding: 0 2px 20px; color: var(--ink-2); max-width: 70ch; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Ads ---------- */

.ad-band { padding-top: 8px; }
.ad-band-tool { margin-top: 32px; }
.ad-band-inline { margin-block: 40px; padding-top: 0; }
.ad-slot {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; overflow: hidden;
  border: 1px dashed color-mix(in srgb, var(--ink) 30%, transparent);
  background:
    repeating-linear-gradient(-45deg, transparent 0 10px, color-mix(in srgb, var(--ink) 3%, transparent) 10px 11px),
    var(--surface-2);
}
.ad-slot.is-filled { border-style: solid; border-color: var(--line); background: var(--surface); }
.ad-label {
  position: absolute; top: 0; left: 0; margin: 0; padding: 3px 8px;
  font: 600 0.64rem/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.ad-slot ins { width: 100%; }
.ad-slot-rail { position: sticky; top: 90px; }
@media (max-width: 960px) {
  .ad-slot-rail { position: static; min-height: 250px !important; }
}

/* ---------- Tool page ---------- */

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font: 500 0.78rem var(--font-mono); letter-spacing: 0.02em; color: var(--ink-3); margin: 0 0 26px; }
.crumbs ol { display: contents; list-style: none; }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: "/"; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

.tool-hero { padding: clamp(24px, 4vw, 48px) 0 36px; }
.tool-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.tool-hero-badges { padding: 18px 22px; border: 1px solid var(--ink); background: var(--surface); box-shadow: var(--hard); }
.tool-hero h1 { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.4rem); max-width: 20ch; }
.tool-hero .pair { margin: 0; }
@media (max-width: 700px) {
  .tool-hero-grid { grid-template-columns: 1fr; }
  .tool-hero-badges { order: -1; justify-self: start; padding: 12px 16px; }
  .tool-hero-badges .fbadge-lg { --w: 48px; }
}
.answer { font-size: 1.12rem; color: var(--ink-2); max-width: 66ch; margin: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 0; list-style: none; margin: 26px 0 0; padding: 0; color: var(--ink); font-size: 0.92rem; border: 1px solid var(--ink); background: var(--surface); }
.facts li { display: inline-flex; align-items: flex-start; gap: 8px; flex: 1 1 220px; padding: 12px 16px; border-right: 1px solid var(--line); }
.facts li:last-child { border-right: 0; }
.facts svg { width: 16px; height: 16px; color: var(--ok); flex: none; margin-top: 4px; }

.tool-body {
  display: grid; gap: 56px;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: stretch;
  margin-top: 64px;
}
@media (max-width: 960px) { .tool-body { grid-template-columns: 1fr; gap: 40px; } }
.tool-main > section + section, .tool-main > .ad-band + section { margin-top: 56px; }
.tool-main > section + .ad-band { margin-top: 48px; }
.tool-aside { display: flex; flex-direction: column; gap: 24px; }
.aside-block { border: 1px solid var(--ink); background: var(--surface); padding: 20px; }
.aside-block h2 { font: 600 0.74rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px; }
.aside-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.aside-list a { display: flex; align-items: center; gap: 12px; padding: 9px 8px; margin: 0 -8px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.94rem; }
.aside-list li:first-child a { border-top: 0; }
.aside-list a:hover { background: var(--action-soft); color: var(--action); text-decoration: none; }

.howto { list-style: none; margin: 0; padding: 0; counter-reset: how; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.howto li { counter-increment: how; display: grid; grid-template-columns: 56px 1fr; gap: 2px 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.howto li::before {
  content: counter(how, decimal-leading-zero); grid-row: span 2;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--surface); font: 600 0.95rem var(--font-mono);
}
.howto strong { font-family: var(--font-display); font-size: 1.08rem; letter-spacing: -0.01em; }
.howto span { color: var(--ink-2); }

.limits { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.limits li { display: flex; gap: 12px; color: var(--ink-2); padding: 12px 0; border-bottom: 1px solid var(--line); }
.limits svg { width: 18px; height: 18px; color: var(--ink); flex: none; margin-top: 4px; }

.prose { max-width: 70ch; }
.prose p, .prose li { color: var(--ink-2); }
.prose h2 { margin-top: 1.8em; }
.prose .eyebrow + h2, .prose > h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--action); }
.prose code { font: 500 0.86em var(--font-mono); padding: 0.1em 0.35em; background: var(--surface-2); border: 1px solid var(--line); }
.prose strong { color: var(--ink); }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--action); color: var(--ink); }
.prose table { margin: 1.5em 0; border: 1px solid var(--ink); }
.guide-cta { margin-top: 36px; }

/* ---------- Inner pages ---------- */

.page-head { padding: clamp(32px, 5vw, 64px) 0 32px; margin-bottom: 32px; border-bottom: 1px solid var(--ink); }
.page-head h1 { font-size: clamp(2.2rem, 1.5rem + 2.4vw, 3.2rem); }
.page-head .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 62ch; margin: 0; }
.meta { color: var(--ink-3); font-size: 0.9rem; }
.page-head .meta { font: 500 0.8rem var(--font-mono); }

.card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.card-list li { border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.card-list a {
  display: block; height: 100%; padding: 24px;
  background: var(--surface); color: var(--ink); text-decoration: none;
  transition: background-color 0.12s ease;
}
.card-list a:hover { background: var(--action-soft); text-decoration: none; }
.card-list a:hover strong { color: var(--action); }
.card-list strong { display: block; font: 700 1.15rem/1.25 var(--font-display); letter-spacing: -0.015em; margin-bottom: 8px; }
.card-list span { color: var(--ink-2); font-size: 0.95rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--ink); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 0.74rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); background: var(--surface-2); border-bottom: 1px solid var(--ink); }
tr:last-child td { border-bottom: 0; }

/* Forms */
.form { display: grid; gap: 16px; max-width: 520px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field small { color: var(--ink-3); font-size: 0.86rem; }
input[type="email"], input[type="password"], input[type="text"], textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--ink); border-radius: 0;
  background: var(--surface); color: var(--ink); font: 1rem var(--font-body);
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--action); box-shadow: 3px 3px 0 var(--action); }
.form-status { margin: 0; color: var(--ink-2); min-height: 1.5em; }
.form-status.is-error { color: var(--bad); }
.form-status.is-ok { color: var(--ok); }

.auth {
  max-width: 460px; margin: clamp(28px, 6vw, 72px) auto 0;
  padding: clamp(24px, 4vw, 40px); border: 1px solid var(--ink);
  background: var(--surface); box-shadow: var(--hard-lg);
}
.auth h1 { font-size: 2rem; margin-bottom: 8px; }
.auth .lead { color: var(--ink-2); margin-bottom: 24px; }
.auth .form { max-width: none; }
.tabs { display: flex; margin-bottom: 24px; border: 1px solid var(--ink); }
.tabs button {
  flex: 1; min-height: 42px; border: 0; border-radius: 0; background: var(--surface);
  color: var(--ink-2); font: 600 0.92rem var(--font-body); cursor: pointer;
}
.tabs button + button { border-left: 1px solid var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--surface); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font: 500 0.76rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.social { display: grid; gap: 10px; }
.social svg { width: 18px; height: 18px; }
.auth-foot { margin: 18px 0 0; font-size: 0.9rem; color: var(--ink-3); text-align: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--action); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.panel { border: 1px solid var(--ink); background: var(--surface); padding: clamp(20px, 3vw, 28px); }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 1.3rem; }
.panel-danger { border-color: var(--bad); box-shadow: inset 4px 0 0 var(--bad); }

.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.history li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  padding: 14px 4px; border-bottom: 1px solid var(--line); background: transparent;
}
.history .h-main { flex: 1 1 220px; min-width: 0; }
.history .h-main a { font-weight: 600; text-decoration: none; color: var(--ink); }
.history .h-main a:hover { color: var(--action); }
.history .h-main small { display: block; color: var(--ink-3); font: 500 0.78rem var(--font-mono); }
.status-pill { display: inline-block; padding: 3px 8px; font: 600 0.7rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); }
.status-pill[data-status="succeeded"] { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.status-pill[data-status="failed"], .status-pill[data-status="cancelled"] { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }

.empty { text-align: center; padding: 56px 20px; border: 1px dashed color-mix(in srgb, var(--ink) 35%, transparent); color: var(--ink-2); background: var(--surface); }

/* Error page */
.error-page { text-align: center; padding: clamp(56px, 10vw, 128px) 0 24px; }
.error-page .fbadge { margin: 0 auto 28px; }
.error-page p { color: var(--ink-2); max-width: 46ch; margin: 0 auto 28px; }
.error-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- Cookie card ---------- */

.cookie-panel {
  position: fixed; z-index: 60; left: 16px; bottom: 16px;
  width: min(420px, calc(100vw - 32px));
}
.cookie-card {
  padding: 20px;
  background: var(--surface); border: 1px solid var(--ink); box-shadow: var(--hard-lg);
}
.cookie-card h2 { font-size: 1.15rem; margin-bottom: 6px; }
.cookie-card h2:focus { outline: none; }
.cookie-card p { color: var(--ink-2); font-size: 0.92rem; margin-bottom: 14px; }
.cookie-choices { display: grid; gap: 0; margin-bottom: 14px; border: 1px solid var(--line); }
.cookie-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.cookie-row:last-child { border-bottom: 0; }
.cookie-row strong { display: block; font-size: 0.95rem; }
.cookie-row small { color: var(--ink-3); font-size: 0.84rem; line-height: 1.4; display: block; }
.cookie-row input { width: 20px; height: 20px; accent-color: var(--action); flex: none; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions .btn { flex: 1 1 auto; min-height: 40px; padding: 8px 14px; font-size: 0.9rem; }
.cookie-actions [hidden] { display: none; }
.cookie-note { margin: 12px 0 0 !important; font-size: 0.85rem !important; }
.cookie-status { padding: 18px 20px; border: 1px solid var(--ink); background: var(--surface); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 0 0 28px; }
.cookie-status p { margin: 0; }

@media (max-width: 520px) {
  .cookie-panel { left: 8px; right: 8px; bottom: 8px; width: auto; }
}

@media print {
  .site-header, .site-footer, .ad-slot, .cookie-panel, .converter { display: none !important; }
  body { border-top: 0; }
}
[hidden] { display: none !important; }
.form > .btn { justify-self: start; }
.legal { max-width: 75ch; }
.legal h1 { margin-bottom: 0.6em; }
