:root {
    --surface: #ffffff;
    --panel: #f3f6fb;
    --text: #141824;
    --text-muted: #5b6478;
    --outline: #e2e6f0;
    --accent: #2a52f0;
    --accent-ink: #ffffff;
    --link: #2346d6;
    --signal: #0a6b63;
    --danger: #b42318;
    --ok: #0a6b63;
    --sans: "Inter", "Segoe UI", sans-serif;
    --caption: 0.75rem;
    --body: 1rem;
    --title: clamp(1.25rem, 0.6vw + 1rem, 1.6rem);
    --display: clamp(2.15rem, 4vw + 1rem, 4.25rem);
    --measure: 66ch;
    --page: 70rem;
    --gutter: clamp(1rem, 3.2vw, 2.5rem);
    --header: 4.25rem;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --surface: #16181e;
    --panel: #22262f;
    --text: #f3f5f9;
    --text-muted: #aeb6c6;
    --outline: #343a48;
    --accent: #6d8cff;
    --accent-ink: #0c1020;
    --link: #b7c7ff;
    --signal: #5eead4;
    --danger: #ffb4b4;
    --ok: #5eead4;
    color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--surface);
    color: var(--text);
    font-family: var(--sans);
    font-size: var(--body);
    font-weight: 420;
    line-height: 1.6;
    overflow-x: clip;
}

img, svg, video, canvas, iframe { max-width: 100%; height: auto; }

a { color: inherit; }

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

h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.15;
    text-wrap: balance;
}

h1 { font-size: var(--display); letter-spacing: -0.045em; }
h2 { font-size: var(--title); }
h3 { font-size: 1.125rem; letter-spacing: -0.02em; }

.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    background: var(--text);
    color: var(--surface);
    padding: 0.55rem 0.75rem;
    z-index: 20;
}

.skip:focus { top: 0.6rem; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--surface);
    border-bottom: 1px solid var(--outline);
}

.site-header::after {
    content: "";
    display: block;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--signal));
}

.header-bar {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    width: auto;
    max-width: var(--page);
    min-height: var(--header);
    margin: 0 auto;
    padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
}

.mark {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    margin-right: auto;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.mark-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mark-sig {
    display: block;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
}

.site-nav { display: flex; align-items: center; gap: 0.15rem; }

.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.7rem 0.65rem;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--text); }

.site-nav a.is-current {
    color: var(--link);
    border-bottom-color: var(--accent);
}

.header-tools { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }

.nav-toggle,
.theme-toggle,
.text-button,
.button { font: inherit; cursor: pointer; }

.nav-toggle,
.theme-toggle,
.text-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.5rem;
    padding: 0.35rem 0.15rem;
    border: 0;
    background: transparent;
    color: var(--text-muted);
}

.icon {
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
}

.icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }

.theme-toggle:hover,
.text-button:hover,
.nav-toggle:hover { color: var(--text); }

.nav-toggle { display: none; }

.status-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2rem;
    color: var(--text);
    text-decoration: none;
    font-size: var(--caption);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dot {
    width: 0.45rem;
    height: 0.45rem;
    background: var(--signal);
}

.status-quiet .dot { background: var(--text-muted); }
.status-away .dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-muted); }

main {
    width: auto;
    max-width: var(--page);
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3.25rem) var(--gutter) clamp(2.5rem, 6vw, 4.5rem);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(12rem, 0.6fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: end;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--outline);
}

.hero-copy,
.hero-stack,
.band,
.section,
.split,
.room,
.inbox,
.piece,
.prose,
.index-list,
.facts { min-width: 0; }

.eyebrow {
    margin: 0 0 0.85rem;
    color: var(--signal);
    font-size: var(--caption);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lede {
    max-width: var(--measure);
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 1.0625rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.6rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    max-width: 100%;
    min-height: 2.75rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--accent-ink);
    text-decoration: none;
    font-weight: 520;
}

.button:hover { background: transparent; color: var(--accent); }

.button-quiet { background: transparent; color: var(--accent); }
.button-quiet:hover { background: var(--accent); color: var(--accent-ink); }

.hero-stack {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--outline);
}

.hero-stack li {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 1rem;
    align-items: baseline;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--outline);
    font-weight: 520;
}

.hero-stack li span:first-child { color: var(--accent); }

