/* TE Certified — shared design system. Square corners, 1px hairlines, stepped motion. */

/* Tokens: palette, type, rhythm */
:root {
  --cherry: #45172D;
  --green: #103D33;
  --ink: #FFF2D8;
  --pink: #FF85BF;
  --volt: #E0F65B;
  --hair: 0.0625rem;
  --display: 'Anybody', 'Arial Narrow', system-ui, sans-serif;
  --text: 'Literata', Georgia, 'Times New Roman', serif;
  --fs-body: 1rem;
  --fs-small: 0.9375rem;
  --fs-h1: clamp(1.875rem, 1.2rem + 2.6vw, 4.25rem);
  --fs-h2: clamp(1.625rem, 1.1rem + 2vw, 2.875rem);
  --fs-h3: clamp(1.25rem, 1rem + 0.8vw, 1.625rem);
  --gut: clamp(1rem, 4vw, 3.5rem);
  --pad: clamp(2.5rem, 9vh, 6.5rem);
  --max: 82rem;
  --node: 0.875rem;
  --chrome-h: 3.75rem;
  --step: 360ms;
  --tilt: -6deg;
}
@media (min-width: 48em) { :root { --fs-body: 1.0625rem; --fs-small: 0.95rem; } }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cherry); color: var(--ink);
  font: 400 var(--fs-body)/1.6 var(--text);
  padding-top: var(--chrome-h);
}
img, svg, video { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-thickness: var(--hair); text-underline-offset: 0.2em; }
a:hover { color: var(--volt); }
:focus-visible { outline: var(--hair) solid var(--volt); outline-offset: 0.2rem; box-shadow: 0 0 0 0.2rem var(--cherry); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 0.5rem; top: -4rem; z-index: 100; background: var(--volt); color: var(--cherry); padding: 0.6rem 1rem; }
.skip:focus { top: 0.5rem; }

/* Station: full-width hard-edged section block. Use .station + .station--cherry | .station--green, inner .wrap */
.station { padding-block: var(--pad); position: relative; }
.station--cherry { background: var(--cherry); }
.station--green { background: var(--green); }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }

/* Titles: Anybody 150% width, weight 500, rising 6deg on desktop. Wrap in .title-wrap; use .title (h1) or .title.title--h2 */
.title-wrap { container-type: inline-size; }
.title {
  font-family: var(--display); font-weight: 500; font-stretch: 150%;
  font-size: var(--fs-h1); line-height: 1.12; letter-spacing: 0;
  margin: 0; text-wrap: balance; overflow-wrap: anywhere;
}
.title--h2 { font-size: var(--fs-h2); }
h3, .h3 { font-family: var(--display); font-weight: 500; font-stretch: 130%; font-size: var(--fs-h3); line-height: 1.2; margin: 0 0 0.5em; }
@media (min-width: 64em) {
  .title { transform: rotate(var(--tilt)); transform-origin: 0 100%; margin-top: 10.6cqi; margin-bottom: 0.4em; max-width: 92cqi; }
}
.lede { font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem); line-height: 1.5; max-width: 38em; }

