/* ============================================================
   Cooked Apps — The Tasting Menu.
   Loaded after cooked.css on /tasting-menu/ pages only. Where the main site
   is a loud diner menu (checkerboard, bold orange), the Tasting
   Menu is the printed card at a fine-dining table: one centred
   card of heavy stock on a quiet table, light italic display type,
   letter-spaced capitals, numbered courses, hairline rules and a
   small diamond between sections. Orange is kept to the course
   numbers and ornaments.

   Scope: .tm on <html> for a full Tasting Menu page, or on any
   wrapper. All colours are --tm-* tokens,
   redefined for dark mode below.
   ============================================================ */

.tm {
  --tm-table: #E9E2D4;      /* page behind the card */
  --tm-card: #FCFAF4;       /* the menu card itself */
  --tm-ink: #2E2620;        /* body text, 12:1 on the card */
  --tm-muted: #6F6052;      /* secondary text, 5.6:1 on the card */
  --tm-rule: #CDBCA4;       /* hairlines */
  --tm-accent: #C73C0A;     /* course numbers, ornaments, link hover */
  --tm-card-shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 30px 60px -30px rgba(60, 40, 20, .35);
}
html[data-theme="dark"] .tm,
html.tm[data-theme="dark"] {
  --tm-table: #0E0C0B;
  --tm-card: #1A1715;
  --tm-ink: #EEE6DA;
  --tm-muted: #A99A8B;
  --tm-rule: #4A4038;
  --tm-accent: #FF9269;
  --tm-card-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 30px 60px -30px rgba(0, 0, 0, .9);
}

/* Full pages: replace cooked.css's checkerboard with a plain table. */
html.tm,
html.tm[data-theme] {
  background: var(--tm-table) none;
}
html.tm body { color: var(--tm-ink); }

.tm-page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 4.5rem 1rem 3rem;
}
@media (max-width: 640px) {
  .tm-page { padding: 4.25rem .75rem 2.5rem; }
}

/* small capitals used for labels, eyebrows and links around the card */
.tm-caps,
.tm-back,
.tm-eyebrow,
.tm-course-label,
.tm-meta,
.tm-body h2,
.tm-site-foot nav a,
.tm-more a,
.tm-post-nav a {
  font-family: var(--serif);
  font-weight: 500;
  font-size: .78rem;
  letter-spacing: .26em;
  text-transform: uppercase;
}

.tm-back {
  display: inline-block;
  margin: 0 0 1.25rem .25rem;
  color: var(--tm-muted);
  text-decoration: none;
}
.tm-back:hover { color: var(--tm-accent); }

/* ---------- the card ---------- */
.tm-card {
  position: relative;
  padding: clamp(2.5rem, 8vw, 4.5rem) clamp(1.5rem, 7vw, 4rem);
  background-color: var(--tm-card);
  background-image: var(--grain);
  box-shadow: var(--tm-card-shadow);
  color: var(--tm-ink);
  text-align: center;
}
/* inner hairline frame, set in from the card's edge like a printed border */
.tm-card::before {
  content: "";
  position: absolute;
  inset: .75rem;
  border: 1px solid var(--tm-rule);
  pointer-events: none;
}

.tm-eyebrow { margin: 0; color: var(--tm-muted); }
.tm-title,
.tm-post-title {
  margin: .9rem 0 0;
  font-weight: 300;
  font-style: italic;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  font-size: clamp(2.9rem, 12vw, 4.75rem);
  line-height: .95;
  letter-spacing: -.01em;
  color: var(--tm-ink);
}
.tm-post-title { font-size: clamp(2.2rem, 9vw, 3.4rem); line-height: 1.02; }
.tm-sub {
  margin: 1rem auto 0;
  max-width: 30ch;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--tm-muted);
}

/* ---------- ornament: hairline, diamond, hairline ---------- */
.tm-orn {
  display: flex;
  align-items: center;
  gap: .9rem;
  max-width: 11rem;
  margin: 2.25rem auto;
}
.tm-orn::before,
.tm-orn::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--tm-rule);
}
.tm-orn > span {
  width: .45rem;
  height: .45rem;
  flex: none;
  border: 1px solid var(--tm-accent);
  transform: rotate(45deg);
}

