/* Pennyfield Marquee Hire (concept). Direction: Festival of Britain 1951 + Isotype counting.
   One blue field, cream paper sheets pinned to it, mustard for guests only, poppy for "Get a quote" only.
   Faces: Besley (Clarendon, display) + Cabin (humanist, text). */
@layer reset, tokens, base, layout, components, pages, utilities;

/* metric-matched fallbacks (measured against Besley 900 and Cabin 400), so the swap to the web fonts barely moves the page */
@font-face { font-family: 'Besley Fallback'; src: local('Georgia Bold'), local('Georgia-Bold'), local('Georgia'); font-weight: 600 900; size-adjust: 112.6%; ascent-override: 111%; descent-override: 38.2%; line-gap-override: 0%; }
@font-face { font-family: 'Cabin Fallback'; src: local('Arial'), local('Helvetica'), local('Roboto'); size-adjust: 93.9%; ascent-override: 102.2%; descent-override: 26.6%; line-gap-override: 0%; }

/* self-hosted web fonts (OFL, see fonts/LICENSE.txt): variable, latin subset */
@font-face { font-family: 'Besley'; font-style: normal; font-weight: 600 900; font-display: swap; src: url(../fonts/besley-latin-var.woff2) format('woff2'); }
@font-face { font-family: 'Cabin'; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url(../fonts/cabin-latin-var.woff2) format('woff2'); }

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset, legend { margin: 0; padding: 0; }
  ul, ol { list-style: none; }
  img, svg { display: block; max-width: 100%; }
  input, button, select, textarea { font: inherit; color: inherit; }
  button { cursor: pointer; }
  fieldset { border: 0; min-width: 0; }
  :where(h1, h2, h3, p, li, dd, dt) { overflow-wrap: break-word; }
}

@layer tokens {
  :root {
    /* Festival 1951 colour world, tuned (contrast measured: cream on field 7.3, ink on cream 14.5, mustard on field 4.6) */
    --field: #1F4E8C;   --field-2: #2A5C9E;  --field-3: #183F73;
    --cream: #F4EFE6;   --paper: #F7F3EB;    --paper-2: #ECE5D8;   --white: #FFFDF8;
    --mute: #C9D6EA;    /* second-level text on the field (5.7) */
    --ink: #161E33;     --ink-2: #3E4A63;    /* on paper (14.5 / 8.3) */
    --mustard: #F2B632; /* guests: every counted table and figure, nothing else */
    --green: #17695F;   --green-f: #5CC2B3; /* in the price: on paper / on the field (icons and large text only) */
    --poppy: #CC1A44;   --poppy-d: #A8133A; /* Get a quote, and nothing else */
    --night: #0F1B33;
    --ring: var(--mustard);

    --display: 'Besley', 'Besley Fallback', Georgia, serif;
    --text: 'Cabin', 'Cabin Fallback', Arial, sans-serif;

    --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem;
    --sec: clamp(4rem, 2.6rem + 6vw, 8rem);
    --gut: 1rem;
    --ticket-h: 4rem;

    --dur-xs: 120ms; --dur-sm: 200ms; --dur-md: 280ms; --dur-lg: 450ms; --dur-xl: 900ms;
    --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-in: cubic-bezier(.7, 0, .84, 0); --ease-io: cubic-bezier(.87, 0, .13, 1);
  }
  @media (min-width: 48rem) { :root { --gut: 2rem; } }
  @media (prefers-reduced-motion: reduce) { :root { --dur-lg: 150ms; --dur-xl: 200ms; } }
}

@layer base {
  html { background: var(--field); color: var(--cream); scroll-padding-top: 1rem; scroll-padding-bottom: calc(var(--ticket-h) + 2rem); }
  body {
    font-family: var(--text); font-size: 1.125rem; line-height: 1.55; font-weight: 400;
    background: var(--field);
    font-kerning: normal; font-variant-numeric: lining-nums;
  }
  h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.05; letter-spacing: -.012em; text-wrap: balance; }
  p, li, dd { text-wrap: pretty; }
  a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: .08em; }
  a:hover { text-decoration-thickness: .14em; }
  :focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
  ::selection { background: var(--mustard); color: var(--ink); }
  /* tabular figures in Cabin only: Besley's tabular zero is drawn lighter, so display figures stay proportional */
  .num, td, .tab { font-variant-numeric: tabular-nums lining-nums; }
  h1, h2, h3, .price, .call b, .dial-n, .r-price b, .rp b, .gv, .js-total b, .t-a { font-variant-numeric: lining-nums proportional-nums; }
  .vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
  .pg { width: 1.5rem; height: 1.5rem; fill: currentColor; flex: none; }
  [hidden] { display: none !important; }
}

@layer layout {
  .wrap { width: min(100% - 2 * var(--gut), 84rem); margin-inline: auto; }
  .sec { padding-block: var(--sec); }
  .sec + .sec { padding-top: 0; }
}