/* The route pair (recurring device): .pair > .node.node--notice + .elbow + .node.node--service; labels in .pair__label */
.pair { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0; }
.node { display: inline-block; width: var(--node); height: var(--node); flex: none; border: var(--hair) solid var(--ink); }
.node--notice { background: var(--pink); border-color: var(--pink); }
.node--service { background: var(--volt); border-color: var(--volt); }
.node--stop { background: transparent; }
.node--hollow-notice { background: transparent; border-color: var(--pink); }
.node.is-filled.node--hollow-notice { background: var(--pink); }
.elbow { height: 1.25rem; border-top: var(--hair) solid var(--ink); border-right: var(--hair) solid var(--ink); margin: 0.6rem 0 0; align-self: start; }
.pair--flat .elbow { border-right: 0; height: 0; margin: 0; align-self: center; }
.pair__label { font-size: var(--fs-small); line-height: 1.35; }
.pair__rows { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 1.5rem; margin-top: 0.4rem; }
.pair__rows > :last-child { text-align: right; }
.route-line { stroke: var(--ink); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.route-line--solid { stroke-width: 3; }

/* Route marker: a square that jumps between stops. Set --x/--y (or --at) from page CSS; script sets data-at */
.marker { position: absolute; width: calc(var(--node) + 0.375rem); height: calc(var(--node) + 0.375rem); background: var(--ink); border: var(--hair) solid var(--cherry); pointer-events: none; transition: transform var(--step) steps(2, jump-end), left var(--step) steps(2, jump-end), top var(--step) steps(2, jump-end); }

/* Ticket: bordered, ruled rows. Use .ticket > .ticket__row (add .ticket__row--tall for the title row); .ticket__key for a margin label */
.ticket { border: var(--hair) solid var(--ink); background: var(--cherry); }
.ticket__row { display: grid; grid-template-columns: minmax(6rem, auto) 1fr; gap: 1rem; padding: 0.85rem 1rem; border-top: var(--hair) solid var(--ink); align-items: baseline; }
.ticket__row:first-child { border-top: 0; }
.ticket__row--tall { display: block; padding-block: 1.25rem; }
.ticket__key { font-size: var(--fs-small); color: var(--pink); }
.ticket__num { font-family: var(--display); font-stretch: 150%; font-weight: 500; }

/* Figure and caption: painted plate in a hairline mount. Use .plate-fig > img + figcaption */
.plate-fig { margin: 0; border: var(--hair) solid var(--ink); background: var(--green); }
.plate-fig img { width: 100%; object-fit: cover; }
.plate-fig figcaption { font-size: var(--fs-small); padding: 0.6rem 0.9rem; border-top: var(--hair) solid var(--ink); line-height: 1.45; }

/* Rule: a one-pixel ink hairline. Use <hr class="rule"> */
.rule { border: 0; border-top: var(--hair) solid var(--ink); margin: 1.5rem 0; }

/* Buttons: square, hairline. .btn outline, .btn--solid filled volt, .btn--notice filled pink. aria-pressed styles toggles */
.btn, .consent button, .index-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 2.75rem; padding: 0.55rem 1.1rem; border: var(--hair) solid var(--ink); border-radius: 0;
  background: transparent; color: var(--ink); font: 400 1rem/1.2 var(--text); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--ink); color: var(--cherry); }
.btn--solid { background: var(--volt); border-color: var(--volt); color: var(--cherry); }
.btn--notice { background: var(--pink); border-color: var(--pink); color: var(--cherry); }
.btn--solid:hover, .btn--notice:hover { background: var(--ink); border-color: var(--ink); }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--cherry); }
.btn .node { border-color: currentColor; }
.linkish { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-decoration-thickness: var(--hair); text-underline-offset: 0.2em; cursor: pointer; min-height: 2.75rem; }

/* Fact list: two-column ledger rows the width of their box. Use <dl class="facts"> with div > dt + dd */
.facts { margin: 0; border-top: var(--hair) solid var(--ink); }
.facts > div { display: grid; grid-template-columns: minmax(7rem, 30%) 1fr; gap: 1rem; padding: 0.7rem 0; border-bottom: var(--hair) solid var(--ink); }
.facts dt { color: var(--pink); font-size: var(--fs-small); }
.facts dd { margin: 0; }

/* Next stop: end-of-page hand-off. Use .next > .pair + a.next__link */
.next { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: center; }
.next__link { font-size: var(--fs-h3); text-decoration: none; border-bottom: var(--hair) solid var(--ink); padding-bottom: 0.3rem; }
@media (min-width: 48em) { .next { grid-template-columns: 1fr auto auto; } }

/* Reveal on scroll: add .reveal; script adds .is-shown. Moves in two hard steps, never fades */
.js .reveal { transform: translateY(1.5rem); transition: transform var(--step) steps(2, jump-end); }
.js .reveal.is-shown { transform: none; }

