/*
 * The food pages (inc/food.php, parts/food-page.php): the page frame (inner.css), the homepage's map and Trip Test
 * (home.css), and these five sections. Phones first; composed at 1366 on the 12-column, 1240 px grid. The food's two
 * colours (--fa, --fb) are shapes only, never words. Words 7:1, nothing under 16 px, targets 44 px.
 */

/* ---- The sections ------------------------------------------------------------------------------------------------- */

/* A food page is a tool page: on a wide screen its head and its five sections start in the grid's first column (as
   /foods/). The page's own text and its end sit where an article's do (inner.css): the 720 px reading column, two
   columns in. */
@media (min-width: 1024px) {
  .art.fp > * { grid-column: 1 / span 9; }
  .art.fp > .rc-slot, .art.fp > .fp-body { grid-column: 1 / -1; }
  .art.fp > .content { grid-column: 1 / -1; }
  .art.fp > .content > * { grid-column: 3 / span 7; }
  .art.fp > .content > .wide { grid-column: 1 / -1; }
  .art.fp > .ae { grid-column: 3 / span 8; }
}

.fp-body { margin-top: 8px; }
.fp-sec { margin-top: 56px; padding-top: 18px; border-top: 2px solid var(--char); }
.fp-sec > h2 { font-size: var(--h2); line-height: 1.15; max-width: 24em; }
.fp-lede { margin-top: 12px; max-width: 720px; }
.fp-note { margin-top: 18px; max-width: 760px; font-size: var(--label); line-height: 1.5; color: var(--smoke); }
.fp-note a, .fp-more a { font-weight: 600; }
.fp-more { margin-top: 18px; font-size: var(--label); }
.fp-src { font-size: var(--label); line-height: 1.45; color: var(--smoke); }
.fp-src a { color: var(--char); font-weight: 600; }
.fp-text { margin-top: 64px; }
@media (min-width: 1024px) {
  .fp-sec { margin-top: 88px; }
  .fp-sec:first-child { margin-top: 64px; }
  .fp-text { margin-top: 88px; }
}

/* USDA's line: the one rule every food keeps, its source beside it. */
.fp-usda { margin-top: 20px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: baseline; max-width: 880px; padding-top: 14px; border-top: 1px solid var(--line); }
.fp-usda-k { font-size: var(--label); font-weight: 800; padding: 2px 8px; border: 2px solid var(--frost-deep); border-radius: 6px; color: var(--frost-deep); line-height: 1.3; }
.fp-usda > span:last-child { font-weight: 600; }
.fp-usda .fp-src { display: block; font-weight: 400; margin-top: 4px; }
.fp-usda + .fp-usda { margin-top: 10px; }

/* ---- 1. Near you: the homepage's map and list, on the grid -------------------------------------------------------- */

.fp-near { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 24px; }
.mm-title { font-size: 24px; font-weight: 800; line-height: 1.15; }
.fp-crave { margin-top: 16px; }
.fp-crave .seg label .i { width: 22px; height: 22px; }
@media (min-width: 1024px) {
  .fp-near { grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 28px; align-items: start; grid-template-rows: auto 1fr; }
  .fp-near .place { grid-column: 1 / span 5; grid-row: 1; }
  .fp-near .mm-list { grid-column: 1 / span 5; grid-row: 2; }
  .fp-near .mm-map { grid-column: 6 / span 7; grid-row: 1 / span 2; padding-left: 12px; }
}
@media (max-width: 1023px) {
  .fp-near .mm-map { margin-top: 6px; }
}
/* Phones: the map first, the ZIP line under it (as the homepage). */
@media (max-width: 599px) {
  .fp-near { row-gap: 0; }
  .fp-near .mm-map { display: contents; }
  .fp-near .mm-head { order: 1; margin-top: 6px; margin-bottom: 8px; }
  .fp-near .mm-controls { gap: 10px 14px; }
  .fp-near .mm-ctl .seg { min-width: 0; }
  .fp-near .mm-ctl .seg label { padding: 0 10px; }
  .fp-near .mm-only { display: none; }
  .fp-near .mm-where { order: 2; }
  .fp-near .mm-stage { order: 3; margin: 0 calc(-1 * var(--edge) + 8px); border-radius: 0; }
  .fp-near .mm-heatkey { order: 4; }
  .fp-near .fp-crave { order: 5; margin-top: 20px; }
  .fp-near .place { order: 6; margin-top: 24px; }
  .fp-near .mm-dek { order: 7; }
  .fp-near .mm-count { order: 8; }
  .fp-near .mm-key { order: 9; }
  .fp-near .mm-list { order: 10; margin-top: 28px; }
}

