/* WrenConvert: warm paper, ink, and a wren-brown accent */

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #fbf8f3;
  --bg-alt: #f4eee5;
  --surface: #ffffff;
  --ink: #231a13;
  --ink-2: #4d4036;
  --muted: #6b5d51;
  --line: #e8dfd3;
  --line-strong: #d8cbbb;
  --accent: #b4532a;
  --accent-ink: #9a4321;
  --accent-soft: #f8e6d8;
  --safe: #2f6b55;
  --safe-soft: #e1efe8;
  --danger: #b3412e;
  --shadow: 0 1px 2px rgb(60 40 20 / .06), 0 8px 24px -8px rgb(60 40 20 / .12);
  --shadow-lg: 0 2px 4px rgb(60 40 20 / .05), 0 24px 48px -16px rgb(60 40 20 / .22);

  --wren-body: #8a5434;
  --wren-wing: #c58a5e;
  --wren-beak: #2a1d14;
  --wren-eye: #fff7ee;

  --radius: 14px;
  --radius-lg: 22px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15120e; --bg-alt: #1c1813; --surface: #221d17; --ink: #f4ede4; --ink-2: #d6cabd;
    --muted: #a8998a; --line: #342c24; --line-strong: #4a3f34; --accent: #e88a55; --accent-ink: #f2a273;
    --accent-soft: #3a2519; --safe: #7cc4a5; --safe-soft: #1c3029; --danger: #ef8a74;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -8px rgb(0 0 0 / .5);
    --shadow-lg: 0 24px 48px -16px rgb(0 0 0 / .6);
    --wren-body: #d08b5f; --wren-wing: #f0c19c; --wren-beak: #f4ede4; --wren-eye: #15120e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15120e; --bg-alt: #1c1813; --surface: #221d17; --ink: #f4ede4; --ink-2: #d6cabd;
  --muted: #a8998a; --line: #342c24; --line-strong: #4a3f34; --accent: #e88a55; --accent-ink: #f2a273;
  --accent-soft: #3a2519; --safe: #7cc4a5; --safe-soft: #1c3029; --danger: #ef8a74;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -8px rgb(0 0 0 / .5);
  --shadow-lg: 0 24px 48px -16px rgb(0 0 0 / .6);
  --wren-body: #d08b5f; --wren-wing: #f0c19c; --wren-beak: #f4ede4; --wren-eye: #15120e;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--font); font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 750; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
kbd .icon, .dz-sub .icon { display: inline-block; vertical-align: -2px; }
.icon { flex: none; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px;
  font-size: .8rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--safe);
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 60ch; }
.accent { color: var(--accent); }

/* ---------- Buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: 600 .95rem var(--font); text-decoration: none; cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
:root[data-theme="dark"] .btn-primary { color: #1a110b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #1a110b; } }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-alt); color: var(--ink); }

.badge {
  display: inline-block; font: 650 .68rem/1 var(--font); letter-spacing: .05em; text-transform: uppercase; font-style: normal;
  padding: 5px 8px; border-radius: 999px; background: var(--bg-alt); color: var(--ink-2); vertical-align: middle;
}
.badge-new { background: var(--accent-soft); color: var(--accent-ink); }
.badge-muted { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-size: 1.2rem; font-weight: 500; letter-spacing: -0.02em; }
.brand b { font-weight: 750; }
.brand .wren { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover .wren { transform: rotate(-8deg) translateY(-2px); }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 8px 14px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .95rem;
}
.main-nav a:hover { background: var(--bg-alt); color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }
.header-actions { display: flex; gap: 4px; }
.nav-toggle, .search-toggle { display: none; }

/* Header search */
.header-search { position: relative; width: 230px; flex: none; }
.hs-box {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 12px;
  border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); color: var(--muted);
  transition: border-color .15s, box-shadow .15s;
}
.hs-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hs-box input { flex: 1; min-width: 0; border: 0; background: transparent; font: 500 .93rem var(--font); color: var(--ink); outline: none; }
.hs-box input::placeholder { color: var(--muted); }
.hs-box input::-webkit-search-cancel-button { display: none; }
.hs-box kbd {
  font: 600 .75rem var(--font); color: var(--muted); border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 6px;
}
.hs-box:focus-within kbd { display: none; }
.hs-results {
  position: absolute; top: calc(100% + 6px); right: 0; width: max(100%, 340px); max-height: min(70vh, 440px); overflow-y: auto;
  margin: 0; padding: 6px; list-style: none; z-index: 60;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.hs-results a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 9px;
  color: var(--ink); text-decoration: none; font-weight: 550; font-size: .95rem;
}
.hs-results a small { color: var(--muted); font-weight: 500; font-size: .8rem; white-space: nowrap; }
.hs-results a mark { background: none; color: var(--accent-ink); font-weight: 750; }
.hs-results [aria-selected="true"] a, .hs-results a:hover { background: var(--bg-alt); }
.hs-results [aria-selected="true"] a { box-shadow: inset 3px 0 0 var(--accent); }
.hs-empty { padding: 12px; color: var(--muted); font-size: .92rem; }
.hs-empty a { color: var(--accent-ink); }

