/* Hallmark · shape: sign head over a menu ledger, index first · genre: editorial · theme: custom · job: visit · idea: "the front of a small eatery: a string of bulbs, lit signs, menu plaques swinging on cords" · vibe: "Taipei street-sign green, heavy Ming type"
 * paper: oklch(97% 0.012 150) · accent: oklch(87% 0.17 95) · display: Chiron Sung HK · body: Chiron Hei HK · hero: one line of display type over a full-width wall of real dishes set as vertical plaques · nav: wordmark with a tagline and two text links, static, inside the green field · footer: a mast on the green field, the notice left and the shop index right · imagery: our own drawings in /art/, one for each kind of food; photographs stay banned · signature: vertical plaque names beside horizontal content
 * axes: light/high-contrast-serif/chromatic-yellow · posture: committed, the field green fills every page head and foot and the yellow stays a signal · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V5 · weakest: P, a listing has no argument of its own; the head line tells diners to read the menu first and the page proves it with typed dishes */
/* Hallmark · answered F1 · the straight apostrophe belongs to the shop name JOEY'S, printed from shop.json unchanged because shop facts are never edited */
:root {
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;
  --text-xs: 0.8125rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.125rem; --text-xl: 1.5rem; --text-2xl: 1.875rem;
  --text-display-s: clamp(2.25rem, 4vw + 0.5rem, 4rem); --text-display: clamp(3rem, 6vw + 0.75rem, 6rem);
  --text-section: clamp(2rem, 2.5vw + 1rem, 3.25rem); --text-title: clamp(1.25rem, 0.75vw + 0.875rem, 1.625rem); --text-lead: clamp(1.0625rem, 0.35vw + 1rem, 1.25rem);
  /* three plaques and their gaps must fit half a phone screen: below 24rem wide the plaque shrinks with the viewport */
  --text-plaque: min(clamp(1.5rem, 1vw + 1rem, 1.875rem), (100vw - 7rem) / 11.5); --text-plaque-price: max(1rem, var(--text-plaque) * 0.67);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-micro: 120ms; --dur-long: 420ms;
  --container: 1360px; --gutter: 64px; --gap-columns: 32px; --section-gap: 144px; --section-gap-s: 120px;
  --aside: 22rem; --head-col: 4rem; --control: 48px; --strip: 3.5rem;
  --z-base: 1; --z-sticky: 200;
  --color-paper: oklch(97% 0.012 150); --color-paper-2: oklch(93.5% 0.022 152); --color-paper-3: oklch(89% 0.035 155);
  --color-ink: oklch(21% 0.035 165); --color-ink-2: oklch(34% 0.04 165); --color-muted: oklch(45% 0.035 165);
  --color-rule: oklch(80% 0.03 160);
  --color-field: oklch(40% 0.085 160); --color-field-ink: oklch(97% 0.012 150); --color-field-muted: oklch(87% 0.045 155); --color-field-rule: oklch(55% 0.08 160);
  --color-accent: oklch(87% 0.17 95); --color-accent-2: oklch(80% 0.16 92); --color-accent-ink: oklch(23% 0.04 140); --color-focus: oklch(42% 0.10 160);
  --font-display: "Chiron Sung HK", "Songti TC", "PMingLiU", ui-serif, serif; --font-body: "Chiron Hei HK", "PingFang TC", "Microsoft JhengHei", ui-sans-serif, system-ui, sans-serif; --font-outlier: var(--font-display);
  --color-field-deep: oklch(32% 0.075 160); --color-cord: oklch(72% 0.06 155);
  --shadow-hang: 0 10px 14px -6px oklch(18% 0.06 165 / 0.55); --shadow-art: 0 6px 16px -6px oklch(18% 0.06 165 / 0.5); --glow: 0 4px 28px oklch(87% 0.17 95 / 0.6);
  --tile: 44px; --art: 3.5rem; --art-l: clamp(3.5rem, 5vw + 1.5rem, 5.5rem); --art-xl: clamp(4rem, 14vw, 14rem); --cord: 14px; --dur-swing: 1300ms; --dur-lit: 600ms;
  --radius-card: 4px; --rule-hair: 1px;
  --tracking-display: 0;
  /* local roles, swapped inside .field */
  --soft: var(--color-muted); --rule: var(--color-rule);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-muted) var(--color-paper); scroll-padding-top: var(--space-3xl); }
