/* guru.blends · Touchy-led v5 */

@font-face {
  font-family: "Martian Mono GB";
  src: url("fonts/martian-mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Epilogue GB";
  src: url("fonts/epilogue-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --mono: "Martian Mono GB", "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --read: "Epilogue GB", "Epilogue", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --ink: #141414;
  --paper: #ffffff;
  --cape: #c8232c;

  /* Fields: barbershop materials, all at least 8.5:1 against --ink */
  --bayrum: #f0a53f;
  --lilac: #bba6e8;
  --tile: #9fdcc0;
  --talc: #f7c7d1;
  --jar: #5ec4df;
  --steel: #b2bec5;
  --citrus: #f1e27a;

  /* Echo inks: the poster hue, burnt, for the manifesto */
  --bayrum-deep: #6e3f00;
  --lilac-deep: #4b2f8f;
  --tile-deep: #0f5a40;
  --talc-deep: #8a2443;
  --jar-deep: #0a4f66;

  --pad: 16px;
  --head-h: 72px;
  --ticker-h: 44px;

  --fs-1: 13px;
  --fs-2: 15px;
  --fs-3: 16px;
  --fs-read: 17px;
  --fs-4: clamp(22px, 1rem + 1.4vw, 34px);
  --fs-5: clamp(24px, 0.75rem + 2.9vw, 56px);
  --fs-6: clamp(40px, 1rem + 5vw, 96px);

  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --u1: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M1.2 6.2C18 4.6 36 7.4 55 5.6S86 4.4 98.8 6.4' fill='none' stroke='%23141414' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --u2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M1.5 5C22 6.8 44 3.8 66 5.9S90 7 98.5 4.6' fill='none' stroke='%23141414' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --u3: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M1.2 7C28 5.2 52 5.9 74 4.7C84 4.2 93 5.6 98.8 6.1' fill='none' stroke='%23141414' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --u4: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M2 5.2C16 6.9 40 6.4 60 4.9S88 5.1 98 6.8' fill='none' stroke='%23141414' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --loop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 80' preserveAspectRatio='none'%3E%3Cpath d='M26 46C22 16 172 6 186 32C198 58 44 78 14 54C2 44 28 20 76 13' fill='none' stroke='%23141414' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Five chairs. Each load takes the next one; ?set=1-5 pins one. */
:root,
html[data-set="1"] {
  --f-poster: var(--tile); --f-work: var(--steel); --f-pencil: var(--talc); --f-lingo: var(--jar);
  --f-menu: var(--citrus); --f-chair: var(--lilac); --f-after: var(--bayrum); --f-fine: var(--steel);
  --f-show: var(--tile); --f-find: var(--lilac); --f-foot: var(--citrus); --echo: var(--tile-deep);
}
html[data-set="2"] {
  --f-poster: var(--lilac); --f-work: var(--talc); --f-pencil: var(--tile); --f-lingo: var(--citrus);
  --f-menu: var(--bayrum); --f-chair: var(--steel); --f-after: var(--jar); --f-fine: var(--talc);
  --f-show: var(--lilac); --f-find: var(--tile); --f-foot: var(--bayrum); --echo: var(--lilac-deep);
}
html[data-set="3"] {
  --f-poster: var(--bayrum); --f-work: var(--steel); --f-pencil: var(--citrus); --f-lingo: var(--tile);
  --f-menu: var(--talc); --f-chair: var(--jar); --f-after: var(--lilac); --f-fine: var(--steel);
  --f-show: var(--bayrum); --f-find: var(--citrus); --f-foot: var(--lilac); --echo: var(--bayrum-deep);
}
html[data-set="4"] {
  --f-poster: var(--talc); --f-work: var(--jar); --f-pencil: var(--citrus); --f-lingo: var(--lilac);
  --f-menu: var(--tile); --f-chair: var(--bayrum); --f-after: var(--steel); --f-fine: var(--tile);
  --f-show: var(--talc); --f-find: var(--steel); --f-foot: var(--jar); --echo: var(--talc-deep);
}
html[data-set="5"] {
  --f-poster: var(--jar); --f-work: var(--citrus); --f-pencil: var(--talc); --f-lingo: var(--bayrum);
  --f-menu: var(--lilac); --f-chair: var(--tile); --f-after: var(--citrus); --f-fine: var(--steel);
  --f-show: var(--jar); --f-find: var(--talc); --f-foot: var(--tile); --echo: var(--jar-deep);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--f-poster);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;
  scrollbar-color: var(--ink) transparent;
}

body {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--fs-3);
  font-stretch: 100%;
  line-height: 1.5;
  font-variant-ligatures: no-contextual;
  font-feature-settings: "calt" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--ink);
}

