.fact-site {
  --surface: #fcfbf4;
  --paper: #f3f1e7;
  --green-dark: #203729;
  --green: #304e36;
  --edge: #b5bca9;
  --ink: #1d2922;
  color: var(--ink);
}
.fact-site .wrap { width: min(70rem, 89%); }
.fact-site .mast nav { flex-wrap: wrap; }
.fact-site .mast nav a[aria-current] { color: var(--signal); }
.fact-site main a, .fact-footer a { text-decoration: underline; text-underline-offset: .18em; }
.fact-site a:hover { text-decoration-thickness: .14em; }
.fact-site button, .fact-site input, .fact-site select { font: inherit; }
.fact-site button:focus-visible, .fact-site [tabindex="-1"]:focus-visible, .fact-site select:focus-visible { outline: 3px solid #c6631e; outline-offset: 3px; }
.fact-site [hidden] { display: none !important; }
.page-head { background: var(--coal); color: var(--paper); }
.page-head-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem 2rem; padding-block: clamp(1.8rem, 4.6vw, 4rem); }
.page-head h1 { max-width: 19ch; font: 600 clamp(2.6rem, 6.6vw, 5rem)/.99 Georgia, 'Times New Roman', serif; letter-spacing: -.055em; }
.page-head p { max-width: 57ch; margin-top: .95rem; font-size: clamp(1rem,1.7vw,1.18rem); color: #d9e1d5; }
.fact-site .action, .fact-site .quiet-action {
  display: inline-block; flex: none; min-height: 2.8rem; padding: .65rem 1rem;
  border: 1px solid transparent; border-radius: .12rem; background: var(--signal); color: #18251d;
  font: 700 .94rem/1.35 var(--sans); text-align: center; text-decoration: none;
}
.fact-site .quiet-action { background: transparent; color: #e8eddf; border-color: #77867b; }
.fact-site .action:hover, .fact-site .quiet-action:hover { text-decoration: underline; }
.content { padding-block: clamp(1.5rem,3.6vw,2.9rem) 3.5rem; }
.featured-fact { background: var(--surface); border: 1px solid var(--edge); border-top: .32rem solid var(--green); padding: clamp(1.1rem,3.3vw,2.2rem); box-shadow: .28rem .28rem 0 #dce0d0; }
.feature-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.15rem; }
.feature-head p, .card-count, .edition { font: 600 .79rem/1.45 var(--mono); color: #4d6150; }
#fact-shuffle { border: 1px solid #8d9b89; border-radius: .1rem; background: transparent; color: var(--green); min-height: 2.55rem; font-weight: 700; padding: .4rem .8rem; }
#fact-shuffle:hover { background: #e8eedc; }
.feature-body { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,.95fr); gap: clamp(1.2rem,4.5vw,3.9rem); align-items: start; }
.feature-body h2 { max-width: 25ch; font: 600 clamp(1.7rem,3.2vw,2.7rem)/1.07 Georgia,serif; letter-spacing: -.035em; }
.feature-body p[data-feature=fact] { margin: .9rem 0 1.1rem; font-size: 1.05rem; }
.feature-evidence { padding: .9rem 1.05rem; border-left: .24rem solid #82a765; background: #eef2df; }
.evidence-values { list-style: none; padding: 0; margin: 0; }
.evidence-values li { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding-block: .45rem; border-bottom: 1px solid #c2ccb7; }
.evidence-values li:last-child { border-bottom: 0; }
.evidence-values li span, .evidence-values li strong { min-width: 0; overflow-wrap: anywhere; }
.evidence-values li strong { color: #26482e; font-variant-numeric: tabular-nums; text-align: right; }
.feature-evidence .edition { padding-top: .6rem; border-top: 1px solid #bbc7ad; margin-top: .35rem; font-weight: 400; }
.calculation-link { font-weight: 750; }
.proof-links { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.featured-fact > .proof-links { margin-top: 1.25rem; border-top: 1px solid var(--edge); padding-top: .85rem; }
.proof-links a { color: var(--green); font-weight: 650; font-size: .94rem; }
.collections { margin-top: clamp(2.2rem,5vw,4rem); }
.collections h2, .list-top h2, .quiz-card h2, .sample-question h2 { font: 600 clamp(1.55rem,3vw,2.25rem)/1.15 Georgia,serif; letter-spacing: -.035em; }
.collection-grid, .fact-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.collection-grid { margin-top: 1.15rem; gap: 1rem; }
.collection-card { padding: 1.2rem 1.35rem; border: 1px solid var(--edge); background: var(--surface); }
.collection-card h3 { font-size: 1.36rem; letter-spacing: -.035em; }
.collection-card h3 a { text-decoration: none; }
.collection-card h3 a:hover { text-decoration: underline; }
.collection-card > p:not(.card-count) { margin-top: .5rem; }
.collection-card .sample-link { border-top: 1px solid #d8dacc; padding-top: .75rem; font-size: .93rem; }
.card-count { float: right; margin: .25rem 0 .25rem .75rem; }
.trail { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.45rem; color: #475646; font-size: .93rem; }
.list-top { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.list-top p { margin-top: .2rem; color: var(--muted); }
.list-top label { display: block; margin-bottom: .24rem; font-weight: 700; font-size: .88rem; }
#fact-search, #quiz-topic { width: 100%; min-height: 2.7rem; padding: .45rem .65rem; background: #fffdf6; border: 1px solid #808d79; color: var(--ink); }
.fact-list { margin-top: 1rem; border-top: 1px solid var(--green); align-items: start; column-gap: 2rem; }
.fact-item { padding: 1.2rem 0; border-bottom: 1px solid var(--edge); scroll-margin-top: 1.1rem; min-width: 0; overflow-wrap: anywhere; }
.fact-item:target { outline: 2px solid #537440; outline-offset: .25rem; background: #f9fbeb; }
.fact-item h3 { font: 650 1.23rem/1.24 var(--sans); letter-spacing: -.025em; }
.fact-item h3 a { text-decoration: none; }
.fact-item h3 a:hover { text-decoration: underline; }
.statement { margin: .55rem 0 .65rem; }
.working { margin-top: .75rem; }
.working summary, .sample-question summary, .data-credit summary { width: fit-content; color: var(--green); cursor: pointer; font-weight: 650; }
.working[open] { background: #edf0e3; padding: .7rem .9rem; }
.working p, .working ul, .sample-question h2, .sample-question p { margin-block: .6rem; }
.working a { font-size: .93rem; }
.data-credit, .sample-question { margin-top: 1.8rem; padding-block: .9rem; border-top: 1px solid var(--edge); }
.data-credit p { margin-top: .55rem; max-width: 82ch; }
#fact-empty { margin-block: 1rem; }
.quiz-content { max-width: 54rem; }
.quiz-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .9rem; padding: .75rem 1.1rem; border: 1px solid var(--green); background: #dce6cc; font: 650 .9rem/1.4 var(--sans); }
.quiz-bar label { font-weight: 650; }
#quiz-topic { width: auto; max-width: 100%; min-height: 2.45rem; padding-inline-end: .35rem; }
#quiz-round { margin-inline-start: auto; }
#quiz-score { color: #42563a; }
.quiz-card { border: 1px solid var(--green); border-top: none; background: var(--surface); padding: clamp(1.1rem,3.4vw,2.4rem); }
.quiz-card h2, .quiz-summary { overflow-wrap: anywhere; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-block: 1.35rem .4rem; }
.quiz-options button { min-width: 0; padding: .8rem 1.05rem; min-height: 3.25rem; border: 1px solid #8f9c86; background: #f0f2e7; text-align: left; color: #253b29; font-weight: 650; }
.quiz-options button:hover:not(:disabled) { background: #e1ecd1; border-color: #556f49; }
.quiz-options button[data-result=correct] { background: #d8ebc8; border: 2px solid #4d7043; }
.quiz-options button[data-result=incorrect] { background: #f5e3d8; border: 2px solid #a85f43; }
.quiz-options button:disabled { opacity: 1; cursor: default; }
.quiz-reveal { display: grid; gap: .55rem; margin-block: 1.15rem; padding: .9rem 1.05rem; background: #edf1e4; border-left: .22rem solid #819f6d; }
.evidence-hint { color: var(--muted); font-size: .88rem; }
.quiz-reveal h3 { font-size: 1.05rem; }
#quiz-next, #quiz-again { margin-top: .55rem; background: var(--green-dark); color: white; }
.quiz-summary ol { padding-left: 1.45rem; }
.quiz-summary li { padding: .5rem .25rem; }
.fact-footer { background: var(--coal); color: #f0f3e7; padding-block: 1.2rem; }
.fact-footer .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
@media (max-width: 700px) {
  .page-head-inner { display: block; }
  .page-head-inner > a { margin-top: 1rem; }
  .feature-body, .collection-grid, .fact-list { grid-template-columns: 1fr; }
  .feature-evidence { margin-top: .2rem; }
  .fact-site .wrap { width: min(93%,70rem); }
  .fact-site .mast nav { gap: .7rem; }
  .list-top { align-items: flex-start; flex-direction: column; }
  .list-top [data-fact-search] { width: 100%; }
}
@media (max-width: 470px) {
  .feature-head { gap: .5rem; flex-wrap: wrap; }
  .quiz-options { grid-template-columns: 1fr; }
  .quiz-bar { gap: .35rem .65rem; }
  #quiz-round { margin-inline-start: 0; }
  .quiz-bar select { flex: 1 1 68%; }
}

#library-search { margin-bottom: 1.4rem; }
#library-search label { display: block; font-weight: 650; margin-bottom: .35rem; }
#library-query { width: 100%; min-height: 2.9rem; padding: .5rem .8rem; font: inherit; color: var(--ink); background: #fffdf6; border: 1px solid #808d79; }
#library-count:not(:empty) { margin-top: .8rem; }
#library-matches { list-style: none; padding: 0; margin: 0; overflow-wrap: anywhere; }
#library-matches li { padding: .8rem 0; border-bottom: 1px solid var(--edge); }
#library-matches a { text-decoration: underline; text-underline-offset: .18em; }