body { margin: 0; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.55; -webkit-font-smoothing: antialiased; caret-color: var(--color-accent); }
::selection { background: color-mix(in oklab, var(--color-accent) 22%, transparent); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-synthesis: none; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
p:not([class]) { max-width: 65ch; }
img, video { max-width: 100%; height: auto; display: block; }
svg { display: block; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); box-sizing: border-box; }
.num, .figure, td.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-slot] { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--color-paper-2, var(--color-paper)), var(--color-paper-3, var(--color-paper))); }
[data-slot] > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
[data-slot]:has(> img) > :not(img):not([data-keep]) { display: none !important; }
@media (max-width: 60rem) { :root { --gutter: 24px; --section-gap-s: 80px; --section-gap: 96px; --section-gap-l: 120px; } }
@media (max-width: 40rem) { :root { --gutter: 16px; --section-gap-s: 56px; --section-gap: 72px; --section-gap-l: 96px; --gap-columns: 16px; } }
@media (prefers-reduced-motion: reduce) { *:not(.keep-motion), *:not(.keep-motion)::before, *:not(.keep-motion)::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }

/* ---------- base additions ---------- */
html { scroll-behavior: smooth; line-break: strict; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { line-height: 1.65; }
h1, h2, h3, h4 { font-weight: 900; letter-spacing: var(--tracking-display); line-height: 1.15; }
h4 { margin: 0; font-family: var(--font-display); font-synthesis: none; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
h2 { font-size: var(--text-section); }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.ph { display: inline-block; }
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.field { background: var(--color-field); color: var(--color-field-ink); --soft: var(--color-field-muted); --rule: var(--color-field-rule); --color-focus: var(--color-accent); }
.field ::selection { background: var(--color-accent); color: var(--color-accent-ink); }
.well { background: var(--color-paper-2); }
.section { padding-block: var(--section-gap-s) 0; }
.section > h2 { margin-bottom: var(--space-xl); }
main > .well { margin-top: var(--section-gap-s); }
main > .section:last-child { padding-bottom: var(--section-gap-s); }

.skip { position: absolute; left: var(--space-md); top: var(--space-md); z-index: var(--z-sticky); padding: var(--space-sm) var(--space-md); background: var(--color-accent); color: var(--color-accent-ink); border-radius: var(--radius-card); transform: translateY(-300%); }
.skip:focus { transform: none; }

/* ---------- nav ---------- */
.nav { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); padding-block: var(--space-sm); }
.wordmark { display: inline-flex; align-items: baseline; gap: var(--space-sm); padding-block: var(--space-xs); font-family: var(--font-outlier); font-weight: 900; font-size: var(--text-xl); line-height: 1.15; text-decoration: none; }
.wordmark span { font-family: var(--font-body); font-weight: 400; font-size: var(--text-sm); color: var(--soft); }
.nav ul { display: flex; gap: var(--space-xs); margin-inline-end: calc(-1 * var(--space-xs)); }
.nav li a { display: inline-block; padding: var(--space-sm) var(--space-xs); text-decoration: none; white-space: nowrap; }
.nav li a:hover { text-decoration: underline; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: var(--control); padding-inline: var(--space-lg); border: var(--rule-hair) solid currentColor; border-radius: var(--radius-card); font-weight: 700; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.btn:hover { background: color-mix(in oklab, currentColor 12%, transparent); }
.btn:active { transform: translateY(var(--space-3xs)); }
.btn--primary { background: var(--color-accent); color: var(--color-accent-ink); border-color: var(--color-accent-ink); }
.btn--primary:hover { background: var(--color-accent-2); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* ---------- facts ---------- */
.facts { display: flex; flex-wrap: wrap; gap: var(--space-md) var(--space-xl); }
.facts > div { min-width: 0; padding-top: var(--space-xs); border-top: var(--rule-hair) solid var(--rule); }
.facts dt { font-size: var(--text-sm); color: var(--soft); }
.facts dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.facts dd span { font-weight: 400; }
.facts > div:has(> [data-hours]:empty) { display: none; }
.facts [data-state="open"] { display: inline-block; padding-inline: var(--space-xs); background: var(--color-accent); color: var(--color-accent-ink); border-radius: var(--radius-card); }

.lede { max-width: 34em; font-size: var(--text-lead); text-wrap: balance; }

/* the scalloped edge of the awning: every green head ends in it */
header.field { position: relative; z-index: var(--z-base); }
header.field::after { content: ""; position: absolute; inset: 100% 0 auto; block-size: var(--space-md); background: var(--color-field); mask: radial-gradient(circle at 50% 0, #000 calc(var(--space-md) - 1px), transparent var(--space-md)) 50% 0 / calc(var(--space-md) * 2) var(--space-md) repeat-x; }

/* going from a shop on the home page to its own page, the name and the drawing travel */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.head h1 { view-transition-name: shop-title; }
.head-art { view-transition-name: shop-art; }
::view-transition-group(shop-title), ::view-transition-group(shop-art) { animation-duration: var(--dur-long); animation-timing-function: var(--ease-out); }

/* ---------- the signature: a vertical name beside horizontal content ---------- */
.cat { display: grid; grid-template-columns: var(--head-col) minmax(0, 1fr); column-gap: var(--space-md); padding-block: var(--space-lg) var(--space-xl); border-top: var(--rule-hair) solid var(--color-ink); }
.cat-name { position: sticky; top: var(--space-lg); align-self: start; justify-self: start; writing-mode: vertical-rl; font-size: var(--text-2xl); }

/* ---------- home list ---------- */
.cat--shops .cat-name { margin-top: var(--space-lg); }


.owners { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-lg) var(--gap-columns); align-items: end; padding-block: var(--space-2xl); }
.owners p { max-width: 34em; margin-top: var(--space-md); }
.owners .actions { justify-content: flex-end; }

/* ---------- shop page ---------- */
.head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-lg) var(--space-xl); padding-block: var(--space-xl) var(--space-2xl); }
.head > * { grid-column: 1 / -1; }
.head > h1 { grid-column: 1; align-self: end; }
.head > .head-art { grid-column: 2; grid-row: 1; inline-size: var(--art-xl); block-size: var(--art-xl); border-radius: 50%; box-shadow: var(--shadow-hang); }
@media (min-width: 64.0625rem) { .head > .head-art { grid-row: 1 / span 3; align-self: center; } .head > .facts, .head > .actions { grid-column: 1; } }
.head h1 { font-size: var(--text-display-s); }
.head .facts dd { font-size: var(--text-title); }
.notice { max-width: 46em; font-size: var(--text-sm); color: var(--soft); }

.shop { display: grid; grid-template-columns: var(--aside) minmax(0, 1fr); gap: var(--space-2xl); align-items: start; padding-top: var(--space-2xl); }
.info { position: sticky; top: var(--space-lg); display: grid; gap: var(--space-xl); }
.info h2 { margin-bottom: var(--space-sm); font-size: var(--text-title); }
.info address { font-style: normal; }
.info-links { display: grid; gap: var(--space-2xs); margin-top: var(--space-sm); }
.info-links a { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: var(--control); font-weight: 700; font-variant-numeric: tabular-nums; }
.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding-block: var(--space-xs); border-bottom: var(--rule-hair) solid var(--color-rule); text-align: left; vertical-align: top; font-weight: 400; }
.hours th { width: 5em; white-space: nowrap; }
.hours td span { display: inline-block; margin-right: var(--space-sm); white-space: nowrap; }
.hours [aria-current] th span { padding: var(--space-3xs) var(--space-xs); background: var(--color-accent); color: var(--color-accent-ink); border-radius: var(--radius-card); font-weight: 700; }
.hours [aria-current] td { font-weight: 700; }
.note { margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }

.menu-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-xs) var(--space-lg); margin-bottom: var(--space-md); }
.menu-head p { font-size: var(--text-sm); color: var(--color-muted); }
.strip { background: var(--color-paper); }
.strip ul { display: flex; flex-wrap: wrap; gap: 0 var(--space-xs); margin-inline: calc(-1 * var(--space-xs)); padding-bottom: var(--space-md); }
.strip a { display: inline-block; min-inline-size: var(--control); padding: var(--space-sm) var(--space-xs); text-align: center; white-space: nowrap; text-decoration: none; color: var(--color-ink-2); }
.strip a:hover { color: var(--color-ink); text-decoration: underline; }
.items { columns: 2 18rem; column-gap: var(--space-xl); }
.items li { display: flex; align-items: baseline; gap: var(--space-xs); padding-block: var(--space-xs); break-inside: avoid; font-size: var(--text-lg); line-height: 1.5; }
@supports (align-items: last baseline) { .items li { align-items: last baseline; } }
.dish { flex: 0 1 auto; min-width: 0; overflow-wrap: break-word; }
.lead { flex: 1 1 var(--space-lg); min-width: var(--space-md); border-bottom: var(--space-3xs) dotted var(--color-rule); transform: translateY(-0.3em); }
.price { flex: 0 20 auto; max-width: 64%; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.price .p { display: inline-block; white-space: nowrap; }
.flag { display: inline-block; margin-right: var(--space-xs); padding-inline: var(--space-2xs); border: var(--rule-hair) solid var(--color-muted); border-radius: var(--radius-card); font-size: var(--text-xs); font-weight: 400; color: var(--color-ink-2); }

.rows li { border-top: var(--rule-hair) solid var(--color-rule); }
.rows li:last-child { border-bottom: var(--rule-hair) solid var(--color-rule); }
.rows a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--space-2xs) var(--gap-columns); padding-block: var(--space-md); text-decoration: none; }
.rows a:hover { background: var(--color-paper-2); }
.rows strong { font-family: var(--font-display); font-weight: 900; font-size: var(--text-title); line-height: 1.2; }
.rows a:hover strong { text-decoration: underline; }
.rows span { color: var(--color-ink-2); }

