/* Skill-it Design-System - matte UI, Orbit-Motiv, Sandstein + Bordeaux
 *
 * Zwei Ansichten, ein Farbklang: "Sandstein" ist der Tag (warmes Beige, dunkle
 * Schrift) und steht in :root, weil er der Normalfall ist. "Abend-Beige" ist
 * dieselbe Familie nach Einbruch der Dunkelheit und haengt an
 * html[data-theme="dark"].
 *
 * Alles, was sich zwischen beiden unterscheidet, steht ausschliesslich in
 * diesen zwei Bloecken. Weiter unten wird nur noch mit Variablen gearbeitet -
 * wer die Farbe der App aendern will, muss nichts anderes anfassen.
 */

:root {
    --bordeaux: #6A1F2A;
    --bordeaux-hover: #7D2733;
    --bordeaux-pressed: #541821;
    /* Warmes Gebrochen-Weiss statt reinem Weiss - auf Bordeaux und in der
       dunklen Ansicht wirkt ein kaltes #FFF wie ein Fremdkoerper. */
    --soft-white: #F7F2E8;
    --success: #2F7F4F;
    --warning: #C89A2B;
    --error: #8A1F2A;
    /* Dieselben Bedeutungen noch einmal als Schriftfarbe. Ein Gruen, das als
       Knopfflaeche richtig ist, ist als Schrift auf dunklem Grund zu dunkel -
       und umgekehrt. Deshalb zwei Werte statt einer Notloesung. */
    --success-text: #175A33;
    --error-text: #8A1F2A;

    --radius: 16px;
    --radius-sm: 10px;

    --font-head: "Inter", "Inter SemiBold", "Segoe UI", system-ui, sans-serif;
    --font-ui: "Nunito", "Segoe UI", system-ui, sans-serif;

    /* ---- Sandstein: die helle Ansicht, zugleich die Vorgabe ---- */
    --bg: radial-gradient(1200px 700px at 15% -10%, #D5C8B0 0%, #C2B49B 45%, #B4A588 100%);
    --panel: rgba(241, 235, 223, 0.92);
    --panel-2: #F5F0E5;
    --line: rgba(74, 56, 34, 0.18);
    --text: #2A231B;
    --text-dim: #574A39;
    --muted: #8D7B62;
    --tile: linear-gradient(160deg, #F5F0E5, #E4DBC8);
    /* Neutrale Schleier fuer Hover, Balken und Sprechblasen: in der hellen
       Ansicht dunkeln sie ab, in der dunklen hellen sie auf. */
    --tint-1: rgba(74, 56, 34, 0.08);
    --tint-2: rgba(74, 56, 34, 0.17);
    --scrim: rgba(43, 32, 18, 0.52);
    --shadow-soft: 0 6px 18px rgba(74, 56, 34, 0.14);
    --shadow-deep: 0 10px 28px rgba(43, 32, 18, 0.22);
}

html[data-theme="dark"] {
    /* ---- Abend-Beige ---- */
    --bg: radial-gradient(1200px 700px at 15% -10%, #3A2F22 0%, #2C2419 45%, #201A11 100%);
    --panel: rgba(58, 49, 37, 0.88);
    --panel-2: rgba(45, 38, 28, 0.94);
    --line: rgba(237, 227, 209, 0.16);
    --text: #EDE3D1;
    --text-dim: #B3A68F;
    --muted: #C0B29A;
    --tile: linear-gradient(160deg, rgba(68, 57, 43, 0.95), rgba(42, 35, 25, 0.95));
    --tint-1: rgba(237, 227, 209, 0.08);
    --tint-2: rgba(237, 227, 209, 0.18);
    --scrim: rgba(18, 14, 8, 0.68);
    --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.28);
    --shadow-deep: 0 10px 28px rgba(0, 0, 0, 0.42);
    /* Bordeaux aufgehellt: der Tagton verschwindet auf dem dunklen Braun fast,
       Knopf und Hintergrund waeren kaum noch zu unterscheiden. */
    --bordeaux: #8E2C3A;
    --bordeaux-hover: #A13748;
    --bordeaux-pressed: #732330;
    --success-text: #6FBE90;
    --error-text: #E8909A;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0; min-height: 100%;
    background: var(--bg); background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
h1 { font-size: 28px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0 0 10px; color: var(--text-dim); line-height: 1.55; }
a { color: inherit; }
small { color: var(--text-dim); }

/* ---------------------------------------------------------------- Layout */
#app { min-height: 100vh; }

.shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 232px; flex: 0 0 232px; padding: 20px 14px;
    background: var(--panel-2); border-right: 1px solid var(--line);
    display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.sidebar .brand b { font-family: var(--font-head); font-size: 18px; letter-spacing: -0.02em; }
.sidebar .brand small { display: block; font-size: 10.5px; color: var(--text-dim); }

.navlink {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm);
    cursor: pointer; color: var(--text-dim); font-weight: 600; font-size: 14px; border: 1px solid transparent;
    transition: background .15s, color .15s;
}
.navlink:hover { background: var(--tint-1); color: var(--text); }
.navlink.active { background: rgba(106, 31, 42, 0.20); color: var(--text); border-color: rgba(106,31,42,.55); }
.navlink .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bordeaux); opacity: 0; }
.navlink.active .dot { opacity: 1; }
.navlink .ico { width: 20px; text-align: center; }

