/* Omnifactory: a reading record of Astra's notes. The shared theme owns
   tokens, type roles, the header, controls and code colors. */
.omni-main { width: min(58rem, calc(100% - 2 * var(--gutter, 1.5rem))); margin: 0 auto; padding: clamp(1.75rem, 4vw, 3rem) 0 4rem; }
.page-head h1 { margin: 0; font-weight: 700; letter-spacing: -.015em; }
.page-head .lede { margin: .6rem 0 0; }
.note-meta { margin: .5rem 0 0; color: var(--muted); font: var(--text-ui)/1.55 var(--ui, var(--serif)); }
.played { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { margin: 1.75rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line-strong); color: var(--muted-strong); text-align: left; }

/* One native disclosure for each note, the newest first. */
.listings { margin: 1.75rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.listings > li { border-bottom: 1px solid var(--line); }
.listing { border-top: 0; scroll-margin-top: 1rem; }
.listing > summary { display: grid; grid-template-columns: 1rem minmax(0, 1fr) auto; gap: .1rem .75rem; align-items: baseline; padding: .6rem 0; color: var(--ink); font-size: var(--text-ui); list-style: none; }
.listing > summary::-webkit-details-marker { display: none; }
.listing > summary::before { content: ""; width: .4rem; height: .4rem; margin-left: .15rem; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: translateY(-.1rem) rotate(-45deg); transition: transform .15s ease; }
.listing[open] > summary::before { transform: translateY(-.2rem) rotate(45deg); }
.listing > summary:hover .listing-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.listing-name { font: 600 .9rem/1.45 var(--mono); overflow-wrap: anywhere; }
.listing-meta { color: var(--muted); font: var(--text-meta)/1.5 var(--ui, var(--serif)); white-space: nowrap; text-align: right; }
.listing-summary { grid-column: 2 / -1; color: var(--muted-strong); font: var(--text-ui)/1.45 var(--ui, var(--serif)); }
.listing-body { padding: .2rem 0 1.25rem 1.75rem; }
.listing-body > .note-body { max-width: var(--measure); }
.listing-fallback, .listing-status { margin: 0 0 .5rem; color: var(--muted); font: var(--text-ui)/1.5 var(--ui, var(--serif)); }

/* Note text keeps the author's line breaks and tables. */
.note-name { font-family: var(--mono); font-size: clamp(1.2rem, 2.6vw, 1.55rem); font-weight: 600; overflow-wrap: anywhere; }
.note-page .note-body { margin-top: 1.75rem; }
/* Every note sits in the same quiet box as a JSON listing: the code-block
   border and surface, with prose type inside. */
.note-prose { box-sizing: border-box; max-width: var(--measure); padding: .8rem 1rem; border: 1px solid var(--line); background: var(--surface); font-size: 1.0625rem; line-height: 1.6; overflow-wrap: anywhere; }
.note-prose > :first-child { margin-top: 0; }
.note-prose > :last-child { margin-bottom: 0; }
.note-prose :is(h2, h3, h4, h5, h6) { margin: 1.6rem 0 .45rem; font-size: 1.1rem; line-height: 1.3; }
.note-prose :is(ul, ol) { padding-left: 1.3rem; }
.note-prose li + li { margin-top: .25rem; }
.note-prose code { font-size: .84em; }
.note-prose .table-scroll { margin: .8rem 0 1rem; }
.note-prose table { font: var(--text-ui)/1.45 var(--ui, var(--serif)); }
.note-text p { white-space: pre-line; }
.note-body > :is(.ui-code, .note-prose), .note-prose .ui-code { margin: .75rem 0; }
.note-prose .ui-code { background: var(--paper); }

@media (max-width: 42rem) {
  .listing > summary { grid-template-columns: 1rem minmax(0, 1fr); }
  .listing-meta { grid-column: 2; text-align: left; white-space: normal; }
  .listing-body { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .listing > summary::before { transition: none; } }
@media print { .listing-fallback { display: none !important; } }