h1, h2, h3, p, figure, dl, dd, ol, ul, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, svg { display: block; }
button { font: inherit; color: inherit; }

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: .22em; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
main:focus { outline: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Pills: the only chrome */
.pill {
  --pill-ink: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--pill-ink);
  font: 700 var(--fs-2)/1 var(--mono);
  font-stretch: 100%;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.pill:active { background: var(--paper); color: var(--ink); }
.pill-lg { min-height: 56px; padding: 0 28px; font-size: var(--fs-3); }
.pill .letters { display: inline-grid; grid-auto-flow: column; grid-auto-columns: .7em; justify-items: center; }
.pill .letters > span { display: block; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .pill:hover .letters > span,
  .pill:focus-visible .letters > span { animation: pop .52s var(--ease-out) calc(var(--i) * 38ms) both; }
}
@keyframes pop {
  0% { font-stretch: 100%; font-weight: 700; }
  42% { font-stretch: 112.5%; font-weight: 800; }
  100% { font-stretch: 100%; font-weight: 700; }
}

.skip { position: fixed; left: 12px; top: 12px; z-index: 100; transform: translateY(-160%); }
.skip:focus { transform: none; }

/* Pencil: solid marks are lingo, dashed marks are guides for content still to come */
.pencil,
.pencil-word {
  --u: var(--u1);
  position: relative;
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-stretch: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: none;
  cursor: pointer;
}
.pencil::after,
.pencil-word::after {
  content: "";
  position: absolute;
  left: -.06em;
  right: -.08em;
  bottom: -.3em;
  height: .5em;
  background: var(--u) center / 100% 100% no-repeat;
  pointer-events: none;
}
.pencil:nth-of-type(4n + 2), .pencil-word:nth-of-type(4n + 2) { --u: var(--u2); }
.pencil:nth-of-type(4n + 3), .pencil-word:nth-of-type(4n + 3) { --u: var(--u3); }
.pencil:nth-of-type(4n + 4), .pencil-word:nth-of-type(4n + 4) { --u: var(--u4); }
.pencil-word[aria-expanded="true"]::after { height: .62em; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .pencil:hover::after, .pencil:focus-visible::after,
  .pencil-word:hover::after, .pencil-word:focus-visible::after { animation: draw .5s var(--ease-out); }
}
@keyframes draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.arrow {
  display: inline-block;
  width: 1.3em;
  height: .65em;
  margin-left: .45em;
  vertical-align: .08em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.arrow-down { width: .55em; height: 1.1em; vertical-align: -.2em; }

.cms {
  display: inline-block;
  padding: .16em .75em .12em;
  border: 2px dashed currentColor;
  border-radius: 999px;
  font: 700 var(--fs-1)/1.35 var(--mono);
  font-stretch: 75%;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: .1em;
}

.guide {
  border: 2px dashed var(--ink);
  border-radius: 8px;
  padding: 18px;
}
.guide-title { font: 800 var(--fs-2)/1.2 var(--mono); font-stretch: 112.5%; text-transform: uppercase; }
.guide .cms { margin-top: 10px; }
.guide-note { margin-top: 12px; font: 400 15px/1.5 var(--read); max-width: 40ch; }

.draft {
  text-decoration: underline dashed;
  text-decoration-thickness: max(2px, .06em);
  text-underline-offset: .2em;
}

.ask-label {
  display: inline-block;
  margin-right: .5em;
  padding: .3em .8em .26em;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 700 var(--fs-1)/1.2 var(--mono);
  font-stretch: 75%;
  text-transform: uppercase;
  vertical-align: .12em;
}

.lede { font: 700 var(--fs-4)/1.3 var(--mono); max-width: 30ch; text-wrap: balance; }
.note { margin-top: 12px; font: 400 var(--fs-read)/1.55 var(--read); max-width: 58ch; }

/* Header */
.head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px var(--pad);
  pointer-events: none;
}
.head > * { pointer-events: auto; }
.head-index { justify-self: start; }
.head-book { justify-self: end; }
.dock {
  grid-column: 2;
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--f-poster);
  color: var(--ink);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s linear, visibility 0s linear .18s;
}
.dock-word { display: block; font: 800 22px/1 var(--mono); font-stretch: 75%; white-space: nowrap; }
.is-docked .dock { opacity: 1; visibility: visible; transition: opacity .18s linear; }

