/* Counterline, the surviving restaurant direction. One kitchen at lunch:
   the letterboard above the pass, thermal paper, brushed steel, one heat lamp. */

.restaurant-study {
  --r-space-1: .5rem;
  --r-space-2: 1rem;
  --r-space-3: 1.5rem;
  --r-space-4: 2rem;
  --r-space-5: 3rem;
  --r-space-6: 4.5rem;
  --r-space-7: 7rem;
  --r-ease: cubic-bezier(.23, 1, .32, 1);
  --r-ease-move: cubic-bezier(.77, 0, .175, 1);
  /* Counterline follows the visitor's system theme; shared chrome follows it too. */
  color-scheme: light dark;
  margin: 0;
  min-width: 0;
  line-height: 1.5;
}

.restaurant-study * { box-sizing: border-box; }
.restaurant-study a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .2em; }
.restaurant-study a:focus-visible,
.restaurant-study button:focus-visible { outline: .18rem solid var(--counter-amber); outline-offset: .24rem; }
.restaurant-study header a {
  align-items: center;
  display: inline-flex;
  min-block-size: 24px;
}
.restaurant-study ::selection { background: var(--counter-amber); color: var(--counter-black); }
.restaurant-study .skip-link {
  left: var(--r-space-2);
  padding: var(--r-space-1) var(--r-space-2);
  position: fixed;
  top: -4rem;
  transition: none;
  z-index: 10;
}
.restaurant-study .skip-link:focus { top: var(--r-space-2); transform: none; }
.restaurant-study .site-shell { width: var(--qb-content-width); margin-inline: auto; }
.restaurant-study .study-note { font-size: .875rem; line-height: 1.45; max-width: 46rem; }
.restaurant-study .button-link {
  align-items: center;
  background: var(--counter-amber);
  color: var(--counter-black);
  display: inline-flex;
  font-weight: 700;
  gap: .6rem;
  justify-content: center;
  min-height: 3rem;
  padding: .75rem 1.1rem;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease, transform 120ms var(--r-ease);
}
.restaurant-study .button-link::after { content: "\2192"; font-size: 1.15em; line-height: 1; }
.restaurant-study .button-link:hover { background: var(--counter-amber-hot); }
.restaurant-study .button-link:active { transform: scale(.97); }
.restaurant-study .section-title { letter-spacing: -.02em; line-height: .96; margin: 0; text-transform: uppercase; }
.restaurant-study .section-copy { font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 36rem; }
.restaurant-study .study-hero-media { display: block; min-width: 0; }
.restaurant-study .study-hero-media img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

/* Palette: the kitchen at lunch. Paper is the page, black is the board,
   steel is the working surface, amber is the heat lamp and the only action. */
