/* Poster look: warm paper, one sans family, hairlines instead of boxes,
   small tracked labels above plain values. Light only, like print. */
:root {
  color-scheme: light;
  --paper: #f3ead9; --paper-deep: #eadfca; --ink: #111111; --grey: #6b655b;
  --label: #7d6840; --rule: #cdbf9f; --link: #111111; --tap: 44px;
  --stripe: linear-gradient(90deg, #5fa544 0 16.6%, #f2b632 16.6% 33.3%, #ef8a2c 33.3% 50%,
    #d9453b 50% 66.6%, #8d4a9c 66.6% 83.3%, #2f8fcf 83.3% 100%);
  --sans: "Helvetica Neue", Helvetica, "Inter", Arial, "Noto Sans", "Noto Sans Arabic", "Noto Sans Devanagari",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --track: .09em;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; color: var(--ink); font: 400 18px/1.6 var(--sans);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 55%, var(--paper-deep) 100%) fixed; }
.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.4rem; }
a { color: var(--link); text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-color: var(--ink); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 1rem; top: 1rem; background: var(--paper); padding: .6rem .9rem; z-index: 5; }

/* Small tracked capitals: the poster's label voice. Scripts without capitals
   or with joined letters keep their natural spacing. */
.nav a, .langs summary, .crumbs, .toc-title, .next-label, .updated, th, .card-title, .sources h2 {
  font-size: .72rem; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; }
:lang(ar) *, :lang(hi) *, :lang(zh-Hans) * { letter-spacing: 0 !important; }
:is(:lang(ar), :lang(hi), :lang(zh-Hans)) :is(.nav a, .langs summary, .crumbs, .toc-title, .next-label, .updated, th, .card-title, .sources h2) { font-size: .88rem; }

/* Header */
.top { padding-top: 1.6rem; }
.bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.brand { font-size: 1.15rem; font-weight: 500; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.tagline { margin: .1rem 0 0; color: var(--grey); font-size: .85rem; line-height: 1.35; }
.nav { display: flex; gap: 1.4rem; overflow-x: auto; scrollbar-width: none; margin-top: 1.1rem;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; display: inline-flex; align-items: center; min-height: var(--tap); color: var(--label);
  text-decoration: none; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

/* Language menu */
.langs { position: relative; flex: none; }
.langs summary { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 .1rem; cursor: pointer;
  color: var(--label); white-space: nowrap; list-style: none; }
.langs summary:hover { color: var(--ink); }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: "+"; margin-inline-start: .5rem; }
.langs[open] summary::after { content: "–"; }
.langs ul { position: absolute; inset-inline-end: 0; z-index: 4; margin: 0; padding: .3rem .9rem; list-style: none;
  background: var(--paper); border: 1px solid var(--rule); width: max-content;
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.4rem; }
.langs li { margin: 0; }
.langs a { display: flex; align-items: center; min-height: var(--tap); font-size: .9rem; text-decoration: none; color: var(--grey); }
.langs a:hover, .langs a[aria-current="true"] { color: var(--ink); }

/* Article */
.article { padding-top: 3.2rem; padding-bottom: 3.5rem; }
.crumbs { display: flex; gap: .6rem; flex-wrap: wrap; color: var(--label); margin-bottom: 2.2rem; }
.crumbs a { color: var(--label); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
h1 { font-size: clamp(2.3rem, 8.5vw, 3.9rem); font-weight: 500; line-height: 1.02; letter-spacing: -.04em;
  margin: 0 0 1rem; text-wrap: balance; }
h1::before { content: ""; display: block; width: 6.5rem; height: 4px; margin-bottom: 1.5rem; background: var(--stripe); }
h2 { font-size: 1.45rem; font-weight: 500; line-height: 1.2; letter-spacing: -.025em; margin: 3rem 0 .7rem; }
h2::before, .toc::before, .next::before, .updated::before {
  content: ""; display: block; width: 1.5rem; height: 1px; background: var(--rule); margin-bottom: 1.3rem; }
h3 { font-size: 1.05rem; font-weight: 500; margin: 1.7rem 0 .4rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-inline-start: 1.2rem; }
li { margin-bottom: .35rem; }
li::marker { color: var(--label); }
strong { font-weight: 600; }

/* The line under the title: larger and grey, the only text set this way */
.lead { font-size: clamp(1.2rem, 3.4vw, 1.5rem); line-height: 1.35; letter-spacing: -.015em; color: var(--grey);
  margin: 0 0 2.6rem; max-width: 36rem; }

/* Contents as a short numbered spec */
.toc { margin-bottom: .5rem; }
.toc-title, .next-label { color: var(--label); margin-bottom: .5rem; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: section; }
.toc li { margin: 0; counter-increment: section; }
.toc a { display: flex; align-items: baseline; gap: .9rem; min-height: 2.3rem; padding: .35rem 0; text-decoration: none; font-size: .98rem; }
.toc a::before { content: counter(section, decimal-leading-zero); color: var(--label); font-size: .72rem; letter-spacing: var(--track); }
.toc a:hover { text-decoration: underline; text-decoration-color: var(--ink); }

/* Topics as label-over-value rows, split by short rules */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); column-gap: 2.5rem; margin: 0 0 1rem; }
.card { display: flex; flex-direction: column; gap: .3rem; padding: 1.2rem 0 1.3rem; min-height: var(--tap);
  text-decoration: none; color: var(--ink); position: relative; }
.card::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 1.5rem; height: 1px; background: var(--rule);
  transition: width .25s ease, background-color .25s ease; }
.card:hover::before { width: 100%; background: var(--ink); }
@media (prefers-reduced-motion: reduce) { .card::before { transition: none; } }
.card-title { color: var(--label); }
.card:hover .card-title { color: var(--ink); }
.card-text { font-size: .98rem; line-height: 1.45; }

table { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem; font-size: .93rem; display: block; overflow-x: auto; }
th, td { text-align: start; vertical-align: top; padding: .7rem 1.4rem .7rem 0; border-bottom: 1px solid var(--rule); }
[dir="rtl"] th, [dir="rtl"] td { padding: .7rem 0 .7rem 1.4rem; }
th { color: var(--label); }

.sources { margin-top: 3rem; font-size: .88rem; color: var(--grey); }
.sources h2 { color: var(--label); margin: 0 0 .6rem; }
.sources ul { list-style: none; padding: 0; }
.sources a { color: var(--grey); overflow-wrap: anywhere; }
.sources a:hover { color: var(--ink); }

.next { margin-top: 3rem; }
.next .card { padding-top: 0; }
.next .card::before { display: none; }
.updated { color: var(--label); margin-top: 3rem; }
.foot { color: var(--grey); font-size: .82rem; line-height: 1.5; padding: 0 0 3rem; }
.foot .wrap::before { content: ""; display: block; height: 1px; background: var(--rule); margin-bottom: 1.4rem; }
.foot p { max-width: 30rem; }
.foot a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--grey); }