/* ---- 2. On the way home: the clock strips, then the Trip Test ----------------------------------------------------- */

.fp-clock { margin: 28px 0 0; }
.fp-clock + .fp-clock { margin-top: 44px; }
.fp-clock-h { display: flex; align-items: center; gap: 14px; font-size: 20px; line-height: 1.35; }
.fp-clock-h .i { width: 40px; height: 40px; }
.fp-clock-h b { font-weight: 800; }
.fp-clock-h .num { font-weight: 800; }
.fp-kind { display: block; font-size: var(--label); color: var(--smoke); }
.fp-basis { display: block; }
.fp-carries { list-style: none; margin: 16px 0 0; padding: 0; }
.fp-carry { padding: 14px 0; border-top: 1px solid var(--line); }
.fp-carry-h { font-size: var(--label); line-height: 1.35; }
.fp-carry-h b { font-weight: 700; }
.fp-carry-h span { display: block; color: var(--smoke); }
.fp-carry.is-usual .fp-carry-h b { color: var(--ember-deep); }
.fp-strip-wrap { margin-top: 8px; height: 40px; border-radius: 4px; overflow: hidden; }
.fp-strip { display: block; width: 100%; height: 40px; }
.fp-moments { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 22px; font-size: var(--label); line-height: 1.45; }
.fp-m-min { font-weight: 800; white-space: nowrap; }
.fp-m-w { color: var(--smoke); }
.fp-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 16px; color: var(--smoke); border-top: 1px solid var(--line); padding-top: 6px; }
@media (min-width: 768px) {
  .fp-carry { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 24px; align-items: center; }
  .fp-carry-h { grid-row: 1 / span 2; align-self: start; padding-top: 6px; }
  .fp-strip-wrap { margin-top: 0; }
  .fp-moments { grid-column: 2; }
  .fp-axis { margin-left: 244px; border-top: 0; }
}
/* The heat spreads from pickup once, as the map's bands do. */
@media (prefers-reduced-motion: no-preference) {
  .fp-clock.is-ready .fp-strip-wrap { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s cubic-bezier(.3, .7, .2, 1); }
  .fp-clock.is-ready .fp-carry:nth-child(2) .fp-strip-wrap { transition-delay: .12s; }
  .fp-clock.is-ready .fp-carry:nth-child(3) .fp-strip-wrap { transition-delay: .24s; }
  .fp-clock.is-on .fp-strip-wrap { clip-path: inset(0 0 0 0); }
}

/* The Trip Test on a food page: the homepage's tool on its Rice ground, inside the section. */
.fp-trip.tt { margin-top: 40px; padding: 28px var(--edge) 32px; margin-inline: calc(-1 * var(--edge)); border-radius: 0; }
.fp-trip-h { font-size: 24px; font-weight: 800; line-height: 1.2; }
.fp-trip-sub { margin-top: 6px; margin-bottom: 22px; color: var(--smoke); font-size: var(--label); }
.fp-trip .tt-ctl .seg label .i { width: 22px; height: 22px; }
@media (min-width: 700px) {
  .fp-trip.tt { margin-inline: 0; padding: 32px; border-radius: 6px; }
}

/* ---- 3. For a group: the sizer ------------------------------------------------------------------------------------ */

