/* Echodu tokens (design system palette; Echodu lesson design v4 type: Outfit for the interface, Lexend for German).
   Theme: <html data-theme="light|dark|system"> (saved on the account); system follows the device. --font-ui is set
   per language in _Head. */
:root {
    --paper: #f6f3ec;
    --paper-raised: #fffdf8;
    --paper-sunken: #ece7dc;
    --line: #ddd6c8;
    --line-strong: #8c8576;
    --ink: #1d2322;
    --ink-muted: #5b625e;
    --petrol: #1f5f63;
    --petrol-soft: #dcebea;
    --on-petrol: #ffffff;
    --marker: #ffd95e;
    --on-marker: #1d2322;
    --mistake: #b0431a;
    --mistake-soft: #fbe4d8;
    --shadow: 0 8px 24px rgba(29, 35, 34, 0.10);
    --logo-wm: #1d2322;
    --logo-du: #1f5f63;
    --font-read: Lexend, "Segoe UI", system-ui, sans-serif;
    --font-mono: Outfit, "Segoe UI", system-ui, sans-serif;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --paper: #151a1a;
    --paper-raised: #1d2323;
    --paper-sunken: #101414;
    --line: #2b3535;
    --line-strong: #6f7b79;
    --ink: #ece8df;
    --ink-muted: #a1a9a5;
    --petrol: #6cc3c4;
    --petrol-soft: #16302f;
    --on-petrol: #0d1a1a;
    --marker: #f2c94c;
    --on-marker: #1a1600;
    --mistake: #ff9466;
    --mistake-soft: #3a1f14;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    --logo-wm: #f6f3ec;
    --logo-du: #ffd95e;
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root[data-theme="system"] {
        --paper: #151a1a;
        --paper-raised: #1d2323;
        --paper-sunken: #101414;
        --line: #2b3535;
        --line-strong: #6f7b79;
        --ink: #ece8df;
        --ink-muted: #a1a9a5;
        --petrol: #6cc3c4;
        --petrol-soft: #16302f;
        --on-petrol: #0d1a1a;
        --marker: #f2c94c;
        --on-marker: #1a1600;
        --mistake: #ff9466;
        --mistake-soft: #3a1f14;
        --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
        --logo-wm: #f6f3ec;
        --logo-du: #ffd95e;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font: 16px/24px var(--font-ui);
}

:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Header */
.top {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.brand-link { display: inline-flex; align-items: center; text-decoration: none; }
.logo { display: block; height: 26px; width: auto; }
.logo .wm { stroke: var(--logo-wm); }
.logo .du { stroke: var(--logo-du); }
.brand-hero { margin: 0 0 24px; }
.brand-hero .logo { height: 44px; }
.top-actions { display: flex; align-items: center; gap: 8px; }

/* Icon button (design: 40 px round) and the theme toggle */
.ib { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.ib:hover { background: var(--paper-sunken); }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.theme-toggle { margin: 0; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root[data-theme="system"] .theme-toggle .sun { display: block; }
    :root[data-theme="system"] .theme-toggle .moon { display: none; }
}


.account { position: relative; }
.account summary { list-style: none; }
.account summary::-webkit-details-marker { display: none; }

.avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--petrol);
    border-radius: 999px;
    background: var(--petrol-soft);
    color: var(--petrol);
    font-weight: 600;
    font-size: 17px;
    cursor: pointer;
}

.menu {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    z-index: 50;
    min-width: 240px;
    padding: 16px;
    display: grid;
    gap: 14px;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.menu .who { margin: 0; font-size: 14px; color: var(--ink-muted); overflow-wrap: anywhere; }
.menu form { margin: 0; }
.menu .btn { width: 100%; }

/* Page column */
main {
    flex: 1;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.welcome {
    margin: 0;
    font: 600 clamp(32px, 7vw, 40px)/1.1 var(--font-ui);
    letter-spacing: -0.02em;
    color: var(--petrol);
}

.hint { margin: 0; color: var(--ink-muted); }

/* Buttons (design system: 44px, radius-md; one primary per screen) */
.btn {
    min-height: 44px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--paper-raised);
    color: var(--ink);
    font: 600 15px/1 var(--font-ui);
    text-decoration: none;
    cursor: pointer;
}

.btn:hover { background: var(--paper-sunken); }
.btn.primary { background: var(--petrol); border-color: var(--petrol); color: var(--on-petrol); }
.btn.primary:hover { filter: brightness(1.08); }

.ghost {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: var(--petrol);
    font-weight: 600;
    text-decoration: none;
}

.linkish {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--petrol);
    font: 600 15px/1 var(--font-ui);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.linkish:disabled { color: var(--ink-muted); text-decoration: none; cursor: default; }

/* Sign-in sheet (prototype artifact:43) */
.sheet {
    width: 100%;
    max-width: 420px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--paper-raised);
    border-radius: 20px;
    text-align: start;
}

.sheet-title { margin: 0; font: 600 26px/32px var(--font-ui); }
.sheet-hint { margin: -8px 0 0; font-size: 15px; color: var(--ink-muted); }

.field { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.field label { font-size: 14px; font-weight: 600; }

.field input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--paper);
    color: var(--ink);
    font: 17px var(--font-ui);
}

