/* The Cipher Ledger, editorial layer. Loaded after the page styles on every page.
   One measure for every prose block; lists and rows never run wider than it.
   Links: no underlines; an accent that shifts on hover and focus; AAA contrast in both palettes. */
:root,html[data-theme=vellum]{
  --measure:720px;
  --link:#0b4f63; --link-hover:#5c3c00; --focus:#5c3c00; --accent:#5c3c00; --accent-hover:#0b4f63;
  --muted:#4a463d; --rule:#cfc6b2; --star:#7a5200; --hover:rgba(22,20,16,.04);
  --font-display:"Playfair Display","Times New Roman",serif;
}
html[data-theme=dark]{
  --link:#9fd3d6; --link-hover:#f3f1eb; --focus:#f3f1eb; --accent:#9fd3d6; --accent-hover:#f3f1eb;
  --muted:#bdb9b1; --rule:#3f464b; --star:#e8d5a0; --hover:rgba(243,241,235,.06);
}
a,.btn,.chiplinks a,footer a,.sources dd a,.chip[aria-pressed=true]{color:var(--link);text-decoration:none !important;transition:color .15s ease}
a:hover,a:focus-visible,.btn:hover,.btn:focus-visible,.chiplinks a:hover{color:var(--link-hover)}
p a,li a,dd a,figcaption a{font-weight:500}
:focus-visible{outline:3px solid var(--focus) !important;outline-offset:3px;border-radius:2px}
.btn{font-weight:500;letter-spacing:.01em}
.btn.pri{color:var(--link)}

/* ---- the shared measure ---- */
.col,.cover-in>.promise,.cover-in>.intro,main.page>*:not(.folio):not(.clip):not(figure),
#p-circle>.lead,#p-circle>.legend,#p-circle>#carried,#p-circle>details.box,#p-circle>.const,#p-circle>.trail,#p-circle>.fieldtools,#p-circle>.chips,#p-circle>.searchbar,
.panel>h2,.panel>.lead,.panel>.searchbar,.panel>.chips,.panel>.suggest,.panel>details.filters,.panel>.status,.panel>.results,.panel>.more,.panel>.arts,.panel>.cc-wrap,.panel>.method,
.cside,.colophon,footer .site-foot-inner,figure.clip figcaption{
  max-width:var(--measure);margin-left:auto;margin-right:auto;width:100%}
main.page>figure.clip,main.page .clip{max-width:960px;margin-left:auto;margin-right:auto}
main.page section>*{max-width:var(--measure);margin-left:auto;margin-right:auto}
main.page section>figure.clip{max-width:960px}
main.page section>figure.clip>figcaption{max-width:var(--measure)}

/* ---- cover ---- */
header.cover{min-height:calc(100svh - 38px);display:flex;align-items:center;justify-content:center;text-align:center;padding:56px 24px 48px;border-bottom:1px solid var(--rule)}
.cover-in{width:100%;max-width:960px;margin:0 auto}
.masthead{font-size:13px;letter-spacing:.32em;color:var(--muted);margin:0 0 40px}
h1.wm{margin:0 auto 36px;max-width:640px;line-height:0;color:var(--text)}
h1.wm svg{width:100%;height:auto;display:block}
.wm-star{fill:var(--star)} .wm-rule{stroke:var(--star) !important}
.promise{font-family:var(--font-display);font-size:clamp(23px,3.1vw,31px);line-height:1.3;color:var(--text);margin:0 auto 22px;max-width:var(--measure);width:100%}
.intro{color:var(--text2);font-size:18px;line-height:1.65;margin:0 auto 36px;text-align:left}
.begin{display:inline-flex;flex-direction:column;align-items:center;gap:6px;font-size:13px;letter-spacing:.22em;text-transform:uppercase;font-weight:500;min-height:44px;padding:8px 12px}
.begin svg{animation:nudge 2.4s ease-in-out infinite}
@keyframes nudge{50%{transform:translateY(4px)}}
@media (prefers-reduced-motion:reduce){.begin svg{animation:none}}
@media (max-width:560px){
  header.cover{min-height:calc(100svh - 38px);padding:22px 24px 18px;justify-content:flex-start}
  .masthead{margin:0 0 16px}
  h1.wm{margin:0 auto 16px}
  .promise{margin:0 auto 12px;font-size:clamp(22px,5.8vw,26px);line-height:1.28}
  .intro{margin:0 auto 16px;font-size:17px;line-height:1.55}
  .begin{padding:6px 12px;gap:4px}
}

