:root {
    --sd-washi: #f2ede2;
    --sd-paper: #f7f3e9;
    --sd-sumi: #171412;
    --sd-muted: #665c50;
    --sd-brass: #9a7b4f;
    --sd-brass-dark: #785d37;
    --sd-rule: #cfc2ad;
    --sd-oxblood: #641c24;
    --sd-serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
    --sd-sans: "Space Grotesk", "Avenir Next", Avenir, sans-serif;
    --sd-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

html, body { margin: 0; min-height: 100vh; background: #f2ede2; background: var(--sd-washi); color: var(--sd-sumi); }
.sd-washi-page, .writing-desk {
    min-height: 100vh;
    background: var(--sd-washi);
    color: var(--sd-sumi);
    font: 400 1rem/1.5 var(--sd-sans);
}
:where(.sd-washi-page, .sd-cmdk-overlay, .writing-desk) *,
:where(.sd-washi-page, .sd-cmdk-overlay, .writing-desk) *::before,
:where(.sd-washi-page, .sd-cmdk-overlay, .writing-desk) *::after { box-sizing: border-box; }
:where(.sd-whisper-bar, .desk-main, .sd-scrubber, .sd-feed-stream, .sd-cmdk-overlay, .sd-auth-sheet)
    :is(button, input, textarea, select, summary) { font: inherit; color: inherit; }
:where(.sd-whisper-bar, .desk-main, .sd-scrubber, .sd-feed-stream, .sd-cmdk-overlay) button {
    background: transparent;
    border: 0;
    cursor: pointer;
}
:where(.sd-washi-page, .writing-desk, .sd-cmdk-overlay) :focus-visible {
    outline: 2px solid var(--sd-brass-dark);
    outline-offset: 3px;
}
:where(.sd-washi-page, .writing-desk) ::selection { background: #ddcaad; color: var(--sd-sumi); }

.sd-whisper-bar, .studio-header {
    position: relative;
    z-index: 8;
    min-height: 64px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 18px;
    padding: 4px clamp(16px, 4.7vw, 82px);
    border-bottom: 1px solid var(--sd-rule);
    background: rgb(242 237 226 / 86%);
    transition: background-color .25s, color .25s, opacity .25s;
}
.sd-whisper-nav, .studio-header nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 clamp(2px, 1.1vw, 20px);
}
.sd-whisper-bar :is(a, button, summary), .studio-header a, .sd-wordmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    color: inherit;
    text-decoration: none;
}
.sd-whisper-nav :is(a, button, summary), .studio-header nav a {
    padding: 0 5px;
    font: 500 .82rem/1.25 var(--sd-sans);
    white-space: nowrap;
}
.sd-whisper-nav :is(a:hover, a[aria-current=page], button:hover, summary:hover), .studio-header nav a:hover {
    text-decoration: underline;
    text-underline-offset: .5em;
    text-decoration-color: var(--sd-brass);
}
.sd-wordmark, .studio-wordmark {
    gap: 10px;
    font: 500 1.5rem/1 var(--sd-serif);
    letter-spacing: -.05em;
    white-space: nowrap;
}
.sd-wordmark-seal {
    display: inline-grid;
    place-items: center;
    width: 31px;
    height: 31px;
    padding-right: 3px;
    border: 1px solid var(--sd-brass);
    border-radius: 50%;
    color: var(--sd-brass-dark);
    font: italic 1.06rem/1 var(--sd-serif);
    letter-spacing: -.14em;
}
.sd-whisper-nav .sd-command-trigger { color: var(--sd-brass-dark); font-family: var(--sd-mono); }
.desk-focus .sd-whisper-bar, .writing-desk[data-playing=true] .sd-whisper-bar {
    color: var(--sd-muted);
    background-color: transparent;
    border-color: transparent;
}

.desk-main {
    --desk-inset: max(5vw, calc((100vw - 72rem) / 2));
    padding: clamp(16px, 3vh, 34px) 0 3rem;
}
.desk-intro, .desk-workbench, .desk-main > .sd-scrubber {
    margin-inline: var(--desk-inset);
}
.desk-intro, .desk-section-heading, .desk-compose-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.desk-intro { margin-bottom: 12px; }
.desk-intro h1, .studio-title h1, .sd-auth-sheet h1 {
    margin: 0;
    font: 400 clamp(2.1rem, 4vw, 3.55rem)/1.1 var(--sd-serif);
    letter-spacing: -.045em;
    text-wrap: balance;
}
.desk-intro button, .desk-section-heading button, .desk-revisions button, .desk-publish {
    min-height: 44px;
    color: var(--sd-brass-dark);
    font: 500 .82rem/1.4 var(--sd-sans);
}
.desk-intro button[aria-pressed=true], .desk-section-heading button:hover, .desk-revisions button:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}
.sd-manuscript-stage {
    position: relative;
    isolation: isolate;
    color: var(--sd-sumi);
    background: transparent;
    border: 0;
    box-shadow: none;
}
.desk-manuscript {
    display: grid;
    align-content: safe center;
    min-height: clamp(195px, 28vh, 280px);
    max-height: 40vh;
    overflow: auto;
    padding-inline: var(--desk-inset);
    scrollbar-width: thin;
    scrollbar-color: var(--sd-rule) transparent;
}
.sd-adaptive-short { --sd-measure: 44ch; }
.sd-adaptive-medium { --sd-measure: 52ch; }
.sd-adaptive-essay { --sd-measure: 62ch; }
.sd-manuscript-stage .ink-paper,
.sd-feed-stream .ink-paper,
.sd-editor .sd-manuscript-stage .ink-paper,
.sd-reading-room .sd-pen-replay .ink-paper {
    min-width: 0;
    width: 100%;
    max-width: min(920px, 100%);
    margin-inline: auto;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.desk-manuscript:is(.sd-adaptive-medium, .sd-adaptive-essay) { align-content: start; }
:is(.sd-oak-margin, .sd-oak-margin__img) {
    position: absolute;
    width: 118px;
    height: auto;
    right: 0;
    bottom: .5rem;
    z-index: 2;
    color: #6f6556;
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: multiply;
    transition: opacity .4s;
}
@media (min-width: 1220px) {
    :is(.sd-oak-margin, .sd-oak-margin__img) { opacity: .22; }
    .desk-manuscript .sd-oak-margin {
        width: clamp(118px, calc((100vw - 62rem) / 2), 220px);
        right: max(1.25rem, calc((100vw - 88rem) / 2));
    }
    :is(.sd-adaptive-essay, [data-long=true]) :is(.sd-oak-margin, .sd-oak-margin__img) { opacity: 0; }
}
.ink-paper:not([data-ink-ready]) canvas { visibility: hidden; }
.ink-paper__transcript {
    position: absolute;
    inset: 1.5rem;
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--sd-sumi);
    font: italic 1.35rem/1.6 var(--sd-serif);
}
.ink-paper[data-ink-ready] .ink-paper__transcript {
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}
.sd-feed-reading {
    width: 100%;
    max-width: var(--sd-measure, 62ch);
    margin: 1.5rem auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: 400 1.15rem/1.65 var(--sd-serif);
}
.sd-adaptive-short :is(.sd-feed-reading, .ink-paper__transcript) {
    align-content: center;
    text-align: center;
    font-size: clamp(1.4rem, 2.45vw, 2.3rem);
    line-height: 1.4;
}
.desk-attribution, .sd-margin-whispers {
    margin: .5rem auto;
    padding-inline: .85rem;
    border-inline-start: 1px solid var(--sd-brass);
    color: var(--sd-muted);
    font: italic .92rem/1.5 var(--sd-serif);
}

