/* src/totalrecall/transcribe/assets/style/review.v001.css */

:root {
    /* Core dark theme */
    --bg: #000000;
    --panel: #0a0a0a;
    --panel-2: #101010;
    --panel-3: #151515;
    --border: #1a1a1a;

    /* Text */
    --text: #e6f1f3;
    --muted: #8aa3a8;
    --muted-2: #7a7a7a;

    /* Brand */
    --teal: #00bcd4;
    --teal-bright: #00e5ff;
    --brand-cyan: var(--teal);
    --brand-cyan-dim: #0c6d79;
    --brand-cyan-soft: rgba(0, 188, 212, 0.14);
    --brand-cyan-strong: rgba(0, 188, 212, 0.22);

    --brand-magenta: #9b00b8;
    --brand-magenta-strong: rgba(155, 0, 184, 0.34);
    --brand-magenta-soft: rgba(155, 0, 184, 0.24);
    --brand-magenta-border: rgba(255, 0, 230, 0.75);

    --green-bg: rgba(76, 175, 80, 0.14);
    --yellow-bg: rgba(255, 193, 7, 0.18);
    --red-bg: rgba(244, 67, 54, 0.18);

    --link: var(--brand-cyan);
    --blue-active: var(--brand-cyan);

    /* Shell-specific tokens */
    --shell-bg: #000000;
    --shell-panel: #050505;
    --shell-border: #1a1a1a;
    --shell-text: #e6f1f3;
    --shell-muted: #8aa3a8;
    --shell-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    --shell-radius-lg: 20px;

    /* Buttons */
    --btn-primary-bg: var(--teal);
    --btn-primary-text: #000000;
    --btn-secondary-bg: #111111;
    --btn-secondary-text: #d7dde0;

    /* Portable UI dialog — TotalRecall theme */
    --ui-dialog-font-family:
        Arial,
        sans-serif;

    --ui-dialog-backdrop:
        rgba(0,
            0,
            0,
            0.82);

    --ui-dialog-surface:
        var(--panel);

    --ui-dialog-text:
        var(--text);

    --ui-dialog-muted:
        var(--muted);

    --ui-dialog-border:
        var(--brand-cyan-dim);

    --ui-dialog-primary:
        var(--brand-cyan);

    --ui-dialog-primary-hover:
        var(--teal-bright);

    --ui-dialog-danger:
        #a52222;

    --ui-dialog-danger-hover:
        #c52b2b;

    --ui-dialog-neutral:
        var(--panel-2);

    --ui-dialog-neutral-hover:
        var(--panel-3);

    --ui-dialog-focus:
        var(--teal-bright);

    --ui-dialog-radius:
        14px;

    --ui-dialog-shadow:
        0 28px 90px rgba(0,
            0,
            0,
            0.72),
        0 0 0 1px rgba(0,
            188,
            212,
            0.12),
        0 0 44px rgba(0,
            188,
            212,
            0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

body.tr-shell-page {
    background: var(--shell-bg);
    color: var(--shell-text);
}

h1 {
    display: none;
}

/* =========================================
   Generic controls
   ========================================= */

button,
select {
    padding: 6px 10px;
    border: 1px solid #1f4045;
    border-radius: 6px;
    background: #111111;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}

button:hover,
select:hover {
    background: #151515;
    border-color: var(--brand-cyan-dim);
}

.current-text,
.notes-text {
    width: 100%;
    padding: 8px;
    border: 1px solid #1e1e1e;
    border-radius: 6px;
    resize: vertical;
    background: #0f0f0f;
    color: #ffffff;
    font-family: inherit;
}

.current-text:focus,
.notes-text:focus,
select:focus {
    outline: none;
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 1px rgba(0, 188, 212, 0.35);
}

/* =========================================
   Review UI
   ========================================= */

.brandbar {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: #050505;
}

.brandbar .brand-left {
    z-index: 1;
    display: flex;
    align-items: center;
}

.brandbar img {
    display: block;
    width: auto;
    height: 44px;
    filter: drop-shadow(0 0 6px rgba(0, 188, 212, 0.15));
}

.brandbar .brand-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: min(680px, calc(100% - 240px));
    text-align: center;
    pointer-events: none;
}

.brandbar .brand-title {
    color: var(--brand-cyan);
    font-size: 18px;
    font-weight: bold;
    line-height: 1.2;
}

.brandbar .brand-subtitle {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
}

.topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 12px;
    border-bottom: 1px solid var(--border);
    background: #0b0b0b;
}

.small {
    color: var(--muted);
    font-size: 12px;
}

.save-status {
    margin-left: auto;
    color: #8be28b;
    font-size: 12px;
    white-space: nowrap;
}

.audio-wrap {
    padding: 6px 16px 0;
    background: #050505;
}

audio {
    width: 100%;
    margin-bottom: 6px;
    filter: hue-rotate(145deg) saturate(1.1);
}

.layout {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(420px, 1fr);
    gap: 0;
    height: calc(100vh - 160px);
}

.layout.hide-left {
    grid-template-columns: 72px minmax(0, 1fr);
}

.layout.hide-right {
    grid-template-columns: minmax(0, 1fr) 72px;
}

/*
 * Collapse only the pane contents.
 * Keep the pane header/button alive as a narrow restore rail.
 */
.layout.hide-left #compiled-pane .pane-body,
.layout.hide-left #compiled-pane .pane-header-left> :not(#toggle-left-btn),
.layout.hide-left #compiled-pane .pane-header-right {
    display: none;
}

.layout.hide-right #review-pane .pane-body,
.layout.hide-right #review-pane .pane-header-left> :not(#toggle-right-btn),
.layout.hide-right #review-pane .pane-header-right,
.layout.hide-right #review-pane .review-header-navigation {
    display: none;
}

/*
 * Collapsed pane becomes only wide enough for Show.
 */
.layout.hide-left #compiled-pane,
.layout.hide-right #review-pane {
    width: auto;
    min-width: 0;
}

.layout.hide-left #compiled-pane .pane-header,
.layout.hide-right #review-pane .pane-header {
    width: auto;
    height: 100%;
    padding: 12px 8px;
    align-items: flex-start;
    justify-content: center;
}

.pane {
    min-width: 0;
    overflow: hidden;
}

