@font-face { font-family: "Plus Jakarta Sans"; src: url("/assets/PlusJakartaSans.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
:root {
  --bg: #F7F2EE; --surface: #FFFFFF; --ink: #1C1C1C; --muted: #5F5A55; --line: #E4DDD6; --soft: #FCFAF8;
  --coral: #E8725A; --coral-ink: #A8432E; --coral-soft: #FBE9E4;
  --ok: #1F6B45; --ok-soft: #E3F1E8; --info: #1D4E89; --info-soft: #E3ECF7; --bad: #9B2C1F; --bad-soft: #FBE7E3;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
h1 { font-size: clamp(26px, 4vw, 32px); line-height: 1.2; margin: 0 0 6px; font-weight: 700; text-wrap: balance; }
h2 { font-size: 19px; margin: 0; font-weight: 700; }
p { margin: 0 0 10px; }
a { color: var(--coral-ink); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px max(16px, 3vw); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; }
.logo { width: 36px; height: 36px; border-radius: 9px; display: block; }
.crumb { font-weight: 600; font-size: 18px; color: var(--ink); }
.crumb span[aria-hidden] { color: #A39B93; margin-right: 6px; }
.who { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.link { background: none; border: 0; color: var(--coral-ink); font: inherit; font-weight: 600; cursor: pointer; padding: 6px 2px; }

main { flex: 1 0 auto; width: 100%; }
.page { max-width: 1120px; margin: 0 auto; padding: 36px max(16px, 3vw) 56px; display: flex; flex-direction: column; gap: 22px; }
.center { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.narrow { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 14px; }
.badge-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; }
.badge-icon.coral { background: var(--coral-soft); color: var(--coral-ink); }
.badge-icon.red { background: var(--bad-soft); color: var(--bad); }
.rule { border-top: 1px solid #EFE9E3; padding-top: 14px; margin: 4px 0 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: var(--surface); border-color: #D9D0C7; color: var(--ink); min-height: 38px; padding: 0 14px; }
.btn.mini { min-height: 34px; padding: 0 12px; font-size: 14px; background: var(--surface); border-color: #D9D0C7; color: var(--ink); }
.btn.mini.danger { color: var(--bad); }
.btn.wide { width: 100%; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.tile { display: flex; flex-direction: column; gap: 14px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); min-height: 210px; }
.tile:hover { border-color: #CFC5BB; }
.tile .t { font-size: 20px; font-weight: 700; }
.tile .d { color: var(--muted); font-size: 15px; flex: 1 1 auto; }
.tile .go { color: var(--coral-ink); font-weight: 600; }
.tile.locked { background: var(--soft); }
.tile.locked .go { color: var(--muted); }
.tile.more { border-style: dashed; border-width: 2px; background: transparent; justify-content: center; }
.tile .ic { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--coral-soft); color: var(--coral-ink); }
.tile.locked .ic { background: #EFE9E3; color: var(--muted); }

.cols { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.grow { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.with-icon { display: flex; align-items: center; gap: 10px; }
.with-icon svg { color: var(--ok); flex: none; }
.bullets { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: #3F3B37; }

.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px 16px; border: 2px dashed #D9D0C7; border-radius: 12px; background: var(--soft); text-align: center; cursor: pointer; color: var(--coral-ink); position: relative; }
.drop.over { border-color: var(--coral); background: var(--coral-soft); }
.drop-title { color: var(--ink); font-weight: 600; font-size: 17px; }
.picked { list-style: none; margin: -8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.picked li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.picked .name { overflow-wrap: anywhere; min-width: 0; }
.picked .state { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.picked .state.err { color: var(--bad); white-space: normal; }
.picked .state.done { color: var(--ok); }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .field label { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 10px; display: block; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; border: 1px solid #D9D0C7; border-radius: 10px; background: var(--surface); cursor: pointer; }
.pill input { accent-color: var(--ink); margin: 0; }
.pill span { display: flex; flex-direction: column; }
.pill small { color: var(--muted); font-size: 13px; }
.pill:has(input:checked) { border: 2px solid var(--ink); padding: 7px 13px; background: var(--bg); }
.pill:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 24px; }
.field { display: flex; flex-direction: column; }
select { min-height: 46px; padding: 0 12px; border: 1px solid #D9D0C7; border-radius: 10px; font: inherit; font-size: 15px; background: var(--surface); color: var(--ink); max-width: 100%; }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #EFE9E3; padding-top: 18px; }
.actions.left { justify-content: flex-start; border: 0; padding: 0; }
.error { color: var(--bad); background: var(--bad-soft); border-radius: 10px; padding: 10px 14px; margin: 0; font-size: 15px; }

.table-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.scroll { overflow-x: auto; }
.jobs { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.jobs th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.jobs td { padding: 13px 12px; border-bottom: 1px solid #EFE9E3; vertical-align: top; }
.jobs .fname { font-weight: 600; overflow-wrap: anywhere; }
.jobs .sub { font-size: 13px; color: var(--muted); }
.jobs .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.ready { background: var(--ok-soft); color: var(--ok); }
.status.transcribing, .status.uploading { background: var(--info-soft); color: var(--info); }
.status.failed { background: var(--bad-soft); color: var(--bad); }
.jobs .err { color: var(--bad); font-size: 13px; margin-top: 6px; }

.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--coral); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.foot { text-align: center; font-size: 13px; color: var(--muted); padding: 18px 16px 24px; }
