/* Transkript Atölyesi — yerel yazı tipleri, harici CDN yok. */
@font-face {
    font-family: 'Atolye Sans';
    src: url("fonts/AdwaitaSans-Regular.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Atolye Mono';
    src: url("fonts/AdwaitaMono-Regular.ttf") format("truetype");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

/* --- Renk belirteçleri ---------------------------------------------------
   Varsayılan palet "paper" (Sıcak Kâğıt). Palet ve görünüm html[data-palette]
   + html[data-theme] ile seçilir. Eski belirteç adları (--ink, --recess,
   --selected, --control-line, --error) geriye dönük uyum için korunur. */
:root {
    color-scheme: light;
    --bg: #f8f6f1;
    --surface: #fffdf9;
    --recess: #f2ede4;
    --text: #1f1c18;
    --ink: #1f1c18;
    --muted: #5e5145;
    --accent: #9a3412;
    --accent-hover: #802b10;
    --on: #fffdf9;
    --soft: #f9eadd;
    --selected: #f9eadd;
    --hover-bg: #f7f0e8;
    --line: #e9e0d6;
    --line-strong: #d8cab9;
    --edge: #d8cab9;
    --control-line: #d8cab9;
    --good: #126246;
    --bad: #9a2929;
    --error: #9a2929;
    --ready-bg: #e4f5e9;
    --ready-text: #14532d;
    --queued-bg: #fff2d5;
    --queued-text: #713f12;
    --shadow-sm: 0 1px 2px rgba(31, 28, 24, .04), 0 2px 6px rgba(31, 28, 24, .03);
    --shadow-md: 0 2px 6px rgba(31, 28, 24, .04), 0 12px 30px rgba(31, 28, 24, .06);
    --shadow-lg: 0 12px 32px rgba(31, 28, 24, .14), 0 28px 70px rgba(31, 28, 24, .16);
    --shadow: var(--shadow-md);
    --sans: 'Atolye Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --display: var(--sans);
    --mono: 'Atolye Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
    --radius: 16px;
    --radius-sm: 10px;
    font-family: var(--sans);
    font-synthesis: none;
}

:root[data-palette="paper"] {
    --bg: #f8f6f1;
    --surface: #fffdf9;
    --recess: #f2ede4;
    --text: #1f1c18;
    --ink: #1f1c18;
    --muted: #5e5145;
    --accent: #9a3412;
    --accent-hover: #802b10;
    --on: #fffdf9;
    --soft: #f9eadd;
    --selected: #f9eadd;
    --hover-bg: #f7f0e8;
    --line: #e9e0d6;
    --line-strong: #d8cab9;
    --edge: #d8cab9;
    --control-line: #d8cab9;
}

:root[data-palette="blue"] {
    --bg: #f6f8fc;
    --surface: #ffffff;
    --recess: #eff3f9;
    --text: #182230;
    --ink: #182230;
    --muted: #4e5c70;
    --accent: #2458cf;
    --accent-hover: #1949b8;
    --on: #ffffff;
    --soft: #eaf0ff;
    --selected: #eaf0ff;
    --hover-bg: #f0f4fb;
    --line: #e3e8f0;
    --line-strong: #cdd6e3;
    --edge: #cdd6e3;
    --control-line: #cdd6e3;
}

:root[data-palette="forest"] {
    --bg: #f5f8f5;
    --surface: #ffffff;
    --recess: #eef4ef;
    --text: #18241e;
    --ink: #18241e;
    --muted: #485c51;
    --accent: #1f6e50;
    --accent-hover: #18583f;
    --on: #ffffff;
    --soft: #e6f2eb;
    --selected: #e6f2eb;
    --hover-bg: #edf5ef;
    --line: #dce9df;
    --line-strong: #c5d8cb;
    --edge: #c5d8cb;
    --control-line: #c5d8cb;
}

:root[data-palette="contrast"] {
    --bg: #ffffff;
    --surface: #ffffff;
    --recess: #f4f4f4;
    --text: #000000;
    --ink: #000000;
    --muted: #2b2b2b;
    --accent: #132c86;
    --accent-hover: #0c1e64;
    --on: #ffffff;
    --soft: #eef2ff;
    --selected: #eef2ff;
    --hover-bg: #eef2ff;
    --line: #555555;
    --line-strong: #333333;
    --edge: #333333;
    --control-line: #333333;
    --good: #004327;
    --bad: #770000;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: 0 0 0 2px #333333;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #11151c;
    --surface: #1b222d;
    --recess: #222b38;
    --text: #e9eef7;
    --ink: #e9eef7;
    --muted: #b2bfd3;
    --accent: #a2bfff;
    --accent-hover: #b7cdff;
    --on: #11151c;
    --soft: #263552;
    --selected: #263552;
    --hover-bg: #293341;
    --line: #354050;
    --line-strong: #526074;
    --edge: #526074;
    --control-line: #526074;
    --good: #89dbb8;
    --bad: #ffadad;
    --error: #ffadad;
    --ready-bg: #173a29;
    --ready-text: #b9f3cd;
    --queued-bg: #463310;
    --queued-text: #ffe0a0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .1);
    --shadow-md: 0 3px 8px rgba(0, 0, 0, .16), 0 14px 32px rgba(0, 0, 0, .2);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .35), 0 28px 70px rgba(0, 0, 0, .4);
}

:root[data-palette="paper"][data-theme="dark"] {
    --bg: #171512;
    --surface: #24201b;
    --recess: #2c2721;
    --text: #f7ede0;
    --ink: #f7ede0;
    --muted: #cabbab;
    --accent: #f3b36b;
    --accent-hover: #f8c68c;
    --on: #171512;
    --soft: #382b20;
    --selected: #382b20;
    --hover-bg: #332b24;
    --line: #493e33;
    --line-strong: #6a5949;
    --edge: #6a5949;
    --control-line: #6a5949;
}

:root[data-palette="blue"][data-theme="dark"] {
    --bg: #11151c;
    --surface: #1b222d;
    --recess: #222b38;
    --text: #e9eef7;
    --ink: #e9eef7;
    --muted: #b2bfd3;
    --accent: #a2bfff;
    --accent-hover: #b7cdff;
    --on: #11151c;
    --soft: #263552;
    --selected: #263552;
    --hover-bg: #293341;
    --line: #354050;
    --line-strong: #526074;
    --edge: #526074;
    --control-line: #526074;
}

:root[data-palette="forest"][data-theme="dark"] {
    --bg: #111714;
    --surface: #1b251f;
    --recess: #222f28;
    --text: #e8f3eb;
    --ink: #e8f3eb;
    --muted: #b2c9bc;
    --accent: #7ad6ae;
    --accent-hover: #9ce5c4;
    --on: #111714;
    --soft: #253b30;
    --selected: #253b30;
    --hover-bg: #29392f;
    --line: #364b3e;
    --line-strong: #536e5d;
    --edge: #536e5d;
    --control-line: #536e5d;
}

:root[data-palette="contrast"][data-theme="dark"] {
    --bg: #000000;
    --surface: #090909;
    --recess: #141414;
    --text: #ffffff;
    --ink: #ffffff;
    --muted: #eaeaea;
    --accent: #ffe36e;
    --accent-hover: #ffec9e;
    --on: #000000;
    --soft: #242424;
    --selected: #242424;
    --hover-bg: #242424;
    --line: #a0a0a0;
    --line-strong: #cccccc;
    --edge: #cccccc;
    --control-line: #cccccc;
    --good: #b4ffd2;
    --bad: #ffbaba;
    --error: #ffbaba;
    --shadow-lg: 0 0 0 2px #cccccc;
}

/* --- Temel -------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 var(--sans);
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    -webkit-font-smoothing: antialiased;
    overflow-wrap: anywhere;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1 {
    margin-bottom: .85rem;
    font: 750 clamp(1.9rem, 4vw, 2.65rem)/1.12 var(--sans);
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
}

h2 {
    margin-bottom: .7rem;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.022em;
    line-height: 1.3;
}

h3 {
    font-size: 1rem;
    font-weight: 700;
}

small {
    font-size: .84rem;
}

.muted, .note {
    color: var(--muted);
}

.danger, .error, .error-text, p[role=alert]:not(:empty) {
    color: var(--bad);
}

.status-good {
    color: var(--good);
}

a {
    color: var(--accent);
    text-underline-offset: .19em;
}

svg, .icon {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    flex: none;
    vertical-align: middle;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.skip {
    position: fixed;
    z-index: 9;
    top: 8px;
    left: 8px;
    padding: .6rem .8rem;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transform: translateY(-180%);
}

.skip:focus {
    transform: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    margin: -1px;
    padding: 0;
    border: 0;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* --- Üst çubuk ---------------------------------------------------------- */
.top {
    position: sticky;
    z-index: 4;
    top: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem 1.35rem;
    padding: .6rem max(1rem, calc((100% - 88rem) / 2), 3vw);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: var(--text);
    font-weight: 800;
    letter-spacing: -.03em;
    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 2.1rem;
    height: 2.1rem;
    color: var(--on);
    border-radius: 11px;
    background: var(--accent);
}

.brand-mark i {
    width: 2px;
    height: 7px;
    border-radius: 2px;
    background: currentColor;
}

.brand-mark i:nth-child(2), .brand-mark i:nth-child(4) {
    height: 12px;
}

.brand-mark i:nth-child(3) {
    height: 17px;
}

.top nav {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: .15rem;
}

.top nav a {
    padding: .4rem .6rem;
    color: var(--muted);
    border-radius: 9px;
    font-size: .9rem;
    font-weight: 650;
    text-decoration: none;
}

.top nav a:hover, .top nav a[aria-current="page"] {
    color: var(--accent);
    background: var(--soft);
}

.top-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
}