.sd-scrubber {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    position: relative;
    padding-block: 6px 8px;
    border-block: 1px solid var(--sd-rule);
    color: var(--sd-brass-dark);
    font: 500 .79rem/1.35 var(--sd-sans);
}
.sd-scrubber :is(button, select) {
    min-width: 38px;
    min-height: 38px;
    padding: 4px 8px;
    color: inherit;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.scrubber-controls, .sd-lens-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}
.sd-lens-tabs [aria-pressed=true], .sd-lens-tabs [aria-selected=true] {
    color: var(--sd-sumi);
    text-decoration: underline;
    text-decoration-color: var(--sd-brass);
    text-underline-offset: .45em;
}
.sd-scrubber input[type=range], .sd-ink-craft input[type=range] {
    width: 100%;
    margin: 0;
    accent-color: var(--sd-brass-dark);
    cursor: pointer;
}
.sd-scrubber input[type=range] {
    appearance: none;
    height: 20px;
    background: linear-gradient(var(--sd-brass), var(--sd-brass)) center / 100% 1px no-repeat;
}
.sd-scrubber input[type=range]::-webkit-slider-thumb {
    appearance: none;
    width: 11px;
    height: 11px;
    border: 1px solid var(--sd-brass-dark);
    border-radius: 50%;
    background: var(--sd-paper);
}
.sd-scrubber input.sd-transition-scrub {
    min-width: 0;
    height: 24px;
    background: linear-gradient(90deg, var(--sd-rule), var(--sd-brass-dark), var(--sd-rule))
        center / 100% 1px no-repeat;
}
.sd-scrubber input.sd-transition-scrub::-webkit-slider-thumb {
    background: var(--sd-brass);
    box-shadow: inset 0 0 0 2px var(--sd-paper);
}
.sd-scrubber input.sd-transition-scrub::-moz-range-thumb {
    width: 9px;
    height: 9px;
    border: 1px solid var(--sd-brass-dark);
    border-radius: 50%;
    background: var(--sd-brass);
    box-shadow: inset 0 0 0 2px var(--sd-paper);
}
.scrubber-ticks { display: flex; align-items: center; justify-content: space-between; overflow-x: auto; }
.scrubber-ticks button { min-width: 20px; min-height: 20px; padding: 0; color: var(--sd-brass); }
.scrubber-ticks button[aria-current=step] { color: var(--sd-sumi); }
.scrubber-caption { margin: 0; color: var(--sd-muted); font-size: .75rem; }
.palimpsest-ribbon { color: var(--sd-sumi); font: 1rem/1.65 var(--sd-serif); overflow-wrap: anywhere; max-height: 8rem; overflow-y: auto; }
.palimpsest-removed, .palimpsest-ribbon del { color: var(--sd-oxblood); text-decoration: line-through; }
.palimpsest-added, .palimpsest-ribbon ins { color: var(--sd-sumi); text-decoration: underline; text-decoration-color: var(--sd-brass); }

