/* Line of 100 and the state calculator layout. The highlighter yellow marks
   the visitor and nothing else; it is never used for text. */
:root {
  --hi: #f5b700;
  --l-green: #1e7a5a;
  --l-fog: #7fa6be;
  --l-hair: #d6dde3;
  --l-tick: #5b6470;
  --l-tail: #e7ebee;
  --l-grid: rgba(20, 36, 59, 0.045);
}

/* state page: answer first */
.st-hero { padding: 1.1rem 0 0.4rem; }
.st-hero h1 { max-width: 24ch; }
.kicker { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 0.35rem; }
.st-grid { display: grid; gap: 0.4rem; }
.st-rail, .st-main { min-width: 0; }
@media (min-width: 960px) {
  .st-grid { grid-template-columns: 330px minmax(0, 1fr); gap: 2.4rem; align-items: start; }
  .st-rail { position: sticky; top: 1rem; }
}

.fill { margin: 0.4rem 0 0.2rem; }
.fill label { display: block; font-weight: 700; font-size: 1rem; color: var(--ink); margin-bottom: 0.35rem; }
.money-field { display: flex; align-items: center; gap: 0.35rem; border-bottom: 2px solid var(--ink); max-width: 17rem; }
.money-field span { font-family: var(--mono); font-size: 1.6rem; color: var(--ink-soft); }
.money-field input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; font-family: var(--mono); font-size: 1.6rem; font-weight: 600; color: var(--ink); padding: 0.3rem 0.1rem; min-height: var(--tap); }
.money-field input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.money-field input::placeholder { color: var(--ink-faint); opacity: 1; }
.fill .hint { font-size: 0.78rem; color: var(--ink-faint); margin-top: 0.3rem; }
.fill .err { color: var(--bad); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.7rem 0 0.2rem; }
.chip { min-height: var(--tap); min-width: var(--tap); padding: 0 0.95rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-family: var(--mono); font-size: 0.95rem; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--ink-soft); }
.chip[aria-pressed="true"] { border: 2px solid var(--ink); }
.counts { margin: 0.6rem 0 0.4rem; font-size: 0.9rem; }
.counts summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); min-height: var(--tap); display: flex; align-items: center; gap: 0.5rem; list-style: none; }
.counts summary::-webkit-details-marker { display: none; }
.counts summary::before { content: "+"; font-family: var(--mono); font-weight: 700; color: var(--accent); width: 1ch; }
.counts[open] summary::before { content: "\2212"; }
.counts p { color: var(--ink-soft); font-size: 0.88rem; }