.top-tools form {
    display: contents;
}

.palette-menu {
    position: relative;
}

.palette-menu > summary {
    font-size: .87rem;
    list-style: none;
}

.palette-menu > summary::-webkit-details-marker {
    display: none;
}

.palette-menu > summary::after {
    content: '▾';
    margin-left: .1rem;
    font-size: .8em;
}

.palette-options {
    position: absolute;
    z-index: 5;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    width: min(15rem, 82vw);
    gap: .45rem;
    padding: .9rem;
    box-shadow: var(--shadow-lg, var(--shadow-md));
}

.palette-options label {
    font-size: .8rem;
    font-weight: 700;
    color: var(--muted);
}

.palette-options select {
    width: 100%;
}

/* --- Yerleşim ---------------------------------------------------------- */
.container {
    max-width: 70rem;
    margin-inline: auto;
    padding: clamp(1.35rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem);
}

.container.wide {
    max-width: 96rem;
}

.landing {
    padding-top: clamp(1.1rem, 3.4vw, 2.6rem);
}

.section-heading {
    margin-block-end: 1.6rem;
}

.section-heading p, .section-head p {
    max-width: 62ch;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.02rem;
}

.section-head {
    margin-block: .4rem 1rem;
}

.eyebrow {
    display: block;
    margin-bottom: .55rem;
    color: var(--accent);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem;
}