.new-source-panel {
    margin-bottom: 1rem;
}

.new-source-form {
    display: grid;
    grid-template-columns:
        minmax(18rem, 1fr) auto minmax(8rem, auto) auto;
    align-items: center;
    gap: 0.65rem;
}

.new-source-input,
.new-source-profile {
    min-height: 2.5rem;
}

.new-source-input {
    width: 100%;
}

.new-source-input::placeholder {
    color: #8a8f98;
    opacity: 1;
}

.new-source-error {
    margin-top: 0.65rem;
    font-size: 0.9rem;
}

.home-section-heading {
    margin: 1.25rem 0 0.75rem;
    font-weight: 600;
}

.review-video {
    display: block;
    width: 100%;
    max-height: 70vh;
    background: #000;
}

.review-audio {
    display: block;
    width: 100%;
}

.review-media-loading,
.review-media-error {
    padding: 1rem;
}

.review-media-error {
    color: #ff9999;
}

@media (max-width: 800px) {
    .new-source-form {
        grid-template-columns: 1fr 1fr;
    }

    .new-source-input {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .new-source-form {
        grid-template-columns: 1fr;
    }

    .new-source-input {
        grid-column: auto;
    }

    .new-source-form .btn,
    .new-source-profile {
        width: 100%;
    }
}

.review-metrics {
    width: 100%;
    margin-bottom: 0;
    font-size: 0.78rem;
    color: #56666b;
}

#compiled-pane,
#review-pane {
    display: flex;
    flex-direction: column;
}

#compiled-pane {
    border-right: 1px solid var(--border);
    background: #050505;
}

#review-pane {
    background: #080808;
}

.review-controls {
    display: none;
    align-items: center;
    gap: 1rem;
    width: 100%;
    flex-wrap: nowrap;
}

.review-lock-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-lock-icon {
    line-height: 1;
    font-size: 1.1rem;
}

.review-lock-icon[hidden] {
    display: none;
}

.review-metrics {
    flex: 1 1 auto;
    min-width: 0;
}

.review-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
}

.review-header-navigation {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.review-header-navigation-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-header-navigation-controls button {
    padding: 5px 10px;
    font-size: 12px;
}

.review-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    opacity: 0.85;
}

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: #0c0c0c;
    color: var(--brand-cyan);
}

.pane-header-left,
.pane-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.pane-title {
    font-size: 15px;
    font-weight: bold;
    white-space: nowrap;
}

.pane-subtitle {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pane-body {
    height: 100%;
    padding: 16px;
    overflow-y: auto;
}

.speed-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 10px;
}

.compiled-surface {
    width: 100%;
    min-height: 100%;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #050505;

    font-size: 20px;
    line-height: 1.75;

    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    box-shadow: inset 0 0 0 1px rgba(0, 188, 212, 0.04);
}

.compiled-segment {
    padding: 1px 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease, outline 0.15s ease, box-shadow 0.15s ease;
}

.compiled-segment.compiled-high {
    background: transparent;
}

.compiled-segment.compiled-medium {
    background: var(--yellow-bg);
}

.compiled-segment.compiled-low,
.compiled-segment.compiled-flagged {
    background: var(--brand-magenta-strong);
    box-shadow: inset 0 0 0 1px rgba(255, 0, 230, 0.18);
}

.compiled-segment.active {
    outline: none;
    box-shadow: none;
}

.accept-btn {
    border-left: 2px solid var(--brand-cyan);
}

.unclear-btn {
    border-left: 2px solid var(--brand-magenta);
}

.span-camera-btn {
    min-width: 32px;
    padding-right: 6px;
    padding-left: 6px;
    font-size: 14px;
    line-height: 1;
}

.span-camera-btn:hover:not(:disabled) {
    border-color: var(--brand-cyan);
}

.span-camera-btn:disabled {
    cursor: default;
    opacity: 0.35;
}

.span-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 2px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.span-attachment {
    width: min(240px, 100%);
    margin: 0;
}

.span-attachment a {
    display: block;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #090909;
}

.span-attachment a:hover {
    border-color: var(--brand-cyan);
}

.span-attachment-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
    background: #000000;
}

