/* Recipes: what the /recipes/ hub and the recipe pages add to /assets/hub.css and /assets/product/replay.css.
   Load after both. Every selector starts at a class that begins with rc- or an-faq, or at these pages' own body. */

/* The engine paints a new canvas white until a saved slate gives it a color. Here the stage shows through. */
[data-hub="use-cases"] .rc-replay .rp-canvas { background-color: transparent !important }
/* A replay's own lines are not body copy. */
.rc-replay p:not(.kicker) { max-width: none; margin-top: 0; color: inherit }
.rc-replay p.rp-label { color: var(--rp-soft) }
.rc-replay p.rp-note { color: #3e5145 }
/* The hero stage: wide with the conversation beside it; tall on a phone so notes stay readable. */
.rc-replay { --rp-ratio: 16 / 10; --rp-ratio-narrow: 4 / 5 }
@media (min-width: 801px) { .hub-hero-stage .rc-replay { --rp-ratio-narrow: 16 / 13 } }

/* Steps: six fit three to a row. */
.rc-six { grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)) }
.rc-fine { max-width: 60rem; margin-top: 1.6rem; color: var(--s-soft); font-size: .95rem; line-height: 1.55 }
.hub-steps code, .rc-story code, .rc-limits code, .an-faq code, .rc-contract code { font: 500 .88em/1.4 ui-monospace, Menlo, monospace; overflow-wrap: anywhere }

/* How it runs: the question on the left, the story as numbered lines on the right. */
.rc-story { list-style: none; counter-reset: story; margin: 0; padding: 0 }
.rc-story li { counter-increment: story; position: relative; padding: .9rem 0 1rem 2.6rem; border-top: 1px solid var(--s-line); line-height: 1.55 }
.rc-story li:last-child { border-bottom: 1px solid var(--s-line) }
.rc-story li::before { content: counter(story,decimal-leading-zero); position: absolute; left: 0; top: 1.05rem; font: 600 .8rem/1 ui-monospace, Menlo, monospace; color: var(--hub-deep) }
.rc-limits { margin-top: 1.8rem; padding: 1.1rem 1.2rem 1.2rem; border-radius: 10px; background: color-mix(in srgb, var(--hub) 45%, var(--s-card, #fffdf4)) }
.rc-limits h3 { font-size: 1.15rem }
.rc-limits ul { margin: .6rem 0 0; padding-left: 1.1rem; color: var(--s-ink) }
.rc-limits li + li { margin-top: .35rem }
.rc-code { margin: 1.4rem 0 0; border-radius: 10px; overflow: hidden; background: #1b3128; color: #f3f1e4 }
.rc-code figcaption { padding: .55rem .9rem; border-bottom: 1px solid #3d574a; font: 600 .78rem/1.3 ui-monospace, Menlo, monospace; color: #cfe0d4 }
.rc-code pre { margin: 0; padding: .8rem .9rem; overflow-x: auto; font: 500 .82rem/1.5 ui-monospace, Menlo, monospace; white-space: pre }

/* The honesty contract, on the dark section. */
.rc-contract-wrap { overflow-x: auto }
.rc-contract { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 1.05rem; line-height: 1.45 }
.rc-contract caption { caption-side: bottom; padding-top: 1rem; text-align: left; color: #f4ce84; font: 700 clamp(1.25rem,1.9vw,1.7rem)/1.15 "Archivo Narrow","Arial Narrow",sans-serif; letter-spacing: -.02em }
.rc-contract th { padding: 0 1rem .7rem 0; text-align: left; font: 600 .8rem/1.3 ui-monospace, Menlo, monospace; letter-spacing: .05em; text-transform: uppercase; color: #cfe0d4 }
.rc-contract td { padding: .85rem 1.2rem .9rem 0; border-top: 1px solid #ffffff2e; vertical-align: top }
.rc-contract td:empty { border-top-color: transparent }
.rc-contract th + th, .rc-contract td + td { padding-left: 1.2rem; border-left: 1px solid #ffffff2e }
.rc-uses-label { margin-top: 2.4rem; font: 600 .8rem/1.3 ui-monospace, Menlo, monospace; letter-spacing: .05em; text-transform: uppercase; color: #cfe0d4 }

/* Chips: what a recipe uses, and the recipes that ship in the app. */
.rc-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0 0; padding: 0; list-style: none }
.rc-chips li { padding: .42rem .75rem; border: 1px solid currentColor; border-radius: 999px; font-size: .92rem; line-height: 1.3 }
.hub-section[data-tone="ink"] .rc-chips li { border-color: #ffffff59 }
.rc-built li { background: var(--s-card, #fffdf4); border-color: var(--s-line) }

/* The hub's grid: four groups of cards. */
.rc-group + .rc-group { margin-top: clamp(2.2rem,4vw,3.4rem) }
.rc-group > h3 { font-size: clamp(1.5rem,2.2vw,2.1rem) }
.rc-group > p { margin-top: .35rem; color: var(--s-soft) }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,300px),1fr)); gap: 1rem; margin: 1.1rem 0 0; padding: 0; list-style: none }
.rc-card { position: relative; height: 100%; padding: 1.1rem 1.2rem 1.2rem; border-radius: 12px; background: var(--s-card, #fffdf4); box-shadow: inset 0 0 0 1px var(--s-line); border-top: 5px solid var(--c-deep, var(--hub-deep)) }
.rc-card[data-cat] { --c-deep: var(--cat-deep) }
.rc-card h4 { font: 700 clamp(1.35rem,1.8vw,1.65rem)/1.08 "Archivo Narrow","Arial Narrow",sans-serif; letter-spacing: -.02em }
.rc-card h4 a { text-decoration: none }
.rc-card h4 a::after { content: ""; position: absolute; inset: 0; border-radius: 12px }
.rc-card:hover h4 a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .14em }
.rc-card:focus-within { outline: 3px solid var(--hub-deep); outline-offset: 2px }
.rc-card > p { margin-top: .45rem; color: var(--s-soft) }
.rc-card dl { display: grid; gap: .45rem; margin: .9rem 0 0 }
.rc-card dl div { display: grid; grid-template-columns: 6.2rem minmax(0,1fr); gap: .6rem; font-size: .92rem; line-height: 1.4 }
.rc-card dt { font: 600 .75rem/1.6 ui-monospace, Menlo, monospace; color: var(--s-soft) }
.rc-card dd { margin: 0 }
.rc-more { margin-top: 1.6rem }
.rc-more a { font-weight: 600 }
.hub-section[data-tone="ink"] .rc-more a { color: #f4ce84 }

/* Questions, in the answer pages' layout (tests/aeo.mjs reads div.an-faq). */
.an-faq { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,22rem),1fr)); gap: 1.4rem clamp(1.5rem,3vw,3rem); max-width: 80rem }
.an-faq article { padding-top: 1rem; border-top: 2px solid var(--s-ink) }
.an-faq h3 { font-size: clamp(1.25rem,1.7vw,1.6rem) }
.an-faq p { margin-top: .6rem; color: var(--s-soft) }
@media (max-width: 800px) {
  .rc-contract { font-size: .98rem }
  .rc-contract th + th, .rc-contract td + td { padding-left: .8rem }
  .rc-contract td { padding-right: .8rem }
}