.hero-stack li span:last-child {
    min-width: 0;
    color: var(--text);
    text-align: right;
    text-transform: none;
    letter-spacing: -0.02em;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.hero-stack span,
.num,
.stack {
    color: var(--text-muted);
    font-size: var(--caption);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.num { color: var(--accent); }

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

.facts div { padding: 1.25rem 0; border-bottom: 1px solid var(--outline); }

.facts dt {
    color: var(--text-muted);
    font-size: var(--caption);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.facts dd {
    margin: 0.3rem 0 0;
    font-size: clamp(1.15rem, 2.6vw, 1.35rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
}

.band {
    display: grid;
    grid-template-columns: 1.5fr 0.7fr;
    gap: 2rem;
    margin-top: 2.5rem;
    padding: 1.75rem;
    background: var(--panel);
}

.band p + p,
.room-card p { margin-top: 0.7rem; }

.band-side { align-self: end; }

.section { margin-top: 4rem; }

.section-head,
.page-head { margin-bottom: 1.25rem; }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--outline);
}

.section-head .text-link { margin-left: auto; }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--link);
    font-weight: 520;
    text-underline-offset: 0.2em;
}

.index-list,
.timeline,
.process,
.plain,
.comment-list,
.thread-list,
.letter-list,
.tags,
.marks {
    list-style: none;
    margin: 0;
    padding: 0;
}

.index-list a {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    gap: 0.35rem 1.25rem;
    align-items: baseline;
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--outline);
    color: var(--text);
    text-decoration: none;
}

.index-list a:hover { background: var(--panel); }

.index-list strong {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.index-list em {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-style: normal;
}

.stack { grid-column: 2; text-align: left; white-space: normal; }

.practice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--outline);
}

.practice li {
    padding: 1.25rem 1.25rem 1.25rem 0;
    border-bottom: 1px solid var(--outline);
}

.practice li:nth-child(odd) { padding-right: 2rem; border-right: 1px solid var(--outline); }
.practice li:nth-child(even) { padding-left: 1.5rem; }

.practice span,
.timeline span {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
    font-size: var(--caption);
    font-weight: 600;
    letter-spacing: 0.1em;
}

.practice p,
.note-grid p,
.journal-list p,
.timeline p { margin-top: 0.4rem; color: var(--text-muted); }

.note-grid,
.journal-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid var(--outline);
}

.note-grid article,
.journal-list article {
    padding: 1.35rem 1.5rem 1.35rem 0;
    border-bottom: 1px solid var(--outline);
}

.note-grid article:nth-child(odd),
.journal-list article:nth-child(odd) { padding-right: 2rem; border-right: 1px solid var(--outline); }

.note-grid article:nth-child(even),
.journal-list article:nth-child(even) { padding-left: 1.5rem; }

.note-grid h3 a,
.journal-list h2 a { color: var(--text); text-decoration: none; }

.note-grid h3 a:hover,
.journal-list h2 a:hover { text-decoration: underline; text-underline-offset: 0.15em; }

.journal-list { grid-template-columns: 1fr; }
.journal-list article { padding-left: 0; padding-right: 0; border-right: 0; }
.journal-list h2 { font-size: clamp(1.45rem, 2vw, 1.85rem); }

.close {
    margin-top: 4rem;
    padding: 2rem;
    background: var(--text);
    color: var(--surface);
}

.close h2 { max-width: 20ch; color: inherit; }
.close .button { background: var(--surface); color: var(--text); border-color: var(--surface); }
.close .button:hover { background: transparent; color: var(--surface); }
.close .button-quiet { background: transparent; color: var(--surface); border-color: var(--surface); }
.close .button-quiet:hover { background: var(--surface); color: var(--text); }

.page-head { max-width: 40rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--outline); }
.page-head .button { margin-top: 1.1rem; }

.split {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(15rem, 0.7fr);
    gap: 2.5rem;
    align-items: start;
    margin-top: 2rem;
}

.prose { max-width: var(--measure); font-size: 1.0625rem; }
.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre { margin: 1rem 0; }
.prose ul,
.prose ol { padding-left: 1.15rem; }
.prose li + li { margin-top: 0.35rem; }
.prose blockquote {
    margin-left: 0;
    padding-left: 1rem;
    border-left: 2px solid var(--text);
    color: var(--text-muted);
}
.prose a { font-weight: 520; }
.prose code { font-family: Consolas, "Courier New", monospace; font-size: 0.92em; }
.prose pre {
    overflow: auto;
    padding: 1rem;
    background: var(--panel);
    border: 1px solid var(--outline);
}

.aside-card,
.room-card {
    padding: 1.25rem;
    background: var(--panel);
}

