@layer reset, app, prose, responsive;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  :root {
    color-scheme: light;
    --bg: #fdfcfa;
    --sidebar: #f5f4f0;
    --surface: #fff;
    --soft: #f2f1ed;
    --line: #e7e5df;
    --text: #302f2b;
    --heading: #242520;
    --muted: #64695d;
    --subtle: #6c7065;
    --accent: #a2472c;
    --accent-soft: #efe1d8;
    --code-bg: #f3f3ef;
    --green: #5a8868;
    --shadow: 0 12px 40px #24252010;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  }
  :root[data-theme='dark'] {
    color-scheme: dark;
    --bg: #1c1e1c;
    --sidebar: #181a18;
    --surface: #232623;
    --soft: #292c28;
    --line: #32362f;
    --text: #c9cec3;
    --heading: #eef0e7;
    --muted: #9ba292;
    --subtle: #838b7b;
    --accent: #eda485;
    --accent-soft: #3b2d25;
    --code-bg: #242824;
    --green: #91b89b;
    --shadow: 0 12px 40px #0003;
  }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
  }
  button,
  input {
    font: inherit;
  }
  button,
  a,
  input {
    -webkit-tap-highlight-color: transparent;
  }
  button {
    color: inherit;
    cursor: pointer;
  }
  button {
    background: none;
    border: 0;
  }
  button:disabled {
    opacity: 0.4;
    cursor: default;
  }
  a {
    color: inherit;
  }
  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
  }
  button:focus-visible {
    outline-offset: -2px;
  }
  [hidden] {
    display: none !important;
  }
  ::selection {
    background: var(--accent-soft);
    color: var(--heading);
  }
  svg {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
  }
  kbd {
    font-family: inherit;
  }
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
  }
}