.span-attachment-caption {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.attachment-render-error {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 160px;
    min-height: 90px;

    color: #888;
    background: #222;
    border: 1px solid #444;
    font-size: 0.85rem;
}

.segment-download-btn {
    margin-left: 0.45rem;
    padding: 0.18rem 0.5rem;
    min-height: 0;
    font-size: 0.75rem;
    line-height: 1.2;
    vertical-align: middle;
    cursor: pointer;
}

.segment-download-btn:disabled {
    cursor: wait;
    opacity: 0.65;
}

.span {
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel-2);
    box-shadow: inset 0 0 0 1px rgba(0, 188, 212, 0.03);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.span.flagged {
    background: rgba(155, 0, 184, 0.1);
    border-color: rgba(255, 0, 230, 0.28);
    border-left: 4px solid var(--brand-magenta-border);
}

.span.accepted {
    background: var(--panel-2);
    border-color: rgba(0, 188, 212, 0.28);
    border-left: 4px solid var(--brand-cyan);
}

/* Default active selection */
.span.active {
    border-color: var(--blue-active);
    box-shadow: 0 0 0 1px var(--blue-active);
}

/* Preserve semantic left ridges while active */
.span.flagged.active {
    border-left-color: var(--brand-magenta-border);
}

.span.accepted.active {
    border-left-color: var(--brand-cyan);
}

/* Explicit human Unclear overrides the entire active outline */
.span.unclear.active {
    border-color: var(--brand-magenta-border);
    border-left-color: var(--brand-magenta-border);
    box-shadow: 0 0 0 1px var(--brand-magenta-border);
}

.span-speaker {
    font-size: 0.75rem;
    font-weight: 600;
    color: #7fd1ff;
    margin-bottom: 0.15rem;
    letter-spacing: 0.03em;
}

.span.deleted,
.span.deleted.active {
    background: #0d0d0d;
    border-color: #242424;
    border-left: 4px solid #3a3a3a;
    box-shadow: none;
}

.span.deleted .current-text,
.span.deleted .span-details,
.span.deleted .span-command-bar> :not(.restore-btn) {
    opacity: 0.38;
    color: #777777;
}

.span.deleted .current-text {
    text-decoration: line-through;
    border-color: #262626;
    background: #111111;
}

.span.deleted .span-timestamp-btn,
.span.deleted .span-more-btn,
.span.deleted button {
    border-color: #2a2a2a;
    color: #777777;
}

.span.deleted .restore-btn {
    opacity: 0.45;
    border-color: #2a2a2a;
    color: #777777;
}

.span.deleted .restore-btn:hover {
    opacity: 1;
    background: #151515;
    border-color: #666666;
    color: #ffffff;
}

.span.deleted:has(.restore-btn:hover) .current-text {
    opacity: 1;
    color: #ffffff;
    border-color: #444444;
    background: #151515;
}

.span.deleted .span-attachments {
    opacity: 0.38;
}

.accept-remaining-wrap {
    display: flex;
    justify-content: center;
    padding: 24px 0 36px;
}

.accept-remaining-btn {
    padding: 10px 20px;
    border-left: 2px solid var(--brand-cyan);
    font-weight: 700;
}

.accept-remaining-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

/* =========================================
   Compact review span UX
   ========================================= */

.span-command-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.span-command-bar button {
    padding: 5px 8px;
    font-size: 12px;
}

.span-timestamp-btn {
    color: var(--brand-cyan);
    white-space: nowrap;
}

.current-text {
    min-height: 64px;
    margin-bottom: 0;
    font-size: 16px;
    line-height: 1.5;
}

.span-more-btn {
    margin-left: auto;
    padding: 2px 7px;
    border-color: transparent;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
}

.span-more-btn:hover {
    background: #111111;
    border-color: var(--border);
    color: var(--brand-cyan);
}

.span-details {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.span-details[hidden] {
    display: none;
}

.span-detail-label {
    margin-top: 10px;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.span-detail-label:first-child {
    margin-top: 0;
}

.span-details .original {
    margin-top: 0;
    padding: 7px 8px;
    border-radius: 6px;
    background: #0b0b0b;
    color: var(--muted-2);
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.span-metadata-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 7px;
    border-top: 1px solid var(--border);
    color: var(--muted-2);
    font-size: 10px;
}

.meta {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.timestamp {
    color: var(--link);
    cursor: pointer;
    text-decoration: underline;
}

.status {
    color: var(--brand-cyan);
    font-weight: bold;
}

.notes-text {
    min-height: 56px;
    margin-top: 8px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.flags,
.alts,
.original,
.semantic {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.5;
}

.flags {
    color: #ff9df3;
}

.semantic {
    color: #ff8ae8;
}

.alts {
    color: #bbbbbb;
}

.original {
    color: var(--muted-2);
}

.badge {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid #2d2d2d;
    border-radius: 999px;
    color: #dddddd;
    font-size: 11px;
}

.badge.low {
    background: var(--brand-magenta-soft);
    border-color: rgba(255, 0, 230, 0.25);
}

.badge.medium {
    background: var(--brand-cyan-soft);
}

.badge.high {
    background: var(--green-bg);
}

.card-header {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    grid-template-areas:
        "meta meta"
        "status actions";
    column-gap: 12px;
    row-gap: 6px;
    align-items: center;
    margin-bottom: 10px;
}

.card-status {
    grid-area: status;
    min-width: 120px;
}

.card-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.card-meta {
    grid-area: meta;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.3;
    text-align: left;
    white-space: nowrap;
}

.status-pill.accepted,
.status-pill.corrected,
.status-pill.unclear,
.status-pill.unreviewed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: 4px 10px;
    border: 1px solid #2d2d2d;
    border-radius: 999px;
    background: #141414;
    color: #dddddd;
    font-size: 11px;
    font-weight: bold;
    text-transform: lowercase;
}

.status-pill.accepted {
    background: var(--green-bg);
    border-color: rgba(76, 175, 80, 0.24);
    color: #d9ffd9;
}

.status-pill.corrected {
    background: var(--brand-cyan-soft);
    border-color: rgba(0, 188, 212, 0.24);
    color: #d8fbff;
}

.status-pill.unclear,
.status-pill.unreviewed {
    background: var(--brand-magenta-soft);
    border-color: rgba(255, 0, 230, 0.25);
    color: #ffe0fb;
}

/* --------------------------------------------------------------------------
   Transcript context menu
   -------------------------------------------------------------------------- */

.transcript-context-menu {
    position: fixed;
    z-index: 1000;

    min-width: 180px;
    padding: 6px;

    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.35);
}

.transcript-context-menu-item {
    display: block;
    width: 100%;

    padding: 8px 10px;

    border: 0;
    border-radius: 5px;

    background: transparent;
    color: inherit;

    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}

.transcript-context-menu-item:hover,
.transcript-context-menu-item:focus-visible {
    background: rgba(255, 255, 255, 0.08);
}

/* =========================================
   Context command sections
   ========================================= */

.context-command-grid {
    display: grid;
    grid-template-columns:
        minmax(240px, auto)
        max-content;
    gap: 8px;
    align-items: start;
}

.context-command-section {
    min-width: 0;
}

.context-command-section__title {
    display: block;
    min-height: 28px;
    padding: 0 4px 6px;

    font-size: 13px;
}


.context-history-controls {
    display: flex;
    gap: 2px;

    margin: 0 0 6px;
}

.context-history-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;
    padding: 0;

    border: 0;
    border-radius: 4px;

    background: transparent;

    color:
        rgba(0, 188, 212, 0.72);

    cursor: pointer;
}

.context-history-button:hover,
.context-history-button:focus-visible {
    background:
        rgba(255, 255, 255, 0.08);

    color:
        var(--teal-bright);
}

.context-history-button:focus-visible {
    outline:
        1px solid var(--teal-bright);

    outline-offset:
        1px;
}

.context-history-button__icon {
    display: block;

    width: 12px;
    height: 12px;

    background-color:
        currentColor;

    mask-repeat:
        no-repeat;

    mask-position:
        center;

    mask-size:
        contain;

    -webkit-mask-repeat:
        no-repeat;

    -webkit-mask-position:
        center;

    -webkit-mask-size:
        contain;

    pointer-events: none;
    user-select: none;
}

.context-history-button:disabled {
    opacity: 0.35;
    cursor: default;
}

.context-history-button:disabled:hover {
    background:
        transparent;
}

/* =========================================
   App shell: dashboard + workspace
   ========================================= */

.shell {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    background: var(--shell-bg);
}

.panel {
    border: 1px solid var(--shell-border);
    border-radius: var(--shell-radius-lg);
    background: var(--shell-panel);
    box-shadow: var(--shell-shadow);
}

.retranscribing #compiled-surface,
.retranscribing .compiled-segment {
    pointer-events: none;
    cursor: default;
}

.retranscribing #compiled-surface {
    opacity: 0.55;
}

.retranscribing #review-pane {
    display: none !important;
}

