/* Chart kit (scripts/charts.mjs) and the /graphics/ components. The build links this
   file only on pages that use one of its classes (see chartCss in scripts/build.mjs). */

/* ---- Chart kit (scripts/charts.mjs) -------------------------------------- */
.x0{--x:0%}.x1{--x:1%}.x2{--x:2%}.x3{--x:3%}.x4{--x:4%}.x5{--x:5%}.x6{--x:6%}.x7{--x:7%}.x8{--x:8%}.x9{--x:9%}.x10{--x:10%}.x11{--x:11%}.x12{--x:12%}.x13{--x:13%}.x14{--x:14%}.x15{--x:15%}.x16{--x:16%}.x17{--x:17%}.x18{--x:18%}.x19{--x:19%}.x20{--x:20%}.x21{--x:21%}.x22{--x:22%}.x23{--x:23%}.x24{--x:24%}.x25{--x:25%}.x26{--x:26%}.x27{--x:27%}.x28{--x:28%}.x29{--x:29%}.x30{--x:30%}.x31{--x:31%}.x32{--x:32%}.x33{--x:33%}.x34{--x:34%}.x35{--x:35%}.x36{--x:36%}.x37{--x:37%}.x38{--x:38%}.x39{--x:39%}.x40{--x:40%}.x41{--x:41%}.x42{--x:42%}.x43{--x:43%}.x44{--x:44%}.x45{--x:45%}.x46{--x:46%}.x47{--x:47%}.x48{--x:48%}.x49{--x:49%}.x50{--x:50%}.x51{--x:51%}.x52{--x:52%}.x53{--x:53%}.x54{--x:54%}.x55{--x:55%}.x56{--x:56%}.x57{--x:57%}.x58{--x:58%}.x59{--x:59%}.x60{--x:60%}.x61{--x:61%}.x62{--x:62%}.x63{--x:63%}.x64{--x:64%}.x65{--x:65%}.x66{--x:66%}.x67{--x:67%}.x68{--x:68%}.x69{--x:69%}.x70{--x:70%}.x71{--x:71%}.x72{--x:72%}.x73{--x:73%}.x74{--x:74%}.x75{--x:75%}.x76{--x:76%}.x77{--x:77%}.x78{--x:78%}.x79{--x:79%}.x80{--x:80%}.x81{--x:81%}.x82{--x:82%}.x83{--x:83%}.x84{--x:84%}.x85{--x:85%}.x86{--x:86%}.x87{--x:87%}.x88{--x:88%}.x89{--x:89%}.x90{--x:90%}.x91{--x:91%}.x92{--x:92%}.x93{--x:93%}.x94{--x:94%}.x95{--x:95%}.x96{--x:96%}.x97{--x:97%}.x98{--x:98%}.x99{--x:99%}.x100{--x:100%}
.l0{--l:0%}.l1{--l:1%}.l2{--l:2%}.l3{--l:3%}.l4{--l:4%}.l5{--l:5%}.l6{--l:6%}.l7{--l:7%}.l8{--l:8%}.l9{--l:9%}.l10{--l:10%}.l11{--l:11%}.l12{--l:12%}.l13{--l:13%}.l14{--l:14%}.l15{--l:15%}.l16{--l:16%}.l17{--l:17%}.l18{--l:18%}.l19{--l:19%}.l20{--l:20%}.l21{--l:21%}.l22{--l:22%}.l23{--l:23%}.l24{--l:24%}.l25{--l:25%}.l26{--l:26%}.l27{--l:27%}.l28{--l:28%}.l29{--l:29%}.l30{--l:30%}.l31{--l:31%}.l32{--l:32%}.l33{--l:33%}.l34{--l:34%}.l35{--l:35%}.l36{--l:36%}.l37{--l:37%}.l38{--l:38%}.l39{--l:39%}.l40{--l:40%}.l41{--l:41%}.l42{--l:42%}.l43{--l:43%}.l44{--l:44%}.l45{--l:45%}.l46{--l:46%}.l47{--l:47%}.l48{--l:48%}.l49{--l:49%}.l50{--l:50%}.l51{--l:51%}.l52{--l:52%}.l53{--l:53%}.l54{--l:54%}.l55{--l:55%}.l56{--l:56%}.l57{--l:57%}.l58{--l:58%}.l59{--l:59%}.l60{--l:60%}.l61{--l:61%}.l62{--l:62%}.l63{--l:63%}.l64{--l:64%}.l65{--l:65%}.l66{--l:66%}.l67{--l:67%}.l68{--l:68%}.l69{--l:69%}.l70{--l:70%}.l71{--l:71%}.l72{--l:72%}.l73{--l:73%}.l74{--l:74%}.l75{--l:75%}.l76{--l:76%}.l77{--l:77%}.l78{--l:78%}.l79{--l:79%}.l80{--l:80%}.l81{--l:81%}.l82{--l:82%}.l83{--l:83%}.l84{--l:84%}.l85{--l:85%}.l86{--l:86%}.l87{--l:87%}.l88{--l:88%}.l89{--l:89%}.l90{--l:90%}.l91{--l:91%}.l92{--l:92%}.l93{--l:93%}.l94{--l:94%}.l95{--l:95%}.l96{--l:96%}.l97{--l:97%}.l98{--l:98%}.l99{--l:99%}.l100{--l:100%}