@layer components {
  /* skip link + concept bar */
  .skip { position: absolute; left: 1rem; top: -4rem; z-index: 1300; background: var(--cream); color: var(--ink); padding: .75rem 1rem; font-weight: 700; }
  .skip:focus { top: 1rem; }
  .concept { background: var(--night); color: var(--cream); font-size: .875rem; line-height: 1.3; }
  .concept .wrap { display: flex; gap: 1rem; justify-content: space-between; align-items: center; min-height: 2rem; padding-block: .3rem; }
  .concept a { white-space: nowrap; display: inline-flex; align-items: center; min-height: 1.5rem; }
  @media (max-width: 37.5rem) { .concept a { display: none; } }

  /* masthead: name and phone; the way round the site is the ticket at the bottom */
  .mast .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
  .brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; min-height: 44px; }
  .brand .pg { width: 2.4rem; height: 2.4rem; color: var(--cream); }
  .brand b { font-family: var(--display); font-weight: 900; font-size: 1.6rem; letter-spacing: -.01em; line-height: 1; }
  .brand .b-t > span { display: block; font-size: .875rem; color: var(--mute); line-height: 1.2; margin-top: .1rem; }
  .call { display: flex; align-items: center; gap: .55rem; text-decoration: none; min-height: 44px; padding: .25rem 0; }
  .call .pg { width: 2.75rem; height: 2.75rem; padding: .6rem; border-radius: 50%; background: var(--cream); color: var(--field); }
  .call b { font-family: var(--display); font-weight: 800; font-size: 1.2rem; display: block; line-height: 1.1; white-space: nowrap; }
  .call small { display: block; font-size: .8125rem; color: var(--mute); line-height: 1.2; }
  @media (max-width: 30rem) { .call .c-txt b { font-size: 1rem; } .call .pg { width: 2.25rem; height: 2.25rem; padding: .5rem; } .call { gap: .4rem; } .brand .b-t > span { display: none; } .brand b { font-size: 1.35rem; } .brand .pg { width: 1.9rem; height: 1.9rem; } }
  @media (max-width: 25rem) { .call .c-txt b { font-size: .9375rem; } .brand b { font-size: 1.2rem; } .mast .wrap { gap: .5rem; } }
  /* very narrow: the number is visually hidden but stays the link's name */
  @media (max-width: 22rem) { .call { min-width: 44px; justify-content: center; } }
  @media (max-width: 22rem) { .call .c-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

  /* ticket buttons: a rectangle with a half-round notch at each end, like a raffle ticket.
     The shape is painted on ::before so focus outlines are never clipped. */
  .btn {
    --bg: var(--cream); --fg: var(--ink);
    position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 3.25rem; padding: .7rem 1.6rem; border: 0; background: none; color: var(--fg);
    font-family: var(--text); font-weight: 700; font-size: 1.125rem; line-height: 1.1; text-decoration: none; white-space: nowrap;
    transition: transform var(--dur-xs) var(--ease-out);
  }
  .btn::before {
    content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg); transition: background-color var(--dur-sm);
    -webkit-mask: radial-gradient(circle at 0 50%, #0000 .45rem, #000 calc(.45rem + .5px)) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, #0000 .45rem, #000 calc(.45rem + .5px)) right / 51% 100% no-repeat;
            mask: radial-gradient(circle at 0 50%, #0000 .45rem, #000 calc(.45rem + .5px)) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, #0000 .45rem, #000 calc(.45rem + .5px)) right / 51% 100% no-repeat;
  }
  .btn:active { transform: translateY(1px) scale(.985); }
  .btn-go { --bg: var(--poppy); --fg: var(--cream); }
  .btn-go:hover { --bg: var(--poppy-d); }
  .btn-alt { --bg: var(--cream); --fg: var(--ink); }
  .btn-alt:hover { --bg: var(--white); }
  .paper .btn-alt, .ticket .btn-alt { --bg: var(--field); --fg: var(--cream); }
  .paper .btn-alt:hover { --bg: var(--field-3); }
  .btn-sm { min-height: 2.75rem; padding: .5rem 1.15rem; font-size: 1rem; }
  .btn .pg { width: 1.25rem; height: 1.25rem; }
  @media (forced-colors: active) { .btn { border: 2px solid ButtonText; } .btn::before { -webkit-mask: none; mask: none; } }

  /* paper sheets pinned to the field */
  .paper { --ring: var(--ink); background: var(--paper); color: var(--ink); }
  .paper a:not(.btn) { color: var(--ink); }

  /* the ticket: the way round the site, and your marquee carried from page to page */
  .ticket {
    position: fixed; z-index: 100; left: .5rem; right: .5rem; bottom: max(.5rem, env(safe-area-inset-bottom));
    display: flex; align-items: stretch; min-height: var(--ticket-h);
    color: var(--ink); view-transition-name: ticket;
    filter: drop-shadow(0 .4rem 1rem rgb(9 18 38 / .35));
  }
  .ticket::before {
    content: ""; position: absolute; inset: 0; z-index: -1; background: var(--cream);
    -webkit-mask: radial-gradient(circle at 0 50%, #0000 .55rem, #000 calc(.55rem + .5px)) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, #0000 .55rem, #000 calc(.55rem + .5px)) right / 51% 100% no-repeat;
            mask: radial-gradient(circle at 0 50%, #0000 .55rem, #000 calc(.55rem + .5px)) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, #0000 .55rem, #000 calc(.55rem + .5px)) right / 51% 100% no-repeat;
  }
  .ticket { --ring: var(--ink); }
  .t-stub { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: .6rem; padding: .45rem .5rem .45rem 1.05rem; text-decoration: none; border-right: 2px dashed rgb(22 30 51 / .35); }
  .t-stub .pg { width: 2rem; height: 2rem; color: var(--field); }
  .t-txt { min-width: 0; line-height: 1.15; }
  .t-a { display: block; font-family: var(--display); font-weight: 800; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .t-b { display: block; font-size: .875rem; color: var(--ink-2); font-stretch: 85%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .t-nav { display: flex; align-items: center; gap: .25rem; padding: .4rem 1.15rem .4rem .5rem; flex: none; }
  .t-nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .65rem; font-weight: 700; font-size: 1rem; text-decoration: none; border-radius: .25rem; }
  .t-nav a:not(.btn):hover { text-decoration: underline; }
  .t-nav a[aria-current="page"]:not(.btn) { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--field); }
  .t-nav .btn { min-height: 2.75rem; padding: .5rem 1.05rem; font-size: 1rem; }
  .t-nav .long { display: none; }
  .t-warn { position: absolute; left: 1rem; right: 1rem; bottom: calc(100% + .4rem); background: var(--mustard); color: var(--ink); font-size: .9375rem; line-height: 1.3; padding: .55rem .8rem; display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; }
  .t-warn button { min-height: 2.5rem; padding: .3rem .8rem; background: var(--ink); color: var(--cream); border: 0; font-weight: 700; font-size: .9375rem; }
  @media (max-width: 39.99rem) { .t-g { display: none; } }
  @media (min-width: 40rem) {
    .ticket { left: 50%; right: auto; width: min(100% - 2rem, 50rem); transform: translateX(-50%); bottom: max(1rem, env(safe-area-inset-bottom)); }
    .t-nav .long { display: inline; }
    .t-nav .short { display: none; }
    .t-b { font-stretch: 100%; }
  }
  @media (max-width: 23rem) { .t-stub .pg { display: none; } .t-stub { padding-left: .9rem; } .t-nav a:not(.btn) { padding: 0 .45rem; } .t-nav .btn { padding: .5rem .8rem; } }

  /* guest dial */
  .dial-l { display: block; font-weight: 700; font-size: 1rem; color: var(--mute); margin-bottom: .25rem; }
  .dial-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .5rem; }
  .dial-ctl { display: flex; align-items: center; gap: .6rem; margin-top: .35rem; }
  .dial-ctl .range { flex: 1 1 auto; min-width: 0; margin: 0; }
  .step { width: 3.25rem; height: 3.25rem; flex: none; border-radius: 50%; border: 2px solid var(--cream); background: transparent; color: var(--cream); font-family: var(--display); font-size: 2rem; line-height: 1; display: grid; place-items: center; font-weight: 800; padding: 0 0 .15rem; transition: background-color var(--dur-sm), color var(--dur-sm); }
  .step:hover { background: var(--cream); color: var(--field); }
  .dial-n {
    width: 2.4em; flex: none; min-width: 0; font-family: var(--display); font-weight: 900; font-size: clamp(4.25rem, 2.6rem + 6vw, 7rem); line-height: .95; letter-spacing: -.03em;
    color: var(--mustard); background: transparent; border: 0; text-align: center; padding: 0; -moz-appearance: textfield; appearance: textfield;
  }
  /* the number box hugs its digits where the browser can; elsewhere it keeps room for three */
  @supports (field-sizing: content) { .dial-n { field-sizing: content; width: auto; min-width: 1.3em; } }
  .dial-n::-webkit-outer-spin-button, .dial-n::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  .dial-n:focus-visible { outline-offset: 4px; }
  .dial-u { font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); color: var(--cream); margin-left: .15rem; }
  .range { -webkit-appearance: none; appearance: none; width: 100%; height: 2.75rem; background: transparent; margin-top: .4rem; cursor: pointer; }
  .range::-webkit-slider-runnable-track { height: .4rem; background: linear-gradient(to right, var(--mustard) var(--p, 12%), rgb(244 239 230 / .3) var(--p, 12%)); border-radius: 1rem; }
  .range::-moz-range-track { height: .4rem; background: rgb(244 239 230 / .3); border-radius: 1rem; }
  .range::-moz-range-progress { height: .4rem; background: var(--mustard); border-radius: 1rem; }
  .range::-webkit-slider-thumb { -webkit-appearance: none; width: 1.75rem; height: 1.75rem; margin-top: -.675rem; border-radius: 50%; background: var(--mustard); border: 3px solid var(--field); box-shadow: 0 0 0 2px var(--mustard); }
  .range::-moz-range-thumb { width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--mustard); border: 3px solid var(--field); box-shadow: 0 0 0 2px var(--mustard); }
  .range:focus-visible { outline-offset: 0; }
  .ticks { display: flex; justify-content: space-between; font-size: .8125rem; color: var(--mute); margin-top: -.1rem; }

  /* segmented layout choice and the dance-floor switch */
  .opts { display: grid; gap: .75rem; }
  .opts legend { font-weight: 700; font-size: 1rem; color: var(--mute); margin-bottom: .4rem; }
  .seg { display: flex; flex-wrap: wrap; gap: .4rem; }
  .seg label { position: relative; }
  .seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
  .seg span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .35rem 1rem; border: 2px solid var(--cream); border-radius: 2rem; font-weight: 700; font-size: 1rem; transition: background-color var(--dur-sm), color var(--dur-sm); }
  .seg input:checked + span { background: var(--cream); color: var(--field); }
  .seg input:focus-visible + span { outline: 3px solid var(--ring); outline-offset: 3px; }
  .tog { position: relative; display: inline-flex; align-items: center; gap: .7rem; min-height: 2.75rem; cursor: pointer; font-weight: 700; font-size: 1rem; }
  .tog input { position: absolute; opacity: 0; width: 3.25rem; height: 1.9rem; margin: 0; cursor: pointer; }
  .tog .sw { width: 3.25rem; height: 1.9rem; border-radius: 1rem; border: 2px solid var(--cream); position: relative; flex: none; transition: background-color var(--dur-sm); }
  .tog .sw::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--cream); transition: transform var(--dur-sm) var(--ease-out); }
  .tog input:checked + .sw { background: var(--cream); }
  .tog input:checked + .sw::after { transform: translateX(1.35rem); background: var(--field); }
  .tog input:focus-visible + .sw { outline: 3px solid var(--ring); outline-offset: 3px; }
  .tog small { display: block; font-weight: 400; color: var(--mute); font-size: .875rem; }
  .paper .seg span, .paper .tog .sw { border-color: var(--ink); }
  .paper .seg input:checked + span { background: var(--ink); color: var(--cream); }
  .paper .tog .sw::after { background: var(--ink); }
  .paper .tog input:checked + .sw { background: var(--ink); }
  .paper .tog input:checked + .sw::after { background: var(--cream); }
  .paper .tog small { color: var(--ink-2); }

  /* the plan */
  .plan { width: 100%; height: auto; overflow: visible; --fs: 9px; }
  .plan.fit { overflow: hidden; } .plan.fit .ghosts { display: none; }
  .plan .ghost.out { display: none; }
  /* the live plans keep one box size whatever the marquee, so nothing below them moves */
  .stage .plan { aspect-ratio: 286 / 166; width: 100%; }
  .js-top .plan { aspect-ratio: 4 / 3; }
  @media (max-width: 47.99rem) { .stage .plan { aspect-ratio: 4 / 3; } }
  .plan * { transform-box: view-box; transform-origin: 0 0; }
  .plan .ghost { fill: none; stroke: var(--cream); stroke-opacity: .3; stroke-width: 1px; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
  .plan .floor { fill: var(--field-2); }
  .plan .bay { stroke: var(--cream); stroke-opacity: .32; stroke-width: 1px; vector-effect: non-scaling-stroke; opacity: 0; }
  .plan .bay.on { opacity: 1; }
  .plan .ridge { stroke: var(--cream); stroke-opacity: .45; stroke-width: 1px; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
  .plan .walls line { stroke: var(--cream); stroke-width: 2.5px; vector-effect: non-scaling-stroke; stroke-linecap: square; }
  .plan .walls.open line { stroke-dasharray: 5 5; stroke-linecap: butt; }
  .plan .leg { fill: var(--cream); opacity: 0; }
  .plan .leg.on { opacity: 1; }
  .plan .tbl > circle { fill: var(--cream); }
  .plan .tbl .ch, .plan .fig { fill: var(--mustard); }
  .plan .tbl > *, .plan .fig > * { transform-box: fill-box; transform-origin: center; transform: scale(0); }
  .plan .tbl.on > *, .plan .fig.on > * { transform: scale(1); }
  .plan .dance { opacity: 0; } .plan .dance.on { opacity: 1; }
  .plan .dance .df { fill: var(--field-3); } .plan .dance .dc { fill: var(--cream); }
  .plan .svc { fill: var(--cream); opacity: 0; transform-box: view-box; }
  .plan .svc.on { opacity: 1; }
  .plan .stalls rect { fill: var(--cream); }
  .plan .dims line { stroke: var(--cream); stroke-opacity: .75; stroke-width: 1px; vector-effect: non-scaling-stroke; }
  .plan text { fill: var(--cream); font-family: var(--text); font-weight: 700; font-size: var(--fs); }
  .plan .scale path { fill: var(--cream); } .plan .scale .sb1 { fill-opacity: .35; }
  @media (prefers-reduced-motion: no-preference) {
    .plan .floor, .plan .ridge, .plan .walls line, .plan .dims line, .plan text, .plan .leg.lb { transition: transform var(--dur-lg) var(--ease-out); }
    .plan .bay, .plan .leg { transition: opacity var(--dur-md) var(--ease-out), transform var(--dur-lg) var(--ease-out); }
    .plan.grow .bay.on, .plan.grow .leg.on { transition-delay: calc(var(--k) * 45ms); }
    .plan .tbl, .plan .fig, .plan .svc, .plan .dance { transition: transform var(--dur-lg) var(--ease-out), opacity var(--dur-md); }
    .plan .tbl > *, .plan .fig > * { transition: transform var(--dur-md) var(--ease-out) min(calc(var(--i, 0) * 22ms), 420ms); }
    /* first view: the frame goes up bay by bay, then the tables are set (CSS only, so a failed script leaves a finished plan) */
    .plan.intro .bay.on, .plan.intro .leg.on { animation: pf-in var(--dur-md) var(--ease-out) backwards; animation-delay: calc(150ms + var(--k) * 70ms); }
    .plan.intro .tbl.on > *, .plan.intro .fig.on > * { animation: pf-pop var(--dur-md) var(--ease-out) backwards; animation-delay: calc(650ms + min(var(--i) * 40ms, 600ms)); }
  }
  @keyframes pf-in { from { opacity: 0; } }
  @keyframes pf-pop { from { transform: scale(0); } }

  /* plan key */
  .key { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; font-size: .9375rem; color: var(--mute); }
  .key li { display: inline-flex; align-items: center; gap: .4rem; }
  .key .pg { width: 1.3rem; height: 1.3rem; }
  .key .k-g { color: var(--mustard); } .key .k-c { color: var(--cream); }
  .key .k-dash { width: 1.3rem; height: 0; border-top: 2px dashed rgb(244 239 230 / .55); }
  .key .k-bar { width: 1.3rem; height: .35rem; background: var(--cream); }
  @media (max-width: 47.99rem) { .key .k-o { display: none; } }

  /* Isotype count rows */
  .count { display: grid; grid-template-columns: repeat(10, 1.6rem); gap: .3rem .2rem; color: var(--mustard); }
  .count .pg { width: 1.6rem; height: 1.6rem; }
  .count .pg:nth-child(10n + 5) { margin-right: .5rem; }
  @media (min-width: 52rem) { .count { grid-template-columns: repeat(10, 2.1rem); gap: .35rem .3rem; } .count .pg { width: 2.1rem; height: 2.1rem; } }
  @media (max-width: 26rem) { .count { grid-template-columns: repeat(10, 1.3rem); } .count .pg { width: 1.3rem; height: 1.3rem; } .count .pg:nth-child(10n + 5) { margin-right: .3rem; } }
  @media (prefers-reduced-motion: no-preference) {
    .js .count .pg { transform: scale(0); transition: transform var(--dur-md) var(--ease-out); transition-delay: min(calc(var(--i) * 35ms), 700ms); }
    .js .in .count .pg { transform: none; }
  }

  /* add-to-quote toggle */
  .add { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: .4rem 1rem; border: 2px solid var(--ink); background: transparent; color: var(--ink); font-weight: 700; font-size: 1rem; border-radius: 2rem; transition: background-color var(--dur-sm), color var(--dur-sm); }
  .add .pg { width: 1.1rem; height: 1.1rem; display: none; }
  .add[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
  .add[aria-pressed="true"] .pg { display: block; }
  .add:hover { background: var(--paper-2); } .add[aria-pressed="true"]:hover { background: var(--ink-2); }

  /* status line under a control, present from load so it is announced */
  .fitwarn:empty { display: none; }
  .fitwarn { margin-top: .6rem; background: var(--mustard); color: var(--ink); padding: .65rem .85rem; font-size: 1rem; line-height: 1.35; }
  .fitwarn button { margin-top: .5rem; min-height: 2.75rem; padding: .35rem .9rem; background: var(--ink); color: var(--cream); border: 0; font-weight: 700; display: inline-flex; align-items: center; }
}

@layer pages {
  /* ---------- home ---------- */
  /* hero: a Festival poster. One-line headline, then one panel: the guest equation over the plan */
  .hero { padding-top: clamp(.75rem, .4rem + 1.4vw, 1.5rem); }
  .hero h1 { font-size: clamp(2.25rem, 1.1rem + 3.4vw, 3.9rem); font-weight: 900; line-height: .98; letter-spacing: -.02em; overflow-wrap: normal; }
  /* fixed line breaks, so the web font arriving never changes the line count (no layout shift) */
  .hero h1 span { white-space: nowrap; }
  .hero h1 .h-a, .hero h1 .h-b, .hero h1 .h-c { display: block; }
  @media (min-width: 48rem) { .hero h1 .h-a, .hero h1 .h-b { display: inline; } }
  @media (min-width: 85rem) { .hero h1 .h-c { display: inline; } }
  .lead { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.45; max-width: 46ch; margin-top: var(--s-2); color: var(--cream); }
  .poster { margin-top: var(--s-4); background: var(--field-3); padding: clamp(1rem, .6rem + 1.6vw, 1.75rem); display: grid; gap: var(--s-4); }
  .eq { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3) var(--s-4); align-items: end; }
  .eq .dial { grid-column: 1 / -1; }
  .eq-op { display: none; }
  .r-size { font-family: var(--display); font-weight: 900; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.6rem); line-height: 1; white-space: nowrap; }
  .r-cap { color: var(--mute); font-size: .9375rem; margin-top: .35rem; line-height: 1.35; }
  .eq-price { justify-self: end; text-align: right; }
  .r-price { display: flex; align-items: baseline; justify-content: flex-end; gap: .45rem; flex-wrap: wrap; }
  .r-price span { font-size: .9375rem; color: var(--mute); }
  .r-price b { font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 1.5rem + 2vw, 3.4rem); line-height: 1; }
  .r-vat { font-size: .875rem; color: var(--mute); margin-top: .25rem; }
  .eq .to-quote { grid-column: 1 / -1; width: 100%; }
  .board { display: grid; gap: var(--s-4) var(--s-6); }
  .opts { display: grid; gap: var(--s-4); align-content: start; }
  .over { background: var(--mustard); color: var(--ink); padding: .6rem .85rem; font-size: 1rem; }
  /* tablets: the sum again, with the size and price beside the plan */
  @media (min-width: 48rem) and (max-width: 74.99rem) {
    .lead-head { display: none; } .lead-after { display: block; margin-top: var(--s-4); }
    .poster { grid-template-columns: 2.2rem minmax(0, 1.45fr) minmax(0, 1fr); grid-template-rows: auto auto auto auto auto 1fr auto auto auto; grid-template-areas: "dial dial ctl" "op1 plan rsize" "op1 plan rprice" "op1 plan rvat" "op1 plan rcap" "op1 plan ." "key key key" "over over over" "lay lay dnc"; column-gap: var(--s-5); row-gap: var(--s-2); align-items: start; }
    .poster .eq, .poster .board, .poster .stage, .poster .side, .poster .eq-size, .poster .eq-price, .poster .opts { display: contents; }
    .poster .dial { grid-area: dial; } .poster .dial-ctl { grid-area: ctl; margin: 0; align-self: center; }
    .poster .eq-op { display: block; font-family: var(--display); font-weight: 900; font-size: 2.6rem; line-height: 1; color: var(--mute); }
    .poster .op1 { grid-area: op1; align-self: center; } .poster .op2 { display: none; }
    .poster .stage .plan { grid-area: plan; aspect-ratio: auto; width: 100%; height: clamp(13rem, calc(100svh - 29.75rem), 28rem); }
    .poster .r-size { grid-area: rsize; margin-top: var(--s-2); } .poster .r-price { grid-area: rprice; justify-content: flex-start; } .poster .r-vat { grid-area: rvat; margin: -.2rem 0 0; text-align: left; }
    .poster .r-cap { grid-area: rcap; margin: 0; } .poster .eq .to-quote { display: none; }
    .poster .key { grid-area: key; margin-top: var(--s-3); } .poster .over { grid-area: over; }
    .poster .opts > fieldset { grid-area: lay; } .poster .opts > .tog { grid-area: dnc; align-self: end; }
    .poster .tally { display: none; }
    .dial-n { font-size: 4rem; }
    .eq-size { min-height: 0 !important; }
    .poster .op1 { align-self: center; }
  }
  .lead-after { display: none; }
  .tally { display: grid; gap: var(--s-3); }
  .tally-t { font-family: var(--display); font-weight: 800; font-size: 1.35rem; line-height: 1.15; }
  .tally-t.warn { background: var(--mustard); color: var(--ink); font-family: var(--text); font-weight: 700; font-size: 1rem; padding: .5rem .75rem; }
  @media (max-width: 47.99rem) {
    .dial-n { font-size: 3.75rem; }
    .range { margin-top: 0; }
    .lead-head { display: none; }
    .r-per { display: none; }
    .dial-n { text-align: left; }
    .poster { padding: .9rem; }
    .hero h1 { font-size: 2.15rem; }
    .dial-ctl { margin-top: .1rem; }
    .lead-after { display: block; margin-top: var(--s-4); }
    /* phones: the sum reads down the screen, edge to edge; the ticket below carries Get a quote */
    .poster { width: 100%; padding: .8rem .75rem; grid-template-columns: 1.15rem minmax(0, 1fr); grid-template-areas: "dial dial" "ctl ctl" "op1 plan" "op2 rsize" ". rprice" ". rvat" ". rcap" "key key" "over over" "lay lay" "dnc dnc"; column-gap: var(--s-2); row-gap: var(--s-2); }
    .poster .eq, .poster .board, .poster .stage, .poster .side, .poster .eq-size, .poster .eq-price { display: contents; }
    .poster .r-size { grid-area: rsize; align-self: center; }
    .poster .r-price { grid-area: rprice; align-self: center; justify-content: flex-start; }
    .poster .r-vat { grid-area: rvat; margin: -.2rem 0 0; text-align: left; }
    .poster .r-cap { grid-area: rcap; margin: 0; }
    .poster .eq .to-quote { display: none; }
    .poster .dial { grid-area: dial; }
    .poster .eq-op { display: block; font-family: var(--display); font-weight: 900; font-size: 1.6rem; line-height: 1; color: var(--mute); }
    .poster .op1 { grid-area: op1; align-self: center; } .poster .op2 { grid-area: op2; align-self: center; }
    .poster .stage .plan { grid-area: plan; width: 100%; }
    .poster .key { grid-area: key; margin-top: var(--s-3); }
    .poster .opts { display: contents; }
    .poster .dial-ctl { grid-area: ctl; margin: 0; }
    .poster .over { grid-area: over; }
    .poster .opts > fieldset { grid-area: lay; margin-top: var(--s-3); }
    .poster .opts > .tog { grid-area: dnc; }
    .poster .tally { display: none; }
    .eq-size .r-size { font-size: 1.5rem; }
    .r-price b { font-size: 1.9rem; }
  }
  @media (max-width: 24rem) { .dial-n { font-size: 3.25rem; } }
  @media (max-width: 22.49rem) { .poster #rPriceL { font-size: .8125rem; } .poster .r-price b { font-size: 1.7rem; } }
  /* short phones: − and + sit beside the number (the slider waits below the fold), so the plan keeps its size */
  @media (max-width: 47.99rem) and (max-height: 48rem) {
    .poster { grid-template-columns: 1.15rem minmax(0, 1fr) auto; grid-template-areas: "dial dial ctl" "op1 plan plan" "op2 rsize rsize" ". rprice rprice" ". rvat rvat" ". rcap rcap" "key key key" "over over over" "lay lay lay" "dnc dnc dnc"; }
    .poster .dial-ctl { align-self: center; gap: .5rem; }
    .poster .dial-ctl .range { display: none; }
    .poster .stage .plan { aspect-ratio: auto; height: clamp(11rem, calc(100svh - 29rem), 15rem); }
  }
  @media (max-width: 22.49rem) and (max-height: 44rem) { .poster .stage .plan { height: clamp(11rem, calc(100svh - 27.25rem), 15rem); } .dial-n { font-size: 2.6rem !important; } .concept { font-size: .8125rem; } .concept .wrap { min-height: 0; padding-block: .25rem; } }
  /* short phones (iPhone SE and smaller): tighter heading */
  @media (max-width: 47.99rem) and (max-height: 44rem) {
    .mast .wrap { min-height: 3.5rem; }
    .hero { padding-top: .5rem; }
    .hero h1 { font-size: 1.85rem; }
    .dial-n { font-size: 3rem; }
  }
  @media (min-width: 75rem) {
    .eq { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--s-5); }
    .eq-op { display: block; font-family: var(--display); font-weight: 900; font-size: 3.25rem; line-height: 1; color: var(--mute); }
    .eq .dial { flex: none; width: 19rem; }
    .eq .dial-n { font-size: 4.25rem; }
    .eq .dial-l { margin-bottom: 0; }
    .eq .range { margin-top: .1rem; height: 2.25rem; }
    .eq-size { flex: 0 1 19rem; min-width: 0; }
    .eq-price { flex: none; justify-self: auto; text-align: left; }
    .r-price { justify-content: flex-start; }
    .eq .to-quote { margin-left: auto; width: auto; flex: none; }
    /* the plan takes all the width the side column leaves; the side column has a fixed, compact size */
    .board { grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(2rem, 4vw, 4.5rem); align-items: start; }
    .side { display: grid; grid-template-columns: auto auto; grid-template-areas: "tally tally" "key opts"; gap: var(--s-4) var(--s-6); align-content: start; }
    .side .tally { grid-area: tally; max-width: 32rem; }
    .side .key { grid-area: key; } .side .opts { grid-area: opts; }
    .side .dial-ctl { margin: 0; width: 21rem; }
    .side .key { flex-direction: column; flex-wrap: nowrap; gap: .4rem; }
    .side .seg { flex-wrap: nowrap; }
    .side .over { display: none; }
    .stage .plan { width: auto; max-width: 52rem; }
    /* the plan takes what the screen has left, so the panel ends above the ticket */
    .stage .plan { aspect-ratio: auto; height: clamp(9rem, calc(100svh - 31.5rem), 42rem); }
    .lead { max-width: none; margin-top: var(--s-4); }
    .poster { padding: 1.25rem 1.5rem; }
  }
  /* 75–85rem: the headline is sized to stay on one line, so the plan keeps the height */
  @media (min-width: 75rem) and (max-width: 84.99rem) {
    .hero h1 { font-size: calc((100vw - 4.75rem) / 20.6); }
    .hero h1 .h-c { display: inline; }
  }
  /* short tablets (landscape): slimmer masthead and headline, so the plan keeps its size */
  @media (min-width: 48rem) and (max-width: 74.99rem) and (max-height: 46rem) {
    .mast .wrap { min-height: 3.5rem; }
    .hero { padding-top: .4rem; }
    .hero h1 { font-size: 2.6rem; }
    .poster .stage .plan { height: clamp(13rem, calc(100svh - 26.25rem), 28rem); }
  }
  @media (min-width: 75rem) and (max-height: 42rem) {
    .hero h1 { font-size: 3.1rem; }
    .stage .plan { height: clamp(11rem, calc(100svh - 24.25rem), 42rem) !important; }
  }
  /* short laptop screens (1280x650 to 1366x768): a slimmer masthead and headline, so the plan stays large */
  @media (min-width: 75rem) and (max-height: 48rem) {
    .hero .lead { display: none; }
    .mast .wrap { min-height: 3.5rem; }
    .hero { padding-top: .4rem; }
    .poster { margin-top: var(--s-3); padding-block: .9rem; }
    .stage .plan { height: clamp(11rem, calc(100svh - 25.5rem), 42rem); }
  }
  /* short laptop screens: Layout and Dance floor sit side by side so the controls column stays short */
  @media (min-width: 75rem) and (max-height: 50rem) {
    .side .opts { display: grid; grid-template-columns: auto auto; gap: var(--s-3) var(--s-5); align-items: end; }
    .side .dial-ctl { grid-column: 1 / -1; }
  }
  @media (min-width: 75rem) and (max-height: 46rem) { .hero .lead { display: none; } }
  .hero + .sec { padding-top: clamp(3rem, 2rem + 3vw, 5rem); }

  .h2 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 4.25rem); font-weight: 900; letter-spacing: -.02em; }
  .h2 + p, .sub { margin-top: var(--s-3); color: var(--mute); max-width: 52ch; font-size: 1.125rem; }
  .paper .h2 + p, .paper .sub { color: var(--ink-2); }

  /* five sizes, counted */
  .chart { margin-top: var(--s-7); border-top: 2px solid rgb(244 239 230 / .4); }
  .row { display: grid; gap: var(--s-3) var(--s-6); padding-block: var(--s-5); border-bottom: 2px solid rgb(244 239 230 / .18); position: relative; }
  .row h3 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.6rem); font-weight: 900; }
  .row .row-m { font-size: .9375rem; color: var(--mute); margin-top: .2rem; }
  .row .caps { font-size: 1rem; color: var(--cream); margin-top: .55rem; display: flex; flex-wrap: wrap; gap: .1rem 1rem; }
  .row .caps b { font-weight: 700; color: var(--mustard); }
  .row .rp { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; }
  .row .rp span { font-size: .9375rem; color: var(--mute); }
  .row .rp b { font-family: var(--display); font-weight: 900; font-size: 2rem; line-height: 1; }
  .row .now { display: none; position: absolute; left: 0; top: var(--s-5); transform: translateY(-110%); background: var(--mustard); color: var(--ink); font-size: .8125rem; font-weight: 700; padding: .1rem .5rem; }
  .row.is-now .now { display: inline-block; }
  .row.is-now { background: var(--field-3); }
  @media (min-width: 52rem) {
    .row { grid-template-columns: 16rem minmax(0, 1fr) 9rem; align-items: center; padding-inline: var(--s-4); }
    .row h3 { white-space: nowrap; }
    .row .rp { align-items: flex-end; text-align: right; }
    .row .now { left: var(--s-4); }
  }
  .chart-foot { margin-top: var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); align-items: center; justify-content: space-between; }
  .chart-foot p { color: var(--mute); font-size: 1rem; max-width: 60ch; }
  .how-count { margin-top: var(--s-5); font-size: .9375rem; color: var(--mute); max-width: 72ch; }

  /* what the price covers (paper) */
  .covers { padding: clamp(1.5rem, 1rem + 3vw, 4rem); }
  .cov-grid { display: grid; gap: var(--s-6); margin-top: var(--s-6); }
  .cov h3 { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: .5rem; }
  .cov h3 .pg { width: 1.6rem; height: 1.6rem; }
  .cov.in h3 .pg { color: var(--green); }
  .cov ul { margin-top: var(--s-3); display: grid; gap: .4rem; }
  .cov li { padding-left: 1.1rem; position: relative; }
  .cov li::before { content: ""; position: absolute; left: 0; top: .7em; width: .45rem; height: .45rem; background: currentColor; border-radius: 50%; opacity: .55; }
  .cov.in li::before { background: var(--green); opacity: 1; }
  @media (min-width: 52rem) { .cov-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
  .bands { display: grid; gap: var(--s-6); margin-top: var(--s-7); padding-top: var(--s-6); border-top: 2px solid var(--paper-2); align-items: center; }
  .bands h3 { font-size: 1.75rem; font-weight: 800; }
  .bands dl { margin-top: var(--s-4); display: grid; gap: .6rem; }
  .bands dl div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; align-items: baseline; padding-bottom: .6rem; border-bottom: 1px solid var(--paper-2); }
  .bands dt { font-family: var(--display); font-weight: 800; font-size: 1.35rem; }
  .bands dd { font-size: 1.0625rem; }
  .bands .note { margin-top: var(--s-4); color: var(--ink-2); font-size: 1rem; }
  .rings { max-width: 30rem; width: 100%; justify-self: center; }
  .rings .r1 { fill: #0F4D45; } .rings .r2 { fill: var(--green); } .rings .r3 { fill: #8CC7BC; }
  .rings text { font-family: var(--text); font-weight: 700; font-size: 19px; fill: var(--cream); }
  .rings .r3t { fill: var(--ink); }
  .rings .van { fill: var(--ink); }
  @media (min-width: 52rem) { .bands { grid-template-columns: 1fr 1fr; } }

  /* three set-ups, drawn to one scale */
  .plates { display: grid; gap: var(--s-6); margin-top: var(--s-7); align-items: end; }
  .plate figcaption { margin-top: var(--s-3); }
  .plate h3 { font-size: 1.6rem; font-weight: 800; }
  .plate p { color: var(--mute); font-size: 1rem; margin-top: .2rem; }
  .plate .plan { width: var(--pw, 100%); }
  @media (min-width: 60rem) { .plates { grid-template-columns: 140fr 230fr 290fr; grid-template-rows: auto auto; } .plate { display: grid; grid-row: span 2; grid-template-rows: subgrid; } .plate .plan { width: 100%; align-self: end; } .plate figcaption { align-self: start; } }

  /* how a hire works: a real sequence, so it is numbered */
  .route { margin-top: var(--s-7); display: grid; gap: var(--s-5); counter-reset: st; position: relative; }
  .route li { position: relative; padding-left: 4.25rem; min-height: 3.25rem; }
  .route li::before { counter-increment: st; content: counter(st); position: absolute; left: 0; top: -.15rem; width: 3.1rem; height: 3.1rem; border-radius: 50%; background: var(--cream); color: var(--field); font-family: var(--display); font-weight: 900; font-size: 1.6rem; display: grid; place-items: center; }
  .route li:not(:last-child)::after { content: ""; position: absolute; left: 1.5rem; top: 3.1rem; bottom: calc(-1 * var(--s-5)); border-left: 3px dotted rgb(244 239 230 / .55); }
  .route h3 { font-size: 1.5rem; font-weight: 800; }
  .route p { color: var(--mute); margin-top: .25rem; max-width: 30ch; }
  .route-end { margin-top: var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-5); align-items: center; }
  .route-end p { font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); line-height: 1.15; }
  @media (min-width: 56rem) {
    .route { grid-template-columns: repeat(4, 1fr); gap: var(--s-6); }
    .route li { padding-left: 0; padding-top: 4.5rem; }
    .route li::before { top: 0; }
    .route li:not(:last-child)::after { left: 3.6rem; right: calc(-1 * var(--s-6) + .5rem); top: 1.55rem; bottom: auto; border-left: 0; border-top: 3px dotted rgb(244 239 230 / .55); }
  }

  /* questions to ask any hirer (paper) */
  .asks { padding: clamp(1.5rem, 1rem + 3vw, 4rem); }
  .ask-grid { display: grid; gap: var(--s-5) var(--s-7); margin-top: var(--s-6); }
  .ask-grid dt { font-family: var(--display); font-weight: 800; font-size: 1.35rem; line-height: 1.2; }
  .ask-grid dd { margin-top: .3rem; color: var(--ink-2); }
  .ask-grid dd a { display: inline-block; padding-block: .7rem; margin-block: -.7rem; }
  .ask-grid div { padding-top: var(--s-4); border-top: 2px solid var(--paper-2); }
  .asks .fine { margin-top: var(--s-6); font-size: .9375rem; color: var(--ink-2); }
  @media (min-width: 48rem) { .ask-grid { grid-template-columns: 1fr 1fr; } }
  @media (min-width: 72rem) { .ask-grid { grid-template-columns: 1fr 1fr 1fr; } }

  .closer { display: grid; gap: var(--s-5); align-items: end; }
  .closer h2 { font-size: clamp(2.4rem, 1.4rem + 4.2vw, 5.5rem); font-weight: 900; letter-spacing: -.02em; max-width: 14ch; line-height: 1.08; }
  .closer p { color: var(--mute); max-width: 40ch; margin-top: var(--s-5); }
  @media (min-width: 56rem) { .closer { grid-template-columns: 1fr auto; } }

  /* ---------- footer: after dark, the festoons are on ---------- */
  .foot { background: var(--night); position: relative; padding-bottom: calc(var(--ticket-h) + 3rem); }
  .foot .studio { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4) var(--s-6); margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid rgb(244 239 230 / .2); }
  .foot .studio p { max-width: 52ch; color: var(--cream); }
  .foot .btn-alt { white-space: normal; text-align: center; }
  /* after dark: a drawn lit marquee leads into the footer (the one inverted chapter) */
  .dusk { background: var(--night); padding-bottom: var(--s-6); }
  main:has(> .dusk:last-child) { padding-bottom: 0; }
  .scene { display: block; width: 100%; height: clamp(14rem, 7rem + 22vw, 29rem); }
  .scene-tall { display: none; }
  @media (max-width: 47.99rem) { .scene-wide { display: none; } .scene-tall { display: block; height: auto; aspect-ratio: 760 / 470; } }
  .scene .star { fill: var(--cream); opacity: .7; } .scene .moon { fill: var(--cream); } .scene .moon-cut { fill: var(--night); }
  .scene .hill2 { fill: #15315A; } .scene .hill1 { fill: #112640; }
  .scene .roof { fill: var(--cream); } .scene .wall { fill: #E3D8C3; }
  .scene .win { fill: #FFE7A8; } .scene .door { fill: #FFD66E; }
  .scene .mull { stroke: #E3D8C3; stroke-width: 4; } .scene .leg { stroke: #C8BCA4; stroke-width: 4; }
  .scene .glow { fill: var(--mustard); opacity: .22; }
  .scene .b1 { fill: var(--mustard); } .scene .b2 { fill: var(--green-f); } .scene .b3 { fill: var(--cream); } .scene .b4 { fill: #8FB3E0; }
  .scene .pole { stroke: #C8BCA4; stroke-width: 5; } .scene .wire { fill: none; stroke: rgb(244 239 230 / .55); stroke-width: 2; }
  .scene .bulb { fill: #FFE7A8; } .scene .bh { fill: #FFE7A8; opacity: .18; }
  .scene .fig { fill: var(--mustard); }
  .dusk .closer { margin-top: var(--s-6); }
  .dusk-note { margin-top: var(--s-5); font-size: .9375rem; color: var(--mute); }

  main { padding-bottom: var(--sec); }
  main > .sec:last-child { padding-bottom: 0; }
  .festoon { display: block; width: 100%; height: clamp(3rem, 2rem + 4vw, 5.5rem); }
  .festoon path { fill: none; stroke: rgb(244 239 230 / .45); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
  .festoon .b { fill: var(--cream); opacity: .3; }
  .festoon .h { fill: var(--cream); opacity: 0; }
  .lit .festoon .b { opacity: 1; fill: #FFE7A8; }
  .lit .festoon .h { opacity: .16; }
  @media (prefers-reduced-motion: no-preference) {
    .festoon .b, .festoon .h { transition: opacity 600ms var(--ease-out), fill 600ms; transition-delay: calc(var(--i) * 45ms); }
  }
  .foot-grid { display: grid; gap: var(--s-6); padding-top: var(--s-6); }
  .foot-name b { font-family: var(--display); font-weight: 900; font-size: clamp(2.6rem, 1.6rem + 4vw, 5rem); line-height: 1.1; display: block; letter-spacing: -.02em; }
  .foot-name span { display: block; color: var(--mute); margin-top: .9rem; }
  .foot dl { display: grid; gap: var(--s-4); }
  .foot dt { font-size: .875rem; color: var(--mute); font-weight: 700; }
  .foot dd { font-size: 1.0625rem; }
  .foot dd a { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .foot .small { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid rgb(244 239 230 / .2); font-size: .9375rem; color: var(--mute); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; }
  .foot .small a { display: inline-flex; align-items: center; min-height: 2.75rem; }
  @media (min-width: 52rem) { .foot-grid { grid-template-columns: 1.1fr 1fr; } .foot dl { grid-template-columns: 1fr 1fr; gap: var(--s-5) var(--s-6); } }

  /* ---------- kit page ---------- */
  .pagehead { padding: clamp(1.25rem, .6rem + 3vw, 3rem) 0 var(--s-3); }
  .pagehead + .wrap > .cat:first-child { padding-top: var(--s-4); }
  .pagehead h1 { font-size: clamp(2.6rem, 1.5rem + 5vw, 6.25rem); font-weight: 900; line-height: .95; letter-spacing: -.025em; }
  .pagehead .lead { margin-top: var(--s-4); }
  .jump { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem .25rem .75rem; margin: var(--s-5) -.25rem 0; scrollbar-width: thin; }
  .jump a { flex: none; display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: .3rem 1rem; border: 2px solid var(--cream); border-radius: 2rem; font-weight: 700; font-size: 1rem; text-decoration: none; }
  .jump a:hover { background: var(--cream); color: var(--field); }
  .jump .pg { width: 1.2rem; height: 1.2rem; }
  .cat { padding-top: var(--s-7); }
  .cat-h { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-3) var(--s-5); }
  .cat-h .h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.4rem); }
  .cat-h p { color: var(--mute); max-width: 44ch; }
  .legend-strip { margin-top: var(--s-5); display: grid; gap: var(--s-4); padding: var(--s-5); }
  .legend-strip dl { display: grid; gap: var(--s-3); }
  .legend-strip dt { font-weight: 700; font-size: .9375rem; display: flex; align-items: center; gap: .35rem; }
  .legend-strip dt .pg { width: 1.1rem; height: 1.1rem; color: var(--green); }
  .legend-strip dd { font-size: 1rem; color: var(--ink-2); }
  .legend-strip .how { font-size: .9375rem; color: var(--ink-2); }
  @media (min-width: 52rem) { .legend-strip dl { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-5); } }
  .mqs { margin-top: var(--s-5); display: grid; gap: 2px; }
  .mq { display: grid; gap: var(--s-4) var(--s-6); padding: var(--s-5); background: var(--paper); color: var(--ink); --ring: var(--ink); align-items: center; }
  .mq h3 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.3rem); font-weight: 900; }
  .mq .mq-plan { background: var(--field); padding: .75rem; max-width: 22rem; }
  .mq dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .5rem 1.25rem; margin-top: var(--s-3); }
  .mq dt { font-size: .875rem; color: var(--ink-2); }
  .mq dd { font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
  .mq .buy { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }
  .price { font-family: var(--display); font-weight: 900; font-size: 2.1rem; line-height: 1; }
  .price small { font-family: var(--text); font-weight: 400; font-size: .9375rem; color: var(--ink-2); margin-left: .25rem; }
  @media (min-width: 60rem) { .mq { grid-template-columns: 15rem minmax(0, 1fr) 11rem; } .mq .buy { align-items: flex-end; } }
  .items { margin-top: var(--s-5); padding: 0 var(--s-5); }
  .item { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: .35rem 1rem; align-items: center; padding-block: var(--s-5); border-bottom: 2px solid var(--paper-2); }
  .item:last-child { border-bottom: 0; }
  .item .pg { width: 3.25rem; height: 3.25rem; color: var(--field); grid-row: span 2; align-self: start; }
  .item h3 { font-size: 1.5rem; font-weight: 800; }
  .i-spec { color: var(--ink-2); font-size: 1rem; margin-top: .15rem; }
  .item .price { font-size: 1.85rem; grid-column: 2; }
  .item .add { grid-column: 2; justify-self: start; }
  @media (min-width: 48rem) {
    .item { grid-template-columns: 3.5rem minmax(0, 1fr) 9rem 11rem; gap: 1.5rem; }
    .item .pg { grid-row: auto; align-self: center; width: 3.5rem; height: 3.5rem; }
    .item .price { grid-column: auto; text-align: right; }
    .item .add { grid-column: auto; justify-self: end; }
  }
  .kit-foot { margin-top: var(--s-7); color: var(--mute); font-size: 1rem; max-width: 72ch; }

  /* ---------- quote page ---------- */
  .q-grid { display: grid; gap: var(--s-6); align-items: start; }
  .q-grid > *, .two > *, .field { min-width: 0; }
  .hint-a { display: inline-flex; align-items: center; min-height: 1.75rem; }
  @media (min-width: 64rem) { .q-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } .jobsheet { position: sticky; top: 1rem; } }
  .qform { padding: clamp(1.25rem, .8rem + 2vw, 2.75rem); display: grid; gap: var(--s-7); }
  .qstep { display: grid; gap: var(--s-5); }
  .qstep > legend { display: flex; align-items: center; gap: .75rem; font-family: var(--display); font-weight: 900; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin-bottom: var(--s-4); line-height: 1.1; }
  .qstep > legend .n { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--field); color: var(--cream); display: grid; place-items: center; font-size: 1.35rem; flex: none; }
  .field { display: grid; gap: .3rem; }
  .field > label, .field > .lbl { font-weight: 700; font-size: 1.0625rem; }
  .hint { font-size: .9375rem; color: var(--ink-2); }
  .hintbtn { background: none; border: 0; padding: 0 .1rem; min-height: 1.5rem; text-decoration: underline; font-weight: 700; color: var(--ink); }
  .inp { width: 100%; min-width: 0; min-height: 3rem; padding: .55rem .75rem; border: 2px solid var(--ink); border-radius: 0; background: var(--white); color: var(--ink); font-size: 1.125rem; }
  .inp.short { max-width: 12rem; }
  /* postcodes: a face whose zero is not a letter O (RG20, not RG2O) */
  .pc, #postcode { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace; font-variant-numeric: slashed-zero; letter-spacing: 0; }
  .inp.mid { max-width: 20rem; }
  select.inp { -webkit-appearance: none; appearance: none; padding-right: 2.5rem; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(-45deg, transparent 50%, var(--ink) 50%); background-position: calc(100% - 1.15rem) 55%, calc(100% - .8rem) 55%; background-size: .4rem .4rem; background-repeat: no-repeat; }
  textarea.inp { min-height: 6rem; resize: vertical; }
  .inp:focus-visible { outline: 3px solid var(--field); outline-offset: 2px; }
  .two { display: grid; gap: var(--s-4); }
  @media (min-width: 40rem) { .two { grid-template-columns: 1fr 1fr; } }
  .site-note { font-size: .9375rem; color: var(--ink-2); }
  .chips { display: flex; flex-wrap: wrap; gap: .45rem; }
  .chip { min-height: 2.75rem; padding: .35rem .95rem; border: 2px solid var(--ink); background: transparent; color: var(--ink); font-weight: 700; font-size: 1rem; border-radius: 2rem; display: inline-flex; align-items: center; gap: .4rem; }
  .chip[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
  .chip[aria-pressed="true"]::before { content: ""; width: .9rem; height: .9rem; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.4 17.6 3.8 12l2-2 3.6 3.6 8.8-8.8 2 2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.4 17.6 3.8 12l2-2 3.6 3.6 8.8-8.8 2 2z'/%3E%3C/svg%3E") center / contain no-repeat; }
  .guide { background: var(--field); color: var(--cream); padding: var(--s-4) var(--s-5); display: grid; gap: .25rem; --ring: var(--mustard); }
  .guide .gk { font-size: .9375rem; color: var(--mute); font-weight: 700; }
  .guide .gv { font-family: var(--display); font-weight: 900; font-size: clamp(1.8rem, 1.5rem + 1.2vw, 2.5rem); line-height: 1.05; }
  .guide .gw { font-size: .9375rem; color: var(--mute); }
  .guide.warn .gv { color: var(--mustard); }
  .send { display: grid; gap: var(--s-3); justify-items: start; }
  .send .btn { min-height: 3.5rem; padding-inline: 2rem; font-size: 1.1875rem; }
  .send .fine { font-size: .9375rem; color: var(--ink-2); }
  .next { margin-top: var(--s-2); display: grid; gap: .4rem; counter-reset: nx; }
  .next li { padding-left: 2rem; position: relative; font-size: 1rem; }
  .next li::before { counter-increment: nx; content: counter(nx); position: absolute; left: 0; top: .05rem; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--ink); color: var(--cream); font-size: .8125rem; font-weight: 700; display: grid; place-items: center; }
  .errsum { border: 4px solid var(--poppy); padding: var(--s-4) var(--s-5); background: var(--white); }
  .errsum h2 { font-family: var(--text); font-size: 1.25rem; font-weight: 700; color: var(--ink); }
  .nojs { padding: var(--s-4) var(--s-5); margin-bottom: var(--s-4); font-size: 1.0625rem; }
  .errsum ul { margin-top: .5rem; display: grid; gap: .3rem; }
  .errsum a { color: var(--poppy); font-weight: 700; }
  .err { color: var(--poppy); font-weight: 700; font-size: 1rem; }
  .has-err .inp { border-color: var(--poppy); border-width: 3px; }
  .has-err { border-left: 4px solid var(--poppy); padding-left: .85rem; }
  .jobsheet { display: grid; gap: 2px; grid-template-columns: minmax(0, 1fr); }
  .js-list dt { min-width: 0; }
  .js-top { background: var(--field-3); padding: var(--s-4) var(--s-5) var(--s-5); }
  .js-top h2 { font-size: 1.6rem; font-weight: 900; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
  .js-top h2 small { font-family: var(--text); font-size: .875rem; font-weight: 700; color: var(--mute); }
  .js-top .plan { margin-top: var(--s-4); }
  .js-list { padding: var(--s-5); }
  .js-list dl { display: grid; gap: .1rem; }
  .js-list dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--paper-2); }
  .js-list dt { font-size: 1rem; }
  .js-list dd { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums lining-nums; min-width: 0; }
  .js-list dd.muted { color: var(--ink-2); font-weight: 400; }
  .js-total { margin-top: var(--s-4); padding: var(--s-4); background: var(--ink); color: var(--cream); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
  .js-total span { font-weight: 700; }
  .js-total b { font-family: var(--display); font-weight: 900; font-size: 1.9rem; }
  .js-total.warn b { color: var(--mustard); }
  .js-inc { margin-top: .5rem; font-size: .9375rem; color: var(--ink-2); }
  .js-maybe { margin-top: var(--s-4); }
  .js-maybe h3, .js-cov h3 { font-family: var(--text); font-size: 1rem; font-weight: 700; }
  .js-cov { margin-top: var(--s-4); font-size: .9375rem; color: var(--ink-2); display: grid; gap: .4rem; }
  .js-cov b { color: var(--ink); }
  .js-actions { margin-top: var(--s-4); display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
  .js-warn { background: var(--mustard); color: var(--ink); padding: .6rem .85rem; font-size: 1rem; margin-top: var(--s-3); }
  .done { padding: clamp(1.25rem, .8rem + 2vw, 2.75rem); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  /* long names and emails may break anywhere; the row labels (Guests, Notes) never do */
  .done p, .mail dd { overflow-wrap: anywhere; }
  .mail dt { overflow-wrap: normal; flex: none; }
  .mail dd { min-width: 0; }
  .mail-head { grid-template-columns: auto minmax(0, 1fr); }
  .done h2 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); font-weight: 900; }
  .mail { background: var(--white); border: 2px solid var(--ink); padding: var(--s-4); font-size: 1rem; }
  .mail-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .2rem .8rem; padding-bottom: .6rem; border-bottom: 1px solid var(--paper-2); }
  .mail-head dt { color: var(--ink-2); }
  .mail .jslist div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px solid var(--paper-2); }
  .mail .jslist dd { font-weight: 700; text-align: right; }
}

