:root {
  --paper: #f7f1e6;
  --paper-deep: #efe6d4;
  --ink: #1c1915;
  --muted: #6b6358;
  --faint: #8a8174;
  --rule: #d8cebe;
  --rule-strong: #2c261c;
  --accent: #b58a12;
  --accent-soft: #f1e2b0;
  --card: #fffdf8;
  --action-bg: #efefef;
  --serif: "Libre Baskerville", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Source Sans Pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 68rem;
  --measure: 40rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #fff8e8 0%, transparent 50%),
    var(--paper);
}

a {
  color: var(--ink);
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 10;
  padding: 0.5rem 0.8rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.35rem;
}

.skip:focus {
  top: 1rem;
  color: var(--paper);
}

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.15rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-header nav a {
  font-size: 0.92rem;
  color: var(--muted);
  text-decoration: none;
}

.hero {
  max-width: 36rem;
  margin: 0 0 2.75rem;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.6;
}

.section-label {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.recipe-index {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.recipe-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  box-shadow: 0 1px 0 rgba(28, 25, 21, 0.04);
}

.recipe-card a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 1.1rem;
  padding: 1.15rem 1.2rem 1.2rem;
  text-decoration: none;
  color: inherit;
}

.recipe-card a:hover,
.recipe-card a:focus-visible {
  color: inherit;
}

.recipe-card a:hover .card-title,
.recipe-card a:focus-visible .card-title {
  color: var(--accent);
}

.card-num {
  grid-row: 1 / span 3;
  align-self: start;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  padding-top: 0.15rem;
}

.card-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  transition: color 0.15s ease;
}

.card-desc {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.card-meta {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  color: var(--faint);
}

.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font-size: 0.9rem;
}

.site-footer a {
  color: inherit;
}

/* Recipe page */

.recipe-header h1 {
  margin: 0 0 0.7rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 5.5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.deck {
  margin: 0 0 1.15rem;
  max-width: 42rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--muted);
}

.facts {
  margin: 0 0 1.25rem;
  padding: 0.85rem 0;
  border-top: 1.5px solid var(--rule-strong);
  border-bottom: 1.5px solid var(--rule-strong);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

button.btn {
  appearance: none;
}

.columns {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  gap: 2rem 2.5rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

h2 {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 0.35rem;
}

.group + .group {
  margin-top: 1.15rem;
}

.group h3 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
}

.ings {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.4;
}

.ings td {
  vertical-align: baseline;
  padding: 0.12rem 0;
}

.ings td.qty {
  text-align: right;
  white-space: nowrap;
  width: 7.5rem;
  font-variant-numeric: tabular-nums;
  padding-left: 0.75rem;
  color: var(--ink);
}

ol.steps {
  list-style: decimal;
  margin: 0;
  padding-left: 1.3rem;
}

ol.steps li {
  margin: 0 0 0.55rem;
  padding-left: 0.3rem;
}

ol.steps li:last-child {
  margin-bottom: 0;
}

ol.steps .title {
  font-weight: 700;
}

.method-table-section {
  margin: 0 0 2rem;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule-strong);
  background: var(--card);
}

table.cfe {
  width: 100%;
  min-width: 52rem;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.86rem;
  line-height: 1.3;
}

table.cfe td {
  border: 1px solid var(--rule-strong);
  vertical-align: middle;
  padding: 0.4rem 0.55rem;
}

table.cfe .ing {
  text-align: left;
  background: #fff;
}

table.cfe .action {
  text-align: center;
  background: var(--action-bg);
}

table.cfe .empty {
  background: #fff;
}

table.cfe .group {
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--paper-deep);
  padding: 0.35rem 0.55rem;
}

table.cfe .final {
  text-align: center;
  background: var(--action-bg);
  font-weight: 600;
  padding: 0.6rem 0.55rem;
}

.credit {
  margin: 0;
  font-size: 0.88rem;
  color: var(--faint);
}

.credit a {
  color: inherit;
}