.stack {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: .85rem;
}

.panel {
    min-width: 0;
    padding: clamp(.95rem, 2.2vw, 1.5rem);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.panel > :last-child, .panel > * > :last-child {
    margin-bottom: 0;
}

.back {
    display: inline-flex;
    margin-bottom: .35rem;
    color: var(--muted);
    font-size: .85rem;
    text-decoration: none;
}

.back:hover {
    color: var(--accent);
}

/* --- Denetimler -------------------------------------------------------- */
button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button, .button, .picker, summary {
    max-width: 100%;
}

button, .button, summary {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 2.55rem;
    padding: .45rem .8rem;
    color: var(--text);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    font-size: .89rem;
    font-weight: 650;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 150ms cubic-bezier(.2, .8, .2, 1), border-color 150ms cubic-bezier(.2, .8, .2, 1), box-shadow 150ms cubic-bezier(.2, .8, .2, 1), transform 150ms cubic-bezier(.2, .8, .2, 1);
}

button:hover:not(:disabled), .button:hover, summary:hover {
    border-color: var(--edge);
    background: var(--hover-bg);
}

button:disabled {
    color: var(--muted);
    border-color: var(--line);
    background: var(--bg);
    box-shadow: none;
    cursor: not-allowed;
}

.primary {
    color: var(--on);
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 4px 12px color-mix(in srgb, var(--accent) 24%, transparent);
}

.primary:hover:not(:disabled) {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.primary:active:not(:disabled) {
    transform: translateY(0);
}

.primary:disabled {
    color: var(--muted);
    border-color: var(--line);
    background: var(--recess);
}

.quiet, .ghost {
    color: var(--accent);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.quiet:hover:not(:disabled), .ghost:hover:not(:disabled) {
    border-color: transparent;
    background: var(--soft);
}

button.danger {
    color: var(--bad);
}

button.danger:hover:not(:disabled) {
    color: var(--bad);
    border-color: transparent;
    background: color-mix(in srgb, var(--bad) 12%, var(--surface));
}

label {
    display: grid;
    min-width: 0;
    gap: .3rem;
    font-size: .87rem;
    font-weight: 650;
}

label .muted {
    font-weight: 400;
}

input:not([type="checkbox"], [type="radio"], [type="range"]),
select,
textarea {
    width: auto;
    max-width: 100%;
    min-width: 0;
    min-height: 2.5rem;
    padding: .45rem .65rem;
    color: var(--text);
    border: 1px solid var(--edge);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-weight: 400;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

select {
    padding-right: 2rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23798798' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .6rem center;
}

input[type="checkbox"], input[type="radio"], input[type="range"] {
    accent-color: var(--accent);
}

textarea {
    width: 100%;
    resize: vertical;
}

input::placeholder, textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}

input:not([type="checkbox"], [type="radio"], [type="range"]):focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

label > input:not([type="checkbox"], [type="radio"]),
label > select,
label > textarea {
    width: 100%;
}

.file-field {
    padding: .8rem;
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg);
    transition: border-color 150ms ease, background-color 150ms ease;
}

.file-field:hover {
    border-color: var(--accent);
    background: var(--soft);
}

.file-field > input[type="file"] {
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.file-picker {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0;
    min-height: 2.6rem;
    gap: .55rem;
    padding: .25rem;
    border: 1px solid var(--edge);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.file-picker-caption {
    flex: none;
    padding: .3rem .55rem;
    color: var(--accent);
    border-radius: 6px;
    background: var(--soft);
    font-size: .85rem;
    font-weight: 650;
}

.file-picker-selection {
    min-width: 0;
    padding-right: .3rem;
    color: var(--muted);
    font-size: .87rem;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-picker input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}

.file-picker:has(input:focus-visible) {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.file-picker:has(input:disabled) {
    background: var(--recess);
}

.file-picker:has(input:disabled) .file-picker-caption {
    color: var(--muted);
    background: transparent;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .87rem;
    font-weight: 500;
}

progress {
    display: block;
    width: 100%;
    height: .4rem;
    overflow: hidden;
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: var(--soft);
    accent-color: var(--accent);
}

progress::-webkit-progress-bar {
    border-radius: 999px;
    background: var(--soft);
}

progress::-webkit-progress-value {
    border-radius: 999px;
    background: var(--accent);
}

progress::-moz-progress-bar {
    border-radius: 999px;
    background: var(--accent);
}

details summary {
    cursor: pointer;
}

details[open] > summary {
    margin-bottom: .5rem;
}

/* --- Duyurular, metrikler ve geçmiş tabloları -------------------------- */
.notice {
    margin-block: .85rem;
    padding: .7rem .9rem;
    color: var(--text);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    background: var(--soft);
    font-size: .9rem;
}

.notice p:last-child {
    margin-bottom: 0;
}

.notice strong {
    color: var(--accent);
}

.note {
    margin: .85rem 0 0;
    color: var(--muted);
    font-size: .85rem;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
    gap: .7rem;
    margin: 0 0 1.4rem;
}

.metric {
    display: grid;
    align-content: start;
    gap: .15rem;
    min-width: 0;
    padding: 1rem 1.15rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.metric-label {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.metric strong {
    display: block;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-variant-numeric: tabular-nums;
    font-weight: 750;
    letter-spacing: -.032em;
    line-height: 1.25;
}

.metric small {
    color: var(--muted);
    font-weight: 400;
}

.metric progress {
    margin-top: .55rem;
}

.metric a {
    justify-self: start;
    font-size: .84rem;
    font-weight: 650;
}

.history {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: .88rem;
}

.history caption {
    text-align: left;
}

.history th, .history td {
    padding: .6rem .45rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.history th {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
}

.history tbody tr:last-child td {
    border-bottom: 0;
}

.history td.num {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
}

.history td.pos {
    color: var(--good);
}

.history td.neg {
    color: var(--bad);
}

.pill {
    display: inline-block;
    justify-self: start;
    max-width: 100%;
    padding: .2rem .5rem;
    color: var(--text);
    border-radius: 999px;
    background: var(--soft);
    font-size: .78rem;
    font-weight: 650;
}

.pill.status-ready {
    color: var(--ready-text);
    background: var(--ready-bg);
}

.pill.status-queued {
    color: var(--queued-text);
    background: var(--queued-bg);
}

.empty {
    padding: 1rem;
    color: var(--muted);
}

/* --- Ana sayfa -------------------------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    align-items: center;
    gap: clamp(1.6rem, 5vw, 4.6rem);
    min-height: 26rem;
    padding: clamp(1.4rem, 4.4vw, 3.6rem);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.hero h1 {
    margin-bottom: 1.1rem;
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    letter-spacing: -.055em;
    line-height: 1;
}

.hero h1 em {
    display: block;
    color: var(--accent);
    font-style: normal;
    font-weight: inherit;
}

.hero p {
    max-width: 38ch;
    color: var(--muted);
    font-size: clamp(1rem, 1.3vw, 1.12rem);
}

.hero .actions {
    gap: .6rem;
    margin-top: 1.4rem;
}

.hero .note {
    font-size: .83rem;
    margin-top: .8rem;
}

.sample {
    margin: 0;
    overflow: hidden;
    color: #f6e9dc;
    border: 1px solid #4b3d35;
    border-radius: 16px;
    background: #2b221e;
    font-size: .94rem;
    box-shadow: var(--shadow-md);
}

.sample-head, .sample-row {
    display: flex;
    gap: .85rem;
    padding: .8rem 1rem;
    border-bottom: 1px solid #534239;
}

.sample-head {
    justify-content: space-between;
    font-weight: 650;
}

.sample-head span + span {
    color: #e8baa3;
    font-family: var(--mono);
    font-size: .81rem;
}

.sample-wave {
    display: flex;
    align-items: center;
    height: clamp(4.4rem, 8vw, 6.8rem);
    gap: 2px;
    padding: .9rem 1rem;
    border-bottom: 1px solid #534239;
    background: #332720;
}

.sample-wave i {
    flex: 1;
    min-width: 0;
    border-radius: 2px;
    background: #d18c71;
}

.beat-1 { height: 13%; }
.beat-2 { height: 24%; }
.beat-3 { height: 38%; }
.beat-4 { height: 54%; }
.beat-5 { height: 75%; }
.beat-6 { height: 95%; }

.sample-row:last-child {
    border-bottom: 0;
}

.sample-row time {
    padding-top: .14rem;
    color: #f5a78b;
    font-family: var(--mono);
    font-size: .78rem;
}

.sample-row.active {
    background: #4a3228;
    box-shadow: inset 3px 0 #f5a78b;
}

.format-note {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .45rem 1rem;
    padding: 1.3rem .3rem;
    color: var(--muted);
    font-size: .9rem;
}

.format-note strong {
    color: var(--text);
}

.feature {
    display: grid;
    justify-items: start;
    gap: .2rem;
    padding: 1.1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.feature strong {
    font-size: .95rem;
}

.feature small {
    color: var(--muted);
}

/* --- Kütüphane -------------------------------------------------------- */
.library-layout {
    display: grid;
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
    align-items: start;
    gap: clamp(1rem, 3vw, 2.4rem);
}

.import-panel .panel > h2, .import-panel h2 {
    margin-bottom: .85rem;
}

.import-options {
    display: grid;
    gap: .35rem;
    margin-top: 1rem;
    padding-top: .9rem;
    border-top: 1px solid var(--line);
    font-size: .88rem;
}

.import-options a {
    padding: .3rem .35rem;
    border-radius: 8px;
    font-weight: 650;
    text-decoration: none;
}

.import-options a:hover {
    background: var(--soft);
}

.filter {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: .55rem;
    margin-bottom: 1rem;
}

.filter label:first-child {
    flex: 1 1 12rem;
}

.project-list {
    display: grid;
    gap: .8rem;
}

.project {
    padding: clamp(.85rem, 2vw, 1.15rem) clamp(.95rem, 2.2vw, 1.35rem);
}

.project-heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .6rem;
}

.format-label {
    padding: .18rem .42rem;
    color: var(--accent);
    border-radius: 6px;
    background: var(--soft);
    font: .75rem var(--mono);
    font-weight: 650;
}

.project-name {
    color: var(--text);
    font-weight: 750;
    letter-spacing: -.015em;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.project-name:hover {
    color: var(--accent);
    text-decoration: underline;
}

.project p {
    margin: .45rem 0;
    color: var(--muted);
    font-size: .87rem;
}

.project details {
    color: var(--muted);
    font-size: .88rem;
}

.project details details {
    margin-top: .6rem;
}

.project details > form {
    margin-block: .5rem;
}

/* --- Aygıt (araç) sayfaları ------------------------------------------- */
.tool-panel {
    max-width: 44rem;
}

.tool-panel .stack > .primary {
    justify-self: start;
}

#tool-status:empty, #audio-status:empty, #media-status:empty {
    display: none;
}

/* --- Sayfa başlığı ve editör ----------------------------------------- */
.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem 1.4rem;
}

.page-heading > .actions {
    align-items: flex-start;
}

.page-heading h1 {
    margin: .2rem 0 .55rem;
}

.editor-heading {
    margin-bottom: .8rem;
}

.editor-heading h1 {
    margin: .35rem 0 0;
    font: 750 clamp(1.4rem, 1rem + 1.6vw, 2.15rem)/1.2 var(--sans);
    letter-spacing: -.03em;
}

.editor-heading .back {
    margin: 0;
    gap: .4rem .8rem;
}

.editor-heading .back a {
    color: var(--muted);
}

.editor-heading .back a:hover {
    color: var(--accent);
}

.picker {
    padding: .45rem .8rem;
}

.picker > summary {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: .89rem;
}

.picker > summary:hover {
    border-color: transparent;
    background: transparent;
    color: var(--accent);
}

.picker > div {
    display: grid;
    gap: .35rem;
    max-width: min(22rem, 78vw);
    margin-top: .4rem;
}

.picker > div a, .picker > div summary {
    padding: .25rem .3rem;
    border-radius: 6px;
    text-decoration: none;
}

.picker > div a:hover, .picker > div summary:hover {
    background: var(--soft);
}

.export-picker:not([open]) > summary {
    padding: .45rem .8rem;
    color: var(--on);
    border-radius: var(--radius-sm);
    background: var(--accent);
}

.export-picker:not([open]) > summary:hover {
    color: var(--on);
    background: var(--accent-hover);
}

.export-picker > div a {
    padding: .35rem .45rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 650;
    text-align: center;
}

#save-status {
    margin: .48rem .25rem .15rem 0;
    color: var(--muted);
    font-size: .84rem;
}

#conflict {
    margin-bottom: 1rem;
    border-left: 3px solid var(--bad);
}

.media-options {
    margin: .65rem 0;
    scroll-margin-top: 5rem;
}

.workspace {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
}

.media-panel {
    width: 33%;
    min-width: 16rem;
    max-width: 65%;
    overflow: auto;
    resize: horizontal;
    background: var(--recess);
}

.media-panel h2 {
    font-size: 1rem;
}

.media-panel label {
    margin-bottom: .45rem;
}

.media-panel p {
    margin-bottom: .8rem;
    font-size: .88rem;
}

#media {
    display: block;
    width: 100%;
    min-height: 8rem;
    max-height: 48vh;
    margin-bottom: .55rem;
    border-radius: 10px;
    background: #2b221e;
}

#media:not([src]) {
    display: none;
}

#media:not([src]) + .playback {
    display: none;
}

.playback {
    margin-bottom: .85rem;
}

.playback label {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.playback select {
    min-height: 2.3rem;
    padding-block: .2rem;
}

#loop[aria-pressed="true"] {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--soft);
}

.replace {
    margin-top: .55rem;
    color: var(--muted);
    font-size: .89rem;
}

.audio-tools {
    margin-top: .7rem;
}

.transcript-panel {
    flex: 1;
    min-width: 0;
    padding: 0;
}

.transcript-heading {
    justify-content: space-between;
    margin: 0;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--line);
}