.main { flex: 1; min-width: 0; padding: 22px 26px 90px; max-width: 1180px; }

.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-bottom: 20px; flex-wrap: wrap;
}
.topbar .who { display: flex; align-items: center; gap: 12px; }

/* Hinweisband ueber dem Inhalt - zurzeit nur fuer die noch offene Bestaetigung
   der E-Mail-Adresse. Es soll auffallen und trotzdem niemanden aufhalten:
   deshalb warme Farbe statt Rot, und kein Weg, es wegzuklicken - es geht von
   selbst, sobald bestaetigt ist. */
.banner {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-bottom: 18px; padding: 12px 14px; border-radius: var(--radius);
    border: 1px solid rgba(200, 154, 43, .55); background: rgba(200, 154, 43, .13);
}
.banner .ico { font-size: 18px; color: var(--warning); }
.banner .grow { flex: 1; min-width: 220px; }
.banner .grow b { font-family: var(--font-head); }
.banner .grow small { color: var(--text-dim); }

.avatar {
    width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
    font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--soft-white);
    background: linear-gradient(150deg, #5C4A34, #362A1D); border: 1px solid rgba(247, 242, 232, 0.22);
    box-shadow: var(--shadow-soft); flex: 0 0 auto;
}
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.has-img { background: var(--panel-2); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* Profilbild aendern: Kreis mit kleinem Stift am Rand */
.avatar-edit { position: relative; cursor: pointer; flex: 0 0 auto; border-radius: 50%; }
.avatar-edit .avatar { width: 84px; height: 84px; font-size: 24px; }
.avatar-edit:hover .avatar { border-color: var(--bordeaux-hover); }
.avatar-edit:focus-visible { outline: 2px solid var(--bordeaux-hover); outline-offset: 3px; }
.avatar-badge {
    position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center; font-size: 13px;
    background: var(--bordeaux); color: var(--soft-white); border: 2px solid var(--panel);
}

/* Zuschnitt-Dialog */
.crop-wrap { display: grid; place-items: center; margin: 4px 0 14px; }
.crop-wrap canvas {
    border-radius: var(--radius-sm); background: var(--panel-2);
    touch-action: none; cursor: grab; max-width: 100%;
}
.crop-wrap canvas:active { cursor: grabbing; }
input[type="range"] { padding: 0; background: none; border: none; accent-color: var(--bordeaux); }
.hidden-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.pill {
    display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
    background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-weight: 700;
}
.pill.accent { border-color: rgba(106,31,42,.6); background: rgba(106,31,42,.18); }
.pill.ghost { background: transparent; }

/* ---------------------------------------------------------------- Karten */
.card {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px; box-shadow: var(--shadow-soft); backdrop-filter: blur(6px);
}
.card + .card { margin-top: 14px; }
/* ... aber nicht im Raster: Dort sorgt schon 'gap' fuer den Abstand. Der
   Randabstand wuerde jede Karte ab der zweiten nach unten schieben - und weil
   ein Rasterfeld seine Hoehe abzueglich der Raender fuellt, waere sie zugleich
   um diese 14 Pixel kuerzer als ihre Nachbarin. */
.grid > .card + .card { margin-top: 0; }
.card h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.grid { display: grid; gap: 14px; }
.grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.tile {
    background: var(--tile); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; cursor: pointer; box-shadow: var(--shadow-soft);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s;
    position: relative; overflow: hidden;
}
.tile:hover { transform: translateY(-3px); border-color: rgba(106,31,42,.55); box-shadow: var(--shadow-deep); }
.tile .big { font-family: var(--font-head); font-size: 26px; margin: 6px 0 2px; }
.tile .orbit-deco { position: absolute; right: -22px; bottom: -26px; opacity: .18; pointer-events: none; }

/* ---------------------------------------------------------------- Buttons */
.btn {
    font-family: var(--font-ui); font-weight: 700; font-size: 14px; cursor: pointer;
    border-radius: var(--radius-sm); padding: 10px 16px; border: 1px solid transparent;
    background: var(--bordeaux); color: var(--soft-white); transition: background .15s, transform .1s;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { background: var(--bordeaux-hover); }
.btn:active { background: var(--bordeaux-pressed); transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: transparent; border-color: var(--line); color: var(--text); }
.btn.secondary:hover { background: var(--tint-1); }
.btn.ghost { background: transparent; color: var(--text-dim); border-color: transparent; }
.btn.ghost:hover { color: var(--text); }
.btn.sm { padding: 7px 11px; font-size: 13px; }
.btn.block { width: 100%; justify-content: center; }
.btn.success { background: var(--success); }
.btn.success:hover { filter: brightness(1.08); }

/* ---------------------------------------------------------------- Formulare */
label.field { display: block; margin-bottom: 12px; }
label.field span { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-dim); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .04em; }
input, select, textarea {
    width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); font-family: var(--font-ui);
    font-size: 14.5px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
    outline: none; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--bordeaux-hover); }