.q1 { --k: var(--q1); } .q2 { --k: var(--q2); } .q3 { --k: var(--q3); } .q4 { --k: var(--q4); } .q5 { --k: var(--q5); } .q6 { --k: var(--q6); } .q7 { --k: var(--q7); }

.chart-card > .chart-card__sub { font-size: 0.8125rem; color: var(--slate); margin: 0 0 1.5rem; }

.chart-grid { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 52rem) {
 .chart-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .chart-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .chart-card--wide { grid-column: 1 / -1; } }

/* KPI tile */
.kpi { position: relative; display: grid; gap: 0.35rem; align-content: start; background: var(--wash); border-radius: var(--r-card); padding: 1.25rem 1.25rem 0; overflow: hidden; min-height: 11rem; }

.kpi__value { margin: 0; font-size: clamp(2rem, 3.4vw, 2.6rem); font-weight: 500; line-height: 1; letter-spacing: -0.045em; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi__value small { font-size: 0.45em; letter-spacing: 0; margin-left: 0.15em; color: var(--slate); font-weight: 400; }
.kpi__note { margin: 0; font-size: 0.8125rem; color: var(--slate); position: relative; }
.kpi__spark { display: block; width: calc(100% + 2.5rem); height: 3.25rem; margin: 0.5rem -1.25rem 0; }
.kpi__spark .line { fill: none; stroke: var(--green); stroke-width: 2; }
.kpi__spark .area { fill: var(--tint); }
.delta { justify-self: start; font-size: 0.75rem; font-weight: 500; padding: 0.2rem 0.5rem; border-radius: 999px; }
.delta--good { background: var(--tint); color: var(--green); }
.delta--bad { background: var(--differs-tint); color: var(--differs); }

.ring__track { stroke: var(--wash); }
.ring__arc { stroke: var(--k); stroke-linecap: round; }

.rings { display: flex; flex-wrap: wrap; gap: 1.5rem 2rem; align-items: center; }

/* Stacked, ranked and meter bars share one row anatomy */
.stack, .rank { display: grid; grid-template-columns: minmax(6rem, 10rem) minmax(0, 1fr) 3rem; gap: 0.9rem; align-items: center; padding: 0.4rem 0; font-size: 0.875rem; }

.stack__val, .rank__val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.rank { grid-template-columns: minmax(6rem, 13rem) minmax(0, 1fr) 4rem; }
.stack__bar { display: flex; gap: 2px; height: 0.9rem; }
.stack__bar i { width: var(--p); background: var(--k); }
.stack__bar i:first-child { border-radius: 4px 0 0 4px; }
.stack__bar i:last-child { border-radius: 0 4px 4px 0; }
.stack__bar i:only-child { border-radius: 4px; }
.rank__track { height: 0.9rem; }
.rank__track i { display: block; height: 100%; width: var(--p); background: var(--k); border-radius: 0 4px 4px 0; }
.meter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem 1rem; padding: 0.55rem 0; font-size: 0.875rem; }

.meter__val { color: var(--slate); font-variant-numeric: tabular-nums; }
.meter__val b { color: var(--ink); font-weight: 500; }
.meter__track { grid-column: 1 / -1; height: 0.5rem; border-radius: 999px; background: var(--wash); overflow: hidden; }
.meter__track i { display: block; height: 100%; width: var(--p); background: var(--k); border-radius: 999px; }

/* Lines */
.lines__plot { position: relative; height: 15rem; margin: 0.5rem 5.5rem 0 2.75rem; }
.lines__plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lines__tick { position: absolute; left: -2.75rem; right: 0; bottom: var(--p); transform: translateY(50%); font-size: 0.75rem; color: var(--slate); display: flex; align-items: center; gap: 0.6rem; }
.lines__tick::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.lines__tick:first-child::after { border-top-color: var(--rule-strong); }