.gs { margin-top: 24px; }
.gs-ctl { display: grid; gap: 20px; padding: 20px 0 22px; border-top: 2px solid var(--char); border-bottom: 1px solid var(--line); }
.gs-label { display: block; font-size: var(--label); font-weight: 600; color: var(--smoke); margin-bottom: 8px; }
.gs-yours { display: block; font-weight: 500; }
.gs-step { display: inline-flex; align-items: stretch; border: 2px solid var(--char); border-radius: 6px; overflow: hidden; }
.gs-btn { width: 56px; min-height: 56px; border: 0; background: var(--white); color: var(--char); font: inherit; font-size: 30px; font-weight: 700; line-height: 1; cursor: pointer; }
.gs-btn:hover { background: var(--rice); }
.gs-btn:focus-visible { outline: 2px solid var(--char); outline-offset: -5px; }
.gs-n, .gs-e { width: 3.2ch; min-width: 84px; border: 0; border-inline: 2px solid var(--char); background: var(--white); color: var(--char); font: inherit; font-size: 34px; font-weight: 900; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.gs-e { min-height: 56px; border: 2px solid var(--char); border-radius: 6px; width: 120px; }
.gs-n::-webkit-inner-spin-button, .gs-n::-webkit-outer-spin-button, .gs-e::-webkit-inner-spin-button, .gs-e::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.gs-n:focus-visible, .gs-e:focus-visible { outline: 2px solid var(--char); outline-offset: 2px; }
.gs-e-note { margin-top: 8px; font-size: var(--label); color: var(--smoke); max-width: 30em; }
/* The headcount as seats: forty short marks, the chosen number filled. */
.gs-seats { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 5px 4px; margin-top: 14px; max-width: 420px; }
.gs-seats i { height: 14px; border-radius: 2px; background: var(--line); transition: background .18s ease; }
.gs-seats i.on { background: var(--char); }
.gs-rows { list-style: none; margin: 0; padding: 0; }
.gs-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.gs-what p { margin: 0; }
.gs-chain { font-size: var(--label); font-weight: 700; color: var(--smoke); }
.gs-item { font-size: 20px; font-weight: 700; line-height: 1.3; margin-top: 2px; }
.gs-words { margin-top: 6px; font-size: 19px; line-height: 1.45; }
.gs-price { display: inline-block; margin-left: 10px; font-size: var(--label); font-weight: 600; color: var(--smoke); }
.gs-src { margin-top: 6px; }
.gs-ans { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; }
.gs-big { font-size: 44px; font-weight: 900; line-height: 1; letter-spacing: -0.02em; }
.gs-how { font-size: var(--label); color: var(--smoke); line-height: 1.4; }
.gs-ans.is-empty .gs-how { color: var(--char); font-weight: 600; }
.gs-row.is-more .gs-big, .gs-sizes li.is-more b { color: var(--smoke); }
.gs-none { margin: 0; font-size: var(--label); color: var(--smoke); }
.gs-sizes { list-style: none; margin: 0; padding: 0; }
.gs-sizes li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: var(--label); }
.gs-sizes li:last-child { border-bottom: 0; }
.gs-sizes b { font-size: 26px; font-weight: 900; }
.gs-sz-p { color: var(--smoke); white-space: nowrap; }
/* The pages read that give no headcount: their own words, under the sizer, not worked out. */
.gs-nohead { margin-top: 32px; max-width: 900px; }
.gs-nohead-h { font-size: 20px; font-weight: 800; line-height: 1.3; padding-bottom: 8px; border-bottom: 1px solid var(--char); }
.gs-nohead ul { list-style: none; margin: 0; padding: 0; }
.gs-nohead li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.gs-nohead p { margin: 0; }
.gs-nohead .gs-item { font-size: 19px; font-weight: 600; }
.gs-chain-in { font-weight: 800; }
.gs-nohead .gs-words { margin-top: 4px; }
@media (min-width: 768px) {
  .gs-ctl { grid-template-columns: auto minmax(0, 1fr); column-gap: 56px; align-items: start; }
  .gs-row { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 40px; align-items: start; }
  .gs-res { padding-top: 4px; }
}

/* ---- 4. Reheat: the ruled chart ------------------------------------------------------------------------------------ */

.rh-scale { margin-top: 16px; font-size: var(--label); line-height: 1.45; color: var(--smoke); max-width: 720px; }
.rh { margin-top: 24px; border-top: 2px solid var(--char); }
.rh-head { display: none; }
.rh-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.rh-row p { margin: 0; }
.rh-method { grid-column: 1 / -1; font-size: 20px; font-weight: 800; line-height: 1.3; }
.rh-no { display: inline-block; margin-right: 10px; padding: 0 8px; border: 2px solid var(--ember-deep); border-radius: 6px; color: var(--ember-deep); font-size: var(--label); font-weight: 800; line-height: 1.5; vertical-align: 2px; }
.rh-k { display: block; font-size: 16px; font-weight: 600; color: var(--smoke); }
.rh-temp b, .rh-min b { font-size: 26px; font-weight: 900; line-height: 1.15; }
.rh-blank { font-size: var(--label); color: var(--smoke); }
.rh-bar { position: relative; display: block; height: 10px; margin-top: 8px; background: var(--line); border-radius: 2px; overflow: hidden; }
.rh-bar i { position: absolute; top: 0; bottom: 0; left: 0; }
.rh-bar .rh-lo { background: var(--char); }
.rh-bar .rh-hi { background: repeating-linear-gradient(90deg, var(--smoke) 0 3px, transparent 3px 5px); }
.rh-steps { grid-column: 1 / -1; font-size: 19px; line-height: 1.5; }
.rh-fix { margin-top: 6px; }
.rh-k2 { display: inline-block; margin-right: 8px; font-size: var(--label); font-weight: 800; }
.rh-steps .fp-src { margin-top: 6px; }
.rh-warn .rh-method { color: var(--char); }
@media (min-width: 1024px) {
  .rh-head { display: grid; grid-template-columns: 250px 140px 170px minmax(0, 1fr); column-gap: 28px; padding: 12px 0; border-bottom: 1px solid var(--char); font-size: var(--label); font-weight: 700; }
  .rh-row { grid-template-columns: 250px 140px 170px minmax(0, 1fr); column-gap: 28px; align-items: start; padding: 20px 0; }
  .rh-method { grid-column: auto; font-size: 19px; }
  .rh-steps { grid-column: auto; }
  .rh-k { display: none; }
  .rh-no { display: block; width: max-content; margin: 0 0 6px; }
}