/* ---------- footer ---------- */
.foot-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-xl) var(--gap-columns); padding-block: var(--space-2xl); }
.foot-grid p { max-width: 34em; margin-top: var(--space-md); }
.foot-label { margin: 0 0 var(--space-xs); font-size: var(--text-sm); color: var(--soft); }
.foot-grid li a, .foot-grid p a { display: inline-block; padding-block: var(--space-sm); }
.foot-grid p:has(> a:only-child) { margin-top: var(--space-2xs); }
.foot-grid a { text-decoration-color: var(--rule); }
.foot-grid a:hover { text-decoration-color: currentColor; }

/* ---------- wide: four plaques a shop ---------- */

/* ---------- tablet ---------- */
@media (max-width: 64rem) {
  /* narrow boards: the drawing and the open status share the sign's first row, the name runs full width under them */
  :root { --art: 2.5rem; }
  .shop { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); padding-top: var(--space-xl); }
  .info { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl) var(--gap-columns); }
  .strip { position: sticky; top: 0; z-index: var(--z-sticky); border-bottom: var(--rule-hair) solid var(--color-ink); }
  .strip ul { flex-wrap: nowrap; overflow-x: auto; margin-inline: 0; padding: var(--space-2xs); scrollbar-width: thin; }
  .cat-name { top: calc(var(--strip) + var(--space-md)); }
  .cat--shops .cat-name { top: var(--space-lg); }
  .strip + .cat { border-top: 0; }
  .owners, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .owners { align-items: start; }
  .owners .actions { justify-content: flex-start; }
  .rows a { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- phone ---------- */
@media (max-width: 40rem) {
  :root { --head-col: 2.25rem; --tile: 32px; }
  .head { column-gap: var(--space-md); }
  .cat-name { font-size: var(--text-xl); }
  .cat { column-gap: var(--space-sm); }
  .cells, .info { grid-template-columns: minmax(0, 1fr); }
  .cell .facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
  .cell .facts > div:has(> [data-hours]) { grid-column: 1 / -1; }
  .head { padding-block: var(--space-lg) var(--space-xl); }
  .actions .btn { flex: 1 1 auto; }
  .items li { font-size: var(--text-md); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .cell-art, .sign { transition: none; }
  .btn:active { transform: none; }
}
