/* The Lamont Record: a section of Snibbit. Builds on css/style.css tokens. */
:root { --cmp: #8d8486; --peer: #c9c1c2; --good: #3f7a52; --lc-era: rgba(196,18,47,.06); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --cmp: #8a8183; --peer: #4a4244; --good: #6fb784; --lc-era: rgba(224,50,78,.10); } }
:root[data-theme="dark"] { --cmp: #8a8183; --peer: #4a4244; --good: #6fb784; --lc-era: rgba(224,50,78,.10); }
html { scroll-padding-top: 64px; }
.fn { font: 600 .72em var(--f-ui); color: var(--red-ink); text-decoration: none; vertical-align: super; line-height: 0; white-space: nowrap; }
.fn:hover { text-decoration: underline; }

/* hero */
.lhero { background: var(--ink); color: var(--on-dark); position: relative; overflow: hidden; }
.lhero::after { content: ""; position: absolute; inset: 0 0 0 55%; pointer-events: none; opacity: .05;
  background: repeating-linear-gradient(180deg, #fff 0 14px, transparent 14px 28px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); }
.lhero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3rem; align-items: center; padding-block: 4rem 4.25rem; }
@media (max-width: 860px) { .lhero__grid { grid-template-columns: minmax(0, 1fr); padding-block: 3rem; gap: 2.25rem; } }
.lhero__title { margin: 0; font: 700 clamp(2.6rem, 6.4vw, 5.4rem)/.95 var(--f-display); text-transform: uppercase; text-wrap: balance; }
.lhero__title span { display: block; color: #ff6b81; }
.lhero__sub { margin: 1.5rem 0 0; font-family: var(--f-body); font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.55; color: var(--on-dark-muted); max-width: 46ch; }
.lhero__rev { margin: 1rem 0 0; font: 500 .82rem var(--f-ui); color: var(--on-dark-muted); }
.receipt { margin: 0; background: #f4f1ec; color: #1b1718; padding: 1.4rem 1.4rem 1.1rem; font: 500 .92rem/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  transform: rotate(1.5deg); box-shadow: 0 18px 40px rgba(0,0,0,.45);
  -webkit-mask: radial-gradient(circle 6px at 50% 100%, transparent 98%, #000) 0 0 / 14px 100% repeat-x; mask: radial-gradient(circle 6px at 50% calc(100% + 1px), transparent 98%, #000) 0 0 / 14px 100% repeat-x; padding-bottom: 1.6rem; }
.receipt__head { display: flex; justify-content: space-between; font-weight: 700; letter-spacing: .12em; border-bottom: 2px dashed #1b1718; padding-bottom: .6rem; margin-bottom: .6rem; }
.receipt dl { margin: 0; display: grid; gap: .35rem; }
.receipt dl div { display: flex; justify-content: space-between; gap: 1rem; }
.receipt dt { color: #4a4244; } .receipt dd { margin: 0; font-weight: 700; white-space: nowrap; }
.receipt__total { display: flex; justify-content: space-between; gap: 1rem; border-top: 2px dashed #1b1718; margin-top: .8rem; padding-top: .7rem; font-weight: 700; color: #a50f27; }
.receipt__foot { margin: .9rem 0 0; text-align: center; font-size: .78rem; letter-spacing: .08em; color: #5f5658; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .receipt { transform: none; } }

/* section nav */
.lnav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: var(--ink-2); color: var(--on-dark); border-bottom: 3px solid var(--red); }
.lnav__row { display: flex; align-items: center; gap: 1.5rem; min-height: 52px; }
.lnav__brand { font: 700 1rem var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark); text-decoration: none; white-space: nowrap; }
.lnav__links { display: flex; gap: 1.1rem; overflow-x: auto; scrollbar-width: none; margin-left: auto; min-width: 0; }
.lnav__links::-webkit-scrollbar { display: none; }
.lnav__links a { font: 500 .85rem var(--f-display); letter-spacing: .07em; text-transform: uppercase; color: var(--on-dark-muted); text-decoration: none; white-space: nowrap; padding-block: .9rem; }
.lnav__links a:hover { color: var(--on-dark); box-shadow: inset 0 -2px 0 var(--red); }
@media (max-width: 760px) { .lnav__brand { display: none; } .lnav__links { margin-left: 0; } }

/* tiles */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2.25rem; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tiles { grid-template-columns: minmax(0, 1fr); } }
.tile { border-top: 2px solid var(--text); padding-block: 1.1rem 1.8rem; display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.tile__num { font: 700 clamp(2.6rem, 5vw, 3.6rem)/1 var(--f-display); color: var(--red-ink); font-variant-numeric: tabular-nums; }
.tile__lbl { font-family: var(--f-body); font-size: 1.05rem; line-height: 1.45; color: var(--text); }
.tile .fn { vertical-align: baseline; font-size: .78rem; }

/* chapters */
.chap .wrap { display: grid; gap: 1.6rem; }
.chap .eyebrow { margin: 0; }
.chap .section__title { margin-top: -.9rem; max-width: 22ch; }
.chap__q { margin: 0; max-width: 62ch; font-family: var(--f-body); font-size: 1.2rem; line-height: 1.6; color: var(--muted); }
.chap__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.chap__grid--wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 900px) { .chap__grid, .chap__grid--wide { grid-template-columns: minmax(0, 1fr); } }
.chart { margin: 0; background: var(--paper); border: 1px solid var(--rule); border-top: 3px solid var(--text); padding: 1.3rem 1.25rem 1.1rem; display: grid; gap: 1rem; min-width: 0; }
.section--tint .chart { background: var(--paper); }
.chart h3, .chart figcaption h3 { margin: 0; font: 600 1.3rem/1.1 var(--f-display); text-transform: uppercase; }
.chart figcaption p { margin: .3rem 0 0; font: 400 .88rem var(--f-ui); color: var(--muted); }
.chart__src { margin: 0; font: 400 .8rem/1.45 var(--f-ui); color: var(--muted); }
.chart__src .fn { vertical-align: baseline; font-size: .8rem; }
.finds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem 2rem; }
@media (max-width: 900px) { .finds { grid-template-columns: minmax(0, 1fr); } }
.finds li { font-family: var(--f-body); font-size: 1.04rem; line-height: 1.55; border-left: 3px solid var(--red); padding-left: .9rem; }
.finds b { font-family: var(--f-ui); font-weight: 700; }
.fair { margin: 0; padding: 1rem 1.15rem; background: var(--paper-2); border: 1px dashed var(--rule); font: 400 .95rem/1.55 var(--f-ui); color: var(--muted); max-width: 80ch; }
.section--tint .fair { background: var(--paper); }
.fair b { color: var(--text); }

/* horizontal bars */
.hb { display: grid; gap: .55rem; }
.hb__row { display: grid; grid-template-columns: minmax(7.5rem, 32%) minmax(0, 1fr); gap: .75rem; align-items: center; }
.hb__row--stack { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
.hb__lbl { font: 600 .9rem/1.25 var(--f-ui); }
.hb__track { position: relative; display: flex; align-items: center; gap: .5rem; min-width: 0; padding-right: 4.2rem; }
.hb__bar { display: block; height: 26px; background: var(--peer); flex: none; }
.hb__bar--ct { background: var(--red); } .hb__bar--us { background: var(--cmp); } .hb__bar--peer { background: var(--peer); }
.hb__bar--ghost { background: repeating-linear-gradient(135deg, var(--cmp) 0 5px, transparent 5px 10px); border: 2px solid var(--cmp); }
.hb__val { font: 700 1.05rem var(--f-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 520px) { .hb__row { grid-template-columns: minmax(0, 1fr); gap: .25rem; } }

/* vertical columns (pension) */
.vc { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; height: 240px; align-items: end; border-bottom: 1px solid var(--text); padding-top: 1.6rem; }
.vc__col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .35rem; min-width: 0; position: relative; }
.vc__bar { width: 100%; max-width: 64px; background: var(--red); display: block; }
.vc__val { font: 700 .95rem var(--f-display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vc__lbl { position: absolute; bottom: -1.6rem; font: 600 .74rem var(--f-ui); color: var(--muted); white-space: nowrap; }
.vc + .chart__src { margin-top: 1.4rem; }
@media (max-width: 520px) { .vc__val { font-size: .78rem; } .vc__lbl { font-size: .62rem; } }

/* grouped bars (burden) */
.legend { display: flex; gap: 1.1rem; font: 600 .85rem var(--f-ui); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.sw { width: 14px; height: 14px; display: inline-block; } .sw--ct { background: var(--red); } .sw--us { background: var(--cmp); }
.gb { display: grid; gap: .9rem; }
.gb__grp { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: .75rem; align-items: center; }
.gb__yr { font: 700 1.05rem var(--f-display); }
.gb__bars { display: grid; gap: 4px; }
.gb__line { display: flex; align-items: center; gap: .5rem; padding-right: 3.6rem; }
.gb__bar { display: block; height: 18px; flex: none; } .gb__bar--ct { background: var(--red); } .gb__bar--us { background: var(--cmp); }
.gb__v { font: 700 .95rem var(--f-display); font-variant-numeric: tabular-nums; }

/* timeline (taxes) */
.chart--tl { gap: .8rem; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tl__item { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); grid-template-rows: auto auto; column-gap: .9rem; padding-block: .7rem; border-top: 1px solid var(--rule); }
.tl__date { font: 700 .9rem var(--f-display); grid-row: 1; }
.tl__tag { grid-row: 2; grid-column: 1; align-self: start; justify-self: start; font: 700 .66rem var(--f-ui); letter-spacing: .1em; text-transform: uppercase; padding: .2rem .45rem; margin-top: .3rem; }
.tl__item--up .tl__tag { background: var(--red); color: #fff; }
.tl__item--down .tl__tag { background: transparent; color: var(--good); border: 1px solid var(--good); }
.tl__body { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }
.tl__body b { font: 600 1rem/1.25 var(--f-ui); }
.tl__body p { margin: .2rem 0 0; font: 400 .88rem/1.45 var(--f-ui); color: var(--muted); }
.tl__body .fn { vertical-align: baseline; }

/* electricity line chart */
.lc-wrap { overflow-x: auto; }
.lc { display: block; width: 100%; height: auto; font-family: var(--f-ui); }
.lc--n { display: none; }
@media (max-width: 560px) { .lc--w { display: none; } .lc--n { display: block; } }
.lc__grid { stroke: var(--rule); stroke-width: 1; }
.lc__tick { fill: var(--muted); font-size: 12px; }
.lc__era { fill: var(--lc-era); }
.lc__mark { stroke: var(--red); stroke-width: 1.5; stroke-dasharray: 4 4; }
.lc__note { fill: var(--red-ink); font-size: 12px; font-weight: 600; }
.lc__line { fill: none; stroke-width: 3; stroke-linejoin: round; }
.lc__line--ct { stroke: var(--red); } .lc__line--us { stroke: var(--cmp); }
.lc__dot--ct { fill: var(--red); } .lc__dot--us { fill: var(--cmp); }
.lc__end { font-family: var(--f-display); font-size: 15px; font-weight: 700; }
.lc__end--ct { fill: var(--red-ink); } .lc__end--us { fill: var(--muted); }

/* bill columns */
.bill { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; height: 260px; align-items: end; border-bottom: 1px solid var(--text); padding-bottom: 0; }
.bill__col { display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; height: 100%; gap: .4rem; position: relative; padding-bottom: 2.6rem; }
.bill__bar { display: block; } .bill__col--ct .bill__bar { background: var(--red); } .bill__col--us .bill__bar { background: var(--cmp); }
.bill__amt { font: 700 1.6rem var(--f-display); font-variant-numeric: tabular-nums; }
.bill__lbl { position: absolute; bottom: 0; font: 600 .88rem/1.2 var(--f-ui); } .bill__lbl small { font-weight: 400; color: var(--muted); }

/* gauge (jobs recovery) */
.gauge { display: grid; gap: .8rem; }
.gauge__row { display: grid; grid-template-columns: 7rem minmax(0, 1fr) 3.4rem; gap: .75rem; align-items: center; }
.gauge__lbl { font: 600 .9rem var(--f-ui); }
.gauge__track { height: 26px; background: var(--paper-2); position: relative; }
.gauge__fill { display: block; height: 100%; } .gauge__fill--ct { background: var(--red); } .gauge__fill--us { background: var(--cmp); }
.gauge__v { font: 700 1.1rem var(--f-display); text-align: right; }

/* housing */
.htl { list-style: none; margin: 0; padding: 0; display: grid; border-left: 3px solid var(--rule); }
.htl li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .75rem; padding: .55rem 0 .55rem 1rem; position: relative; font: 400 .92rem/1.45 var(--f-ui); }
.htl li::before { content: ""; position: absolute; left: -8px; top: .85rem; width: 13px; height: 13px; border-radius: 50%; background: var(--paper); border: 3px solid var(--red); }
.htl__d { font: 700 .92rem var(--f-display); color: var(--red-ink); }
@media (max-width: 520px) { .htl li { grid-template-columns: minmax(0, 1fr); gap: .1rem; } }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.checks li { font: 400 .95rem/1.5 var(--f-ui); padding-left: 1.6rem; position: relative; }
.checks li::before { content: "!"; position: absolute; left: 0; top: .1rem; width: 1.1rem; height: 1.1rem; background: var(--red); color: #fff; font: 700 .75rem/1.1rem var(--f-ui); text-align: center; }
.checks b { font-weight: 700; }

/* population */
.pc { display: grid; gap: .75rem; }
.pc__row { display: grid; grid-template-columns: minmax(8rem, 34%) minmax(0, 1fr) 4.6rem; gap: .75rem; align-items: center; }
.pc__lbl { font: 600 .88rem/1.25 var(--f-ui); }
.pc__axis { display: grid; grid-template-columns: 1fr 1fr; height: 26px; }
.pc__half { display: flex; align-items: stretch; } .pc__half--neg { justify-content: flex-end; border-right: 2px solid var(--text); }
.pc__bar { display: block; height: 100%; } .pc__bar--neg { background: var(--red); } .pc__bar--pos { background: var(--cmp); }
.pc__val { font: 700 1rem var(--f-display); text-align: right; font-variant-numeric: tabular-nums; }
.pc__val--neg { color: var(--red-ink); }
@media (max-width: 520px) { .pc__row { grid-template-columns: minmax(0, 1fr) 4.2rem; } .pc__lbl { grid-column: 1 / -1; } }
.chart--card { align-content: start; }
.chart--card .big { font: 700 clamp(3.2rem, 7vw, 4.6rem)/1 var(--f-display); color: var(--red-ink); }
.chart--card p { margin: 0; font-family: var(--f-body); font-size: 1.02rem; line-height: 1.55; }

/* rank dots */
.rd { display: grid; gap: .5rem; padding-top: 2.6rem; }
.rd__row { display: grid; grid-template-columns: repeat(50, minmax(0, 1fr)); gap: 3px; }
.rd__dot { aspect-ratio: 1; background: var(--peer); position: relative; max-width: 100%; }
.rd__dot--ct { background: var(--red); }
.rd__ct { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); font: 700 .8rem/1.05 var(--f-display); text-align: center; color: var(--red-ink); white-space: nowrap; }
.rd__ends { display: flex; justify-content: space-between; font: 500 .8rem var(--f-ui); color: var(--muted); }

/* sources */
.srcnote { margin: 0 0 1.5rem; max-width: 72ch; font: 400 .95rem/1.55 var(--f-ui); color: var(--muted); }
.srcs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.srcs li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .75rem; padding-block: .7rem; border-bottom: 1px solid var(--rule); scroll-margin-top: 70px; }
.srcs li:target { background: var(--paper-2); }
.src__n { font: 700 1rem var(--f-display); color: var(--red-ink); }
.srcs a { font: 600 .95rem/1.4 var(--f-ui); color: var(--text); overflow-wrap: anywhere; }
.src__m { display: block; font: 400 .8rem var(--f-ui); color: var(--muted); }

/* closing band */
.lclose { background: var(--red); color: #fff; }
.lclose__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; padding-block: 2.25rem; }
.lclose__line { margin: 0; font: 700 clamp(1.6rem, 3.4vw, 2.4rem)/1.05 var(--f-display); text-transform: uppercase; }
.lclose .btn--light { background: #fff; color: #151213; } .lclose .btn--light:hover { background: #151213; color: #fff; }