.retranscribing .layout {
    grid-template-columns: 1fr !important;
}

.retranscribe-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(3px);
}

.retranscribe-overlay.hidden {
    display: none;
}

.retranscribe-overlay-card {
    width: min(520px, calc(100vw - 40px));
    padding: 28px;
    border: 1px solid var(--shell-border);
    border-radius: 20px;
    background: #050505;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    text-align: center;
}

.retranscribe-overlay-gif {
    display: block;
    width: 180px;
    max-width: 60%;
    height: auto;
    margin: 0 auto 18px auto;
}

.retranscribe-overlay-title {
    margin-bottom: 10px;
    color: var(--shell-text);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}

.retranscribe-overlay-message {
    color: var(--brand-cyan);
    font-size: 16px;
    line-height: 1.45;
}

.brand-hero {
    padding: 20px;
    margin-bottom: 20px;
}


.brand-hero-row {
    display: flex;
    align-items: center;
}

.brand-hero-copy {
    min-width: 0;
}

.brand-hero-logo,
.brand-hero-logo-home {
    width: auto;
    height: 50px;
    flex: 0 0 auto;
}

.brand-hero-workspace {
    padding: 8px 28px 10px;
    margin-bottom: 4px;

    /* Remove outer panel treatment */
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.brand-hero-workspace .brand-hero-row {
    gap: 14px;
}

.brand-hero-logo-workspace {
    width: auto;
    height: 64px;
    flex: 0 0 auto;
}

.brand-hero-workspace .brand-hero-title {
    margin: 0;
    color: var(--brand-cyan);
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-7px);
}

.brand-subtitle,
.brand-hero-subtitle {
    margin: 0;
    color: var(--shell-muted);
    font-size: 18px;
}

.home-grid {
    display: block;
}

.empty-state {
    padding: 20px;
}

.job-card {
    margin-bottom: 14px;
    padding: 20px;
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.job-card-main {
    flex: 1;
    min-width: 0;
}

.job-card-title {
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.job-card-title-input {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 2px 6px;
    border: 1px solid var(--brand-cyan-dim);
    border-radius: 6px;
    background: #0b0b0b;
    color: inherit;
    font: inherit;
    line-height: inherit;
}

.job-card-title-input:focus {
    outline: none;
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 1px rgba(0, 188, 212, 0.35);
}

.job-card-meta {
    margin-bottom: 10px;
    color: var(--shell-muted);
    font-size: 12px;
}

.job-card-meta-line {
    display: inline-block;
    margin-right: 10px;
}

.job-card-source {
    margin-top: 8px;
    color: var(--shell-muted);
    font-size: 13px;
    word-break: break-word;
}

.job-card-description {
    margin-top: 10px;
    margin-bottom: 10px;
    color: #b8c7cb;
    font-size: 14px;
}

.job-card-tags {
    color: var(--shell-muted);
    font-size: 13px;
}

.job-card-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
}

.job-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.job-card-error {
    margin-top: 10px;
    color: #ff8080;
}

.job-tag {
    display: inline-block;
    margin: 2px 6px 2px 0;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0, 188, 212, 0.12);
    color: var(--teal);
    font-size: 12px;
    border: 1px solid rgba(0, 188, 212, 0.24);
}

.job-empty-tags {
    color: var(--shell-muted);
    font-size: 13px;
}

.job-status-pill {
    display: inline-block;
    margin-right: 6px;
    margin-top: 6px;
    margin-bottom: 6px;
    padding: 4px 8px;
    border: 1px solid #222222;
    border-radius: 999px;
    background: #111111;
    color: var(--shell-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.job-status-pill--on {
    border-color: rgba(0, 188, 212, 0.4);
    background: rgba(0, 188, 212, 0.15);
    color: var(--teal);
}

.job-status-pill--off {
    border-color: #222222;
    background: #111111;
    color: #666666;
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}

.btn-primary:hover {
    background: var(--teal-bright);
}

.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
}

.btn-secondary:hover {
    background: #1c1c1c;
}

/* =========================================
   Minor calls to action
   ========================================= */

.tr-minor-cta {
    background:
        rgba(0, 188, 212, 0.25);

    color:
        #ffffff;
}

.tr-minor-cta:hover,
.tr-minor-cta:focus-visible {
    background:
        rgba(0, 188, 212, 0.72);

    border-color:
        var(--teal-bright);

    color:
        #ffffff;
}

.tr-minor-cta:focus-visible {
    outline:
        1px solid var(--teal-bright);

    outline-offset:
        1px;
}

/* =========================================
   Workspace identity + metadata color
   ========================================= */

.workspace-panel,
.workspace-title-panel,
.workspace-details,
.workspace-job-id,
.workspace-source,
.workspace-transcription-profile label,
.workspace-details .subtle,
.workspace-details .field label,
.workspace-details .meta-field label,
.workspace-save-msg {
    color: var(--brand-cyan);
}

.workspace-panel {
    margin-bottom: 8px;
    padding: 14px 18px;
}

.workspace-title-panel {
    margin-bottom: 8px;
    padding: 12px 18px;
}

.workspace-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.workspace-title-row .workspace-job-title-input {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
}

.workspace-title-save-state {
    flex: 0 0 auto;
    min-width: 90px;
    text-align: right;
    white-space: nowrap;
}

.workspace-details {
    margin-bottom: 8px;
    overflow: hidden;
}

.workspace-details-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: var(--brand-cyan);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    list-style: none;
}

.workspace-details-summary::-webkit-details-marker {
    display: none;
}

