:root {
    --paper: #f6f1e6;
    --paper-edge: #ece5d3;
    --card: #fbf7ec;
    --card-elev: #ffffff;
    --ink: #1a1f2a;
    --ink-soft: #2c3340;
    --muted: #6a6557;
    --muted-2: #918976;
    --rule: #d8cfb6;
    --rule-soft: #e7dfca;
    --accent: #6b1a1f;
    --accent-soft: #f6e3df;
    --accent-ink: #4d1015;
    --good: #2f6b3e;
    --warn: #a3631c;
    --error: #8a1f1f;
    --user-ink: #1a1f2a;
    --user-bg: rgba(26, 31, 42, 0.04);
    --user-rule: rgba(26, 31, 42, 0.18);
    --serif: 'Fraunces', 'Iowan Old Style', 'Hoefler Text', Georgia, serif;
    --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
    --shadow-sm: 0 1px 0 rgba(26, 31, 42, 0.04);
    --shadow-md: 0 8px 30px -18px rgba(26, 31, 42, 0.35);
    --shadow-lg: 0 24px 60px -32px rgba(26, 31, 42, 0.4);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100dvh;
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    background:
        radial-gradient(1200px 600px at 12% -10%, rgba(107, 26, 31, 0.07), transparent 60%),
        radial-gradient(900px 480px at 95% 110%, rgba(47, 107, 62, 0.06), transparent 60%),
        var(--paper);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(26, 31, 42, 0.04) 1px, transparent 1px);
    background-size: 3px 3px;
    opacity: 0.5;
    z-index: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Layout ─────────────────────────────────────────────────── */

#layout {
    position: relative;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 0;
    min-height: 100dvh;
    z-index: 1;
}

#sidebar {
    border-right: 1px solid var(--rule);
    background: linear-gradient(180deg, var(--card) 0%, var(--paper) 100%);
    padding: 28px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow: hidden;
}

.sidebar-head {
    position: relative;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 16px;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: -4px;
    right: -4px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 50%;
    color: var(--ink);
    cursor: pointer;
}

.sidebar-close:hover {
    background: var(--rule-soft);
}

.sidebar-eyebrow {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-block;
    margin-bottom: 6px;
}

.sidebar-title {
    font-family: var(--serif);
    font-variation-settings: 'opsz' 36;
    font-weight: 600;
    font-size: 1.65rem;
    line-height: 1.1;
    margin: 0 0 6px;
    color: var(--ink);
}

.sidebar-sub {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.sektor-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sektor-chip {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.sektor-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.sektor-chip.is-active {
    background: var(--ink);
    color: var(--card-elev);
    border-color: var(--ink);
}

.issue-list {
    overflow-y: auto;
    margin: 0 -8px;
    padding: 4px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-height: 0;
}

.issue-empty {
    color: var(--muted);
    font-style: italic;
    font-size: 0.85rem;
    margin: 6px 4px;
}

.issue-row {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    border-bottom: 1px dashed var(--rule-soft);
    padding: 10px 4px;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    transition: background 0.15s;
}

.issue-row:hover,
.issue-row:focus-visible {
    background: var(--accent-soft);
    outline: none;
}

.issue-row:last-child {
    border-bottom: none;
}

.issue-judul {
    display: block;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.3;
    color: var(--ink);
    margin-bottom: 4px;
}

.issue-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.issue-meta .badge {
    padding: 1px 6px;
    border-radius: 3px;
    background: var(--rule-soft);
    color: var(--ink-soft);
}

.issue-meta .badge.status-in-progress { background: #fae6c8; color: #6c4214; }
.issue-meta .badge.status-monitoring { background: #d8e6db; color: #21472c; }
.issue-meta .badge.status-closed { background: var(--rule); color: var(--ink-soft); }
.issue-meta .badge.urgensi-tinggi,
.issue-meta .badge.urgensi-kritis { background: var(--accent-soft); color: var(--accent-ink); }

.sidebar-foot {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--muted-2);
    padding-top: 8px;
}

.sidebar-foot .dotted-rule {
    display: block;
    border-top: 1px dotted var(--rule);
    margin-bottom: 8px;
}

.sidebar-foot code {
    font-size: 0.66rem;
    background: var(--rule-soft);
    padding: 1px 4px;
    border-radius: 3px;
}

.sidebar-scrim {
    position: fixed;
    inset: 0;
    background: rgba(26, 31, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.2s;
}

.sidebar-scrim.is-visible {
    opacity: 1;
}

/* ── Main column ────────────────────────────────────────────── */

#main {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    min-height: 100dvh;
    max-width: 880px;
    width: 100%;
    margin: 0 auto;
    padding: 0 32px 24px;
}

.masthead {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 0 18px;
    border-bottom: 1px solid var(--rule);
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, var(--paper) 65%, rgba(246, 241, 230, 0));
    z-index: 5;
}

.masthead-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}

.masthead-toggle:hover {
    background: var(--rule-soft);
}

.masthead-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
}