.plain li + li { margin-top: 0.5rem; }
.timeline { margin-top: 0.5rem; }
.timeline li { padding: 1.1rem 0; border-bottom: 1px solid var(--outline); }
.timeline h3 { margin-top: 0.15rem; }

.skill-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.skill-columns h3 { padding-bottom: 0.6rem; border-bottom: 1px solid var(--outline); }
.skill-columns ul { margin: 0.7rem 0 0; padding-left: 1.1rem; }
.skill-columns li + li { margin-top: 0.35rem; }

.marks li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--outline);
}

.marks span { color: var(--text-muted); }

.offer {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: 1rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--outline);
    background: transparent;
}

.process {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.process li { padding-top: 0.85rem; border-top: 1px solid var(--text); }
.process p { margin-top: 0.4rem; color: var(--text-muted); }

.piece { max-width: 42rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.1rem 0 1.4rem; }
.tags li {
    padding: 0.3rem 0.5rem;
    background: var(--panel);
    font-size: var(--caption);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.comments {
    max-width: 42rem;
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--outline);
}

.comment-list li + li {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--outline);
}

.room {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1.75rem;
}

.room-meta { margin: 1.1rem 0; }
.room-meta div + div { margin-top: 0.75rem; }
.room-meta dt {
    color: var(--text-muted);
    font-size: var(--caption);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.room-meta dd { margin: 0.15rem 0 0; }

.room-wait {
    margin: 0 0 0.75rem;
    color: var(--text-muted);
}

.transcript {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    min-height: 14rem;
    max-height: 28rem;
    overflow: auto;
    margin-bottom: 0.9rem;
    padding: 0.85rem;
    background: var(--panel);
    border: 1px solid var(--outline);
}

.line {
    max-width: min(36rem, 88%);
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--outline);
    background: var(--surface);
}
.line-guest { align-self: flex-start; }
.line-owner {
    align-self: flex-end;
    border-color: var(--accent);
}
.line span {
    display: block;
    color: var(--text-muted);
    font-size: var(--caption);
    font-weight: 600;
}
.line p { margin: 0.25rem 0 0; overflow-wrap: anywhere; }
.line .seen { color: var(--signal); font-weight: 600; }

.stack-form,
.composer { display: grid; gap: 0.85rem; }

.composer-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.6rem;
}

.button:disabled { opacity: 0.55; cursor: wait; }

.stack-form label,
.composer label { display: grid; gap: 0.35rem; font-size: var(--caption); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

input,
textarea {
    width: 100%;
    padding: 0.75rem 0.7rem;
    border: 1px solid var(--outline);
    border-radius: 0;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 420;
}

textarea { resize: vertical; }
input:focus,
textarea:focus { outline: 2px solid var(--text); outline-offset: 1px; }

.narrow { max-width: 26rem; }

.choice {
    margin: 0;
    padding: 0 0 0.2rem;
    border: 0;
    border-bottom: 1px solid var(--outline);
    display: grid;
    gap: 0.55rem;
}

.choice legend {
    padding: 0;
    margin-bottom: 0.35rem;
    font-size: var(--caption);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.choice label {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    font-size: 1rem;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 420;
}

.choice input { width: auto; }

.notice {
    padding: 0.75rem 0.85rem;
    background: var(--panel);
    border-left: 2px solid var(--text);
}

.notice-bad { border-left-color: var(--danger); }

.hint, .muted { color: var(--text-muted); }
.hint { font-size: var(--caption); }
.mono { font-family: Consolas, "Courier New", monospace; }

.hp {
    position: absolute;
    left: -9999px;
    height: 1px;
    overflow: hidden;
}

.is-hidden { display: none; }

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

.sheet { width: 100%; border-collapse: collapse; }
.sheet th,
.sheet td {
    text-align: left;
    padding: 0.8rem 0.35rem;
    border-bottom: 1px solid var(--outline);
    vertical-align: top;
}
.sheet th {
    color: var(--text-muted);
    font-size: var(--caption);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.sheet a { font-weight: 600; }

.danger-form { margin-top: 1.5rem; }
.danger-form .text-button { color: var(--danger); }

.inbox {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    align-items: start;
}

.thread-list a,
.letter-list li {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--outline);
    color: var(--text);
    text-decoration: none;
}

.thread-list a { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 0.6rem; }
.thread-list em { grid-column: 1 / -1; color: var(--text-muted); font-style: normal; }
.thread-list a.is-current { background: var(--panel); padding-left: 0.6rem; padding-right: 0.6rem; }

.count,
.nav-count {
    min-width: 1.35rem;
    height: 1.35rem;
    display: inline-grid;
    place-items: center;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: var(--caption);
    font-weight: 600;
}

.nav-count { margin-left: 0.4rem; padding: 0 0.28rem; vertical-align: 1px; }
.nav-count.is-hidden { display: none; }

.letter-list .is-new { border-left: 2px solid var(--text); padding-left: 0.7rem; }
.inbox h2 { margin: 0 0 0.4rem; }

.thread-read {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--panel);
}

.site-footer {
    width: auto;
    max-width: var(--page);
    margin: 0 auto max(1.5rem, env(safe-area-inset-bottom));
    padding: 1.5rem var(--gutter) 0;
    border-top: 1px solid var(--outline);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 1.5rem;
}

.footer-name { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.03em; }
.footer-grid a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}
.footer-grid a:hover { color: var(--link); text-decoration: underline; text-underline-offset: 0.18em; }
.colophon { margin-top: 1.75rem; color: var(--text-muted); font-size: var(--caption); }

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