/* the answer */
.you-result { margin: 0.6rem 0 0.4rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ordinal { margin: 0.2rem 0 0.4rem; }
.swipe { position: relative; z-index: 0; display: inline-block; padding: 0 0.28em 0 0.12em; font-size: clamp(3rem, 14vw, 4.4rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.swipe::before { content: ""; position: absolute; z-index: -1; left: -0.1em; right: -0.05em; top: 0.16em; bottom: 0.02em; background: var(--hi); transform: skewX(-8deg) rotate(-1.2deg); border-radius: 2px; }
.swipe sup { font-size: 0.42em; vertical-align: 0.95em; margin-left: 0.04em; }
.says { font-size: 1.12rem; font-weight: 600; line-height: 1.4; margin: 0.3rem 0; }

/* the figure */
.l100 { margin: 0.8rem 0 0.4rem; }
.l100 figcaption { font-weight: 800; font-size: 1.12rem; margin-bottom: 0.4rem; }
.l100-plot { height: 260px; background-color: var(--card); background-image: linear-gradient(var(--l-grid) 1px, transparent 1px), linear-gradient(90deg, var(--l-grid) 1px, transparent 1px); background-size: 8px 8px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
@media (min-width: 640px) { .l100-plot { height: 300px; } }
@media (min-width: 960px) { .st-main .l100-plot { height: 330px; } }
.l100-svg { display: block; width: 100%; height: 100%; }
.l100-svg .g { stroke: var(--l-hair); stroke-width: 1; }
.l100-svg .t { font-family: var(--mono); font-size: 10px; fill: var(--ink-soft); }
.l100-svg .lab { font-size: 11.5px; fill: var(--ink); font-weight: 600; }
.l100-svg .tier { font-size: 10.5px; fill: var(--l-green); font-weight: 600; }
.l100-svg .tail { fill: var(--l-tail); }
.l100-svg .tailedge { stroke: var(--l-tick); stroke-dasharray: 2 3; }
.l100-svg .area { fill: var(--l-fog); fill-opacity: 0.35; }
.l100-svg .curve { fill: none; stroke: #4f7c99; stroke-width: 2; stroke-linejoin: round; }
.l100-svg .base { stroke: var(--ink); stroke-width: 1; }
.l100-svg .tk { fill: var(--l-tick); }
.l100-svg .tk.thin { fill: #b4bac2; }
.l100-svg .wait { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 2.5; }
.l100-svg .you, .mini .you { fill: var(--hi); stroke: var(--ink); stroke-width: 1.5; }
.l100-svg .youdot { fill: var(--hi); stroke: var(--ink); stroke-width: 1.5; }
.l100-svg .link { stroke: var(--ink); stroke-width: 1.25; stroke-dasharray: 2 2.5; }
.l100-svg .caret { fill: var(--ink); }
.l100-svg .tierln { stroke: var(--l-green); stroke-width: 1.25; stroke-dasharray: 3 3; }
.l100-svg .tiertk, .l100-svg .tierdot { fill: var(--card); stroke: var(--l-green); stroke-width: 1.75; }
.tier { margin: 0.5rem 0 0.8rem; }
.tier-gap { display: inline-flex; align-items: center; min-height: var(--tap); margin: 0; padding: 0.3rem 0.9rem; border: 1.5px solid var(--l-green); border-radius: 999px; background: var(--card); color: var(--l-green); font-family: var(--mono); font-weight: 700; font-size: 0.98rem; }
.tier .fine { margin-top: 0.35rem; }

/* cohort cards */
.cohorts h2 { margin-top: 1.6rem; }
.coh-grid { display: grid; gap: 0.7rem; margin-top: 0.7rem; }
@media (min-width: 700px) {
  .coh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .coh { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; }
}
.coh { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.85rem 0.95rem; }
.coh .k { margin: 0; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-faint); }
.coh h3 { margin: 0.15rem 0 0.2rem; font-size: 1rem; }
.coh .o { margin: 0; font-size: 2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.coh .o sup { font-size: 0.45em; vertical-align: 0.9em; }
.coh .m { height: 40px; margin: 0.35rem 0; }
.mini { display: block; width: 100%; height: 40px; }
.mini .tk { fill: var(--l-tick); }
.mini .base { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mini .you { vector-effect: non-scaling-stroke; }
.coh .c { margin: 0; }

/* the state among the 51 */
.st-block { margin-top: 1.8rem; }
.rank-line { font-size: 1.05rem; }
.rank-n { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-right: 0.15rem; }
.strip { margin: 0.6rem 0 0.4rem; }
.strip-box { position: relative; height: 94px; padding-top: 16px; }
.strip-svg { display: block; width: 100%; height: 64px; }
.strip-svg .tk { fill: var(--l-tick); }
.strip-svg .me { fill: var(--ink); }
.strip-svg .tie { fill: var(--card); stroke: var(--ink); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.strip-svg .base { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.strip-svg .usln { stroke: var(--ink-soft); stroke-dasharray: 2 2.5; vector-effect: non-scaling-stroke; }
.strip-svg .bracket { fill: none; stroke: var(--ink-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.strip-us, .strip-me { position: absolute; font-family: var(--mono); font-size: 0.72rem; white-space: nowrap; }
.strip-us { top: 0; margin-left: 4px; color: var(--ink-soft); }
.strip-me { top: 74px; transform: translateX(-50%); font-weight: 700; color: var(--ink); }
.strip-ends { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); }
.st-stats { display: grid; gap: 0; margin: 1rem 0; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .st-stats { grid-template-columns: 1fr 1fr; column-gap: 2rem; } }
.st-stats > div { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.st-stats dt { font-weight: 600; }
.st-stats dd { font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.st-stats .fine { grid-column: 1 / -1; margin: 0.2rem 0 0; }
.receipt { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-soft); line-height: 1.7; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0.6rem 0; max-width: none; }
.table-scroll { overflow-x: auto; margin: 0.9rem 0; }
.table-scroll table.data { margin: 0; }
ul.nb { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
ul.nb a { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; min-height: var(--tap); padding: 0.5rem 0.8rem; background: var(--card); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
ul.nb a:hover { border-color: var(--accent); text-decoration: none; }
ul.nb .mono { color: var(--ink-soft); font-size: 0.88rem; }
.st-share .share-card { margin-top: 1.2rem; }
