/* covrt — quiet, Apple-like UI with a CloudConvert-style workflow. */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --fill: #f5f5f7;
  --fill-2: #e8e8ed;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --hairline: #d2d2d7;
  --hairline-soft: #e8e8ed;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-text: #0066cc;
  --accent-ring: rgba(0, 113, 227, 0.3);
  --success: #248a3d;
  --danger: #d70015;
  --nav-bg: rgba(255, 255, 255, 0.78);
  --seg-thumb: #ffffff;
  --scrim: rgba(0, 0, 0, 0.32);
  --pop-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 18px 48px rgba(0, 0, 0, 0.16);

  --t-video: #c2410c; --t-audio: #be185d; --t-image: #0f766e; --t-document: #1d4ed8;
  --t-spreadsheet: #15803d; --t-presentation: #b45309; --t-ebook: #7e22ce; --t-data: #0369a1;
  --t-archive: #78716c; --t-font: #4338ca; --t-subtitle: #52525b;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg-alt: #161617; --surface: #161617; --fill: #1d1d1f; --fill-2: #2c2c2e;
    --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #86868b; --hairline: #424245; --hairline-soft: #2c2c2e;
    --accent-text: #2997ff; --accent-ring: rgba(41, 151, 255, 0.35); --success: #30d158; --danger: #ff453a;
    --nav-bg: rgba(22, 22, 23, 0.78); --seg-thumb: #636366; --scrim: rgba(0, 0, 0, 0.55);
    --pop-shadow: 0 0 0 1px #2c2c2e, 0 18px 48px rgba(0, 0, 0, 0.6);
    --t-video: #fb923c; --t-audio: #f472b6; --t-image: #2dd4bf; --t-document: #60a5fa; --t-spreadsheet: #4ade80;
    --t-presentation: #fbbf24; --t-ebook: #c084fc; --t-data: #38bdf8; --t-archive: #d6d3d1; --t-font: #a5b4fc; --t-subtitle: #d4d4d8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg-alt: #161617; --surface: #161617; --fill: #1d1d1f; --fill-2: #2c2c2e;
  --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #86868b; --hairline: #424245; --hairline-soft: #2c2c2e;
  --accent-text: #2997ff; --accent-ring: rgba(41, 151, 255, 0.35); --success: #30d158; --danger: #ff453a;
  --nav-bg: rgba(22, 22, 23, 0.78); --seg-thumb: #636366; --scrim: rgba(0, 0, 0, 0.55);
  --pop-shadow: 0 0 0 1px #2c2c2e, 0 18px 48px rgba(0, 0, 0, 0.6);
  --t-video: #fb923c; --t-audio: #f472b6; --t-image: #2dd4bf; --t-document: #60a5fa; --t-spreadsheet: #4ade80;
  --t-presentation: #fbbf24; --t-ebook: #c084fc; --t-data: #38bdf8; --t-archive: #d6d3d1; --t-font: #a5b4fc; --t-subtitle: #d4d4d8;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 17px/1.47 var(--font); letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
main { flex: 1; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; border-radius: 8px; }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.i-xl { width: 40px; height: 40px; stroke-width: 1.3; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 40; height: 48px;
  background: var(--nav-bg); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline-soft);
}
.nav-inner { max-width: 1000px; height: 100%; margin: 0 auto; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font: 600 19px/1 var(--font-display); letter-spacing: -0.03em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { border: 0; background: none; padding: 6px 10px; font-size: 13px; letter-spacing: -0.01em; color: var(--text); opacity: 0.8; cursor: pointer; border-radius: 8px; }
.nav-link:hover { opacity: 1; }
.nav-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--text); opacity: 0.8; cursor: pointer; }
.nav-icon:hover { opacity: 1; background: var(--fill); }
.nav-icon .i { width: 17px; height: 17px; }
.theme-dark { display: none; }
:root[data-theme="dark"] .theme-light { display: none; }
:root[data-theme="dark"] .theme-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-light { display: none; }
  :root:not([data-theme="light"]) .theme-dark { display: block; }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 18px; border: 0; border-radius: 980px;
  font-size: 15px; font-weight: 400; letter-spacing: -0.01em; white-space: nowrap; cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), opacity 0.2s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.35; cursor: default; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--fill-2); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: var(--hairline); }
