/* The 2026 redesign's shared components (docs/design/redesign-2026): header, footer, logo, buttons, chips, the recipe card
   with its Save pill, the masonry wall, board mosaics, kitchen tabs, the board picker and the people dots. It loads after
   application.css, follow.css and library.css (stylesheets sort by name) and before print.css, so it wins over their
   older rules at equal specificity. Colours are tokens only (see :root in application.css). */

/* --- Page frame --------------------------------------------------------------------------------------------- */
.wrap { max-width: 1360px; padding-left: clamp(16px, 3vw, 40px); padding-right: clamp(16px, 3vw, 40px); }

/* --- Logo: the smiling tomato and a live Fraunces wordmark ------------------------------------------------- */
.logo { --logo: 20px; align-items: center; gap: calc(var(--logo-pot) * .22); color: var(--ink); }
.logo__pot { height: var(--logo-pot); width: auto; }
.logo__word { height: auto; width: auto; margin: 0; font: 800 calc(var(--logo-pot) * .65)/1 var(--font-display); letter-spacing: -.02em; white-space: nowrap; }
.logo--on-iron { color: var(--on-iron); }
.site-footer .logo { --logo: 17px; color: var(--ink); }
.site-footer .logo__word { font-size: 22px; }

/* --- Header ------------------------------------------------------------------------------------------------ */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.site-header__row { gap: 10px 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { gap: 9px; color: var(--ink); }
.site-nav { gap: 2px; font-size: 15px; max-width: 100%; }
.site-nav__link { padding: 0 14px; border-radius: var(--radius-pill); border-bottom: 0; }
.site-nav__link:hover { background: var(--linen); color: var(--ink); }
.site-nav__link[aria-current="page"] { background: var(--ink); color: var(--on-ink); border-bottom: 0; }
/* A small basis so the search shrinks before the actions wrap (prod adds "Add to Chrome" beside them). */
.search { flex: 1 1 140px; min-width: 0; }
/* Signed in, the account menu already offers the extension; drop the button where the row runs out of room. */
@media (max-width: 1240px) { .site-actions:has(.account-menu) .site-actions__store { display: none; } }
.search .icon { left: 18px; top: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input { height: 46px; border: 0; border-radius: var(--radius-pill); padding: 0 18px 0 46px; background: var(--linen); font-size: 15px; }
.search input:focus-visible { outline: 2px solid var(--tomato-text); outline-offset: 2px; }
.site-header .site-actions { flex-wrap: nowrap; gap: 8px; }
.site-header .site-actions > * { flex: none; }
.site-header .site-actions .button { width: auto; min-height: 44px; padding: 0 16px; font-weight: 700; }
.site-actions__add .icon { stroke-width: 2.4; }
.site-actions__link { order: -1; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--radius-pill); }
.site-actions__link:hover { background: var(--linen); color: var(--ink); }
.avatar { width: 44px; height: 44px; background: var(--sage); color: var(--paper); font-weight: 700; font-size: 16px; }
.account-menu summary:focus-visible { outline: 2px solid var(--tomato-text); outline-offset: 2px; border-radius: var(--radius-pill); }
.account-menu__list { border-radius: var(--radius-lg); padding: var(--space-4) var(--space-6) var(--space-4) var(--space-4); box-shadow: var(--shadow-float); }
@media (max-width: 600px) {
  .site-header__row { gap: 8px 12px; }
  .site-nav { order: 3; flex: 1 1 100%; }
  .search { order: 4; flex-basis: 100%; }
  .site-header .site-actions { margin-left: auto; }
}
/* On a phone the + icon carries "Add a recipe" (the link keeps its aria-label), so a long label (Spanish) cannot push the header wider than the screen. */
@media (max-width: 480px) {
  .site-actions__add span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .site-header .site-actions .site-actions__add { padding: 0; width: 44px; justify-content: center; }
}

/* --- Footer: cream, links wrap ------------------------------------------------------------------------------ */
.site-footer { background: var(--paper); border-top: 1px solid var(--rule); color: var(--ink-soft); }
.site-footer__row { padding-top: 40px; padding-bottom: 40px; gap: 28px 48px; justify-content: flex-start; }
.site-footer__about { max-width: 300px; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); }
.site-footer__links { flex: 1 1 400px; column-gap: 22px; row-gap: 0; }
.site-footer__links a { min-height: 36px; color: var(--ink-soft); }
.site-footer__links a:hover { color: var(--tomato-text); }
.locale-picker .link-button { color: var(--ink-soft); }
.locale-picker .link-button:hover { color: var(--tomato-text); }
.site-footer__legal { color: var(--muted); }
.site-footer__legal a { color: var(--ink-soft); }
@media (hover: none) { .site-footer__links a, .locale-picker .link-button { min-height: 44px; } }