/* ---- sections ---- */
section.ledger,section.tools{padding:72px 24px 8px}
section.tools{padding-top:48px;border-top:1px solid var(--rule);margin-top:56px}
section.ledger h2,section.tools h2,.panel>h2{font-size:clamp(30px,4.4vw,44px);line-height:1.1;margin:0 auto 12px;max-width:var(--measure);width:100%}
section.ledger .lead,section.tools .lead,.panel>.lead{color:var(--text2);margin:0 auto 28px;max-width:var(--measure);width:100%}
main{padding-top:8px}
nav.tabs{border-bottom:1px solid var(--rule)}
nav.tabs .wrap{max-width:var(--measure);padding:0}
@media (max-width:760px){nav.tabs .wrap{padding:0 20px}}

/* ---- the three numbers ---- */
#groups{border-top:1px solid var(--text)}
details.group{border-bottom:1px solid var(--rule)}
details.group>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:24px;padding:22px 0;min-height:64px}
details.group>summary::-webkit-details-marker{display:none}
details.group>summary::after{content:"";margin-left:auto;width:10px;height:10px;border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);transform:rotate(45deg) translateY(-3px);transition:transform .2s}
details.group[open]>summary::after{transform:rotate(225deg)}
.gn{font-family:var(--font-display);font-size:clamp(44px,6vw,60px);line-height:1;min-width:2.3em;font-variant-numeric:lining-nums;color:var(--text)}
.gt{display:flex;flex-direction:column;gap:2px}
.gc{font-size:17px;color:var(--text)}
.gw{font-size:15px;color:var(--muted)}
details.group .btn.more{margin:8px 0 20px}

