/* The research articles (/articles and /articles/...). Loaded after site/pages.css, whose tokens it uses: nothing here
   defines a colour of its own. A post is one narrow column of prose with plain HTML charts, so every
   figure reads as text too (no hover needed, nothing drawn in a canvas). */
.post-head{padding:clamp(22px,3vw,32px) 0 clamp(8px,2vw,16px)}
.narrow{max-width:780px;margin:0 auto;padding:0 24px}
.post-date{display:block;margin:clamp(28px,4vw,44px) 0 0}
.post h1{font-size:clamp(34px,5vw,56px);font-weight:var(--weight-display);letter-spacing:-.035em;line-height:1.04}
.post .lede{font-size:clamp(18px,1.8vw,21px);color:var(--muted);line-height:1.6;margin-top:22px}
.post-figs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:32px;background:var(--paper);border:1px solid var(--line);border-radius:var(--card-radius);overflow:hidden}
.post-figs div{padding:18px 20px;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:4px}
.post-figs div:last-child{border-right:0}
.post-figs b{font-family:var(--num-font);font-weight:var(--num-weight);font-size:clamp(24px,2.6vw,30px);letter-spacing:-.02em;line-height:1.1}
.post-figs span{font-size:13px;line-height:1.4;color:var(--muted)}
.post-body section{padding:clamp(32px,4.5vw,52px) 0;border-top:1px solid var(--line)}
.post-body section:first-child{border-top:0}
.post-body h2{font-size:clamp(26px,3vw,36px);font-weight:var(--weight-display);letter-spacing:-.03em;line-height:1.1}
.post-body p{margin-top:16px}
.post-body .method p{color:var(--muted);font-size:15.5px}
.takeaway{margin-top:24px;padding:18px 20px;border-radius:12px;background:var(--panel)}
.takeaway .eyebrow{margin-bottom:6px}
.takeaway p{margin-top:0}
figure.chart{margin:24px 0 0;padding:20px 20px 16px;background:var(--paper);border:1px solid var(--line);border-radius:var(--card-radius)}
figure.chart figcaption{font:600 15px/1.35 var(--display);margin-bottom:14px}
figure.chart figcaption span{display:block;font:400 13px/1.4 var(--body);color:var(--muted);margin-top:2px}
.legend{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:12.5px;color:var(--muted);margin-bottom:12px}
.legend span{display:inline-flex;align-items:center;gap:6px}
.legend i{display:inline-block;width:12px;height:12px;border-radius:3px}
.bars{display:grid;gap:7px}
.bar-row{display:grid;grid-template-columns:minmax(120px,190px) minmax(0,1fr);gap:14px;align-items:center;font-size:14.5px;line-height:1.3}
.bar-track,.stack-row{display:flex;align-items:center;gap:8px;min-width:0}
.bar{height:13px;width:calc((100% - 52px) * var(--w));min-width:2px;border-radius:0 4px 4px 0;flex:none}
.bar-val{font-weight:600;font-size:13.5px;font-variant-numeric:tabular-nums;white-space:nowrap}
.stack{display:flex;gap:2px;height:13px;flex:1 1 auto;min-width:0}
.stack span{height:13px;min-width:2px;flex:0 1 auto}
.stack span:last-child{border-radius:0 4px 4px 0}
.b-blue{background:var(--axio-blue)}.b-red{background:var(--axio-red)}.b-yellow{background:var(--axio-yellow)}.b-slate{background:var(--slate)}
.table-wrap{overflow-x:auto}
figure.chart table{width:100%;border-collapse:collapse;font-size:14.5px}
figure.chart th,figure.chart td{text-align:left;padding:9px 10px;border-bottom:1px solid var(--line);vertical-align:top}
figure.chart thead th{font:600 12.5px/1.3 var(--body);color:var(--muted)}
figure.chart tbody th{font-weight:600;white-space:nowrap}
figure.chart td b{font-variant-numeric:tabular-nums}
/* lists, two-bar rows and the index (/articles) */
.post-body ul{margin:16px 0 0;padding-left:1.3em}
.post-body li{margin-top:8px}
.post-body .method li{color:var(--muted);font-size:15.5px}
.bar-duo{display:grid;gap:3px;min-width:0}
.bar-duo .bar{height:9px}
.post-index{padding-bottom:clamp(40px,6vw,72px)}
.post-list{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:14px}
.post-card{padding:22px 24px;background:var(--paper);border:1px solid var(--line);border-radius:var(--card-radius)}
.post-card .eyebrow{margin-bottom:8px}
.post-card h2{font-size:clamp(21px,2.4vw,26px);font-weight:var(--weight-display);letter-spacing:-.02em;line-height:1.2}
.post-card h2 a{color:var(--ink);text-decoration:none}
.post-card h2 a:hover{color:var(--accent-ink);text-decoration:underline}
.post-card p{margin-top:10px;color:var(--muted);font-size:16px;line-height:1.6}
.scroll-hint{display:none}
/* the "More articles" rail (scripts/build-articles.mjs writes it): every other article as a card whose thumbnail is
   that article's lead figure and the first bars of its first chart. Under the article below 1,120px, beside it above. */