.masthead-mark {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 6px;
    background: var(--card-elev);
    padding: 2px;
    box-shadow: var(--shadow-sm);
}

.masthead-titles {
    min-width: 0;
}

.masthead-kicker {
    display: block;
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
}

.masthead-title {
    font-family: var(--serif);
    font-variation-settings: 'opsz' 72;
    font-weight: 600;
    font-size: 1.55rem;
    line-height: 1.1;
    letter-spacing: -0.005em;
    margin: 0;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.masthead-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    color: var(--muted);
    padding: 6px 12px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--card-elev);
    white-space: nowrap;
    flex-shrink: 0;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted);
    transition: background 0.2s, box-shadow 0.2s;
}

.status-label { color: var(--ink-soft); }

[data-status='connecting'] .status-dot { background: var(--warn); }
[data-status='listening']  .status-dot { background: var(--good); box-shadow: 0 0 0 4px rgba(47, 107, 62, 0.18); animation: dot-pulse 1.6s ease-in-out infinite; }
[data-status='answering']  .status-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(107, 26, 31, 0.15); }
[data-status='error']      .status-dot { background: var(--error); }

@keyframes dot-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

/* ── Transcript ─────────────────────────────────────────────── */

.transcript-region {
    overflow-y: auto;
    padding: 28px 0 32px;
    scrollbar-gutter: stable;
}

.welcome {
    max-width: 640px;
    margin-bottom: 28px;
}

.welcome-eyebrow {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 12px;
}

.welcome-headline {
    font-family: var(--serif);
    font-variation-settings: 'opsz' 84;
    font-weight: 500;
    font-size: clamp(1.6rem, 3.2vw, 2.3rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 14px;
    color: var(--ink);
}

.welcome-lede {
    margin: 0 0 18px;
    color: var(--muted);
    max-width: 60ch;
}

.transcript {
    display: flex;
    flex-direction: column;
    gap: 26px;
    max-width: 720px;
}

.welcome.is-hidden { display: none; }

.turn {
    animation: turn-in 0.32s ease;
}

@keyframes turn-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.turn-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.turn-role {
    font-weight: 500;
}

.turn-rule {
    flex: 1;
    height: 1px;
    background: var(--rule);
}

.turn-user .turn-role { color: var(--muted); }
.turn-assistant .turn-role { color: var(--accent); }

.turn-body {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
}

.turn-user .turn-body {
    padding: 14px 18px;
    background: var(--user-bg);
    border-left: 3px solid var(--user-rule);
    border-radius: 0 6px 6px 0;
    color: var(--ink-soft);
    font-weight: 500;
}

.turn-assistant .turn-body {
    color: var(--ink);
}

.turn-assistant .turn-body p {
    margin: 0 0 0.7em;
}

.turn-assistant .turn-body p:last-child {
    margin-bottom: 0;
}

.turn-assistant .turn-body ul,
.turn-assistant .turn-body ol {
    margin: 0.4em 0 0.8em;
    padding-left: 1.4em;
}

.turn-assistant .turn-body li {
    margin-bottom: 0.4em;
}

.turn-assistant .turn-body li::marker {
    color: var(--accent);
}

.turn-assistant .turn-body strong {
    color: var(--ink);
    font-weight: 600;
}

.turn-assistant .turn-body em {
    color: var(--ink-soft);
}

.turn-assistant .turn-body a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.turn-assistant .turn-body code {
    font-family: var(--mono);
    font-size: 0.88em;
    background: var(--rule-soft);
    padding: 1px 5px;
    border-radius: 3px;
}

.turn-assistant .turn-body blockquote {
    margin: 0.6em 0;
    padding: 0.2em 0 0.2em 14px;
    border-left: 2px solid var(--accent);
    color: var(--ink-soft);
    font-family: var(--serif);
    font-style: italic;
}

/* Citation chips */
.cite {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: var(--mono);
    font-size: 0.78em;
    letter-spacing: 0.02em;
    padding: 0 6px;
    border-radius: 3px;
    margin: 0 1px;
    line-height: 1.5;
    vertical-align: baseline;
    cursor: default;
}

.cite-law {
    background: var(--accent-soft);
    color: var(--accent-ink);
    border: 1px solid rgba(107, 26, 31, 0.15);
}

.cite-issue {
    background: var(--rule-soft);
    color: var(--ink-soft);
    border: 1px solid var(--rule);
    cursor: pointer;
}

.cite-issue:hover {
    background: var(--accent-soft);
    color: var(--accent-ink);
    border-color: rgba(107, 26, 31, 0.25);
}

.cite-issue::before {
    content: '§';
    font-weight: 500;
    color: var(--accent);
    margin-right: 1px;
}

.sumber {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dotted var(--rule);
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sumber-label {
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.7rem;
    color: var(--accent);
    margin-right: 4px;
}

.turn-streaming .turn-body::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 1em;
    margin-left: 2px;
    background: var(--accent);
    vertical-align: -2px;
    animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
    50% { opacity: 0; }
}

/* ── Composer ────────────────────────────────────────────── */

.composer {
    /* Sticky-floats above the page bottom so the composer is always
       reachable when the transcript or page scrolls — no need to scroll
       down to find the input. Sticks to the bottom of the nearest scroll
       container (the page on desktop, the page on mobile). */
    position: sticky;
    bottom: 12px;
    z-index: 10;
    margin-top: 6px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    padding: 14px 14px 12px;
    background: var(--card-elev);
    border: 1px solid var(--rule);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    transition: border-color 0.18s, box-shadow 0.18s;
}

.composer:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(107, 26, 31, 0.08), var(--shadow-md);
}

