.ledger-main { min-height: 65vh; padding-bottom: 2rem; background: #fff; }
.ledger-intro, .release-history, .ledger-end { max-width: 1000px; }
.ledger-intro { padding-top: 2.5rem; padding-bottom: 1.4rem; }
.ledger-back { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; margin-bottom: 1rem; color: #4b5563; font-size: .9rem; text-decoration: none; }
.ledger-back:hover { color: #1a365d; text-decoration: underline; }
.ledger-back:focus-visible, .release-tools button:focus-visible, .release-tools select:focus-visible, .release-notes > summary:focus-visible, .try-it > summary:focus-visible { outline: 3px solid #285e61; outline-offset: 3px; }
.ledger-intro h1 { margin: 0 0 .5rem; color: #1a365d; font-size: clamp(2rem, 4vw, 2.65rem); line-height: 1.15; letter-spacing: -.035em; }
.ledger-summary { margin: 0; color: #4a5568; font-size: 1rem; line-height: 1.5; }
.release-governance { max-width: 100%; margin-top: 1rem; padding: .7rem .9rem; border-radius: 6px; background: #f8fafc; }
.release-governance h2 { margin: 0 0 .2rem; color: #1a365d; font-size: 1.1rem; font-weight: 650; line-height: 1.35; }
.release-governance p { margin: 0; color: #475569; font-size: .9rem; line-height: 1.5; }
.governance-details { margin-top: .35rem; }
.governance-details > summary { width: fit-content; min-height: 32px; color: #285e61; cursor: pointer; font-size: .875rem; font-weight: 650; line-height: 1.5; }
.governance-details > summary:focus-visible { outline: 2px solid #285e61; outline-offset: 2px; }
.governance-details ol { display: grid; gap: .35rem; margin: .3rem 0 0; padding-left: 1.25rem; color: #475569; font-size: .9rem; line-height: 1.5; }
.governance-details li { padding-left: .1rem; }
.governance-details li strong { color: #1a365d; }
.release-history { padding-top: .3rem; }
.release-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1rem; padding: 1.45rem 0 1.55rem; border: 0; border-bottom: 1px solid #e2e8f0; scroll-margin-top: 6rem; }
.release-card:first-child { border-top: 1px solid #e2e8f0; }
.release-meta-column { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; padding-top: .18rem; }
.release-version { color: #1a365d; font-size: .95rem; font-weight: 700; white-space: nowrap; }
.release-meta { color: #64748b; font-size: .875rem; line-height: 1.45; }
.release-date { display: inline-block; }
.release-content { min-width: 0; }
.release-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .65rem; }
.release-heading h2 { margin: -.08rem 0 .45rem; color: #1a365d; font-size: 1.25rem; font-weight: 650; line-height: 1.35; }
.release-heading h2:focus { outline: none; }
.release-heading h2:focus-visible { outline: 3px solid #285e61; outline-offset: 4px; border-radius: 2px; }
.release-count { color: #64748b; font-size: .8rem; }
.foundation-context, .empty-release { margin: .35rem 0 .65rem; color: #64748b; font-size: .95rem; line-height: 1.5; }
.release-notes { margin-top: .15rem; }
.release-notes > summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 34px; padding: .35rem 0; cursor: pointer; color: #285e61; font-size: .875rem; list-style: none; }
.release-notes > summary::-webkit-details-marker { display: none; }
.notes-count { color: #64748b; font-size: .8rem; }
.notes-toggle-label { font-weight: 650; }
.notes-open-label { display: none; }
.notes-closed-label { display: inline; }
.release-notes[open] .notes-open-label { display: inline; }
.release-notes[open] .notes-closed-label { display: none; }
.release-changes { list-style: none; margin: 0; padding: 0; }
.release-changes > li { min-width: 0; padding: .8rem 0; border-top: 1px solid #edf2f7; scroll-margin-top: 6rem; }
.release-changes > li:focus { outline: 3px solid #285e61; outline-offset: 2px; }
.note-heading { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; min-width: 0; }
.release-changes h3 { margin: 0; color: #1a365d; font-size: 1rem; font-weight: 650; line-height: 1.45; }
.note-category, .change-type { display: inline-flex; align-items: center; min-height: 1.3rem; padding: .05rem .4rem; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: .7rem; line-height: 1.3; white-space: nowrap; }
.change-type { background: #e2e8f0; text-transform: capitalize; }
.release-changes > li > p { margin: .25rem 0 0; color: #475569; font-size: 1rem; line-height: 1.55; }
[data-category="front-end"] { --category-colour: #2563eb; }
[data-category="back-end"] { --category-colour: #475569; }
[data-category="cognition"] { --category-colour: #9333ea; }
[data-category="memory"] { --category-colour: #059669; }
[data-category="performance"] { --category-colour: #638a00; }
[data-category="systems"] { --category-colour: #ea580c; }
[data-category="integrations"] { --category-colour: #0891b2; }
[data-category="security"] { --category-colour: #db2777; }
.release-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .85rem 1rem; margin-top: 1.35rem; padding: .9rem 0; border-top: 1px solid #dce3e8; border-bottom: 1px solid #dce3e8; }
.release-tools .release-category-filter { grid-column: 1; grid-row: 1; }
.release-tools .view-switch { grid-column: 2; grid-row: 1; justify-self: end; }
.release-tools .release-jump { grid-column: 1; grid-row: 2; }
.release-tools .release-actions { grid-column: 2; grid-row: 2; justify-self: end; }
.release-tools[hidden] { display: none; }
.release-jump { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: #4a5568; font-size: .875rem; }
.release-tools select, .release-tools button { min-height: 40px; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; color: #1a365d; font: inherit; font-size: .875rem; padding: .35rem .6rem; }
.release-tools button { cursor: pointer; }
.release-tools button:hover { background: #f8fafc; }
.release-actions { display: flex; gap: .4rem; }
.view-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 6px; background: #e9edf0; }
.release-tools .view-switch button { min-height: 34px; border: 0; padding: .4rem .8rem; background: transparent; color: #526476; font-weight: 400; }
.view-label { display: none; }
.release-tools .view-switch button[aria-pressed="true"] { background: #fff; color: #1a365d; font-weight: 500; box-shadow: 0 1px 2px #10253820; }
.try-it { margin-top: .6rem; padding: .25rem .75rem; border-left: 3px solid #84cc16; background: #eff6ff; }
.try-it > summary { display: inline-flex; align-items: center; gap: .3rem; min-height: 34px; color: #285e61; cursor: pointer; font-size: .875rem; font-weight: 700; list-style: none; }
.try-it > summary::-webkit-details-marker { display: none; }
.try-it > summary::after { content: '+'; color: #64748b; }
.try-it[open] > summary::after { content: '−'; }
.try-it-body { padding: 0 0 .65rem; color: #475569; font-size: .925rem; line-height: 1.5; }
.try-it-body p { margin: .2rem 0; }
.try-it-body ol { margin: .3rem 0 .4rem; padding-left: 1.3rem; }
.try-it-link { display: inline-block; margin-top: .2rem; color: #1a365d; font-weight: 700; }
.release-note > summary { list-style: none; cursor: pointer; }
.release-note > summary::-webkit-details-marker { display: none; }
.release-note > summary:focus-visible { outline: 2px solid #285e61; outline-offset: 2px; }
.release-note:not([open]) > summary .note-heading::after { content: '+'; margin-left: auto; color: #64748b; }
.release-note[open] > summary .note-heading::after { content: '−'; margin-left: auto; color: #94a3b8; }
.note-title { color: #1a365d; font-size: 1rem; font-weight: 650; line-height: 1.45; }
.note-detail { padding-top: .25rem; }
body[data-release-view="compact"] .release-card { padding-top: .65rem; padding-bottom: .7rem; }
body[data-release-view="compact"] .note-title { font-size: .94rem; }
body[data-release-view="compact"] .note-detail { padding-top: .45rem; }
.ledger-end { padding-top: 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 640px) {
  .ledger-intro { padding-top: 1.5rem; padding-bottom: 1rem; }
  .release-governance { padding: .65rem .7rem; }
  .release-card { grid-template-columns: 1fr; gap: .35rem; padding: 1.1rem 0 1.2rem; }
  .release-meta-column { flex-direction: row; align-items: baseline; gap: .55rem; }
  .release-version { font-size: .85rem; }
  .release-heading h2 { font-size: 1.15rem; }
  .release-actions { width: 100%; }
  .release-actions button { flex: 1 1 auto; }
  .release-jump { width: 100%; }
  .release-tools select { flex: 1 1 12rem; min-width: 0; }
}

/* Dated reading panel with one aligned row per update. */
.ledger-main { background: #f6f8fa; }
.release-history { display: grid; gap: 1rem; padding-top: .6rem; }
.release-day { min-width: 0; padding: 0 1.25rem .55rem; background: #fff; border: 1px solid #dce3e8; border-radius: 8px; scroll-margin-top: 6rem; }
.release-notes { min-width: 0; margin: 0; }
.release-notes > .release-day-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: .75rem; min-height: 62px; padding: 1rem 0 .85rem; border-bottom: 1px solid #e5eaf0; cursor: pointer; color: #1a365d; list-style: none; }
.release-day-heading::-webkit-details-marker { display: none; }
.release-day-heading::marker { content: ""; }
.release-day-heading h2 { grid-column: 1; margin: 0; color: #1a365d; font-size: 1.2rem; font-weight: 650; line-height: 1.35; }
.release-day-heading h2:focus { outline: none; }
.release-day-heading h2:focus-visible { outline: 3px solid #285e61; outline-offset: 4px; border-radius: 2px; }
.release-day-count { grid-column: 2; color: #64748b; font-size: .8rem; white-space: nowrap; }
.release-day-chevron, .note-chevron { width: 8px; height: 8px; border-right: 1.5px solid #64748b; border-bottom: 1.5px solid #64748b; transform: rotate(45deg); transition: transform .16s ease; }
.release-day-chevron { grid-column: 3; }
.release-notes[open] > .release-day-heading .release-day-chevron { transform: rotate(225deg); }
.release-notes > summary::after { content: none; }
.release-notes:not([open]) > .release-day-heading { border-bottom: 0; }
.release-changes { display: grid; list-style: none; margin: 0; padding: 0; }
.release-changes > .release-change { display: grid; grid-template-columns: 76px 40px minmax(0, 1fr); column-gap: .75rem; align-items: start; min-width: 0; padding: 0; border-top: 1px solid #edf1f4; scroll-margin-top: 6rem; }
.release-changes > .release-change:first-child { border-top: 0; }
.release-change:focus { outline: 3px solid #285e61; outline-offset: 2px; }
.release-change[hidden] { display: none !important; }
.change-type, .change-type-space { grid-column: 1; grid-row: 1; }
.try-it-action, .try-it-space { grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: center; width: 36px; min-height: 54px; }
.change-type { display: inline-flex; align-items: center; justify-content: center; justify-self: start; align-self: center; min-width: 0; max-width: 100%; padding: .22rem .38rem; border: 1px solid #cbd5e1; border-radius: 999px; background: #f1f5f9; color: #334155; font-size: .72rem; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.try-it-action { padding: 0; border: 0; background: transparent; color: #315b93; border-radius: 4px; cursor: pointer; }
.try-it-action[hidden] { display: none !important; }
.try-it-action svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.try-it-action svg path { fill: currentColor; stroke: none; }
.try-it-action:focus-visible { outline: 3px solid #285e61; outline-offset: 2px; }
.release-note { grid-column: 3; min-width: 0; margin: 0; }
.release-note > summary { display: grid; grid-template-columns: 150px minmax(0, 1fr) 18px; gap: .75rem; align-items: center; min-height: 54px; padding: .55rem 0; list-style: none; cursor: pointer; }
.release-note > summary::-webkit-details-marker { display: none; }
.release-note > summary::marker { content: ""; }
.release-note > summary:focus-visible { outline: 3px solid #285e61; outline-offset: 2px; }
.release-note > summary .note-title { grid-column: 2; color: #1a365d; font-size: 1rem; font-weight: 500; line-height: 1.45; }
.release-note > summary .note-category { grid-column: 1; grid-row: 1; justify-self: start; }
.release-note > summary .note-chevron { grid-column: 3; grid-row: 1; justify-self: center; }
.release-note[open] > summary .note-chevron { transform: rotate(225deg); }
.note-category { display: inline-flex; align-items: center; gap: .4rem; min-height: 0; padding: .2rem .48rem; border: 1px solid currentColor; border-radius: 999px; font-size: .8rem; font-weight: 650; line-height: 1.35; white-space: normal; }
.note-category::before { content: ""; width: .46rem; height: .46rem; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.note-detail { grid-column: 1 / 4; padding: 0 1rem 1rem 0; color: #475569; font-size: .95rem; line-height: 1.55; }
.note-detail > p { margin: .1rem 0 0; }
.try-it { margin-top: .6rem; padding: .25rem .75rem; border-left: 3px solid #84cc16; background: #eff6ff; }
.try-it > summary { display: inline-flex; align-items: center; gap: .3rem; min-height: 34px; color: #285e61; cursor: pointer; font-size: .875rem; font-weight: 700; list-style: none; }
.try-it > summary::-webkit-details-marker { display: none; }
.try-it > summary::after { content: '+'; color: #64748b; }
.try-it[open] > summary::after { content: '−'; }
.try-it-body { padding: 0 0 .65rem; color: #475569; font-size: .925rem; line-height: 1.5; }
.try-it-body p { margin: .2rem 0; }
.try-it-body ol { margin: .3rem 0 .4rem; padding-left: 1.3rem; }
.try-it-link { display: inline-block; margin-top: .2rem; color: #1a365d; font-weight: 700; }
.release-actions[hidden] { display: none !important; }
@media (max-width: 640px) {
  .ledger-intro { padding-top: 1.5rem; padding-bottom: 1rem; }
  .release-day { padding: 0 .9rem .35rem; }
  .release-notes > .release-day-heading { grid-template-columns: minmax(0, 1fr) auto 14px; gap: .5rem; min-height: 58px; padding: .85rem 0 .7rem; }
  .release-day-heading h2 { font-size: 1.08rem; }
  .release-changes > .release-change { grid-template-columns: 76px 48px minmax(0, 1fr); column-gap: .5rem; }
  .try-it-action, .try-it-space { width: 34px; min-height: 64px; }
  .release-note { grid-column: 1 / 4; grid-row: 2; }
  .release-note > summary { grid-template-columns: minmax(0, 1fr) 14px; grid-template-rows: auto auto; gap: .2rem .55rem; min-height: 64px; padding: .55rem 0; }
  .release-note > summary .note-category { grid-column: 1; grid-row: 1; }
  .release-note > summary .note-title { grid-column: 1; grid-row: 2; font-size: .94rem; }
  .release-note > summary .note-chevron { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .note-detail { grid-column: 1 / 3; padding-right: .2rem; }
}
@media (pointer: coarse) {
  .try-it-action, .try-it-space { width: 44px; min-height: 64px; }
  .release-note > summary { min-height: 64px; }
}
@media (max-width: 640px) and (pointer: coarse) { .release-changes > .release-change { grid-template-columns: 76px 48px minmax(0, 1fr); } .release-note { grid-column: 1 / 4; grid-row: 2; } }
@media (min-width: 641px) and (pointer: coarse) { .release-changes > .release-change { grid-template-columns: 76px 48px minmax(0, 1fr); } .release-note { grid-column: 3 / 4; grid-row: 1; } }
@media (prefers-reduced-motion: reduce) { .release-day-chevron, .note-chevron { transition: none; } }

/* Category color is a quiet cue; the text label remains the source of meaning. */
.note-category[data-category="front-end"] { color: #315b93; background-color: #eaf1fa; }
.note-category[data-category="cognition"] { color: #653b8d; background-color: #f3edf9; }
.note-category[data-category="memory"] { color: #24623b; background-color: #eaf5ee; }
.note-category[data-category="integrations"] { color: #146477; background-color: #e7f5f7; }
.note-category[data-category="security"] { color: #8a3853; background-color: #f9edf0; }
.note-category[data-category="performance"] { color: #526b1c; background-color: #f1f6e7; }
.note-category[data-category="back-end"] { color: #3f536d; background-color: #edf1f6; }
.note-category[data-category="systems"] { color: #8d4d23; background-color: #fbf0e7; }
.release-category-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: #4a5568; font-size: .875rem; }
.release-filter-empty { margin-top: .25rem; padding: 1rem 0; color: #475569; }
.release-filter-empty button { margin-left: .25rem; border: 0; padding: .15rem .25rem; background: transparent; color: #1a365d; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.release-day[hidden], .release-change[hidden], .foundation-context-row[hidden], .release-filter-empty[hidden] { display: none !important; }
@media (max-width: 640px) {
  .release-category-filter { width: 100%; }
  .release-category-filter select { flex: 1 1 12rem; min-width: 0; }
  .release-filter-empty button { margin: .5rem 0 0; }
}
.release-category-filter select:focus-visible, .release-filter-empty button:focus-visible { outline: 3px solid #285e61; outline-offset: 3px; }
.release-category-filter select[data-category="front-end"] { color: #315b93; background-color: #eaf1fa; }
.release-category-filter select[data-category="cognition"] { color: #653b8d; background-color: #f3edf9; }
.release-category-filter select[data-category="memory"] { color: #24623b; background-color: #eaf5ee; }
.release-category-filter select[data-category="integrations"] { color: #146477; background-color: #e7f5f7; }
.release-category-filter select[data-category="security"] { color: #8a3853; background-color: #f9edf0; }
.release-category-filter select[data-category="performance"] { color: #526b1c; background-color: #f1f6e7; }
.release-category-filter select[data-category="back-end"] { color: #3f536d; background-color: #edf1f6; }
.release-category-filter select[data-category="systems"] { color: #8d4d23; background-color: #fbf0e7; }

@media (max-width: 640px) {
  .release-tools { grid-template-columns: minmax(0, 1fr); }
  .release-tools .release-category-filter { grid-column: 1; grid-row: 1; }
  .release-tools .view-switch { grid-column: 1; grid-row: 2; justify-self: start; }
  .release-tools .release-jump { grid-column: 1; grid-row: 3; }
  .release-tools .release-actions { grid-column: 1; grid-row: 4; justify-self: stretch; }
}