/* page changes: the old page fades, the new one settles; the ticket stays where it is */
@view-transition { navigation: auto; }
@layer utilities {
  @media (prefers-reduced-motion: no-preference) {
    ::view-transition-old(root) { animation: 160ms var(--ease-in) both pf-fade; }
    ::view-transition-new(root) { animation: 320ms var(--ease-out) both pf-rise; }
    ::view-transition-group(ticket) { animation-duration: 0s; }
  }
  @media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }
  @keyframes pf-fade { to { opacity: 0; } }
  @keyframes pf-rise { from { opacity: 0; transform: translateY(12px); } }
}

/* job sheet, printed: black on white, one page */
@media print {
  @page { margin: 14mm; }
  html, body { background: #fff !important; color: #000 !important; padding: 0 !important; font-size: 11pt; }
  .skip, .ticket, .foot .festoon, .mast .call .pg, .no-print, .qform, .errsum, .jump, .range, .ticks, .step, .opts, .t-warn, .concept a { display: none !important; }
  .concept { background: none !important; color: #000 !important; border-bottom: 1px solid #000; font-size: 9pt; }
  [data-page="quote"] .pagehead { display: none; }
  .js-top .plan { max-width: 95mm; aspect-ratio: auto; margin: 0 auto; }
  .js-list dl div { padding: 1.2mm 0; } .js-total { margin-top: 2mm; padding: 2mm 3mm; } .js-total b { font-size: 16pt; }
  .js-maybe, .js-cov { margin-top: 2mm; } .js-cov { gap: 1mm; }
  [data-page="quote"] .foot-grid, .foot .small p + p { display: none; }
  main, .foot { padding-bottom: 0 !important; }
  .count .pg, .plan .tbl > *, .plan .fig > * { animation: none !important; transition: none !important; }
  .count .pg { transform: none !important; color: #000; }
  .sec { padding-block: 8mm; } .route li::before { border: 1px solid #000; } .foot .small { margin-top: 1mm; }
  .js-top, .js-list { padding: 3mm 0 !important; }
  .foot-name b { font-size: 16pt !important; display: inline; } .foot-name span { display: inline; margin-left: 2mm; }
  .foot-grid { display: block; padding-top: 2mm; } .foot dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1mm 6mm; margin-top: 2mm; }
  .foot dd a { min-height: 0; } .foot .small { margin-top: 2mm; padding-top: 2mm; }
  .mast .wrap { min-height: 0; }
  .brand .pg { color: #000; }
  .foot { background: none !important; margin-top: 8mm; padding: 0; }
  .foot, .foot * { color: #000 !important; }
  .paper, .item, .mq, .guide, .js-top, .js-total { background: none !important; color: #000 !important; }
  .q-grid { display: block; }
  .jobsheet { position: static; }
  .plan .floor { fill: #e6e6e6; } .plan .walls line, .plan .dims line, .plan .bay, .plan .ridge, .plan .ghost { stroke: #000 !important; }
  .plan .tbl > circle, .plan .leg, .plan .svc, .plan .dance .dc, .plan .scale path, .plan .stalls rect { fill: #000 !important; }
  .plan .tbl .ch, .plan .fig { fill: #777 !important; }
  .plan text { fill: #000 !important; }
  .plan .dance .df { fill: #fff !important; }
  .js-total b, .js-total span { color: #000 !important; }
  .js-total { border: 2px solid #000; }
  h1, h2, h3, .row, .mq, .item, .js-list div { break-inside: avoid; }
  a { text-decoration: none; }
}