.transcript-heading h2 {
    margin: 0;
}

.edit-actions {
    align-items: end;
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--line);
}

.edit-actions label {
    flex: 1 1 10rem;
}

.edit-actions button {
    min-height: 2.4rem;
    padding: .35rem .65rem;
    font-size: .86rem;
}

.replace {
    margin: 0;
    padding: .55rem 1rem;
    border-bottom: 1px solid var(--line);
}

.replace .actions {
    margin-top: .45rem;
}

.mobile-editor-link {
    display: none;
}

.segments {
    max-height: 64vh;
    overflow: auto;
}

.segment {
    display: grid;
    gap: .5rem;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--line);
    transition: background-color 150ms ease, box-shadow 150ms ease;
}

.segment:hover {
    background: var(--hover-bg);
}

.segment:last-child {
    border-bottom: 0;
}

.segment.active {
    background: var(--soft);
    box-shadow: inset 3px 0 var(--accent);
}

.segment-controls {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: .4rem;
}

.segment-controls label {
    color: var(--muted);
    font-size: .78rem;
}

.segment-controls input {
    width: 6.7rem;
    min-height: 2.1rem;
    padding: .25rem .4rem;
    font-family: var(--mono);
    font-size: .82rem;
}

.segment-controls button {
    min-height: 2.1rem;
    padding: .25rem .55rem;
    font-size: .82rem;
}

