:root {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #172335;
  background: #f1f5f9;
  --ink: #172335;
  --muted: #4d5e73;
  --line: #dae3ed;
  --blue: #134bb8;
  --blue-dark: #0a368d;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.5; }
button, input, select { font: inherit; }
a, button, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #3974d0; outline-offset: 3px; }
a { color: var(--blue); }
.wrap { width: min(1136px, calc(100% - 56px)); margin-inline: auto; }
.top { background: #11213b; color: #fbfdff; }
.top-inner, .section-top, .account, .actions { display: flex; align-items: center; gap: 12px; }
.top-inner, .section-top { justify-content: space-between; }
.top-inner { min-height: 69px; }
.brand { font-size: 1.06rem; font-weight: 750; display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; white-space: nowrap; }
.wave { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; gap: 2px; background: #dcecff; border-radius: 10px; }
.wave i { width: 2px; height: 8px; border-radius: 3px; background: #164ba5; }
.wave i:nth-child(2), .wave i:nth-child(4) { height: 14px; }
.wave i:nth-child(3) { height: 20px; }
.account { font-size: .875rem; color: #d6e3f4; }
.account .plain { color: inherit; border-color: #576b87; background: transparent; }
.account .plain:hover { background: #263e61; }
.account span { overflow-wrap: anywhere; }
.dashboard { padding-block: 42px 64px; }
.intro { margin-bottom: 29px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.15rem, 4.8vw, 3.25rem); letter-spacing: -.056em; line-height: 1.1; }
h2 { font-size: 1.23rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
.intro p { margin-top: 10px; color: var(--muted); }
.layout { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.28fr); gap: 20px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 24px; box-shadow: 0 2px 5px #10294b08; min-width: 0; }
.composer h2 { margin-bottom: 17px; }
.drop { background: #f4f8ff; border: 1.5px dashed #9eb7da; border-radius: 12px; display: grid; justify-items: center; text-align: center; padding: 21px 12px; gap: 7px; }
.drop.dragging { border-color: var(--blue); background: #e5f0ff; }
.upload-icon { display: grid; place-items: center; font-size: 1.45rem; width: 35px; height: 35px; color: var(--blue); border: 1px solid #c7daf6; border-radius: 10px; background: #fff; }
.drop .muted { font-size: .84rem; }
.filename, .record strong, #detail-title { overflow-wrap: anywhere; }
.filename { font-size: .875rem; color: var(--blue); }
.muted { color: var(--muted); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }
label { font-weight: 650; font-size: .9rem; }
input:not([type="checkbox"]):not([type="file"]), select { display: block; width: 100%; border: 1px solid #c8d5e3; border-radius: 8px; background: white; color: var(--ink); min-height: 42px; margin-top: 5px; padding: 7px 10px; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--blue); }
select { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, #465970 50%), linear-gradient(135deg, #465970 50%, transparent 50%); background-position: calc(100% - 15px) 54%, calc(100% - 10px) 54%; background-size: 5px 5px; background-repeat: no-repeat; }
.check { display: inline-flex; align-items: center; gap: 7px; }
.composer .check { margin-top: 15px; }
button, .button { cursor: pointer; border: 1px solid #cbd8e8; border-radius: 8px; background: #fff; color: var(--blue); font-weight: 670; font-size: .875rem; text-decoration: none; padding: 8px 12px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; }
button:hover:not(:disabled), .button:hover { background: #edf4ff; }
button:disabled { opacity: .55; cursor: wait; }
.primary { background: var(--blue); color: white; border-color: var(--blue); min-height: 45px; }
.primary:hover:not(:disabled) { background: var(--blue-dark); }
.start { width: 100%; margin-top: 18px; }
.choose { margin-top: 4px; }
#file:focus-visible { outline: none; }
.drop:has(#file:focus-visible) .choose { outline: 3px solid #3974d0; outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.history .section-top { margin-bottom: 14px; }
.history .section-top .muted { font-size: .875rem; }
.record { display: grid; gap: 6px; border-top: 1px solid var(--line); padding: 15px 0; }
.record:last-child { padding-bottom: 0; }
.record-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.record .muted { font-size: .875rem; }
.pill { display: inline-flex; width: fit-content; border-radius: 100px; padding: 3px 9px; white-space: nowrap; font-size: .78rem; font-weight: 700; background: #edf2f9; color: #314b67; }
.pill[data-state=completed] { background: #e1f6ed; color: #146044; }
.pill[data-state=failed] { background: #fff0ee; color: #9d251d; }
.pill[data-state=transcribing], .pill[data-state=aligning], .pill[data-state=diarizing], .pill[data-state=exporting], .pill[data-state=processing] { background: #e3eeff; color: #174a9c; }
.actions { flex-wrap: wrap; gap: 7px; }
.danger { color: #9d251d; }
.empty { padding: 26px 10px; text-align: center; color: var(--muted); background: #f5f8fc; border: 1px solid #e5edf5; border-radius: 9px; }
.details, .diagnostics { margin-top: 20px; }
#detail-meta { margin-top: 5px; }
.stages { display: flex; flex-wrap: wrap; gap: 7px 16px; list-style: none; margin: 13px 0 0; padding: 0; color: var(--muted); font-size: .875rem; }
.stages li[data-stage=current] { color: var(--blue); font-weight: 700; }
.stages li[data-stage=done] { color: #146044; }
#transcript { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
#downloads { margin: 12px 0; }
.segment { padding: 13px 0; border-top: 1px solid #e6edf5; white-space: pre-wrap; overflow-wrap: anywhere; }
.segment small { display: inline-block; font-size: .85rem; font-weight: 700; color: var(--blue); margin-bottom: 4px; }
.notice { padding: 10px 13px; border-radius: 8px; background: #e4efff; color: #123d81; margin-bottom: 14px; }
.notice.error { background: #fff0ee; color: #9d251d; }
#detail-error { margin: 12px 0 0; }
#upload-progress { margin-top: 12px; }
progress { width: 100%; accent-color: var(--blue); display: block; }
.diagnostics summary { font-weight: 700; cursor: pointer; }
#health { margin-top: 8px; }
.login { display: grid; min-height: calc(100vh - 69px); align-items: start; justify-items: center; padding: 10vh 0 32px; }
.auth { width: min(100%, 425px); padding: 32px; }
.auth h1 { font-size: 2.2rem; }
.auth p { margin: 11px 0 20px; }
.auth form { display: grid; gap: 6px; }
.auth form label:not(:first-child) { margin-top: 8px; }
.auth .primary { margin-top: 15px; }
@media (max-width: 779px) {
  .wrap { width: calc(100% - 32px); }
  .layout { grid-template-columns: 1fr; }
  .dashboard { padding-top: 30px; }
  .card { padding: 18px; }
  .record-head, #details > .section-top { flex-wrap: wrap; }
  .account span { display: none; }
}
.timestamp + .speaker::before { content: " · "; }
.hide-timestamps .timestamp { display: none; }
.hide-timestamps .speaker::before { content: none; }