.workspace-details-summary::marker {
    content: "";
}

.workspace-details-summary:hover {
    background: var(--panel-2);
}

.workspace-details-summary:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 1px var(--brand-cyan-dim);
}

.workspace-details-chevron {
    display: inline-block;
    color: var(--brand-cyan);
    font-size: 12px;
    transition: transform 0.18s ease;
}

.workspace-details[open] .workspace-details-chevron {
    transform: rotate(90deg);
}

.workspace-details-content {
    padding: 14px 18px 18px;
    border-top: 1px solid var(--shell-border);
}

.workspace-details-content .workspace-job-id {
    margin-top: 0;
}

.workspace-details-content .workspace-meta-form {
    margin-top: 14px;
}

.workspace-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.workspace-header-main {
    flex: 1;
    min-width: 0;
}

.workspace-job-title {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
}

.workspace-job-title-input {
    width: 100%;
    max-width: 900px;
    padding: 10px 14px;
    border: 1px solid var(--brand-cyan-dim);
    border-radius: 10px;
    background: #0b0b0b;
    color: #ffffff;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.1;
}

.workspace-job-title-input:focus {
    outline: none;
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 1px rgba(0, 188, 212, 0.35);
}

.workspace-job-id {
    margin-top: 18px;
}

.workspace-job-id,
.workspace-source {
    color: var(--brand-cyan);
    font-size: 13px;
    line-height: 1.35;
    font-weight: 400;
}

.workspace-source a {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.workspace-source a:hover {
    color: var(--teal-bright);
    text-decoration: underline;
}

.workspace-status-row {
    margin-top: 8px;
    margin-bottom: 0;
}

.workspace-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.workspace-meta-form {
    margin-top: 14px;
}

.workspace-meta-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.workspace-description-field {
    margin-top: 12px;
}

.workspace-meta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.workspace-transcription-controls {
    display: flex;
    align-items: flex-end;
    gap: 18px;

    margin-top: 2px;
    padding-top: 8px;

    border-top: 1px solid var(--shell-border);
}

.workspace-transcription-profile {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.workspace-transcription-profile label {
    color: var(--shell-muted);
    font-size: 12px;
}

.workspace-profile-select {
    min-width: 180px;
    height: 42px;
}

.workspace-transcription-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.field {
    min-width: 0;
}

.pane-header-left {
    flex: 1 1 auto;
}

.pane-header-right {
    flex: 0 0 auto;
}

.workspace-save-msg {
    color: var(--teal);
    font-size: 13px;
}

.workspace-review-frame-wrap {
    overflow: hidden;
}

.workspace-frame {
    display: block;
    width: 100%;
    height: calc(100vh - 340px);
    border: 0;
    background: #ffffff;
}

.field label,
.meta-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--shell-muted);
    font-size: 12px;
}

.field input,
.field textarea,
.meta-field input,
.meta-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #1f1f1f;
    border-radius: 10px;
    background: #0f0f0f;
    color: var(--shell-text);
    font: inherit;
}

.field textarea,
.meta-field textarea {
    min-height: 96px;
    resize: vertical;
}

.subtle {
    color: var(--shell-muted);
    font-size: 13px;
}


/* =========================================
   Portable UI dialog — TotalRecall theme
   ========================================= */

.ui-dialog-shell {
    background:
        var(--panel);

    border-color:
        rgba(0,
            188,
            212,
            0.34);
}


