/* botportal.app/recipes (decision 0031). The result comes first: a row of recipes, then the stage
   (the sample page, the door, what an AI sent back), then one tile to get it, then one card per recipe.
   Tokens and the frame come from site.css. Headlines here are warm espresso brown, as on the home
   page, never near-black. recipes-stage.js builds the markup. */

body.recipes-page {
  --rc-ink: #2a160c; --rc-quiet: #6f4a36; --rc-num: #c2410c; --rc-ok: #1f7a4a; --rc-tag: #9a3412; --rc-tag-bg: #fff1e3;
  --rc-paper: rgba(255, 244, 232, .62); --rc-rim: rgba(255, 255, 255, .6);
  --rc-surface: #ffffff; --rc-soft: #fff6ec; --rc-line: rgba(42, 22, 12, .13); --rc-skel: rgba(42, 22, 12, .10);
  --rc-shadow: 0 18px 40px rgba(60, 30, 10, .09);
  background: radial-gradient(ellipse 72% 520px at 50% 300px, rgba(255, 178, 36, .30), rgba(255, 90, 31, .11) 48%, rgba(255, 79, 139, .04) 72%, transparent 100%) no-repeat, var(--bg);
}
@media (prefers-color-scheme: dark) {
  body.recipes-page {
    --rc-ink: #fbe9dc; --rc-quiet: #cfa58d; --rc-num: #ff8a5c; --rc-ok: #6fd39b; --rc-tag: #ffb38f; --rc-tag-bg: #3a281e;
    --rc-paper: rgba(70, 44, 30, .55); --rc-rim: rgba(255, 255, 255, .1);
    --rc-surface: #2a1d16; --rc-soft: #33231a; --rc-line: rgba(255, 255, 255, .15); --rc-skel: rgba(255, 255, 255, .12);
    --rc-shadow: 0 18px 40px rgba(0, 0, 0, .28);
    background: radial-gradient(ellipse 72% 520px at 50% 300px, rgba(255, 178, 36, .16), rgba(255, 90, 31, .07) 48%, rgba(255, 79, 139, .03) 72%, transparent 100%) no-repeat, var(--bg);
  }
}

.rc { padding-bottom: 8px; }
.rc h1, .rc h2, .rc h3, .recipes-page main h2 { color: var(--rc-ink); }
.rc-head { text-align: center; padding: 30px 0 24px; }
.rc-head h1 { font-size: clamp(30px, 8.2vw, 68px); line-height: 1.02; }
.rc-head .lede { margin: 14px auto 0; max-width: 34ch; font-size: clamp(17px, 2vw, 20px); color: var(--rc-quiet); text-wrap: balance; }
.rc-plain { max-width: 46em; margin: 0 auto; color: var(--rc-quiet); }
.rc svg { fill: currentColor; }
.rc :focus-visible, .rc-ask :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The recipes that have a sample. The thin line along a chip runs while the stage turns by itself. */
.rc-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px; }
.rc-chip { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; padding: 12px 17px 12px 14px; border: 0; border-radius: 999px; background: var(--rc-paper); box-shadow: inset 0 0 0 1px var(--rc-rim); color: var(--rc-ink); font-weight: 500; font-size: 15px; line-height: 1.2; cursor: pointer; }
.rc-chip svg { width: 20px; height: 20px; color: var(--rc-num); flex: none; }
.rc-chip:hover { box-shadow: inset 0 0 0 1.5px var(--rc-num); }
.rc-chip[aria-selected="true"] { background: var(--rc-ink); color: var(--bg); box-shadow: none; }
.rc-chip[aria-selected="true"] svg { color: inherit; }
.rc-tick { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); }
.rc-chip.auto .rc-tick { animation: rc-tick 8s linear forwards; }
@keyframes rc-tick { to { width: 100%; } }

/* The stage: the page you save, the door, what your AI sends you. The two sides have three rows:
   a label, a card and a line under it. So the cards start at the same line and end at the same line.
   On a computer the cards keep one height for every recipe, so nothing jumps when the stage turns. */