@layer app {
  .app-shell {
    display: flex;
    height: 100dvh;
    overflow: hidden;
  }
  .sidebar {
    width: 278px;
    flex-shrink: 0;
    background: var(--sidebar);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    z-index: 20;
  }
  .brand-row {
    padding: 30px 25px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .brand {
    display: inline-flex;
    align-items: center;
    color: var(--heading);
    text-decoration: none;
    font-size: 23px;
    font-weight: 720;
    letter-spacing: -1.1px;
  }
  .brand-symbol {
    background: var(--accent);
    color: var(--bg);
    border-radius: 8px;
    width: 33px;
    height: 31px;
    font-size: 23px;
    line-height: 26px;
    margin-right: 10px;
    padding-left: 5px;
    letter-spacing: -3px;
    font-weight: 750;
  }
  .brand-symbol > span {
    font-size: 23px;
    font-weight: 500;
    position: relative;
    top: 1px;
  }
  .brand-dot {
    color: var(--accent);
  }
  .sidebar-intro {
    color: var(--muted);
    font-size: 11px;
    padding: 13px 25px 28px;
    letter-spacing: 0.03px;
  }
  .search-box {
    display: flex;
    gap: 9px;
    align-items: center;
    margin: 0 18px 27px;
    border: 1px solid var(--line);
    border-radius: 7px;
    height: 38px;
    padding: 0 11px;
    background: var(--bg);
    color: var(--muted);
  }
  .search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
  }
  .search-box svg {
    width: 15px;
    height: 15px;
  }
  .search-box input {
    width: 100%;
    min-width: 0;
    background: transparent;
    border: 0;
    color: var(--text);
    outline: 0;
    font-size: 12px;
  }
  .search-box input::placeholder {
    color: var(--muted);
    opacity: 1;
  }
  .search-box kbd {
    white-space: nowrap;
    font-size: 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 2px 4px;
  }
  .eyebrow {
    font-size: 10px;
    letter-spacing: 1.6px;
    font-weight: 650;
    color: var(--muted);
  }
  .tree-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 19px 10px 26px;
  }
  .tree-toolbar > div {
    display: flex;
    gap: 2px;
  }
  .icon-button {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .icon-button:hover:not(:disabled),
  .icon-button[aria-pressed='true'] {
    background: var(--soft);
    color: var(--heading);
  }
  .tree-toolbar .icon-button {
    width: 24px;
    height: 24px;
  }
  .tree-toolbar svg {
    width: 14px;
    height: 14px;
  }
  .file-tree {
    flex: 1;
    min-height: 80px;
    overflow: auto;
    padding: 0 12px 24px;
  }
  .file-tree ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .tree-row {
    --depth: 0;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 9px 10px 9px calc(10px + var(--depth) * 17px);
    gap: 9px;
    font-size: 12px;
    text-decoration: none;
    border-radius: 5px;
    min-height: 35px;
    text-align: left;
    margin: 2px 0;
    color: var(--muted);
  }
  .tree-row:hover {
    background: var(--soft);
    color: var(--heading);
  }
  .tree-row > .file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tree-row svg {
    width: 15px;
    height: 15px;
  }
  .tree-row .chevron {
    width: 10px;
    height: 10px;
    transition: transform 0.15s;
  }
  .tree-row[aria-expanded='true'] .chevron {
    transform: rotate(90deg);
  }
  .tree-row.directory {
    color: var(--text);
  }
  .tree-row.root {
    font-weight: 650;
    margin-bottom: 5px;
  }
  .tree-row.file {
    padding-left: calc(29px + var(--depth) * 17px);
  }
  .tree-row[aria-current='page'] {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 550;
  }
  .tree-row[aria-current='page']::after {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    margin-left: auto;
    flex-shrink: 0;
  }
  .file-extension {
    color: var(--subtle);
    font-size: 9px;
    margin-left: auto;
    letter-spacing: 0.5px;
  }
  .tree-row[aria-current='page'] .file-extension {
    display: none;
  }
  .tree-message {
    color: var(--muted);
    padding: 10px 13px;
    font-size: 12px;
    line-height: 1.7;
  }
  .sidebar-bottom {
    margin-top: auto;
    padding: 0 20px;
  }
  .workspace-note {
    padding: 16px 0 21px;
    display: flex;
    gap: 11px;
    align-items: center;
  }
  .workspace-icon {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    place-items: center;
    height: 34px;
    width: 34px;
    color: var(--muted);
  }
  .workspace-note > div {
    min-width: 0;
  }
  .workspace-note strong,
  .workspace-note div > span {
    display: block;
  }
  .workspace-note strong {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 155px;
  }
  .workspace-note div > span {
    font-size: 10px;
    color: var(--muted);
  }
  .local-dot {
    background: var(--green);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    margin-left: auto;
  }
  .appearance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line);
    padding: 17px 0;
    color: var(--muted);
    font-size: 11px;
  }
  .theme-control {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 3px;
    gap: 2px;
  }
  .theme-control button {
    border-radius: 4px;
    padding: 5px 7px;
    color: var(--muted);
  }
  .theme-control svg {
    width: 13px;
    height: 13px;
  }
  .theme-control button[aria-pressed='true'] {
    background: var(--surface);
    color: var(--heading);
    box-shadow: 0 1px 4px #00000012;
  }
  .sidebar-footnote {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--subtle);
    font-size: 10px;
    padding: 0 0 21px;
  }
  .tiny-mark {
    font-size: 13px;
    letter-spacing: -1.5px;
  }
  .main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 66px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 30px;
    gap: 15px;
  }
  .breadcrumb-row {
    display: flex;
    gap: 10px;
    align-items: center;
    overflow: hidden;
  }
  .breadcrumbs {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--muted);
    min-width: 0;
  }
  .breadcrumbs svg {
    width: 14px;
    height: 14px;
  }
  .breadcrumbs .crumb {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
  }
  .breadcrumbs .current {
    color: var(--text);
  }
  .breadcrumbs .slash {
    color: var(--subtle);
  }
  .topbar-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
  }
  .connection-status {
    font-size: 10px;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 10px;
  }
  .connection-status > span {
    height: 5px;
    width: 5px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 9%, transparent);
  }
  .connection-status.offline {
    color: var(--accent);
  }
  .action-divider {
    height: 17px;
    border-left: 1px solid var(--line);
    margin-right: 5px;
  }
  .topbar-actions svg {
    width: 16px;
    height: 16px;
  }
  .reading-progress {
    height: 2px;
    flex-shrink: 0;
  }
  .reading-progress > div {
    height: 2px;
    width: 0;
    background: var(--accent);
    opacity: 0.65;
  }
  .reader-scroll {
    flex: 1;
    overflow: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
  }
  .reader-layout {
    display: grid;
    grid-template-columns: minmax(0, 710px) 160px;
    justify-content: center;
    gap: clamp(30px, 4.5vw, 76px);
    padding: 48px clamp(32px, 4.5vw, 78px) 0;
    margin: 0 auto;
    max-width: 1230px;
  }
  .document-column {
    min-width: 0;
  }
  .document-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 25px;
  }
  .document-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--accent);
    font-weight: 650;
  }
  .document-label svg {
    height: 13px;
    width: 13px;
  }
  .reading-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--muted);
  }
  .reading-meta svg {
    height: 12px;
    width: 12px;
  }
  .meta-dot {
    margin: 0 3px;
  }
  .outline {
    position: sticky;
    top: 41px;
    align-self: start;
    margin-top: 5px;
    font-size: 11px;
    max-height: calc(100dvh - 165px);
    overflow: auto;
  }
  .outline-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    margin-bottom: 20px;
  }
  .outline-heading svg {
    width: 13px;
    height: 13px;
  }
  .outline-heading .eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
  }
  .outline nav {
    border-left: 1px solid var(--line);
  }
  .outline a {
    display: block;
    padding: 8px 0 8px 14px;
    color: var(--muted);
    border-left: 1px solid transparent;
    margin-left: -1px;
    text-decoration: none;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .outline a.nested {
    padding-left: 24px;
    font-size: 10px;
  }
  .outline a:hover,
  .outline a.active {
    color: var(--accent);
  }
  .outline a.active {
    border-color: var(--accent);
  }
  .outline-note {
    border-top: 1px solid var(--line);
    margin-top: 30px;
    padding-top: 23px;
    color: var(--subtle);
  }
  .outline-note svg {
    width: 22px;
    height: 22px;
    color: var(--green);
    opacity: 0.7;
  }
  .outline-note p {
    font-size: 11px;
    line-height: 1.8;
  }
  .document-footer {
    margin: 50px 0 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 10px;
    color: var(--muted);
  }
  .document-footer > span {
    display: flex;
    gap: 10px;
    align-items: center;
  }
  .footer-mark {
    font-size: 14px;
    color: var(--subtle);
    letter-spacing: -2px;
  }
  .text-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    white-space: nowrap;
    font-size: inherit;
    color: var(--muted);
  }
  .text-button:hover {
    color: var(--accent);
  }
  .text-button svg {
    height: 13px;
    width: 13px;
  }
  .statusbar {
    height: 31px;
    flex-shrink: 0;
    padding: 0 25px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 9px;
    color: var(--subtle);
  }
  .statusbar > span {
    display: flex;
    gap: 6px;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .statusbar svg {
    height: 11px;
    width: 11px;
  }
  .empty-state {
    padding: 70px 0;
    max-width: 520px;
  }
  .empty-symbol {
    color: var(--accent);
    background: var(--accent-soft);
    width: 56px;
    height: 56px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    margin-bottom: 30px;
  }
  .empty-symbol svg {
    width: 26px;
    height: 26px;
  }
  .empty-state .eyebrow {
    font-size: 9px;
  }
  .prose .empty-state h1 {
    margin-top: 18px;
    font-size: clamp(30px, 3vw, 43px);
    line-height: 1.2;
  }
  .empty-state p {
    color: var(--muted);
  }
  .retry-button {
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 9px 15px;
    font-size: 12px;
  }
  .toast {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 18px;
    background: var(--heading);
    color: var(--bg);
    border: 1px solid var(--line);
    font-size: 12px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 50;
  }
  .mobile-only {
    display: none;
  }
  .skip-link {
    position: fixed;
    top: -70px;
    left: 10px;
    background: var(--surface);
    padding: 12px;
    z-index: 100;
    border-radius: 5px;
  }
  .skip-link:focus {
    top: 10px;
  }
  .focus-mode .sidebar,
  .focus-mode .outline {
    display: none;
  }
  .focus-mode .reader-layout {
    grid-template-columns: minmax(0, 760px);
  }
  .focus-mode .document-column {
    width: 100%;
  }
  .spinning svg {
    animation: spin 0.8s linear infinite;
  }
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
}