/* Poster */
.poster {
  --field: var(--f-poster);
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--head-h) + 16px) var(--pad) calc(var(--ticker-h) + 28px);
  background: var(--field);
  container-type: inline-size;
}
.mark {
  position: relative;
  z-index: 40;
  align-self: center;
  justify-self: start;
  font-size: calc((100vw - 2 * var(--pad)) / 4.65);
  font-size: calc(100cqw / 4.55);
  font-stretch: 112.5%;
  transform-origin: 0 0;
  pointer-events: none;
}
.is-docked .mark { visibility: hidden; }
.name { font: inherit; }
.wordmark {
  display: flex;
  flex-wrap: wrap;
  font-size: 1em;
  font-weight: 800;
  line-height: .98;
  white-space: nowrap;
}
.wordmark .ch { display: block; }
.wordmark .br { flex-basis: 100%; height: 0; }
.guide-line {
  position: absolute;
  top: calc(100% + .06em);
  left: 0;
  width: 100%;
  height: .13em;
  overflow: visible;
}
.guide-line path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }

.js .wordmark .ch { animation: stamp .56s var(--ease-out) backwards; animation-delay: calc(140ms + var(--i) * 62ms); }
.js .guide-line { animation: draw .8s var(--ease-out) 1s backwards; }
@keyframes stamp {
  0% { opacity: 0; font-stretch: 75%; font-weight: 200; }
  30% { opacity: 1; }
  100% { opacity: 1; font-stretch: 112.5%; font-weight: 800; }
}

.facts {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 32px;
  font: 700 var(--fs-2)/1.4 var(--mono);
  text-transform: uppercase;
}

/* Modes */
.mode {
  position: relative;
  padding: 88px var(--pad) 104px;
  background: var(--field);
}
.work { --field: var(--f-work); }
.pencil-mode { --field: var(--f-pencil); }
.lingo { --field: var(--f-lingo); }
.menu { --field: var(--f-menu); }
.chair { --field: var(--f-chair); }
.after { --field: var(--f-after); }
.fine { --field: var(--f-fine); }
.find { --field: var(--f-find); }

.spine {
  margin-bottom: 40px;
  font: 700 var(--fs-2)/1.2 var(--mono);
  font-stretch: 75%;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.spine::after {
  content: "";
  display: block;
  width: 5.5em;
  height: .55em;
  margin-top: .45em;
  background: var(--u3) left center / 100% 100% no-repeat;
}

/* Work */
.rail { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 40px 28px; }
.rail > li { flex: 0 0 auto; }
.rail.is-scroller {
  flex-wrap: nowrap;
  margin: 0 calc(-1 * var(--pad));
  padding: 6px var(--pad) 18px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--pad);
  scrollbar-width: thin;
  scrollbar-color: var(--ink) transparent;
}
.rail.is-scroller > li { scroll-snap-align: start; }
.cut { width: 240px; }
.cut img { width: 240px; height: 320px; object-fit: cover; }
.cut figcaption {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 3em;
  margin-top: 16px;
  font: 700 var(--fs-2)/1.4 var(--mono);
  text-transform: uppercase;
}
.rail-guide {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(260px, 100%);
  min-height: 320px;
}
.rail-ig { width: min(340px, 100%); }
@media (min-width: 720px) {
  .rail-guide { margin-bottom: calc(3em + 16px); }
  .rail-ig { padding-bottom: calc(3em + 16px); }
}
.ig-link { font: 800 var(--fs-4)/1.25 var(--mono); font-stretch: 100%; text-transform: uppercase; }
.ig-handle { margin-top: 18px; font: 400 var(--fs-2)/1.4 var(--mono); }

/* In pencil */
.manifesto {
  position: relative;
  max-width: 23.5em;
  color: var(--echo);
  font: 500 var(--fs-5)/1.32 var(--mono);
  font-stretch: 100%;
  text-transform: uppercase;
  text-wrap: pretty;
}