.ui-dialog-header {
    background:
        linear-gradient(180deg,
            #0c0c0c 0%,
            #070707 100%);

    border-bottom-color:
        rgba(0,
            188,
            212,
            0.22);
}


.ui-dialog-title {
    color:
        var(--brand-cyan);

    letter-spacing:
        0.015em;

    text-shadow:
        0 0 12px rgba(0,
            188,
            212,
            0.16);
}


.ui-dialog-close {
    color:
        var(--muted);

    border-color:
        transparent;
}


.ui-dialog-close:hover {
    color:
        var(--teal-bright);

    background:
        var(--brand-cyan-soft);

    border-color:
        rgba(0,
            188,
            212,
            0.24);
}


.ui-dialog-body {
    background:
        var(--panel);
}


.ui-dialog-actions {
    background:
        #080808;

    border-top-color:
        rgba(0,
            188,
            212,
            0.18);
}


.ui-dialog-button {
    color:
        var(--text);

    background:
        var(--panel-2);

    border-color:
        #24474d;
}


.ui-dialog-button:hover:not(:disabled) {
    background:
        var(--panel-3);

    border-color:
        var(--brand-cyan);
}


.ui-dialog-button--primary {
    color:
        #000000;

    background:
        var(--brand-cyan);

    border-color:
        var(--brand-cyan);
}


.ui-dialog-button--primary:hover:not(:disabled) {
    color:
        #000000;

    background:
        var(--teal-bright);

    border-color:
        var(--teal-bright);
}


/* =========================================
   Attachment lightbox workspace
   ========================================= */

.attachment-lightbox-dialog-body {
    min-height:
        0;

    background:
        #000000;
}


.ui-dialog-shell--lightbox {
    background:
        #000000;

    border-color:
        rgba(0,
            188,
            212,
            0.42);

    box-shadow:
        0 30px 100px rgba(0,
            0,
            0,
            0.82),
        0 0 0 1px rgba(0,
            188,
            212,
            0.12),
        0 0 54px rgba(0,
            188,
            212,
            0.09);
}


.attachment-lightbox {
    width:
        100%;

    min-height:
        0;

    display:
        grid;

    grid-template-columns:
        minmax(0,
            1fr) minmax(230px,
            300px);

    background:
        #000000;
}


.attachment-lightbox-stage {
    position:
        relative;

    min-width:
        0;

    min-height:
        420px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        28px;

    overflow:
        auto;

    background:
        radial-gradient(circle at center,
            #111111 0%,
            #060606 52%,
            #000000 100%);
}


.attachment-lightbox-stage::before {
    position:
        absolute;

    inset:
        0;

    content:
        "";

    pointer-events:
        none;

    background:
        linear-gradient(135deg,
            rgba(0,
                188,
                212,
                0.035),
            transparent 38%,
            rgba(155,
                0,
                184,
                0.025));
}


.attachment-lightbox-stage .span-attachment-image {
    position:
        relative;

    z-index:
        1;

    display:
        block;

    width:
        auto;

    height:
        auto;

    max-width:
        100%;

    max-height:
        calc(92vh - 120px);

    object-fit:
        contain;

    background:
        #000000;

    border:
        1px solid rgba(0,
            188,
            212,
            0.24);

    border-radius:
        8px;

    box-shadow:
        0 18px 58px rgba(0,
            0,
            0,
            0.72),
        0 0 24px rgba(0,
            188,
            212,
            0.08);
}


.attachment-lightbox-loading {
    position:
        relative;

    z-index:
        1;

    color:
        var(--muted);

    font-size:
        0.95rem;
}


.attachment-lightbox-error {
    color:
        #ff9c9c;
}


.attachment-lightbox-controls {
    min-width:
        0;

    display:
        flex;

    flex-direction:
        column;

    gap:
        16px;

    padding:
        24px;

    color:
        var(--text);

    background:
        linear-gradient(180deg,
            #0c0c0c 0%,
            #070707 100%);

    border-left:
        1px solid rgba(0,
            188,
            212,
            0.2);

    box-shadow:
        inset 1px 0 0 rgba(255,
            255,
            255,
            0.015);
}


.attachment-lightbox-controls-title {
    padding-bottom:
        12px;

    color:
        var(--brand-cyan);

    border-bottom:
        1px solid rgba(0,
            188,
            212,
            0.18);

    font-size:
        1rem;

    font-weight:
        700;

    letter-spacing:
        0.025em;
}


.attachment-lightbox-status {
    padding:
        10px 12px;

    color:
        var(--muted);

    background:
        rgba(0,
            188,
            212,
            0.055);

    border:
        1px solid rgba(0,
            188,
            212,
            0.12);

    border-radius:
        8px;

    font-size:
        0.82rem;

    line-height:
        1.45;
}


.attachment-lightbox-button-group {
    display:
        flex;

    flex-direction:
        column;

    gap:
        10px;
}


.attachment-lightbox-button {
    min-height:
        42px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        9px 14px;

    color:
        var(--text);

    background:
        #111111;

    border:
        1px solid #24474d;

    border-radius:
        8px;

    font:
        inherit;

    font-weight:
        600;

    text-align:
        center;

    text-decoration:
        none;

    cursor:
        pointer;

    transition:
        color 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}


.attachment-lightbox-button:hover:not(:disabled) {
    color:
        var(--teal-bright);

    background:
        var(--brand-cyan-soft);

    border-color:
        var(--brand-cyan);

    box-shadow:
        0 0 0 1px rgba(0,
            188,
            212,
            0.12);

    transform:
        translateY(-1px);
}


.attachment-lightbox-button:focus-visible {
    outline:
        3px solid var(--ui-dialog-focus);

    outline-offset:
        2px;
}


.attachment-lightbox-button:disabled {
    color:
        #5e6d70;

    background:
        #0c0c0c;

    border-color:
        #1b2e31;

    opacity:
        0.62;

    cursor:
        not-allowed;
}


.attachment-lightbox-button--danger {
    margin-top:
        12px;

    color:
        #ffdada;

    background:
        rgba(165,
            34,
            34,
            0.16);

    border-color:
        rgba(244,
            67,
            54,
            0.52);
}


.attachment-lightbox-button--danger:hover:not(:disabled) {
    color:
        #ffffff;

    background:
        rgba(197,
            43,
            43,
            0.38);

    border-color:
        #ef5350;

    box-shadow:
        0 0 18px rgba(244,
            67,
            54,
            0.12);
}


@media (max-width: 800px) {
    .attachment-lightbox {
        grid-template-columns:
            1fr;

        grid-template-rows:
            minmax(0,
                1fr) auto;
    }


    .attachment-lightbox-stage {
        min-height:
            300px;

        padding:
            16px;
    }


    .attachment-lightbox-controls {
        border-top:
            1px solid rgba(0,
                188,
                212,
                0.2);

        border-left:
            0;
    }


    .attachment-lightbox-button-group {
        display:
            grid;

        grid-template-columns:
            repeat(2,
                minmax(0,
                    1fr));
    }
}

.attachment-lightbox-crop-readout {
    padding:
        10px 12px;

    color:
        var(--brand-cyan);

    background:
        var(--brand-cyan-soft);

    border:
        1px solid rgba(0,
            188,
            212,
            0.22);

    border-radius:
        8px;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    font-size:
        0.78rem;

    line-height:
        1.4;
}


.attachment-lightbox-button--primary {
    color:
        #000000;

    background:
        var(--brand-cyan);

    border-color:
        var(--brand-cyan);
}


.attachment-lightbox-button--primary:hover:not( :disabled) {
    color:
        #000000;

    background:
        var(--teal-bright);

    border-color:
        var(--teal-bright);
}


.attachment-crop-workspace {
    position:
        relative;

    display:
        inline-block;

    max-width:
        100%;

    max-height:
        calc(92vh - 120px);

    line-height:
        0;

    user-select:
        none;

    touch-action:
        none;
}


.attachment-crop-image {
    display:
        block;

    width:
        auto;

    height:
        auto;

    max-width:
        100%;

    max-height:
        calc(92vh - 120px);

    object-fit:
        contain;

    pointer-events:
        none;

    user-select:
        none;
}


.attachment-crop-overlay {
    position:
        absolute;

    inset:
        0;

    z-index:
        2;

    cursor:
        crosshair;

    background:
        rgba(0,
            0,
            0,
            0.48);

    touch-action:
        none;
}


.attachment-crop-selection {
    position:
        absolute;

    z-index:
        3;

    border:
        2px solid var(--teal-bright);

    cursor:
        move;

    box-shadow:
        0 0 0 9999px rgba(0,
            0,
            0,
            0.5),
        0 0 18px rgba(0,
            229,
            255,
            0.34);

    touch-action:
        none;
}


.attachment-crop-handle {
    position:
        absolute;

    width:
        14px;

    height:
        14px;

    background:
        var(--teal-bright);

    border:
        2px solid #000000;

    border-radius:
        3px;

    box-shadow:
        0 0 8px rgba(0,
            229,
            255,
            0.65);
}


.attachment-crop-handle--nw {
    top:
        -8px;

    left:
        -8px;

    cursor:
        nwse-resize;
}


.attachment-crop-handle--ne {
    top:
        -8px;

    right:
        -8px;

    cursor:
        nesw-resize;
}


.attachment-crop-handle--sw {
    bottom:
        -8px;

    left:
        -8px;

    cursor:
        nesw-resize;
}


.attachment-crop-handle--se {
    right:
        -8px;

    bottom:
        -8px;

    cursor:
        nwse-resize;
}

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 1200px) {
    .card-header {
        grid-template-columns: 1fr;
        grid-template-areas:
            "meta"
            "status"
            "actions";
        gap: 8px;
    }

    .card-meta {
        text-align: left;
        white-space: normal;
    }

    .pane-header {
        flex-wrap: wrap;
    }

    .pane-header-right {
        width: 100%;
        justify-content: flex-start;
    }

    .brandbar .brand-center {
        position: static;
        transform: none;
        width: auto;
        margin: 0 auto;
        padding-left: 16px;
    }
}

@media (max-width: 980px) {

    .job-card-header,
    .workspace-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .job-card-status,
    .workspace-actions {
        justify-content: flex-start;
    }

    .workspace-meta-grid,
    .meta-grid {
        grid-template-columns: 1fr;
    }

    .workspace-frame {
        height: 75vh;
    }

    .workspace-title-row {
        align-items: flex-start;
    }

    .workspace-title-save-state {
        min-width: 72px;
    }
}

@media (max-width: 640px) {
    .workspace-title-row {
        flex-direction: column;
        gap: 8px;
    }

    .workspace-title-row .workspace-job-title-input {
        width: 100%;
    }

    .workspace-title-save-state {
        min-width: 0;
        text-align: left;
    }

    .workspace-details-summary {
        padding: 12px 14px;
    }

    .workspace-details-content {
        padding: 14px;
    }

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

    .workspace-transcription-actions {
        justify-content: space-between;
    }

    .workspace-profile-select {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .workspace-details-chevron {
        transition: none;
    }
}

/* --------------------------------------------------------------------------
   Interactive affordances
   -------------------------------------------------------------------------- */

button,
a[href],
[role="button"],
[role="link"],
[data-clickable="true"],
[data-action="open-or-edit-workspace"] {
    cursor: pointer;
}


/* --------------------------------------------------------------------------
   Compiled transcript speaker boundary
   -------------------------------------------------------------------------- */

.compiled-speaker-boundary-button {
    appearance: none;

    margin: 0;
    padding: 1px 4px;

    border-radius: 4px;

    font: inherit;
    font-weight: 700;

    color: var(
        --speaker-identity-color,
        inherit
    );

    cursor: pointer;
}

/* ---------- Header ---------- */
/* -------- Claude Suggestions START --------- */
.speaker-menu {
    --header-full: 42px;
    --header-mini: 24px;   /* tune this — thin band height */
    --header-space: var(--header-full);

    position: relative;
    width: 200px;
    padding: var(--header-space) 8px 8px;

    /* keeps the "Remove Break" sibling below from shifting */
    margin-bottom: calc(var(--header-full) - var(--header-space));

    /* cancels the content-rise caused by shrinking padding-top */
    transform: translateY(calc(var(--header-full) - var(--header-space)));

    transition:
        padding-top 180ms ease,
        margin-bottom 180ms ease,
        transform 180ms ease;

    background: #182131;
    color: #eef4ff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.18);
}

.speaker-menu.is-collapsed {
    --header-space: var(--header-mini);
}

.speaker-menu__header {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 8px;
    height: calc(var(--header-space) - 8px);
    padding: 0 4px 6px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: space-between;

    font-size: 13px;
    transition: height 180ms ease, padding 180ms ease;
}

.speaker-menu.is-collapsed .speaker-menu__header {
    justify-content: flex-end;
    padding-bottom: 0;
}

.speaker-menu.is-collapsed .speaker-menu__header .speaker-menu__title,
.speaker-menu.is-collapsed .speaker-menu__header .speaker-menu__toggle-label {
    display: none;
}

.speaker-menu.is-collapsed .speaker-menu__header .speaker-menu__toggle-dot {
    display: inline;
}

.speaker-menu.is-collapsed .speaker-menu__toggle {
    align-items: flex-start;
    margin-top: -10px; /* tune to taste — increase to push down, decrease/remove to go higher */
}

/* -------- Claude Suggestions END --------- */

.speaker-menu__toggle {
    min-width: 28px;
    height: 28px;
    padding: 0 4px;

    border: 0;
    border-radius: 6px;

    background: transparent;
    color: inherit;
    font: inherit;

    cursor: pointer;
    opacity: 0.65;
}

.speaker-menu__toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--teal-bright);
    opacity: 1;
}

.speaker-menu__toggle-dot {
    display: none;
}

/* ---------- Search ---------- */

.speaker-menu__search {
    box-sizing: border-box;

    width: 100%;
    height: 34px;
    margin-bottom: 6px;
    padding: 0 10px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;

    background: #101827;
    color: inherit;

    font: inherit;
    outline: none;
}

.speaker-menu__search:focus {
    border-color: rgba(130, 175, 255, 0.8);
    box-shadow:
        0 0 0 2px rgba(100, 150, 255, 0.15);
}

/* ---------- Speaker list ---------- */

.speaker-menu__list {
    display: grid;
    gap: 2px;

    max-height: 360px;
    overflow-y: auto;
}

.speaker-row {
    position: relative;

    display: grid;
    grid-template-columns:
        30px minmax(0, 1fr) 30px;
    align-items: center;

    min-height: 34px;
    border-radius: 7px;
}

.speaker-row:hover,
.speaker-row.is-active {
    background: rgba(255, 255, 255, 0.06);
}

.speaker-row.is-active::before {
    content: "▸";

    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(calc(-50% - 1px));

    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.speaker-row button {
    border: 0;
    font-family: inherit;
}

/* ---------- Pin / Delete ---------- */

.speaker-row__pin {
    font-size: 12px;
    line-height: 1;
    padding: 0px 6px 0px 0px;
    transform: translateY(-1px);
}

.speaker-row__delete {
    font-size: 16px;
    line-height: 1;
    padding: 0;
}

.speaker-row__pin,
.speaker-row__delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    background: transparent;
    border-radius: 6px;

    cursor: pointer;
    opacity: 0.55;
}

.speaker-row__pin:hover,
.speaker-row__delete:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--teal-bright);
    opacity: 1;
}