.composer[data-state='recording'] .composer-input {
    display: none;
}

.composer[data-state='recording'] #mic-toggle {
    display: none;
}

#text-input {
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
    resize: none;
    padding: 8px 6px;
    max-height: 220px;
    overflow-y: auto;
}

#text-input::placeholder {
    color: var(--muted-2);
    font-style: italic;
}

.composer-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Only one trailing button at a time:
   - default (empty input) → Bicara (mic-toggle).
   - input has text       → Kirim (send-btn) replaces it.
   - PTT recording        → Selesai (send-btn in recording skin).
   The .has-text class is toggled by autoGrow() in app.js. */
.composer .send-btn { display: none; }
.composer.has-text .mic-toggle { display: none; }
.composer.has-text .send-btn { display: inline-flex; }
.composer[data-state='recording'] .send-btn { display: inline-flex; }

.mic-toggle,
.send-btn {
    font-family: var(--sans);
    cursor: pointer;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--ink);
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.05s;
}

/* ── Bicara button (idle PTT / VAD mic toggle) ───────────
   Pill-shaped primary affordance: ink fill, white waveform
   glyph + "Bicara" label. Mirrors the Send button geometry so
   they sit side-by-side without competing for hierarchy.
*/
.mic-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--ink);
    color: var(--card-elev);
    border-color: var(--ink);
    font-weight: 500;
    font-size: 0.9rem;
}

.mic-toggle .mic-waveform { flex-shrink: 0; }

.mic-label { letter-spacing: 0.02em; line-height: 1; }

.mic-toggle:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.mic-toggle:active { transform: translateY(1px); }

.mic-toggle:disabled,
.mic-toggle.is-muted {
    cursor: not-allowed;
    opacity: 0.45;
    background: transparent;
    color: var(--muted-2);
    border-color: var(--rule);
}

/* VAD active-recording cue (kept for tenants that opt back to server_vad). */
.mic-toggle[aria-pressed='true'] {
    background: var(--accent);
    color: var(--card-elev);
    border-color: var(--accent);
}

.mic-pulse {
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 2px solid var(--accent);
    opacity: 0;
    pointer-events: none;
}

.mic-toggle.is-recording .mic-pulse {
    opacity: 1;
    animation: mic-pulse 1.6s ease-out infinite;
}

@keyframes mic-pulse {
    0%   { transform: scale(0.98); opacity: 0.7; }
    100% { transform: scale(1.08); opacity: 0; }
}

.send-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 38px;
    border-radius: 10px;
    background: var(--ink);
    color: var(--card-elev);
    border-color: var(--ink);
    font-weight: 500;
    font-size: 0.9rem;
}