/* ---------- courses ---------- */
.tm-courses { list-style: none; margin: 0; padding: 0; }
.tm-course { padding: 1.4rem 0; }
.tm-course + .tm-course { border-top: 1px dotted var(--tm-rule); }
.tm-course-label { margin: 0; color: var(--tm-muted); }
.tm-num {
  margin-right: .6em;
  font-style: italic;
  letter-spacing: .05em;
  color: var(--tm-accent);
}
.tm-dish {
  margin: .55rem 0 0;
  font-weight: 450;
  font-size: clamp(1.45rem, 5vw, 1.8rem);
  line-height: 1.2;
  color: var(--tm-ink);
}
.tm-dish a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: text-decoration-color .25s ease, color .25s ease;
}
.tm-dish a:hover,
.tm-dish a:focus-visible { color: var(--tm-accent); text-decoration-color: var(--tm-accent); }
.tm-desc {
  margin: .45rem auto 0;
  max-width: 34ch;
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--tm-muted);
}
.tm-meta { margin: .7rem 0 0; font-size: .68rem; color: var(--tm-muted); }
.tm-course--soon .tm-dish { font-style: italic; font-weight: 300; color: var(--tm-muted); }

/* ---------- card foot ---------- */
.tm-card-foot p { margin: 0; }
.tm-chefs { font-style: italic; font-size: 1rem; color: var(--tm-ink); }
.tm-fine { margin-top: .6rem !important; font-size: .85rem; font-style: italic; color: var(--tm-muted); }
.tm-more { margin: 0; }
.tm-more a,
.tm-post-nav a { color: var(--tm-accent); text-decoration: none; }
.tm-more a:hover,
.tm-post-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- a single post ---------- */
.tm-body {
  max-width: 34rem;
  margin: 0 auto;
  text-align: left;
  font-size: 1.12rem;
  line-height: 1.75;
}
.tm-body p { margin: 0 0 1.25rem; }
.tm-body > p:first-of-type::first-letter {
  float: left;
  margin: .02em .1em 0 0;
  font-weight: 300;
  font-style: italic;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  font-size: 3.6em;
  line-height: .85;
  color: var(--tm-accent);
}
.tm-body h2 {
  margin: 2.75rem 0 1.25rem;
  text-align: center;
  color: var(--tm-muted);
}
.tm-body a { color: var(--tm-ink); text-decoration-color: var(--tm-accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.tm-body a:hover { color: var(--tm-accent); }
.tm-post-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
  text-align: center;
}
@media (max-width: 640px) {
  .tm-body { font-size: 1.05rem; }
}

/* ============================================================
   Post elements. Everything below lives inside .tm-body unless
   noted. Images are wrapped in <a data-lightbox> so they open in
   the lightbox (tasting-menu.js), or as a plain image link without JS.
   ============================================================ */

/* ---------- post header extras ---------- */
.tm-byline { margin: 1.1rem 0 0; font-style: italic; font-size: 1rem; color: var(--tm-ink); }
.tm-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .45rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}
.tm-tags li {
  padding: .2rem .75rem .15rem;
  border: 1px solid var(--tm-rule);
  border-radius: 999px;
  font-family: var(--serif);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--tm-muted);
}

/* ---------- headings ---------- */
.tm-body h2 { scroll-margin-top: 2rem; }
.tm-body h3 {
  margin: 2.25rem 0 .75rem;
  font-weight: 400;
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.25;
  color: var(--tm-ink);
  scroll-margin-top: 2rem;
}
/* "#" link that appears beside a heading on hover/focus, to link to it */
.tm-anchor {
  margin-left: .4em;
  color: var(--tm-accent) !important;
  text-decoration: none !important;
  opacity: 0;
  transition: opacity .2s ease;
}
.tm-body h2:hover .tm-anchor,
.tm-body h3:hover .tm-anchor,
.tm-anchor:focus-visible { opacity: 1; }

