/*
 * Публічний хост FatRadar (fatradar.com): «Скоро в App Store», «Видалити мою пошту», службові сторінки; далі — сторінка
 * рецепта /r/<token> (шматок S1). Без скриптів, без сторонніх шрифтів (системний набір), світла і темна теми за
 * prefers-color-scheme. Кольори — з макетів пакета Б (docs/mockups/recipe-page-1910/share.html, блок 3): тло #F7F5F2,
 * чорні кнопки магазинів 56 px з радіусом 14, фірмовий градієнт сторіс; знак — салатовий градієнт іконки застосунку.
 * Ширина телефону: бічні поля 16 px, без горизонтальної прокрутки; цілі дотику ≥ 44 px (HIG / Material 3: 48 dp).
 */
:root {
  --bg: #F7F5F2; --surf: #FFFFFF; --ink: #1C1C1E; --muted: #636366; --line: #E5E1DA; --onink: #FFFFFF;
  --accent: #2F6EB5; --err: #B3261E; --ok-bg: #E7F6EA; --ok-ink: #1B5E20; --field: #FFFFFF; --field-line: #C9C4BC;
  --hero: linear-gradient(165deg, #C4E8ED 0%, #DCE6F3 32%, #F5E9F5 58%, #FFE0CD 100%);
  --mark: linear-gradient(135deg, #DFFB28 0%, #A9FA3B 50%, #4FEC5F 100%);
  --focus: 0 0 0 3px rgba(47, 110, 181, .45);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214; --surf: #1C1C1F; --ink: #F2F2F5; --muted: #A1A1AA; --line: #2E2E33; --onink: #000000;
    --accent: #8AB4F8; --err: #F2B8B5; --ok-bg: #16301B; --ok-ink: #B7E4BF; --field: #121214; --field-line: #48484F;
    --hero: linear-gradient(165deg, #1E3A3E 0%, #22293A 32%, #33263A 58%, #3D2A20 100%);
    --focus: 0 0 0 3px rgba(138, 180, 248, .5);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
}
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px 32px; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: none; box-shadow: var(--focus); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none;
  font-size: 19px; font-weight: 760; letter-spacing: -.2px; }
.mark { width: 36px; height: 36px; border-radius: 10px; background: var(--mark); display: inline-flex;
  align-items: center; justify-content: center; flex: none; }
.mark img { width: 26px; height: 26px; display: block; }
.lang { font-size: 15px; color: var(--muted); }
.lang a { display: inline-block; padding: 10px 4px; color: var(--muted); }
.lang a[aria-current="page"] { color: var(--ink); font-weight: 650; text-decoration: none; }

.hero { margin: 8px 0 16px; padding: 24px 20px; border-radius: 24px; background: var(--hero); }
h1 { margin: 0; font-size: 28px; line-height: 1.18; font-weight: 780; letter-spacing: -.5px; }
.lead { margin: 10px 0 0; font-size: 17px; line-height: 1.45; color: var(--ink); opacity: .82; }

.card { background: var(--surf); border: 1px solid var(--line); border-radius: 20px; padding: 20px 16px; margin: 0 0 16px; }
.card p { margin: 0 0 12px; }
.form-lead { color: var(--muted); font-size: 16px; }
.field-label { display: block; font-size: 15px; font-weight: 600; margin: 4px 0 6px; }
input[type="email"] {
  width: 100%; height: 52px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--field-line);
  background: var(--field); color: var(--ink); font: inherit; font-size: 17px;
}
input[aria-invalid="true"] { border-color: var(--err); }
.consent { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0 18px; font-size: 15px; line-height: 1.4; cursor: pointer; }
.consent input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--ink); }
button {
  width: 100%; min-height: 54px; border: 0; border-radius: 16px; background: var(--ink); color: var(--onink);
  font: inherit; font-size: 17px; font-weight: 680; cursor: pointer;
}
button:active { transform: scale(.985); }
button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--field-line); }
.err { color: var(--err); font-weight: 600; font-size: 15px; }
.done { background: var(--ok-bg); border-color: transparent; color: var(--ok-ink); font-weight: 600; }
.done p { margin: 0; }

/* Пастка для ботів: поза екраном і поза деревом доступності (aria-hidden у розмітці). */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.stores { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.store { min-height: 56px; border-radius: 14px; background: #000; color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 17px; font-weight: 650; text-decoration: none; padding: 0 16px; text-align: center; }
@media (prefers-color-scheme: dark) { .store { background: #fff; color: #000; } }
.already p { margin: 0 0 8px; color: var(--muted); font-size: 15px; }

.links { margin: 4px 0 0; font-size: 15px; }
.links a { display: inline-block; padding: 10px 0; }
footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
footer a { color: var(--muted); display: inline-block; padding: 8px 0; }

@media (prefers-reduced-motion: reduce) { button:active { transform: none; } }

/* Сторінка рецепта /r/<token> (шматок S1; макет share.html, блок 3 + сторінка варіант А): обкладинка, КБЖВ великим,
   складники, приготування, заклик із кнопками магазинів. Текст автора — звичайний текст, довгі слова переносяться. */
.recipe .cover { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; margin: 4px 0 14px; }
.recipe h1 { margin: 6px 0 12px; }
.recipe h2 { font-size: 20px; line-height: 1.25; font-weight: 740; margin: 0 0 10px; }
.recipe h3 { font-size: 16px; font-weight: 700; margin: 14px 0 4px; }
.kbju { background: var(--surf); border: 1px solid var(--line); border-radius: 22px; padding: 16px; margin: 0 0 16px; font-variant-numeric: tabular-nums; }
.kbju .big { display: flex; align-items: flex-end; gap: 8px; margin: 0; }
.kbju .big b { font-size: 64px; line-height: 56px; font-weight: 800; letter-spacing: -2px; }
.kbju .big span { font-size: 15px; line-height: 18px; font-weight: 650; color: var(--muted); padding-bottom: 4px; }
.m3 { display: grid; grid-template-columns: repeat(3, 1fr); margin: 12px 0 0; border-top: 1px solid var(--line); }
.m3 div { padding: 8px 0 0; }
.m3 div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.m3 dt { font-size: 13px; color: var(--muted); order: 2; }
.m3 dd { margin: 0; font-size: 24px; line-height: 30px; font-weight: 760; }
.m3 div { display: flex; flex-direction: column-reverse; }
.kbju .tot { margin: 10px 0 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.ings, .prep, .cta { background: var(--surf); border: 1px solid var(--line); border-radius: 22px; padding: 16px; margin: 0 0 16px; }
.ings ul { list-style: none; margin: 0; padding: 0; }
.ings li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ings li:first-child { border-top: 0; padding-top: 0; }
.ings .n { font-weight: 600; }
.ings .n small { font-weight: 400; color: var(--muted); }
.ings .q { color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.ings .k { grid-column: 1 / -1; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.prep .how { margin: 0 0 6px; color: var(--muted); font-weight: 600; }
.prep .steps { margin: 0; padding-left: 22px; }
.prep .steps li { margin: 0 0 6px; }
.cta { background: var(--hero); border: 0; }
.cta p { margin: 0 0 14px; }
.note { font-size: 14px; color: var(--muted); }
.note .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