/* Chrome: Index square upper left, name plate upper right, both on solid grounds */
.chrome { position: fixed; inset: 0 0 auto 0; z-index: 60; display: flex; justify-content: space-between; align-items: flex-start; padding: 0.5rem var(--gut); pointer-events: none; }
.chrome > * { pointer-events: auto; }
.index-btn { background: var(--cherry); min-width: 5.5rem; }
.index-btn[aria-expanded="true"] { background: var(--ink); color: var(--cherry); }
.plate { display: flex; align-items: stretch; background: var(--cherry); border: var(--hair) solid var(--ink); }
.brand { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0.8rem 0.3rem 0.35rem; text-decoration: none; min-height: 2.75rem; font-size: 1rem; }
.mark { width: 2rem; height: 2rem; }
.plate__call { display: flex; align-items: center; padding: 0 0.9rem; border-left: var(--hair) solid var(--ink); background: var(--volt); color: var(--cherry); text-decoration: none; }
.plate__call:hover { background: var(--ink); color: var(--cherry); }
body:has(#promo.is-in) .chrome { top: var(--promo-h, 3.5rem); }

/* Index overlay: full window, very large Literata links hung on the house route */
.index { position: fixed; inset: 0; z-index: 55; background: var(--cherry); overflow-y: auto; padding: calc(var(--chrome-h) + 1.5rem) var(--gut) 2rem; }
.index[hidden] { display: none; }
.index__inner { max-width: var(--max); margin: 0 auto; display: grid; gap: 2rem; }
.index__route { list-style: none; margin: 0; padding: 0 0 0 1.75rem; position: relative; }
.index__route::before { content: ""; position: absolute; left: calc(var(--node) / 2); top: 0.9em; bottom: 0.9em; border-left: var(--hair) solid var(--ink); }
.index__route li { display: flex; align-items: center; gap: 1rem; margin-left: -1.75rem; position: relative; }
.index__route .node { background: var(--cherry); }
.index__route .node--notice { background: var(--pink); }
.index__route .node--service { background: var(--volt); }
.index__route a { font-size: clamp(1.75rem, 1rem + 3.6vw, 3.75rem); line-height: 1.25; text-decoration: none; padding-block: 0.15em; }
.index__route a:hover, .index__route a[aria-current] { color: var(--volt); text-decoration: underline; text-decoration-thickness: var(--hair); }
.index__aside { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; font-size: var(--fs-small); }
@media (min-width: 64em) { .index__inner { grid-template-columns: 1fr 18rem; align-items: end; } }

/* Footer: bottle-green map station with a small drawn schematic map, legend, then a route of links */
.foot { background: var(--green); padding-block: var(--pad) 2rem; }
.foot__map { max-width: var(--max); margin: 0 auto; padding-inline: var(--gut); display: grid; gap: 2rem; }
@media (min-width: 56em) { .foot__map { grid-template-columns: minmax(0, 26rem) 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; } }
.map { margin: 0; max-width: 26rem; }
.map svg { width: 100%; }
.map figcaption { font-size: var(--fs-small); margin-top: 0.6rem; }
.map__node rect { fill: var(--green); stroke: var(--volt); stroke-width: 1; }
.map__node text { fill: var(--ink); }
.map__node.is-on rect { fill: var(--volt); }
.map__node.is-on text { fill: var(--cherry); }
.foot__h { font-family: var(--display); font-weight: 500; font-stretch: 150%; font-size: var(--fs-h3); margin: 0 0 1rem; }
.foot__apos { font-family: var(--text); font-stretch: normal; }
.legend { list-style: none; margin: 0 0 1.25rem; padding: 0; border-top: var(--hair) solid var(--ink); }
.legend li { display: flex; gap: 0.9rem; padding: 0.6rem 0; border-bottom: var(--hair) solid var(--ink); }
.legend__n { flex: none; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border: var(--hair) solid var(--volt); font-size: 0.9rem; }
.legend li.is-on .legend__n { background: var(--volt); color: var(--cherry); }
.foot__confirm { font-size: var(--fs-h3); line-height: 1.3; }
.foot__route { max-width: var(--max); margin: var(--pad) auto 0; padding-inline: var(--gut); }
.foot__route-in { border-top: var(--hair) solid var(--ink); padding-top: 1.5rem; display: grid; gap: 1.25rem; }
.foot__name { margin: 0; color: var(--volt); font-size: 1.125rem; }
.foot__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 2.25rem; font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); line-height: 1.25; }
.foot__links li { display: flex; align-items: center; gap: 0.7rem; }
.foot__links li::before { content: ""; flex: none; width: 0.625rem; height: 0.625rem; border: var(--hair) solid var(--ink); }
.foot__links li:hover::before { background: var(--volt); border-color: var(--volt); }
.foot__links a, .foot__links .linkish { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none; }
.foot__links a:hover, .foot__links .linkish:hover { color: var(--volt); text-decoration: underline; text-decoration-thickness: var(--hair); text-underline-offset: 0.2em; }
.foot__small { font-size: var(--fs-small); margin: 0; }

