/* KkAsr tasarım sistemi (docs/v1-arayuz.md).
   Yerel, harici kaynak yok; CSP: satır içi stil yok — dinamik konumlar JS'te CSSOM ile.
   Katmanlar: belirteçler → taban → düzen → bileşenler → sayfalar → stüdyo. */

/* ---------- belirteçler ---------- */
:root {
  color-scheme: dark;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Noto Sans", Roboto, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, "SFMono-Regular", "Liberation Mono", monospace;

  --bg: #090c13;
  --bg-2: #0d1220;
  --surface: #111827;
  --surface-2: #161f33;
  --surface-3: #1d2840;
  --line: #233150;
  --line-soft: #1a2540;
  --fg: #e7ecf6;
  --fg-2: #b9c3d8;
  --muted: #8592ab;
  --accent: #6c8cff;
  --accent-strong: #8ea6ff;
  --accent-soft: rgb(108 140 255 / 0.14);
  --accent-2: #2fd4c8;
  --accent-2-soft: rgb(47 212 200 / 0.14);
  --ok: #3ccf91;
  --ok-soft: rgb(60 207 145 / 0.14);
  --warn: #f5b84b;
  --warn-soft: rgb(245 184 75 / 0.14);
  --danger: #ff6b7a;
  --danger-soft: rgb(255 107 122 / 0.14);
  --mark: rgb(255 196 61 / 0.32);
  --mark-fg: #ffe6a6;
  --focus: #9fb4ff;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.03) inset, 0 10px 30px -12px rgb(0 0 0 / 0.6);
  --glass: rgb(17 24 39 / 0.72);

  /* konuşmacı paleti: koyu/açık ikisinde de 4.5:1 üstü metin kontrastı için ayrı ton */
  --spk-0: #6c8cff;
  --spk-1: #2fd4c8;
  --spk-2: #b18cff;
  --spk-3: #ff7eb6;
  --spk-4: #9be15d;
  --spk-5: #ff9d5c;
  --spk-6: #5cc8ff;
  --spk-7: #e6e98a;

  /* duygu (tahmin) renkleri: ws-shadow.css şeritleri ve gösterge */
  --emo-neutral: #8592ab;
  --emo-happy: #3ccf91;
  --emo-excited: #f5a54b;
  --emo-angry: #ff6b7a;
  --emo-sad: #5b8cff;
  --emo-fear: #b18cff;
  --emo-uncertain: #4a5670;

  /* sahne (three.js) renkleri; JS buradan okur */
  --scene-a: #6c8cff;
  --scene-b: #2fd4c8;
  --scene-bg: #090c13;

  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 16px;
  --gap: 24px;
  --header-h: 60px;
  --wave-h: 112px;
  --lane-h: 14px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb;
  --bg-2: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --surface-3: #eceff7;
  --line: #d9dfeb;
  --line-soft: #e7ebf3;
  --fg: #101828;
  --fg-2: #344054;
  --muted: #5d6b82;
  --accent: #3858e9;
  --accent-strong: #2440c4;
  --accent-soft: rgb(56 88 233 / 0.1);
  --accent-2: #0b9488;
  --accent-2-soft: rgb(11 148 136 / 0.1);
  --ok: #138a55;
  --ok-soft: rgb(19 138 85 / 0.1);
  --warn: #9a6200;
  --warn-soft: rgb(245 158 11 / 0.14);
  --danger: #c4243a;
  --danger-soft: rgb(196 36 58 / 0.08);
  --mark: rgb(255 196 61 / 0.55);
  --mark-fg: #3d2a00;
  --focus: #3858e9;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.06), 0 8px 24px -12px rgb(16 24 40 / 0.18);
  --glass: rgb(255 255 255 / 0.78);
  --spk-0: #3858e9;
  --spk-1: #0b8a80;
  --spk-2: #6d4ee0;
  --spk-3: #c2266f;
  --spk-4: #2f7d1f;
  --spk-5: #c2410c;
  --spk-6: #0369a1;
  --spk-7: #6b6b00;
  --scene-a: #3858e9;
  --scene-b: #0b9488;
  --scene-bg: #f4f6fb;
}