@media (max-width: 1100px) {
  .search-toggle { display: inline-grid; }
  .header-search {
    position: absolute; top: 68px; left: 0; right: 0; width: auto; padding: 12px 20px 14px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none;
  }
  .header-search.is-open { display: block; }
  .hs-box { height: 48px; }
  .hs-box input { font-size: 1rem; }
  .hs-box kbd { display: none; }
  .hs-results { position: static; width: auto; margin-top: 8px; box-shadow: none; max-height: 60vh; }
}
.when-dark { display: none; }
:root[data-theme="dark"] .when-dark { display: inline; }
:root[data-theme="dark"] .when-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .when-dark { display: inline; }
  :root:not([data-theme="light"]) .when-light { display: none; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-grid; }
  .main-nav {
    position: absolute; top: 68px; left: 0; right: 0; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; padding: 10px 16px 16px; }
  .main-nav a { padding: 12px 14px; }
  .header-actions { margin-left: auto; }
}
/* Very narrow screens: tighten the header so the logo and three buttons still fit */
@media (max-width: 360px) {
  .header-row { gap: 12px; }
  .brand { font-size: 1.08rem; gap: 7px; }
  .header-actions { gap: 0; }
  .header-actions .icon-btn { width: 40px; height: 40px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 64px 0 72px; overflow: hidden;
  background:
    radial-gradient(800px 380px at 85% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(600px 300px at -10% 110%, color-mix(in srgb, var(--safe) 10%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 26px 0 0; color: var(--ink-2); font-weight: 550; font-size: .95rem; }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust .icon { color: var(--safe); }
@media (max-width: 920px) {
  .hero { padding: 40px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Converter widget ---------- */
.converter {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 14px; box-shadow: var(--shadow-lg);
}

/* "Convert [FROM] to [TO]" sentence */
.picker-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 8px 4px 16px; }
.picker-word { font-weight: 650; color: var(--muted); font-size: 1rem; }
.picker-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; }
.picker-title .icon { color: var(--accent); }
.fmt-btn {
  display: inline-grid; grid-template-columns: auto auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px;
  min-width: 128px; min-height: 58px; padding: 8px 14px 8px 16px; text-align: left; cursor: pointer;
  border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--bg); color: var(--ink);
  font-family: var(--font); transition: border-color .15s, box-shadow .15s, background .15s;
}
.fmt-btn:hover { border-color: var(--ink-2); }
.fmt-btn[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.fmt-btn-cap { grid-column: 1; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fmt-btn-val { grid-column: 1; font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.fmt-btn-chev { grid-column: 2; grid-row: 1 / 3; justify-self: end; color: var(--muted); transition: transform .2s; }
.fmt-btn[aria-expanded="true"] .fmt-btn-chev { transform: rotate(180deg); }
.fmt-btn-to { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.fmt-btn-to .fmt-btn-val { color: var(--accent-ink); }

/* Drop area */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px;
  min-height: 236px; padding: 26px 20px; border-radius: 16px; cursor: pointer;
  border: 2px dashed var(--line-strong); background: var(--bg);
  transition: border-color .2s, background .2s, min-height .2s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 45%, var(--bg)); }
.dropzone.is-over { box-shadow: inset 0 0 0 4px var(--accent-soft); }
.dropzone.has-files { min-height: 0; flex-direction: row; flex-wrap: wrap; gap: 10px 14px; padding: 14px; }
.dropzone.has-files .dz-icon, .dropzone.has-files .dz-sub, .dropzone.has-files .dz-paste { display: none; }
.dropzone.has-files .btn-lg { min-height: 42px; padding: 0 16px; font-size: .93rem; }
.dz-icon {
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 12px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1);
}
.dropzone:hover .dz-icon, .dropzone.is-over .dz-icon { transform: translateY(-4px); }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1.05rem; border-radius: 14px; }
.dz-title { margin: 10px 0 0; color: var(--ink-2); font-size: .95rem; }
.dropzone.has-files .dz-title { margin: 0; }
kbd {
  display: inline-block; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px;
  background: var(--surface); font: 600 .78rem var(--font); color: var(--ink-2);
}
.dz-sub { display: block; margin: 6px 0 0; color: var(--safe); font-size: .84rem; font-weight: 550; }
@media (hover: none) { .dz-paste { display: none; } }

.pair-status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 4px 0; padding: 12px 14px;
  border-radius: 12px; background: var(--bg-alt); color: var(--ink-2); font-size: .9rem;
}

.converter-bar { display: flex; align-items: flex-end; gap: 14px; padding: 14px 4px 2px; flex-wrap: wrap; }
.converter-bar[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.field-grow { flex: 1; min-width: 160px; }
.field input[type="range"] { width: 100%; height: 46px; margin: 0; accent-color: var(--accent); }
.field output { color: var(--ink); }
.converter-bar .btn { min-width: 150px; min-height: 50px; }
.converter-bar .btn:only-child { flex: 1; }

.file-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.file-item {
  display: grid; grid-template-columns: 44px 1fr auto auto; align-items: center; gap: 12px;
  padding: 8px 8px 8px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line);
}
.file-info { min-width: 0; }
.file-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--bg-alt); display: grid; place-items: center; font: 700 .62rem var(--font); color: var(--muted); }
.file-name { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { color: var(--muted); font-size: .8rem; }
.file-status { font-size: .78rem; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.file-remove { width: 34px; height: 34px; }

/* Format picker popover */
.fmt-backdrop { position: fixed; inset: 0; z-index: 70; background: transparent; }
.fmt-pop {
  position: absolute; z-index: 80; width: min(540px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: var(--shadow-lg);
  overflow: hidden; animation: pop-in .16s ease-out;
}
.fmt-pop[hidden], .fmt-backdrop[hidden] { display: none; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px); } }
.fmt-pop-head { display: none; align-items: center; justify-content: space-between; padding: 12px 12px 0 18px; }
.fmt-pop-title { font-weight: 700; }
.fmt-search {
  display: flex; align-items: center; gap: 10px; margin: 12px; padding: 0 14px; min-height: 46px;
  border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--muted);
}
.fmt-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fmt-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: 500 1rem var(--font); }
.fmt-pop-body { display: grid; grid-template-columns: 170px 1fr; border-top: 1px solid var(--line); height: 320px; }
.fmt-groups { list-style: none; margin: 0; padding: 8px; overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg); }
.fmt-groups button {
  display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-2); font: 550 .93rem var(--font); text-align: left; cursor: pointer;
}
.fmt-groups button span { font-size: .72rem; color: var(--muted); font-weight: 600; }
.fmt-groups button:hover { background: var(--bg-alt); color: var(--ink); }
.fmt-groups button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.fmt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; align-content: start; padding: 12px; overflow-y: auto; }
.fmt-opt {
  position: relative; min-height: 44px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: 700 .85rem var(--font); letter-spacing: .01em; cursor: pointer;
  transition: border-color .12s, background .12s, transform .12s;
}
.fmt-opt:hover, .fmt-opt:focus-visible { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.fmt-opt.is-current { background: var(--accent); border-color: var(--accent); color: #fff; }
.fmt-opt i { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.fmt-empty { grid-column: 1 / -1; color: var(--muted); margin: 8px; }

@media (max-width: 640px) {
  .fmt-backdrop { background: rgb(20 14 8 / .45); }
  .fmt-pop {
    position: fixed; left: 0 !important; right: 0; bottom: 0; top: auto !important; width: 100%;
    border-radius: 20px 20px 0 0; animation: sheet-in .22s ease-out;
  }
  @keyframes sheet-in { from { transform: translateY(100%); } }
  .fmt-pop-head { display: flex; }
  .fmt-pop-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: 58vh; }
  .fmt-groups { display: flex; gap: 6px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .fmt-groups li { flex: none; }
  .fmt-groups button { white-space: nowrap; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); background: var(--surface); }
  .fmt-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .fmt-btn { min-width: 0; flex: 1; }
  .picker-word { font-size: .9rem; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-lede { color: var(--ink-2); max-width: 62ch; margin: 0; flex: 0 0 100%; }
.section-head.center .section-lede { margin-top: 10px; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }
@media (max-width: 700px) { .section { padding: 52px 0; } }

/* Popular pairs */
.pair-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.pair-card {
  display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.pair-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
@media (max-width: 520px) {
  .pair-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pair-card { padding: 14px; gap: 10px; font-size: .92rem; }
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
}
.pair { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--muted); }
.pair-name { font-weight: 650; overflow-wrap: anywhere; }
.fmt {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 8px;
  font: 750 .74rem/1 var(--font); letter-spacing: .03em; color: #fff; background: #8f8378;
}
.fmt-heic { background: #5b6b8c; }
.fmt-jpg  { background: #c0692f; }
.fmt-png  { background: #2f7d6b; }
.fmt-webp { background: #4b6fb5; }
.fmt-avif { background: #8a5aa8; }
.fmt-svg  { background: #c08a1e; }
.fmt-pdf  { background: #b3412e; }
.fmt-ico  { background: #5f7a3a; }
.fmt-action { background: var(--ink-2); }

/* How it works */
.how { background: var(--bg-alt); }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 8px 0 48px; }
.compare-card { margin: 0; padding: clamp(18px, 5vw, 26px); min-width: 0; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.compare-card figcaption { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 20px; }
.is-them figcaption { color: var(--muted); }
.is-us { border-color: color-mix(in srgb, var(--safe) 45%, var(--line)); box-shadow: 0 0 0 4px var(--safe-soft); }
.flow { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 110px; padding: 10px; border-radius: 14px; background: var(--bg); }
.node { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-2); text-align: center; }
.node small { font-size: .72rem; color: var(--muted); font-weight: 550; max-width: 9em; line-height: 1.25; }
.node-server { color: var(--danger); }
.node-us { color: var(--safe); }
.node-us small { color: var(--safe); font-size: .85rem; max-width: none; }
.wire { position: relative; flex: 1; max-width: 80px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wire i { display: block; width: 100%; height: 2px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 10px); position: relative; overflow: hidden; }
.wire i::after { content: ''; position: absolute; top: -2px; left: -10px; width: 8px; height: 6px; border-radius: 2px; background: var(--danger); animation: packet 2.2s linear infinite; }
.wire-back i::after { animation-delay: 1.1s; }
.wire b { font-size: .66rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
@keyframes packet { to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .wire i::after { animation: none; display: none; } }
.compare-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.compare-list li { position: relative; padding-left: 26px; color: var(--ink-2); }
.compare-list li::before { content: ''; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.is-us .compare-list li::before { background: var(--safe); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { padding: 4px; }
.step-n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--bg); font-weight: 750; margin-bottom: 14px; }
.steps p { color: var(--ink-2); margin: 0; }
@media (max-width: 820px) {
  .compare, .steps { grid-template-columns: minmax(0, 1fr); }
  .flow { gap: 0; }
  .wire { max-width: 54px; }
}

/* Categories */
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.cat-card {
  display: flex; gap: 16px; height: 100%; padding: 20px; border-radius: var(--radius); text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.cat-card.is-later { background: transparent; border-style: dashed; }
.cat-card.is-later .cat-icon { filter: grayscale(.8); opacity: .7; }
.cat-icon { display: inline-grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 12px; color: #fff; background: #8f8378; }
.cat-icon-lg { width: 60px; height: 60px; border-radius: 16px; margin-bottom: 18px; }
.cat-image { background: #c0692f; }
.cat-spreadsheet { background: #2f7d55; }
.cat-font { background: #4a4a8a; }
.cat-audio { background: #a8466e; }
.cat-video { background: #3f6fa0; }
.cat-archive { background: #8a6a2f; }
.cat-pdf { background: #b3412e; }
.cat-vector { background: #c08a1e; }
.cat-document { background: #3d6db3; }
.cat-ebook { background: #6b5a8a; }
.cat-presentation { background: #c2572f; }
.cat-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cat-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.cat-blurb { color: var(--ink-2); font-size: .92rem; line-height: 1.5; }
.cat-formats { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.cat-formats span { font: 650 .7rem/1 var(--font); padding: 4px 7px; border-radius: 6px; background: var(--bg-alt); color: var(--muted); }

/* Why */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.why-item .icon { color: var(--accent); margin-bottom: 14px; }
.why-item p { color: var(--ink-2); margin: 0; font-size: .95rem; }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .why-grid { grid-template-columns: 1fr; } }

/* FAQ / details */
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 2px; font-weight: 650; font-size: 1.05rem; cursor: pointer; list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.5rem; font-weight: 400; color: var(--muted); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--ink-2); padding: 0 2px 18px; margin: 0; }
.faq h2 { margin-bottom: 24px; }

/* ---------- Inner pages ---------- */
.page-hero { padding: 40px 0 48px; background: radial-gradient(700px 300px at 90% -20%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 70%); }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.page-hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; }
@media (max-width: 920px) { .page-hero-grid { grid-template-columns: 1fr; gap: 28px; } }
.tool-hero .converter { margin-top: 28px; }
.tool-hero .lede { margin-bottom: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

.tool-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tool-row {
  display: grid; grid-template-columns: 220px 1fr auto; gap: 20px; align-items: center;
  padding: 18px 8px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.tool-row:hover { background: var(--surface); }
.tool-row:hover .icon { color: var(--accent); transform: translateX(3px); }
.tool-row .icon { color: var(--muted); transition: transform .2s; }
.tool-row-name { font-weight: 700; }
.tool-row-desc { color: var(--ink-2); font-size: .93rem; }
@media (max-width: 680px) { .tool-row { grid-template-columns: 1fr auto; } .tool-row-desc { grid-column: 1; } .tool-row .icon { grid-row: 1 / 3; grid-column: 2; } }

.coming { text-align: center; max-width: 560px; margin: 0 auto; padding: 40px 0; }
.coming .badge { margin-bottom: 16px; }
.coming p { color: var(--ink-2); }

.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list a {
  display: inline-block; padding: 9px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 550; font-size: .93rem;
}
.chip-list a:hover { border-color: var(--accent); color: var(--accent-ink); }
.tool-group { margin-bottom: 36px; }
.tool-group h2 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; }
.tool-group .cat-icon { width: 34px; height: 34px; border-radius: 9px; }

.search {
  display: flex; align-items: center; gap: 10px; max-width: 480px; margin-top: 24px; padding: 0 16px;
  min-height: 52px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input { flex: 1; border: 0; background: transparent; font: 500 1rem var(--font); color: var(--ink); outline: none; min-width: 0; }

/* Prose */
.prose-wrap { padding-top: 56px; }
.prose { font-size: 1.04rem; }
.prose h2 { margin-top: 1.8em; font-size: 1.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose ol, .prose ul { padding-left: 1.3em; color: var(--ink-2); }
.prose li { margin-bottom: .5em; }
.prose p { color: var(--ink-2); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child > * { border-bottom: 0; }
thead th { background: var(--bg-alt); font-weight: 700; }
tbody th { font-weight: 600; color: var(--muted); white-space: nowrap; }
.callout {
  display: flex; gap: 14px; margin: 36px 0; padding: 20px; border-radius: var(--radius);
  background: var(--safe-soft); color: var(--safe);
}
.callout strong { color: var(--ink); }
.callout p { margin: 4px 0 0; color: var(--ink-2); font-size: .95rem; }
.related { background: var(--bg-alt); }
.related h2 { font-size: 1.3rem; }

.not-found { padding: 96px 0; }
.not-found .wren { margin: 0 auto 20px; animation: hop 2.4s ease-in-out infinite; }
.not-found .btn { margin: 6px; }
.not-found .lede { margin: 0 auto 24px; }
.nf-suggest { margin: -8px auto 24px; font-weight: 600; }
.nf-suggest a { color: var(--accent-ink); }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 70% { transform: translateY(-14px) rotate(-6deg); } 80% { transform: translateY(0); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 56px 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--ink-2); font-size: .93rem; max-width: 34ch; margin: 14px 0 0; }
.footer-tagline { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 1.02rem !important; color: var(--accent-ink) !important; }
.site-footer h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer ul a { color: var(--ink-2); text-decoration: none; font-size: .93rem; }
.site-footer ul a:hover { color: var(--accent-ink); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 44px; padding: 20px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.footer-bottom p { margin: 0; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--bg);
  font-weight: 550; font-size: .93rem; box-shadow: var(--shadow-lg);
}

.fmt-legend { display: flex; align-items: center; gap: 6px; margin: 0; padding: 9px 16px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.fmt-legend[hidden] { display: none; }
.fmt-legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
@media (max-width: 640px) { .fmt-pop { width: 100% !important; } }

/* ---------- Converter: options, progress and results ---------- */
.converter-bar { align-items: flex-end; }
.options { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; flex: 1 1 320px; min-width: 0; }
.options:empty { display: none; }
.btn-go { flex: 0 0 auto; }
.options:empty + .btn-go { flex: 1; }
.field input[type="number"], .field select {
  min-height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-strong);
  font: 600 .95rem var(--font); color: var(--ink); background: var(--surface);
}
.field select {
  padding-right: 34px; appearance: none; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%237a6b5e' stroke-width='2'%3E%3Cpath d='m2 4 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.field-num input { width: 120px; }
.field input:focus-visible, .field select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-color input { width: 56px; height: 46px; padding: 4px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; font-weight: 600; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--line); }
.seg button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: 600 .9rem var(--font); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }

.btn-sm { min-height: 38px; padding: 0 14px; font-size: .88rem; border-radius: 10px; gap: 6px; }
.btn-dl { background: var(--safe); border-color: var(--safe); color: #fff; }
.btn-dl:hover { border-color: var(--safe); filter: brightness(1.08); }
:root[data-theme="dark"] .btn-dl { color: #0f1f19; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-dl { color: #0f1f19; } }

.file-item.is-done { border-color: color-mix(in srgb, var(--safe) 35%, var(--line)); }
.file-item.is-error { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.file-item.is-merged { background: var(--safe-soft); }
.file-meta strong { color: var(--ink); font-weight: 650; }
.file-status.is-working { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); background: var(--bg-alt); }
.file-status.is-error { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.file-error { color: var(--danger); white-space: normal; }
.file-item.is-error .file-meta { white-space: normal; }
.file-remove[disabled] { opacity: .3; cursor: default; }
.spinner { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.delta { font-weight: 700; font-size: .78rem; padding: 1px 6px; border-radius: 6px; }
.delta.down { color: var(--safe); background: var(--safe-soft); }
.delta.up { color: var(--muted); background: var(--bg-alt); }

.results-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: 12px; padding: 14px 16px; border-radius: 14px; background: var(--safe-soft); color: var(--ink-2);
}
.results-bar strong { color: var(--ink); }
.results-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.results-actions .btn { min-height: 42px; }

@media (max-width: 560px) {
  .file-item { grid-template-columns: 40px 1fr auto; row-gap: 8px; }
  .file-item .file-thumb { width: 40px; height: 40px; }
  .file-item > .btn-dl, .file-item > .file-status { grid-column: 2 / 3; justify-self: start; }
  .file-item > .file-remove { grid-row: 1; grid-column: 3; }
  .btn-go { flex: 1 1 100%; }
  .results-actions { width: 100%; flex-direction: column-reverse; }
  .results-actions .btn { width: 100%; }
}

.all-pairs-title { margin-top: 56px; }
.pair-index { display: grid; gap: 4px; }
.pair-index-row { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pair-index-row h3 { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: .9rem; color: var(--muted); font-weight: 600; }
.chip-list-sm { gap: 6px; }
.chip-list-sm a { padding: 6px 11px; font-size: .86rem; border-radius: 8px; }
@media (max-width: 560px) { .pair-index-row { grid-template-columns: 1fr; gap: 8px; } }
.notes { padding-left: 0 !important; list-style: none; display: grid; gap: 12px; }
.notes li { position: relative; padding: 14px 16px 14px 44px; margin: 0; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.notes li::before { content: 'i'; position: absolute; left: 14px; top: 14px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font: 700 .75rem/1 Georgia, serif; font-style: italic; }
.fmt-heif { background: #5b6b8c; } .fmt-jfif { background: #c0692f; } .fmt-tiff { background: #5d6f78; }
.fmt-bmp { background: #6b7d8a; } .fmt-tga { background: #7a5c8a; } .fmt-psd { background: #2f5d9a; } .fmt-gif { background: #8a7a2f; }

.badge-live { background: var(--safe-soft); color: var(--safe); }
.footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.fmt-csv { background: #2f7d55; } .fmt-tsv { background: #3f7d6a; } .fmt-xlsx { background: #1f7244; } .fmt-xlsm { background: #2a6b4a; }
.fmt-xls { background: #4f7a3a; } .fmt-ods { background: #3f6fa0; } .fmt-numbers { background: #3a9a5b; } .fmt-html { background: #c2572f; }

.file-thumb-font { font-size: 1.25rem; font-weight: 400; color: var(--ink); opacity: .35; transition: opacity .3s; }
.file-thumb-font.is-ready { opacity: 1; }
.fmt-ttf { background: #4a4a8a; } .fmt-otf { background: #5b4a8a; } .fmt-woff { background: #3d5a9a; } .fmt-woff2 { background: #2f6b9a; } .fmt-eot { background: #6b6b7a; }

/* ---------- Pages: contact, policies, bylines ---------- */
.contact-email { font-size: 1.35rem; font-weight: 700; margin: 0 0 8px; }
.contact-email a { text-decoration: none; border-bottom: 2px solid var(--accent-soft); }
.contact-email a:hover { border-color: var(--accent); }
.updated { color: var(--muted) !important; font-size: .9rem; }
.byline { margin: 10px 0 0; color: var(--muted); font-size: .9rem; }
.byline a { color: var(--ink-2); }
.prose table { margin: 8px 0 24px; }
.prose .table-wrap, .prose > table { display: block; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.faq-list details[open] summary { color: var(--accent-ink); }
.site-footer .footer-bottom a { color: inherit; }
.page-hero + .prose-wrap { padding-top: 8px; border-top: 0; }

.footer-sister { font-size: .88rem !important; margin-top: 10px !important; }
.footer-sister a { color: var(--accent-ink); font-weight: 600; }


/* ---------- Format chips: every colour gives white text at least 4.5:1 ---------- */
.fmt { background: #6b6158; }
.fmt-action, :root[data-theme="dark"] .fmt-action { background: #4d4036; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fmt-action { background: #4d4036; } }
.fmt-jpg { background: #a5521f; }
.fmt-jfif { background: #a5521f; }
.fmt-svg { background: #8a5f0c; }
.fmt-numbers { background: #2a7744; }
.fmt-bmp { background: #55677a; }
.fmt-gif { background: #6f611d; }
.fmt-png { background: #2f7d6b; }
.fmt-heic { background: #5b6b8c; }
.fmt-heif { background: #5b6b8c; }
.fmt-webp { background: #4b6fb5; }
.fmt-avif { background: #8a5aa8; }
.fmt-pdf { background: #b3412e; }
.fmt-ico { background: #5f7a3a; }
.fmt-mp3 { background: #8a3d63; }
.fmt-wav { background: #3d6a8a; }
.fmt-m4a { background: #6b4a8a; }
.fmt-aac { background: #7a4f2a; }
.fmt-flac { background: #2f6f5a; }
.fmt-ogg { background: #8a4a2a; }
.fmt-opus { background: #2f5d8a; }
.fmt-aiff { background: #5a5a7a; }
.fmt-amr { background: #6b6158; }
.fmt-wma { background: #3a5a8a; }
.fmt-mp4 { background: #7a3f3f; }
.fmt-mov { background: #4a5a6a; }
.fmt-webm { background: #3f6a3f; }
.fmt-mkv { background: #5a4a6a; }
.fmt-tiff { background: #5d6f78; }
.fmt-tga { background: #7a5c8a; }
.fmt-psd { background: #2f5d9a; }
.fmt-csv { background: #2f7d55; }
.fmt-tsv { background: #3f7d6a; }
.fmt-xlsx { background: #1f7244; }
.fmt-xlsm { background: #2a6b4a; }
.fmt-xls { background: #4f7a3a; }
.fmt-ods { background: #3f6fa0; }
.fmt-html { background: #b14f28; }
.fmt-ttf { background: #4a4a8a; }
.fmt-otf { background: #5b4a8a; }
.fmt-woff { background: #3d5a9a; }
.fmt-woff2 { background: #2f6b9a; }
.fmt-eot { background: #5f5f6e; }

/* ---------- Test results, format lists ---------- */
.test-result { margin: 8px 0 28px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.test-result p { margin: 0; }
.test-result dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.test-result dt { font-size: .78rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.test-result dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.test-result .test-note { font-size: .85rem; color: var(--muted); }
.cat-about { max-width: 820px; margin-top: 56px; }
.format-list { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.format-list div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.format-list dt { font-weight: 750; }
.format-list dd { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .format-list div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Compression options and results ---------- */
.opt-hint { flex-basis: 100%; margin: -2px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.match { font-weight: 650; color: var(--ink-2); }
.match.is-same { color: var(--safe); }
.file-actions { display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 560px) { .file-item > .file-actions { grid-column: 2 / 4; justify-self: start; } }

/* ---------- Before / after viewer ---------- */
.cmp-dialog {
  width: min(1100px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
}
.cmp-dialog::backdrop { background: rgb(20 14 8 / .72); }
.cmp-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); }
.cmp-head h2 { margin: 0; font-size: 1.05rem; }
.cmp-info { color: var(--muted); font-size: .9rem; font-weight: 550; margin-right: auto; }
.cmp-stage {
  position: relative; display: grid; place-items: center; overflow: hidden; padding: 16px; min-height: 200px;
  background: repeating-conic-gradient(var(--bg-alt) 0 25%, var(--surface) 0 50%) 0 0 / 20px 20px;
  touch-action: none; cursor: ew-resize; user-select: none;
}
.cmp-stage.is-zoom { display: block; overflow: auto; max-height: 62vh; touch-action: pan-x pan-y; }
.cmp-inner { position: relative; max-width: none; }
.cmp-stage.is-zoom .cmp-inner { margin: 0 auto; }
.cmp-inner img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cmp-stage.is-zoom .cmp-inner img { image-rendering: auto; }
.cmp-after { position: absolute; inset: 0; }
.cmp-line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .35); pointer-events: none; }
.cmp-line::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23231a13' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 7-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 20px no-repeat;
  box-shadow: 0 2px 8px rgb(0 0 0 / .3);
}
.cmp-tag { position: absolute; top: 24px; padding: 3px 9px; border-radius: 7px; background: rgb(20 14 8 / .72); color: #fff; font-size: .78rem; font-weight: 650; pointer-events: none; }
.cmp-tag-l { left: 24px; }
.cmp-tag-r { right: 24px; }
.cmp-stage.is-zoom .cmp-tag { display: none; }
.cmp-foot { display: flex; align-items: center; gap: 14px; padding: 12px 20px 4px; }
.cmp-foot input[type="range"] { flex: 1; accent-color: var(--accent); }
.cmp-hint { margin: 0; padding: 0 20px 14px; color: var(--muted); font-size: .84rem; }

/* ---------- HTML sitemap ---------- */
.sm-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.sm-jump a {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .9rem;
}
.sm-jump a:hover { border-color: var(--accent); color: var(--accent-ink); }
.sm-block { padding: 28px 0 32px; border-bottom: 1px solid var(--line); scroll-margin-top: 84px; }
.sm-block:first-child { padding-top: 0; }
.sm-block > h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.35rem; margin: 0 0 18px; }
.sm-block > h2 a { color: inherit; text-decoration: none; }
.sm-block > h2 a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.sm-block .cat-icon { width: 34px; height: 34px; border-radius: 9px; }
.sm-count { font-size: .82rem; font-weight: 600; color: var(--muted); background: var(--bg-alt); padding: 3px 9px; border-radius: 999px; }
.sm-tools { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; padding: 0; margin: 0 0 22px; font-weight: 650; }
.sm-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px 28px; }
.sm-cols-wide { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.sm-cols h3 { margin: 0 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.sm-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; }
.sm-cols a, .sm-tools a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.sm-cols a:hover, .sm-tools a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.sm-foot { margin-top: 28px; }

/* People who ask their system for less motion get no hops, lifts or smooth scrolling. The progress spinner stays. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .spinner { animation-duration: .7s !important; animation-iteration-count: infinite !important; }
  [class*="-card"]:hover, .tool-row:hover .icon { transform: none !important; }
}

/* ---------- Analytics consent ---------- */
.consent {
  position: fixed; left: 16px; bottom: 16px; z-index: 80; width: min(420px, calc(100vw - 32px)); padding: 18px 18px 16px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.consent p { margin: 0 0 12px; font-size: .92rem; line-height: 1.5; color: var(--ink-2); }
.consent .consent-title { margin-bottom: 6px; font-weight: 700; font-size: 1rem; color: var(--ink); }
.consent a { color: var(--accent-ink); }
.consent-actions { display: flex; gap: 8px; justify-content: flex-end; }
.consent-actions .btn { min-height: 40px; padding: 0 16px; }
.link-btn { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.link-btn:hover { text-decoration: underline; }

/* Social links in the footer */
.site-footer .footer-social { display: flex; flex-direction: row; gap: 8px; list-style: none; margin: 14px 0 0; padding: 0; }
.footer-social a {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
}
.footer-social a:hover { color: var(--accent-ink); border-color: var(--accent); }