.btn-plain { background: none; color: var(--accent-text); padding: 0 8px; }
.btn-plain:hover:not(:disabled) { text-decoration: underline; }
.btn-lg { min-height: 48px; padding: 0 28px; font-size: 17px; }
.btn-sm { min-height: 30px; padding: 0 14px; font-size: 14px; }
.btn .i { width: 16px; height: 16px; }

.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- hero */
.hero { max-width: 980px; margin: 0 auto; padding: 76px 22px 36px; text-align: center; }
.hero h1 {
  margin: 0; font: 600 clamp(40px, 7.4vw, 72px)/1.05 var(--font-display); letter-spacing: -0.035em;
}
.hero h1 span { color: var(--text-3); }
.lede { max-width: 560px; margin: 20px auto 0; font-size: clamp(19px, 2.2vw, 21px); line-height: 1.38; color: var(--text-2); letter-spacing: -0.016em; }

.segmented {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; width: 220px; margin-top: 40px;
  padding: 2px; border-radius: 980px; background: var(--fill-2);
}
.segment {
  position: relative; z-index: 1; height: 32px; border: 0; background: none; border-radius: 980px;
  font-size: 14px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); cursor: pointer;
}
.segment-thumb {
  position: absolute; top: 2px; left: 2px; bottom: 2px; width: calc(50% - 2px); border-radius: 980px;
  background: var(--seg-thumb); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s var(--ease);
}
.segmented[data-active="link"] .segment-thumb { transform: translateX(100%); }

/* ---------------------------------------------------------------- stage */
.stage { max-width: 780px; margin: 0 auto; padding: 0 22px; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 56px 24px 52px; border-radius: 28px; background: var(--bg-alt);
  transition: box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}
.dropzone.over { box-shadow: inset 0 0 0 2px var(--accent); }
.dropzone-glyph { width: 52px; height: 52px; margin-bottom: 22px; fill: none; stroke: var(--text-3); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.dropzone-text { margin: 14px 0 0; color: var(--text-2); font-size: 15px; }
.dropzone-fine { margin: 26px 0 0; color: var(--text-3); font-size: 12px; letter-spacing: -0.01em; max-width: 440px; }

.drop-overlay {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; pointer-events: none;
  background: var(--scrim); opacity: 0; transition: opacity 0.18s var(--ease);
}
.drop-overlay.show { opacity: 1; }
.drop-overlay-card {
  display: grid; justify-items: center; gap: 10px; padding: 34px 48px; border-radius: 24px;
  background: var(--surface); color: var(--accent-text); box-shadow: var(--pop-shadow);
}
.drop-overlay-card p { margin: 0; color: var(--text); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }

/* ---------------------------------------------------------------- file list */
.list { margin-top: 16px; border: 1px solid var(--hairline-soft); border-radius: 22px; background: var(--surface); overflow: hidden; }
.list:first-child { margin-top: 0; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { position: relative; border-top: 1px solid var(--hairline-soft); animation: appear 0.35s var(--ease); }
.row:first-child { border-top: 0; }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } }
.row-main { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 16px 14px 20px; }

.badge {
  --tint: var(--text-2);
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px;
  background: color-mix(in srgb, var(--tint) 10%, transparent); color: var(--tint);
  font: 700 10.5px/1 var(--font); letter-spacing: 0.02em; text-transform: uppercase; overflow: hidden;
}
.badge .i { width: 20px; height: 20px; }
.tint-video { --tint: var(--t-video); } .tint-audio { --tint: var(--t-audio); } .tint-image { --tint: var(--t-image); }
.tint-document { --tint: var(--t-document); } .tint-spreadsheet { --tint: var(--t-spreadsheet); }
.tint-presentation { --tint: var(--t-presentation); } .tint-ebook { --tint: var(--t-ebook); } .tint-data { --tint: var(--t-data); }
.tint-archive { --tint: var(--t-archive); } .tint-font { --tint: var(--t-font); } .tint-subtitle { --tint: var(--t-subtitle); }
.tint-done { --tint: var(--success); } .tint-error { --tint: var(--danger); }