/* ---------- taban ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font: 400 15px/1.55 var(--font);
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: "tnum" 0;
}
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: 1.75rem; font-weight: 650; margin: 0; }
h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 0.9rem; }
h3 { font-size: 0.95rem; font-weight: 600; margin: 0 0 0.5rem; }
p { margin: 0 0 0.75rem; }
code, .mono, .time { font-family: var(--mono); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 14px; background: var(--accent); color: #fff; border-radius: var(--radius-s); }
.skip-link:focus { top: 10px; }
.muted, .hint { color: var(--muted); font-weight: 400; }
.hint { font-size: 0.85rem; margin: 0; }
mark { background: var(--mark); color: inherit; padding: 0 0.12em; border-radius: 3px; }
::selection { background: var(--accent-soft); }

/* ---------- düzen ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 22px;
  height: var(--header-h); padding: 0 28px;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 650; letter-spacing: 0.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.brand small { font-weight: 500; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  padding: 7px 12px; border-radius: var(--radius-s);
  color: var(--fg-2); font-weight: 500; font-size: 0.93rem;
}
.nav a:hover { background: var(--surface-2); color: var(--fg); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--fg); background: var(--accent-soft); }
.top-tools { display: flex; align-items: center; gap: 10px; }
.top-search { position: relative; }
.top-search input[type="search"] { width: 240px; padding-left: 32px; }
.top-search svg { position: absolute; left: 10px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.who { display: flex; flex-direction: column; line-height: 1.15; font-size: 0.82rem; text-align: right; }
.who strong { font-weight: 600; color: var(--fg); }
.who span { color: var(--muted); }

main.page { max-width: 1680px; margin: 0 auto; padding: 28px 32px 64px; }
main.page.wide { max-width: none; padding: 18px 24px 24px; }
/* İletişim satırı: ayar boşsa şablon basmaz (collect contact_email, server KKASR_CONTACT_EMAIL). */
.site-foot { padding: 14px 16px 24px; text-align: center; font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--line-soft); }
.site-foot a { color: var(--accent); overflow-wrap: anywhere; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .lead { margin: 6px 0 0; color: var(--muted); }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 0.86rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--fg); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: var(--gap); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
form[data-upload] .row { align-items: center; justify-content: space-between; }
form[data-upload] .row label:not(.check) { flex-direction: row; align-items: center; gap: 10px; }
form[data-upload] input[type="number"] { width: 110px; }
.spacer { flex: 1; }

