/* Crumbpress brand guide v1.0 (November 2026): Figtree throughout; Flour ground, Cream cards,
   Butter for the main button and hero blocks, Ink for the mark and all text, Tomato only for crumbs
   and small marks (red text is Paprika), Basil for saved/imported, Stone for captions.
   Corners: cards 18, buttons and fields 12, tags fully round. Text on Butter is always Ink. */

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/figtree-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/figtree-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --butter: #ffd25a;
  --butter-deep: #f5c443; /* hover on Butter only */
  --ink: #1d1a17;
  --tomato: #e8472b;
  --flour: #fffcf6;
  --cream: #fff4dc;
  --basil: #1f6b45;
  --paprika: #b8321c;
  --stone: #6f6a63;
  --line: #ebe3d3; /* hairlines on Flour */
  --line-strong: #8a847b; /* field outlines */
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-card: 18px;
  --r-button: 12px;
  --r-small: 8px;
  /* Three crumbs, three sizes, each turned a little. */
  --crumbs: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 78 28'%3E%3Cg fill='%23E8472B'%3E%3Crect x='2' y='3' width='22' height='22' rx='6.200' transform='rotate(12 13 14)'/%3E%3Crect x='32' y='5' width='15' height='15' rx='4.200' transform='rotate(-20 39.500 12.500)'/%3E%3Crect x='55' y='5' width='18' height='18' rx='5' transform='rotate(8 64 14)'/%3E%3C/g%3E%3C/svg%3E");
  --crumbs-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 78 28'%3E%3Cg fill='%231D1A17'%3E%3Crect x='2' y='3' width='22' height='22' rx='6.200' transform='rotate(12 13 14)'/%3E%3Crect x='32' y='5' width='15' height='15' rx='4.200' transform='rotate(-20 39.500 12.500)'/%3E%3Crect x='55' y='5' width='18' height='18' rx='5' transform='rotate(8 64 14)'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--flour);
  color: var(--ink);
  font: 400 17px/27px var(--font);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font); margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-weight: 800; font-size: clamp(2rem, 6vw, 2.5rem); line-height: 1.12; }
h2 { font-weight: 700; font-size: 22px; line-height: 28px; letter-spacing: -0.01em; }
h3 { font-weight: 700; font-size: 18px; line-height: 24px; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--paprika); text-underline-offset: 2px; }
img { max-width: 100%; }
strong { font-weight: 700; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px clamp(16px, 4vw, 40px);
}
/* The lockup. Keep half an icon's height clear around it; never restyle the wordmark. */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; border-radius: var(--r-small); }
.brand-icon { width: 38px; height: 38px; display: block; flex: none; }
.wordmark { font: 800 1.5rem/1 var(--font); letter-spacing: -0.02em; text-transform: lowercase; }
.site-nav { display: flex; gap: 4px; align-items: center; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-button); color: var(--ink); font-weight: 600; text-decoration: none; }
.nav-link:hover { background: var(--cream); }
.site-nav .btn { margin-left: 6px; }

main { max-width: 1120px; margin: 0 auto; padding: 16px clamp(16px, 4vw, 40px) 72px; outline: none; }

/* ---------- controls */

.btn, .chip, .seg, .tab, select, input, textarea { font: inherit; color: inherit; }