.meta { flex: 1; min-width: 0; }
.name { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { margin-top: 1px; font-size: 13px; color: var(--text-2); letter-spacing: -0.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub.is-error { color: var(--danger); white-space: normal; }
.sub .ok { color: var(--success); }

.controls { display: flex; align-items: center; gap: 6px; flex: none; }
.to { font-size: 13px; color: var(--text-3); margin-right: 2px; }

.pick {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 92px; height: 34px;
  padding: 0 10px 0 14px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--surface);
  font-size: 14px; font-weight: 600; letter-spacing: 0; cursor: pointer; transition: border-color 0.15s var(--ease);
}
.pick:hover:not(:disabled) { border-color: var(--text-3); }
.pick[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.pick:disabled { opacity: 0.4; cursor: default; }
.pick .i { width: 14px; height: 14px; color: var(--text-3); }
.pick.is-empty { color: var(--text-3); font-weight: 400; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: none; color: var(--text-3); cursor: pointer; transition: background-color 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--fill); color: var(--text); }
.icon-btn[aria-expanded="true"] { background: var(--fill); color: var(--accent-text); }
.icon-btn.is-void { visibility: hidden; }

.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.35s var(--ease); }
.progress.indeterminate > span { width: 30% !important; animation: indet 1.15s var(--ease) infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

.options {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px;
  margin: -4px 16px 16px 78px; padding: 16px; border-radius: 14px; background: var(--fill);
}
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; color: var(--text-2); letter-spacing: -0.005em; }
.field select, .field input {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--hairline); border-radius: 9px; background: var(--surface);
  font-size: 14px; outline: none;
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 28px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
}
.field input::placeholder { color: var(--text-3); }
.field select:focus, .field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

.earlier { list-style: none; margin: -6px 16px 14px 78px; padding: 0; display: grid; gap: 2px; }
.earlier li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); min-width: 0; }
.earlier .i { width: 14px; height: 14px; color: var(--success); }
.earlier .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.earlier a { flex: none; }

.list-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px 14px 20px; border-top: 1px solid var(--hairline-soft); background: var(--bg-alt);
}
.foot-left, .foot-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.foot-left .btn-plain { padding: 0; }
.convert-all { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }

/* ---------------------------------------------------------------- picker */
.picker {
  position: absolute; z-index: 60; width: 440px; max-width: calc(100vw - 32px);
  border-radius: 16px; background: var(--surface); box-shadow: var(--pop-shadow); overflow: hidden;
  animation: pop 0.18s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.picker-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 46px; border-bottom: 1px solid var(--hairline-soft); color: var(--text-3); }
.picker-search input, .sheet-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font-size: 15px; color: var(--text); }
.picker-search input::placeholder, .sheet-search input::placeholder { color: var(--text-3); }
.picker-body { display: grid; grid-template-columns: 136px 1fr; min-height: 168px; max-height: 300px; }
.picker-cats { display: flex; flex-direction: column; gap: 1px; padding: 8px; border-right: 1px solid var(--hairline-soft); overflow-y: auto; }
.cat {
  display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border: 0; border-radius: 8px;
  background: none; text-align: left; font-size: 14px; color: var(--text); cursor: pointer;
}
.cat:hover { background: var(--fill); }
.cat[aria-selected="true"] { background: var(--fill-2); font-weight: 600; }
.cat small { color: var(--text-3); font-size: 12px; font-weight: 400; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); align-content: start; gap: 6px; padding: 10px; overflow-y: auto; }
.fmt {
  height: 34px; border: 1px solid var(--hairline-soft); border-radius: 9px; background: var(--surface);
  font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: uppercase; cursor: pointer;
  transition: border-color 0.12s, background-color 0.12s;
}
.fmt:hover, .fmt.is-active { border-color: var(--text-3); background: var(--fill); }
.fmt[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent-text); background: var(--surface); }
.picker-empty { grid-column: 1 / -1; color: var(--text-3); font-size: 14px; padding: 8px 4px; }
.picker-scrim { position: fixed; inset: 0; z-index: 55; background: var(--scrim); }