/* ---------- bileşenler ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-l);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  margin-bottom: var(--gap);
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.card-head h2 { margin: 0; }
.card.narrow { max-width: 440px; }

label { display: flex; flex-direction: column; gap: 6px; font-weight: 550; font-size: 0.88rem; color: var(--fg-2); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 450; color: var(--fg); }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="search"], select, textarea {
  font: inherit; font-size: 0.93rem; color: var(--fg);
  height: 38px; padding: 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:hover, select:hover { border-color: color-mix(in srgb, var(--line) 50%, var(--accent)); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
input[type="file"] { font: inherit; color: var(--fg-2); }
select { padding-right: 28px; }

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  font: inherit; font-weight: 600; font-size: 0.9rem;
  color: #fff; background: var(--accent);
  border: 1px solid transparent; border-radius: var(--radius-s);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
button:hover, .button:hover { background: var(--accent-strong); text-decoration: none; }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary, .button.secondary { color: var(--fg); background: var(--surface-2); border-color: var(--line); }
button.secondary:hover, .button.secondary:hover { background: var(--surface-3); }
button.ghost, .button.ghost { color: var(--fg-2); background: transparent; border-color: transparent; }
button.ghost:hover, .button.ghost:hover { background: var(--surface-2); color: var(--fg); }
button.danger, .button.danger { background: var(--danger); color: #fff; }
button.small, .button.small { height: 30px; padding: 0 10px; font-size: 0.82rem; }
button.icon { width: 38px; padding: 0; }
button.icon.small { width: 30px; }
button svg, .button svg { width: 16px; height: 16px; flex: none; }
button.link { height: auto; padding: 0; background: none; color: var(--accent-strong); font-weight: 500; }
a.danger-link { color: var(--danger); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em;
  border-radius: 999px;
  color: var(--fg-2); background: var(--surface-3);
  white-space: nowrap;
}
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.warn { color: var(--warn); background: var(--warn-soft); }
.badge.info { color: var(--accent-strong); background: var(--accent-soft); }
.badge.est { color: var(--accent-2); background: var(--accent-2-soft); }
.status { font-weight: 600; }
.status.badge { font-weight: 600; }
.status-done { color: var(--ok); background: var(--ok-soft); }
.status-failed { color: var(--danger); background: var(--danger-soft); }
.status-cancelled { color: var(--muted); background: var(--surface-3); }
.status-running { color: var(--accent-strong); background: var(--accent-soft); }
.status-queued { color: var(--warn); background: var(--warn-soft); }
.status-running.dot::before { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }

progress {
  appearance: none; width: 100%; height: 6px; border: 0; border-radius: 999px;
  background: var(--surface-3); overflow: hidden;
}
progress::-webkit-progress-bar { background: var(--surface-3); border-radius: 999px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }
.stage { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 0.9rem; color: var(--fg-2); }

table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table th { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.table td.status-cell { width: 220px; }
.table td.status-cell .stage { margin: 0 0 6px; }
.table .file { display: flex; align-items: center; gap: 12px; font-weight: 550; color: var(--fg); overflow-wrap: anywhere; }
.table .file svg { width: 30px; height: 30px; flex: none; padding: 6px; border-radius: 8px; color: var(--accent-strong); background: var(--accent-soft); }

.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 48px 24px; color: var(--muted);
}
.empty svg { width: 44px; height: 44px; color: var(--accent); opacity: 0.8; margin-bottom: 6px; }
.empty strong { color: var(--fg); font-size: 1rem; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); margin: 0 0 16px; font-size: 0.92rem; border: 1px solid transparent; }
.alert.error, p.error { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.alert.warn, p.warn { color: var(--warn); background: var(--warn-soft); }
.alert.notice, p.notice { color: var(--ok); background: var(--ok-soft); }
p.error, p.warn, p.notice { padding: 10px 14px; border-radius: var(--radius); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: var(--gap); }
.stat { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.stat dt { font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.stat dd { margin: 0; font: 600 1.45rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }

.searchbar { display: flex; gap: 10px; margin-bottom: var(--gap); }
.searchbar input { flex: 1; height: 44px; font-size: 1rem; padding-left: 40px; }
.searchbar .field { position: relative; flex: 1; display: flex; }
.searchbar .field svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.searchbar button { height: 44px; }

/* yükleme */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 28px 18px; text-align: center;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  background: var(--bg-2);
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone svg { width: 34px; height: 34px; color: var(--accent); }
.dropzone strong { font-size: 0.95rem; color: var(--fg); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .picked { font-family: var(--mono); font-size: 0.85rem; color: var(--accent-strong); overflow-wrap: anywhere; }
fieldset.langs { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px 14px 12px; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
fieldset.langs legend { font-weight: 600; font-size: 0.88rem; color: var(--fg-2); padding: 0 4px; }
fieldset.langs .hint { flex-basis: 100%; }
fieldset.langs label:not(.check) { flex-basis: 100%; }
.upload-progress { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--fg-2); }

/* proje kartları */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.project-card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 20px; min-height: 150px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-l);
  color: var(--fg); box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.project-card h3 { font-size: 1.05rem; margin: 0; overflow-wrap: anywhere; }
.project-card .meta { display: flex; gap: 16px; color: var(--muted); font-size: 0.85rem; margin-top: auto; }
.project-card .meta b { color: var(--fg); font-weight: 600; font-family: var(--mono); }
.project-card .bars { display: flex; align-items: flex-end; gap: 3px; height: 28px; }
.project-card .bars i { flex: 1; border-radius: 2px; background: linear-gradient(var(--accent), var(--accent-2)); opacity: 0.55; }
.project-card .bars i:nth-child(3n) { height: 70%; } .project-card .bars i:nth-child(3n+1) { height: 35%; } .project-card .bars i:nth-child(3n+2) { height: 100%; }
.project-card .bars i:nth-child(4n) { height: 50%; } .project-card .bars i:nth-child(5n) { height: 85%; }