.speaker-row__pin.is-pinned {
    opacity: 1;
}

/* ---------- Speaker name ---------- */

.speaker-row__name {
    display: flex;
    align-items: center;

    min-width: 0;
    height: 34px;
    padding: 0 8px;

}

.speaker-row__name {

    background: transparent;

    color: var(
        --speaker-identity-color,
        inherit
    );

    text-align: left;
    cursor: pointer;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- Add / Rename ---------- */

.speaker-menu__add {
    width: 100%;
    min-height: 34px;
    padding: 0 10px;

    border: 0;
    border-radius: 7px;

    background: rgba(0, 188, 212, 0.18);
    color: inherit;

    font: inherit;
    text-align: left;

    cursor: pointer;
}

.speaker-menu__add:hover {
    background: rgba(0, 188, 212, 0.34);
}

.speaker-row__rename-input {
    box-sizing: border-box;

    grid-column: 2;

    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 6px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;

    background: #101827;
    color: inherit;

    font: inherit;
    outline: none;
}

.speaker-row__rename-input:focus {
    border-color: rgba(130, 175, 255, 0.8);
    box-shadow:
        0 0 0 2px rgba(100, 150, 255, 0.15);
}

/* ---------- Keyboard focus ---------- */

.speaker-menu__toggle:focus-visible,
.speaker-row__pin:focus-visible,
.speaker-row__name:focus-visible,
.speaker-row__delete:focus-visible,
.speaker-menu__add:focus-visible {
    outline: 2px solid #82afff;
    outline-offset: 1px;
}

/*
 * Persisted human uncertainty annotation.
 *
 * Custom Highlight API paints the exact canonical review range
 * without inserting presentation wrappers into transcript text.
 */
::highlight(totalrecall-unclear) {
    background-color:
        rgba(255, 0, 170, 0.30);

    color:
        inherit;

    text-decoration:
        underline;

    text-decoration-color:
        rgba(255, 0, 170, 0.90);

    text-decoration-thickness:
        2px;

    text-underline-offset:
        2px;
}



/* TotalRecall compiled human-Unclear review state */
.compiled-segment.compiled-unclear {
    background: rgba(255, 0, 210, 0.12);

    border:
        1px solid rgba(
            255,
            0,
            210,
            0.72
        );

    border-left:
        4px solid rgb(
            255,
            0,
            210
        );

    border-radius: 7px;

    padding:
        0.12em
        0.28em;

    margin-inline:
        0.08em;

    box-shadow:
        0 0 0 1px
            rgba(
                255,
                0,
                210,
                0.08
            ),
        inset 0 0 12px
            rgba(
                255,
                0,
                210,
                0.055
            );

    /*
     * This is one semantic Unclear span even when normal transcript
     * wrapping divides it across multiple visual lines.
     *
     * "slice" preserves the decoration as fragments of one box.
     * "clone" would draw a complete rounded box around every line
     * fragment, making one span appear to be several separate spans.
     */
    -webkit-box-decoration-break:
        slice;

    box-decoration-break:
        slice;
}


/*
 * Human Unclear is an explicit review disposition.
 * Preserve that visual state even when the same span also carries
 * machine severity or flag styling.
 */
.compiled-segment.compiled-unclear.compiled-flagged,
.compiled-segment.compiled-unclear.compiled-low,
.compiled-segment.compiled-unclear.compiled-medium,
.compiled-segment.compiled-unclear.compiled-high {
    background:
        rgba(
            255,
            0,
            210,
            0.12
        );

    border-color:
        rgba(
            255,
            0,
            210,
            0.72
        );

    border-left-color:
        rgb(
            255,
            0,
            210
        );
}


/* TotalRecall compiled active review-state framing */

/*
 * Current transcript span:
 *
 * Active is navigation/selection state, not review disposition.
 * Use the TotalRecall cyan visual language while preserving normal
 * inline transcript flow across wrapped lines.
 *
 * Explicit human Unclear is excluded here because its semantic
 * magenta state must remain visually authoritative.
 */
.compiled-segment.active:not(.compiled-unclear) {
    outline: none;

    background:
        rgba(
            0,
            188,
            212,
            0.08
        );

    border:
        1px solid rgba(
            0,
            188,
            212,
            0.72
        );

    border-left:
        4px solid var(
            --brand-cyan
        );

    border-radius:
        7px;

    padding:
        0.12em
        0.28em;

    margin-inline:
        0.08em;

    box-shadow:
        0 0 0 1px
            rgba(
                0,
                188,
                212,
                0.16
            ),
        inset 0 0 12px
            rgba(
                0,
                188,
                212,
                0.04
            );

    /*
     * One semantic span may wrap across multiple visual lines.
     * Slice makes the fragments read as one continuous selection
     * rather than several independent cyan pills.
     */
    -webkit-box-decoration-break:
        slice;

    box-decoration-break:
        slice;
}


/*
 * Explicit human Unclear wins over ordinary active selection.
 *
 * Selecting an Unclear span must strengthen its magenta framing,
 * never replace the semantic magenta state with cyan.
 */
.compiled-segment.compiled-unclear.active {
    outline: none;

    background:
        rgba(
            255,
            0,
            210,
            0.14
        );

    border-color:
        var(
            --brand-magenta-border
        );

    border-left-color:
        var(
            --brand-magenta-border
        );

    box-shadow:
        0 0 0 1px
            var(
                --brand-magenta-border
            ),
        inset 0 0 14px
            rgba(
                255,
                0,
                210,
                0.07
            );
}


/*
 * Inline editing affordance.
 *
 * Keep the editable-text boundary subordinate to cyan active-span
 * and magenta Unclear framing.
 */
.compiled-text-run:focus {
    outline:
        1px solid rgba(
            255,
            255,
            255,
            0.10
        );

    outline-offset:
        1px;
}
