.docs-tabs, .sheet-tabs { display: flex; gap: .35rem; margin: 1rem 0; padding: .35rem; overflow-x: auto; border-radius: .8rem; background: #eeecf8; }
.docs-tabs button, .sheet-tabs button { min-height: 2.3rem; flex: 0 0 auto; background: transparent; color: #39325e; }
.docs-tabs button { flex: 1; }
.docs-tabs button.is-active, .sheet-tabs button.is-active { background: #fff; color: var(--brand-dark); box-shadow: 0 .15rem .4rem rgb(44 37 74 / 12%); }
.sheet-library-heading, .sheet-editor-heading, .sheet-list-card { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.sheet-library-heading { margin: 1rem 0; }
.sheet-search, .sheet-metadata label { display: grid; gap: .35rem; color: #545064; font-size: .85rem; }
.sheet-search { max-width: 24rem; margin: 1rem 0; }
.sheet-search input, .sheet-metadata input, .sheet-metadata select, .sheet-formula-bar input, .sheet-formula-bar select { width: 100%; min-width: 0; margin: 0; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: .65rem; background: #fff; font: inherit; }
.sheet-list { display: grid; gap: .65rem; margin: .75rem 0; }
.sheet-list-card { padding: .9rem; border: 1px solid var(--line); border-radius: .8rem; background: #fff; }
.sheet-list-card > div:first-child { min-width: 0; }
.sheet-list-card strong { display: block; overflow-wrap: anywhere; }
.sheet-list-card small { display: block; margin-top: .3rem; color: var(--ink-muted); }
.sheet-list-actions { display: flex; flex-shrink: 0; gap: .35rem; }
.sheet-editor { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: #fff; }
.sheet-metadata { display: grid; grid-template-columns: 2fr 1fr; gap: .65rem; margin: 1rem 0; }
.sheet-formula-bar { display: grid; grid-template-columns: 2.8rem minmax(0, 1fr) 8rem; align-items: center; gap: .35rem; margin-bottom: .6rem; }
.sheet-cell-address { font-size: .85rem; font-weight: 700; color: var(--brand-dark); text-align: center; }
.sheet-grid-scroll { max-width: 100%; max-height: 29rem; margin-top: .65rem; overflow: auto; border: 1px solid var(--line); border-radius: .5rem; }
.sheet-grid { width: max-content; border-collapse: separate; border-spacing: 0; font-size: .85rem; }
.sheet-grid th, .sheet-grid td { height: 1.7rem; padding: 0; border-right: 1px solid #e0ddea; border-bottom: 1px solid #e0ddea; }
.sheet-grid th { position: sticky; z-index: 1; width: 2.8rem; min-width: 2.8rem; background: #f2f0f9; color: #55516a; font-weight: 600; }
.sheet-grid thead th { top: 0; }
.sheet-grid tbody th { left: 0; }
.sheet-grid thead th:first-child { left: 0; z-index: 2; }
.sheet-grid input { display: block; width: 8rem; height: 1.7rem; padding: .15rem .5rem; border: 0; border-radius: 0; background: #fff; color: #28223f; font: inherit; }
.sheet-grid input.is-selected { position: relative; z-index: 1; box-shadow: inset 0 0 0 2px var(--brand); }
.sheet-grid input.is-number { text-align: right; }
.sheet-grid input.is-error { color: #9c2430; }
.sheet-grid input:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px var(--brand); }
.sheet-tabs { margin-bottom: .65rem; }
.sheet-tools { display: flex; gap: .35rem; flex-wrap: wrap; }
.sheet-tools button, .sheet-list-actions button { min-height: 2.2rem; padding: .45rem .6rem; font-size: .82rem; }
.sheet-help { margin-top: 1rem; color: var(--ink-muted); font-size: .82rem; line-height: 1.5; }
.sheet-help summary { cursor: pointer; color: var(--brand-dark); font-weight: 650; }
.sheet-help code { color: #39325e; }
.sheet-style-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .6rem 0; }
.sheet-style-tools button { min-height: 2.2rem; padding: .45rem .6rem; font-size: .82rem; }
.sheet-style-tools label { display: flex; align-items: center; gap: .3rem; color: var(--ink-muted); font-size: .82rem; }
.sheet-style-tools input[type="color"] { width: 2.4rem; height: 2rem; padding: .1rem; border: 1px solid var(--line); border-radius: .3rem; cursor: pointer; }
.sheet-style-tools button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.sheet-cell-address { overflow-wrap: anywhere; }
.sheet-grid input.is-range-selected { outline: 1px solid #a59bdc; outline-offset: -1px; box-shadow: inset 0 0 0 999px rgb(81 66 199 / 12%); }
.sheet-grid input.is-selected { box-shadow: inset 0 0 0 2px var(--brand); }
@media (min-width: 48rem) { .timeline-shell.is-sheet-expanded { width: 100%; max-width: none; } }
@media (max-width: 47.99rem) { .sheet-expand { display: none; } }
@media (max-width: 36rem) { .sheet-editor { padding: .6rem; } .sheet-metadata { grid-template-columns: 1fr; } .sheet-formula-bar { grid-template-columns: 2.5rem minmax(0, 1fr); } .sheet-formula-bar select { grid-column: 2; } .sheet-library-heading { align-items: flex-start; flex-direction: column; } .sheet-list-card { align-items: flex-start; flex-direction: column; } }