.desk-workbench { margin-top: clamp(12px, 2vh, 24px); }
.desk-section-heading { margin-bottom: 4px; }
.desk-section-heading label, .desk-revisions h2 {
    margin: 0;
    font: 400 1.4rem/1.3 var(--sd-serif);
    letter-spacing: -.025em;
}
.desk-compose textarea {
    display: block;
    resize: vertical;
    width: 100%;
    height: clamp(76px, 11vh, 116px);
    min-height: 64px;
    padding: 12px 16px;
    border: 1px solid var(--sd-rule);
    border-radius: 2px;
    background: rgb(250 247 238 / 75%);
    color: var(--sd-sumi);
    font: 1.08rem/1.5 var(--sd-serif);
}
.desk-annotations { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 8px 0; }
.desk-annotations label { display: flex; align-items: baseline; flex: 1; gap: 8px; color: var(--sd-muted); font-size: .78rem; }
.desk-annotations input {
    width: 7rem;
    min-width: 0;
    flex: 1;
    padding: 7px 2px;
    border: 0;
    border-bottom: 1px solid var(--sd-rule);
    border-radius: 0;
    background: transparent;
    font-family: var(--sd-serif);
}
.desk-compose-bottom { justify-content: flex-start; flex-wrap: wrap; }
#desk-save-note { flex: 1; color: var(--sd-muted); margin: 0; font-size: .78rem; }
.desk-compose-bottom .desk-keep, .sd-auth-sheet button[type=submit] {
    background: var(--sd-sumi);
    color: var(--sd-paper);
    min-height: 44px;
    border: 1px solid var(--sd-sumi);
    border-radius: 2px;
    padding: 8px 16px;
    font: 500 .84rem/1.3 var(--sd-sans);
}
.desk-keep kbd { opacity: .78; font: .8rem var(--sd-mono); }
.desk-publish { display: inline-flex; align-items: center; padding-inline: 7px; text-decoration: underline; text-underline-offset: 4px; }
.desk-revisions { margin-top: 16px; border-top: 1px solid var(--sd-rule); padding-top: 12px; }
.desk-revisions:has(h2:only-child) { display: none; }