.send-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.send-btn:active {
    transform: translateY(1px);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Default: paper-plane glyph visible, stop-square hidden. */
.send-btn .stop-glyph { display: none; }

/* Recording state: paper-plane out, stop-square in, fill turns accent —
   the send button reads as the deliberate "finish" action while a take
   is being recorded. The label text is flipped to "Selesai" in JS. */
.composer[data-state='recording'] .send-btn {
    background: var(--accent);
    border-color: var(--accent);
}

.composer[data-state='recording'] .send-btn:hover {
    background: var(--accent-ink);
    border-color: var(--accent-ink);
}

.composer[data-state='recording'] .send-btn .send-glyph { display: none; }
.composer[data-state='recording'] .send-btn .stop-glyph { display: inline-block; }

.send-label { letter-spacing: 0.02em; }

/* ── Recording bar (PTT mode) ──────────────────────────────
   Editorial recording state — designed as a typesetter's gauge.
   Cancel is a hairline tab; the waveform pans right-to-left across
   a center rule like a printer's recorder; elapsed time uses
   tabular numerals next to a small REC indicator dot. No strobing,
   no instrument-panel cues — measured, document-like motion.
*/

.recording-bar {
    display: none;
    align-items: stretch;
    gap: 10px;
    padding: 0;
}

.composer[data-state='recording'] .recording-bar {
    display: flex;
}

.ptt-cancel {
    flex-shrink: 0;
    width: 34px;
    height: 38px;
    border-radius: 4px;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    position: relative;
}

/* Hairline corner mark — like a deletion stamp on an editorial proof. */
.ptt-cancel::before {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 6px;
    height: 6px;
    border-top: 1px solid var(--rule);
    border-right: 1px solid var(--rule);
    transition: border-color 0.18s ease;
}

.ptt-cancel:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.ptt-cancel:hover::before {
    border-color: var(--accent);
}

.ptt-cancel:focus-visible {
    outline: 1px dotted var(--accent);
    outline-offset: 2px;
}

.waveform {
    flex: 1 1 auto;
    height: 38px;
    width: 100%;
    border-radius: 3px;
    background-color: var(--paper);
    /* The typesetter's rule: a hairline through the vertical center
       of the waveform area. Drawn purely in CSS so the canvas paint
       loop only handles the bars themselves. */
    background-image: linear-gradient(
        to bottom,
        transparent calc(50% - 0.5px),
        var(--rule) calc(50% - 0.5px),
        var(--rule) calc(50% + 0.5px),
        transparent calc(50% + 0.5px)
    );
    box-shadow: inset 0 0 0 1px var(--rule-soft);
    display: block;
}

.rec-elapsed {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-feature-settings: 'tnum' 1;
    font-variant-numeric: tabular-nums;
    font-size: 0.78rem;
    color: var(--ink-soft);
    min-width: 5.4em;
    letter-spacing: 0.06em;
    justify-content: flex-end;
}

/* The REC indicator: a small filled dot, slowly pulsing — evokes the
   amber lamp on a tape recorder rather than a blinking notification. */
.rec-elapsed::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(107, 26, 31, 0.0);
    animation: rec-pulse 1.8s ease-in-out infinite;
}

@keyframes rec-pulse {
    0%, 100% { opacity: 0.35; box-shadow: 0 0 0 0 rgba(107, 26, 31, 0); }
    50%      { opacity: 1;    box-shadow: 0 0 0 3px rgba(107, 26, 31, 0.12); }
}

.footnote {
    margin: 10px 4px 0;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--muted-2);
    line-height: 1.5;
}

.footnote kbd {
    font-family: var(--mono);
    font-size: 0.7rem;
    background: var(--rule-soft);
    border: 1px solid var(--rule);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 0 4px;
    color: var(--ink-soft);
}

/* ── Scrollbars ─────────────────────────────────────────── */

.transcript-region::-webkit-scrollbar,
.issue-list::-webkit-scrollbar,
#text-input::-webkit-scrollbar {
    width: 8px;
}

.transcript-region::-webkit-scrollbar-thumb,
.issue-list::-webkit-scrollbar-thumb,
#text-input::-webkit-scrollbar-thumb {
    background: var(--rule);
    border-radius: 4px;
}

.transcript-region::-webkit-scrollbar-thumb:hover,
.issue-list::-webkit-scrollbar-thumb:hover {
    background: var(--muted-2);
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 880px) {
    #layout { grid-template-columns: 1fr; }

    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(86vw, 320px);
        height: 100dvh;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: var(--shadow-lg);
    }

    #sidebar.is-open {
        transform: translateX(0);
    }

    .masthead-toggle {
        display: inline-flex;
    }

    .sidebar-close {
        display: inline-flex;
    }

    #main {
        padding: 0 20px 18px;
    }
}

@media (max-width: 560px) {
    body { font-size: 14px; }

    .masthead { gap: 10px; padding: 18px 0 14px; }
    .masthead-kicker { display: none; }
    .masthead-mark { width: 36px; height: 36px; }
    .masthead-title { font-size: 1.1rem; }
    .masthead-status { padding: 4px 10px; font-size: 0.7rem; }

    /* Kirim / Selesai collapse to icon-only on phones for layout density.
       Bicara keeps its label — it's the primary CTA on an otherwise empty
       composer, where icon-only would look unlabeled and unclear. */
    .send-label { display: none; }
    .send-btn { padding: 0 12px; }

    .welcome-headline { font-size: 1.55rem; }
    .turn-assistant .turn-body { font-size: 0.96rem; }

    .composer { padding: 12px 10px 10px; border-radius: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