.rc-stage { --rc-h: 720px; display: grid; grid-template-columns: minmax(0, 320px) 72px minmax(0, 1fr); grid-template-rows: auto var(--rc-h) auto; grid-template-areas: "lin . lout" "in door out" "cin . cout"; padding: 22px 26px 18px; border-radius: 28px; background: var(--rc-paper); box-shadow: inset 0 0 0 1px var(--rc-rim); -webkit-backdrop-filter: blur(18px) saturate(1.15); backdrop-filter: blur(18px) saturate(1.15); }
.rc-a-lin { grid-area: lin; } .rc-a-in { grid-area: in; } .rc-a-cin { grid-area: cin; }
.rc-a-lout { grid-area: lout; } .rc-a-out { grid-area: out; } .rc-a-cout { grid-area: cout; }
.rc-label { margin-bottom: 10px; font-size: 13px; font-weight: 500; letter-spacing: .01em; color: var(--rc-num); }
.rc-cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; min-height: 20px; margin-top: 12px; font-size: 13px; color: var(--rc-quiet); }
.rc-links { display: inline-flex; flex-wrap: wrap; gap: 4px 16px; }
/* Room for two lines under the result, so the page below does not move when the stage turns. */
.rc-a-cout { min-height: 44px; align-content: flex-start; }
.rc-door { grid-area: door; align-self: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rc-door svg { width: 46px; height: 46px; filter: drop-shadow(0 6px 14px rgba(255, 90, 31, .28)); }
.rc-flow { display: flex; gap: 5px; }
.rc-flow i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .25; animation: rc-flow 1.8s ease-in-out infinite; }
.rc-flow i:nth-child(2) { animation-delay: .25s; }
.rc-flow i:nth-child(3) { animation-delay: .5s; }
@keyframes rc-flow { 0%, 100% { opacity: .2; } 40% { opacity: 1; } }