.lines__dot { position: absolute; left: var(--x); bottom: var(--p); width: 0.6rem; height: 0.6rem; margin: 0 0 -0.3rem -0.3rem; border-radius: 50%; background: var(--k); box-shadow: 0 0 0 2px #fff; opacity: 0; transition: opacity 0.15s; }
.lines__plot:hover .lines__dot { opacity: 1; }
.lines__dot:last-of-type, .lines__dot.x100 { opacity: 1; }
.lines__end { position: absolute; left: calc(100% + 0.6rem); bottom: var(--p); transform: translateY(50%); font-size: 0.8125rem; font-weight: 500; color: var(--ink); white-space: nowrap; line-height: 1.2; }
.lines__end em { display: block; font-style: normal; font-weight: 400; color: var(--slate); font-size: 0.75rem; }
.lines__x { position: relative; height: 1.5rem; margin: 0.5rem 5.5rem 0 2.75rem; font-size: 0.75rem; color: var(--slate); }
.lines__x span { position: absolute; left: var(--x); transform: translateX(-50%); }
@media (max-width: 40rem) { .lines__x span:nth-child(even) { display: none; } }

/* Columns */
.columns__plot { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; height: 12rem; align-items: end; border-bottom: 1px solid var(--rule-strong); }
.col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.col b { font-size: 0.8125rem; font-weight: 500; color: var(--ink); text-align: center; margin-bottom: 0.3rem; min-height: 1em; }
.col i { display: block; height: var(--p); background: var(--k); border-radius: 4px 4px 0 0; }
.col--soft { opacity: 0.35; }
.columns__x { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin-top: 0.5rem; font-size: 0.75rem; color: var(--slate); text-align: center; }

/* Heatmap */
.heat__t { font-size: 0.8125rem; }
.heat__t th, .heat__t td { padding: 2px; border: 0; vertical-align: middle; }
.heat__t thead th { border: 0; text-align: center; font-size: 0.75rem; }
.heat__t tbody th { font-weight: 400; color: var(--ink); padding-right: 1rem; white-space: nowrap; }
.heat__t td i { display: grid; place-items: center; min-width: 2.6rem; height: 2.1rem; border-radius: 5px; background: var(--k); font-style: normal; font-size: 0.75rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.heat__t td i.q5, .heat__t td i.q6, .heat__t td i.q7 { color: #fff; }
.heat .table-wrap { margin: 0; }
.heat__scale { display: flex; align-items: center; gap: 3px; margin-top: 1rem; font-size: 0.75rem; color: var(--slate); }
.heat__scale i { width: 1.5rem; height: 0.6rem; border-radius: 2px; background: var(--k); }
.heat__scale span:first-child { margin-right: 0.4rem; } .heat__scale span:last-child { margin-left: 0.4rem; }

/* Big stat */
.big-stat { display: grid; gap: 0.4rem; align-content: start; }
.big-stat i { width: 0.75rem; height: 0.75rem; border-radius: 3px; background: var(--k); }
.big-stat b { font-size: clamp(2.6rem, 5vw, 3.75rem); font-weight: 500; line-height: 1; letter-spacing: -0.05em; color: var(--ink); font-variant-numeric: tabular-nums; }
.big-stat b small { font-size: 0.35em; letter-spacing: 0; color: var(--slate); font-weight: 400; }
.big-stat span { font-size: 0.9rem; color: var(--ink-2); max-width: 18rem; }

@media (max-width: 40rem) {
  .stack, .rank { grid-template-columns: minmax(0, 1fr) 3rem; }
  .stack__bar, .rank__track { grid-column: 1 / -1; grid-row: 2; }
  .db { grid-template-columns: minmax(0, 1fr) auto; }
  .db__track { grid-column: 1 / -1; grid-row: 2; }
  .lines__plot, .lines__x { margin-right: 4.25rem; }
}
 .g1 { --k: var(--g1); } .g2 { --k: var(--g2); } .g3 { --k: var(--g3); } .g4 { --k: var(--g4); } .g5 { --k: var(--g5); }
 .g7 { --k: var(--g7); }

/* White figures only from g6 and q5 up; on the lighter steps ink reads better (4.5:1 or more). */
.heat__t td i.g6, .heat__t td i.g7 { color: #fff; }
.col--soft { opacity: 0.4; }

/* Lines: events and status colours */
.lines__event { position: absolute; top: 0; bottom: 0; left: var(--x); border-left: 1px dashed var(--rule-strong); }
.lines__event em { position: absolute; top: -0.2rem; left: 0.4rem; font-style: normal; font-size: 0.72rem; color: var(--slate); white-space: nowrap; background: #fff; padding: 0 0.25rem; }

/* Dumbbell */
.db { display: grid; grid-template-columns: minmax(6rem, 11rem) minmax(0, 1fr) 4.5rem; gap: 1rem; align-items: center; padding: 0.5rem 0.4rem; margin: 0 -0.4rem; border-radius: 10px; font-size: 0.875rem; }
.db:not(.db--axis):hover { background: var(--wash); }

.db__track { position: relative; height: 1.75rem; }
.db__track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--rule); }
.db__span { position: absolute; top: 50%; left: var(--l); width: var(--p); height: 6px; margin-top: -3px; border-radius: 3px; }
.db__span--up { background: linear-gradient(90deg, var(--k0), var(--mark)); }
.db__span--down { background: linear-gradient(90deg, var(--differs), var(--k0)); }
.db__dot { position: absolute; top: 50%; left: var(--x); width: 1.05rem; height: 1.05rem; margin: -0.525rem 0 0 -0.525rem; border-radius: 50%; box-shadow: 0 0 0 3px #fff; }
.db__dot em { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 0.2rem; font-style: normal; font-size: 0.7rem; color: var(--slate); }
.db__dot--b em { color: var(--ink); font-weight: 500; }
.db__dot--a { background: var(--k0); }
.db__dot--b { background: var(--mark); }
.db__dot--worse { background: var(--differs); }
.db .delta { justify-self: end; }
.db--axis { padding-top: 0; padding-bottom: 0; }
.db__axis { position: relative; height: 1rem; font-size: 0.7rem; color: var(--slate); }
.db__tick { position: absolute; left: var(--x); transform: translateX(-50%); }

/* Timeline */
.timeline { position: relative; }
.timeline__bar { position: relative; height: 4px; border-radius: 2px; background: var(--rule); margin: 1.1rem 0 0; }
.timeline__bar i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p); border-radius: 2px; background: linear-gradient(90deg, var(--g4), var(--mark)); }
.timeline ol { list-style: none; margin: -1.45rem 0 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); position: relative; }
@media (min-width: 46rem) { .timeline ol { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }
.timeline li { margin: 0; padding: 0; display: grid; gap: 0.2rem; align-content: start; font-size: 0.8125rem; color: var(--slate); }
.timeline__node { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: #fff; color: var(--slate); box-shadow: inset 0 0 0 2px var(--rule-strong); margin-bottom: 0.75rem; }
.timeline__node .icon { width: 1.1rem; height: 1.1rem; }
.timeline li.is-done .timeline__node { background: var(--mark); color: #fff; box-shadow: none; }
.timeline li.is-now .timeline__node { background: #fff; color: var(--green); box-shadow: inset 0 0 0 2px var(--mark), 0 0 0 6px var(--tint); }
.timeline b { font-weight: 500; color: var(--ink); font-size: 0.9375rem; }
.timeline__when { font-size: 0.75rem; color: var(--green); font-weight: 500; }
.timeline__tag { justify-self: start; margin-top: 0.4rem; font-size: 0.72rem; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--wash); color: var(--ink-2); }
.timeline li.is-done .timeline__tag { background: var(--tint); color: var(--green); }
@media (max-width: 46rem) { .timeline__bar { display: none; } .timeline ol { margin-top: 0; } .timeline li { grid-template-columns: 2.4rem minmax(0, 1fr); column-gap: 0.9rem; } .timeline li > :not(.timeline__node) { grid-column: 2; } .timeline__node { grid-row: 1 / span 4; margin: 0; } }

/* Funnel */
.funnel__row { display: grid; grid-template-columns: minmax(0, 1.4fr) 5.5rem minmax(0, 1fr); gap: 1rem; align-items: center; padding: 0.3rem 0; }
.funnel__bar { display: flex; justify-content: center; height: 2.6rem; }
.funnel__bar i { width: var(--p); height: 100%; border-radius: 8px; background: var(--k); }
.funnel__row > b { font-size: 1.35rem; font-weight: 500; letter-spacing: -0.03em; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.funnel__label { font-size: 0.875rem; color: var(--ink); line-height: 1.3; }
.funnel__label small { display: block; font-size: 0.75rem; color: var(--slate); }
@media (max-width: 40rem) { .funnel__row { grid-template-columns: 4.5rem minmax(0, 1fr); } .funnel__bar { grid-column: 1 / -1; justify-content: flex-start; height: 1.4rem; } }

/* Segmented bar */
.segments__labels { display: flex; gap: 2px; margin-bottom: 0.5rem; }
.segments__labels span { width: var(--p); min-width: 0; font-size: 0.75rem; color: var(--slate); line-height: 1.25; overflow: hidden; }
.segments__labels b { display: block; font-size: 1.15rem; font-weight: 500; color: var(--ink); letter-spacing: -0.02em; }
.segments__labels span.p0, .segments__labels span.p1, .segments__labels span.p2, .segments__labels span.p3 { visibility: hidden; }
.segments__bar { display: flex; gap: 2px; height: 2.25rem; }
.segments__bar i { width: var(--p); background: var(--k); }
.segments__bar i:first-child { border-radius: 8px 0 0 8px; } .segments__bar i:last-child { border-radius: 0 8px 8px 0; }

/* Fact strips */
.strips__list { list-style: none; margin: 0; padding: 0; }
.strips__list li { display: grid; grid-template-columns: minmax(0, 1fr) auto 5rem; gap: 1rem; align-items: center; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); margin: 0; font-size: 0.875rem; }
.strips__q { color: var(--ink); }

.strips__n { text-align: right; font-size: 0.8125rem; color: var(--slate); font-variant-numeric: tabular-nums; }
@media (max-width: 40rem) { .strips__list li { grid-template-columns: minmax(0, 1fr) auto; }
 }

/* Histogram */
.histo__plot { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; height: 11rem; align-items: end; border-bottom: 1px solid var(--rule-strong); }
.histo__col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.histo__col b { font-size: 0.75rem; font-weight: 500; color: var(--ink); text-align: center; margin-bottom: 0.25rem; }
.histo__col i { display: block; height: var(--p); background: var(--k); border-radius: 4px 4px 0 0; }
.histo__x { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin-top: 0.4rem; font-size: 0.75rem; color: var(--slate); text-align: center; }
.histo__xl { margin: 0.3rem 0 0; font-size: 0.75rem; color: var(--slate); text-align: center; }

/* Quadrant */
.quad__plot { position: relative; aspect-ratio: 16 / 10; margin-left: 1.5rem; border-radius: 14px; overflow: hidden; background:
  linear-gradient(var(--rule-strong), var(--rule-strong)) center / 1px 100% no-repeat,
  linear-gradient(var(--rule-strong), var(--rule-strong)) center / 100% 1px no-repeat,
  linear-gradient(90deg, #fbfbfa 50%, var(--differs-tint) 50%) top / 100% 50% no-repeat,
  linear-gradient(90deg, #fbfbfa 50%, var(--tint) 50%) bottom / 100% 50% no-repeat; overflow: visible; }
.quad__q { position: absolute; font-size: 0.72rem; font-weight: 500; color: var(--slate); padding: 0.6rem 0.75rem; max-width: 45%; }
.quad__q--tl { top: 0; left: 0; } .quad__q--tr { top: 0; right: 0; text-align: right; color: var(--differs); } .quad__q--bl { bottom: 0; left: 0; } .quad__q--br { bottom: 0; right: 0; text-align: right; color: var(--green); }
.quad__pt { position: absolute; left: var(--x); bottom: var(--p); transform: translate(-50%, 50%); display: flex; align-items: center; gap: 0.35rem; }
.quad__pt i { display: block; width: var(--r); height: var(--r); border-radius: 50%; background: var(--k); opacity: 0.85; box-shadow: 0 0 0 2px #fff; flex: none; }
.quad__pt em { font-style: normal; font-size: 0.72rem; color: var(--ink); white-space: nowrap; background: rgb(255 255 255 / 0.85); padding: 0 0.2rem; border-radius: 3px; }
.r1 { --r: 0.6rem; } .r2 { --r: 0.9rem; } .r3 { --r: 1.25rem; } .r4 { --r: 1.65rem; } .r5 { --r: 2.1rem; }
.quad__yl { position: absolute; left: -1.5rem; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); transform-origin: center; font-size: 0.72rem; color: var(--slate); white-space: nowrap; margin-left: 0.6rem; }
.quad__xl { margin: 0.5rem 0 0 1.5rem; font-size: 0.72rem; color: var(--slate); text-align: center; }

/* Diff */
.diff__query { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 1rem; padding: 0.7rem 1rem; border-radius: 999px; background: var(--wash); font-size: 0.9rem; color: var(--ink); }
.diff__query small { margin-left: auto; font-size: 0.75rem; color: var(--slate); }
.diff__pair { display: grid; gap: 0.75rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .diff__pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.diff__side { padding: 1.1rem 1.25rem; border-radius: 16px; border: 1px solid var(--rule); }
.diff__side p { margin: 0.4rem 0 0; font-size: 1.05rem; line-height: 1.45; color: var(--ink); }
.diff__who { font-size: 0.75rem; font-weight: 500; }
.diff__side--said { background: #fffdf7; border-color: #f1e2bd; } .diff__side--said .diff__who { color: var(--old); }
.diff__side--page { background: #f8fcf9; border-color: #cfe9da; } .diff__side--page .diff__who { color: var(--green); }
.diff__side--said mark { background: var(--old-tint); color: var(--old); text-decoration: line-through; text-decoration-color: rgb(138 90 0 / 0.45); border-radius: 3px; padding: 0 0.15em; }
.diff__side--page mark { background: var(--tint); color: var(--green-deep); font-weight: 500; border-radius: 3px; padding: 0 0.15em; box-shadow: inset 0 -2px 0 var(--mark); }
.diff__why { margin: 1rem 0 0; font-size: 0.875rem; color: var(--ink-2); }
.diff__why b { display: block; font-weight: 500; color: var(--ink); font-size: 0.8125rem; }

/* Source by day */
.sdays__t th, .sdays__t td { vertical-align: middle; padding: 0.55rem 0.5rem; font-size: 0.8125rem; }
.sdays__t tbody th { font-weight: 400; color: var(--ink); padding-left: 0; }
.sdays__n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
.src-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.55rem; border-radius: 999px; font-size: 0.75rem; white-space: nowrap; }
.src-chip::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.src-chip--own { background: var(--tint); color: var(--green); }
.src-chip--other { background: var(--wash); color: var(--ink-2); }
.sdays .table-wrap { margin: 0; }

/* Small multiples */
.multiples__grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.mult { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.9rem; align-items: center; padding: 0.9rem; border-radius: 16px; background: var(--wash); }
.mult .ring--sm { width: 4.5rem; }
.mult .ring--sm b { font-size: 0.95rem; }

.mult__n { display: block; font-size: 0.75rem; color: var(--slate); margin-bottom: 0.45rem; }
.mult__bar { height: 0.45rem; }

/* Control rings */
.control { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 46rem) { .control { grid-template-columns: 17rem minmax(0, 1fr); } }
.control__rings { position: relative; width: 17rem; max-width: 100%; aspect-ratio: 1; margin: 0 auto; }
.control__ring { position: absolute; border-radius: 50%; display: flex; justify-content: center; }
.control__ring em { font-style: normal; font-size: 0.72rem; font-weight: 500; margin-top: 0.6rem; }
.control__ring--3 { inset: 0; background: var(--wash); color: var(--slate); }
.control__ring--2 { inset: 16%; background: var(--g2); color: var(--green-deep); }
.control__ring--1 { inset: 33%; background: var(--green); color: #fff; align-items: center; }
.control__ring--1 em { margin: 0; }
.control__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.control__item { margin: 0; padding-left: 1.4rem; position: relative; font-size: 0.875rem; color: var(--ink-2); }
.control__item::before { content: ""; position: absolute; left: 0; top: 0.3rem; width: 0.8rem; height: 0.8rem; border-radius: 50%; }
.control__item--1::before { background: var(--green); } .control__item--2::before { background: var(--g2); } .control__item--3::before { background: var(--wash); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.control__item b { display: block; color: var(--ink); font-weight: 500; }

.kinds__text b { display: block; font-weight: 500; color: var(--ink); font-size: 0.9rem; }
.kinds__text small { font-size: 0.78rem; color: var(--slate); }
.kinds__bar { height: 0.5rem; border-radius: 999px; background: var(--wash); overflow: hidden; }
.kinds__bar i { display: block; height: 100%; width: var(--p); background: var(--k); border-radius: 999px; }
.kinds__n { text-align: right; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 40rem) {
 .kinds__bar { grid-column: 2 / -1; } }

.irow__n { font-size: 0.8125rem; color: var(--slate); line-height: 1.2; }
.irow__n b { font-size: 1.6rem; font-weight: 500; color: var(--ink); letter-spacing: -0.03em; }
.irow__n small { display: block; font-size: 0.72rem; }

/* File badges */
.file { position: relative; display: inline-grid; place-items: end center; width: 2.6rem; height: 3.2rem; padding-bottom: 0.35rem; border-radius: 5px 12px 5px 5px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--rule-strong); vertical-align: middle; }
.file i { position: absolute; top: 0; right: 0; width: 0.75rem; height: 0.75rem; border-radius: 0 10px 0 4px; background: var(--rule-strong); }
.file b { font-size: 0.625rem; font-weight: 600; letter-spacing: 0.04em; color: var(--ink); background: color-mix(in srgb, var(--k) 30%, #fff); box-shadow: inset 0 0 0 1px var(--k); padding: 0.12rem 0.3rem; border-radius: 3px; }
.file--lg { width: 4.4rem; height: 5.4rem; border-radius: 8px 18px 8px 8px; padding-bottom: 0.6rem; }
.file--lg i { width: 1.2rem; height: 1.2rem; border-radius: 0 16px 0 6px; }
.file--lg b { font-size: 0.8rem; padding: 0.2rem 0.45rem; }
.file--sm { width: 1.6rem; height: 2rem; padding-bottom: 0.2rem; border-radius: 3px 7px 3px 3px; }
.file--sm i { width: 0.5rem; height: 0.5rem; border-radius: 0 6px 0 3px; }
.file--sm b { font-size: 0.45rem; padding: 0.08rem 0.18rem; }

.compare__arrow { font-size: 0.8rem; font-weight: 500; padding: 0.3rem 0.7rem; border-radius: 999px; }

.units2__group { padding: 1.1rem; border-radius: 18px; background: var(--wash); }
.units2__h { margin: 0 0 0.8rem; font-size: 0.8125rem; color: var(--slate); }
.units2__h b { font-size: 1.5rem; font-weight: 500; color: var(--ink); letter-spacing: -0.03em; margin-right: 0.25rem; }

.units2__bar { display: flex; gap: 2px; height: 0.4rem; margin: 0.9rem 0 0.5rem; }
.units2__bar i { width: var(--p); border-radius: 2px; }
.units2__bar .u-diff { background: var(--differs); } .units2__bar .u-read { background: var(--mark); } .units2__bar .u-none { background: var(--rule-strong); }
.units2__note { margin: 0; font-size: 0.8125rem; color: var(--ink-2); }
.units2__note b { color: var(--ink); font-weight: 500; }

/* Clicks: n in 100 */
.clicks2 { margin: 0 0 2rem; }
.clicks2 .irow:first-child { border-bottom: 1px solid var(--rule); }
.clicks2__drop { margin: 0.75rem 0 0; font-size: 0.875rem; color: var(--ink-2); }
.clicks2__drop .delta { margin-right: 0.4rem; }

/* Source grid metrics */
.matrix__m { text-align: right !important; white-space: nowrap; color: var(--slate); font-size: 0.8125rem; }
.matrix__m b { font-weight: 500; color: var(--ink); }
.matrix__m b.is-all { color: var(--green); }

.matrix__pct { display: inline-block; min-width: 2.6rem; padding: 0.15rem 0.35rem; border-radius: 6px; font-size: 0.75rem; font-weight: 500; background: var(--wash); color: var(--ink); }
.matrix__pct.is-good { background: var(--tint); color: var(--green); }
.matrix__pct.is-bad { background: var(--differs-tint); color: var(--differs); }

/* Illustrations, second set */
.ill-edge-g { stroke: var(--mark); stroke-width: 1.5; }
.ill-ofill { fill: var(--old-mark); } .ill-inkfill { fill: var(--ink); } .ill-g2 { fill: var(--g3); }
 .ill-k3 { fill: var(--k3); } .ill-k1soft { fill: #b7d3f6; } .ill-k2soft { fill: #f0bfd1; }
.ill-av1 { fill: var(--k1); } .ill-av2 { fill: var(--k2); } .ill-av3 { fill: var(--k5); }
.ill-thin { stroke-width: 2; }
.ill-big { font: 600 22px/1 var(--sans); fill: var(--ink); letter-spacing: -0.02em; }
.ill-big--d { fill: var(--differs); } .ill-big--g { fill: var(--green); }
.ill-small { font: 500 8px/1 var(--sans); fill: var(--slate); }
.ill-small--o { fill: var(--old); } .ill-small--g { fill: var(--green); }
.ill-num { font: 600 11px/1 var(--sans); fill: var(--ink); }
.ill-num--sm { font-size: 8.5px; } .ill-num--d { fill: var(--differs); } .ill-num--g { fill: var(--green-deep); }
.ill-chain { fill: none; stroke: var(--slate); stroke-width: 6; }
.ill-chain--d { stroke: var(--differs); }
.ill-spark { fill: none; stroke: var(--old-mark); stroke-width: 2.5; stroke-linecap: round; }
.ill-arrow { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; }
.ill-arrowhead { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ill-gap { fill: #fff8e6; stroke: var(--old-mark); stroke-width: 1.5; stroke-dasharray: 4 3; }
.ill-ring { fill: none; stroke: var(--mark); stroke-width: 3; stroke-linecap: round; }
.ill-base { stroke: var(--rule-strong); stroke-width: 1.5; }
.ill-ringtrack { fill: none; stroke: var(--wash); stroke-width: 4; }
.ill-ringarc { fill: none; stroke: var(--mark); stroke-width: 4; stroke-linecap: round; }
.ill-shield { fill: var(--green); }
.ill-lock { fill: none; stroke: #fff; stroke-width: 3; }
.ill-w { font: 600 18px/1 Georgia, "Times New Roman", serif; fill: var(--ink); }
.ill-pencil { fill: var(--old-mark); }
.ill-pencil-tip { fill: var(--ink); }
.ill-tag { stroke-width: 1.5; }
.ill-tag--old { fill: var(--old-tint); stroke: #e7cf8f; }
.ill-tag--new { fill: var(--tint); stroke: var(--mark); }
.ill-price { font: 600 17px/1 var(--sans); fill: var(--green-deep); letter-spacing: -0.02em; }
.ill-price--old { fill: var(--old); }
.ill-strike { stroke: var(--differs); stroke-width: 2.5; stroke-linecap: round; }
.ill-code { font: 500 10px/1 ui-monospace, "SF Mono", Menlo, monospace; fill: #c9c9c4; }
.ill-code--b { fill: #fff; font-size: 13px; }
.ill-code--k { fill: #9ec5f4; } .ill-code--v { fill: #7fdcaa; }

/* Illustration sizes: the same drawing as a spot, a card or a banner */
.ill--sm { width: 7.5rem; }
.ill--md { width: 15rem; }
.ill--lg { width: 100%; max-width: 34rem; }
.ill--bare { background: none; }
.ill-sheet { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.ill-sheet li { margin: 0; padding: 0.6rem 0.6rem 0.8rem; border-radius: var(--r-card); background: var(--wash); font-size: 0.8125rem; color: var(--ink-2); }
.ill-sheet li span { display: block; padding: 0.6rem 0.4rem 0; }
.ill-sheet li code { font-size: 0.72rem; color: var(--slate); }
.ill-sizes { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: end; }
.ill-sizes figure { margin: 0; font-size: 0.75rem; color: var(--slate); }
.ill-sizes figcaption { margin-top: 0.4rem; }
.ill-banner { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: center; padding: clamp(1.25rem, 3vw, 2rem); border-radius: 28px; background: linear-gradient(135deg, var(--g1), #f7faf8 60%, var(--wash)); }
@media (min-width: 46rem) { .ill-banner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ill-banner h3 { font-size: 1.5rem; margin: 0 0 0.4rem; }
.ill-banner p { margin: 0; color: var(--ink-2); }
.ill-banner .ill { background: #fff; box-shadow: 0 24px 48px -32px rgb(11 11 12 / 0.3); }
.ill-inline { display: flex; gap: 1rem; align-items: center; padding: 0.9rem; border-radius: 16px; border: 1px solid var(--rule); }
.ill-inline .ill { width: 6.5rem; flex: none; }
.ill-inline b { display: block; color: var(--ink); font-weight: 500; }
.ill-inline span { font-size: 0.8125rem; color: var(--slate); }

.control__ring--2 { z-index: 1; } .control__ring--1 { z-index: 2; }
.quad--plain .quad__plot { background:
  linear-gradient(var(--rule-strong), var(--rule-strong)) center / 1px 100% no-repeat,
  linear-gradient(var(--rule-strong), var(--rule-strong)) center / 100% 1px no-repeat,
  linear-gradient(90deg, var(--tint) 50%, #fbfbfa 50%) top / 100% 50% no-repeat,
  linear-gradient(90deg, #fbfbfa 50%, #fbfbfa 50%) bottom / 100% 50% no-repeat; }
.quad--plain .quad__q--tl { color: var(--green); } .quad--plain .quad__q--tr { color: var(--ink-2); } .quad--plain .quad__q--br { color: var(--slate); }
@media (max-width: 40rem) {
  .db { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.4rem; }
  .db--axis { display: none; }
  .db .delta { grid-column: 2; grid-row: 1; }
  .db__track { grid-column: 1 / -1; grid-row: 2; margin-top: 0.6rem; }
  .quad__plot { aspect-ratio: 4 / 5; }
  .quad__pt em { font-size: 0.65rem; white-space: normal; max-width: 5.5rem; line-height: 1.15; }
  .quad__q { font-size: 0.65rem; }
}
/* Study pages: text after a row of charts keeps a gap. */
.chart-grid + .dashes, .chart-grid + .prose { margin-top: 1.5rem; }