.sd-ink-craft { position: relative; }
.sd-ink-craft summary { cursor: pointer; list-style: none; gap: 4px; }
.sd-ink-craft summary::-webkit-details-marker { display: none; }
.sd-ink-craft-panel, .sd-command-dialog {
    background: var(--sd-paper);
    border: 1px solid var(--sd-rule);
    color: var(--sd-sumi);
    box-shadow: 0 8px 30px rgb(64 42 16 / 10%);
}
.sd-ink-craft-panel {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 4px);
    z-index: 12;
    width: min(292px, 90vw);
    padding: 16px 20px;
}
.sd-presets { margin: 0 0 12px; padding: 0; border: 0; }
.sd-presets legend { margin-bottom: 4px; font: 1.22rem var(--sd-serif); }
.sd-presets button { padding-inline: 6px; }
.sd-presets [aria-pressed=true] { text-decoration: underline; text-underline-offset: 4px; color: var(--sd-brass-dark); }
.sd-craft-slider { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding-block: 3px; font-size: .82rem; }
.sd-craft-slider span + span { font-family: var(--sd-mono); color: var(--sd-muted); }
.sd-craft-slider input { grid-column: 1 / -1; min-height: 26px; }

.sd-cmdk-overlay:not([open]) { display: none; }
.sd-cmdk-overlay::backdrop { background: transparent; }
.sd-cmdk-overlay {
    position: fixed;
    z-index: 100;
    inset: 0;
    border: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    box-sizing: border-box;
    overflow-y: auto;
    padding: min(12vh, 100px) 16px 24px;
    background: rgb(46 35 22 / 30%);
    font: 1rem/1.45 var(--sd-sans);
}
.sd-command-dialog { width: min(100%, 31rem); margin: 0 auto; padding: 22px 26px; border-radius: 3px; }
.sd-command-dialog header { display: flex; justify-content: space-between; align-items: center; }
.sd-command-dialog h2 { margin: 0; font: 400 1.8rem var(--sd-serif); }
.sd-command-dialog header button { min-height: 44px; color: var(--sd-brass-dark); font-size: .84rem; }
.sd-command-dialog label { display: block; margin: .5rem 0 .25rem; }
.sd-command-dialog input {
    width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--sd-rule);
    background: #fbf8f0; color: var(--sd-sumi); font-size: 1rem;
}
#sd-command-results { list-style: none; margin: 10px 0; padding: 0; }
#sd-command-results button { width: 100%; font: inherit; display: flex; align-items: center; min-height: 44px; padding-inline: 12px; color: inherit; text-decoration: none; }
#sd-command-results li[aria-selected=true] { background: #eae1d1; box-shadow: inset 2px 0 var(--sd-brass-dark); }
.sd-command-hint { margin-bottom: 0; color: var(--sd-muted); font-size: .78rem; }