.counterline {
  --counter-black: #141311;
  --counter-black-soft: #1f1d19;
  --counter-paper: #f3f0e8;
  --counter-ink: #141311;
  --counter-mute: #5d5c57;
  --counter-steel: #cfd0cb;
  --counter-steel-deep: #a9aaa5;
  --counter-rule: color-mix(in srgb, var(--counter-ink) 22%, transparent);
  --counter-amber: #f0a030;
  --counter-amber-hot: #f7b24a;
  --counter-board-ink: #f3f0e8;
  --counter-board-mute: #a9aaa5;
  --counter-choice: #faf8f1;
  --ticket-paper: #faf8f1;
  --ticket-ink: #141311;
  --ticket-faint: #4f4e49;
  --ticket-rule: color-mix(in srgb, #141311 22%, transparent);
  background: var(--counter-paper);
  color: var(--counter-ink);
  font-family: var(--font-body);
}
.counterline .skip-link { background: var(--counter-amber); color: var(--counter-black); }

.counterline .counter-name,
.counterline .section-title,
.counterline .counter-board-name,
.counterline .counter-board-price,
.counterline .counter-handoff-title { font-family: var(--business-font-counterline); font-weight: 400; }

.counterline .counter-eyebrow {
  color: var(--counter-mute);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  margin: 0 0 var(--r-space-2);
  text-transform: uppercase;
}

/* Topbar: the shop's own strip, sitting clear of the fixed back control. */
.counterline .counter-topbar {
  align-items: center;
  border-bottom: .12rem solid var(--counter-ink);
  display: flex;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 700;
  gap: var(--r-space-2);
  justify-content: space-between;
  letter-spacing: .08em;
  padding: 1rem 0 1rem var(--qb-back-overlap-clear);
  text-transform: uppercase;
}
.counterline .counter-topbar-name { margin: 0; }
.counterline .counter-topbar-name span { color: var(--counter-mute); font-weight: 400; margin-left: .6em; }
.counterline .counter-nav { display: flex; gap: var(--r-space-3); }
.counterline .counter-nav a { text-decoration: none; }
.counterline .counter-nav a:hover { text-decoration: underline; }

/* Hero: the board is the thesis. Black letterboard left, the plate right,
   the photo unwashed. */
.counterline .counter-hero { padding: var(--r-space-4) 0 0; }
.counterline .counter-hero-stage {
  display: grid;
  gap: var(--r-space-3);
  grid-template-areas: "board plate";
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
/* The plate takes the board's height: the board decides, the photo fills. */
.counterline .counter-hero-stage .study-hero-media { grid-area: plate; height: 100%; min-height: 0; overflow: clip; }
.counterline .counter-hero-stage .study-hero-media img { object-position: center 55%; }
.counterline .counter-hero-overlay { grid-area: board; display: grid; min-width: 0; }
.counterline .counter-board {
  background: var(--counter-black);
  color: var(--counter-board-ink);
  display: grid;
  gap: var(--r-space-3);
  grid-template-rows: auto auto 1fr auto;
  min-width: 0;
  padding: var(--r-space-3) var(--r-space-4) var(--r-space-4);
  position: relative;
}
.counterline .counter-board::before {
  background: repeating-linear-gradient(90deg, transparent 0 .55rem, color-mix(in srgb, var(--counter-board-ink) 9%, transparent) .55rem .6rem);
  content: "";
  inset: 0 0 auto;
  height: .55rem;
  position: absolute;
}
.counterline .counter-board-rail {
  color: var(--counter-board-mute);
  display: flex;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: .14em;
  margin: 0;
  text-transform: uppercase;
}
.counterline .counter-name {
  font-size: clamp(3.4rem, 7vw, 6.4rem);
  letter-spacing: -.01em;
  line-height: .88;
  margin: 0;
  text-transform: uppercase;
}
.counterline .counter-board-list { align-content: start; display: grid; gap: .45rem; margin: var(--r-space-2) 0; padding: 0; }
.counterline .counter-board-item { align-items: baseline; display: flex; gap: .7rem; list-style: none; min-width: 0; }
.counterline .counter-board-item--side { border-top: .08rem solid color-mix(in srgb, var(--counter-board-ink) 28%, transparent); margin-top: .45rem; padding-top: .8rem; }
.counterline .counter-board-name {
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  letter-spacing: .01em;
  line-height: 1.05;
  text-transform: uppercase;
  white-space: nowrap;
}
.counterline .counter-leader { border-bottom: .14rem dotted color-mix(in srgb, var(--counter-board-ink) 38%, transparent); flex: 1; min-width: 1.5rem; transform: translateY(-.35em); }
.counterline .counter-board-price { font-size: clamp(1.6rem, 2.5vw, 2.4rem); font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1.05; }
.counterline .counter-board-foot {
  align-items: end;
  border-top: .12rem solid var(--counter-amber);
  display: grid;
  gap: var(--r-space-3);
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: var(--r-space-3);
}
.counterline .counter-promise {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
  max-width: 24rem;
}

/* Builder: the steel working surface. Rows read like the board, the ticket
   prints beside them. */
.counterline .counter-builder { background: var(--counter-steel); padding: var(--r-space-6) 0 var(--r-space-6); }
.counterline .counter-builder-layout { display: grid; gap: var(--r-space-3); }
.counterline .counter-order-form {
  align-items: start;
  display: grid;
  gap: var(--r-space-4) var(--r-space-5);
  grid-template-columns: minmax(0, 1.2fr) minmax(17rem, .8fr);
}
.counterline .counter-builder-head { grid-column: 1; }
.counterline .counter-builder .section-title { font-size: clamp(2.6rem, 4.6vw, 4.4rem); max-width: 14ch; }
.counterline .counter-order-form fieldset { border: 0; border-top: .12rem solid var(--counter-ink); grid-column: 1; margin: 0; padding: var(--r-space-2) 0 0; }
.counterline .counter-order-form legend {
  align-items: baseline;
  display: flex;
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 700;
  gap: .8rem;
  letter-spacing: .12em;
  padding: 0;
  text-transform: uppercase;
}
.counterline .counter-legend-step { color: var(--counter-mute); }
.counterline .counter-choice-grid { display: grid; gap: .45rem; grid-template-columns: 1fr; margin-top: var(--r-space-2); }
.counterline .counter-choice {
  align-items: center;
  background: var(--counter-choice);
  border: .09rem solid transparent;
  display: grid;
  gap: .85rem;
  grid-template-columns: auto 1fr;
  min-width: 0;
  padding: .75rem .9rem;
  position: relative;
  transition: border-color 120ms ease, background-color 120ms ease, transform 100ms var(--r-ease);
}
@media (hover: hover) and (pointer: fine) {
  .counterline .counter-choice:hover { border-color: var(--counter-ink); }
}
.counterline .counter-choice:active { transform: scale(.985); }
.counterline .counter-choice:has(input:checked) { border-color: var(--counter-amber); box-shadow: inset .3rem 0 0 var(--counter-amber); }
.counterline .counter-choice input { accent-color: var(--counter-ink); block-size: 1.1rem; inline-size: 1.1rem; margin: 0; }
.counterline .counter-choice input:focus-visible { outline: .18rem solid var(--counter-amber); outline-offset: .2rem; }
.counterline .counter-choice label {
  align-items: center;
  column-gap: var(--r-space-2);
  cursor: pointer;
  display: grid;
  font-weight: 700;
  grid-template-columns: minmax(0, 1fr) auto;
  line-height: 1.2;
  min-width: 0;
}
.counterline .counter-choice label::before { content: ""; inset: 0; position: absolute; }
.counterline .counter-choice-price {
  color: var(--counter-ink);
  font-family: var(--font-mono);
  font-size: .9rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  grid-column: 2;
  grid-row: 1 / span 2;
  text-align: right;
}
.counterline .counter-choice label span { color: var(--counter-mute); display: block; font-size: .84rem; font-weight: 400; grid-column: 1; line-height: 1.35; margin-top: .2rem; }

/* The ticket. Thermal paper is an object, so it stays light in both schemes:
   a print head line at the top, a torn edge at the foot, a sticky position
   so it never leaves the visitor's hand while they choose. */
.counterline .counter-receipt {
  align-self: start;
  background: var(--ticket-paper);
  box-shadow: 0 .6rem 1.6rem color-mix(in srgb, var(--counter-black) 26%, transparent), 0 .1rem .2rem color-mix(in srgb, var(--counter-black) 18%, transparent);
  color: var(--ticket-ink);
  display: grid;
  gap: var(--r-space-2);
  grid-column: 2;
  grid-row: 1 / span 4;
  padding: var(--r-space-3) var(--r-space-3) var(--r-space-4);
  position: sticky;
  top: var(--r-space-3);
  transition: transform 260ms var(--r-ease), box-shadow 260ms var(--r-ease);
}
.counterline .counter-receipt::before {
  background: repeating-linear-gradient(90deg, var(--ticket-ink) 0 .35rem, transparent .35rem .55rem);
  content: "";
  height: .18rem;
  inset: .55rem var(--r-space-3) auto;
  opacity: .28;
  position: absolute;
}
.counterline .counter-receipt::after,
.counterline .counter-handoff::after {
  background:
    linear-gradient(-45deg, var(--ticket-paper) .38rem, transparent 0) 0 0 / .75rem .75rem repeat-x,
    linear-gradient(45deg, var(--ticket-paper) .38rem, transparent 0) 0 0 / .75rem .75rem repeat-x;
  bottom: -.7rem;
  content: "";
  height: .75rem;
  left: 0;
  position: absolute;
  right: 0;
}
.counterline .counter-receipt.is-torn {
  box-shadow: 0 .2rem .5rem color-mix(in srgb, var(--counter-black) 18%, transparent);
  transform: rotate(-1.2deg) translateY(.3rem);
}
.counterline .counter-receipt-head {
  border-bottom: .09rem dashed var(--ticket-rule);
  color: var(--ticket-faint);
  display: flex;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: .12em;
  margin: 0;
  padding-bottom: var(--r-space-1);
  text-transform: uppercase;
}
.counterline .counter-receipt-lines { display: grid; gap: .7rem; margin: 0; padding: 0; }
.counterline .counter-receipt-line {
  align-items: baseline;
  column-gap: .6rem;
  display: grid;
  grid-template-areas: "tag tag" "name price";
  grid-template-columns: minmax(0, 1fr) auto;
  list-style: none;
  row-gap: .1rem;
}
.counterline .counter-receipt-tag {
  color: var(--ticket-faint);
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 700;
  grid-area: tag;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.counterline .counter-receipt-line b { font-family: var(--font-mono); font-size: 1.02rem; font-weight: 700; grid-area: name; letter-spacing: .01em; line-height: 1.25; }
.counterline .counter-receipt-price { font-family: var(--font-mono); font-size: .9rem; font-variant-numeric: tabular-nums; grid-area: price; }
.counterline .counter-receipt-total {
  align-items: baseline;
  border-top: .12rem solid var(--ticket-ink);
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding-top: .6rem;
}
.counterline .counter-receipt-total span { font-family: var(--font-mono); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.counterline .counter-receipt-total b { font-family: var(--font-mono); font-size: 1.35rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.counterline .counter-order-status {
  border-top: .09rem dashed var(--ticket-rule);
  color: var(--ticket-faint);
  font-family: var(--font-mono);
  font-size: .78rem;
  line-height: 1.4;
  margin: 0;
  padding-top: var(--r-space-1);
}
.counterline .counter-order-actions { align-items: center; display: flex; flex-wrap: wrap; gap: var(--r-space-1); }
.counterline .counter-reset,
.counterline .counter-handoff-open,
.counterline .counter-handoff-close {
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 2.75rem;
  padding: .6rem .9rem;
  transition: background-color 120ms ease, color 120ms ease, transform 100ms var(--r-ease);
}
.counterline .counter-reset,
.counterline .counter-handoff-close { background: transparent; border: .1rem solid var(--ticket-ink); color: var(--ticket-ink); }
.counterline .counter-reset:hover,
.counterline .counter-handoff-close:hover { background: var(--ticket-ink); color: var(--ticket-paper); }
.counterline .counter-handoff-open { background: var(--counter-amber); border: .1rem solid var(--counter-amber); color: var(--counter-black); }
.counterline .counter-handoff-open:hover { background: var(--counter-amber-hot); border-color: var(--counter-amber-hot); }
.counterline .counter-reset:active,
.counterline .counter-handoff-open:active,
.counterline .counter-handoff-close:active { transform: scale(.97); }

/* The handoff: the next segment off the same roll. It tears in under the
   builder, on the same paper, and leaves the way it came. */
.counterline .counter-handoff {
  background: var(--ticket-paper);
  box-shadow: 0 .6rem 1.6rem color-mix(in srgb, var(--counter-black) 22%, transparent);
  color: var(--ticket-ink);
  display: grid;
  gap: var(--r-space-2);
  justify-self: start;
  max-width: 40rem;
  padding: var(--r-space-3) var(--r-space-3) var(--r-space-4);
  position: relative;
  width: 100%;
}
.counterline .counter-handoff-title { font-size: clamp(1.9rem, 3.2vw, 2.7rem); letter-spacing: 0; line-height: 1; margin: 0; text-transform: uppercase; }
.counterline .counter-handoff-title:focus-visible { outline: .18rem solid var(--counter-amber); outline-offset: .3rem; }
.counterline .counter-handoff-steps { display: grid; gap: var(--r-space-2); margin: 0; padding: 0 0 0 1.2rem; }
.counterline .counter-handoff-steps li { line-height: 1.45; }
.counterline .counter-handoff-steps b { display: block; }
.counterline .counter-handoff-note { border-top: .09rem dashed var(--ticket-rule); color: var(--ticket-faint); font-family: var(--font-mono); font-size: .78rem; margin: 0; padding-top: var(--r-space-2); }
.counterline .counter-handoff-close { justify-self: start; }

/* Bridge: the one place the study speaks as itself. */
.counterline .counter-bridge { padding: var(--r-space-7) 0; }
.counterline .counter-bridge-layout { align-items: start; display: grid; gap: var(--r-space-5); grid-template-columns: minmax(0, 1.3fr) minmax(15rem, .7fr); }
.counterline .counter-bridge .section-title { font-size: clamp(2.8rem, 5.4vw, 5.4rem); }
.counterline .counter-bridge .section-copy { margin: var(--r-space-3) 0 0; }
.counterline .counter-bridge-action { margin-top: var(--r-space-4); }
.counterline .counter-bridge-facts { border-top: .12rem solid var(--counter-ink); display: grid; margin: 0; padding: 0; }
.counterline .counter-bridge-facts li { border-bottom: .08rem solid var(--counter-rule); display: grid; gap: .2rem; list-style: none; padding: var(--r-space-2) 0; }
.counterline .counter-bridge-facts span { color: var(--counter-mute); font-family: var(--font-mono); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.counterline .counter-bridge-facts b { font-weight: 600; }

@media (prefers-color-scheme: dark) {
  .counterline {
    --counter-paper: #141311;
    --counter-ink: #f3f0e8;
    --counter-mute: #a9aaa5;
    --counter-steel: #1f1d19;
    --counter-steel-deep: #6b6a64;
    --counter-rule: color-mix(in srgb, #f3f0e8 24%, transparent);
    --counter-amber: #f5a938;
    --counter-amber-hot: #ffc05a;
    --counter-choice: #2a2823;
    --counter-black: #0d0c0b;
  }
  .counterline .counter-board { box-shadow: inset 0 0 0 .08rem color-mix(in srgb, #f3f0e8 16%, transparent); }
  .counterline .counter-choice-price,
  .counterline .counter-choice label { color: var(--counter-ink); }
}

@media (max-width: 64rem) {
  .counterline .counter-board-name { font-size: clamp(1.2rem, 2.6vw, 1.8rem); }
  .counterline .counter-board-price { font-size: clamp(1.2rem, 2.6vw, 1.8rem); }
}

@media (max-width: 48rem) {
  .counterline .counter-order-form { grid-template-columns: 1fr; }
  .counterline .counter-builder-head,
  .counterline .counter-order-form fieldset { grid-column: auto; }
  .counterline .counter-receipt { grid-column: auto; grid-row: auto; position: relative; top: auto; }
  .counterline .counter-bridge-layout { grid-template-columns: 1fr; }
  .counterline .counter-board-foot { grid-template-columns: 1fr; }
}

@media (max-width: 44rem) {
  .counterline .counter-hero { padding-top: var(--r-space-3); }
  .counterline .counter-hero-stage { gap: 0; grid-template-areas: "plate" "board"; grid-template-columns: 1fr; min-height: 0; }
  .counterline .counter-hero-stage .study-hero-media { aspect-ratio: 4 / 5; }
  .counterline .counter-hero-stage .study-hero-media img { object-position: center center; }
  .counterline .counter-board { padding: var(--r-space-3) var(--r-space-3) var(--r-space-4); }
  .counterline .counter-board-name { font-size: 1.25rem; white-space: normal; }
  .counterline .counter-board-price { font-size: 1.25rem; }
  .counterline .counter-name { font-size: clamp(3rem, 14vw, 4.4rem); }
}

@media (max-width: 34rem) {
  .counterline .counter-topbar { align-items: flex-start; flex-direction: column; gap: var(--r-space-1); padding-left: var(--qb-back-overlap-clear); }
  .counterline .counter-topbar-name span { display: block; margin: .2rem 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .restaurant-study *,
  .restaurant-study *::before,
  .restaurant-study *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .counterline .counter-handoff { transition: opacity 160ms ease; }
  .counterline .counter-handoff.is-leaving,
  .counterline .counter-handoff[data-entering] { opacity: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .restaurant-study [data-world-object] img { transition: transform 900ms var(--r-ease); }
  .restaurant-study [data-world-object].is-inview img { transform: scale(1.02); }

  /* A changed ticket line re-prints: paper advancing out of the head. */
  .counterline .counter-receipt-line.is-reprinting b,
  .counterline .counter-receipt-total.is-reprinting b { animation: counter-reprint 240ms var(--r-ease); }
  .counterline .counter-handoff { transition: opacity 240ms var(--r-ease), transform 240ms var(--r-ease); }
  .counterline .counter-handoff.is-leaving,
  .counterline .counter-handoff[data-entering] { opacity: 0; transform: translateY(-.8rem); }
}

@keyframes counter-reprint {
  from { opacity: 0; transform: translateY(-.35rem); }
  to { opacity: 1; transform: translateY(0); }
}