/* Lingo */
.lingo-intro { margin-bottom: 56px; }
.terms { display: grid; gap: 56px; }
.term { display: grid; gap: 16px 40px; align-items: start; }
.term-cell { container-type: inline-size; }
.term-name {
  font-size: min(var(--fs-6), calc(100cqw / (var(--len) * var(--adv))));
  font-weight: 800;
  font-stretch: var(--w);
  line-height: .95;
  text-transform: uppercase;
  white-space: nowrap;
}
.term-name::after {
  content: "";
  display: block;
  width: 100%;
  height: .2em;
  margin-top: .08em;
  background: var(--u2) left center / 100% 100% no-repeat;
}
.term:nth-child(odd) .term-name::after { background-image: var(--u4); }
.term-def { margin-top: 16px; font: 400 var(--fs-read)/1.55 var(--read); max-width: 44ch; }
.term-ask { font: 400 var(--fs-read)/1.55 var(--read); max-width: 40ch; }
.term-media { width: 200px; }
.crop { height: 150px; overflow: hidden; }
.crop img { width: 240px; max-width: none; height: 320px; transform: translate(var(--x), var(--y)); }
.photo-guide { display: flex; flex-direction: column; justify-content: flex-end; height: 150px; padding: 14px; }
.guards { display: grid; gap: 3px; }
.guards li {
  display: grid;
  grid-template-columns: 2.6em 1fr 4.2em;
  align-items: center;
  gap: 8px;
  font: 700 var(--fs-1)/1.25 var(--mono);
  font-stretch: 75%;
}
.g-bar { display: block; height: 7px; width: calc(var(--n) * 12.5%); border-radius: 999px; background: var(--ink); }
.g-len { text-align: right; font-variant-numeric: tabular-nums; }
.ruler figcaption { margin-top: 10px; font: 400 var(--fs-1)/1.4 var(--mono); font-stretch: 87.5%; }

/* Menu */
.menu-head { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.sticker {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--cape);
  color: var(--paper);
  font: 800 17px/1 var(--mono);
  font-stretch: 75%;
  letter-spacing: .04em;
  text-transform: uppercase;
  transform: rotate(-9deg);
}
.menu-intro { flex: 1 1 22rem; }

.services { display: grid; gap: 48px 56px; margin-top: 40px; }
.nb { white-space: nowrap; }
.service { position: relative; display: grid; gap: 14px; align-content: start; }
.svc-name { font: 800 var(--fs-4)/1.1 var(--mono); font-stretch: 100%; text-transform: uppercase; }
.svc-facts { display: flex; flex-wrap: wrap; gap: 10px 32px; }
.fact dt { font: 700 var(--fs-1)/1.3 var(--mono); font-stretch: 75%; letter-spacing: .03em; text-transform: uppercase; }
.fact dd { margin-top: 6px; }
.sheet-only { display: none; }
.svc-ask { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font: 700 var(--fs-2)/1.5 var(--mono); text-transform: uppercase; }
.svc-book { justify-self: start; }

.menu[data-view="1"] .services { grid-template-columns: minmax(0, 1fr); gap: 72px; }
.menu[data-view="1"] .svc-name { font-size: var(--fs-6); font-stretch: 112.5%; line-height: .95; }
.menu[data-view="1"] .sheet-only { display: grid; }
.menu[data-view="1"] .svc-facts {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  max-width: 760px;
  border-top: 3px solid var(--ink);
}
.menu[data-view="1"] .fact {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 3px solid var(--ink);
}
.menu[data-view="1"] .fact dd { margin: 0; }

.menu[data-view="2"] .services { grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); }

.menu[data-view="3"] .services { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 980px; }
.menu[data-view="3"] .service { gap: 8px; padding: 12px 0; }
.menu[data-view="3"] .svc-facts { gap: 8px; }
.menu[data-view="3"] .fact:not([data-k="time"]):not([data-k="price"]) { display: none; }
.menu[data-view="3"] .svc-name {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: var(--fs-3);
  font-stretch: 75%;
}
.menu[data-view="3"] .svc-name::after { content: ""; flex: 1; min-width: 24px; border-bottom: 3px dotted var(--ink); }
.menu[data-view="3"] .fact dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.menu[data-view="3"] .fact dd { margin: 0; }
.menu[data-view="3"] .svc-ask,
.menu[data-view="3"] .svc-book { display: none; }