/* kahraman (three.js arka plan) */
.hero { position: relative; overflow: hidden; border-radius: var(--radius-l); border: 1px solid var(--line-soft); background: var(--bg-2); margin-bottom: var(--gap); }
.hero canvas.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg-2) 18%, color-mix(in srgb, var(--bg-2) 40%, transparent) 60%, transparent); pointer-events: none; }
.hero-body { position: relative; z-index: 1; padding: 44px 40px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.hero-body h1 { font-size: 2rem; }
.hero-body .lead { margin: 8px 0 0; color: var(--fg-2); max-width: 54ch; }
.eyebrow { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 10px; }

/* giriş ekranı */
.auth { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(400px, 0.75fr); }
.auth-visual { position: relative; overflow: hidden; background: var(--bg-2); border-right: 1px solid var(--line-soft); }
.auth-visual canvas.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.auth-visual .copy { position: absolute; left: 56px; bottom: 56px; right: 56px; z-index: 1; }
.auth-visual h1 { font-size: 2.6rem; max-width: 16ch; }
.auth-visual p { color: var(--fg-2); max-width: 46ch; margin-top: 14px; }
.features { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-form .card { width: 100%; max-width: 400px; margin: 0; padding: 30px; }
.auth-form h2 { font-size: 1.35rem; margin-bottom: 4px; }
.auth-form button[type="submit"] { width: 100%; margin-top: 6px; height: 42px; }

/* arama sonuçları */
ol.hits { list-style: none; padding: 0; margin: 0; }
ol.hits li { padding: 12px 20px; border-bottom: 1px solid var(--line-soft); display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 14px; }
ol.hits li:last-child { border-bottom: 0; }
ol.hits .time { grid-row: span 2; align-self: start; font-size: 0.85rem; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-strong); text-align: center; }
ol.hits .src { font-size: 0.8rem; color: var(--muted); }

/* meta listesi */
dl.meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 0.9rem; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; }

/* ---------- kayıt stüdyosu ---------- */
.rec-head { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; flex-wrap: wrap; }
.rec-head .title { min-width: 0; flex: 1; }
.rec-head h1 { font-size: 1.35rem; overflow-wrap: anywhere; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg-switch { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-soft); }
.seg-switch a { padding: 4px 12px; border-radius: 6px; font-size: 0.85rem; font-weight: 600; color: var(--fg-2); }
.seg-switch a:hover { text-decoration: none; color: var(--fg); }
.seg-switch a.active, .seg-switch a[aria-current="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); }
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu .menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 180px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; }
details.menu .menu-list a { padding: 8px 10px; border-radius: 6px; color: var(--fg); font-size: 0.9rem; }
details.menu .menu-list a:hover { background: var(--surface-2); text-decoration: none; }