.segment-options {
    display: none;
}

.segment-time {
    justify-self: start;
    align-self: start;
    min-height: 2rem;
    padding: .22rem .55rem;
    color: var(--accent);
    border-color: transparent;
    border-radius: 999px;
    background: var(--soft);
    box-shadow: none;
    font: .83rem var(--mono);
}

.segment-time:disabled {
    color: var(--muted);
    border-color: transparent;
    background: transparent;
}

.segment textarea {
    width: 100%;
    min-height: 3.25rem;
    padding: .35rem .45rem;
    border-color: transparent;
    background: transparent;
    line-height: 1.6;
}

.segment textarea:hover {
    border-color: var(--line-strong);
}

.segment textarea:focus-visible {
    background: var(--surface);
}

.segment p {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.correction-source {
    color: var(--muted);
    font-size: .87rem;
}

.text-pair {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.text-pair strong {
    display: block;
    margin-bottom: .2rem;
    color: var(--muted);
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.text-pair p, .semantic-results p {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ai-panel {
    margin-block: .9rem;
}

.ai-panel > summary {
    font-weight: 700;
}

.ai-panel form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: .5rem;
}

.ai-panel .actions {
    align-items: flex-end;
    margin-block: .75rem;
}

.semantic-results {
    display: grid;
    gap: .55rem;
    margin: .75rem 0;
    padding-left: 1.2rem;
}

.semantic-results button {
    min-height: 0;
    margin-bottom: .25rem;
    padding: .25rem .55rem;
    font-size: .82rem;
}

#citation-form {
    display: grid;
    max-width: 36rem;
    gap: .7rem;
}

#citation-form textarea, #citation-form input {
    width: 100%;
}

#citation-form button {
    justify-self: start;
}