/* --- Buttons and chips: pills ------------------------------------------------------------------------------- */
.button { border-radius: var(--radius-pill); font-weight: 700; }
.button--secondary { background: var(--linen); color: var(--ink); }
.button--secondary:hover { background: var(--rule-strong); color: var(--ink); }
.button--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.button--ghost:hover { background: var(--linen); color: var(--ink); }
.chip { border-color: transparent; background: var(--linen); font-weight: 600; }
.chip:hover { background: var(--rule-strong); border-color: transparent; color: var(--ink); }
.chip[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.tag { background: var(--linen); font-weight: 500; }

/* --- Recipe card and the masonry wall ----------------------------------------------------------------------- */
.wall { columns: 5 170px; column-gap: 18px; }
.wall .card { break-inside: avoid; margin-bottom: 18px; }
.card { gap: 8px; }
.card__photo { border-radius: var(--radius-lg); }
.card__title { font: 600 15px/1.35 var(--font-sans); letter-spacing: 0; }
.card__link:hover { text-decoration: none; }
.card__title .card__link:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card__body { gap: 3px; }
.card__credit { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--muted); min-width: 0; }
.card__credit .credit-link { min-width: 0; overflow-wrap: anywhere; }
.card__dot { flex: none; width: 18px; height: 18px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; justify-content: center;
  font: 700 10px/1 var(--font-sans); color: #FFFFFF; background: var(--persimmon); }
.card__dot--1 { background: #3F6B34; }
.card__dot--2 { background: #8A6508; }
.card__dot--3 { background: #23201B; }
.card__dot--4 { background: #8A5A44; }
@media (prefers-color-scheme: dark) { .card__dot--3 { background: #5A4F44; } }

/* The Save pill sits on the photo's corner: shown on hover or keyboard focus, always on touch screens, and always
   once saved. */
.favorite--card { top: 10px; right: 10px; opacity: 0; transition: opacity .12s ease; }
.card:hover .favorite--card, .card:focus-within .favorite--card, .favorite--card:focus-within { opacity: 1; }
.favorite--card:has(.is-saved) { opacity: 1; }
@media (hover: none) { .favorite--card { opacity: 1; } }
.favorite__button { min-height: 36px; padding: 0 16px; border: 1px solid transparent; background: var(--persimmon); color: var(--on-persimmon); font-weight: 700; box-shadow: 0 2px 8px rgba(35, 32, 27, .18); }
.favorite__button:hover { background: var(--persimmon-hover); color: var(--on-persimmon); border-color: transparent; }
.favorite__button.is-saved { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.favorite__button.is-saved:hover { background: var(--ink-soft); border-color: var(--ink-soft); color: var(--on-ink); }
.favorite--card .favorite__button.is-saved { border-color: var(--ink); }
.favorite--keep .favorite__button { background: var(--persimmon); border-color: transparent; color: var(--on-persimmon); box-shadow: none; }
.favorite--keep .favorite__button.is-saved { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.favorite--out .favorite__button { background: transparent; border: 1.5px dashed var(--rule-strong); color: var(--muted); }
.cook-head .favorite__button.is-saved { background: var(--card); border-color: var(--rule); color: var(--tomato-text); }

/* --- Board covers: one big photo, two small, 3px apart ------------------------------------------------------ */
.mosaic { gap: 3px; border-radius: var(--radius-lg); }
.tiles--boards .mosaic { border-radius: var(--radius-lg); }
.tile__title { font: 700 16px/1.3 var(--font-sans); letter-spacing: 0; }
.tiles--boards .tile__title { font: 800 26px/1.15 var(--font-display); letter-spacing: -.02em; }

/* --- Kitchen tabs: pills, the active one filled ink, counts muted ------------------------------------------- */
.tabs { gap: 6px; }
.tab { height: 44px; padding: 0 16px; color: var(--ink); }
.tab:hover { background: var(--linen); color: var(--ink); }
.tab[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.tab__count { margin-left: 6px; font-weight: 500; color: var(--muted); }
.tab[aria-current="page"] .tab__count { color: var(--on-ink); opacity: .75; }

/* --- Board picker: a floating white card -------------------------------------------------------------------- */
.board-picker__pop { padding: var(--space-3); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-float); }
.picker__row { padding: 8px; border-radius: 12px; font-weight: 600; }
.picker__row:hover, .picker__row:focus-visible { background: var(--linen); }
.picker__thumb { border-radius: 10px; }
.picker__check { border-width: 2px; }
.picker__check.is-on { background: var(--sage); border-color: var(--sage); color: var(--paper); }
.picker__new { padding-top: var(--space-2); border-top: 1px solid var(--rule); }
.picker__new .input { border-radius: var(--radius-pill); background: var(--linen); border-color: transparent; padding: 0 16px; }
.picker__new .button { min-height: 40px; }

/* --- People: round initial dots in the palette -------------------------------------------------------------- */
.who { color: #FFFFFF; font-weight: 700; letter-spacing: 0; }

/* Fraunces ships upright only, so emphasis in a heading is colour, not a synthesized slant. */
h1 em, h2 em, h3 em, .display em, .front em { font-style: normal; color: var(--tomato-text); }
.hero:not(.hero--paper) em, .shared em, .site-footer em, .iron-card em { color: var(--iron-link); }

/* --- Display type ------------------------------------------------------------------------------------------- */
h1, h2, h3 { text-wrap: balance; }
.display { font-size: clamp(34px, 4vw, 48px); line-height: 1.08; }
.hero__title { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.04; }