/* Consent: small solid plate fixed lower left, two stacked equal controls. On phones a narrow plate:
   one short line (.consent__short replaces .consent__long) and two lower controls, clear of the call action */
.consent { position: fixed; left: var(--gut); bottom: 1rem; z-index: 70; width: min(20rem, calc(100% - 2 * var(--gut))); background: var(--cherry); border: var(--hair) solid var(--ink); padding: 0.9rem; font-size: var(--fs-small); }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 0.75rem; line-height: 1.4; }
.consent__long { display: inline; }
.consent__short { display: none; }
.consent__btns { display: grid; gap: 0.5rem; }
.consent button { width: 100%; background: var(--cherry); }
.consent button:hover { background: var(--ink); color: var(--cherry); }
@media (max-width: 40em) {
  .consent { left: 0.5rem; bottom: 0.5rem; width: min(11.5rem, calc(100% - 1rem)); padding: 0.4rem 0.5rem 0.5rem; }
  .consent p { margin: 0 0 0.35rem; line-height: 1.3; white-space: nowrap; }
  .consent__long { display: none; }
  .consent__short { display: inline; }
  .consent__btns { gap: 0.3rem; }
  .consent button { min-height: 2.5rem; padding: 0.25rem 0.4rem; font-size: 0.9375rem; }
}

/* Offer strip: full-width square strip at the very top, drops in three hard steps (only when a verified offer exists) */
.promo { position: fixed; inset: 0 0 auto 0; z-index: 65; min-height: var(--promo-h, 3.5rem); display: flex; align-items: center; gap: 1rem; justify-content: space-between; padding: 0.4rem var(--gut); background: var(--pink); color: var(--cherry); border-bottom: var(--hair) solid var(--cherry); transform: translateY(-100%); opacity: 0; transition: transform 450ms steps(3, jump-end), opacity 450ms steps(3, jump-end); }
.promo.is-in { transform: none; opacity: 1; }
.promo__text { margin: 0; font-size: var(--fs-small); line-height: 1.35; }
.promo__close { flex: none; width: 2.75rem; height: 2.75rem; border: var(--hair) solid var(--cherry); background: var(--pink); color: var(--cherry); font-size: 1.25rem; cursor: pointer; }

/* Reduced motion: every stepped move lands at once */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { transform: none; }
}

/* A page never scrolls sideways. */
html, body { overflow-x: clip; }
/* Past a full-HD window the whole page grows with the window - type, gaps and pictures
   together - so a very wide screen (or a page zoomed far out) shows the same composition,
   not a small column of text lost in an enormous picture. */
@media (min-width: 1921px) { html { font-size: calc(100vw / 120); } }
/* What can be pressed in the chrome lies above the page: a huge headline's line box reaching
   into the navigation must not swallow the clicks meant for the links. */
header a, header button, nav a, nav button { position: relative; z-index: 2; }
/* A visitor who asked the system for less motion gets none, whatever a page forgot. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