@layer prose {
  .prose {
    font-size: 15px;
    line-height: 1.85;
    overflow-wrap: anywhere;
  }
  .prose:focus {
    outline: none;
  }
  .prose h1,
  .prose h2,
  .prose h3,
  .prose h4,
  .prose h5,
  .prose h6 {
    color: var(--heading);
    line-height: 1.3;
    scroll-margin-top: 35px;
    font-weight: 650;
    position: relative;
  }
  .prose h1 {
    font-size: clamp(32px, 3.5vw, 44px);
    letter-spacing: -1.8px;
    margin: 0 0 21px;
    font-weight: 720;
  }
  .prose h2 {
    margin: 40px 0 16px;
    font-size: 23px;
    letter-spacing: -0.65px;
  }
  .prose h3 {
    margin: 30px 0 10px;
    font-size: 18px;
    letter-spacing: -0.3px;
  }
  .prose h4,
  .prose h5,
  .prose h6 {
    margin: 26px 0 10px;
    font-size: 15px;
  }
  .prose p {
    margin: 0 0 20px;
  }
  .prose > h1:first-child + p {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 27px;
  }
  .prose strong {
    font-weight: 650;
    color: var(--heading);
  }
  .prose a {
    color: var(--accent);
    text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
    text-underline-offset: 4px;
  }
  .prose a:hover {
    text-decoration-color: var(--accent);
  }
  .prose ul,
  .prose ol {
    padding-left: 23px;
    margin: 14px 0 23px;
  }
  .prose li {
    padding-left: 4px;
    margin: 7px 0;
  }
  .prose li::marker {
    color: var(--subtle);
  }
  .prose li p {
    margin: 8px 0;
  }
  .prose li ul,
  .prose li ol {
    margin: 8px 0;
  }
  .prose blockquote {
    background: color-mix(in srgb, var(--accent-soft) 43%, var(--bg));
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
    padding: 17px 21px;
    margin: 27px 0;
    color: var(--text);
    font-size: 14px;
  }
  .prose blockquote > :last-child {
    margin-bottom: 0;
  }
  .prose hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 34px 0;
  }
  .prose code,
  .prose pre {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    font-size: 12px;
  }
  .prose :not(pre) > code {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 2px 5px;
    color: var(--accent);
    font-size: 0.82em;
  }
  .prose pre {
    padding: 20px 22px;
    overflow: auto;
    line-height: 1.85;
    margin: 0;
    tab-size: 2;
  }
  .code-block {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--code-bg);
    margin: 21px 0 26px;
    overflow: hidden;
  }
  .code-toolbar {
    border-bottom: 1px solid var(--line);
    padding: 7px 14px 7px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 10px;
  }
  .code-toolbar > span {
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .code-toolbar svg {
    height: 12px;
    width: 12px;
  }
  .code-toolbar button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 10px;
    color: var(--muted);
  }
  .code-toolbar button:hover {
    background: var(--line);
    color: var(--heading);
  }
  .table-wrap {
    overflow-x: auto;
    margin: 24px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
  }
  .prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
  }
  .prose th {
    color: var(--heading);
    background: var(--soft);
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
  }
  .prose th,
  .prose td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--line);
  }
  .prose tr:last-child td {
    border-bottom: 0;
  }
  .prose td {
    min-width: 90px;
  }
  .prose img {
    max-width: 100%;
    height: auto;
    border-radius: 7px;
  }
  .prose .task-list-item {
    list-style: none;
    padding-left: 0;
  }
  .prose .task-list-item-checkbox {
    accent-color: var(--accent);
    margin: 0 9px 0 -20px;
  }
  .heading-anchor {
    position: absolute;
    margin-left: -22px;
    padding-right: 8px;
    top: 3px;
    opacity: 0;
    font-size: 0.65em;
    text-decoration: none;
    font-weight: 400;
  }
  .prose :is(h1, h2, h3, h4, h5, h6):hover .heading-anchor,
  .heading-anchor:focus-visible {
    opacity: 1;
  }
  .hljs-comment,
  .hljs-quote {
    color: var(--muted);
    font-style: italic;
  }
  .hljs-keyword,
  .hljs-selector-tag,
  .hljs-literal,
  .hljs-name {
    color: #a65370;
  }
  .hljs-string,
  .hljs-attr,
  .hljs-addition,
  .hljs-template-tag {
    color: #527348;
  }
  .hljs-title,
  .hljs-section,
  .hljs-built_in {
    color: #3d718a;
  }
  .hljs-number,
  .hljs-symbol,
  .hljs-bullet {
    color: #ad653d;
  }
  .hljs-meta,
  .hljs-deletion {
    color: #b44e47;
  }
  .hljs-emphasis {
    font-style: italic;
  }
  .hljs-strong {
    font-weight: bold;
  }
  [data-theme='dark'] .hljs-keyword,
  [data-theme='dark'] .hljs-selector-tag,
  [data-theme='dark'] .hljs-literal,
  [data-theme='dark'] .hljs-name {
    color: #d5a4ba;
  }
  [data-theme='dark'] .hljs-string,
  [data-theme='dark'] .hljs-attr,
  [data-theme='dark'] .hljs-addition {
    color: #a5c796;
  }
  [data-theme='dark'] .hljs-title,
  [data-theme='dark'] .hljs-section,
  [data-theme='dark'] .hljs-built_in {
    color: #91bacd;
  }
  [data-theme='dark'] .hljs-number,
  [data-theme='dark'] .hljs-symbol,
  [data-theme='dark'] .hljs-bullet {
    color: #e7b280;
  }
  [data-theme='dark'] .hljs-meta,
  [data-theme='dark'] .hljs-deletion {
    color: #e4a098;
  }
}

