/* The Source index uses the Case Notes paper, retrieval marks and editorial rules. */
#main { --mono: "JetBrains Mono", ui-monospace, monospace; --dim: #465a59; --sheet: #fffcf6; --line: #bdc6bf; }
[hidden] { display: none !important; }
.site-mast .site-mast-row { padding-block-end: clamp(1.125rem, 2cqw, 2.25rem); }
.frame { width: var(--wiki-frame); margin-inline: auto; }
.intro { border-bottom: 1px solid var(--line); }
.intro .frame, .record-pages { padding-block: clamp(22px, 2.5vw, 40px); }
.crumb, .micro, .field > span:first-child, .filter-head, .list-head, .sort > span {
  font: 650 .69rem/1.45 var(--mono); text-transform: uppercase; letter-spacing: .065em;
}
.crumb { display: flex; gap: .65rem; align-items: center; margin-bottom: 18px; color: var(--dim); }
.crumb span { color: #938d80; }
.spread { display: grid; grid-template-columns: 1.35fr 1fr; align-items: end; gap: clamp(24px, 5vw, 90px); }
#main h1 { font: 735 clamp(3rem, 5.6vw, 6.2rem)/.95 var(--cn-sans); letter-spacing: -.063em; }
.deck { max-width: 56ch; margin-top: 14px; font-size: clamp(1rem, 1.25vw, 1.25rem); line-height: 1.4; text-wrap: pretty; }
.stock { width: min(100%, 26rem); justify-self: end; border-left: 2px solid var(--cn-brand-salmon); padding-left: 18px; }
.stock .micro { color: var(--dim); }
.stock strong { font: 650 clamp(2rem, 3.1vw, 3.45rem)/1 var(--cn-sans); letter-spacing: -.06em; }
.proportion { height: 7px; margin: 12px 0 7px; display: flex; background: #b8c2bd; }
.proportion span { background: #15494a; }
.stock-key { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 12px; color: var(--dim); font-size: .82rem; }
#browse { display: grid; grid-template-columns: clamp(220px, 20vw, 290px) minmax(0, 1fr); gap: clamp(24px, 4vw, 74px); padding-block: 28px 48px; }
.rail { align-self: start; position: sticky; top: 12px; max-height: calc(100dvh - 24px); overflow-y: auto; scrollbar-width: thin; padding: 4px; margin: -4px; }
.rail .wiki-elsewhere { margin-top: 24px; }
.filter-head, .result-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 12px; }
.filter-head { border-bottom: 1px solid #768480; }
.clear { border: 0; color: var(--dim); background: none; padding: 4px; text-decoration: underline; font-size: .76rem; }
.clear:disabled { opacity: .55; cursor: default; }
.field { display: block; min-width: 0; margin-top: 16px; }
.field > span:first-child { display: block; font-size: .64rem; margin-bottom: 5px; color: var(--dim); }
.field select, .search-box { background: var(--sheet); border: 1px solid #929e97; border-radius: 3px; width: 100%; height: 41px; }
.field select, .sort select { padding: 0 9px; text-overflow: ellipsis; }
.field select, .field input, .sort select { color: var(--ink); font: 500 .89rem var(--cn-sans); }
.search-box { display: flex; align-items: center; padding-left: 12px; gap: 10px; }
.search-box i { width: 13px; height: 13px; border: 1.65px solid var(--dim); border-radius: 50%; position: relative; flex: none; }
.search-box i::after { content: ""; position: absolute; width: 7px; height: 2px; transform: rotate(45deg); right: -5px; bottom: -2px; background: var(--dim); }
.search-box input { min-width: 0; width: 100%; height: 100%; padding-right: 8px; border: 0; background: transparent; }
.search-box:focus-within { outline: 2px solid var(--cn-focus); outline-offset: 2px; }
.search-box input:focus { outline: none; }
.result-bar { border-bottom: 2px solid var(--ink); }
#count { font: 625 .99rem var(--cn-sans); }
.sort { display: flex; align-items: center; gap: 6px; color: var(--dim); }
.sort select { background: transparent; border: 0; padding: 6px 2px; }
.list-head { color: var(--dim); font-size: .6rem; padding: 11px 0 7px; }
.list-head, .record { display: grid; align-items: baseline; grid-template-columns: minmax(86px,.68fr) minmax(0,3.85fr) minmax(115px,.85fr); gap: 16px; }
.entry { border-bottom: 1px solid var(--line); scroll-margin-top: 12px; }
.record { list-style: none; padding-block: 13px; }
.record::-webkit-details-marker { display: none; }
.record:hover .record-title { text-decoration: underline; text-underline-offset: 3px; }
.record-title { display: block; font: 640 clamp(.99rem, 1.2vw, 1.16rem)/1.28 var(--cn-sans); letter-spacing: -.019em; overflow-wrap: anywhere; }
.meta { display: block; color: var(--dim); font: 460 .81rem/1.45 var(--cn-sans); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record time, #end { color: var(--dim); font: 500 .72rem/1.4 var(--mono); }
.review { display: flex; align-items: baseline; justify-content: space-between; gap: .25rem; }
.outcome { color: #175c4e; font: 600 .74rem/1.4 var(--cn-sans); }
.outcome::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin: 0 6px 1px 0; }
.entry:not([data-outcome="used"]) .outcome { color: #665a53; }
.entry:not([data-outcome="used"]) .outcome::before { background: transparent; border: 1.4px solid currentColor; }
.open-symbol { font: 600 1rem var(--mono); color: var(--dim); }
.entry[open] > .record .open-symbol { transform: rotate(45deg); }
.inline-detail { margin-bottom: 13px; }
.detail { padding: 18px clamp(16px, 2.2vw, 36px); min-width: 0; overflow-wrap: anywhere; background: var(--sheet); border-left: 3px solid var(--cn-brand-salmon); }
.detail .micro { color: var(--dim); display: block; }
.detail p { font-size: .93rem; line-height: 1.45; margin-top: 7px; }
.review-note { max-width: 76ch; margin-top: 7px; font: 400 1.05rem/1.5 var(--cn-serif); }
.detail .cn-excerpt { margin: 8px 0; max-width: 78ch; font: 400 clamp(1.06rem, 1.45vw, 1.38rem)/1.38 var(--cn-serif); white-space: pre-line; }
.quote-scroll { overflow-x: auto; }
.quote-scroll td, .quote-scroll th { padding: .35em .65em; border: 1px solid var(--line); }
.detail .field-block, .all-findings { margin-top: 18px; }
.q-links, .jump-links { display: flex; flex-wrap: wrap; gap: .4em 1em; margin-top: 6px; }
.detail a { color: #154e4b; }
.q-links a, .all-findings summary, .jump-links a { font: 600 .85rem/1.6 var(--cn-sans); }
.jump-links { padding-top: 13px; margin-top: 15px; border-top: 1px solid var(--line); }
#empty { padding: 46px 12px; }
#empty p { margin: 6px 0 16px; }
#end { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#empty button, #more, .facet-switch { border: 1px solid #70807a; border-radius: 3px; background: transparent; color: var(--ink); padding: 9px 14px; font-size: .87rem; }
.facet-switch { display: none; }
.record-pages { max-width: 70rem; }
.record-pages h1 { margin-block: 1rem 2rem; }
.record-pages article { padding-block: 1rem; }
.record-pages article h2 { margin-bottom: .7rem; }
@media (max-width: 740px) {
  #browse, .spread { display: block; }
  .stock { margin-top: 16px; }
  .rail { position: static; max-height: none; overflow: visible; margin-bottom: 18px; }
  .rail .wiki-elsewhere { margin: 14px 0 0; }
  .rail .wiki-elsewhere ul { display: flex; flex-wrap: wrap; gap: 0 1rem; }
  .filter-head b, #facets:not(.expanded) { display: none; }
  .facet-switch { display: block; }
  .facet-switch::after { content: " +"; }
  .facet-switch[aria-expanded="true"]::after { content: " −"; }
  #facets { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; }
}
@media (max-width: 510px) {
  .list-head { display: none; }
  .record { grid-template-columns: minmax(0,1fr) auto; gap: 4px 6px; }
  .record > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .open-symbol { margin-left: 5px; }
  .sort > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