.studio {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(420px, 1fr);
  gap: 18px;
  height: calc(100vh - var(--header-h) - 120px);
  min-height: 620px;
}
.stage-col { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.player {
  position: relative; flex: 1; min-height: 240px;
  display: flex; align-items: center; justify-content: center;
  background: #05070c; border-radius: var(--radius-l); overflow: hidden;
  border: 1px solid var(--line-soft);
}
.player video { position: relative; z-index: 1; max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.player.audio-only video { opacity: 0; position: absolute; width: 1px; height: 1px; }
.player canvas.viz { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.player:not(.audio-only) canvas.viz { display: none; }
.player .viz-label { position: absolute; left: 20px; bottom: 16px; z-index: 2; color: #c9d3ea; font-size: 0.82rem; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.player .viz-label svg { width: 18px; height: 18px; }
.player:not(.audio-only) .viz-label { display: none; }
.player .media-warning { position: absolute; left: 16px; right: 16px; top: 16px; z-index: 3; margin: 0; }
.player .big-play {
  position: absolute; z-index: 2; width: 72px; height: 72px; border-radius: 50%;
  background: rgb(10 14 24 / 0.55); border: 1px solid rgb(255 255 255 / 0.18);
  backdrop-filter: blur(6px); color: #fff;
}
.player .big-play svg { width: 28px; height: 28px; }
.player.playing .big-play { opacity: 0; pointer-events: none; transition: opacity 0.2s; }

.deck { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.transport { display: flex; align-items: center; gap: 6px; }
.transport .clock { font-family: var(--mono); font-size: 0.95rem; font-variant-numeric: tabular-nums; padding: 0 10px; color: var(--fg); }
.transport .clock span { color: var(--muted); }
.transport select { height: 30px; font-size: 0.82rem; padding: 0 22px 0 8px; }
.transport .zoom { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted); }
.transport input[type="range"] { width: 110px; accent-color: var(--accent); }
.transport .play { width: 42px; height: 42px; border-radius: 50%; padding: 0; }
.transport .play svg { width: 18px; height: 18px; }
.transport .toggle[aria-pressed="true"] { color: var(--accent-strong); background: var(--accent-soft); }

.timeline { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 10px; }
.timeline .labels { display: flex; flex-direction: column; font-size: 0.74rem; color: var(--muted); }
.timeline .labels .wave-label { height: var(--wave-h); display: flex; align-items: center; }
.timeline .labels .tl-label { height: 20px; }
.timeline .labels .lane-label { height: var(--lane-h); margin-top: 4px; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline .labels .lane-label i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
#waveform { min-width: 0; border-radius: 8px; background: var(--bg-2); }
.wave-loading { height: var(--wave-h); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.85rem; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.78rem; color: var(--muted); padding-left: 122px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }

.spk-0 { --spk: var(--spk-0); } .spk-1 { --spk: var(--spk-1); } .spk-2 { --spk: var(--spk-2); } .spk-3 { --spk: var(--spk-3); }
.spk-4 { --spk: var(--spk-4); } .spk-5 { --spk: var(--spk-5); } .spk-6 { --spk: var(--spk-6); } .spk-7 { --spk: var(--spk-7); }
.swatch { background: var(--spk, var(--accent)); }
.swatch.hit { background: var(--warn); }

.side-col { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-l); box-shadow: var(--shadow); overflow: hidden; }
.tabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--line-soft); }
.tabs button { height: 38px; background: none; color: var(--muted); border-radius: 0; border-bottom: 2px solid transparent; padding: 0 14px; }
.tabs button:hover { background: none; color: var(--fg); }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.tsearch { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.tsearch .field { position: relative; display: flex; gap: 6px; }
.tsearch input { flex: 1; padding-left: 34px; }
.tsearch .field > svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.tsearch .nav-hits { display: flex; align-items: center; gap: 4px; font-size: 0.82rem; color: var(--muted); }
.tsearch .nav-hits .count { font-family: var(--mono); min-width: 64px; text-align: center; }
.tpanel { flex: 1; min-height: 0; overflow-y: auto; scroll-behavior: smooth; overscroll-behavior: contain; }
.tpanel.reduce, .reduce-motion .tpanel { scroll-behavior: auto; }

.transcript { list-style: none; margin: 0; padding: 6px 0 40px; }
.seg {
  position: relative;
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 2px 12px;
  padding: 10px 16px 10px 18px; cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s;
}
.seg:hover { background: var(--surface-2); }
.seg:focus-visible { outline-offset: -2px; }
.seg .time { grid-row: span 2; font-size: 0.8rem; color: var(--muted); padding-top: 2px; }
.seg .who-line { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 600; color: var(--spk, var(--fg-2)); }
.seg .who-line .lang { font-family: var(--mono); font-weight: 500; color: var(--muted); text-transform: uppercase; font-size: 0.72rem; }
.seg .text { color: var(--fg); overflow-wrap: anywhere; }
.seg.active { background: var(--accent-soft); border-left-color: var(--spk, var(--accent)); }
.seg.active .time { color: var(--accent-strong); }
.seg.is-hit .time::after { content: ""; display: block; width: 6px; height: 6px; margin-top: 6px; border-radius: 50%; background: var(--warn); }
.seg.target { background: var(--warn-soft); }
.seg.overlap .text { text-decoration: underline dotted color-mix(in srgb, var(--warn) 70%, transparent); text-underline-offset: 4px; }

.hitlist { list-style: none; margin: 0; padding: 0; max-height: 26%; overflow-y: auto; border-bottom: 1px solid var(--line-soft); }
.hitlist li button { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; padding: 8px 16px; cursor: pointer; font-size: 0.86rem; color: var(--fg-2); }
.hitlist li button:hover, .hitlist li button:focus-visible { background: var(--surface-2); }
.hitlist .time { color: var(--warn); font-size: 0.8rem; }
.hitlist .ctx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.analysis { padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.analysis section h3 { display: flex; align-items: center; gap: 8px; }
.analysis .topics { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.analysis .topics button { all: unset; cursor: pointer; display: flex; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); width: 100%; box-sizing: border-box; }
.analysis .topics button:hover { background: var(--surface-3); }
.analysis .summary { white-space: pre-wrap; color: var(--fg-2); }

.queue-card { max-width: 760px; }

/* wavesurfer gölge DOM'u için ayrı dosya: /static/ws-shadow.css */

/* ---------- erişilebilirlik ve hareket ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 1279px) {
  .studio { grid-template-columns: minmax(0, 1fr); height: auto; }
  .side-col { height: 70vh; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-visual { min-height: 320px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-search input[type="search"] { width: 160px; }
}
.tab-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }
main.page.bare { max-width: none; padding: 0; }
.lang-form select { height: 32px; font-size: 0.82rem; background: transparent; }
.menu-list form { padding: 6px; }

/* ---------- modüller: analiz (LLM/RAG), duygu, lisans ---------- */
form.inline { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.pad { padding: 12px 20px; margin: 0; }
dl.meta.pad { padding: 16px 20px; }
.chips.badge-row, dd.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.card table:not(.table) { width: 100%; border-collapse: collapse; }
.card table:not(.table) th, .card table:not(.table) td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.card table:not(.table) th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
textarea { font: inherit; font-size: 0.93rem; color: var(--fg); width: 100%; height: auto; padding: 8px 12px; resize: vertical; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-s); }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.steps { display: flex; flex-direction: column; gap: 12px; padding-left: 20px; }
.steps li { line-height: 2; }

.spinner { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-block; }

.an { display: flex; flex-direction: column; gap: 18px; }
.an-block { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.an-block:last-child { border-bottom: 0; padding-bottom: 0; }
.an-block h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.92rem; }
.an-block h3 svg { width: 16px; height: 16px; color: var(--accent-2); }
.an-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.an-row form { display: flex; gap: 6px; align-items: center; }
.an-row select { height: 30px; font-size: 0.82rem; }
.an-ask { display: flex; flex-direction: column; gap: 8px; }
.an-ask button { align-self: flex-end; }
.an-search { display: flex; gap: 6px; }
.an-search input { flex: 1; height: 32px; }
.an-out:empty { display: none; }
.an-out { font-size: 0.9rem; }
.an-text p, .an-summary p { color: var(--fg); margin: 0 0 8px; }
.an-text ul, .an-summary ul { margin: 0 0 8px; padding-left: 20px; color: var(--fg); }
.an-text li, .an-summary li { margin-bottom: 4px; }
.an-summary h4, .an-text h4 { margin: 10px 0 4px; font-size: 0.86rem; color: var(--fg); }
.an-answer h4 { margin: 10px 0 6px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.an-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.an-list li { padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.an-list li p { margin: 4px 0 0; color: var(--fg-2); font-size: 0.86rem; }
.an-src { display: flex; gap: 8px; align-items: baseline; color: var(--fg); }
.an-src:hover { text-decoration: none; color: var(--accent-strong); }
.an-src .time { color: var(--accent-strong); font-size: 0.82rem; }
.an-wait { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.an-card h2 { display: flex; align-items: center; gap: 8px; }
.an-card h2 svg { width: 18px; height: 18px; color: var(--accent-2); }
.tpanel.analysis { padding: 16px; }
.card.narrow-wide { max-width: 860px; }

.affect-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 12px 20px 0; font-size: 0.82rem; color: var(--fg-2); }
.affect-legend span { display: inline-flex; gap: 6px; align-items: center; }
.affect-chart { display: block; width: 100%; height: auto; padding: 8px 20px; }
.affect-chart .axis { stroke: var(--line); stroke-width: 1; }
.gender { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 4px; font-size: 0.72rem; font-weight: 700; color: var(--accent-2); background: var(--accent-2-soft); cursor: help; }
.legend .est { font-size: 0.7rem; }
.timeline { grid-template-columns: 150px minmax(0, 1fr); }
.legend { padding-left: 160px; }
.legend i.emo-neutral { background: var(--emo-neutral); } .legend i.emo-happy { background: var(--emo-happy); }
.legend i.emo-excited { background: var(--emo-excited); } .legend i.emo-angry { background: var(--emo-angry); }
.legend i.emo-sad { background: var(--emo-sad); } .legend i.emo-fear { background: var(--emo-fear); }
.legend i.emo-uncertain { background: var(--emo-uncertain); }
.timeline .labels .lane-label { overflow: visible; }
.an-list p.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.an-list li:hover p.clamp, .an-list li:focus-within p.clamp { -webkit-line-clamp: unset; line-clamp: unset; }
.page-head h1 svg { width: 26px; height: 26px; vertical-align: -3px; color: var(--accent-2); }
.nowrap { white-space: nowrap; }
.grid-2 > .stack > .card { margin-bottom: 0; }