textarea { resize: vertical; min-height: 74px; }
select option { color: #2A231B; }
html[data-theme="dark"] select option { background: #2D261C; color: #EDE3D1; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer;
    font-size: 13px; font-weight: 700; color: var(--text-dim); background: transparent; user-select: none;
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.on { background: rgba(106,31,42,.25); border-color: var(--bordeaux); color: var(--text); }

/* ---------------------------------------------------------------- Orbit */
.orbit-logo { display: block; }
.orbit-logo .spin { transform-origin: 32px 32px; animation: orbit-spin 14s linear infinite; }
.orbit-logo .spin-rev { transform-origin: 32px 32px; animation: orbit-spin 22s linear infinite reverse; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }

/* Tausch-Ringe */
.ring-chain { display: flex; flex-direction: column; }
.ring-node {
    display: flex; align-items: center; gap: 10px; padding: 9px 11px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--tint-1);
}
.ring-node.me { border-color: rgba(106, 31, 42, .6); background: rgba(106, 31, 42, .18); }
.ring-conn {
    display: flex; align-items: center; gap: 8px; padding: 6px 0 6px 20px;
    color: var(--text-dim); font-size: 12.5px;
}
.ring-conn .ring-arrow { font-size: 15px; color: var(--bordeaux); }
html[data-theme="dark"] .ring-conn .ring-arrow { color: var(--bordeaux-hover); }
.ring-close { padding: 8px 0 0 20px; font-size: 12px; color: var(--text-dim); }

.score-ring {
    --p: 0; width: 62px; height: 62px; border-radius: 50%; flex: 0 0 auto;
    background: conic-gradient(var(--bordeaux) calc(var(--p) * 1%), var(--tint-2) 0);
    display: grid; place-items: center; position: relative;
}
.score-ring::after {
    content: ""; position: absolute; inset: 6px; border-radius: 50%;
    background: var(--panel-2); border: 1px solid var(--line);
}
.score-ring b { position: relative; z-index: 1; font-family: var(--font-head); font-size: 15px; }
.score-ring.lg { width: 84px; height: 84px; }
.score-ring.lg b { font-size: 19px; }

.bar { height: 7px; border-radius: 999px; background: var(--tint-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--warning), var(--bordeaux)); }