.rail{max-width:780px;margin:0 auto;padding:clamp(32px,4.5vw,52px) 24px;border-top:1px solid var(--line)}
.rail-head{font-family:var(--mono);font-size:11px;font-weight:600;line-height:1.4;letter-spacing:.14em;text-transform:uppercase;color:var(--accent-ink)}
.rail-list{list-style:none;margin:14px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px}
.rail-card{display:flex;flex-direction:column;gap:8px;height:100%;padding:10px 10px 14px;background:var(--paper);border:1px solid var(--line);border-radius:var(--card-radius);color:var(--ink);text-decoration:none;transition:border-color .2s}
.rail-card:hover{border-color:var(--accent-ink)}
.rail-card:hover .rail-title{color:var(--accent-ink);text-decoration:underline}
.rail-card:focus-visible{outline:2px solid var(--accent-ink);outline-offset:2px}
.thumb{display:flex;flex-direction:column;justify-content:space-between;gap:12px;aspect-ratio:16/9;padding:12px 14px;border-radius:calc(var(--card-radius) - 8px);background:var(--panel);overflow:hidden}
.thumb-fig{font-size:12px;line-height:1.35;color:var(--muted)}
.thumb-fig span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.thumb-fig b{display:block;font-family:var(--num-font);font-weight:var(--num-weight);font-size:26px;letter-spacing:-.02em;line-height:1.1;color:var(--ink)}
.thumb-bars{display:grid;gap:5px}
.thumb-bars i{display:block;height:7px;width:calc(100% * var(--w));min-width:3px;border-radius:0 3px 3px 0}
.rail-date{padding:0 4px;font-family:var(--mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.rail-title{padding:0 4px;font:700 15.5px/1.3 var(--display);letter-spacing:-.01em}
.rail-all{display:inline-block;margin-top:16px;font-weight:600;font-size:14.5px;color:var(--accent-ink)}
@media(min-width:1120px){
  .post-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:32px;align-items:start;max-width:1180px;margin:0 auto;padding-right:24px}
  .post-layout .narrow{margin-right:0}
  /* Pinned beside the article as it scrolls. */
  .rail{position:sticky;top:88px;max-height:calc(100vh - 104px);overflow-y:auto;scrollbar-width:thin;margin-top:clamp(28px,4vw,44px);padding:0;border-top:0}
}
/* Beside the article, and on a phone, the cards turn compact: thumbnail left, date and title right, one column. */
@media(min-width:1120px),(max-width:640px){
  .rail-list{grid-template-columns:1fr;gap:10px}
  .rail-card{display:grid;grid-template-columns:104px minmax(0,1fr);grid-template-rows:auto 1fr;column-gap:12px;row-gap:4px;padding:8px}
  .thumb{grid-row:1/3;aspect-ratio:auto;min-height:80px;gap:8px;padding:9px 10px}
  .thumb-fig span{display:none}
  .thumb-fig b{font-size:19px}
  .thumb-bars{gap:4px}
  .thumb-bars i{height:5px}
  .rail-date{padding:2px 0 0;font-size:10.5px}
  .rail-title{padding:0;font-size:14px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
}
@media(prefers-reduced-motion:reduce){.rail-card{transition:none}}
.table-wrap.dense table{font-size:13.5px}
.table-wrap.dense th,.table-wrap.dense td{padding:8px 6px}
@media(max-width:640px){
  figure.chart{padding:16px 14px 12px}
  figure.chart table{font-size:13.5px}
  figure.chart .scroll-hint{display:block;margin:0 0 8px;font-size:12.5px;color:var(--muted)}
  figure.chart th,figure.chart td{padding:8px 7px}
  figure.chart tbody th{white-space:normal;min-width:7.5em}
  .post-figs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .post-figs div:nth-child(2){border-right:0}
  .post-figs div:nth-child(-n+2){border-bottom:1px solid var(--line)}
  .bar-row{grid-template-columns:1fr;gap:4px}
}