.menu-controls {
  position: sticky;
  top: calc(var(--head-h) - 4px);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  pointer-events: none;
}
.menu-controls > * { pointer-events: auto; }
.view-switch { display: flex; align-items: center; gap: 8px; }
.view-switch legend {
  float: left;
  margin-right: 6px;
  font: 700 var(--fs-1)/1 var(--mono);
  font-stretch: 75%;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.view-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.view-switch label {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--field);
  font: 800 var(--fs-2)/1 var(--mono);
  cursor: pointer;
}
.view-switch input:checked + label { background: var(--ink); color: var(--paper); }
.view-switch input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 3px; }
.sort { position: relative; margin-left: auto; }
.print-list { display: none; }
.sort-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(430px, calc(100vw - 2 * var(--pad)));
  padding: 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
.sort-panel legend { margin-bottom: 8px; font: 800 var(--fs-2)/1.2 var(--mono); text-transform: uppercase; }
.sort-row {
  display: grid;
  grid-template-columns: 5.5em repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 6px 10px;
  padding: 8px 0;
  font: 400 var(--fs-2)/1.3 var(--mono);
  font-stretch: 87.5%;
  text-transform: uppercase;
}
.sort-by { font-weight: 800; font-stretch: 75%; }
.sort-row label { display: flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; }
.sort-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.sort-row label.is-off { opacity: .55; cursor: not-allowed; }
.sort-note { margin-top: 10px; font: 400 14px/1.45 var(--read); }

/* Behind the chair */
.chair .body { display: grid; gap: 40px; }
.portrait-guide { display: flex; flex-direction: column; justify-content: flex-end; width: 240px; height: 320px; }
.story { max-width: 64ch; font-stretch: 87.5%; }
.file { display: grid; gap: 0; }
.file > div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 16px; padding: 7px 0; }
.file dt { font: 700 var(--fs-1)/1.5 var(--mono); font-stretch: 75%; letter-spacing: .04em; text-transform: uppercase; padding-top: .15em; }
.file dd { font: 400 var(--fs-3)/1.55 var(--mono); font-stretch: 87.5%; }
.story h3 { margin: 48px 0 14px; font: 800 var(--fs-4)/1.1 var(--mono); font-stretch: 112.5%; text-transform: uppercase; }
.story-guide .guide-note { margin-top: 10px; font: 400 var(--fs-3)/1.7 var(--mono); font-stretch: 87.5%; max-width: 58ch; }

/* After the chair */
.slips { position: relative; max-width: 560px; padding: 18px 0 0 18px; }
.slips::before,
.slips::after {
  content: "";
  position: absolute;
  inset: 0 18px 18px 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
}
.slips::before { background: var(--f-poster); transform: rotate(-3.5deg); }
.slips::after { background: var(--f-menu); transform: rotate(2deg); }
.slip { position: relative; z-index: 1; padding: 28px; background: var(--paper); }
.slip-copy { margin-top: 14px; font: 400 var(--fs-read)/1.55 var(--read); }

/* Fine print */
.fine .body { display: grid; gap: 72px; max-width: 1100px; }
.fine-block h3 { margin-bottom: 20px; font: 800 var(--fs-4)/1 var(--mono); font-stretch: 112.5%; text-transform: uppercase; }
.rules > div { display: grid; gap: 4px; padding: 12px 0; }
.rules dt { font: 700 var(--fs-2)/1.4 var(--mono); font-stretch: 87.5%; text-transform: uppercase; }
.rules dd { font: 400 var(--fs-read)/1.55 var(--read); max-width: 60ch; }
.faq details { border-radius: 8px; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 8px 0;
  font: 700 var(--fs-3)/1.35 var(--mono);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq .state {
  flex: 0 0 auto;
  padding: .45em .95em .4em;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 700 var(--fs-1)/1 var(--mono);
  font-stretch: 75%;
}
.faq .state::before { content: "Open"; }
.faq details[open] .state::before { content: "Close"; }
.faq details p { max-width: 62ch; padding: 4px 0 18px; font: 400 var(--fs-read)/1.6 var(--read); }

/* Showtime */
.showtime {
  --field: var(--f-show);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  min-height: 88vh;
  min-height: 88svh;
  padding: 120px var(--pad) calc(var(--ticker-h) + 96px);
  background: var(--field);
  text-align: center;
  container-type: inline-size;
}
.show-word {
  font-size: calc((100vw - 2 * var(--pad)) / 6.2);
  font-size: min(15rem, calc(100cqw / 6.1));
  font-weight: 800;
  font-stretch: 112.5%;
  line-height: .9;
  text-transform: uppercase;
  white-space: nowrap;
}
.letters-wide { display: inline-flex; }
.letters-wide .ch { display: block; }
.show-line { font: 700 var(--fs-4)/1.3 var(--mono); text-wrap: balance; }
.show-note { font: 400 var(--fs-read)/1.5 var(--read); }
.show-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px 36px; margin-top: 8px; font: 700 var(--fs-2)/1.4 var(--mono); text-transform: uppercase; }
.show-wait .show-word .ch { font-stretch: 75%; transition: font-stretch .9s var(--ease-out) calc(var(--i) * 55ms); }
.show-wait .showtime.is-open .show-word .ch { font-stretch: 112.5%; }