.tag {
    display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800;
    letter-spacing: .03em; border: 1px solid var(--line); color: var(--text-dim);
}
.tag.perfect { background: rgba(47,127,79,.18); border-color: rgba(47,127,79,.55); color: #1E5C37; }
.tag.strong { background: rgba(106,31,42,.16); border-color: rgba(106,31,42,.5); color: #6A1F2A; }
.tag.possible { background: rgba(200,154,43,.18); border-color: rgba(200,154,43,.5); color: #7A5E10; }
html[data-theme="dark"] .tag.perfect { color: #9EE0B8; }
html[data-theme="dark"] .tag.strong { color: #F0B9C1; }
html[data-theme="dark"] .tag.possible { color: #E8CD8A; }

.status { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.status.pending { color: var(--warning); }
.status.accepted { color: var(--muted); }
.status.active { color: #2C7A57; }
html[data-theme="dark"] .status.active { color: #7FD6A1; }
.status.completed { color: var(--success-text); }
.status.declined, .status.cancelled { color: var(--error-text); }

/* ---------------------------------------------------------------- Listen */
.list { display: flex; flex-direction: column; gap: 1px; }
.item {
    display: flex; align-items: center; gap: 12px; padding: 12px 4px;
    border-bottom: 1px solid var(--line);
}
.item:last-child { border-bottom: none; }
.item .grow { flex: 1; min-width: 0; }
.item .grow b { display: block; font-family: var(--font-head); }
.item .grow small { display: block; color: var(--text-dim); }

.empty { text-align: center; padding: 26px 10px; color: var(--text-dim); }
.empty .orbit-logo { margin: 0 auto 10px; opacity: .5; }

/* ---------------------------------------------------------------- Auth + Onboarding */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(440px, 100%); text-align: center; }
.auth-card .orbit-logo { margin: 0 auto 14px; }
.slogan { font-family: var(--font-ui); font-size: 15px; color: var(--muted); margin-bottom: 22px; letter-spacing: .02em; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.auth-tabs .chip { flex: 1; text-align: center; }
.hint { font-size: 12.5px; color: var(--text-dim); margin-top: 14px; }

.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps i { flex: 1; height: 4px; border-radius: 999px; background: var(--tint-2); }
.steps i.on { background: var(--bordeaux); }

/* ---------------------------------------------------------------- Session */
.session { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; align-items: start; }
.wb-wrap { position: relative; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
/* Die Zeichenflaeche bleibt in beiden Ansichten dasselbe helle Papier. Sonst
   saehe ein dunkler Strich beim einen auf Weiss und beim anderen auf Braun aus -
   und beide zeichnen auf demselben Blatt. */
#whiteboard { width: 100%; display: block; touch-action: none; background: #F3EDE1; cursor: crosshair; }
.wb-tools { display: flex; gap: 8px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
/* Der Ring um die gewaehlte Stiftfarbe muss sich von der Leiste abheben -
   ein helles Weiss taete das auf hellem Grund nicht. */
.swatch.on { border-color: var(--text); }

.video-box {
    position: relative; background: #1E1810; border: 1px solid var(--line); border-radius: var(--radius-sm);
    aspect-ratio: 16/10; display: grid; place-items: center; overflow: hidden;
}
.video-box video { width: 100%; height: 100%; object-fit: cover; }
.video-box video.pip {
    position: absolute; right: 8px; bottom: 8px; width: 32%; height: auto; aspect-ratio: 16/10;
    border-radius: 8px; border: 1px solid var(--line); box-shadow: var(--shadow-deep);
    transform: scaleX(-1); object-fit: cover; background: #1E1810;
}
/* Die Videoflaeche ist in beiden Ansichten fast schwarz - der Hinweis darauf
   braucht deshalb seine eigene helle Farbe und nicht die der Umgebung. */
.video-box .ph, .video-box .ph small {
    color: rgba(237, 227, 209, .72); font-size: 12.5px; text-align: center; padding: 14px;
}
.video-box .ph small { padding: 0; }
#rtc-hint { color: var(--text-dim); font-size: 12px; line-height: 1.45; }

.timer { font-family: var(--font-head); font-size: 34px; letter-spacing: .02em; }
.chat { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.msg { padding: 8px 11px; border-radius: 12px; background: var(--tint-1); font-size: 14px; max-width: 88%; }
.msg.me { background: rgba(106,31,42,.28); align-self: flex-end; }
.msg b { display: block; font-size: 11px; color: var(--text-dim); font-family: var(--font-head); }

.task { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.task input { width: auto; }
.task.done span { text-decoration: line-through; color: var(--text-dim); }

/* ---------------------------------------------------------------- Toast + Modal */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 90; }
.toast {
    background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--bordeaux);
    border-radius: var(--radius-sm); padding: 12px 16px; box-shadow: var(--shadow-deep); max-width: 340px;
    font-size: 14px; animation: pop .2s ease;
}
.toast.ok { border-left-color: var(--success); }
.toast.err { border-left-color: var(--error); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

.modal-bg { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { width: min(560px, 100%); max-height: 88vh; overflow-y: auto; }

/* ---------------------------------------------------------------- Mobile */
.mobilenav { display: none; }

/* Das "Mehr"-Blatt faehrt von unten ein: Bereiche, die nicht in die
   Leiste passen, dazu Sprache, Theme und Abmelden. */
.sheet-bg {
    position: fixed; inset: 0; background: var(--scrim); z-index: 100;
    display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
    width: min(560px, 100%); max-height: 82vh; overflow-y: auto;
    background: var(--panel-2); border: 1px solid var(--line); border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow-deep);
    padding: 10px 14px calc(16px + env(safe-area-inset-bottom));
    animation: sheet-up .18s ease;
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } }
.sheet-grip {
    width: 42px; height: 4px; border-radius: 999px; background: var(--line);
    margin: 2px auto 12px;
}
.sheet-sep { border-top: 1px solid var(--line); margin: 10px 0; }
.sheet-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 6px 12px 10px;
}
.sheet .btn.block { margin-top: 10px; }

.topbar .who[data-go] { cursor: pointer; border-radius: var(--radius-sm); padding: 4px 6px; margin: -4px -6px; }
.topbar .who[data-go]:hover { background: var(--tint-1); }
.topbar .who[data-go]:focus-visible { outline: 2px solid var(--bordeaux-hover); outline-offset: 2px; }

@media (max-width: 900px) {
    .sidebar { display: none; }
    .main { padding: 16px 14px 96px; }
    .grid.g3, .grid.g2 { grid-template-columns: 1fr; }
    .session { grid-template-columns: 1fr; }
    .mobilenav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
        background: var(--panel-2); border-top: 1px solid var(--line); padding: 8px 4px 10px;
        justify-content: space-around; backdrop-filter: blur(8px);
    }
    .mobilenav .navlink { flex-direction: column; gap: 3px; font-size: 10.5px; padding: 6px 8px; }
    .mobilenav .navlink .ico { font-size: 17px; }
    .mobilenav .navlink .dot { display: none; }
    .mobilenav .navlink .spacer { display: none; }
}

/* ---------------------------------------------------------------- Dokumente */
.doc-body { line-height: 1.65; }
.doc-body h2 { font-size: 22px; margin: 26px 0 10px; }
.doc-body h3 { font-size: 17px; margin: 22px 0 8px; }
.doc-body h4, .doc-body h5 { font-size: 15px; margin: 18px 0 6px; }
.doc-body h2:first-child, .doc-body h3:first-child { margin-top: 0; }
.doc-body p { color: var(--text); }
.doc-body ul, .doc-body ol { padding-left: 22px; margin: 8px 0 14px; }
.doc-body li { margin-bottom: 5px; }
.doc-body hr { border: none; border-top: 1px solid var(--line); margin: 22px 0; }
.doc-body code {
    background: var(--tint-1); padding: 2px 6px; border-radius: 5px;
    font-size: 13px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}
.doc-body pre {
    background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 12px 14px; overflow-x: auto;
}
.doc-body pre code { background: none; padding: 0; }
.doc-body blockquote {
    border-left: 3px solid var(--bordeaux); padding: 6px 14px; margin: 12px 0;
    background: rgba(106, 31, 42, .10); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.doc-table { overflow-x: auto; margin: 12px 0 18px; }
.doc-body table { border-collapse: collapse; width: 100%; font-size: 14px; }
.doc-body th, .doc-body td {
    border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top;
}
.doc-body th { background: var(--tint-1); font-family: var(--font-head); }
.doc-body a { color: var(--bordeaux); }
html[data-theme="dark"] .doc-body a { color: var(--bordeaux-hover); }