/* ---------- contents ---------- */
.tm-toc {
  margin: 0 auto 2.5rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--tm-rule);
  border-bottom: 1px solid var(--tm-rule);
  text-align: center;
}
.tm-toc-title { margin: 0 0 .75rem !important; }
.tm-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.tm-toc li { counter-increment: toc; margin: .3rem 0; font-style: italic; }
.tm-toc li::before { content: counter(toc, lower-roman) ".\00a0"; color: var(--tm-accent); }
.tm-toc a { text-decoration: none; }
.tm-toc a:hover { text-decoration: underline; }

/* ---------- inline text ---------- */
.tm-body strong { font-weight: 600; }
.tm-body abbr[title] { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.tm-body sup { line-height: 0; }
.tm-body sup a { text-decoration: none; color: var(--tm-accent); font-weight: 600; padding: 0 .1em; }

/* ---------- lists ---------- */
.tm-body ul,
.tm-body ol { margin: 0 0 1.5rem; padding-left: 1.6rem; }
.tm-body li { margin: .4rem 0; padding-left: .3rem; }
.tm-body ul > li::marker { content: "\25C7\00a0\00a0"; color: var(--tm-accent); font-size: .8em; }
.tm-body ol > li::marker { font-style: italic; color: var(--tm-accent); }

/* ---------- figures ---------- */
.tm-body figure { margin: 2.5rem 0; text-align: center; }
.tm-body figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.tm-body figcaption {
  margin-top: .75rem;
  font-style: italic;
  font-size: .92rem;
  line-height: 1.45;
  color: var(--tm-muted);
}
.tm-zoom { display: block; cursor: zoom-in; }
.tm-zoom img { transition: transform .35s cubic-bezier(.3, 1.2, .5, 1); }
.tm-zoom:hover img { transform: scale(1.02); }
.tm-zoom:focus-visible { outline: 2px solid var(--tm-accent); outline-offset: 4px; }
/* a single image, kept to a comfortable size */
.tm-fig img { max-height: 34rem; width: auto; }
/* the lead image under the title */
.tm-fig--lead { margin-top: 0 !important; }
.tm-fig--lead img { max-width: min(100%, 24rem); }
/* two side by side */
.tm-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: end; }
/* a gallery of three or four */
.tm-gallery { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 1rem; align-items: center; }
.tm-gallery--3 { --cols: 3; }
.tm-pair figure,
.tm-gallery figure { margin: 0; }
.tm-pair img,
.tm-gallery img { width: 100%; }
@media (max-width: 520px) {
  .tm-gallery--3 { --cols: 2; }
  .tm-gallery--3 > :last-child:nth-child(odd) { grid-column: 1 / -1; max-width: 50%; margin: 0 auto; }
}

/* ---------- quotes ---------- */
/* pull quote: a line lifted from the post, set large */
.tm-pull {
  margin: 2.5rem auto;
  padding: 0;
  max-width: 24ch;
  border: 0;
  text-align: center;
  font-weight: 300;
  font-style: italic;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  font-size: clamp(1.6rem, 6vw, 2.1rem);
  line-height: 1.2;
  color: var(--tm-ink);
}
.tm-pull::before,
.tm-pull::after { content: none; }
/* quotation from someone, with who said it */
.tm-quote { margin: 2.25rem 0 !important; text-align: left !important; }
.tm-quote blockquote {
  margin: 0;
  padding: .2rem 0 .2rem 1.4rem;
  border-left: 2px solid var(--tm-accent);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.5;
}
.tm-quote blockquote p { margin: 0; }
.tm-quote figcaption { margin-top: .6rem; padding-left: 1.4rem; font-style: normal; }
.tm-quote figcaption::before { content: "\2014\00a0"; }

/* ---------- chef's note (an aside) ---------- */
.tm-note {
  margin: 2.25rem 0;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--tm-rule);
  background: color-mix(in srgb, var(--tm-accent) 5%, transparent);
  font-size: 1rem;
  line-height: 1.6;
}
.tm-note-label { display: block; margin-bottom: .4rem; color: var(--tm-accent); }
.tm-note p { margin: 0; }