/* ---- one record, at a glance ---- */
ul.recs{list-style:none;margin:0;padding:0}
ul.recs>li{margin:0}
details.rec{border-top:1px solid var(--rule)}
ul.recs>li:last-child details.rec{border-bottom:1px solid var(--rule)}
details.rec>summary{list-style:none;cursor:pointer;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"p n" "w n";column-gap:16px;row-gap:2px;padding:14px 4px;min-height:56px;align-items:center}
details.rec>summary::-webkit-details-marker{display:none}
details.rec>summary:hover{background:var(--hover)}
.rp{grid-area:p;font-family:var(--font-display);font-size:21px;line-height:1.25;color:var(--text);overflow-wrap:anywhere}
.rw{grid-area:w;font-size:14px;color:var(--muted);letter-spacing:.01em}
.rnums{grid-area:n;display:flex;gap:10px;align-items:baseline}
.rn{font-family:var(--font-text);font-weight:500;font-size:20px;font-variant-numeric:lining-nums tabular-nums;color:var(--text);min-width:2.2ch;text-align:right}
details.rec[open]>summary .rp{color:var(--link)}
.rbody{padding:4px 4px 22px}
.rq{margin:6px 0 16px;padding:0 0 0 16px;border-left:2px solid var(--star);font-family:var(--font-display);font-size:19px;line-height:1.45;color:var(--text)}
.four-k,.rsrc .k{display:block;font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);margin:0 0 6px}
.four ol{list-style:none;margin:0 0 6px;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
.four li{padding:10px 8px 10px 0;display:flex;flex-direction:column;gap:2px}
.four li .k{font-size:12px;color:var(--muted);line-height:1.25}
.four li .v{font-size:20px;font-variant-numeric:lining-nums tabular-nums;color:var(--text2)}
.four li.on .v{color:var(--text);font-weight:600}
.four li.on .k{color:var(--text)}
.four li.on{box-shadow:inset 0 -3px 0 var(--star)}
.four-why{font-size:15px;color:var(--text2);margin:0 0 10px}
.rsrc{font-size:16px;color:var(--text2);margin:0 0 10px}
.ract{display:flex;flex-wrap:wrap;gap:4px 22px;margin:8px 0 0}
@media (max-width:560px){.four ol{grid-template-columns:repeat(2,minmax(0,1fr))}.rp{font-size:19px}.gn{min-width:1.9em}}

/* ---- primer (collapsed) ---- */
details.primer{margin-top:40px}
details.primer>summary{font-size:17px;color:var(--link);font-weight:500}
.primer-in h3{font-size:24px;margin:28px 0 8px}
.primer-in p{color:var(--text2)}
figure.example{margin:18px 0 24px}
ol.tiles{list-style:none;display:flex;flex-wrap:wrap;gap:10px;margin:0 0 10px;padding:0}
ol.tiles li{display:flex;flex-direction:column;align-items:center;min-width:44px;padding:8px 6px;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
ol.tiles .L{font-family:var(--font-display);font-size:30px;line-height:1.1;color:var(--text)}
ol.tiles .v{font-size:15px;color:var(--muted);font-variant-numeric:lining-nums}
ol.tiles li.eq{border-color:transparent}
ol.tiles .total{font-size:30px;font-family:var(--font-text);font-weight:500;color:var(--text);line-height:1.1}
figure.example figcaption,figure.pull figcaption{font-size:15px;color:var(--muted)}
figure.pull{margin:36px 0;padding:28px 0;border-top:1px solid var(--text);border-bottom:1px solid var(--rule)}
figure.pull blockquote{margin:0 0 12px;padding:0;border:0;font-family:var(--font-display);font-size:clamp(24px,3vw,30px);line-height:1.3;color:var(--text)}

/* ---- the Circle and the tools, lower on the page ---- */
.circlewrap{display:block !important;max-width:820px;margin:16px auto 0}
.fieldbox{border:0 !important}
.cside{height:auto !important;min-height:0 !important;overflow:visible !important;padding:28px 0 0 !important}
.cside blockquote,blockquote{border-left:2px solid var(--star)}
.chipgroup{display:inline-flex;flex-wrap:wrap;align-items:center;margin:0 18px 0 0}
.chiplab{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);margin-right:6px}
#c-list .btn.showall{margin:6px 0 14px}
.const details.box table{margin:6px 0 10px}

/* ---- data tables ---- */
.tblwrap,.const details.box{
  width:100%;max-width:var(--measure);margin-left:auto;margin-right:auto;
  overflow-x:auto;-webkit-overflow-scrolling:touch}
table.t,.const table,#constellating table,main.page table:not(.tup){
  width:100%;max-width:var(--measure);border-collapse:collapse;font-size:17px;margin:8px 0 16px}
table.t th,table.t td,
.const table th,.const table td,
#constellating table th,#constellating table td,
main.page table:not(.tup) th,main.page table:not(.tup) td{
  padding:.6em 1.25em;vertical-align:top;text-align:left;
  border:0;border-bottom:1px solid var(--rule)}
table.t th:first-child,table.t td:first-child,
.const table th:first-child,.const table td:first-child,
#constellating table th:first-child,#constellating table td:first-child,
main.page table:not(.tup) th:first-child,main.page table:not(.tup) td:first-child{padding-left:0}
table.t th:last-child,table.t td:last-child,
.const table th:last-child,.const table td:last-child,
#constellating table th:last-child,#constellating table td:last-child,
main.page table:not(.tup) th:last-child,main.page table:not(.tup) td:last-child{padding-right:0}
table.t thead th,.const table thead th,main.page table:not(.tup) thead th{
  font-weight:500;color:var(--muted);font-size:15px}
/* Tier names stay on one line on desktop; Entries is a right-aligned count. */
main.page table.t th:first-child,main.page table.t td:first-child{white-space:nowrap}
main.page table.t th:last-child,main.page table.t td:last-child,main.page table.t td.r{
  text-align:right;font-variant-numeric:lining-nums tabular-nums}
.const table th:not(:first-child),.const table td:not(:first-child){
  text-align:right;font-variant-numeric:lining-nums tabular-nums}