/* Find the chair */
.find .body { container-type: inline-size; }
.city {
  font-size: calc(100cqw / 9.2);
  font-weight: 800;
  font-stretch: 100%;
  line-height: .95;
  text-transform: uppercase;
  white-space: nowrap;
}
.find-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 32px 40px; margin-top: 56px; }
.find-grid dt { font: 700 var(--fs-1)/1.3 var(--mono); font-stretch: 75%; letter-spacing: .04em; text-transform: uppercase; }
.find-grid dd { margin-top: 8px; font: 400 var(--fs-3)/1.5 var(--mono); }
.find-note { display: block; margin-top: 8px; font: 400 15px/1.45 var(--read); }

/* Chair notes */
.ticker {
  position: sticky;
  bottom: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  height: var(--ticker-h);
  background: var(--paper);
  color: var(--ink);
}
.ticker-view { flex: 1; min-width: 0; overflow: hidden; }
.ticker-track { display: flex; width: max-content; animation: tick var(--dur, 60s) linear infinite; }
.ticker-group {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 16px;
  font: 500 var(--fs-2)/1 var(--mono);
  text-transform: uppercase;
  white-space: nowrap;
}
.tool { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track,
.ticker.is-paused .ticker-track { animation-play-state: paused; }
.ticker-toggle { flex: 0 0 auto; min-height: 32px; margin: 0 6px 0 10px; padding: 0 14px; font-size: var(--fs-1); }
@keyframes tick { to { transform: translateX(-50%); } }

/* Footer */
.foot {
  --field: var(--f-foot);
  padding: 88px var(--pad) 40px;
  background: var(--field);
  text-align: center;
  container-type: inline-size;
}
.foot-mark { font: 800 min(7.5rem, calc(100cqw / 8.4))/1 var(--mono); font-stretch: 112.5%; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 48px 32px; margin: 72px auto 0; max-width: 1180px; }
.foot-label { position: relative; display: inline-block; margin-bottom: 14px; font: 700 var(--fs-2)/1.2 var(--mono); font-stretch: 75%; letter-spacing: .12em; text-transform: uppercase; }
.looped .foot-label { margin: -14px 0 0; padding: 14px 26px; }
.looped .foot-label::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--loop) center / 100% 100% no-repeat;
  pointer-events: none;
}
.foot-cell p { font: 400 var(--fs-2)/1.55 var(--mono); }
.foot-cell .cms { margin-top: 8px; }
.foot-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 64px; }

/* Reveal card */
.reveal {
  position: absolute;
  z-index: 60;
  display: block;
  width: min(320px, calc(100vw - 32px));
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.45 var(--mono);
  font-stretch: 100%;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: normal;
  cursor: auto;
}
.reveal[hidden] { display: none; }
.reveal > span { display: block; }
.r-term { font: 800 20px/1.05 var(--mono); font-stretch: 112.5%; text-transform: uppercase; }
.r-def { margin-top: 8px; font: 400 15px/1.5 var(--read); }
.r-media { width: 200px; height: 150px; margin-top: 12px; overflow: hidden; }
.r-media img { width: 240px; max-width: none; height: 320px; transform: translate(var(--x), var(--y)); }
.r-link { display: inline-block; margin-top: 12px; font: 700 var(--fs-1)/1.4 var(--mono); text-transform: uppercase; }
@media (prefers-reduced-motion: no-preference) {
  .reveal:not([hidden]) { animation: rise .2s var(--ease-out); }
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* Dialogs */
dialog { color: var(--ink); }
.book {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 28px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
}
.book::backdrop { background: rgb(20 20 20 / .55); }
.book-title { font: 800 clamp(34px, 1rem + 4vw, 56px)/1 var(--mono); font-stretch: 112.5%; text-transform: uppercase; }
.book-note { margin-top: 16px; font: 400 var(--fs-read)/1.55 var(--read); }
.book-cms { margin-top: 14px; font: 400 var(--fs-2)/1.6 var(--mono); }
.book-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-top: 28px; font: 700 var(--fs-2)/1.4 var(--mono); text-transform: uppercase; }
.book-actions .pill { margin-left: auto; }