/* ---------- recipe card ---------- */
.tm-recipe {
  margin: 2.5rem 0;
  padding: 1.5rem 1.5rem .5rem;
  border: 1px solid var(--tm-rule);
  box-shadow: inset 0 0 0 4px var(--tm-card), inset 0 0 0 5px var(--tm-rule);
}
.tm-recipe-title { margin: 0 0 1rem !important; text-align: center; color: var(--tm-muted); }
.tm-recipe h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.tm-recipe-cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0 1.75rem; }
@media (max-width: 560px) { .tm-recipe-cols { grid-template-columns: 1fr; } }

/* ---------- table ---------- */
.tm-table-wrap { margin: 2rem 0; overflow-x: auto; }
.tm-body table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.tm-body caption { margin-bottom: .75rem; caption-side: top; }
.tm-body th,
.tm-body td { padding: .7rem .5rem; border-bottom: 1px dotted var(--tm-rule); text-align: left; vertical-align: top; }
.tm-body thead th { border-bottom: 1px solid var(--tm-rule); color: var(--tm-muted); }
.tm-body tbody th { font-weight: 500; font-style: italic; white-space: nowrap; }

/* ---------- code ---------- */
.tm-body code {
  padding: .1em .35em;
  border: 1px solid var(--tm-rule);
  border-radius: 3px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .85em;
}
.tm-body pre {
  margin: 2rem 0;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--tm-rule);
  background: color-mix(in srgb, var(--tm-ink) 4%, transparent);
  font-size: .9rem;
  line-height: 1.55;
}
.tm-body pre code { padding: 0; border: 0; font-size: inherit; }

/* ---------- rule: same diamond as .tm-orn, for use inside the body ---------- */
.tm-body hr {
  height: .45rem;
  margin: 2.75rem auto;
  border: 0;
  background:
    linear-gradient(var(--tm-rule), var(--tm-rule)) left center / 40% 1px no-repeat,
    linear-gradient(var(--tm-rule), var(--tm-rule)) right center / 40% 1px no-repeat;
  max-width: 11rem;
  position: relative;
}
.tm-body hr::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: .45rem;
  height: .45rem;
  border: 1px solid var(--tm-accent);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ---------- call to action ---------- */