/* ---- 5. What decides it: the mind map ----------------------------------------------------------------------------- */

.fm { margin: 24px 0 0; }
.fm svg { display: block; overflow: visible; }
.fm .fm-wide { display: none; width: 100%; height: auto; }
.fm-small { display: grid; gap: 8px; }
.fm-narrow { width: 100%; max-width: 440px; height: auto; margin: 0 auto 8px; }
@media (min-width: 1024px) {
  .fm .fm-wide { display: block; }
  .fm .fm-small { display: none; }
}
.fm-hub { fill: var(--fa); }
.fm-hub-in { fill: var(--white); }
.fm-icon { color: var(--char); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.fm-spoke { fill: none; stroke: var(--char); stroke-width: 3; stroke-linecap: round; }
.fm-branch { fill: none; stroke: var(--smoke); stroke-width: 1.5; }
.fm-node { fill: var(--char); }
.fm-leaf-dot { fill: var(--fb); stroke: var(--char); stroke-width: 1.5; }
.fm-spoke-name { font-size: 22px; font-weight: 800; fill: var(--char); }
/* 24 units: 16.8 px on a 320 px phone (the drawing is 400 units wide and 280 px there), more on wider screens. */
.fm-narrow .fm-spoke-name { font-size: 24px; }
.fm-leaf text { font-size: 21px; font-weight: 500; fill: var(--char); }
.fm-leaf:hover text, .fm-leaf:focus-visible text { text-decoration: underline; text-decoration-thickness: 2px; }
.fm-leaf:focus { outline: none; }
.fm-leaf:focus-visible { outline: 3px solid var(--ember); outline-offset: 4px; }
.fm-leaf:focus-visible text { fill: var(--ember-deep); font-weight: 700; }
.fm-to text { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.fm-steam path { fill: none; stroke: var(--smoke); stroke-width: 2.5; stroke-linecap: round; }
/* The leaves as a list, on a phone. */
.fm-list { list-style: none; margin: 0; padding: 0; }
.fm-li { padding: 12px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 6.2em minmax(0, 1fr); column-gap: 12px; }
.fm-li-h { margin: 0; font-size: var(--label); font-weight: 800; line-height: 44px; }
.fm-li ul { list-style: none; margin: 0; padding: 0; }
.fm-li a { display: flex; align-items: center; min-height: 44px; font-size: var(--label); line-height: 1.35; }

/* Motion: steam always (a hot food); the spokes draw out from the hub once, then the leaves arrive. */
@keyframes fm-rise { 0% { transform: translateY(6px); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-16px); opacity: 0; } }
.fm-steam path { animation: fm-rise 2.8s linear infinite; opacity: 0; transform-box: fill-box; }
.fm-steam path:nth-child(2) { animation-delay: -.93s; }
.fm-steam path:nth-child(3) { animation-delay: -1.86s; }
@media (prefers-reduced-motion: reduce) {
  .fm-steam path { animation: none; opacity: .9; }
}
@media (prefers-reduced-motion: no-preference) {
  .fm.is-ready .fm-spoke { stroke-dasharray: 260; stroke-dashoffset: 260; transition: stroke-dashoffset .6s cubic-bezier(.3, .7, .2, 1) calc(var(--d) * .09s); }
  .fm.is-ready .fm-arm { opacity: 0; transition: opacity .45s ease calc(.35s + var(--d) * .09s); }
  .fm.is-on .fm-spoke { stroke-dashoffset: 0; }
  .fm.is-on .fm-arm { opacity: 1; }
}

/* ---- After the text: the food's guides and the sources ------------------------------------------------------------- */

.ae.fp-end { margin-top: 0; gap: 0; }
.ae.fp-end > * { max-width: 900px; }
.fp-arts, .fp-srcs { margin-top: 64px; max-width: 900px; }
.fp-srcs .src-rows span { display: block; color: var(--smoke); }