.index {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--f-poster);
}
.index::backdrop { background: transparent; }
.index-inner { min-height: 100%; padding: 14px var(--pad) 40px; }
.index-close { background: var(--paper); color: var(--ink); }
.index-close:active { background: var(--ink); color: var(--paper); }
.index-list { display: grid; gap: 10px; max-width: 680px; margin: 40px auto 0; }
.index-list .pill { position: relative; width: 100%; min-height: 52px; font-size: var(--fs-3); }
.index-list .pill::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c);
  transform: translateY(-50%);
}
@media (prefers-reduced-motion: no-preference) {
  .index[open] { animation: drop .36s var(--ease-out); }
  .book[open] { animation: rise .24s var(--ease-out); }
}
@keyframes drop { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

/* Narrow phones */
@media (max-width: 399px) {
  .head { gap: 6px; padding-inline: 10px; }
  .head .pill { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .dock { padding: 0 10px; }
  .dock-word { font-size: 16px; }
  .view-switch { gap: 6px; }
  .view-switch label { width: 40px; height: 40px; }
  .menu-controls .pill { padding: 0 16px; }
  .file > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* Wider screens */
@media (min-width: 720px) {
  :root { --pad: 24px; }
  .mark { font-size: calc((100vw - 2 * var(--pad)) / 8.5); font-size: calc(100cqw / 8.33); }
  .wordmark { flex-wrap: nowrap; }
  .wordmark .br { display: none; }
  .guide-line { left: 3.75em; width: calc(100% - 3.75em); }
  .term { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .term-media { grid-column: 2; }
  .rules > div { grid-template-columns: 13em minmax(0, 1fr); gap: 24px; }
  .print-list { display: inline-flex; }
  .menu[data-view="1"] .fact { grid-template-columns: 11em minmax(0, 1fr); }
  .menu[data-view="3"] .service { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; }
  .menu[data-view="3"] .svc-facts { flex-wrap: nowrap; }
  .chair .body { grid-template-columns: 240px minmax(0, 1fr); column-gap: 56px; }
}

@media (min-width: 1024px) {
  :root { --pad: 32px; --fs-3: 17px; --fs-read: 18px; }
  .mode {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 40px;
    padding: 136px 48px 144px 24px;
  }
  .spine {
    position: sticky;
    top: 108px;
    align-self: start;
    justify-self: center;
    margin: 0;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 16px;
  }
  .spine::after { display: none; }
  .rail.is-scroller { margin: 0; padding-inline: 2px; }
  .term { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) 200px; }
  .term-media { grid-column: auto; }
  .fine .body { gap: 88px; }
}

@media (min-width: 1600px) {
  .mode { padding-right: 96px; }
}

/* Landscape phones: the poster becomes the card, nothing is locked */
@media (orientation: landscape) and (max-height: 540px) {
  :root { --ticker-h: 0px; --head-h: 60px; }
  .ticker { display: none; }
  .head { padding-block: 10px; }
  .pill { min-height: 40px; }
  .poster { padding-top: calc(var(--head-h) + 8px); padding-bottom: 24px; }
  .spine { position: static; }
  .menu-controls { position: static; }
  .showtime { min-height: 100svh; padding-top: 80px; padding-bottom: 64px; }
  .manifesto { font-size: clamp(22px, 3.4vw, 34px); }
}

/* Reduced motion: everything settles, the notes stop */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .ticker-track { animation: none; }
  .ticker-toggle { display: none; }
}

/* Print: the menu as a plain price list */
@media print {
  html, body, .mode, .poster, .showtime, .foot { background: #fff !important; }
  .head, .ticker, .menu-controls, .sticker, dialog, .reveal { display: none !important; }
  html.print-menu main > :not(#menu), html.print-menu .foot { display: none !important; }
  .mode { padding: 24px 0 !important; display: block !important; }
  .spine { position: static !important; writing-mode: horizontal-tb !important; transform: none !important; }
}