.field input[aria-invalid="true"] { border-color: var(--mistake); }
.field input.code { font: 500 28px/1 var(--font-mono); letter-spacing: 0.3em; text-align: center; padding-inline-start: 0.3em; }
.field .btn { min-height: 52px; font-size: 16px; }
.field-note { font-size: 14px; color: var(--ink-muted); }

.err {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--mistake-soft);
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
}

.links { margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }

/* Language choice */
.choices { width: 100%; max-width: 420px; display: grid; gap: 12px; }

.choice {
    width: 100%;
    min-height: 72px;
    padding: 12px 24px;
    display: grid;
    gap: 2px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--paper-raised);
    color: var(--ink);
    text-align: start;
    cursor: pointer;
}

.choice:hover { background: var(--paper-sunken); }
.choice-name { font-size: 20px; line-height: 28px; font-weight: 600; }
.choice-hint { font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* Lesson page (_LessonLayout, Echodu lesson design v12): a 64 px top bar (60 under 860 px high, 56 under 720), the
   player fills the rest without a page scroll; phones and tablets in portrait (≤ 999 px) get the player's own header */
.lesson-shell { height: 100dvh; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 64px minmax(0, 1fr); }
.lesson-top { max-width: none; height: 64px; margin: 0; padding: 0; padding-inline: 40px 28px; justify-content: flex-start; gap: 20px; border-bottom: 1px solid var(--line); }
.lesson-top .sp { flex: 1; }
.lesson-top .bkep { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 -14px 0 -10px; border-radius: 50%; color: var(--ink-muted, #5b625e); flex: none; }
.lesson-top .bkep svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.lesson-top .bkep:hover { background: var(--paper-raised, #fffdf8); color: var(--ink, #1d2322); }
.lesson-top .avatar { width: 36px; height: 36px; border: 0; font-size: 14px; }
main.lesson-main { max-width: none; min-height: 0; margin: 0; padding: 0; display: block; text-align: start; }
.lesson-player { height: 100%; }
.pv { margin: 0; display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.pv button { height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-muted); font: 600 11px/1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
:root[lang="fa"] .pv button { letter-spacing: 0; font-size: 12px; }
.pv button.on { background: var(--ink); color: var(--paper); }
@media (min-width: 1680px) { .lesson-top { padding-inline: 48px 36px; } }
@media (max-width: 1279px) { .lesson-top { padding-inline: 28px 20px; } }
@media (max-height: 859px) { .lesson-shell { grid-template-rows: 60px minmax(0, 1fr); } .lesson-top { height: 60px; } }
@media (max-height: 719px) { .lesson-shell { grid-template-rows: 56px minmax(0, 1fr); } .lesson-top { height: 56px; gap: 14px; } }
@media (max-width: 999px) {
    /* phones and tablets in portrait: the player draws its own header (back · lesson · you) and fills the screen */
    .lesson-shell { grid-template-rows: minmax(0, 1fr); }
    .lesson-top { display: none; }
}

/* Studio (admin): sidebar tree + wide page, read-only; same tokens as the app */
.studio { flex: 1; display: grid; grid-template-columns: 272px minmax(0, 1fr); }

.studio-side {
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow-y: auto;
    padding: 16px 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--paper-sunken);
    border-inline-end: 1px solid var(--line);
}

.studio-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; text-decoration: none; color: var(--ink); }
.studio-brand .logo { height: 22px; }
.studio-tag { font: 600 11px/16px var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
:root[lang="fa"] .studio-tag { letter-spacing: 0; }

.studio-nav { display: flex; flex-direction: column; gap: 4px; }
.studio-section { padding: 8px; border-radius: 6px; color: var(--ink); font-weight: 600; text-decoration: none; }
.studio-section[aria-current="page"] { background: var(--petrol-soft); color: var(--petrol); }

.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree { margin-bottom: 8px; }
.tree ul { padding-inline-start: 12px; }
/* A branch: chevron + link; its children slide open (grid rows 0fr → 1fr) and are out of the tab order while closed */
.tree .row { display: flex; align-items: center; gap: 2px; }
.tree .row > a, .tree .row > .tree-empty { flex: 1; min-width: 0; }
.tw { width: 20px; height: 30px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--ink-muted); cursor: pointer; }
.tw:hover { background: var(--paper); color: var(--ink); }
.tw::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateX(-1px) rotate(-45deg); transition: transform .2s ease; }
:root[dir="rtl"] .tw::before { transform: translateX(1px) rotate(135deg); }
.tree .node.open > .row > .tw::before { transform: translateY(-1px) rotate(45deg); }
.tw-space { width: 20px; flex: none; }
.tree .kids { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .22s ease, visibility 0s linear .22s; }
.tree .kids > ul { min-height: 0; overflow: hidden; }
.tree .node.open > .kids { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .22s ease, visibility 0s; }
.tree .kids a:focus-visible { outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .tree .kids, .tw::before { transition: none; } }
.tree a, .tree-empty, .tree-lesson {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 6px;
    color: var(--ink);
    font-size: 14px;
    line-height: 20px;
    text-decoration: none;
}
.tree a:hover { background: var(--paper); }
.tree a[aria-current="page"] { background: var(--petrol-soft); color: var(--petrol); }
.tree-empty, .tree-lesson { color: var(--ink-muted); }
.tree .count { font: 500 12px/20px var(--font-mono); color: var(--ink-muted); }
.tree a[aria-current="page"] .count { color: var(--petrol); }

main.studio-main {
    display: block;
    max-width: none;
    margin: 0;
    padding: 12px 32px 64px;
    text-align: start;
}
.studio-top { display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-height: 44px; }
.studio-content { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }

.studio-menu, .studio-mobile-brand, .studio-scrim { display: none; }
.studio-sp { flex: 1; }
/* Phones and small tablets: full-width pages; the sidebar is a drawer behind the menu button */
@media (max-width: 900px) {
    .studio { grid-template-columns: minmax(0, 1fr); }
    .studio-side { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 60; width: min(320px, 86vw); height: 100dvh; box-shadow: var(--shadow);
        transform: translateX(-105%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
    :root[dir="rtl"] .studio-side { transform: translateX(105%); }
    .studio[data-nav="open"] .studio-side { transform: none; }
    .studio-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 55; border: 0; padding: 0; background: rgba(16, 20, 20, .5); }
    .studio-menu { display: grid; }
    .studio-mobile-brand { display: inline-flex; align-items: center; }
    .studio-mobile-brand .logo { height: 22px; }
    .studio-top { position: sticky; top: 0; z-index: 40; margin: 0 -16px; padding: 8px 12px; background: var(--paper); border-bottom: 1px solid var(--line); justify-content: flex-start; }
    main.studio-main { padding: 0 16px 48px; }
    .studio-content { padding-top: 12px; }
    .level-title { font-size: 28px; line-height: 32px; }
    .studio-content table { display: block; max-width: 100%; overflow-x: auto; }
    .unit-card > summary { grid-template-columns: 28px minmax(0, 1fr) 12px; }
    .unit-card > summary .unit-meta { display: none; }
    .profile .facts { grid-template-columns: 1fr; gap: 2px 0; }
    .profile .facts dd { margin-bottom: 10px; }
    .au-card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .studio-side { transition: none; } }

.studio .label { margin: 8px 0 0; font: 600 13px/16px var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
:root[lang="fa"] .studio .label { letter-spacing: 0; }
.studio a { color: var(--petrol); }
.studio .tree a, .studio .studio-section, .studio .studio-brand { color: var(--ink); }
.studio .tree a[aria-current="page"], .studio .studio-section[aria-current="page"] { color: var(--petrol); }

/* Level page */
.level-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.level-head .label { margin: 0; color: var(--petrol); }
.level-title { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; font: 600 40px/44px var(--font-ui); letter-spacing: -0.02em; }
.level-title span { font: 400 15px/24px var(--font-ui); letter-spacing: 0; color: var(--ink-muted); }
.level-tools { display: flex; gap: 20px; }
.level-tools .linkish { min-height: 32px; font-size: 14px; }

.unit-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: 20px; }
.unit-card[open] { border-color: var(--petrol); }
.unit-card > summary {
    list-style: none;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto 12px;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    cursor: pointer;
}
.unit-card > summary::-webkit-details-marker { display: none; }
.unit-card > summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 1.75px solid var(--ink-muted);
    border-bottom: 1.75px solid var(--ink-muted);
    transform: rotate(45deg) translateY(-3px);
}
.unit-card[open] > summary::after { transform: rotate(-135deg) translateY(-3px); }
.unit-card > summary::after { transition: transform .2s ease; }
/* Smooth open / close where the browser can animate to auto (Chrome); elsewhere it opens at once */
@supports (interpolate-size: allow-keywords) {
    .unit-card { interpolate-size: allow-keywords; }
    .unit-card::details-content { block-size: 0; overflow: hidden; transition: block-size .25s ease, content-visibility .25s allow-discrete; }
    .unit-card[open]::details-content { block-size: auto; }
}
.unit-no { font: 600 20px/24px var(--font-ui); color: var(--ink-muted); }
.unit-name { min-width: 0; display: flex; flex-direction: column; }
.unit-name b { font: 600 20px/26px var(--font-ui); letter-spacing: -0.01em; }
.unit-name small { font-size: 13px; line-height: 18px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit-meta { font-size: 13px; color: var(--ink-muted); white-space: nowrap; }
.unit-meta.has { color: var(--petrol); }

.unit-body { padding: 0 20px 20px; padding-inline-start: 68px; display: flex; flex-direction: column; gap: 12px; }
.facts { margin: 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px 16px; }
.facts dt { padding-top: 3px; font-size: 13px; color: var(--ink-muted); }
.facts dd { margin: 0; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip { padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 13px; line-height: 20px; color: var(--ink); }
.chip.cando { border-color: var(--petrol); background: var(--petrol-soft); color: var(--petrol); }
.chips .more { font-size: 13px; font-weight: 600; text-decoration: none; }

.studio a.lesson-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); text-decoration: none; }
.studio a.lesson-row:hover { border-color: var(--petrol); }
.lesson-name { min-width: 0; display: flex; flex-direction: column; }
.lesson-name b { font: 600 17px/24px var(--font-ui); color: var(--petrol); }
.lesson-name small { font-size: 13px; color: var(--ink-muted); }

/* Lesson page */
.level-title .lesson-no { font: 600 40px/44px var(--font-ui); color: var(--ink-muted); }
.level-title b { font: inherit; letter-spacing: inherit; color: var(--ink); }
.brief { font-size: 15px; line-height: 24px; }
.brief p { margin: 0 0 10px; }
.script { width: 100%; border-collapse: collapse; }
.script td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: start; }
.script tr:last-child td { border-bottom: 0; }
.script .time { width: 44px; font: 500 13px/24px var(--font-mono); color: var(--ink-muted); }
.script .who { width: 72px; font-size: 13px; line-height: 24px; font-weight: 600; color: var(--ink-muted); }
.script .de { display: block; font: 400 17px/26px var(--font-read); }
.tr { display: block; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.chip .tr { display: inline; }
.chip .count { font: 500 11px/20px var(--font-mono); color: var(--ink-muted); }

@media (max-width: 640px) {
    .unit-card > summary { padding: 12px 16px; gap: 12px; }
    .unit-body { padding: 0 16px 16px; }
    .facts { grid-template-columns: 1fr; gap: 4px; }
    .facts dd { margin-bottom: 8px; }
}

/* Library */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.tiles-wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.studio a.tile { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper-raised); color: var(--ink); text-decoration: none; }
.studio a.tile:hover { border-color: var(--petrol); }
.tile-art { display: grid; place-items: center; aspect-ratio: 4 / 5; margin-bottom: 8px; border-radius: 12px; background: var(--paper-sunken); overflow: hidden; }
.tiles-wide .tile-art { aspect-ratio: 16 / 9; }
.tile-art img { width: 100%; height: 100%; object-fit: contain; }
.tiles-wide .tile-art img { object-fit: cover; }
.tile b { font: 600 18px/24px var(--font-ui); }
.tile small { font-size: 13px; color: var(--ink-muted); }

.profile { display: grid; grid-template-columns: minmax(200px, 320px) minmax(0, 1fr); gap: 24px; align-items: start; }
.profile-wide { grid-template-columns: minmax(0, 1fr); }
.profile-art { display: grid; place-items: center; min-height: 240px; border-radius: 20px; background: var(--paper-sunken); overflow: hidden; }
.profile-art img { width: 100%; max-height: 520px; object-fit: contain; }
.profile .facts dd { font-size: 15px; line-height: 22px; }
@media (max-width: 760px) { .profile { grid-template-columns: 1fr; } }

/* Lists (users, unit words) */
.admin { width: 100%; text-align: start; display: flex; flex-direction: column; gap: 16px; }
.admin .count { color: var(--ink-muted); font-weight: 400; }
.unit-head { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.unit-head .label { margin: 0; }
.unit-title { margin: 0; font: 600 34px/38px var(--font-ui); letter-spacing: -0.02em; }
.plain { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.status { font-size: 14px; color: var(--ink-muted); }
.status-inuse { color: var(--petrol); }
.status-done { color: var(--petrol); font-weight: 600; }
.list { width: 100%; border-collapse: collapse; font-size: 15px; }
.list th, .list td { padding: 10px 8px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.list th { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.list .time { font: 500 13px/20px var(--font-mono); color: var(--ink-muted); white-space: nowrap; }
.list form.inline { margin: 0; }
.list form.inline .btn { min-height: 34px; padding: 0 14px; font-size: 14px; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-muted); }
.state.on::before { background: var(--petrol); }
.state.off { color: var(--mistake); } .state.off::before { background: var(--mistake); }

/* Studio · Audio (ElevenLabs: account, model, voices, finder, Try) */
.au-card { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 20px; }
.au-card h2 { margin: 0; font: 600 20px/26px var(--font-ui); }
.au-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.au-push { margin: 0; margin-inline-start: auto; }
.au-warn { border-color: var(--mistake); color: var(--mistake); }
.au-meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.au-meter i { display: block; height: 100%; border-radius: 999px; background: var(--petrol); }
.au-settings { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 20px; align-items: start; }
.au-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.au-field > span { font-weight: 600; }
.au-field select, .au-field input[type=number], .au-filters input[type=search], .au-filters select, .au-use select, .au-try textarea {
    min-height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); color: var(--ink); font: 15px var(--font-ui);
}
.au-end { justify-content: flex-end; height: 100%; }
.au-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; }
.au-voices { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.au-voice { padding: 12px 0; display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 1.4fr) auto; align-items: center; gap: 8px 16px; border-bottom: 1px solid var(--line); }
.au-voice:last-child { border-bottom: 0; }
.au-found { grid-template-columns: minmax(0, 1fr) auto; }
.au-who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.au-who .chips { gap: 4px; }
.au-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; }
.au-what small { display: block; font-size: 12px; }
.au-acts { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.au-acts .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.au-use { margin: 0; display: flex; align-items: center; gap: 8px; }
.au-tabs { display: flex; gap: 4px; padding: 3px; margin-inline-start: auto; border: 1px solid var(--line); border-radius: 999px; }
.au-tabs a { padding: 6px 14px; border-radius: 999px; color: var(--ink-muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.au-tabs a[aria-current="page"] { background: var(--petrol-soft); color: var(--petrol); }
.au-filters { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.au-filters input[type=search] { flex: 1 1 200px; }
.au-filters .btn { min-height: 40px; }
.au-try { grid-column: 1 / -1; margin-top: 4px; padding: 14px; display: flex; flex-direction: column; gap: 10px; border-radius: 14px; background: var(--paper-sunken); }
.au-try textarea { padding: 10px 12px; min-height: 76px; resize: vertical; font: 16px/24px var(--font-read, var(--font-ui)); }
.au-try-row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 18px; }
.au-range { min-width: 150px; }
.au-range output { font-weight: 400; color: var(--ink-muted); }
.au-try audio { width: 100%; }
.ok-note { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--petrol-soft); color: var(--petrol); }
@media (max-width: 760px) { .au-voice { grid-template-columns: 1fr; } .au-acts { justify-content: flex-start; } }

/* Studio · Audit: the beta's events – accounts, funnel, drop-offs, errors, the timeline per account, the voice replay */
.admit { width: 100%; text-align: start; display: flex; flex-direction: column; gap: 14px; }
.admit .count { color: var(--ink-muted); font-weight: 400; font-size: 15px; }
.admit .sheet-title a { color: inherit; text-decoration: none; }
.audit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.audit-days { display: flex; gap: 6px; }
.audit-days a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; }
.audit-days a[aria-current="page"] { background: var(--petrol); border-color: var(--petrol); color: var(--on-petrol); }
.audit-note { margin: 0; color: var(--ink-muted); font-size: 14px; line-height: 20px; }
.audit-card { border: 1px solid var(--line); border-radius: 16px; background: var(--paper-raised); padding: 0 16px 12px; }
.audit-card > summary { cursor: pointer; padding: 12px 0; font: 600 17px/24px var(--font-ui); list-style: none; }
.audit-card > summary::-webkit-details-marker { display: none; }
.audit-card > summary::before { content: "▸"; display: inline-block; width: 18px; color: var(--ink-muted); transition: transform .15s; }
.audit-card[open] > summary::before { transform: rotate(90deg); }
.audit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.funnel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.funnel li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; line-height: 20px; }
.funnel li:has(.fb) { grid-template-columns: 200px minmax(0, 1fr) 40px; }
.funnel .fl small { display: block; color: var(--ink-muted); font-size: 12px; }
.funnel .fb { height: 10px; border-radius: 5px; background: var(--paper-sunken); overflow: hidden; }
.funnel .fb i { display: block; height: 100%; background: var(--petrol); border-radius: 5px; }
.funnel b { text-align: end; font-variant-numeric: tabular-nums; }
.funnel .empty, .list .empty, .admit > .empty { color: var(--ink-muted); }
.list .small { font-size: 13px; color: var(--ink-muted); max-width: 420px; overflow-wrap: anywhere; }
.list .bad { color: var(--mistake); font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; font: 400 13px/20px var(--font-mono); }
.timeline li { display: grid; grid-template-columns: 70px 44px minmax(160px, 1.2fr) 160px minmax(0, 2fr); gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.timeline .tl-t, .timeline .tl-g { color: var(--ink-muted); }
.timeline .tl-g { text-align: end; }
.timeline .tl-n { font-weight: 600; overflow-wrap: anywhere; }
.timeline .tl-n em { font-style: normal; color: var(--mistake); }
.timeline .tl-w { color: var(--petrol); }
.timeline .tl-d { color: var(--ink-muted); overflow-wrap: anywhere; }
.timeline li.http .tl-n { font-weight: 400; }
.timeline li.good .tl-n { color: var(--ok, #2f7d4f); }
.timeline li.bad .tl-n, .timeline li.bad .tl-d { color: var(--mistake); }
.timeline li.sent .tl-n { color: var(--petrol); }
.replay { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper-raised); }
.rp-text { margin: 0; font: 400 30px/48px Lexend, var(--font-ui); }
.rp-text .w { border-radius: 6px; padding: 0 4px; margin: 0 -1px; transition: background-color .12s, color .12s; }
.rp-text .w.said { color: #2f7d4f; }
.rp-text .w.up { background: #ffd95e; color: #1d2322; }
.rp-text .w.miss { color: #a85f06; background: #fbeed6; }
.rp-bar { display: flex; align-items: center; gap: 12px; }
.rp-bar input[type=range] { flex: 1; }
.rp-rate { font-size: 14px; color: var(--ink-muted); display: flex; gap: 6px; align-items: center; }
.rp-meta { display: grid; grid-template-columns: 120px 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.rp-meta dt { color: var(--ink-muted); } .rp-meta dd { margin: 0; overflow-wrap: anywhere; }
.rp-h { margin: 8px 0 0; font: 600 14px/20px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.rp-marks { margin: 0; padding-left: 18px; font: 400 13px/20px var(--font-mono); color: var(--ink-muted); columns: 2; }
.audit-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.audit-tabs a { padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; text-decoration: none; color: var(--ink-muted); font: 600 14px/20px var(--font-ui); }
.audit-tabs a small { font-weight: 400; margin-inline-start: 4px; }
.audit-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--petrol); }

/* Studio · Journeys: the people on the left, one person's journey on the right (milestones, then the story) */
.jr { width: 100%; text-align: start; display: flex; flex-direction: column; gap: 14px; }
.jr .count { color: var(--ink-muted); font-weight: 400; font-size: 14px; }
.jr .sheet-title a { color: inherit; text-decoration: none; }
.jr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.jr-body { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.jr-list { position: sticky; top: 12px; max-height: calc(100dvh - 24px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.jr-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.jr-filters a { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); font: 600 12px/16px var(--font-ui); color: var(--ink-muted); text-decoration: none; }
.jr-filters a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.jr-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.jr-people .empty { color: var(--ink-muted); font-size: 14px; padding: 8px; }
.jr-person { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; text-decoration: none; color: var(--ink); }
.jr-person:hover { background: var(--paper-sunken); }
.jr-person.on { background: var(--paper-raised); border-color: var(--line); box-shadow: var(--shadow); }
.jp-name { font: 600 14px/18px var(--font-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jp-sub { font: 400 12px/16px var(--font-ui); color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jp-strip { display: flex; gap: 2px; }
.jp-strip i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.jp-strip i.on { background: var(--petrol); }
.jp-meta { font: 500 11px/14px var(--font-ui); color: var(--ink-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.jp-meta em { font-style: normal; color: var(--petrol); }
.jp-meta em.bad { color: var(--mistake); }
.jr-one { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.jo-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper-raised); display: flex; flex-direction: column; gap: 14px; }
.jo-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.jo-head h2 { margin: 0; font: 600 22px/28px var(--font-ui); overflow-wrap: anywhere; }
.jo-sub { margin: 2px 0 0; color: var(--ink-muted); font-size: 14px; }
.jo-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.jo-acts .btn { min-height: 34px; padding: 0 14px; font-size: 14px; text-decoration: none; }
.jo-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 16px; margin: 0; font-size: 14px; }
.jo-facts dt { color: var(--ink-muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.jo-facts dd { margin: 0; }
.jo-facts dd.bad { color: var(--mistake); }
.jo-miles { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 6px; }
.jo-miles li { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; background: var(--paper-sunken); color: var(--ink-muted); font: 500 12px/16px var(--font-ui); }
.jo-miles li i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line-s, #8c8576); }
.jo-miles li.on { color: var(--ink); background: var(--petrol-soft, #dcebea); }
.jo-miles li.on i { background: var(--petrol); border-color: var(--petrol); }
.jo-miles li.next { outline: 2px dashed var(--petrol); outline-offset: 1px; color: var(--petrol); }
.jo-miles li.lesson { font-weight: 700; }
.jo-miles li small { color: var(--ink-muted); font-size: 11px; }
.jo-session { border: 1px solid var(--line); border-radius: 16px; background: var(--paper-raised); padding: 0 16px 10px; }
.jo-session > summary { cursor: pointer; padding: 12px 0; font: 400 15px/22px var(--font-ui); list-style: none; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.jo-session > summary::-webkit-details-marker { display: none; }
.jo-lines { list-style: none; margin: 0; padding: 0; position: relative; }
.jo-lines::before { content: ""; position: absolute; left: 74px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.jo-lines li { display: grid; grid-template-columns: 62px 1fr; gap: 24px; padding: 5px 0; position: relative; }
.jo-lines li::before { content: ""; position: absolute; left: 70px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--line-s, #8c8576); border: 2px solid var(--paper-raised); }
.jo-lines li.good::before { background: var(--ok, #2f7d4f); }
.jo-lines li.bad::before { background: var(--mistake); }
.jo-lines li.step::before { background: var(--petrol); }
.jo-lines li.last::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--mistake) 30%, transparent); }
.jl-t { font: 500 12px/20px var(--font-mono); color: var(--ink-muted); text-align: end; }
.jl > summary { cursor: pointer; list-style: none; font: 400 14px/20px var(--font-ui); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.jl > summary::-webkit-details-marker { display: none; }
.jl-x { font-weight: 600; }
.jo-lines li.good .jl-x { color: var(--ok, #2f7d4f); }
.jo-lines li.bad .jl-x { color: var(--mistake); }
.jl-d { color: var(--ink-muted); }
.jl-clip { font-weight: 600; color: var(--petrol); text-decoration: none; }
.jl-stop { font: 700 11px/16px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--mistake); }
.jl-raw { list-style: none; margin: 6px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--paper-sunken); font: 400 12px/18px var(--font-mono); display: flex; flex-direction: column; gap: 2px; }
.jl-raw .small { color: var(--ink-muted); overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .jr-body { grid-template-columns: 1fr; }
  .jr-list { position: static; max-height: none; }
  .jr-people { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .jr-people li { flex: 0 0 240px; }
  .jo-lines li { grid-template-columns: 54px 1fr; gap: 18px; }
  .jo-lines::before { left: 61px; }
  .jo-lines li::before { left: 57px; }
}
/* Studio · Users: a short list (one line per account) and the chosen account beside it with its switches; phones: a sheet */
.us-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.us-signup { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-muted); }
.us-seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-raised); }
.us-seg button { min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--ink-muted); font: 500 14px/1 var(--font-ui); cursor: pointer; }
.us-seg button[aria-pressed="true"] { background: var(--petrol); color: var(--on-petrol); }
.us-seg button[aria-pressed="false"]:hover { color: var(--ink); }
.us-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.us-search { flex: 1 1 240px; max-width: 360px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--paper-raised); color: var(--ink); font: 400 15px/1 var(--font-ui); }
.us-search:focus-visible { outline: 2px solid var(--petrol); outline-offset: 1px; }
.us-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.us-chip { min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: 500 14px/1 var(--font-ui); cursor: pointer; }
.us-chip:hover { background: var(--paper-sunken); }
.us-chip .count { font: 600 12px/1 var(--font-mono); color: var(--ink-muted); }
.us-chip[aria-pressed="true"] { border-color: var(--petrol); background: var(--petrol-soft); color: var(--petrol); }
.us-chip[aria-pressed="true"] .count { color: var(--petrol); }
.us-chip.alert .count { color: var(--mistake); }

.us-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.us-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.us-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.us-row[hidden] { display: none; }
.us-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.us-pick:hover { background: var(--paper-sunken); }
.us-row.on .us-pick { background: var(--petrol-soft); }
.us-av { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-sunken); color: var(--ink-muted); font: 600 14px/1 var(--font-ui); }
.us-row.on .us-av { background: var(--petrol); color: var(--on-petrol); }
.us-av.big { width: 44px; height: 44px; font-size: 18px; background: var(--petrol); color: var(--on-petrol); }
.us-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.us-email { min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.us-tag { padding: 0 7px; border-radius: 6px; background: var(--paper-sunken); color: var(--ink-muted); font-size: 12px; font-weight: 600; line-height: 20px; white-space: nowrap; }
.us-tag[hidden] { display: none; }
.us-tag.admin { background: var(--petrol-soft); color: var(--petrol); }
.us-tag.wait { background: var(--mistake-soft); color: var(--mistake); }
.us-when { flex: none; font: 500 13px/20px var(--font-mono); color: var(--ink-muted); white-space: nowrap; }
.us-go { margin: 0; flex: none; padding-inline-end: 6px; }
.us-go .btn, .us-set .btn { min-height: 34px; padding: 0 16px; font-size: 14px; }
.us-none { padding: 24px 10px; color: var(--ink-muted); }

.us-panel { position: sticky; top: 12px; max-height: calc(100dvh - 24px); overflow-y: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--paper-raised); }
.us-empty { margin: 0; padding: 40px 24px; text-align: center; color: var(--ink-muted); font-size: 14px; }
.us-card[hidden] { display: none; }
.us-card-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; }
.us-card-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.us-card-who b { font-weight: 600; overflow-wrap: anywhere; }
.us-card-who span { font-size: 13px; color: var(--ink-muted); }
.us-close { display: none; }
.us-facts { margin: 0; padding: 0 18px 14px; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 14px; }
.us-facts dt { color: var(--ink-muted); }
.us-facts dd { margin: 0; text-align: end; font-family: var(--font-mono); font-weight: 500; }
.us-group { border-top: 1px solid var(--line); }
.us-set { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.us-set > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.us-set b { font-weight: 600; font-size: 15px; }
.us-set span { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.us-set .us-since { color: var(--petrol); font-weight: 500; }
.us-set .us-since:empty { display: none; }
.us-set form { margin: 0; flex: none; }
.us-quiet { padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink-muted); font: 500 14px/1 var(--font-ui); cursor: pointer; }
.us-quiet:hover, .us-quiet:focus-visible { background: var(--mistake-soft); color: var(--mistake); }
.us-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; color: var(--petrol); font-weight: 500; font-size: 14px; text-decoration: none; }
.us-link:hover { background: var(--paper-sunken); }

/* A switch: a button with role="switch" in a form that posts its next value */
.sw { position: relative; flex: none; width: 42px; height: 24px; padding: 0; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper-sunken); cursor: pointer; transition: background .15s, border-color .15s; }
.sw::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-muted); transition: inset-inline-start .15s, background .15s; }
.sw[aria-checked="true"] { border-color: var(--petrol); background: var(--petrol); }
.sw[aria-checked="true"]::after { inset-inline-start: 21px; background: var(--on-petrol); }
.sw:disabled { opacity: .6; cursor: progress; }
.sw:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; }

/* Users on narrow screens: the list full width; the chosen account is a sheet from the bottom */
@media (max-width: 1000px) {
    .us-body { grid-template-columns: minmax(0, 1fr); }
    .us-search { max-width: none; }
    .us-panel { position: fixed; inset: auto 0 0 0; top: auto; z-index: 70; max-height: 86dvh; border-radius: 22px 22px 0 0; box-shadow: 0 -16px 48px rgba(0, 0, 0, .25); }
    .us:not(.us-open) .us-panel { display: none; }
    .us-empty { display: none; }
    .us-close { display: grid; }
    .us-when { font-size: 12px; }
}
@media (max-width: 560px) {
    .us-signup-label { display: none; }
    .us-pick { padding-inline: 4px; gap: 10px; }
    .us-who { flex-direction: column; align-items: flex-start; gap: 2px; }
    .us-email { max-width: 100%; }
}

/* Privacy Policy and Contact: plain reading pages */
.doc { width: 100%; text-align: start; }
.doc h1 { margin: 0 0 8px; font-size: 32px; line-height: 40px; font-weight: 700; }
.doc h2 { margin: 32px 0 8px; font-size: 22px; line-height: 30px; font-weight: 600; scroll-margin-top: 16px; }
.doc h3 { margin: 20px 0 4px; font-size: 16px; line-height: 24px; font-weight: 600; }
.doc p, .doc ul { margin: 0 0 12px; }
.doc ul { padding-inline-start: 22px; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--petrol); }
.doc-note { color: var(--ink-muted); font-size: 14px; line-height: 21px; }
.doc-table { overflow-x: auto; margin-bottom: 12px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 21px; }
.doc :is(th, td) { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.doc th { font-weight: 600; }
.doc code { font-family: var(--font-mono); font-weight: 500; white-space: nowrap; }
.doc-contact { text-align: center; }
.doc-mail { display: inline-block; font-size: 22px; line-height: 30px; font-weight: 600; }