.tm-cta { margin: 2.5rem 0; padding: 1.75rem 1rem; text-align: center; border-top: 1px solid var(--tm-rule); border-bottom: 1px solid var(--tm-rule); }
.tm-cta-title { margin: 0 0 .25rem !important; font-style: italic; font-size: 1.4rem; }
.tm-cta-sub { margin: 0 0 1.1rem !important; color: var(--tm-muted); font-style: italic; }
.tm-btn {
  display: inline-block;
  margin: .25rem;
  padding: .65rem 1.2rem .6rem;
  border: 1px solid var(--tm-ink);
  background: transparent;
  color: var(--tm-ink) !important;
  font-family: var(--serif);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.tm-btn:hover,
.tm-btn:focus-visible { background: var(--tm-ink); color: var(--tm-card) !important; }

/* ---------- footnotes ---------- */
.tm-footnotes { margin-top: 2.5rem; font-size: .9rem; color: var(--tm-muted); }
.tm-footnotes h2 { margin-top: 0 !important; }
.tm-footnotes ol { padding-left: 1.4rem; }
.tm-footnotes li { margin: .5rem 0; }
.tm-footnotes li:target { color: var(--tm-ink); }
.tm-footnotes a[href^="#ref"] { text-decoration: none; color: var(--tm-accent); }

/* ---------- after the post: authors and sharing (outside .tm-body) ---------- */
.tm-post-end { max-width: 34rem; margin: 0 auto; }
.tm-authors { margin: 0; font-style: italic; color: var(--tm-ink); }
.tm-authors + .tm-btn { margin-top: 1rem; }

/* ---------- lightbox ---------- */
html.tm-lightbox-open { overflow: hidden; }
.tm-lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0C0A09;
  color: #F3ECE1;
  overflow: hidden;
}
.tm-lightbox::backdrop { background: transparent; }
.tm-lightbox[open] { display: grid; place-items: center; animation: tm-lightbox-in .25s ease; }
@keyframes tm-lightbox-in { from { opacity: 0; } to { opacity: 1; } }
.tm-lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 4rem 4.5rem 3.5rem;
}
.tm-lightbox-img {
  max-width: 100%;
  max-height: calc(100% - 3rem);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.tm-lightbox-caption {
  max-width: 40rem;
  margin-top: .9rem;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: #D8CEC0;
}
.tm-lightbox-count {
  position: absolute;
  top: 1.35rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--serif);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #B9AC9C;
}
.tm-lightbox-btn {
  position: absolute;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(243, 236, 225, .45);
  border-radius: 50%;
  background: rgba(12, 10, 9, .4);
  color: #F3ECE1;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}
.tm-lightbox-btn:hover { background: #F3ECE1; color: #1A1715; border-color: #F3ECE1; }
.tm-lightbox-btn:focus-visible { outline: 2px solid #FF9269; outline-offset: 3px; }
.tm-lightbox-close { top: 1rem; right: 1rem; font-size: 1.6rem; }
.tm-lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.tm-lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .tm-lightbox-figure { padding: 4rem 1rem 5.5rem; }
  .tm-lightbox-prev,
  .tm-lightbox-next { top: auto; bottom: 1.25rem; transform: none; }
  .tm-lightbox-prev { left: calc(50% - 3.25rem); }
  .tm-lightbox-next { right: calc(50% - 3.25rem); }
}

/* ---------- below the card ---------- */
.tm-site-foot { margin-top: 2.5rem; text-align: center; color: var(--tm-muted); }
.tm-site-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.4rem; }
.tm-site-foot nav a { font-size: .7rem; color: var(--tm-muted); text-decoration: none; }
.tm-site-foot nav a:hover { color: var(--tm-accent); }
.tm-site-foot .legal { margin-top: 1rem; font-size: .85rem; }

/* ---------- site navigation, restyled for the Tasting Menu ----------
   Same markup as everywhere else (nav.js); here it drops the capsule
   and pills for letter-spaced capitals, with a hairline under the
   current page, and the phone menu card uses the menu-card palette. */
html.tm .site-nav-list {
  gap: 1.9rem;
  padding: .45rem 0;
  background: transparent;
  box-shadow: none;
}
html.tm .site-nav-link {
  padding: .35rem 0;
  border-radius: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: .72rem;
  letter-spacing: .26em;
  color: var(--tm-muted);
  background: none;
}
html.tm .site-nav-link:hover { color: var(--tm-accent); background: none; }
html.tm .site-nav-link[aria-current="page"] { color: var(--tm-ink); background: none; box-shadow: inset 0 -1px 0 var(--tm-accent); }
@media (max-width: 640px) {
  html.tm .site-nav-list {
    gap: 0;
    padding: 1rem 1.4rem;
    background: var(--tm-card);
    box-shadow: inset 0 0 0 1px var(--tm-rule), var(--tm-card-shadow);
  }
  html.tm .site-nav-link {
    padding: .6rem 0;
    font-weight: 400;
    font-style: italic;
    font-size: 1.3rem;
    letter-spacing: 0;
    color: var(--tm-ink);
    box-shadow: none !important;
  }
  html.tm .site-nav-leader { background: none; border-bottom: 1px dotted var(--tm-rule); height: auto; align-self: center; }
  html.tm .site-nav-num { font-style: normal; font-size: .85rem; color: var(--tm-accent); }
  html.tm .site-nav-link[aria-current="page"] .site-nav-label { text-decoration-color: var(--tm-accent); text-decoration-thickness: 1px; }
}

@media (prefers-reduced-motion: reduce) {
  .tm-dish a { transition: none; }
  .tm-zoom img, .tm-anchor, .tm-btn { transition: none; }
  .tm-zoom:hover img { transform: none; }
  .tm-lightbox[open] { animation: none; }
}