#source-citation {
    scroll-margin-top: 5rem;
}

#editor-tools {
    scroll-margin-top: 5rem;
}

#youtube-player {
    margin-bottom: .9rem;
}

#youtube-frame iframe {
    display: block;
    width: 100%;
    min-height: 200px;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 10px;
}

pre, code, .mono {
    font-family: var(--mono);
}

pre {
    max-width: 100%;
    max-height: 350px;
    overflow: auto;
    margin: 0;
    padding: .8rem;
    border-radius: var(--radius-sm);
    background: var(--bg);
    font-size: .85rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* --- Modern ana sayfa: merkezi hero ve kaynak seçimi ----------------- */
.hero.hero-centered {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    max-width: 56rem;
    min-height: 0;
    gap: .45rem;
    margin: 0 auto clamp(1.1rem, 2.6vw, 1.9rem);
    padding: clamp(.7rem, 2.2vw, 1.8rem) clamp(.4rem, 2vw, 1.4rem);
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.hero-centered h1 {
    margin-bottom: .75rem;
    font-size: clamp(2.05rem, 5.4vw, 3.6rem);
    letter-spacing: -.04em;
    line-height: 1.02;
}

.hero-centered h1 em {
    display: block;
}

.hero-centered p {
    margin-inline: auto;
}

.hero-centered .hero-lead {
    max-width: 52ch;
}

.hero-centered .actions {
    justify-content: center;
    margin-top: 1.1rem;
}

.hero-centered .note {
    max-width: 52ch;
    margin-inline: auto;
}

.intake-card {
    max-width: 54rem;
    margin: 0 auto clamp(1.6rem, 4vw, 2.6rem);
    padding: clamp(1rem, 2.4vw, 1.5rem);
}

.intake-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: 1.1rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid var(--line);
}

.intake-tabs [role="tab"] {
    min-height: 0;
    padding: .5rem .75rem;
    color: var(--muted);
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
    font-size: .89rem;
    font-weight: 650;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.intake-tabs [role="tab"]:hover:not(:disabled) {
    color: var(--text);
    border-color: transparent;
    background: var(--hover-bg);
}

.intake-tabs [role="tab"][aria-selected="true"] {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 22%, transparent);
    background: var(--soft);
}

.intake-tabs .icon {
    width: 1.05rem;
    height: 1.05rem;
}

.intake-panel {
    min-width: 0;
}

.intake-panel:focus-visible {
    outline-offset: 6px;
}

.intake-fields,
.tool-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .7fr);
    gap: .7rem;
}