/* Three buttons: Butter (the main one), Ink, and outlined. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 1.500px solid var(--ink);
  border-radius: var(--r-button);
  background: var(--flour);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--cream); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--butter); border-color: var(--butter); }
.btn-primary:hover { background: var(--butter-deep); border-color: var(--butter-deep); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--flour); }
.btn-dark:hover { background: #33302c; }
.btn-quiet { border-color: transparent; background: none; font-weight: 600; }
.btn-on { background: var(--ink); color: var(--flour); }
.btn-on:hover { background: var(--ink); }
.btn-danger { border-color: transparent; background: none; color: var(--paprika); }
.btn-wide { width: 100%; }

.field-input,
input[type='text'], input[type='url'], input[type='number'], input[type='search'], input[type='password'], input[type='email'], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.500px solid var(--line-strong);
  border-radius: var(--r-button);
  background: #fff;
  color: var(--ink);
}
input::placeholder, textarea::placeholder { color: var(--stone); opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
textarea { line-height: 1.5; resize: vertical; }
input[type='file'] { width: 100%; padding: 22px 14px; border: 1.500px dashed var(--line-strong); border-radius: var(--r-button); background: #fff; }

/* Tags and filters: fully round, Cream; the chosen one is Ink. */
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { background: #fdeac0; }
.chip-on, .chip-on:hover { background: var(--ink); color: var(--flour); }

/* Label: 600, 12px caps. */
.eyebrow { font-size: 12px; line-height: 18px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--stone); }
.eyebrow-basil { color: var(--basil); }
.heart { color: var(--tomato); }
.back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 8px; color: var(--stone); font-weight: 600; text-decoration: none; }
.back:hover { color: var(--ink); }

/* A tomato crumb between two facts. */
.dot { display: inline-block; width: 7px; height: 7px; margin: 0 10px 2px; border-radius: 2.500px; background: var(--tomato); transform: rotate(12deg); vertical-align: middle; }

/* The crumbs as a divider and as a loading state. */
.crumb-rule { display: flex; align-items: center; gap: 18px; margin: 8px 0; }
.crumb-rule::before, .crumb-rule::after { content: ''; flex: 1; height: 1.500px; background: var(--ink); }
.crumb-rule span { width: 50px; height: 18px; background: var(--crumbs-ink) center / contain no-repeat; }
.crumbs { display: inline-block; width: 78px; height: 28px; background: var(--crumbs) center / contain no-repeat; }
.loading { display: flex; align-items: center; gap: 14px; color: var(--stone); }
.loading .crumbs { width: 56px; height: 20px; animation: crumb-pulse 1.200s ease-in-out infinite; }
@keyframes crumb-pulse { 50% { opacity: 0.35; } }

/* ---------- library */

.library-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar .search { flex: 1 1 240px; }
.toolbar select { width: auto; flex: 0 1 auto; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.count { margin: 18px 0 12px; color: var(--stone); font-size: 15px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; align-items: start; }
.card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-card);
  background: var(--cream);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}
.card:hover { background: #fdeac0; }
.card-art { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--butter); }
.card-body { padding: 18px 20px 20px; display: grid; gap: 2px; }
.card-body h3 { font-size: 19px; line-height: 25px; }
.card-facts { color: var(--stone); font-size: 15px; line-height: 22px; }
.empty { grid-column: 1 / -1; padding: 40px 0; text-align: center; color: var(--stone); }
.footnote { margin-top: 36px; font-size: 15px; color: var(--stone); }

.message { max-width: 480px; margin: 10vh auto; text-align: center; display: grid; gap: 16px; justify-items: center; }
.message p { color: var(--stone); }

/* ---------- recipe page */

.recipe { max-width: 960px; margin: 0 auto; }
.recipe-head { display: grid; gap: 24px; align-items: start; }
.recipe-head > div { display: grid; gap: 10px; }
.recipe-head h1 { font-size: clamp(2rem, 6vw, 2.750rem); }
.lede { font-size: 19px; line-height: 29px; color: var(--stone); max-width: 60ch; }
.source { font-size: 15px; line-height: 22px; color: var(--stone); }
.hero { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-card); }

.facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 6px 0 0; padding: 14px 0; border-top: 1.500px solid var(--ink); }
.facts dt { font-size: 12px; line-height: 18px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--stone); }
.facts dd { margin: 0; font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.actions .btn { min-height: 44px; padding: 0 16px; }

.columns { display: grid; gap: 32px; margin-top: 24px; }
.columns h2 { margin-bottom: 14px; }
.columns h3 { margin: 20px 0 6px; }

.scale { display: flex; align-items: stretch; margin-bottom: 14px; border-radius: var(--r-button); overflow: hidden; background: var(--cream); width: fit-content; max-width: 100%; padding: 4px; gap: 2px; }
.seg { min-width: 48px; min-height: 40px; border: 0; border-radius: var(--r-small); background: none; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.seg:hover { background: #fdeac0; }
.seg-on, .seg-on:hover { background: var(--ink); color: var(--flour); }
.scale .scale-custom { width: 84px; min-height: 40px; padding: 4px 8px; border: 0; border-radius: var(--r-small); background: none; text-align: center; }
.scale-note { margin-top: 12px; font-size: 15px; line-height: 22px; color: var(--stone); }

.ingredients { list-style: none; margin: 0; padding: 0; }
.ingredients label { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; cursor: pointer; }
.ingredients input { width: 20px; height: 20px; margin: 3px 0 0; flex: none; accent-color: var(--ink); }
.ingredients strong { font-variant-numeric: tabular-nums; }
.ingredients input:checked + span { color: var(--stone); text-decoration: line-through; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 16px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 14px; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--butter);
  font: 700 15px/1 var(--font);
  color: var(--ink);
}
.notes { margin-top: 32px; padding: 20px 24px; border-radius: var(--r-card); background: var(--cream); display: grid; gap: 8px; }
.notes h2 { margin: 0; }

.originals { margin-top: 40px; }
.originals h2 { margin-bottom: 12px; }
.original-photos { display: flex; flex-wrap: wrap; gap: 12px; }
.original-photos img { height: 180px; border-radius: var(--r-button); display: block; }

@media (min-width: 820px) {
  .recipe-head:has(.hero) { grid-template-columns: 1.300fr 1fr; }
  .columns { grid-template-columns: minmax(280px, 1fr) 1.700fr; gap: 56px; }
  .col-ingredients { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow: auto; padding-right: 4px; }
}

/* ---------- add / edit */

.add { max-width: 760px; margin: 0 auto; }
.add h1 { margin-bottom: 20px; }

/* The ways to add a recipe: a Cream card each, icon first. The chosen one is outlined in Ink. */
.tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 20px; }
.tab {
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1.500px solid transparent;
  border-radius: var(--r-button);
  background: var(--cream);
  text-align: left;
  cursor: pointer;
}
.tab:hover { background: #fdeac0; }
.tab svg { grid-row: span 2; width: 24px; height: 24px; }
.tab strong { font-size: 16px; line-height: 22px; }
.tab small { font-size: 13px; line-height: 18px; color: var(--stone); }
.tab-on, .tab-on:hover { border-color: var(--ink); background: var(--cream); }
.icon { fill: none; stroke: currentColor; stroke-width: 2.400; stroke-linecap: round; stroke-linejoin: round; }

.panel form, .recipe-form { display: grid; gap: 16px; }
.panel form > .btn { justify-self: start; }

.field { display: grid; gap: 6px; }
.field > span { font-weight: 700; font-size: 15px; line-height: 22px; }
.field small, .hint { color: var(--stone); font-size: 15px; line-height: 22px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; align-items: start; }
.hint.warn, .hint.review { padding: 14px 18px; border-radius: var(--r-button); background: var(--cream); color: var(--ink); }
.hint.review { margin-bottom: 18px; }
.clip-hint { margin-top: 4px; }

/* A blog that wouldn't let us read its page: what happened, then the ways to keep the recipe anyway. */
.blocked { display: grid; gap: 12px; margin-top: 14px; padding: 18px 20px; border-radius: var(--r-card); background: var(--cream); }
.ways { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 16px; }
.ways li { display: grid; gap: 6px; justify-items: start; padding-top: 14px; border-top: 1.500px solid var(--ink); }
.ways h3 { font-size: 17px; line-height: 23px; }
.ways p { font-size: 15px; line-height: 23px; }
.way-form { display: grid; gap: 8px; width: 100%; }
.way-form .inline-form { width: 100%; }

/* A recipe kept as a link only. */
.link-only { display: grid; gap: 12px; justify-items: start; max-width: 640px; margin-top: 24px; padding: 24px; border-radius: var(--r-card); background: var(--cream); }
.link-only .stack { width: 100%; margin-top: 8px; padding-top: 18px; border-top: 1.500px solid var(--ink); }
.bookmarklet { min-height: 32px; padding: 0 12px; font-size: 14px; cursor: grab; vertical-align: baseline; }
.form-error { color: var(--paprika); font-weight: 700; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.previews { display: flex; flex-wrap: wrap; gap: 10px; }
.previews img { height: 120px; border-radius: var(--r-small); }
.steps-list { padding-left: 1.400em; display: grid; gap: 10px; margin: 16px 0; }

/* ---------- landing, notices, sign-in, account */

.landing { display: grid; gap: 28px; }
/* The hero block: Butter, Ink type, one row of crumbs. */
.hero-block {
  display: grid;
  gap: 16px;
  padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 56px);
  border-radius: 28px;
  background: var(--butter);
}
.hero-block h1 { font-size: clamp(2.500rem, 9vw, 3.500rem); line-height: 1.07; }
.hero-block .lede { color: var(--ink); max-width: 46ch; text-wrap: pretty; }
.hero-block .crumbs { width: 96px; height: 34px; }
.try-box { padding: clamp(18px, 4vw, 32px); border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; display: grid; gap: 16px; max-width: 760px; width: 100%; margin: 0 auto; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }
.features { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 24px; }
.features li { display: grid; gap: 6px; align-content: start; padding-top: 14px; border-top: 1.500px solid var(--ink); }
.features p { color: var(--stone); font-size: 15px; line-height: 23px; }

.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 20px; margin-bottom: 20px; border-radius: var(--r-card); background: var(--cream); }
.notice p { flex: 1 1 260px; }
.try-box .notice, .panel .notice { margin-bottom: 0; }

.card-page { max-width: 520px; margin: clamp(8px, 6vh, 60px) auto 0; display: grid; gap: 16px; }
.stack { display: grid; gap: 14px; justify-items: start; }
.stack .field { width: 100%; }
.plan { padding: 24px; border-radius: var(--r-card); background: var(--cream); display: grid; gap: 12px; justify-items: start; }
.plan-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.status { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.status::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--basil); }