/* The sample page, drawn as a small browser. Its lines of text run on to the end of the card. */
.rc-browser, .rc-out { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--rc-surface); border-radius: 18px; box-shadow: 0 0 0 1px var(--rc-line), var(--rc-shadow); overflow: hidden; }
.rc-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--rc-line); }
.rc-url { flex: 1; min-width: 0; padding: 5px 12px; border-radius: 999px; background: var(--rc-soft); color: var(--rc-quiet); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-bar svg { flex: none; width: 24px; height: 24px; }
.rc-article { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px 18px 0; }
.rc-kicker { font-size: 12px; color: var(--rc-quiet); }
.rc-title { font-size: 20px; font-weight: 700; line-height: 1.18; letter-spacing: -.02em; color: var(--rc-ink); text-wrap: balance; }
.rc-pic { flex: none; aspect-ratio: 16 / 10; border-radius: 10px; background: linear-gradient(160deg, #20304f 0%, #54628c 46%, #f0a877 100%); }
.rc-skel { flex: 1; min-height: 0; overflow: hidden; padding-top: 4px; -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
.rc-skel i { display: block; height: 7px; margin-bottom: 9px; border-radius: 4px; background: var(--rc-skel); }
.rc-skel i:nth-child(5n + 3) { width: 92%; }
.rc-skel i:nth-child(5n) { width: 58%; margin-bottom: 24px; }
.rc-more { display: inline-flex; align-items: center; gap: 4px; color: var(--rc-num); font-size: 13px; font-weight: 500; text-decoration: none; }
.rc-more:hover { text-decoration: underline; }
.rc-more svg { width: 15px; height: 15px; }

/* What came back: one card. Its head says what you do with the result. Each recipe has one panel
   under the head; only the picked one shows. */
.rc-out-head { flex: none; padding: 16px 20px 15px; border-bottom: 1px solid var(--rc-line); }
.rc-does { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.035em; line-height: 1.05; }
.rc-line { margin-top: 4px; color: var(--rc-quiet); }
.rc-result { flex: 1; min-height: 0; display: flex; }
.rc-panel { flex: 1; min-width: 0; min-height: 0; }
.rc-panel[hidden] { display: none; }

/* The podcast episode, as a player. */
.rc-pod { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px clamp(18px, 5%, 44px); text-align: center; }
.rc-cover { position: relative; flex: none; display: grid; place-items: center; width: min(264px, 62%); aspect-ratio: 1; border-radius: 22px; background: #141416; overflow: hidden; box-shadow: 0 18px 36px rgba(20, 10, 4, .22); }
.rc-cover::after { content: ""; position: absolute; inset: auto -20% -45% -20%; height: 80%; background: radial-gradient(closest-side, rgba(255, 90, 31, .55), transparent); }
.rc-cover svg { position: relative; z-index: 1; width: 58%; }
.rc-pod-meta { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rc-pod-show, .rc-pod-len { font-size: 13px; color: var(--rc-quiet); }
.rc-pod-title { font-size: 23px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; color: var(--rc-ink); text-wrap: balance; }
.rc-pod-play { align-self: stretch; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.rc-play { display: grid; place-items: center; width: 54px; height: 54px; border: 0; border-radius: 50%; background: var(--accent); color: #1c1208; cursor: pointer; }
.rc-play svg { width: 32px; height: 32px; }
.rc-wave { position: relative; height: 46px; min-width: 0; }
.rc-wave svg { display: block; width: 100%; height: 100%; }
.rc-wave rect { fill: var(--rc-skel); }
.rc-wave rect.on { fill: var(--accent); }
.rc-wave input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.rc-wave:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.rc-time { font-size: 13px; color: var(--rc-quiet); font-variant-numeric: tabular-nums; }

/* Swipe cards: a sample page inside this page. */
.rc-frame { display: flex; }
.rc-frame iframe { flex: 1; display: block; width: 100%; min-height: 0; border: 0; background: var(--rc-soft); }

/* A text sample, as a message from an AI. */
.rc-chat { display: flex; }
.rc-chat-body { flex: 1; min-height: 0; display: grid; align-content: start; gap: 10px; overflow-y: auto; padding: 18px 20px 44px; font-size: 15px; line-height: 1.5; -webkit-mask-image: linear-gradient(#000 calc(100% - 44px), transparent); mask-image: linear-gradient(#000 calc(100% - 44px), transparent); }
.rc-chat-body > * { max-width: 64ch; }
.rc-chat-body h3 { font-size: 20px; letter-spacing: -.02em; line-height: 1.2; }
.rc-chat-body h4 { margin: 6px 0 0; font-size: 15px; font-weight: 700; color: var(--rc-ink); }
.rc-chat-body ul, .rc-chat-body ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.rc-chat-body .chain { font-weight: 500; color: var(--rc-num); }
.rc-chat-body b { font-weight: 700; }
.rc-chat-body a { overflow-wrap: anywhere; }


/* Get it for every page: one tile, one button, after the close of the home page. The tile is dark in
   both themes; the dawn glow rises from its lower edge. */
.rc-cta { --cta-ink: #fbe9dc; --cta-quiet: #cdb3a4; position: relative; overflow: hidden; margin-top: 14px; padding: clamp(44px, 6.4vw, 76px) clamp(18px, 4vw, 48px) clamp(40px, 5.6vw, 64px); border-radius: 28px; text-align: center; color: var(--cta-quiet); scroll-margin-top: 12px;
  background: radial-gradient(ellipse 64% 82% at 50% 112%, rgba(255, 90, 31, .46), rgba(255, 79, 139, .12) 54%, transparent 76%), #1b120d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.rc .rc-cta h2 { color: var(--cta-ink); font-size: clamp(30px, 5vw, 52px); line-height: 1.02; }
.rc-steps { list-style: none; margin: 20px auto 30px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; font-size: 16px; }
.rc-steps li { display: flex; align-items: center; gap: 10px; text-align: left; }
.rc-steps b { font-weight: 500; color: var(--cta-ink); }
.rc-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255, 138, 92, .55); color: #ff8a5c; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-cta .cta { justify-content: center; margin: 0; }
.rc-cta .btn-huge { box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.rc-cta-line { margin-top: 22px; font-size: 15px; }

/* Every recipe: one card each, with more about it. A recipe's card is not a link, so nothing moves
   when a visitor clicks it. The eighth card is a link: it goes to the form that asks for a recipe. */
.rc-shelf { margin-top: 64px; }
.rc-shelf-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 20px; }
.rc-shelf-head p { color: var(--rc-quiet); }
.rc-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rc-tile { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 18px; border-radius: 22px; background: var(--rc-paper); box-shadow: inset 0 0 0 1px var(--rc-rim); color: var(--rc-ink); }
.rc-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px; border-radius: 13px; background: #141416; color: #ff8a4a; }
.rc-ico svg { width: 24px; height: 24px; }
.rc-tile h3 { font-size: 19px; letter-spacing: -.02em; line-height: 1.15; }
.rc-tile .t { font-size: 15px; line-height: 1.4; color: var(--rc-ink); }
.rc-tile ul { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; gap: 6px; font-size: 14px; line-height: 1.4; color: var(--rc-quiet); }
.rc-tile li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; }
.rc-tile li::before { content: ""; width: 5px; height: 5px; margin-top: .55em; border-radius: 50%; background: var(--rc-num); opacity: .7; }
.rc-when { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--rc-line); font-size: 13px; color: var(--rc-quiet); }
.rc-tag { position: absolute; top: -9px; right: 16px; padding: 3px 8px; border-radius: 999px; background: var(--rc-tag-bg); box-shadow: 0 0 0 1px var(--rc-line); color: var(--rc-quiet); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rc-tag.test { color: var(--rc-tag); }
a.rc-tile.ask { align-items: center; justify-content: center; gap: 6px; text-align: center; text-decoration: none; background: transparent; box-shadow: none; border: 1.5px dashed var(--rc-line); }
a.rc-tile.ask:hover { border-color: var(--rc-num); }
.rc-tile.ask .rc-ico { background: transparent; box-shadow: inset 0 0 0 1.5px var(--rc-line); color: var(--rc-num); }
.rc-tile.ask .t { color: var(--rc-quiet); max-width: 20ch; }

/* Ask for a recipe. */
.rc-ask { padding: 64px 0; text-align: center; scroll-margin-top: 12px; }
.rc-ask .line { margin: 10px auto 22px; max-width: 36ch; color: var(--rc-quiet); font-size: 18px; text-wrap: balance; }

@media (max-width: 860px) {
  /* One column. The sample page gets short, so the result shows on the first screen. */
  .rc-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "lin" "in" "door" "lout" "out" "cout"; padding: 16px; border-radius: 22px; }
  .rc-a-cin { display: none; }
  .rc-door { flex-direction: row; justify-content: center; padding: 10px 0 2px; }
  .rc-door .rc-flow { transform: rotate(90deg); }
  .rc-door svg { width: 40px; height: 40px; }
  .rc-article { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 4px 12px; padding: 12px 14px 14px; }
  .rc-title { font-size: 15px; }
  .rc-kicker { grid-column: 1; }
  .rc-pic { grid-column: 2; grid-row: 1 / 3; aspect-ratio: auto; min-height: 64px; }
  .rc-skel { display: none; }
  .rc-frame iframe { flex: none; height: 600px; }
  .rc-chat-body { max-height: 520px; }
  .rc-pod { padding: 22px 18px; }
  .rc-cover { width: min(200px, 56%); }
  .rc-a-cout { min-height: 0; }
  .rc-cta { border-radius: 22px; }
  .rc-steps { flex-direction: column; align-items: flex-start; width: fit-content; }
}
@media (max-width: 1040px) { .rc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .rc-head { padding-top: 18px; }
  .rc-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: -20px; padding: 2px 20px; scrollbar-width: none; }
  .rc-chip { flex: none; }
  .rc-pod-title { font-size: 19px; }
  .rc-pod-play { gap: 10px; }
  .rc-play { width: 48px; height: 48px; }
  .rc-shelf { margin-top: 48px; }
  .rc-tiles { grid-template-columns: minmax(0, 1fr); }
  .rc-tile.ask { padding-block: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .rc-flow i, .rc-chip.auto .rc-tick { animation: none; }
}