@media (min-width: 900px) {
    .index-list a { grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 16rem); }
    .index-list .stack { grid-column: auto; text-align: right; }
}

@media (min-width: 1600px) {
    :root { --page: 80rem; }
}

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

@media (max-width: 1120px) {
    .process,
    .skill-columns,
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
    .nav-toggle { display: inline-flex; }
    .header-bar { flex-wrap: wrap; row-gap: 0; }
    .mark { flex: 1 1 0; min-width: 0; }
    .nav-toggle,
    .header-tools { flex: 0 0 auto; }
    .site-nav {
        display: none;
        order: 4;
        flex: 1 0 100%;
        flex-direction: column;
        align-items: stretch;
        margin: 0;
        padding: 0.35rem 0 0.85rem;
        border-top: 1px solid var(--outline);
        background: var(--surface);
    }
    body.nav-open .site-nav { display: flex; }
    .site-nav a {
        border-bottom: 0;
        min-height: 2.75rem;
        padding: 0.7rem 0;
    }
    .site-nav a.is-current { border-bottom: 0; font-weight: 600; color: var(--link); }
}

@media (max-width: 860px) {
    .hero,
    .band,
    .split,
    .room,
    .inbox,
    .footer-grid,
    .offer { grid-template-columns: 1fr; }
    .facts,
    .practice,
    .note-grid { grid-template-columns: 1fr 1fr; }
    .practice li,
    .practice li:nth-child(odd),
    .practice li:nth-child(even),
    .note-grid article,
    .note-grid article:nth-child(odd),
    .note-grid article:nth-child(even) {
        padding-left: 0;
        padding-right: 0.75rem;
        border-right: 0;
    }
    .note-grid article:nth-child(even),
    .practice li:nth-child(even) { padding-right: 0; padding-left: 0.75rem; }
    .close { padding: 1.35rem; }
    .hero-stack li {
        grid-template-columns: 2.5rem max-content;
        justify-content: start;
    }
    .hero-stack li span:last-child { text-align: left; }
}

@media (max-width: 640px) {
    .practice,
    .note-grid,
    .process,
    .skill-columns,
    .footer-grid { grid-template-columns: 1fr; }
    .facts { grid-template-columns: 1fr 1fr; }
    .practice li,
    .practice li:nth-child(even),
    .note-grid article,
    .note-grid article:nth-child(even) { padding-left: 0; padding-right: 0; }
    .marks li { flex-direction: column; align-items: flex-start; }
    .actions { flex-direction: column; align-items: stretch; }
    .button { width: 100%; }
    .band,
    .close { padding: 1.15rem; }
    .sheet thead { display: none; }
    .sheet,
    .sheet tbody,
    .sheet tr,
    .sheet td { display: block; width: 100%; }
    .sheet tr { padding: 0.85rem 0; border-bottom: 1px solid var(--outline); }
    .sheet td { border-bottom: 0; padding: 0.15rem 0; }
    .composer,
    .composer-row { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
    .header-bar { gap: 0.6rem; }
    .header-tools { gap: 0.5rem; }
    .status-pill { letter-spacing: 0.04em; }
    h1 { letter-spacing: -0.03em; }
    .nav-toggle span,
    .theme-toggle span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
}

@media (max-width: 349px) {
    .status-pill span:not(.dot) {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}

.prose pre,
.CodeMirror,
.EasyMDEContainer { max-width: 100%; }
.EasyMDEContainer { margin-top: 0.35rem; }
.editor-toolbar,
.CodeMirror,
.editor-preview {
    border-color: var(--outline) !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    border-radius: 0 !important;
}