.intake-guest,
.intake-note {
    display: grid;
    justify-items: center;
    gap: .45rem;
    padding: clamp(.8rem, 2.4vw, 1.4rem) .2rem;
    text-align: center;
}

.intake-guest p,
.intake-note p {
    max-width: 54ch;
    margin: 0;
    color: var(--muted);
}

.intake-note h2,
.intake-guest h2 {
    margin: 0;
    font-size: 1.15rem;
}

.intake-guest .actions,
.intake-note .actions {
    justify-content: center;
    margin-top: .45rem;
}

/* --- Sürükle-bırak alanları -------------------------------------------- */
.dropzone {
    display: grid;
    justify-items: center;
    gap: .35rem;
    padding: clamp(1rem, 3.5vw, 1.9rem) 1rem;
    border: 1.5px dashed var(--line-strong);
    border-radius: 14px;
    background: var(--bg);
    text-align: center;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--accent);
    background: var(--soft);
}

.dropzone.dragover {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.dropzone-glyph,
.info-glyph,
.feature-glyph,
.project-glyph,
.empty-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    color: var(--accent);
    border-radius: 12px;
    background: var(--soft);
}

.dropzone-glyph {
    width: 3rem;
    height: 3rem;
    margin-bottom: .15rem;
    border-radius: 14px;
}

.dropzone-glyph .icon {
    width: 1.45rem;
    height: 1.45rem;
}

.dropzone-title {
    font-weight: 700;
    letter-spacing: -.01em;
}

.dropzone-hint {
    color: var(--muted);
    font-size: .85rem;
    font-weight: 400;
}

.dropzone .file-field {
    width: 100%;
    max-width: 26rem;
    margin-top: .55rem;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
}

.dropzone .file-picker {
    width: 100%;
    max-width: 26rem;
    margin-top: .55rem;
    text-align: left;
}

.dropzone .file-picker + .file-picker,
.dropzone .file-picker + .file-field {
    margin-top: 0;
}

/* --- Bilgi ve özellik kartları ----------------------------------------- */
.info-cards,
.feature-grid {
    display: grid;
    gap: .8rem;
    margin: 0 0 clamp(1.2rem, 3vw, 1.9rem);
    padding: 0;
    list-style: none;
}

.info-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-card,
.feature-card {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.info-card:hover,
.feature-card:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.info-card > span:last-child {
    display: grid;
    min-width: 0;
    gap: .15rem;
}

.info-card strong {
    font-size: .89rem;
    letter-spacing: -.01em;
}

.info-card small {
    color: var(--muted);
    font-size: .81rem;
}

.info-glyph {
    width: 2.2rem;
    height: 2.2rem;
    flex: none;
    border-radius: 10px;
}

.info-glyph .icon {
    width: 1.1rem;
    height: 1.1rem;
}

.feature-grid .feature-card {
    display: grid;
    justify-items: start;
    gap: .3rem;
}

.feature-card strong {
    font-size: .93rem;
}

.feature-card small {
    color: var(--muted);
    line-height: 1.45;
}

.feature-glyph {
    margin-bottom: .25rem;
}

/* --- Modern proje kart ızgarası ---------------------------------------- */
.project-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.library-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .4rem 1rem;
    margin-bottom: .2rem;
}

.library-heading h2 {
    margin-bottom: 0;
}

.library-heading p {
    margin: 0;
    font-size: .86rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: clamp(.95rem, 2vw, 1.3rem);
    box-shadow: var(--shadow-sm);
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.project-card:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.project-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
}

.project-glyph {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 10px;
}

.project-glyph .icon {
    width: 1.1rem;
    height: 1.1rem;
}

.project-card .project-name {
    display: block;
    font-size: 1.03rem;
    line-height: 1.35;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.project-meta .pill {
    padding: .16rem .5rem;
    font-size: .75rem;
    font-weight: 600;
}

.project-card .project-open {
    align-self: flex-start;
    color: var(--accent);
    font-size: .84rem;
    font-weight: 650;
    text-decoration: none;
}

.project-card .project-open:hover {
    text-decoration: underline;
}

.project-card details {
    margin-top: auto;
    padding-top: .35rem;
    border-top: 1px solid var(--line);
}

.project-card > p {
    margin: 0;
    font-size: .86rem;
}

.empty-state {
    grid-column: 1 / -1;
    display: grid;
    justify-items: center;
    gap: .5rem;
    padding: clamp(1.6rem, 4vw, 2.6rem) 1rem;
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface);
    text-align: center;
}