/* ---------------------------------------------------------------- link */
.link-bar {
  display: flex; align-items: center; gap: 4px; height: 60px; padding: 0 8px 0 20px; border-radius: 980px;
  background: var(--bg-alt); border: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.link-bar:focus-within { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.link-bar-icon { color: var(--text-3); }
.link-bar input { flex: 1; min-width: 0; height: 100%; padding: 0 8px; border: 0; background: none; outline: none; font-size: 17px; }
.link-bar input::placeholder { color: var(--text-3); }
.link-bar-paste { border: 0; background: none; padding: 6px 10px; font-size: 14px; color: var(--accent-text); cursor: pointer; border-radius: 980px; }
.link-bar-paste:hover { background: var(--fill-2); }
.link-bar-go {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%;
  background: var(--accent); color: #fff; cursor: pointer; transition: background-color 0.2s;
}
.link-bar-go:hover { background: var(--accent-hover); }
.link-bar-go.loading .go-arrow { display: none; }
.link-bar-go.loading .spinner { display: block; }
.link-hint { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--text-3); }

.media {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px; margin-top: 28px; padding: 28px;
  border-radius: 28px; background: var(--bg-alt); animation: appear 0.35s var(--ease);
}
.media-left { min-width: 0; align-self: start; position: sticky; top: 76px; }
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--fill-2); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb .placeholder { display: grid; place-items: center; height: 100%; color: var(--text-3); }
.duration { position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: 7px; background: rgba(0, 0, 0, 0.66); color: #fff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0; backdrop-filter: blur(8px); }
.eyebrow { margin: 18px 0 0; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text-3); }
.media-title { margin: 4px 0 0; font: 600 21px/1.24 var(--font-display); letter-spacing: -0.02em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.media-sub { margin: 4px 0 0; font-size: 14px; color: var(--text-2); }

.media-right { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.group-label { margin: 0 0 10px; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.group-label span { font-weight: 400; color: var(--text-2); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  display: grid; justify-items: start; gap: 2px; padding: 14px 16px; border: 1px solid var(--hairline); border-radius: 14px;
  background: var(--surface); text-align: left; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
}
.tile:hover:not(:disabled) { border-color: var(--text-3); }
.tile[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tile:disabled { opacity: 0.4; cursor: default; }
.tile .i { width: 22px; height: 22px; margin-bottom: 8px; color: var(--text); }
.tile-title { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.tile-sub { font-size: 12px; color: var(--text-2); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  min-width: 64px; height: 38px; padding: 0 14px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface);
  font-size: 14px; font-weight: 500; letter-spacing: -0.01em; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
}
.pill:hover { border-color: var(--text-3); }
.pill[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.trim-toggle { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 0; background: none; font-size: 14px; color: var(--accent-text); cursor: pointer; }
.trim-toggle .i { width: 16px; height: 16px; }
.trim-fields { display: flex; gap: 12px; }
.trim-fields .field { width: 130px; }
.media-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.fineprint { margin: 0; font-size: 12px; line-height: 1.4; color: var(--text-3); }

.error-card { display: flex; align-items: flex-start; gap: 14px; margin-top: 28px; padding: 20px 22px; border-radius: 20px; background: var(--bg-alt); animation: appear 0.3s var(--ease); }
.error-card .badge { width: 36px; height: 36px; border-radius: 50%; }
.error-card h3 { margin: 2px 0 2px; font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.error-card p { margin: 0; font-size: 14px; color: var(--text-2); }

.section-label { margin: 34px 0 10px 4px; font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: -0.01em; }

/* ---------------------------------------------------------------- features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 1000px; margin: 110px auto 0; padding: 0 22px; }
.feature { padding: 30px 28px 32px; border-radius: 24px; background: var(--bg-alt); }
.feature-icon { width: 28px; height: 28px; color: var(--accent-text); stroke-width: 1.5; }
.feature h2 { margin: 18px 0 8px; font: 600 19px/1.25 var(--font-display); letter-spacing: -0.022em; }
.feature p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text-2); letter-spacing: -0.012em; }

/* ---------------------------------------------------------------- formats sheet */
.sheet {
  width: min(720px, calc(100vw - 32px)); max-height: min(82vh, 780px); padding: 0; border: 0; border-radius: 22px;
  background: var(--surface); color: var(--text); box-shadow: var(--pop-shadow);
}
.sheet[open] { display: flex; flex-direction: column; animation: pop 0.22s var(--ease); }
.sheet::backdrop { background: var(--scrim); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 18px 4px 28px; }
.sheet-head h2 { margin: 0; font: 600 28px/1.1 var(--font-display); letter-spacing: -0.03em; }
.sheet-search { display: flex; align-items: center; gap: 8px; height: 40px; margin: 14px 28px 6px; padding: 0 14px; border-radius: 10px; background: var(--fill); color: var(--text-3); }
.sheet-body { overflow-y: auto; padding: 0 28px 20px; }
.sheet-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 14px 28px 18px; border-top: 1px solid var(--hairline-soft); font-size: 12px; color: var(--text-3); }
.engine { display: inline-flex; align-items: center; gap: 6px; }
.engine::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.engine.off::before { background: var(--danger); }
.fgroup h3 { margin: 26px 0 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); }
.frow { display: grid; grid-template-columns: 170px 1fr; gap: 14px; padding: 11px 0; border-top: 1px solid var(--hairline-soft); }
.fgroup h3 + .frow { border-top: 0; }
.fsrc { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.fsrc small { display: block; font-size: 12px; font-weight: 400; color: var(--text-2); letter-spacing: -0.005em; }
.ftargets { font-size: 13px; line-height: 1.7; color: var(--text-2); word-spacing: 2px; text-transform: uppercase; letter-spacing: 0.01em; }

/* ---------------------------------------------------------------- footer & toasts */
.footer { margin-top: 64px; border-top: 1px solid var(--hairline-soft); background: var(--bg-alt); }
.footer-inner { max-width: 1000px; margin: 0 auto; padding: 18px 22px calc(26px + env(safe-area-inset-bottom)); font-size: 12px; color: var(--text-3); letter-spacing: -0.005em; }
.footer p { margin: 4px 0; }
.footer a { color: var(--text-2); }
.dot-sep { margin: 0 8px; }

.toasts { position: fixed; z-index: 80; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 16px;
  background: color-mix(in srgb, var(--text) 92%, transparent); color: var(--bg); font-size: 14px;
  backdrop-filter: blur(16px); box-shadow: var(--pop-shadow); animation: appear 0.25s var(--ease);
}

/* ---------------------------------------------------------------- small screens */
@media (max-width: 760px) {
  .features { grid-template-columns: 1fr; margin-top: 72px; }
  .media { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
  .media-left { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-inner, .stage, .hero { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 48px; padding-bottom: 28px; }
  .segmented { margin-top: 30px; }
  .dropzone { padding: 44px 20px 40px; border-radius: 22px; }
  .row-main { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  .meta { flex-basis: calc(100% - 104px); }
  .row-main > .icon-btn:last-child { order: 2; margin: -6px -6px 0 0; align-self: flex-start; }
  .controls { order: 3; width: 100%; padding-left: 58px; }
  .controls:empty, .controls:not(:has(> :not([hidden]))) { display: none; }
  .controls .pick { flex: 1; }
  .options, .earlier { margin-left: 16px; }
  .list-foot { flex-direction: column; align-items: stretch; }
  .foot-right { justify-content: flex-end; }
  .foot-right .btn-primary { flex: 1; }
  .link-bar { height: 56px; padding-left: 16px; }
  .frow { grid-template-columns: 1fr; gap: 2px; }
  .sheet-head, .sheet-body, .sheet-foot { padding-left: 20px; padding-right: 20px; }
  .sheet-search { margin-left: 20px; margin-right: 20px; }
  .picker.as-sheet {
    position: fixed; left: 0 !important; right: 0; top: auto !important; bottom: 0; width: 100%; max-width: none;
    border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: rise 0.25s var(--ease);
  }
  .picker.as-sheet .picker-body { max-height: 52vh; grid-template-columns: 120px 1fr; }
  .picker.as-sheet .picker-grid { padding-bottom: 18px; }
}
@keyframes rise { from { transform: translateY(100%); } }

/* Touch screens: iPhones zoom into any text field smaller than 16px, and hover
   effects "stick" after a tap. */
@media (pointer: coarse) {
  .field select, .field input, .picker-search input, .sheet-search input, .link-bar input { font-size: 16px; }
  .pick, .pill, .tile, .fmt, .btn { -webkit-tap-highlight-color: transparent; }
}
@media (hover: none) {
  .pick:hover:not(:disabled), .pill:hover, .tile:hover:not(:disabled) { border-color: var(--hairline); }
  .pick[aria-expanded="true"] { border-color: var(--accent); }
  .pill[aria-checked="true"], .tile[aria-checked="true"] { border-color: var(--accent); }
}
/* Running full-screen from the Home Screen: keep content clear of the screen edges. */
@media (display-mode: standalone) {
  .nav-inner, .stage, .hero { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}

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