@media (max-width: 800px) {
  .wrap {
    width: min(var(--max), calc(100% - 1.75rem));
  }

  .columns {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-title { transition: none; }
}


/* Our bakes */
.bakes {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.bakes > h2 {
  margin-bottom: 1rem;
}

.bake {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  padding: 1.15rem 1.2rem 1.25rem;
}

.bake + .bake {
  margin-top: 1rem;
}

.bake-when {
  margin: 0 0 0.2rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.bake-occasion {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.bake-note {
  margin: 0 0 0.95rem;
  font-size: 1.02rem;
  line-height: 1.45;
}

.bake-photos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bake-photos a {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.4rem;
  background: var(--paper-deep);
  color: inherit;
}

.bake-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox {
  border: 0;
  padding: 0.75rem 0.75rem 0.9rem;
  background: transparent;
  max-width: min(1600px, calc(100vw - 2rem));
  color: #fff;
}

.lightbox::backdrop {
  background: rgba(20, 16, 12, 0.88);
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 6rem);
  margin: 0 auto;
  border-radius: 0.25rem;
}

.lightbox figcaption {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.95rem;
}

.lightbox-close {
  display: block;
  margin: 0.7rem auto 0;
}

@media (max-width: 700px) {
  .bake-photos {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media print {
  :root {
    --paper: #fff;
    --card: #fff;
    --ink: #000;
    --muted: #000;
    --faint: #222;
  }

  @page {
    size: letter;
    margin: 0.55in 0.55in 0.5in 0.55in;
  }

  html,
  body {
    background: #fff;
    color: #000;
    font-size: 10.5pt;
    line-height: 1.3;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .skip,
  .site-header nav,
  .actions,
  .no-print,
  .bakes,
  .lightbox {
    display: none !important;
  }

  .wrap {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .site-header {
    margin-bottom: 0.15in;
    padding-bottom: 0.06in;
    border-bottom: 0.5pt solid #000;
  }

  .brand-mark {
    font-size: 7.5pt;
    color: #000;
  }

  .brand-name {
    font-size: 10pt;
  }

  .recipe-header h1 {
    font-size: 20pt;
    margin-bottom: 0.06in;
  }

  .deck {
    font-size: 10.5pt;
    margin-bottom: 0.09in;
    color: #000;
  }

  .facts {
    font-size: 9pt;
    line-height: 1.4;
    padding: 0.07in 0;
    margin-bottom: 0.12in;
    border-top: 0.7pt solid #000;
    border-bottom: 0.7pt solid #000;
  }

  .columns {
    display: grid;
    grid-template-columns: 2.55in 1fr;
    gap: 0.22in 0.28in;
    margin-bottom: 0.16in;
  }

  h2 {
    font-size: 8pt;
    padding-bottom: 0.03in;
    margin-bottom: 0.08in;
    border-bottom: 0.6pt solid #000;
    color: #000;
  }

  .group + .group {
    margin-top: 0.1in;
  }

  .group {
    break-inside: avoid;
  }

  .group h3 {
    font-size: 10.5pt;
    margin-bottom: 0.04in;
  }

  .ings,
  ol.steps {
    font-size: 10.5pt;
    line-height: 1.28;
  }

  .ings td {
    padding: 0.012in 0;
  }

  .ings td.qty {
    width: 1.15in;
    padding-left: 0.08in;
  }

  ol.steps {
    padding-left: 0.22in;
  }

  ol.steps li {
    margin: 0 0 0.045in;
    padding-left: 0.06in;
    break-inside: avoid;
  }

  .method-table-section {
    break-before: page;
    margin: 0;
  }

  .method-table-section h2 {
    margin-top: 0;
  }

  .table-scroll {
    overflow: visible;
    border: 0;
  }

  table.cfe {
    min-width: 0;
    font-size: 8pt;
    line-height: 1.2;
    break-inside: avoid;
  }

  table.cfe td {
    border: 0.6pt solid #000;
    padding: 0.035in 0.06in;
  }

  table.cfe .group {
    background: #fff;
    font-size: 7.5pt;
  }

  table.cfe .action,
  table.cfe .final {
    background: #efefef;
  }

  .site-footer,
  .credit {
    margin-top: 0.08in;
    padding-top: 0.06in;
    border-top: 0.5pt solid #000;
    font-size: 8pt;
    color: #000;
  }
}