.empty-state h3 {
    margin: 0;
}

.empty-state p {
    max-width: 46ch;
    margin: 0;
}

.empty-glyph {
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
}

.empty-glyph .icon {
    width: 1.4rem;
    height: 1.4rem;
}

.recent-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .4rem 1rem;
    margin-top: clamp(1.6rem, 4vw, 2.6rem);
}

.recent-head h2 {
    margin-bottom: 0;
}

.recent-head a {
    font-size: .88rem;
    font-weight: 650;
    text-decoration: none;
}

.recent-head a:hover {
    text-decoration: underline;
}

.recent-projects .project-card {
    gap: .35rem;
}

/* --- Araç sayfası ------------------------------------------------------ */
.tool-panel .dropzone {
    justify-items: center;
}

.tool-panel .dropzone .file-field {
    justify-self: center;
}

.tool-fields {
    max-width: 40rem;
}

#tool-status {
    margin: 0;
    color: var(--muted);
    font-size: .87rem;
}

/* --- Editör üst çubuğu ve başlık hiyerarşisi --------------------------- */
.editor-title {
    min-width: 0;
}

.editor-heading > .editor-bar {
    align-items: flex-end;
    gap: .45rem;
    padding: .5rem .6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

#save-status.save-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin: 0 .2rem .15rem 0;
    padding: .28rem .6rem;
    color: var(--muted);
    border-radius: 999px;
    background: var(--recess);
    font-size: .78rem;
    font-weight: 650;
    white-space: nowrap;
}

#save-status.save-badge::before {
    content: '';
    width: .42rem;
    height: .42rem;
    flex: none;
    border-radius: 50%;
    background: currentColor;
    opacity: .7;
}

.heading-icon {
    width: 1.05rem;
    height: 1.05rem;
    margin-right: .4rem;
    color: var(--accent);
}

.workspace {
    gap: 1rem;
}

.transcript-heading,
.edit-actions,
.transcript-panel .replace {
    padding-inline: 1.15rem;
}

@media (max-width: 1100px) {
    .project-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .info-cards,
    .feature-grid,
    .intake-fields,
    .tool-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .intake-tabs [role="tab"] {
        padding: .45rem .6rem;
        font-size: .85rem;
    }

    .info-card,
    .feature-card {
        padding: .85rem;
    }

    .editor-heading > .editor-bar {
        width: 100%;
        justify-content: flex-start;
    }
}

/* --- Yüksek kontrast düzeltmeleri ------------------------------------ */
:root[data-palette="contrast"] :is(.panel, .metric, .feature, button, .button, .picker, input:not([type="checkbox"], [type="radio"], [type="range"]), select, textarea, summary, .file-picker, .notice, .pill) {
    border-width: 2px;
}

:root[data-palette="contrast"] :is(.quiet, .ghost) {
    border-width: 2px;
    border-style: solid;
    border-color: var(--edge);
}

/* --- Duyarlı yerleşim ------------------------------------------------ */
@media (max-width: 860px) {
    .hero, .library-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero {
        min-height: 0;
    }
}

@media (max-width: 760px) {
    .top {
        gap: .3rem .7rem;
        padding-block: .5rem;
    }

    .top nav {
        order: 3;
        flex: 1 1 100%;
    }

    .top nav a {
        padding-inline: .5rem;
    }

    .top-tools {
        margin-left: auto;
    }

    .workspace {
        flex-direction: column;
        align-items: stretch;
    }

    .workspace > .panel {
        padding: 0;
    }

    .media-panel {
        width: 100%;
        min-width: 0;
        max-width: none;
        padding: .9rem;
        resize: none;
    }

    .segments {
        max-height: none;
    }

    .mobile-editor-link {
        display: inline-flex;
    }

    .segment-options {
        display: inline-flex;
        justify-self: start;
        min-height: 2rem;
        padding: .24rem .35rem;
        color: var(--muted);
        border-color: transparent;
        background: transparent;
        box-shadow: none;
    }

    .segment-options[aria-expanded="false"] + .segment-controls {
        display: none;
    }

    .segment-controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .segment-controls input {
        width: 100%;
    }

    .history {
        font-size: .82rem;
    }

    .history th, .history td {
        padding: .5rem .3rem;
    }
}

@media (min-width: 761px) {
    .segment {
        grid-template-columns: 7.3rem minmax(0, 1fr);
        column-gap: .75rem;
    }

    .segment-time {
        grid-column: 1;
        grid-row: 1;
    }

    .segment > :not(.segment-time) {
        grid-column: 2;
    }
}

@media (max-width: 30rem) {
    .text-pair {
        grid-template-columns: minmax(0, 1fr);
    }

    .metric {
        padding: .8rem .9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
