/* ================= Pairing page ================= */
.pairing-page .g-head h2 em, .pairing-page h2 em { color: inherit; font-style: normal; }
.ext { text-decoration: none; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 100% 1px no-repeat; transition: color .3s, background-size .4s var(--ease); padding-bottom: 2px; }
.ext::after { content: " \2197"; font-size: .85em; color: #8a6d33; }
.ext:hover { color: #8a6d33; background-size: 0 1px; background-position: 100% 100%; }
.dark .ext::after, .glass-card .ext::after { color: var(--gold-soft); }

/* choose a cheese */
.pe-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.pe-tab { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .85rem 1.2rem; border: 1px solid var(--line); background: none; border-radius: 0; font: inherit; color: var(--ink); cursor: pointer; text-align: left; transition: background .3s, color .3s, border-color .3s; }
.pe-tab b { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; line-height: 1.1; }
.pe-tab small { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); transition: color .3s; }
.pe-tab:hover { border-color: var(--gold); }
.pe-tab.on { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.pe-tab.on small { color: var(--gold-soft); }
.pe-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.pe-photo { margin: 0; position: sticky; top: calc(var(--header-h) + 1.5rem); }
.pe-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: var(--sand); }
.pe-photo figcaption { margin-top: .8rem; font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.pe-name { font-size: clamp(2.6rem, 5.5vw, 4.6rem); line-height: 1; }
.pe-note { margin: 1.1rem 0 0; font-size: 1.12rem; color: var(--muted); max-width: 34rem; }
.pe-buy { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.6rem; margin-top: 1.5rem; }
.pe-price { font-family: var(--serif); font-size: 1.7rem; }
.pe-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem clamp(1.4rem, 3vw, 3rem); margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid var(--ink); }
.pe-col h4, .pe-board h4 { margin: 0 0 .9rem; font: 400 .68rem var(--sans); letter-spacing: .24em; text-transform: uppercase; color: #8a6d33; }
.pe-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.pe-col li { display: grid; gap: .15rem; }
.pe-col li > a { font-family: var(--serif); font-size: 1.4rem; line-height: 1.2; justify-self: start; }
.pe-col li > span { font-size: .9rem; color: var(--muted); line-height: 1.45; }
.pe-board { margin-top: 2rem; }
.pe-board ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pe-board li { padding: .5rem .9rem; border: 1px solid var(--line); font-size: .9rem; background: var(--ivory); }
.pe-tip { margin: 2rem 0 0; padding: 1.4rem 1.6rem; background: var(--sand); border-left: 2px solid var(--gold); }
.pe-tip p { margin: 0; font-family: var(--serif); font-style: normal; font-size: 1.35rem; line-height: 1.4; }
.pe-tip cite { display: block; margin-top: .8rem; font: normal 400 .68rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: #8a6d33; }
.pe-stage.swap .pe-photo, .pe-stage.swap .pe-info > * { animation: peIn .65s var(--ease) both; }
.pe-stage.swap .pe-info > *:nth-child(2) { animation-delay: .04s; } .pe-stage.swap .pe-info > *:nth-child(3) { animation-delay: .08s; }
.pe-stage.swap .pe-info > *:nth-child(4) { animation-delay: .12s; } .pe-stage.swap .pe-info > *:nth-child(5) { animation-delay: .16s; } .pe-stage.swap .pe-info > *:nth-child(6) { animation-delay: .2s; }
@keyframes peIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.btn.added { background: var(--ink); border-color: var(--ink); color: var(--ivory); }

/* by the glass */
.glass-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.6rem); }
.glass-card { padding: clamp(1.4rem, 2.5vw, 2rem); border: 1px solid rgba(247, 243, 236, .16); transition: border-color .4s, background .4s; }
.glass-card:hover { border-color: var(--gold); background: rgba(247, 243, 236, .03); }
.glass-card h3 { font-size: 1.9rem; line-height: 1.1; color: var(--ivory); }
.glass-card p { margin: .8rem 0 1.2rem; font-size: .95rem; color: rgba(247, 243, 236, .68); line-height: 1.55; }
.glass-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.glass-card button { padding: .5rem .85rem; border: 1px solid rgba(214, 194, 145, .5); background: none; border-radius: 0; font: inherit; font-size: .82rem; color: var(--ivory); cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.glass-card button:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* three rules */
.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.rules li { padding-top: 1.4rem; border-top: 1px solid var(--ink); }
.rules .n { display: block; font-family: var(--serif); font-size: 3.6rem; line-height: 1; color: var(--gold); margin-bottom: .6rem; }
.rules h3 { font-size: 1.9rem; line-height: 1.1; }
.rules p { margin: .8rem 0 0; color: var(--muted); }
.rules-quote { margin: clamp(3rem, 6vw, 5rem) auto 0; max-width: 46rem; text-align: center; }
.rules-quote p { margin: 0; font-family: var(--serif); font-style: normal; font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.25; }
.rules-quote cite { display: block; margin-top: 1.2rem; font: normal 400 .7rem var(--sans); letter-spacing: .24em; text-transform: uppercase; color: #8a6d33; }

/* dishes */
.dish-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.6rem); }
.dish { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(1.4rem, 2.5vw, 2rem); border: 1px solid var(--line); background: var(--paper); transition: border-color .4s, transform .5s var(--ease); }
.dish:hover { border-color: var(--ink); transform: translateY(-4px); }
.dish-meta { margin: 0 0 .9rem; font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: #8a6d33; }
.dish h3 { font-size: 1.9rem; line-height: 1.1; }
.dish > p:not(.dish-meta):not(.dish-with) { margin: .8rem 0 1rem; color: var(--muted); font-size: .95rem; }
.dish-with { margin: 0 0 1.2rem; font-size: .88rem; color: var(--muted); margin-top: auto; }
.dish-with .link-btn { color: var(--ink); }
.dish .ext { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; }

/* build a board */
.board-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.board-photo { margin: 0; }
.board-split h2 { font-size: clamp(2.6rem, 5.5vw, 4.4rem); color: var(--ivory); }
.board-steps { list-style: none; counter-reset: s; margin: 1.8rem 0 0; padding: 0; border-top: 1px solid rgba(247, 243, 236, .25); }
.board-steps li { counter-increment: s; display: grid; grid-template-columns: 3rem 1fr; gap: 0 .6rem; padding: 1rem 0; border-bottom: 1px solid rgba(247, 243, 236, .14); }
.board-steps li::before { content: counter(s, decimal-leading-zero); grid-row: 1 / span 2; font-family: var(--serif); font-size: 1.6rem; color: var(--gold); line-height: 1.2; }
.board-steps b { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; color: var(--ivory); line-height: 1.2; }
.board-steps span { color: rgba(247, 243, 236, .66); font-size: .95rem; }
.board-note { margin: 1.4rem 0 0; color: rgba(247, 243, 236, .66); font-size: .95rem; }
.board-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.board-ask { margin: 1.4rem 0 0; font-size: .95rem; color: rgba(247, 243, 236, .66); }
.board-ask a { color: var(--gold-soft); text-underline-offset: 4px; }

@media (max-width: 1000px) {
  .glass-grid, .dish-grid { grid-template-columns: 1fr 1fr; }
  .rules { grid-template-columns: 1fr; }
  .rules li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0 1rem; }
  .rules .n { grid-row: 1 / span 2; font-size: 3rem; margin: 0; }
}
@media (max-width: 800px) {
  .pe-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * clamp(1.25rem, 4vw, 2.5rem)); padding-right: 1.25rem; }
  .pe-tabs::-webkit-scrollbar { display: none; }
  .pe-tab { flex: none; padding: .7rem 1rem; }
  .pe-grid, .board-split { grid-template-columns: 1fr; }
  .pe-photo { position: static; }
  .pe-photo img { aspect-ratio: 1 / 1; }
  .pe-cols { grid-template-columns: 1fr; }
  .pe-buy .btn { width: 100%; text-align: center; }
}
@media (max-width: 640px) {
  .glass-grid, .dish-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .pe-stage.swap .pe-photo, .pe-stage.swap .pe-info > * { animation: none; } .dish:hover { transform: none; } }
.board-photo .img-frame { aspect-ratio: 4 / 5; opacity: 0; transform: scale(.975); transition: opacity 1s var(--ease), transform 1.2s var(--ease); overflow: hidden; background: var(--ink-2); }
.board-photo.in .img-frame { opacity: 1; transform: none; }
.board-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 800px) { .board-photo .img-frame { aspect-ratio: 4 / 3; } }
@media (prefers-reduced-motion: reduce) { .board-photo .img-frame { opacity: 1; transform: none; } }
.board-photo .img-frame { position: relative; }
.board-photo .img-frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