@layer responsive {
  @media (min-width: 1600px) {
    .sidebar {
      width: 300px;
    }
    .reader-layout {
      padding-top: 65px;
    }
  }
  @media (max-width: 1190px) {
    .outline {
      display: none;
    }
    .reader-layout {
      grid-template-columns: minmax(0, 710px);
      padding-inline: 45px;
    }
    .sidebar {
      width: 250px;
    }
    .sidebar-intro {
      font-size: 10px;
    }
  }
  @media (max-width: 760px) {
    .mobile-only {
      display: inline-flex;
    }
    .sidebar {
      position: fixed;
      top: 0;
      bottom: 0;
      left: 0;
      width: min(310px, 88vw);
      transform: translateX(-100%);
      transition: transform 0.2s ease;
      box-shadow: var(--shadow);
    }
    .sidebar.open {
      transform: translateX(0);
    }
    .sidebar-intro {
      font-size: 11px;
    }
    .sidebar-backdrop {
      position: fixed;
      inset: 0;
      z-index: 15;
      background: #0006;
      backdrop-filter: blur(2px);
    }
    .topbar {
      height: 60px;
      padding: 0 14px;
      gap: 6px;
    }
    .breadcrumbs {
      gap: 9px;
    }
    .breadcrumbs .crumb {
      max-width: 140px;
    }
    .breadcrumbs .ancestor,
    .breadcrumbs .ancestor-slash {
      display: none;
    }
    .breadcrumb-row {
      gap: 5px;
    }
    .topbar-actions {
      gap: 0;
    }
    .connection-status {
      margin-right: 7px;
    }
    .topbar-actions .action-divider,
    .focus-toggle {
      display: none;
    }
    .reader-layout {
      padding: 31px 25px 0;
    }
    .document-meta {
      margin-bottom: 22px;
    }
    .document-label {
      font-size: 8px;
      letter-spacing: 1px;
    }
    .reading-meta {
      font-size: 9px;
      gap: 4px;
    }
    .prose {
      font-size: 14px;
    }
    .prose h1 {
      font-size: 34px;
      letter-spacing: -1.3px;
    }
    .prose > h1:first-child + p {
      font-size: 15px;
    }
    .prose h2 {
      font-size: 22px;
    }
    .prose pre {
      padding: 16px;
      font-size: 11px;
    }
    .prose blockquote {
      padding: 14px 17px;
      font-size: 13px;
    }
    .heading-anchor {
      margin-left: -17px;
    }
    .document-footer {
      font-size: 9px;
      margin-top: 36px;
    }
    .document-footer .footer-mark {
      display: none;
    }
    .statusbar {
      padding: 0 17px;
      font-size: 8px;
    }
    .empty-state {
      padding-top: 40px;
    }
    .toast {
      width: max-content;
      max-width: calc(100vw - 30px);
      text-align: center;
    }
  }
  @media (max-width: 370px) {
    .reader-layout {
      padding-inline: 20px;
    }
    #word-count,
    .reading-meta .meta-dot {
      display: none;
    }
    .breadcrumbs .crumb {
      max-width: 115px;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation: none !important;
      transition: none !important;
      scroll-behavior: auto !important;
    }
  }
  @media print {
    .sidebar,
    .topbar,
    .outline,
    .statusbar,
    .reading-progress,
    .document-footer,
    .code-toolbar button,
    .heading-anchor {
      display: none !important;
    }
    .app-shell,
    .main,
    .reader-scroll {
      display: block;
      overflow: visible;
      height: auto;
    }
    .reader-layout {
      display: block;
      padding: 0;
    }
    .prose {
      color: #222;
    }
    :root {
      --bg: white;
      --text: #222;
      --heading: #111;
      --line: #ddd;
      --soft: #f4f4f4;
      --code-bg: #f7f7f7;
    }
    .prose pre {
      white-space: pre-wrap;
    }
  }
}