@media (max-width:560px){
  main.page table:not(.tup) thead,.const table thead{
    position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}
  main.page table:not(.tup),main.page table:not(.tup) tbody,main.page table:not(.tup) tr,
  main.page table:not(.tup) th,main.page table:not(.tup) td,
  .const table,.const table tbody,.const table tr,.const table th,.const table td{
    display:block;width:100%}
  main.page table:not(.tup) tr,.const table tr{
    padding:.9em 0;border-bottom:1px solid var(--rule)}
  main.page table:not(.tup) th,main.page table:not(.tup) td,
  .const table th,.const table td{
    padding:.2em 0;border:0;white-space:normal;text-align:left}
  main.page table:not(.tup) td:first-child,.const table td:first-child{
    font-weight:500;color:var(--text);padding-top:0;padding-bottom:.35em;white-space:normal}
  main.page table:not(.tup) td:last-child,main.page table.t td.r,
  .const table td:not(:first-child){
    text-align:left;padding-bottom:0;font-variant-numeric:lining-nums tabular-nums}
  main.page table.t td:last-child::before,main.page table.t td.r::before{content:"Entries ";color:var(--muted)}
  .const table td[data-label]::before{content:attr(data-label) " ";color:var(--muted);font-weight:400}
}

/* ---- record pages ---- */
.rec-title,.folio .phrase{font-variant-numeric:lining-nums tabular-nums}
.rec-when{margin:0 0 12px;font-size:15px;color:var(--muted)}
.meta-line,.sources dd,.folio .big,.folio .v,.folio .tl i,.folio .wsum{
  font-variant-numeric:lining-nums tabular-nums}
.folio .folio-rule{margin:0 auto 16px;max-width:var(--measure);font-size:16px;line-height:1.5;color:var(--text2);letter-spacing:0;text-transform:none}

/* ---- colophon and the shared footer ---- */
.colophon{font-size:15px;color:var(--muted);padding:40px 0 0;margin-top:56px;border-top:1px solid var(--rule)}
@media (max-width:768px){.colophon{width:calc(100% - 48px) !important}}
.colophon p{margin:0 0 8px}
footer.site-foot{border-top:0;padding:28px 24px 48px;color:var(--text2);font-size:15px;text-align:center}
.site-foot .foot-line{margin:0 0 6px}
.site-foot .foot-line button{font:inherit;color:var(--link);background:none;border:0;padding:8px 4px;min-height:44px;cursor:pointer;font-weight:500}
.site-foot .foot-line button:hover,.site-foot .foot-line button:focus-visible{color:var(--link-hover)}
.site-foot .foot-line a{display:inline-flex;align-items:center;min-height:44px;padding:0 4px}
.site-foot .foot-collab{margin:10px 0 0;color:var(--text2)}
.colophon-heart{width:.9em;height:.9em;vertical-align:-.08em;margin-left:.2em}
.site-foot .house-list{list-style:none;margin:16px auto 8px;padding:0;columns:2 220px;column-gap:24px;text-align:left}
.site-foot .house-list li{break-inside:avoid;margin:0 0 6px}
.site-foot .house-list a{display:flex;flex-direction:column;padding:4px 0;min-height:44px}
.foot-door-host{font-size:13px;color:var(--muted);font-weight:400}
.site-foot .foot-seal{margin:22px 0 0;letter-spacing:.2em;color:var(--muted);font-size:14px}
@media (max-width:560px){.wrap{padding-left:24px !important;padding-right:24px !important}nav.tabs .wrap{padding:0 24px}}
a,button,.lk,.chip,.btn,summary,.pole .pq{text-decoration:none !important}
.lk,.lk.inline{color:var(--link)} .lk:hover,.lk:focus-visible{color:var(--link-hover)}
.chip{color:var(--link)} .chip:hover,.chip:focus-visible{color:var(--link-hover)} .chip[aria-pressed=true]{color:var(--text);font-weight:600}
#c-list,.wavelist{display:block !important;width:100%}
#c-list ul.recs,#c-list details.rec,.results details.rec,#cc-found details.rec{width:100%}
.results{display:block !important}

/* Search results: spacing instead of a rule under every hit. The field keeps one underline. */
.panel .results details.rec{border-top:0}
.panel .results ul.recs>li:last-child details.rec{border-bottom:0}
.panel .results details.srow>summary{padding:18px 0}

#p-search .four ol{border-top:0;border-bottom:0}
.suggest{margin:4px 0 10px;font-size:16px;line-height:1.5;color:var(--text2)}
.suggest button{font:inherit;font-size:inherit;color:var(--link);background:none;border:0;padding:0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.suggest button:hover,.suggest button:focus{color:var(--text)}
