/* The Pass — the back-of-house library. Builds on styles.css (fonts, sun mark, motion tokens).
   After hours: the same three colours as the main site, inverted to a dark dining room. */

body.pass {
  --paper: #1A1815;          /* the room: warm charcoal, candlelit rather than black */
  --panel: #201E1B;          /* sidebar, panels */
  --raise: #2A2723;          /* hover, active rows */
  --ink: #ECE5D7;            /* cream type */
  --ink-soft: #A39B8C;       /* 6.6:1 on the room */
  --line: #2A2723;           /* dividers barely there */
  --line-strong: #3C3833;
  --oxblood: #B4553F;        /* lifted for the dark */
  --side-w: 272px;
  background: var(--paper);
  color: var(--ink);
}
body.pass ::selection { background: var(--oxblood); color: var(--ink); }

/* grain, but light on dark */
body.pass::before {
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.95  0 0 0 0 0.92  0 0 0 0 0.86  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* candlelight: a soft warm pool that follows the pointer (set by pass.js) */
body.pass::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 20%), rgba(180, 85, 63, 0.06), transparent 65%);
}

.skip { z-index: 200; }

/* ───────── Shell ───────── */
.app { position: relative; z-index: 1; min-height: 100vh; }

.side {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: min(86vw, var(--side-w));
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: 1.5rem 1rem 1.25rem;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  translate: -100% 0;
  transition: translate 500ms var(--ease-out);
}
.side.is-open { translate: 0 0; }

.side__brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 0.75rem;
  padding: 0.25rem 0.5rem;
}
.side__brand .sunmark { grid-row: span 2; width: 36px; height: 22px; }
.side__name { font-family: var(--display); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em; line-height: 1.1; }
.side__by { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.02em; color: var(--ink-soft); }

.side__label {
  margin: 0 0 0.5rem;
  padding: 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.side__nav ul { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.side__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 42px;
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  transition: background-color 250ms ease, color 250ms ease;
}
.side__link:hover { background: var(--raise); color: var(--ink); }
.side__link.is-active { background: var(--raise); color: var(--ink); }
.side__link.is-active::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 0.6rem; bottom: 0.6rem;
  width: 2px;
  background: var(--oxblood);
}
.side__glyph { width: 20px; height: 20px; flex: none; color: currentColor; }
.side__link > span:not(.side__count) { flex: 1; }
.side__count {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-soft);
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.side__lock { width: 14px; height: 14px; color: var(--oxblood); }

.side__foot { margin-top: auto; display: grid; gap: 0.5rem; padding: 1rem 0.5rem 0; border-top: 1px solid var(--line); }
.side__time { margin: 0; font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); }
.side__time time { color: var(--ink); margin-left: 0.35em; }
.side__back { font-size: 0.875rem; color: var(--ink-soft); transition: color 250ms ease; }
.side__back:hover { color: var(--ink); }

.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(8, 7, 6, 0.6); backdrop-filter: blur(2px); }
.scrim[hidden] { display: none; }

/* Top bar */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 60px;
  padding: 0.5rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top__menu {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-left: -0.5rem;
  background: none; border: 0;
  color: var(--ink);
  cursor: pointer;
}
.top__bars, .top__bars::before, .top__bars::after { display: block; width: 18px; height: 1.5px; background: currentColor; content: ""; }
.top__bars { position: relative; }
.top__bars::before { position: absolute; top: -6px; }
.top__bars::after { position: absolute; top: 6px; }
.top__brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--display); font-weight: 700; font-size: 1rem; }
.top__brand .sunmark { width: 30px; height: 18px; }
.top__crumb { display: none; margin: 0; font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); }
.top__crumb a { color: var(--ink); }
.top__crumb span[aria-hidden] { margin: 0 0.6em; opacity: 0.6; }
.top__search {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 40px;
  padding: 0 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  font: inherit;
  font-size: 0.875rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 250ms ease, color 250ms ease;
}
.top__search:hover, .top__search:focus-visible { border-color: var(--ink-soft); color: var(--ink); }
.top__search svg { width: 16px; height: 16px; }
.top__search-label, .top__search kbd { display: none; }
kbd {
  font-family: var(--mono);
  font-size: 0.6875rem;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink-soft);
  background: var(--paper);
}

.readbar {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--oxblood);
  transform-origin: left center;
  transform: scaleX(var(--read, 0));
  pointer-events: none;
}

.pass-main { min-height: 70vh; }

.disclaimer {
  margin: 0;
  padding: var(--space-4) var(--gutter) var(--space-5);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.disclaimer p { margin: 0; max-width: 92ch; }
.disclaimer p + p { margin-top: 0.6rem; }
.disclaimer__link { color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--oxblood); text-underline-offset: 0.2em; }
.disclaimer__link:hover { color: var(--ink); }

/* ───────── Library home ───────── */
.lib-hero {
  display: grid;
  gap: 0;
  padding: var(--space-5) var(--gutter) var(--space-6);
  overflow: hidden;
  container-type: inline-size;   /* the title is sized to the full width of the hero */
}
.lib-hero__text { min-width: 0; }
.lib-hero__eyebrow { margin: 0 0 var(--space-2); font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.02em; color: var(--ink-soft); }
.lib-hero__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  /* "The Pass." is ~4.2em wide: it spans the hero edge to edge, like the name on the main page */
  font-size: calc((100vw - 2 * var(--gutter)) / 4.3);
  font-size: calc(100cqi / 4.23);
  white-space: nowrap;
  line-height: 0.86;
  letter-spacing: -0.05em;
  margin-left: -0.04em;
}
.lib-hero__rule {
  height: 1px;
  margin: var(--space-3) 0 var(--space-4);
  background: var(--oxblood);
  transform-origin: left center;
}
.js .lib-hero__rule { scale: 0 1; transition: scale 1600ms var(--ease-out) 700ms; }
.js .lib-hero.is-in .lib-hero__rule { scale: 1 1; }
.lib-hero__lede { margin: 0 0 var(--space-4); max-width: 38ch; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.55; color: var(--ink); }
.lib-hero__search {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: min(100%, 420px);
  min-height: 52px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: none;
  font: inherit;
  font-size: 1rem;
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
  transition: border-color 400ms ease, color 400ms ease;
}
.lib-hero__search span { flex: 1; }
.lib-hero__search svg { width: 18px; height: 18px; }
.lib-hero__search kbd { background: none; }
.lib-hero__search:hover, .lib-hero__search:focus-visible { border-bottom-color: var(--oxblood); color: var(--ink); outline: none; }
.lib-hero__search:focus-visible { box-shadow: 0 2px 0 var(--oxblood); }