@media (min-width: 650px) {
    .sd-scrubber { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .sd-scrubber .sd-lens-tabs { justify-self: end; }
    .sd-scrubber > :is(input, .scrubber-ticks, .scrubber-caption, .palimpsest-ribbon) { grid-column: 1 / -1; }
}
.sd-collab-pill {
    display: inline-flex; align-items: center; gap: .4em; width: fit-content; padding: .25rem .7rem;
    border: 1px solid var(--sd-rule); border-radius: 99px; color: var(--sd-oxblood);
    font: 500 .76rem/1.4 var(--sd-sans);
}

@media (max-width: 700px) {
    .sd-whisper-bar { justify-content: center; padding: 4px 14px; }
    .sd-whisper-nav { flex-wrap: wrap; justify-content: center; gap: 0 2px; }
    .sd-whisper-nav :is(a, button, summary) { font-size: .78rem; }
    .sd-wordmark { font-size: 1.28rem; }
    .desk-main { --desk-inset: 18px; padding-top: 10px; }
    .desk-intro { margin-bottom: 6px; }
    .desk-manuscript {
        position: sticky; top: 0; z-index: 5;
        min-height: min(21vh, 168px); max-height: 36vh; padding-inline: 0;
        overscroll-behavior-y: contain;
    }
    .sd-manuscript-stage .ink-paper { min-height: 140px !important; }
    .desk-annotations { flex-direction: column; gap: 2px; }
    .desk-compose-bottom { gap: 8px; }
    #desk-save-note { flex-basis: 100%; }
    .desk-compose textarea { font-size: 16px; }
    .sd-whisper-bar .sd-ink-craft { position: static; }
    .sd-ink-craft-panel { inset-inline: 0; margin-inline: auto; }
    .sd-scrubber :is(button, select) { min-width: 44px; min-height: 44px; }
    .sd-command-dialog { padding: 14px 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .sd-whisper-bar, .sd-oak-margin, .sd-oak-margin__img { transition: none; }
}

/* Chapter marks and page turns stay quiet until the reader needs them. */
.ink-paper__pagination {
    margin-top: .75rem;
    border-top: 1px solid var(--sd-rule);
    padding: .75rem 0 0 !important;
    color: var(--sd-muted);
    font: 500 .78rem/1.4 var(--sd-sans) !important;
    font-variant-numeric: tabular-nums;
}
.ink-paper .ink-paper__pagination > button {
    min-height: 44px;
    padding: 6px 14px;
    border: 1px solid var(--sd-rule);
    border-radius: 999px;
    background: rgb(247 243 233 / 70%);
    color: var(--sd-brass-dark);
    font: 500 .78rem/1.4 var(--sd-sans);
    cursor: pointer;
    transition: background-color .18s, border-color .18s, opacity .18s;
}
.ink-paper__pagination button:hover:not(:disabled) { background: #ebe2d2; border-color: var(--sd-brass); }
.ink-paper__pagination button:disabled { opacity: .42; cursor: default; }
.ink-paper__page-hint { margin: .75rem 0 0; color: var(--sd-muted); font: italic .9rem/1.5 var(--sd-serif); }
.scrubber-ticks.sd-chapter-pills { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 6px 8px; padding-block: 6px 2px; overflow: visible; }
.scrubber-ticks.sd-chapter-pills button {
    min-height: 34px;
    min-width: 0;
    max-width: 15rem;
    overflow: hidden;
    padding: 4px 11px;
    border: 1px solid var(--sd-rule);
    border-radius: 999px;
    color: var(--sd-muted);
    font: 500 .76rem/1.3 var(--sd-sans);
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background-color .2s, border-color .2s, color .2s;
}
.scrubber-ticks.sd-chapter-pills button::before, .scrubber-ticks.sd-chapter-pills button::after { content: none; }
.scrubber-ticks.sd-chapter-pills button:hover { border-color: var(--sd-brass); color: var(--sd-sumi); background: rgb(247 243 233 / 85%); }
.scrubber-ticks.sd-chapter-pills button[aria-current=step] { border-color: var(--sd-brass-dark); background: #ebe2d2; color: var(--sd-sumi); box-shadow: inset 0 -2px var(--sd-brass-dark); }
.scrubber-note { margin: 4px 0 0; color: var(--sd-muted); font: italic .9rem/1.5 var(--sd-serif); grid-column: 1 / -1; }
.desk-keep { display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: box-shadow .25s, border-color .25s, background-color .25s; }
.desk-keep-dot { width: 7px; height: 7px; flex: 0 0 7px; border: 1px solid rgb(247 243 233 / 35%); border-radius: 50%; background: transparent; transition: background-color .25s, border-color .25s, box-shadow .25s; }
.desk-compose-bottom .desk-keep[data-unsaved=true] { border-color: var(--sd-brass); box-shadow: 0 0 0 1px rgb(154 123 79 / 55%), 0 4px 16px rgb(154 123 79 / 26%); }
.desk-keep[data-unsaved=true] .desk-keep-dot { background: #d4a85c; border-color: #ecd099; box-shadow: 0 0 8px rgb(212 168 92 / 85%); }
.desk-focus :is(.sd-whisper-bar, .desk-intro h1, .sd-scrubber, .desk-workbench) { display: none; }
.desk-focus .desk-main { padding-block: clamp(24px, 6vh, 64px); }
.desk-focus .desk-manuscript { position: relative; min-height: 76vh; max-height: none; overflow: visible; }
.desk-focus .desk-focus-toggle { position: fixed; top: 18px; right: 24px; z-index: 20; padding: 6px 14px; border: 1px solid var(--sd-rule); border-radius: 999px; background: rgb(242 237 226 / 88%); color: var(--sd-muted); opacity: .72; transition: opacity .2s, color .2s, border-color .2s; }
.desk-focus .desk-focus-toggle:is(:hover, :focus-visible) { opacity: 1; color: var(--sd-sumi); border-color: var(--sd-brass); }
@media (prefers-reduced-motion: reduce) {
    .ink-paper .ink-paper__pagination > button, .scrubber-ticks.sd-chapter-pills button,
    .desk-keep, .desk-keep-dot, .desk-focus .desk-focus-toggle { transition: none; }
}

/* Revision apparatus: brass index marks on an archival paper ground. */
.sd-adaptive-essay .sd-manuscript-stage,
.sd-manuscript-stage.sd-adaptive-essay {
    width: 100%;
    max-width: min(860px, 100%);
    margin-inline: auto;
}
.sd-feed-stream .sd-adaptive-essay .sd-manuscript-stage .ink-paper,
.sd-adaptive-essay .sd-manuscript-stage .ink-paper,
.sd-manuscript-stage.sd-adaptive-essay .ink-paper { max-width: min(860px, 100%); margin-inline: auto; }
.desk-manuscript.sd-adaptive-essay {
    width: calc(100% - 2 * var(--desk-inset));
    padding-inline: 0;
}
/* Span apparatus across the complete playback grid, immediately above its range. */
.sd-scrubber > :is(.sd-intensity-rail, .sd-posthog-caption, .sd-authorship-wrap, .sd-shimmer-bar) {
    grid-column: 1 / -1;
    min-width: 0;
    max-width: 100%;
}

.sd-intensity-rail {
    display: flex;
    align-items: end;
    gap: 3px;
    width: 100%;
    min-width: 0;
    height: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    margin-block: 8px 3px;
}
.sd-intensity-rail .sd-intensity-bar {
    display: flex;
    align-items: end;
    justify-content: center;
    flex: 1 0 12px;
    min-width: 12px;
    height: 24px;
    min-height: 24px;
    padding: 0 1px;
    border: 0;
    border-bottom: 1px solid var(--sd-rule);
    border-radius: 0;
    background: transparent;
    cursor: pointer;
}
.sd-intensity-fill {
    display: block;
    width: min(100%, 2rem);
    min-height: 2px;
    background: var(--sd-rule);
    border-radius: 1px 1px 0 0;
    transition: background-color .18s;
}
.sd-intensity-bar[data-critical=true] .sd-intensity-fill { background: var(--sd-brass); }
.sd-intensity-bar[data-active=true] .sd-intensity-fill { background: var(--sd-brass-dark); }
.sd-intensity-bar:hover .sd-intensity-fill { background: var(--sd-brass-dark); }
.sd-intensity-bar:focus-visible { outline-offset: 2px; }
.sd-posthog-caption { margin: 4px 0 8px; color: var(--sd-muted); font: italic .82rem/1.5 var(--sd-serif); overflow-wrap: anywhere; }
.sd-authorship-wrap { position: relative; min-width: 0; margin-block: 6px; }
.sd-authorship-wrap .sd-authorship-pill {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    min-height: 44px;
    max-width: 100%;
    padding: 6px 12px;
    border: 1px solid var(--sd-rule);
    border-radius: 999px;
    background: rgb(247 243 233 / 72%);
    color: var(--sd-brass-dark);
    font: 500 .76rem/1.45 var(--sd-sans);
    overflow-wrap: anywhere;
    cursor: pointer;
}
.sd-authorship-pill[aria-expanded=true] { border-color: var(--sd-brass); background: #ebe2d2; }
.sd-authorship-emblem { color: var(--sd-brass); font-size: .72em; }
.sd-authorship-breakdown { box-sizing: border-box; width: min(100%, 30rem); margin-block: .5rem; padding: 8px 14px; border-inline-start: 1px solid var(--sd-brass); background: rgb(247 243 233 / 55%); }
.sd-authorship-breakdown .sd-authorship-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(36px, 80px);
    align-items: center;
    gap: 8px 12px;
    color: var(--sd-muted);
    font: .75rem/1.45 var(--sd-sans);
    width: 100%;
    min-height: 44px;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid var(--sd-rule);
    border-radius: 0;
    background: transparent;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
}
.sd-authorship-breakdown .sd-authorship-row[aria-current=step] { color: var(--sd-sumi); }
.sd-authorship-row > span:first-child { overflow-wrap: anywhere; }
.sd-authorship-delta { color: var(--sd-brass-dark); font-family: var(--sd-mono); font-variant-numeric: tabular-nums; }
.sd-authorship-meter { display: block; height: 3px; overflow: hidden; background: #ded4c3; }
.sd-authorship-meter > i { display: block; max-width: 100%; height: 100%; background: var(--sd-brass-dark); }

.sd-evolution-overview { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.sd-evolution-overview > .sd-authorship-wrap { margin: 0; }
.sd-evolution-overview .sd-authorship-pill { min-height: 30px; padding: 4px 10px; }
.sd-evolution-overview .sd-intensity-rail { flex: 0 1 11rem; width: auto; height: 20px; margin: 0; }
.sd-evolution-overview .sd-intensity-bar { height: 20px; min-height: 20px; }
.sd-evolution-overview .sd-intensity-bar:focus-visible { outline-offset: -2px; }
.sd-evolution-overview .sd-intensity-fill { background: #bd9d6d; }
.sd-evolution-overview [data-critical=true] .sd-intensity-fill { background: var(--sd-brass); }
.sd-evolution-overview :is([data-active=true], .sd-intensity-bar:hover) .sd-intensity-fill { background: var(--sd-sumi); }
.sd-evolution-overview .sd-posthog-caption { flex: 1 1 14rem; margin: 0; font-size: .8rem; line-height: 1.35; }
.sd-evolution-chapters { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 6px; }
.sd-evolution-chapters button {
    max-width: 100%;
    min-height: 30px;
    padding: 3px 10px;
    border: 1px solid var(--sd-rule);
    border-radius: 999px;
    background: transparent;
    color: var(--sd-brass-dark);
    font: 500 .76rem/1.35 var(--sd-sans);
    overflow-wrap: anywhere;
    cursor: pointer;
}
.sd-evolution-chapters button:hover,
.sd-evolution-chapters button[aria-current=step] { border-color: var(--sd-brass); background: #efe3c8; color: var(--sd-sumi); }
.sd-evolution-chapters button[aria-current=step] { box-shadow: inset 0 -2px var(--sd-brass); }

.desk-main > .sd-shimmer-bar { margin-inline: var(--desk-inset); }
.sd-shimmer-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin-block: 8px; color: var(--sd-muted); font: .78rem/1.45 var(--sd-sans); }
:is(.sd-lens-tabs, .sd-essay-lenses) button:is(.sd-shimmer-toggle, .sd-watch-evolution),
button.sd-shimmer-next {
    min-height: 44px;
    max-width: 100%;
    padding: 6px 13px;
    border: 1px solid var(--sd-rule);
    border-radius: 999px;
    background: rgb(247 243 233 / 72%);
    color: var(--sd-brass-dark);
    font: 500 .78rem/1.4 var(--sd-sans);
    text-decoration: none;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: background-color .18s, border-color .18s, color .18s, box-shadow .18s;
}
button.sd-shimmer-replay {
    min-height: 44px;
    max-width: 100%;
    padding: 6px 14px;
    border: 1px solid var(--sd-sumi);
    border-radius: 2px;
    background: var(--sd-sumi);
    color: var(--sd-paper);
    font: 500 .78rem/1.4 var(--sd-sans);
    overflow-wrap: anywhere;
    cursor: pointer;
}
:is(.sd-lens-tabs, .sd-essay-lenses) button:is(.sd-shimmer-toggle, .sd-watch-evolution):hover:not(:disabled),
button.sd-shimmer-next:hover:not(:disabled) {
    background: #ebe2d2;
    border-color: var(--sd-brass);
    color: var(--sd-sumi);
}
:is(.sd-lens-tabs, .sd-essay-lenses) button.sd-shimmer-toggle[aria-pressed=true] {
    padding: 6px 13px;
    border: 1px solid var(--sd-brass-dark);
    border-radius: 999px;
    background: #efe3c8;
    color: var(--sd-sumi);
    box-shadow: 0 0 0 1px rgb(154 123 79 / 35%), 0 0 14px rgb(186 146 76 / 28%);
    text-decoration: none;
}
.sd-shimmer-card {
    position: fixed;
    z-index: 60;
    top: var(--sd-card-top, 16px);
    left: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: min(380px, calc(100vw - 32px));
    max-height: calc(100dvh - var(--sd-card-top, 16px) - 16px);
    padding: 18px 20px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--sd-brass);
    border-radius: 3px;
    background: var(--sd-paper);
    color: var(--sd-sumi);
    box-shadow: 0 12px 42px rgb(46 35 22 / 18%), 0 2px 6px rgb(46 35 22 / 8%);
    font: .86rem/1.5 var(--sd-sans);
    scrollbar-width: thin;
    scrollbar-color: var(--sd-rule) transparent;
}
.sd-shimmer-card *, .sd-shimmer-card *::before, .sd-shimmer-card *::after { box-sizing: border-box; }
.sd-shimmer-card > * { flex-shrink: 0; min-width: 0; }
.sd-shimmer-card-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding-bottom: 10px; border-bottom: 1px solid var(--sd-rule); }
.sd-shimmer-card-header button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--sd-muted); font: inherit; cursor: pointer; }
.sd-shimmer-card-header > span:nth-child(2) { margin-inline-end: auto; color: var(--sd-muted); font: 500 .72rem/1.4 var(--sd-sans); letter-spacing: .05em; }
.sd-shimmer-badge { display: inline-block; padding: 3px 7px; border: 1px solid var(--sd-rule); color: var(--sd-brass-dark); font: 500 .68rem/1.4 var(--sd-mono); letter-spacing: .025em; }
.sd-shimmer-badge[data-edit-kind=rewritten] { border-color: #b8a083; color: var(--sd-oxblood); }
.sd-shimmer-badge[data-edit-kind=moved] { color: #526055; border-color: #a4afa1; }
.sd-shimmer-badge[data-edit-kind=added] { background: #ebe2d2; }
.sd-shimmer-excerpt { margin: 14px 0; padding-inline-start: 12px; border-inline-start: 2px solid var(--sd-brass); white-space: pre-wrap; overflow-wrap: anywhere; font: italic 1.12rem/1.5 var(--sd-serif); }
.sd-shimmer-timeline { flex: 1 1 auto; min-height: 80px; overflow-y: auto; margin: 0; padding: 2px 0 2px 17px; scrollbar-width: thin; }
.sd-shimmer-timeline li { padding: 8px 0 10px 7px; border-inline-start: 1px solid var(--sd-rule); color: var(--sd-muted); }
.sd-shimmer-timeline li::marker { color: var(--sd-brass); }
.sd-shimmer-timeline li[data-current=true] { color: var(--sd-sumi); border-inline-start-color: var(--sd-brass-dark); }
.sd-shimmer-timeline strong { font: 500 .72rem/1.4 var(--sd-mono); }
.sd-shimmer-timeline p { margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 1rem/1.5 var(--sd-serif); }
.sd-shimmer-timeline .sd-shimmer-absent { color: var(--sd-muted); font-style: italic; }
.sd-shimmer-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--sd-rule); }
.sd-shimmer-card-actions .sd-shimmer-replay { background: var(--sd-sumi); color: var(--sd-paper); border-color: var(--sd-sumi); }
.sd-shimmer-card :focus-visible { outline: 2px solid var(--sd-brass-dark); outline-offset: 3px; }
@media (max-width: 700px) {
    .sd-authorship-breakdown .sd-authorship-row { grid-template-columns: minmax(0, 1fr) 48px; }
    .sd-authorship-row .sd-authorship-delta { grid-column: 1; grid-row: 2; overflow-wrap: anywhere; }
    .sd-authorship-row .sd-authorship-meter { grid-column: 2; grid-row: 1 / 3; }
    .sd-intensity-rail { gap: 2px; }
    .sd-evolution-overview .sd-authorship-pill,
    .sd-evolution-chapters button { min-height: 44px; }
    .sd-evolution-overview .sd-intensity-rail { flex: 1 1 6rem; height: 44px; }
    .sd-evolution-overview .sd-intensity-bar { height: 44px; padding-block: 11px; }
    .sd-evolution-overview .sd-posthog-caption { flex-basis: 100%; }
    .sd-shimmer-card { padding: 12px 16px; }
    .sd-shimmer-bar { gap: 4px 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .sd-intensity-fill,
    :is(.sd-lens-tabs, .sd-essay-lenses) button:is(.sd-shimmer-toggle, .sd-watch-evolution),
    button.sd-shimmer-next { transition: none; }
    .sd-shimmer-card, .sd-shimmer-bar { animation: none; scroll-behavior: auto; }
}