/* ---------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: min(92vw, 480px);
  padding: 14px 20px;
  border-radius: var(--r-button);
  background: var(--ink);
  color: var(--flour);
  font-weight: 600;
}

[hidden] { display: none !important; }

@media (max-width: 560px) {
  body { font-size: 16px; line-height: 25px; }
  .wordmark { font-size: 1.200rem; }
  .brand-icon { width: 32px; height: 32px; }
  .brand { gap: 8px; }
  .site-header { gap: 8px; }
  .nav-link { padding: 0 8px; }
  .nav-home { display: none; } /* the logo already goes there */
  .site-nav .btn { padding: 0 10px; min-height: 44px; margin-left: 0; font-size: 15px; }
  .nav-link { font-size: 15px; }
  .inline-form { flex-direction: column; }
  .tabs { grid-template-columns: 1fr; }
  .form-actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .loading .crumbs { animation: none; }
}

/* ---------- print: just the recipe, on paper */

@media print {
  :root { --flour: #fff; --cream: #fff; --butter: #fff; --stone: #444; --line: #ccc; }
  body { font-size: 10.500pt; line-height: 15pt; }
  .site-header, .back, .actions, .notice, .scale, .scale-custom, .originals, .toast, .tags, .ingredients input { display: none !important; }
  main { padding: 0; max-width: none; }
  .recipe { max-width: none; }
  .hero { display: none; }
  .columns { grid-template-columns: 1fr 1.800fr; gap: 28px; }
  .col-ingredients { position: static; max-height: none; overflow: visible; }
  .steps li { break-inside: avoid; }
  .steps li::before { border: 1px solid #000; }
  .notes { padding: 0; }
  .ingredients input:checked + span { color: inherit; text-decoration: none; }
  a { color: inherit; text-decoration: none; }
}