/* The word itself: a dictionary entry tells the story of the name */
.define { min-width: 0; }
.define__entry { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.9rem; margin: 0 0 1rem; }
.define__word { font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -0.03em; color: var(--ink); }
.define__ipa { font-size: 0.9375rem; font-weight: 300; color: var(--ink-soft); }
.define__pos { font-size: 0.875rem; font-style: italic; font-weight: 300; color: #E3A08F; }
.define__body { margin: 0 0 1.5rem; max-width: 34ch; font-family: var(--display); font-weight: 300; font-size: clamp(1.375rem, 2.3vw, 1.875rem); line-height: 1.35; letter-spacing: -0.02em; color: var(--ink); }
.lib-hero .lib-hero__lede { max-width: 44ch; margin-bottom: 0; font-size: clamp(1rem, 1.3vw, 1.125rem); color: var(--ink-soft); }
.lib-hero__side { display: grid; gap: var(--space-3); margin-top: var(--space-4); }
.js .lib-hero .define, .js .lib-hero .lib-hero__side { opacity: 0; translate: 0 14px; transition: opacity 1000ms ease, translate 1200ms var(--ease-out); }
.js .lib-hero .define { transition-delay: 900ms; }
.js .lib-hero .lib-hero__side { transition-delay: 1200ms; }
.js .lib-hero.is-in .define, .js .lib-hero.is-in .lib-hero__side { opacity: 1; translate: 0 0; }

/* On the pass now: a live line that follows the rhythm of a shift, by Dubai time */
.shift {
  display: grid; gap: 0.6rem;
  padding: 1.15rem 1.3rem 1.2rem;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(239, 233, 221, 0.08), rgba(239, 233, 221, 0.03) 60%, rgba(239, 233, 221, 0.05));
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), inset 0 0 0 1px rgba(239, 233, 221, 0.07), 0 24px 48px -30px rgba(0, 0, 0, 0.6);
  color: var(--ink);
  transition: background 600ms ease, translate 800ms var(--ease-out);
}
.shift__now { display: flex; align-items: center; gap: 0.6rem; font-size: 0.75rem; letter-spacing: 0.02em; color: var(--ink-soft); }
.shift__dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #C4624A; flex: none; }
.shift__dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid #C4624A; opacity: 0; animation: shift-pulse 2.8s var(--ease-out) infinite; }
@keyframes shift-pulse { 0% { opacity: 0.7; scale: 0.4; } 70%, 100% { opacity: 0; scale: 1.6; } }
.shift__phase { color: var(--ink); }
.shift__time { margin-left: auto; font-variant-numeric: tabular-nums; }
.shift__line { font-family: var(--display); font-weight: 300; font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.015em; }
.shift__go { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--ink-soft); transition: color 400ms ease; }
.shift__go .chop { width: 13px; height: 13px; color: #E3A08F; transition: transform 600ms var(--ease-out); }
.shift:hover, .shift:focus-visible { translate: 0 -2px; background: linear-gradient(150deg, rgba(239, 233, 221, 0.11), rgba(239, 233, 221, 0.045) 60%, rgba(239, 233, 221, 0.07)); outline: none; }
.shift:hover .shift__go, .shift:focus-visible .shift__go { color: var(--ink); }
.shift:hover .shift__go .chop, .shift:focus-visible .shift__go .chop { transform: translate(2px, -2px); }
.shift:focus-visible { box-shadow: inset 0 0 0 1px var(--oxblood); }
.shift.is-swap .shift__line { animation: def-in 600ms var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .shift__dot::after { animation: none; } }

/* Term of the day: a ticket printer on the pass */
.rig { position: relative; justify-self: center; width: min(100%, 380px); margin-top: var(--space-5); }
.rig__cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0 0.15rem;
  margin-top: 1.75rem;
}
.seg {
  position: relative;
  min-height: 36px;
  padding: 0 0.4rem;
  border: 0;
  background: none;
  font: inherit;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 300ms ease;
}
.seg + .seg::before { content: "\00b7"; position: absolute; left: -0.2rem; color: var(--line-strong); pointer-events: none; }
.seg:hover { color: var(--ink); }
.seg[aria-pressed="true"] { color: var(--ink); background: linear-gradient(var(--oxblood), var(--oxblood)) no-repeat 50% calc(100% - 6px) / calc(100% - 0.9rem) 1px; }
.printer {
  position: relative;
  z-index: 2;
  display: block;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: linear-gradient(180deg, #2C2925, #201E1B);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.7);
}
.printer__slot {
  position: absolute;
  left: 22px; right: 22px; bottom: 9px;
  height: 4px;
  border-radius: 2px;
  background: #0E0D0C;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}
.printer__led {
  position: absolute;
  top: 12px; right: 18px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #E07A5F;
  box-shadow: 0 0 10px 2px rgba(224, 122, 95, 0.55);
}
.rig.is-printing .printer__led { animation: blink 260ms steps(2, end) 4; }
@keyframes blink { 50% { opacity: 0.25; } }

.ticket {
  position: relative;
  z-index: 1;
  margin: -6px 18px 0;
  padding: 1.6rem 1.4rem 1.4rem;
  background: #EDE6D8;
  color: #1C1B19;
  rotate: -0.6deg;
  transform-origin: 50% 0;
  box-shadow: 0 28px 50px -24px rgba(0, 0, 0, 0.85);
}
/* torn edge */
.ticket::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -9px;
  height: 10px;
  background:
    linear-gradient(-45deg, transparent 6px, #EDE6D8 0) 0 0 / 12px 12px repeat-x,
    linear-gradient(45deg, transparent 6px, #EDE6D8 0) 0 0 / 12px 12px repeat-x;
}
.ticket__head, .ticket__foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: #6B655C;
}
.ticket__head { padding-bottom: 0.9rem; border-bottom: 1px dashed #B9B1A2; }
.ticket__term {
  margin: 1.1rem 0 0.2rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}
.ticket__cuisine { margin: 0 0 1rem; font-family: var(--mono); font-size: 0.75rem; color: #7A2E22; }
.ticket__def { margin: 0 0 1.1rem; font-size: 0.9375rem; line-height: 1.55; color: #2A2723; animation: def-in 500ms var(--ease-out); }
@keyframes def-in { from { opacity: 0; translate: 0 6px; } }
.ticket__prompt { margin: 0 0 1.1rem; font-size: 0.9375rem; color: #6B655C; font-style: italic; }
.ticket__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin-bottom: 1.2rem; }
.ticket__btn {
  min-height: 40px;
  padding: 0 0.95rem;
  border: 1px solid #1C1B19;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1C1B19;
  cursor: pointer;
  transition: background-color 250ms ease, color 250ms ease;
}
.ticket__btn:hover, .ticket__btn:focus-visible { background: #1C1B19; color: #EDE6D8; }
.ticket__btn--main { background: #1C1B19; color: #EDE6D8; }
.ticket__btn--main:hover { background: #7A2E22; border-color: #7A2E22; }
.ticket__open { font-size: 0.875rem; color: #1C1B19; background: linear-gradient(#7A2E22, #7A2E22) no-repeat 0 100% / 100% 1px; padding-bottom: 1px; }
.ticket__sit { margin: 0 0 1rem; font-size: 0.9375rem; line-height: 1.55; color: #2A2723; }
.ticket__say { margin: 0 0 1.1rem; padding-left: 0.75rem; border-left: 2px solid #7A2E22; font-size: 0.875rem; line-height: 1.55; font-style: italic; color: #4A453E; animation: def-in 500ms var(--ease-out); }
.ticket__tally {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 0 0 0.9rem; padding-top: 0.9rem;
  border-top: 1px dashed #B9B1A2;
  font-size: 0.6875rem; letter-spacing: 0.02em; color: #1C1B19;
}
.ticket__week { display: inline-flex; gap: 3px; }
.ticket__week i { display: block; width: 7px; height: 7px; border: 1px solid #8E877B; transition: background-color 400ms ease, border-color 400ms ease; }
.ticket__week i.is-done { background: #1C1B19; border-color: #1C1B19; }
.ticket__week i.is-today { border-color: #7A2E22; }
.ticket__week i.is-today.is-done { background: #7A2E22; }
.ticket__streak { display: inline-block; }
.ticket__streak.is-bump { animation: tally-bump 600ms steps(3, end); }
.ticket__learned { margin-left: auto; color: #6B655C; }
@keyframes tally-bump { 0% { transform: translateY(-3px); opacity: 0.4; } 100% { transform: none; opacity: 1; } }
.ticket__foot { padding-top: 0.9rem; border-top: 1px dashed #B9B1A2; }
.ticket :focus-visible { outline: 2px solid #7A2E22; outline-offset: 3px; }

/* the printer feeds the ticket out in mechanical steps */
.rig.is-printing .ticket { animation: feed 1100ms steps(11, end); }
@keyframes feed {
  from { clip-path: inset(0 0 100% 0); translate: 0 -40px; }
  to   { clip-path: inset(0 0 -20px 0); translate: 0 0; }
}

/* records */
.lib { padding: var(--space-4) var(--gutter) var(--space-5); }
.lib__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; margin-bottom: var(--space-3); }
.lib__title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.lib__title::before { content: ""; width: 1.5rem; height: 2px; background: var(--oxblood); }
.lib__note { margin: 0; font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); }

.records { width: 100%; border-collapse: collapse; }
.records thead { display: none; }
.records th {
  padding: 0 1rem 0.75rem 0;
  text-align: left;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-strong);
}
.records tbody tr {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 250ms ease;
}
.records td { padding: 0; }
.records__type, .records__size { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); }
.records__type { order: 1; }
.records__size { order: 2; justify-self: end; }
.records__name { order: 3; grid-column: 1 / -1; }
.records__name a { display: flex; align-items: flex-start; gap: 0.9rem; }
.records__name a::after { content: ""; position: absolute; inset: 0; }  /* whole row is the link */
.records__name strong {
  display: block;
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  transition: color 250ms ease;
}
.records__name small { display: block; margin-top: 0.2rem; font-size: 0.875rem; color: var(--ink-soft); line-height: 1.45; }
.records tbody tr:hover { background: var(--raise); }
.records tbody tr:hover strong { color: #fff; }
.records tbody tr:focus-within { outline: 2px solid var(--oxblood); outline-offset: -2px; }
.records a:focus-visible { outline: none; }

.glyph-sm { width: 28px; height: 28px; flex: none; color: var(--ink); overflow: visible; margin-top: 0.1rem; transition: transform 600ms var(--ease-out), color 300ms ease; }
.records tbody tr:hover .glyph-sm { transform: rotate(-8deg) scale(1.08); color: var(--oxblood); }

.vault {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  align-items: center;
  padding: 1.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(180, 85, 63, 0.12), transparent 55%),
    var(--panel);
  transition: border-color 300ms ease, transform 500ms var(--ease-out);
}
.vault:hover, .vault:focus-visible { border-color: var(--oxblood); transform: translateY(-2px); }
.vault__glyph { width: 48px; height: 48px; color: var(--ink); }
.vault__text strong { display: block; font-family: var(--display); font-size: 1.25rem; letter-spacing: -0.02em; }
.vault__text small { display: block; margin-top: 0.2rem; font-size: 0.875rem; color: var(--ink-soft); }
.vault .chip { grid-column: 1 / -1; justify-self: start; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.chip svg { width: 12px; height: 12px; }
.chip--lock { border-color: rgba(180, 85, 63, 0.5); color: #E3A08F; }

/* reveals on the library home */
.js .lib .records tbody tr { clip-path: inset(0 0 100% 0); translate: 0 0.75rem; transition: clip-path var(--t-reveal) var(--ease-out), translate var(--t-reveal) var(--ease-out), background-color 250ms ease; transition-delay: calc(150ms + var(--n) * 80ms), calc(150ms + var(--n) * 80ms), 0ms; }
.js .lib.is-in .records tbody tr { clip-path: inset(0 0 0 0); translate: 0 0; }
.js .lib .glyph-sm { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1400ms var(--ease-out), transform 600ms var(--ease-out), color 300ms ease; }
.js .lib.is-in .glyph-sm { stroke-dashoffset: 0; transition-delay: calc(450ms + var(--n) * 120ms), 0ms, 0ms; }
.js .lib__title::before { scale: 0 1; transform-origin: left; transition: scale 1400ms var(--ease-out) 150ms; }
.js .lib.is-in .lib__title::before { scale: 1 1; }
.js .vault { opacity: 0; translate: 0 1rem; transition: opacity 900ms ease 200ms, translate 1100ms var(--ease-out) 200ms, border-color 300ms ease, transform 500ms var(--ease-out); }
.js .lib.is-in .vault { opacity: 1; translate: 0 0; }

/* Library index: collections set like a menu card — name, dotted leader, a quiet count */
.shelves { display: grid; gap: var(--space-5) var(--space-6); margin-top: var(--space-2); }
.coll__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.coll__title::before { content: ""; width: 1.25rem; height: 1px; background: var(--oxblood); }
.coll__title span { margin-left: auto; font-size: 0.6875rem; color: #E3A08F; }
.coll__list { list-style: none; margin: 0; padding: 0; }
.line {
  display: grid;
  grid-template-columns: auto minmax(1.5rem, 1fr) auto;
  align-items: baseline;
  column-gap: 0.75rem;
  padding: 0.8rem 0;
}
.line__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  transition: transform 500ms var(--ease-out), color 300ms ease;
}
.line__dots { height: 1px; border-bottom: 1px dotted var(--line-strong); transform: translateY(-0.3em); transition: border-color 300ms ease; }
.line__meta { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); white-space: nowrap; transition: color 300ms ease; }
.line__desc {
  grid-column: 1 / -1;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-soft);
  transition: max-height 500ms var(--ease-out), opacity 400ms ease, margin 500ms var(--ease-out);
}
a.line:hover .line__name, a.line:focus-visible .line__name { transform: translateX(0.35rem); color: #fff; }
a.line:hover .line__dots, a.line:focus-visible .line__dots { border-bottom-color: var(--oxblood); }
a.line:hover .line__meta, a.line:focus-visible .line__meta { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  a.line:hover .line__desc, a.line:focus-visible .line__desc { max-height: 3.2em; opacity: 1; margin-top: 0.35rem; }
}
a.line:focus-visible { outline: none; }
a.line:focus-visible .line__name { text-decoration: underline; text-decoration-color: var(--oxblood); text-underline-offset: 0.2em; }
.line--soon .line__name { color: var(--ink-soft); opacity: 0.55; }
.line--soon .line__meta { color: var(--ink-soft); opacity: 0.6; }

.js .lib .coll { opacity: 0; translate: 0 1rem; transition: opacity 900ms ease, translate 1100ms var(--ease-out); transition-delay: calc(150ms + var(--n) * 110ms); }
.js .lib.is-in .coll { opacity: 1; translate: 0 0; }

@media (min-width: 768px) {
  .shelves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Library index as a set of magazine covers: one issue per collection */
.covers { display: grid; gap: var(--space-3); margin-top: var(--space-2); }
.cover {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 22rem;
  padding: 1.5rem 1.6rem 1.25rem;
  overflow: hidden;
  container-type: inline-size;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(180, 85, 63, 0.10), transparent 55%),
    linear-gradient(180deg, #23201C, #1C1A17);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.9);
  transition: transform 600ms var(--ease-out), border-color 400ms ease, box-shadow 600ms var(--ease-out);
}
.cover:hover { transform: translateY(-3px); border-color: #57504A; box-shadow: 0 40px 70px -40px rgba(0, 0, 0, 0.95); }
.cover__art {
  position: absolute;
  right: -2rem;
  top: 5.5rem;
  width: clamp(150px, 42%, 230px);
  height: auto;
  aspect-ratio: 1;
  color: var(--ink);
  opacity: 0.1;
  pointer-events: none;
  transition: opacity 600ms ease, transform 900ms var(--ease-out);
}
.cover:hover .cover__art { opacity: 0.18; transform: rotate(-4deg) scale(1.03); }
.cover__mast {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.cover__title {
  position: relative;
  margin: 1.4rem 0 0.4rem;
  font-family: var(--display);
  font-weight: 700;
  /* sized to the cover, so even "Conversations" fits on one line */
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  font-size: min(4.5rem, 13cqi);
  line-height: 0.92;
  letter-spacing: -0.05em;
  white-space: nowrap;
}
.cover__stand { position: relative; margin: 0; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.02em; color: #E3A08F; }
.cover__inside {
  position: relative;
  margin: auto 0 0.25rem;
  padding-top: 2.5rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.cover .coll__list { position: relative; border-top: 1px solid var(--line); }
.cover .line { padding: 0.7rem 0; }
.cover .line__name { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); }
.cover--soon { background: linear-gradient(180deg, #1E1C19, #1A1815); }
.cover--soon .cover__title, .cover--soon .cover__stand { opacity: 0.55; }
.cover__stamp {
  position: relative;
  align-self: flex-start;
  margin: 1.1rem 0 0;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(180, 85, 63, 0.6);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: #E3A08F;
  rotate: -4deg;
}
.js .lib .cover { opacity: 0; translate: 0 1.25rem; transition: opacity 900ms ease, translate 1100ms var(--ease-out), transform 600ms var(--ease-out), border-color 400ms ease, box-shadow 600ms var(--ease-out); transition-delay: calc(150ms + var(--n) * 120ms), calc(150ms + var(--n) * 120ms), 0ms, 0ms, 0ms; }
.js .lib.is-in .cover { opacity: 1; translate: 0 0; }

@media (min-width: 768px) {
  .covers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
  .cover { min-height: 30rem; }
}

/* Catalogue: each collection as a magazine spread — chapter opener, then plates with captions */
.catalogue { display: grid; gap: var(--space-6); margin-top: var(--space-3); }
.spread { display: grid; gap: var(--space-3); padding-top: 1.25rem; border-top: 1px solid var(--ink-soft); }
.spread__no {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3.5rem, 8vw, 6rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ink-soft);
}
.spread__title { margin: 1rem 0 0.4rem; font-family: var(--display); font-weight: 400; font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -0.03em; line-height: 1; }
.spread__stand { margin: 0; max-width: 26ch; font-weight: 300; font-size: 1rem; line-height: 1.55; color: var(--ink-soft); }
.spread__count { margin: 1rem 0 0; font-size: 0.75rem; letter-spacing: 0.01em; color: #E3A08F; }

.spread__plates { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }

/* Entry: a frosted glass card; the line drawing sits behind it, half clear above the glass, half blurred beneath */
.entry { position: relative; display: block; min-width: 0; padding-top: 4.25rem; isolation: isolate; }
.entry__scene { position: absolute; z-index: 0; top: 0; right: 14%; width: 40%; max-width: 8.5rem; aspect-ratio: 1; pointer-events: none; }
.entry__glow {
  position: absolute; inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 98, 74, 0.55), rgba(122, 46, 34, 0.25) 45%, transparent 70%);
  filter: blur(14px);
  opacity: 0.7;
  transition: opacity 700ms ease, transform 900ms var(--ease-out);
}
.entry__art { position: relative; width: 100%; height: 100%; color: var(--ink); opacity: 0.85; transition: transform 1000ms var(--ease-out), opacity 600ms ease; }
.entry__glass {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  min-height: 15rem;
  padding: 1.25rem 1.35rem 1.4rem;
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(239, 233, 221, 0.09), rgba(239, 233, 221, 0.03) 55%, rgba(239, 233, 221, 0.05));
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), inset 0 0 0 1px rgba(239, 233, 221, 0.07), 0 24px 48px -28px rgba(0, 0, 0, 0.6);
  transition: background 600ms ease, box-shadow 600ms ease, translate 800ms var(--ease-out);
}
.entry__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.entry__no { font-size: 0.75rem; letter-spacing: 0.02em; color: var(--ink-soft); }
.entry__go { width: 15px; height: 15px; color: var(--ink); opacity: 0.75; transition: transform 600ms var(--ease-out), opacity 400ms ease; }
.entry__title { display: block; font-family: var(--display); font-weight: 300; font-size: 1.375rem; letter-spacing: -0.02em; line-height: 1.15; }
.entry__desc { display: block; margin-top: 0.45rem; font-size: 0.875rem; font-weight: 300; line-height: 1.5; color: var(--ink-soft); }
.entry__meta { display: flex; align-items: baseline; gap: 0.45rem; margin-top: auto; padding-top: 1.5rem; }
.entry__fig { font-family: var(--display); font-weight: 200; font-size: clamp(2.5rem, 4vw, 3.25rem); letter-spacing: -0.04em; line-height: 0.9; color: var(--ink); }
.entry__fig--word { font-weight: 300; font-size: 1.5rem; letter-spacing: -0.02em; }
.entry__unit { font-size: 0.8125rem; font-weight: 300; color: var(--ink-soft); }

a.entry:hover .entry__glass, a.entry:focus-visible .entry__glass {
  translate: 0 -3px;
  background: linear-gradient(150deg, rgba(239, 233, 221, 0.12), rgba(239, 233, 221, 0.045) 55%, rgba(239, 233, 221, 0.07));
}
a.entry:hover .entry__art, a.entry:focus-visible .entry__art { transform: rotate(-6deg) translateY(-6px); opacity: 1; }
a.entry:hover .entry__glow, a.entry:focus-visible .entry__glow { opacity: 1; transform: scale(1.12); }
a.entry:hover .entry__go, a.entry:focus-visible .entry__go { transform: translate(2px, -2px); opacity: 1; }
a.entry:focus-visible { outline: none; }
a.entry:focus-visible .entry__glass { box-shadow: inset 0 0 0 1px var(--oxblood), 0 24px 48px -28px rgba(0, 0, 0, 0.6); }
.entry--soon .entry__art { opacity: 0.4; }
.entry--soon .entry__glow { opacity: 0.25; }
.entry--soon .entry__title { color: var(--ink-soft); }
.entry--soon .entry__fig--word { color: #E3A08F; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .entry__glass { background: rgba(48, 45, 41, 0.92); }
}
.spread--soon .spread__title { color: var(--ink-soft); }

.js .lib .spread { opacity: 0; translate: 0 1.25rem; transition: opacity 1000ms ease, translate 1200ms var(--ease-out); transition-delay: 120ms; }
.js .lib .spread.is-in { opacity: 1; translate: 0 0; }

@media (min-width: 560px) {
  .spread__plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1680px) {
  .spread__plates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .spread { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--space-5); align-items: start; }
  .spread__open { position: sticky; top: 6rem; }
}

/* ───────── Records (document pages) ───────── */
.doc { display: grid; gap: var(--space-4); padding: var(--space-4) var(--gutter) var(--space-6); }
.record {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--line);
}
.record__ref { font-family: var(--mono); font-size: 0.75rem; color: var(--ink); padding: 0.2rem 0.5rem; background: var(--raise); border-radius: 4px; }
.record__meta { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); }

.doc__head { display: grid; gap: var(--space-2); }
.doc__glyph { width: 52px; height: 52px; color: var(--ink); overflow: visible; }
.js .doc__glyph { stroke-dasharray: 1; animation: glyph-draw 1800ms var(--ease-out) 150ms both; }
@keyframes glyph-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.doc__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 5.25rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}
.doc__meta { margin: 0; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.02em; color: var(--ink-soft); }
.doc__lede { margin: 0; max-width: 52ch; font-size: 1.1875rem; line-height: 1.5; color: var(--ink); }

.doc__aside { display: grid; gap: var(--space-3); align-content: start; }
.props {
  margin: 0;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}
.props div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.75rem; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); }
.props div:last-child { border-bottom: 0; }
.props dt { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.02em; color: var(--ink-soft); }
.props dd { margin: 0; font-size: 0.875rem; }

.doc__body { max-width: 46rem; min-width: 0; }
.doc__body h2 {
  margin: var(--space-5) 0 var(--space-2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  scroll-margin-top: 5.5rem;
}
.doc__body h2::before { content: ""; width: 1.25rem; height: 2px; background: var(--oxblood); flex: none; }
.doc__body h3 { margin: var(--space-3) 0 0.5rem; font-family: var(--display); font-size: 1.125rem; letter-spacing: -0.01em; }
.doc__body p:where(:not(.ticket p)), .doc__body li { max-width: 68ch; color: #DCD4C5; }
.doc__body strong { color: var(--ink); }
.doc__body p:where(:not(.ticket p)) { margin: 0 0 1rem; }
.doc__body ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.doc__body li { margin-bottom: 0.45rem; }
.doc__body li::marker { color: var(--oxblood); }
.doc__body a:where(:not(.ticket a)) { color: var(--ink); background: linear-gradient(var(--oxblood), var(--oxblood)) no-repeat 0 100% / 100% 1px; }

.note {
  margin: var(--space-3) 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--oxblood);
  border-radius: 0 8px 8px 0;
  background: var(--panel);
  font-size: 0.9375rem;
}
.note strong { font-family: var(--display); }
.note p:last-child { margin-bottom: 0; }

.tag {
  display: inline-block;
  margin: 0.3rem 0.25rem 0 0;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.tag--warn { border-color: rgba(180, 85, 63, 0.55); color: #E3A08F; }

/* contents, generated by pass.js (desktop only) */
.toc-wrap { display: none; }
.toc__title { margin: 0 0 0.75rem; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.04em; color: var(--ink-soft); }
.toc { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { position: relative; display: block; padding: 0.4rem 0 0.4rem 1rem; font-size: 0.875rem; line-height: 1.35; color: var(--ink-soft); transition: color 300ms ease; }
.toc a::before { content: ""; position: absolute; left: -1px; top: 0.35rem; bottom: 0.35rem; width: 2px; background: var(--oxblood); scale: 1 0; transition: scale 400ms var(--ease-out); }
.toc a:hover, .toc a.is-active { color: var(--ink); }
.toc a.is-active::before { scale: 1 1; }

/* timeline steps */
.steps { list-style: none; margin: 0 0 var(--space-2); padding: 0; position: relative; border-top: 1px solid var(--line-strong); }
.doc__body { counter-reset: step; }  /* numbering runs on across the parts of a page */
.steps::before, .steps::after { content: ""; position: absolute; left: calc(0.95rem - 0.5px); top: 2.2rem; bottom: 2.2rem; width: 1px; background: var(--line-strong); }
.steps::after { background: var(--oxblood); transform-origin: top center; transform: scaleY(var(--fill, 0)); }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); max-width: none; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 1.9rem; height: 1.9rem;
  border: 1px solid var(--oxblood);
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: #E3A08F;
  transition: background-color 400ms ease, color 400ms ease;
}
.steps > li.is-past::before { background: var(--oxblood); color: var(--ink); }
.steps h3 { grid-column: 2; margin: 0 0 0.35rem; scroll-margin-top: 5.5rem; }
.steps > li > p, .steps > li > ul { grid-column: 2; margin-bottom: 0; }

/* timing cues and phrases to use */
.cue {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.75rem 0 0 !important;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: #E3A08F !important;
}
.cue svg { width: 18px; height: 18px; flex: none; color: var(--ink-soft); }
.say {
  grid-column: 2;
  margin: 0.9rem 0 0;
  padding: 0.85rem 1.1rem;
  border-left: 2px solid var(--oxblood);
  background: var(--panel);
  border-radius: 0 8px 8px 0;
}
.say p { margin: 0 !important; font-size: 0.9375rem; font-style: italic; color: var(--ink) !important; }
.say::before { content: "Say it like this"; display: block; margin-bottom: 0.35rem; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.02em; color: var(--ink-soft); }
.steps > li > .cue { grid-column: 2; }

/* scenarios: a practice deck */
.rig--solo { justify-self: start; margin: 0 0 var(--space-5); }
.scens { list-style: none; margin: 0 0 var(--space-4); padding: 0; border-top: 1px solid var(--line-strong); }
.doc__body .scen { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); max-width: none; margin: 0; padding: 1.35rem 0 1.1rem; border-bottom: 1px solid var(--line); scroll-margin-top: 5.5rem; }
.scen__no { grid-row: 1 / span 3; margin: 0 !important; padding-top: 0.2rem; font-family: var(--display); font-weight: 300; font-size: 0.875rem; color: var(--ink-soft) !important; }
.doc__body .scen__title { grid-column: 2; margin: 0 0 0.4rem; font-weight: 400; font-size: 1.25rem; letter-spacing: -0.015em; }
.doc__body .scen__sit { grid-column: 2; margin: 0 0 0.6rem; color: var(--ink); }
.scen__ans { grid-column: 2; }
.scen__ans summary { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.3rem 0; font-size: 0.875rem; color: var(--ink-soft); cursor: pointer; list-style: none; transition: color 300ms ease; }
.scen__ans summary::-webkit-details-marker { display: none; }
.scen__ans summary::before { content: ""; width: 0.9rem; height: 1px; background: var(--oxblood); transition: width 400ms var(--ease-out); }
.scen__ans summary:hover, .scen__ans[open] summary { color: var(--ink); }
.scen__ans[open] summary::before { width: 1.6rem; }
.scen__body { padding: 0.6rem 0 0.4rem; animation: def-in 500ms var(--ease-out); }
.scen__body > p { margin-bottom: 0 !important; }
.scen:target .scen__title { color: #E3A08F; }

/* briefing: privacy */
.privacy { margin-bottom: var(--space-4); }
.doc__body .privacy ul { margin: 0.4rem 0 1rem; }
.doc__body .privacy li { margin-bottom: 0.55rem; }
.sheet__confidential { margin: var(--space-3) 0 0; padding-top: 0.9rem; border-top: 1px solid var(--line); font-size: 0.75rem; letter-spacing: 0.02em; color: var(--ink-soft) !important; }

/* glossary */
.gloss__tools { display: grid; gap: var(--space-2); }
.gloss__tabs { display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 3px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); justify-self: start; }
.gloss__tab {
  min-height: 40px;
  padding: 0 1rem;
  border: 0;
  border-radius: 7px;
  background: none;
  font: inherit;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 300ms ease, color 300ms ease;
}
.gloss__tab[aria-selected="true"] { background: var(--raise); color: var(--ink); box-shadow: inset 0 -2px 0 var(--oxblood); }
.gloss__search {
  width: 100%;
  min-height: 46px;
  padding: 0 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
}
.gloss__search::placeholder { color: var(--ink-soft); opacity: 0.7; }
.gloss__search:focus-visible { outline: none; border-color: var(--oxblood); box-shadow: 0 0 0 4px rgba(180, 85, 63, 0.12); }
.gloss__count { margin: 0; font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); }
.gloss__list { margin: 0; border-top: 1px solid var(--line-strong); }
.gloss__item { display: grid; gap: 0.3rem 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 6rem; transition: background-color 600ms ease; }
.gloss__item[hidden], .gloss__panel[hidden] { display: none; }
.gloss__item dt { font-family: var(--display); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; }
.gloss__item dt small { display: block; margin-top: 0.15rem; font-family: var(--mono); font-weight: 400; font-size: 0.6875rem; color: var(--ink-soft); }
.gloss__item dd { margin: 0; max-width: 62ch; color: #DCD4C5; }
.gloss__item:not([hidden]) { animation: term-in 420ms var(--ease-out); }
.gloss__item.is-flash { background: rgba(180, 85, 63, 0.14); }
@keyframes term-in { from { opacity: 0; translate: 0 6px; } }

/* briefing sheet */
.sheet { border-top: 1px solid var(--line-strong); }
.sheet__row { display: grid; gap: 0.35rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.sheet__row label { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.04em; color: var(--ink-soft); }
.sheet__row input, .sheet__row textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px dashed var(--line-strong);
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 0.35rem 0;
  resize: vertical;
}
.sheet__row textarea { min-height: 4.5rem; line-height: 1.6; }
.sheet__row input::placeholder, .sheet__row textarea::placeholder { color: var(--ink-soft); opacity: 0.55; }
.sheet__row input:focus-visible, .sheet__row textarea:focus-visible { outline: none; border-bottom: 1px solid var(--oxblood); }
.sheet__pair { display: grid; gap: 0 1.5rem; }
.sheet__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.sheet__saved { margin: 0; min-height: 1.2em; font-family: var(--mono); font-size: 0.75rem; color: #E3A08F; transition: opacity 400ms ease; }
.sheet__note { margin-top: 0.5rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 46px;
  padding: 0 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 300ms ease, background-color 300ms ease;
}
.btn:hover, .btn:focus-visible { border-color: var(--oxblood); background: var(--raise); }
.btn[data-print] { background: var(--oxblood); border-color: var(--oxblood); }
.btn[data-print]:hover { background: #C4644D; }

/* podcast + empty states */
.empty { padding: var(--space-4); border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--ink-soft); }
.empty p { margin: 0 0 0.5rem; }
.empty p:last-child { margin: 0; }
.pass .listen { margin-top: var(--space-3); }
.pass .listen li { clip-path: none; }
.pass .listen__btn { border-color: var(--line-strong); border-radius: 8px; background: var(--panel); }
.pass .listen__btn:hover { background: var(--raise); color: var(--ink); border-color: var(--oxblood); }

/* ───────── Sauces & condiments: master list ───────── */
.doc--wide .doc__body { max-width: none; }
@media (min-width: 1024px) { .doc.doc--wide { grid-template-columns: minmax(0, 1fr); } }
.sauce-tools { position: sticky; top: 60px; z-index: 5; display: grid; gap: 0.75rem; padding: 1rem 0; margin-bottom: 0.5rem; background: color-mix(in srgb, var(--paper) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sauce-tools .gloss__search { max-width: 30rem; }
.sauce-uses { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chipbtn {
  min-height: 36px;
  padding: 0 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease;
}
.chipbtn:hover { color: var(--ink); border-color: var(--ink-soft); }
.chipbtn[aria-pressed="true"] { background: var(--raise); color: var(--ink); border-color: var(--oxblood); }
.sauce-tools .gloss__tab[aria-pressed="true"] { background: var(--raise); color: var(--ink); box-shadow: inset 0 -2px 0 var(--oxblood); }

.sauce { width: 100%; border-collapse: collapse; }
.sauce thead { display: none; }
.sauce th, .sauce td { text-align: left; vertical-align: top; }
.sauce__fam th { padding: 2rem 0 0.6rem; }
.sauce__fam span { display: inline-flex; align-items: center; gap: 0.75rem; font-family: var(--display); font-size: 1.125rem; font-weight: 700; letter-spacing: -0.015em; }
.sauce__fam span::before { content: ""; width: 1.25rem; height: 2px; background: var(--oxblood); }
.sauce__row { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1rem; padding: 1rem 0; border-top: 1px solid var(--line); scroll-margin-top: 13rem; transition: background-color 600ms ease; }
.sauce__row[hidden], .sauce__group[hidden] { display: none; }
.sauce__row.is-flash { background: rgba(180, 85, 63, 0.14); }
.sauce__row th { font-weight: 400; }
.sauce__row th strong { display: block; font-family: var(--display); font-size: 1.0625rem; letter-spacing: -0.01em; }
.sauce__row th small { display: block; margin-top: 0.1rem; font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-soft); }
.sauce__cu { font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-soft); padding-top: 0.2rem; }
.sauce__use, .sauce__desc, .sauce__alg { grid-column: 1 / -1; }
.sauce__desc { font-size: 0.9375rem; line-height: 1.55; color: #DCD4C5; max-width: 62ch; }
.use {
  display: inline-block;
  margin: 0 0.3rem 0.2rem 0;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: var(--raise);
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink);
  white-space: nowrap;
}
.use--dip::before, .use--cook::before, .use--table::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 0.4rem; border-radius: 50%; vertical-align: 0.05em; }
.use--dip::before { background: #E3A08F; }
.use--cook::before { background: var(--ink-soft); }
.use--table::before { border: 1px solid var(--ink-soft); width: 5px; height: 5px; }
.sauce__alg .tag { margin-top: 0; }
.tag--none { border-style: dashed; }
.sauce__empty { margin: 2rem 0; color: var(--ink-soft); }

@media (min-width: 900px) {
  .sauce thead { display: table-header-group; }
  .sauce thead th { padding: 0.6rem 1rem 0.6rem 0; font-family: var(--mono); font-weight: 400; font-size: 0.6875rem; letter-spacing: 0.04em; color: var(--ink-soft); border-bottom: 1px solid var(--line-strong); background: var(--paper); }
  .sauce__row { display: table-row; padding: 0; }
  .sauce__row > * { padding: 1rem 1rem 1rem 0; border-top: 1px solid var(--line); }
  .sauce__row th { width: 15rem; }
  .sauce__cu { width: 6rem; padding-top: 1.15rem !important; }
  .sauce__use { width: 9rem; }
  .sauce__alg { width: 13rem; }
  .sauce__use .use { display: block; width: max-content; margin-bottom: 0.3rem; }
}

/* ───────── Search palette ───────── */
.palette {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: 12vh var(--gutter) var(--gutter);
  background: rgba(8, 7, 6, 0.65);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.palette[hidden] { display: none; }
.palette__box {
  width: min(100%, 640px);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(237, 230, 216, 0.03);
  overflow: hidden;
  animation: palette-in 260ms var(--ease-out);
}
@keyframes palette-in { from { opacity: 0; translate: 0 -8px; scale: 0.985; } }
.palette__field { display: flex; align-items: center; gap: 0.75rem; padding: 0 1rem; border-bottom: 1px solid var(--line); }
.palette__field svg { width: 18px; height: 18px; color: var(--ink-soft); flex: none; }
.palette__field input {
  flex: 1;
  min-width: 0;
  min-height: 58px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.0625rem;
  color: var(--ink);
}
.palette__field input:focus { outline: none; }
.palette__field input::-webkit-search-cancel-button { display: none; }
.palette__results { list-style: none; margin: 0; padding: 0.5rem; max-height: min(56vh, 460px); overflow-y: auto; }
.palette__results li a {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.15rem 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
}
.palette__results li[aria-selected="true"] a { background: var(--raise); box-shadow: inset 2px 0 0 var(--oxblood); }
.palette__kind { grid-row: span 2; padding-top: 0.15rem; font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-soft); }
.palette__title { font-weight: 500; color: var(--ink); }
.palette__ctx { font-size: 0.8125rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette__results mark { background: none; color: #E3A08F; }
.palette__empty { padding: 1.5rem 0.75rem; color: var(--ink-soft); font-size: 0.9375rem; }
.palette__hint { display: none; margin: 0; padding: 0.6rem 1rem; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-soft); gap: 1.25rem; }
.palette__hint kbd { margin-right: 0.2rem; }

/* ───────── Breakpoints ───────── */
@media (min-width: 640px) {
  .records thead { display: table-header-group; }
  .records tbody tr { display: table-row; border-bottom: 0; }
  .records td { padding: 1.1rem 1rem 1.1rem 0; vertical-align: top; border-bottom: 1px solid var(--line); }
  .records__type, .records__size { padding-top: 1.35rem !important; white-space: nowrap; }
  .records__name { width: 100%; }
  .top__search-label, .top__search kbd { display: inline; }
  .palette__hint { display: flex; }
  .sheet__pair { grid-template-columns: 1fr 1fr; }
  .gloss__item { grid-template-columns: 13rem minmax(0, 1fr); }
  .vault { grid-template-columns: auto 1fr auto; }
  .vault .chip { grid-column: auto; }
}

@media (min-width: 1024px) {
  .side { translate: 0 0; width: var(--side-w); }
  .scrim { display: none !important; }
  .stage { margin-left: var(--side-w); }
  .top__menu, .top__brand { display: none; }
  .top__crumb { display: block; }
  .lib-hero { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; column-gap: var(--space-4); }
  .lib-hero__title, .lib-hero__rule { grid-column: 1 / -1; }
  .lib-hero__text { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-4); align-items: end; padding-top: 0.25rem; }
  .define { grid-column: 1 / span 7; }
  .lib-hero__side { grid-column: 9 / -1; margin-top: 0; }
  .lib-hero__search { width: 100%; }

  .doc { grid-template-columns: minmax(0, 1fr) 260px; column-gap: clamp(2rem, 4vw, 4rem); }
  .doc__head { grid-column: 1 / -1; }
  .doc__body { grid-column: 1; grid-row: 2; }
  .doc__aside { grid-column: 2; grid-row: 2; position: sticky; top: 5.5rem; align-self: start; }
  .toc-wrap { display: block; }
}

@media (max-width: 1023px) {
  .doc__aside .props { display: none; }   /* phones: the record bar carries the essentials */
}


/* ═════════ Quiet edition — editorial restraint across The Pass ═════════
   Lighter room, softer light, regular-weight type, rules instead of boxes. */

body.pass {
  --paper: #26231F;
  --panel: #2A2723;
  --raise: #312E29;
  --ink: #EFE9DD;
  --ink-soft: #ACA497;          /* 6.1:1 on the room */
  --line: #36322D;
  --line-strong: #474239;
  --mono: "Helvetica Neue", Helvetica, Arial, sans-serif;   /* labels go quiet; true mono only where it is authentic */
  background: linear-gradient(180deg, #2B2824 0%, #26231F 38%, #221F1C 100%) fixed;
}
body.pass::before { opacity: 0.018; }
body.pass::after {
  /* a warm core that tightens over links, and a wide ambient pool that trails behind it */
  background:
    radial-gradient(calc(170px - var(--focus, 0) * 50px) circle at var(--mx, 72%) var(--my, 16%),
      rgba(232, 176, 132, calc(0.065 + var(--focus, 0) * 0.03)), transparent 72%),
    radial-gradient(460px circle at var(--ax, 72%) var(--ay, 16%), rgba(214, 160, 120, 0.028), transparent 72%);
  opacity: var(--glow, 1);
}
.ticket, .ticket *, kbd, .palette__kind { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; }
.ticket__term { font-family: var(--display) !important; }

/* labels: small, quiet, sentence case */
.side__label, .side__by, .side__time, .top__crumb, .lib__note, .doc__meta, .toc__title, .gloss__count,
.cover__mast, .cover__stand, .cover__inside, .line__meta, .disclaimer, .props dt, .sheet__row label,
.sauce__cu, .sauce__row th small, .gloss__item dt small, .tag, .use, .cue, .seg {
  letter-spacing: 0.01em;
}
.side__label, .cover__mast, .cover__inside, .toc__title { font-size: 0.75rem; }
.line__meta { font-size: 0.8125rem; }

/* editorial type: regular weight, generous air */
.lib-hero__title, .doc__title, .cover__title, .lib__title, .coll__title, .doc__body h2, .sauce__fam span { font-weight: 400; }
.lib-hero__title {
  font-size: calc((100vw - 2 * var(--gutter)) / 4.15);
  font-size: calc(100cqi / 4.1);
  letter-spacing: -0.04em;
}
.doc__title { letter-spacing: -0.035em; line-height: 1; }
.cover__title { letter-spacing: -0.035em; font-size: min(4.5rem, 14cqi); }
.lib__title { font-size: 1.375rem; letter-spacing: -0.02em; }
.doc__body h2 { font-size: 1.625rem; letter-spacing: -0.02em; }
.line__name, .records__name strong, .vault__text strong, .houses__name, .steps h3, .gloss__item dt, .sauce__row th strong { font-weight: 500; }
.lib-hero__lede, .doc__lede { font-weight: 300; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.6; }
.doc__body p:where(:not(.ticket p)), .doc__body li, .gloss__item dd, .sauce__desc { line-height: 1.7; }
.lib { padding-top: var(--space-5); padding-bottom: var(--space-6); }
.lib__title::before, .coll__title::before, .doc__body h2::before, .sauce__fam span::before { height: 1px; }

/* rules instead of boxes */
.cover {
  min-height: 0;
  padding: 1.25rem 0 0;
  border: 0;
  border-top: 1px solid var(--ink-soft);
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.cover:hover { transform: none; border-color: var(--ink); box-shadow: none; }
.cover__mast { border-bottom: 0; padding-bottom: 0; }
.cover__art { top: 3.25rem; right: 0; width: clamp(120px, 34%, 190px); opacity: 0.08; }
.cover:hover .cover__art { opacity: 0.14; transform: none; }
.cover__title { margin-top: 2rem; }
.cover__inside { padding-top: 3rem; }
.cover--soon { background: none; }
.covers { gap: var(--space-5) var(--space-5); }
.js .lib .cover { transition: opacity 1000ms ease, translate 1200ms var(--ease-out), border-color 400ms ease; transition-delay: calc(150ms + var(--n) * 120ms), calc(150ms + var(--n) * 120ms), 0ms; }

.vault { border: 0; border-top: 1px solid var(--ink-soft); border-radius: 0; background: none; padding: 1.5rem 0 0; }
.vault:hover, .vault:focus-visible { transform: none; border-color: var(--ink); }
.chip { border-radius: 2px; }

a.line:hover .line__name, a.line:focus-visible .line__name { transform: none; color: var(--ink); }

/* softer controls */
.btn, .ticket__btn, .pass .listen__btn, .gloss__tab, .gloss__tabs, .gloss__search, .top__search, .palette__box, .props, .note, .say, .empty, .side__link, .chipbtn { border-radius: 2px; }
.gloss__tabs { background: none; border-color: var(--line); }
.gloss__search, .top__search { background: transparent; }
.btn { background: transparent; }
.btn[data-print] { background: var(--oxblood); }
.note, .say { background: none; }
.side { background: #23201C; }
.side__link:hover, .side__link.is-active { background: rgba(239, 233, 221, 0.05); }
.top { background: color-mix(in srgb, #2B2824 82%, transparent); }
.printer { border-radius: 4px; }

/* chopsticks, pointing the way */
.chop { width: 0.95em; height: 0.95em; vertical-align: -0.1em; margin-left: 0.25em; color: currentColor; transition: transform 500ms var(--ease-out); }
a:hover .chop, a:focus-visible .chop { transform: translate(2px, -2px); }
.pass .listen__btn .chop { width: 14px; height: 14px; margin: 0; }
.ticket__open .chop { color: #7A2E22; }

/* ───────── Print: clean sheets ───────── */
@media print {
  body.pass { --paper: #fff; --ink: #000; --ink-soft: #444; --line: #ccc; --line-strong: #999; background: #fff; color: #000; }
  body.pass::before, body.pass::after, .side, .top, .scrim, .palette, .disclaimer, .doc__aside, .doc__glyph, .record, .sheet__actions { display: none !important; }
  .stage { margin: 0 !important; }
  .doc { padding: 0; display: block; }
  .doc__title { font-size: 28pt; }
  .doc__body p, .doc__body li, .gloss__item dd { color: #000; }
  .privacy { display: none !important; }
  .sheet__confidential { color: #000 !important; border-top: 1px solid #999; font-size: 8pt; }
  .sheet__row { break-inside: avoid; padding: 6pt 0; }
  .sheet__row input, .sheet__row textarea { border-bottom: 1px solid #999; }
  .sheet__row input::placeholder, .sheet__row textarea::placeholder { color: transparent; }
  .steps > li, .gloss__item { break-inside: avoid; }
  .steps > li::before { background: #fff; color: #000; }
}

/* motion preferences: no candlelight drift, no drawer slide */
@media (prefers-reduced-motion: reduce) {
  .cover, .cover__art { transition: none; }
  .rig.is-printing .ticket, .rig.is-printing .printer__led { animation: none; }
  body.pass::after { display: none; }
  .side { transition: none; }
}

/* ───────── Library hero, phones only: a calmer, more editorial opening ───────── */
@media (max-width: 767px) {
  .lib-hero { padding-bottom: var(--space-5); }
  .lib-hero__rule { margin: 1.75rem 0 3rem; }

  .define__entry { gap: 0.25rem 0.75rem; margin-bottom: 1.25rem; }
  .define__word { font-size: 1.25rem; letter-spacing: -0.02em; }
  .define__ipa, .define__pos { font-size: 0.8125rem; }

  .define__body {
    max-width: 27ch;
    margin-bottom: 0;
    font-size: 1.1875rem;
    line-height: 1.55;
    letter-spacing: -0.01em;
    color: rgba(239, 233, 221, 0.92);
    text-wrap: pretty;
  }

  .lib-hero .lib-hero__lede {
    max-width: 31ch;
    margin-top: 2rem;
    padding-top: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.75;
    text-wrap: pretty;
    background: linear-gradient(rgba(239, 233, 221, 0.18), rgba(239, 233, 221, 0.18)) no-repeat 0 0 / 1.5rem 1px;
  }

  .lib-hero__side { gap: 1.75rem; margin-top: 3.5rem; }
  .shift { gap: 0.5rem; padding: 1.1rem 1.15rem 1.15rem; border-radius: 16px; }
  .shift__now { font-size: 0.6875rem; }
  .shift__line { font-size: 1.0625rem; line-height: 1.4; }
  .shift__go { font-size: 0.75rem; }
  .lib-hero__search { min-height: 48px; font-size: 0.9375rem; }
}
