/* Pennsylvania Traffic Ticket Lookup.
   Layout: a citation, decoded. One field shaped like the charge box on the ticket, one read-out
   built like the form in the reader's hand, reference tables underneath.
   Tokens follow the live MLO tool palette (record-clearing checker) so the page drops into the site. */
:root {
  --tt-ground: #f6f4ef;
  --tt-ground-2: #efece4;
  --tt-surface: #fffdf8;
  --tt-band: #f0ece2;
  --tt-ink: #26221c;
  --tt-ink-2: #5f5a50;
  --tt-line: #ddd7c9;
  --tt-line-2: #c9c1ae;
  --tt-accent: #755a27;
  --tt-accent-2: #57421d;
  --tt-on-accent: #fffdf8;
  --tt-focus: #a33327;
  --tt-calm-bg: #edf6ee;  --tt-calm-ink: #1b472b;  --tt-calm-line: #28613e;
  --tt-warn-bg: #fff6df;  --tt-warn-ink: #5c4000;  --tt-warn-line: #916207;
  --tt-grave-bg: #faece9; --tt-grave-ink: #6d241d; --tt-grave-line: #9a362b;
  --tt-display: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --tt-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tt-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --tt-r: 3px;
}
.tt { background: var(--tt-ground); color: var(--tt-ink); font: 400 1rem/1.65 var(--tt-body); -webkit-text-size-adjust: 100%; overflow-wrap: anywhere; }
.tt *, .tt *::before, .tt *::after { box-sizing: border-box; }
.tt [hidden] { display: none !important; }
.tt-wrap { max-width: 70rem; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 720px) { .tt-wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.tt a { color: var(--tt-accent); text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
.tt a:hover { color: var(--tt-accent-2); text-decoration-thickness: 2px; }
.tt a.tt-btn, .tt a.tt-btn:hover { text-decoration: none; }
.tt :focus-visible { outline: 3px solid var(--tt-focus); outline-offset: 3px; border-radius: var(--tt-r); }
.tt [tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
.tt h1, .tt h2, .tt h3 { font-family: var(--tt-display); font-weight: 600; color: var(--tt-ink); text-wrap: balance; margin: 0; }
.tt p { margin: 0; }
.tt-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tt-label { font: 650 .72rem/1.4 var(--tt-body); letter-spacing: .09em; text-transform: uppercase; color: var(--tt-ink-2); }

/* Draft strip (prototype only) */
.tt-draft { background: var(--tt-ink); color: var(--tt-surface); font: 500 .82rem/1.5 var(--tt-body); }
.tt-draft .tt-wrap { padding-block: .55rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; }
.tt-draft b { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .72rem; border: 1px solid #fffdf8; padding: .05rem .4rem; border-radius: 2px; }

/* Hero */
.tt-hero { border-top: 4px solid var(--tt-accent); padding-block: clamp(1.6rem, 4vw, 3.4rem) clamp(1.4rem, 3vw, 2.4rem); }
.tt-hero-grid { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .tt-hero-grid { grid-template-columns: minmax(0, 1.28fr) minmax(0, .72fr); } }
.tt-hero-main { min-width: 0; display: grid; gap: 1.1rem; }
.tt-eyebrow { font: 650 .76rem/1.4 var(--tt-body); letter-spacing: .1em; text-transform: uppercase; color: var(--tt-accent); }
.tt h1 { font-size: clamp(2.5rem, 1.5rem + 4.2vw, 4.5rem); line-height: 1; letter-spacing: -.022em; max-width: 22ch; }
.tt-lede { font-size: clamp(1.02rem, .98rem + .3vw, 1.18rem); line-height: 1.6; max-width: 54ch; color: var(--tt-ink); }

/* Search: the charge box */
.tt-search { display: grid; gap: .45rem; margin-top: .4rem; }
.tt-combo { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 2px solid var(--tt-ink); border-radius: var(--tt-r); background: var(--tt-surface); }
.tt-combo::before { content: "§"; position: absolute; left: .95rem; top: 50%; transform: translateY(-52%); font: 600 1.6rem/1 var(--tt-display); color: var(--tt-accent); pointer-events: none; }
.tt-combo input { min-width: 0; width: 100%; height: 3.6rem; padding: 0 .9rem 0 2.5rem; border: 0; background: transparent; color: var(--tt-ink); font: 500 1.08rem/1.2 var(--tt-body); border-radius: var(--tt-r) 0 0 var(--tt-r); }
.tt-combo input::placeholder { color: #7a7468; opacity: 1; }
.tt-combo input:focus-visible { outline-offset: -5px; }
.tt-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .65rem 1.15rem; border-radius: var(--tt-r); font: 650 .92rem/1.3 var(--tt-body); letter-spacing: .01em; cursor: pointer; text-decoration: none; border: 1px solid var(--tt-line-2); background: transparent; color: var(--tt-ink); }
.tt-btn:hover { background: var(--tt-band); border-color: var(--tt-ink-2); }
.tt a.tt-btn-primary, .tt-btn-primary { background: var(--tt-accent); border-color: var(--tt-accent); color: var(--tt-on-accent); }
.tt a.tt-btn-primary:hover, .tt-btn-primary:hover { background: var(--tt-accent-2); border-color: var(--tt-accent-2); color: var(--tt-on-accent); }
.tt-combo .tt-btn { border-radius: 0; border: 0; border-left: 2px solid var(--tt-ink); min-height: 0; padding-inline: 1.3rem; background: var(--tt-ink); color: var(--tt-surface); }
.tt-combo .tt-btn:hover { background: var(--tt-accent-2); }
.tt-list { position: absolute; z-index: 20; left: -2px; right: -2px; top: calc(100% + 6px); margin: 0; padding: 0; list-style: none; background: var(--tt-surface); border: 1px solid var(--tt-ink); border-radius: var(--tt-r); max-height: min(26rem, 60vh); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 14px 30px -18px rgba(38, 34, 28, .55); }
.tt-opt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem 1rem; align-items: baseline; padding: .7rem .95rem; min-height: 48px; cursor: pointer; border-top: 1px solid var(--tt-line); }
.tt-opt:first-child { border-top: 0; }
.tt-opt[aria-selected="true"], .tt-opt:hover { background: var(--tt-band); box-shadow: inset 4px 0 var(--tt-accent); }
.tt-opt-name { font-weight: 600; }
.tt-opt-sec { font: 500 .8rem/1.4 var(--tt-mono); color: var(--tt-ink-2); grid-column: 1; }
.tt-opt-pts { grid-row: 1 / span 2; grid-column: 2; align-self: center; font: 600 .78rem/1.3 var(--tt-body); color: var(--tt-ink-2); white-space: nowrap; }
.tt-opt-none { padding: .9rem .95rem; color: var(--tt-ink-2); }
.tt-hint { font-size: .88rem; color: var(--tt-ink-2); }
.tt-picks { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.tt-picks .tt-label { margin-right: .3rem; }
.tt-pick { min-height: 40px; padding: .4rem .8rem; border: 1px solid var(--tt-line-2); border-radius: var(--tt-r); background: var(--tt-surface); color: var(--tt-ink); font: 500 .88rem/1.3 var(--tt-body); cursor: pointer; }
.tt-pick:hover { border-color: var(--tt-ink); background: var(--tt-band); }
.tt-meta { font-size: .84rem; color: var(--tt-ink-2); border-top: 1px solid var(--tt-line); padding-top: .9rem; }
.tt-jump { display: flex; flex-wrap: wrap; gap: 0 1.15rem; align-items: center; font-size: .92rem; margin-top: -.5rem; }
.tt-jump .tt-label { margin-right: .1rem; }
.tt-jump a { display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; }

/* The citation illustration */
.tt-slip { margin: 0; display: grid; gap: .8rem; min-width: 0; }
.tt-slip-paper { background: var(--tt-surface); border: 1px solid var(--tt-line-2); border-radius: 2px; padding: .9rem; display: grid; gap: .5rem; position: relative; box-shadow: 0 1px 0 var(--tt-line), 5px 6px 0 -1px var(--tt-ground-2), 5px 6px 0 0 var(--tt-line); }
.tt-slip-head { display: flex; justify-content: space-between; gap: 1rem; font: 700 .68rem/1.4 var(--tt-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tt-ink-2); border-bottom: 2px solid var(--tt-ink); padding-bottom: .45rem; }
.tt-slip-row { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.tt-slip-row.two { grid-template-columns: 1.6fr 1fr; }
.tt-slip-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tt-slip-f { border: 1px solid var(--tt-line-2); padding: .32rem .5rem .45rem; min-height: 2.9rem; display: grid; gap: .2rem; align-content: start; min-width: 0; }
.tt-slip-f i { font: 600 .58rem/1.3 var(--tt-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tt-ink-2); font-style: normal; }
.tt-slip-f b { font: 600 .88rem/1.3 var(--tt-mono); color: var(--tt-ink); }
.tt-slip-f .tt-ghost { display: block; height: .5rem; width: 72%; background: var(--tt-line); border-radius: 1px; margin-top: .3rem; }
.tt-slip-f .tt-ghost.s { width: 48%; }
.tt-slip-f.hi { border: 2px solid var(--tt-focus); background: #fff8f4; position: relative; }
.tt-slip-f.hi b { font-size: 1.12rem; }
.tt-slip-tag { position: absolute; right: -1px; top: -1px; background: var(--tt-focus); color: #fffdf8; font: 700 .6rem/1 var(--tt-body); letter-spacing: .08em; text-transform: uppercase; padding: .28rem .45rem; }
.tt-slip figcaption { font-size: .86rem; line-height: 1.55; color: var(--tt-ink-2); }
.tt-slip figcaption span { display: block; margin-top: .25rem; font-size: .76rem; }
@media (max-width: 959px) { .tt-slip { max-width: 28rem; } }

/* Result card */
.tt-main { display: grid; gap: clamp(2.2rem, 5vw, 4rem); padding-bottom: clamp(2rem, 5vw, 4rem); }
.tt-result { scroll-margin-top: 1rem; min-width: 0; }
.tt-card { background: var(--tt-surface); border: 1px solid var(--tt-line-2); border-top: 4px solid var(--tt-ink); border-radius: var(--tt-r); min-width: 0; }
.tt-card-head { padding: clamp(1.1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) 1rem; display: grid; gap: .5rem; }
.tt-kicker { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tt-kicker .tt-label { color: var(--tt-accent); }
.tt-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .16rem .5rem; border: 1px solid var(--tt-line-2); border-radius: 2px; font: 600 .74rem/1.45 var(--tt-body); color: var(--tt-ink-2); background: var(--tt-ground); }
.tt-card h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem); line-height: 1.04; letter-spacing: -.015em; }
.tt-cite { display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: baseline; color: var(--tt-ink-2); font-size: .95rem; }
.tt-cite .tt-sec { font: 600 .92rem/1.4 var(--tt-mono); color: var(--tt-ink); }
.tt-note { margin: 0 clamp(1rem, 3vw, 2rem) 1rem; padding: .8rem 1rem; border: 1px solid var(--tt-warn-line); border-left-width: 4px; border-radius: var(--tt-r); background: var(--tt-warn-bg); color: var(--tt-warn-ink); font-size: .95rem; display: grid; gap: .2rem; }
.tt-note b { font: 700 .72rem/1.4 var(--tt-body); letter-spacing: .08em; text-transform: uppercase; }

/* Speeding panel */
.tt-speed { margin: 0 clamp(1rem, 3vw, 2rem) 1.1rem; padding: 1rem; border: 1px dashed var(--tt-line-2); border-radius: var(--tt-r); background: var(--tt-ground); display: grid; gap: .9rem; }
.tt-speed-grid { display: grid; gap: .8rem 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
@media (min-width: 760px) { .tt-speed-grid { grid-template-columns: minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.5fr); } }
.tt-field { display: grid; gap: .3rem; min-width: 0; }
.tt-field label, .tt-field .tt-flabel { font: 600 .84rem/1.4 var(--tt-body); color: var(--tt-ink); }
.tt-field.wide { grid-column: 1 / -1; }
@media (min-width: 760px) { .tt-field.wide { grid-column: auto; } }
.tt-input, .tt-select { width: 100%; min-width: 0; min-height: 48px; padding: .55rem .7rem; border: 1px solid var(--tt-ink-2); border-radius: var(--tt-r); background: var(--tt-surface); color: var(--tt-ink); font: 500 1rem/1.3 var(--tt-body); font-variant-numeric: tabular-nums; }
.tt-select { text-overflow: ellipsis; }
.tt-unit { position: relative; }
.tt-unit .tt-input { padding-right: 3rem; font-size: 1.15rem; font-weight: 600; }
.tt-unit span { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); font: 600 .78rem/1 var(--tt-mono); color: var(--tt-ink-2); pointer-events: none; }
.tt-check { display: flex; gap: .6rem; align-items: flex-start; min-height: 44px; padding: .5rem 0; font-size: .95rem; cursor: pointer; }
.tt-check input { width: 1.2rem; height: 1.2rem; margin: .18rem 0 0; accent-color: var(--tt-ink); flex: none; }
.tt-error { color: var(--tt-grave-ink); background: var(--tt-grave-bg); border: 1px solid var(--tt-grave-line); border-radius: var(--tt-r); padding: .6rem .8rem; font-size: .92rem; }
.tt-math { font: 500 .88rem/1.7 var(--tt-mono); color: var(--tt-ink); background: var(--tt-surface); border: 1px solid var(--tt-line); border-radius: var(--tt-r); padding: .7rem .9rem; display: grid; gap: .1rem; font-variant-numeric: tabular-nums; }
.tt-math div { display: flex; justify-content: space-between; gap: 1rem; }
.tt-math div span:first-child { min-width: 0; }
.tt-math div span:last-child { white-space: nowrap; font-weight: 700; }
.tt-math .sum { border-top: 1px solid var(--tt-ink); margin-top: .3rem; padding-top: .3rem; }
.tt-math .dim { color: var(--tt-ink-2); }
.tt-math .dim span:last-child { font-weight: 500; }

/* The four read-outs */
.tt-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-block: 1px solid var(--tt-line-2); }
@media (min-width: 860px) { .tt-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tt-cell { padding: 1rem clamp(.8rem, 2vw, 1.4rem) 1.1rem; display: grid; gap: .35rem; align-content: start; border-left: 1px solid var(--tt-line); border-top: 1px solid var(--tt-line); min-width: 0; margin: -1px 0 0 -1px; }
.tt-val { font: 600 clamp(2rem, 1.5rem + 1.8vw, 2.9rem)/1.02 var(--tt-display); letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; color: var(--tt-ink); }
.tt-val.m { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.75rem); line-height: 1.1; }
.tt-val.l { font-size: clamp(1.2rem, 1.1rem + .35vw, 1.38rem); line-height: 1.14; letter-spacing: 0; }
.tt-tone { justify-self: start; display: inline-flex; gap: .4rem; align-items: center; padding: .14rem .5rem .14rem .4rem; border-radius: 2px; border: 1px solid var(--tt-line-2); font: 650 .74rem/1.45 var(--tt-body); color: var(--tt-ink-2); background: var(--tt-ground); }
.tt-tone i { font-style: normal; font-size: .7rem; line-height: 1; }
.tt-tone[data-tone="calm"] { background: var(--tt-calm-bg); color: var(--tt-calm-ink); border-color: var(--tt-calm-line); }
.tt-tone[data-tone="warn"] { background: var(--tt-warn-bg); color: var(--tt-warn-ink); border-color: var(--tt-warn-line); }
.tt-tone[data-tone="grave"] { background: var(--tt-grave-bg); color: var(--tt-grave-ink); border-color: var(--tt-grave-line); }

/* Detail rows */
.tt-detail { margin: 0; padding: .4rem clamp(1rem, 3vw, 2rem) 0; }
.tt-detail > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: .15rem 1.5rem; padding: .85rem 0; border-top: 1px solid var(--tt-line); }
.tt-detail > div:first-child { border-top: 0; }
@media (min-width: 760px) { .tt-detail > div { grid-template-columns: 12.5rem minmax(0, 1fr); } }
.tt-detail dt { font: 650 .9rem/1.5 var(--tt-body); color: var(--tt-ink); }
.tt-detail dd { margin: 0; max-width: 68ch; }
.tt-detail dd > * + * { margin-top: .55rem; }

/* What the citation costs: the itemized block inside a result */
.tt-cost { display: grid; gap: .55rem; }
.tt-cost-head { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; }
.tt-cost-q { font: 600 .84rem/1.4 var(--tt-body); color: var(--tt-ink); }
.tt-seg { display: inline-flex; border: 1px solid var(--tt-ink-2); border-radius: var(--tt-r); overflow: hidden; }
.tt-seg-b { min-height: 40px; min-width: 4.4rem; padding: .3rem .9rem; border: 0; background: var(--tt-surface); color: var(--tt-ink); font: 600 .9rem/1.2 var(--tt-mono); cursor: pointer; }
.tt-seg-b + .tt-seg-b { border-left: 1px solid var(--tt-ink-2); }
.tt-seg-b:hover { background: var(--tt-band); }
.tt-seg-b[aria-pressed="true"] { background: var(--tt-ink); color: var(--tt-surface); }
.tt .tt-seg-b:focus-visible { outline-offset: -4px; }
.tt .tt-seg-b[aria-pressed="true"]:focus-visible { outline-color: #fffdf8; }
.tt-costmath { font-family: var(--tt-body); font-size: .93rem; line-height: 1.45; gap: 0; padding: .35rem .9rem; }
.tt-costmath > div { padding: .42rem 0; border-top: 1px solid var(--tt-line); align-items: baseline; }
.tt-costmath > div:first-child { border-top: 0; }
.tt-costmath > div span:last-child { font-family: var(--tt-mono); font-size: .9rem; }
.tt-costmath small { display: block; font: 500 .74rem/1.45 var(--tt-mono); color: var(--tt-ink-2); }
.tt-costmath .sum { border-top: 2px solid var(--tt-ink); margin-top: 0; padding-top: .5rem; }
.tt-costmath .sum span { font-weight: 700; }
.tt-costmath .sum span:last-child { font-size: 1.02rem; }
.tt-costmath .txt span:last-child { white-space: normal; text-align: right; max-width: 55%; font-family: var(--tt-body); font-weight: 600; }
.tt-card-foot { padding: 1rem clamp(1rem, 3vw, 2rem) clamp(1.1rem, 3vw, 1.8rem); display: grid; gap: 1.1rem; border-top: 1px solid var(--tt-line-2); margin-top: .6rem; background: var(--tt-ground); border-radius: 0 0 var(--tt-r) var(--tt-r); }
.tt-plea { font-size: .95rem; max-width: 72ch; }
.tt-plea a { font-weight: 600; }
.tt-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.tt-sources h3 { font: 650 .72rem/1.4 var(--tt-body); letter-spacing: .09em; text-transform: uppercase; color: var(--tt-ink-2); margin-bottom: .4rem; }
.tt-sources ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .15rem .9rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); font-size: .86rem; }
.tt-sources li { min-width: 0; }
.tt-sources .tt-stamp { margin-top: .6rem; font: 500 .78rem/1.5 var(--tt-mono); color: var(--tt-ink-2); }
.tt-review { margin-top: .2rem; padding: .7rem .9rem; border: 1px dashed var(--tt-ink-2); background: var(--tt-surface); font-size: .86rem; border-radius: var(--tt-r); }
.tt-review b { font: 700 .7rem/1.4 var(--tt-mono); letter-spacing: .06em; text-transform: uppercase; display: block; margin-bottom: .2rem; }

/* Sections */
.tt-section { display: grid; gap: 1.2rem; min-width: 0; scroll-margin-top: 1rem; }
.tt-section > header { display: grid; gap: .45rem; max-width: 64ch; }
.tt-section h2 { font-size: clamp(1.8rem, 1.4rem + 1.5vw, 2.6rem); line-height: 1.06; letter-spacing: -.012em; }
.tt-section h3 { font-size: 1.45rem; line-height: 1.15; }
.tt-sub { color: var(--tt-ink-2); }

/* Point total */
.tt-tally { display: grid; gap: 1.2rem 2rem; grid-template-columns: minmax(0, 1fr); background: var(--tt-surface); border: 1px solid var(--tt-line-2); border-radius: var(--tt-r); padding: clamp(1rem, 3vw, 1.8rem); }
@media (min-width: 900px) { .tt-tally { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.tt-tally-in, .tt-tally-out { display: grid; gap: .9rem; align-content: start; min-width: 0; }
.tt-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: end; }
.tt-items { list-style: none; margin: 0; padding: 0; display: grid; }
.tt-items li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .8rem; align-items: center; padding: .5rem 0; border-top: 1px solid var(--tt-line); min-height: 48px; }
.tt-items li.off .tt-item-name { text-decoration: line-through; color: var(--tt-ink-2); }
.tt-item-pts { font: 600 .9rem/1 var(--tt-mono); white-space: nowrap; }
.tt-x { width: 40px; height: 40px; border: 1px solid var(--tt-line-2); border-radius: var(--tt-r); background: transparent; color: var(--tt-ink); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.tt-x:hover { background: var(--tt-band); border-color: var(--tt-ink); }
.tt-empty { color: var(--tt-ink-2); font-size: .94rem; padding: .7rem 0; border-top: 1px solid var(--tt-line); }
.tt-two { display: grid; gap: .8rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.tt-total { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.tt-total strong { font: 600 clamp(3.2rem, 2.4rem + 3vw, 4.6rem)/.9 var(--tt-display); font-variant-numeric: lining-nums tabular-nums; }
.tt-total span { font: 650 .8rem/1.4 var(--tt-body); letter-spacing: .09em; text-transform: uppercase; color: var(--tt-ink-2); }
.tt-gauge { display: grid; gap: .3rem; }
.tt-gauge-bar { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 3px; }
.tt-gauge-bar i { height: 16px; background: var(--tt-ground-2); border: 1px solid var(--tt-line-2); border-radius: 1px; }
.tt-gauge-bar i.on { background: var(--tt-ink-2); border-color: var(--tt-ink-2); }
.tt-gauge-bar i.on.w { background: var(--tt-warn-line); border-color: var(--tt-warn-line); }
.tt-gauge-bar i.on.g { background: var(--tt-grave-line); border-color: var(--tt-grave-line); }
.tt-gauge-bar i.mark { box-shadow: -3px 0 0 -1px var(--tt-ink); }
.tt-gauge-scale { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 3px; font: 600 .7rem/1.3 var(--tt-mono); color: var(--tt-ink-2); }
.tt-gauge-scale span { white-space: nowrap; }
.tt-outcomes { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.tt-outcomes li { padding: .7rem .9rem; border: 1px solid var(--tt-line-2); border-left-width: 4px; border-radius: var(--tt-r); background: var(--tt-ground); font-size: .95rem; }
.tt-outcomes li[data-tone="warn"] { background: var(--tt-warn-bg); border-color: var(--tt-warn-line); color: var(--tt-warn-ink); }
.tt-outcomes li[data-tone="grave"] { background: var(--tt-grave-bg); border-color: var(--tt-grave-line); color: var(--tt-grave-ink); }
.tt-outcomes li[data-tone="calm"] { background: var(--tt-calm-bg); border-color: var(--tt-calm-line); color: var(--tt-calm-ink); }
.tt-outcomes cite { font: 600 .8rem/1.4 var(--tt-mono); font-style: normal; white-space: nowrap; }
.tt-small { font-size: .86rem; color: var(--tt-ink-2); }
/* Several tickets: one estimate for the whole list, under the points read-out. */
.tt-samebox { border: 1px solid var(--tt-line-2); border-left: 4px solid var(--tt-ink); border-radius: var(--tt-r); background: var(--tt-ground); padding: .15rem .9rem .7rem; }
.tt-samebox .tt-check { font-weight: 600; }
.tt-samebox .tt-small { margin: 0 0 0 1.8rem; }
.tt-group { grid-column: 1 / -1; display: grid; gap: .75rem; min-width: 0; border-top: 2px solid var(--tt-ink); padding-top: 1.15rem; }
.tt .tt-group h3 { margin: 0; }
.tt-group > p { margin: 0; max-width: 80ch; }
.tt-group .tt-costmath small { font-family: var(--tt-body); font-size: .8rem; }
.tt-nudge { display: grid; gap: .6rem; justify-items: start; padding: .8rem 1rem; border: 1px solid var(--tt-warn-line); border-left-width: 4px; border-radius: var(--tt-r); background: var(--tt-warn-bg); color: var(--tt-warn-ink); }
.tt-nudge .tt-btn { background: var(--tt-surface); }

/* Chart */
.tt-filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.tt-filter { min-height: 40px; padding: .35rem .75rem; border: 1px solid var(--tt-line-2); border-radius: var(--tt-r); background: var(--tt-surface); color: var(--tt-ink); font: 500 .86rem/1.3 var(--tt-body); cursor: pointer; }
.tt-filter:hover { border-color: var(--tt-ink); }
.tt-filter[aria-pressed="true"] { background: var(--tt-ink); border-color: var(--tt-ink); color: var(--tt-surface); }
.tt-tablewrap { border: 1px solid var(--tt-line-2); border-radius: var(--tt-r); background: var(--tt-surface); min-width: 0; }
.tt-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tt-table caption { text-align: left; padding: .7rem 1rem; font-size: .84rem; color: var(--tt-ink-2); border-bottom: 1px solid var(--tt-line); }
.tt-table th, .tt-table td { text-align: left; vertical-align: top; padding: .6rem .8rem; border-top: 1px solid var(--tt-line); }
.tt-table thead th { border-top: 0; font: 650 .72rem/1.4 var(--tt-body); letter-spacing: .08em; text-transform: uppercase; color: var(--tt-ink-2); background: var(--tt-band); white-space: nowrap; }
.tt-table tbody th { font-weight: 600; }
.tt-table tbody th a { text-decoration-thickness: 1px; color: var(--tt-ink); }
.tt-table tbody th small { display: block; font: 500 .76rem/1.5 var(--tt-mono); color: var(--tt-ink-2); }
.tt-table td.n { font: 600 1rem/1.4 var(--tt-mono); white-space: nowrap; }
.tt-table tbody tr:hover { background: var(--tt-ground); }
.tt-more { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }
@media (max-width: 760px) {
  .tt-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .tt-table, .tt-table tbody, .tt-table caption { display: block; }
  .tt-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .tt-filter { flex: none; white-space: nowrap; }
  .tt-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem 1rem; padding: .8rem .9rem; border-top: 1px solid var(--tt-line); }
  .tt-table tbody tr:first-child { border-top: 0; }
  .tt-table th, .tt-table td { display: block; padding: 0; border: 0; }
  .tt-table tbody th { grid-column: 1 / -1; font-size: 1rem; }
  .tt-table td::before { content: attr(data-l); display: block; font: 650 .64rem/1.5 var(--tt-body); letter-spacing: .08em; text-transform: uppercase; color: var(--tt-ink-2); }
  .tt-table td.n { font-size: .95rem; white-space: normal; }
  .tt-table td[data-none] { display: none; }
  .tt-table tbody th small { display: inline; margin-left: .4rem; }
}

/* Cost table, worked examples, where-to-pay table */
.tt-table tr.sum th, .tt-table tr.sum td { border-top: 2px solid var(--tt-ink); background: var(--tt-band); font-weight: 700; }
.tt-costtable td:last-child { min-width: 15rem; }
.tt-paytable td:last-child { min-width: 12rem; }
@media (max-width: 760px) {
  .tt-costtable td:last-child, .tt-paytable td { grid-column: 1 / -1; min-width: 0; }
  .tt-costtable tbody th small { display: block; margin-left: 0; }
  .tt-table tr.sum { background: var(--tt-band); border-top: 2px solid var(--tt-ink); }
  .tt-table tr.sum th, .tt-table tr.sum td { border-top: 0; background: transparent; }
}

/* Paying: a plea notice, numbered steps, three ways to pay */
.tt-callout { border: 1px solid var(--tt-warn-line); border-left-width: 4px; background: var(--tt-warn-bg); color: var(--tt-warn-ink); border-radius: var(--tt-r); padding: 1rem 1.15rem 1.1rem; display: grid; gap: .45rem; }
.tt .tt-callout h3 { color: var(--tt-warn-ink); }
.tt-callout p { max-width: 78ch; }
.tt-steps { list-style: none; margin: 0; padding: 0; counter-reset: ttstep; border-top: 1px solid var(--tt-line-2); }
.tt-steps > li { counter-increment: ttstep; display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: .35rem 1rem; padding: 1.15rem 0; border-bottom: 1px solid var(--tt-line); }
.tt-steps > li::before { content: counter(ttstep); grid-row: 1 / span 4; font: 600 2.6rem/.95 var(--tt-display); color: var(--tt-accent); font-variant-numeric: lining-nums; }
.tt-steps > li > * { grid-column: 2; min-width: 0; }
.tt-steps p { max-width: 74ch; }
.tt-ways { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); margin-top: .35rem; }
.tt-ways > div { background: var(--tt-surface); border: 1px solid var(--tt-line-2); border-top: 3px solid var(--tt-ink); border-radius: var(--tt-r); padding: .9rem 1rem 1rem; display: grid; gap: .55rem; align-content: start; }
.tt-ways h4 { font: 650 .76rem/1.4 var(--tt-body); letter-spacing: .09em; text-transform: uppercase; color: var(--tt-ink-2); margin: 0; }
.tt-ways p { font-size: .95rem; }
.tt-ways a:not(.tt-btn) { font-weight: 600; }
@media (max-width: 560px) {
  .tt-steps > li > .tt-ways { grid-column: 1 / -1; }
  .tt-steps > li { grid-template-columns: 2.1rem minmax(0, 1fr); gap: .3rem .65rem; }
  .tt-steps > li::before { font-size: 2rem; }
}

/* Notes grid, changes, questions */
.tt-grid2 { display: grid; gap: 0 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }
.tt-grid2 > div { padding: 1.1rem 0; border-top: 1px solid var(--tt-line-2); display: grid; gap: .4rem; align-content: start; }
.tt-grid2 p { max-width: 62ch; }
.tt-changes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--tt-line-2); }
.tt-changes li { display: grid; gap: .2rem 1.5rem; grid-template-columns: minmax(0, 1fr); padding: .9rem 0; border-bottom: 1px solid var(--tt-line); }
@media (min-width: 760px) { .tt-changes li { grid-template-columns: 10.5rem minmax(0, 1fr); } }
.tt-changes time { font: 600 .88rem/1.6 var(--tt-mono); color: var(--tt-ink); }
.tt-changes .tt-chip { margin-left: .2rem; }
.tt-changes small { display: block; font: 500 .8rem/1.5 var(--tt-mono); color: var(--tt-ink-2); margin-top: .2rem; }
.tt-chip[data-tone="warn"] { background: var(--tt-warn-bg); border-color: var(--tt-warn-line); color: var(--tt-warn-ink); }
.tt-qa { display: grid; gap: 0; border-top: 1px solid var(--tt-line-2); }
.tt-qa > div { padding: 1.1rem 0; border-bottom: 1px solid var(--tt-line); display: grid; gap: .45rem; }
.tt-qa p { max-width: 70ch; }

/* Review band, cite, footer */
.tt-cta { background: var(--tt-ink); color: var(--tt-surface); border-radius: var(--tt-r); padding: clamp(1.4rem, 4vw, 2.6rem); display: grid; gap: 1.2rem 2.5rem; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 860px) { .tt-cta { grid-template-columns: minmax(0, 1.3fr) auto; } }
.tt .tt-cta h2 { color: var(--tt-surface); font-size: clamp(1.8rem, 1.4rem + 1.5vw, 2.6rem); line-height: 1.06; }
.tt-cta p { color: #e6dfd0; max-width: 56ch; margin-top: .6rem; }
.tt-cta-act { display: grid; gap: .7rem; justify-items: start; }
.tt .tt-cta a.tt-btn-primary { background: var(--tt-surface); border-color: var(--tt-surface); color: var(--tt-ink); min-height: 52px; padding-inline: 1.5rem; font-size: 1rem; }
.tt .tt-cta a.tt-btn-primary:hover { background: #e6dfd0; border-color: #e6dfd0; color: var(--tt-ink); }
.tt-cta :focus-visible { outline-color: #fffdf8; }
.tt-phone { font: 600 1.25rem/1.3 var(--tt-display); letter-spacing: .01em; color: var(--tt-surface); }
.tt .tt-cta a.tt-phone { color: var(--tt-surface); text-decoration: none; }
.tt-cta .tt-small { color: #cfc7b6; margin-top: 0; }
.tt-linkbox { display: grid; gap: .9rem; background: var(--tt-surface); border: 1px solid var(--tt-line-2); border-radius: var(--tt-r); padding: clamp(1rem, 3vw, 1.6rem); }
.tt-linkrow { display: grid; gap: .4rem .8rem; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 720px) { .tt-linkrow { grid-template-columns: minmax(0, 1fr) auto; } }
.tt-code { font: 500 .88rem/1.55 var(--tt-mono); background: var(--tt-ground); border: 1px solid var(--tt-line); border-radius: var(--tt-r); padding: .6rem .75rem; user-select: all; overflow-wrap: anywhere; }
.tt-foot { border-top: 1px solid var(--tt-line-2); padding-block: 1.6rem 2.2rem; font-size: .86rem; color: var(--tt-ink-2); }
.tt-foot .tt-wrap { display: grid; gap: .5rem; }
.tt-foot strong { color: var(--tt-ink); font-weight: 650; }
.tt-toast { position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--tt-ink); color: var(--tt-surface); padding: .6rem 1rem; border-radius: var(--tt-r); font: 600 .9rem/1.4 var(--tt-body); z-index: 50; max-width: calc(100vw - 32px); }

@media (prefers-reduced-motion: reduce) { .tt, .tt * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media (forced-colors: active) {
  .tt-tone, .tt-chip, .tt-note, .tt-outcomes li, .tt-slip-f.hi, .tt-callout, .tt-nudge, .tt-samebox { border: 1px solid CanvasText; }
  .tt-seg-b[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .tt-gauge-bar i.on { background: Highlight; }
  .tt-filter[aria-pressed="true"] { border: 2px solid Highlight; }
}
@media print {
  .tt { background: #fff; color: #000; }
  .tt-draft, .tt-hero .tt-search, .tt-picks, .tt-jump, .tt-slip, .tt-actions, #points, #chart, #costs, #pay, #beyond, #changes, #questions, #review, #cite, .tt-speed-grid, .tt-toast, .tt-seg-b[aria-pressed="false"] { display: none !important; }
  .tt-seg { border: 0; }
  .tt-seg-b[aria-pressed="true"] { background: none; color: #000; padding: 0; min-height: 0; min-width: 0; }
  .tt-hero { border: 0; padding: 0 0 8pt; }
  .tt h1 { font-size: 20pt; max-width: none; }
  .tt-lede, .tt-meta { font-size: 9pt; }
  .tt-card { border: 1px solid #000; break-inside: avoid; }
  .tt-card-foot { background: #fff; }
  .tt a { color: #000; }
  .tt-sources a::after { content: " (" attr(href) ")"; font-size: 7pt; overflow-wrap: anywhere; }
}
