:root {
  color-scheme: light;
  --canvas: #f8f5ed;
  --paper: #fffdf7;
  --ink: #292c22;
  --muted: #625e52;
  --olive: #455238;
  --olive-dark: #34412a;
  --rust: #8b493a;
  --line: #dbd2bf;
  --serif: Georgia, 'Times New Roman', serif;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.55;
}

*, ::before, ::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--olive-dark); text-underline-offset: .23em; }
a:hover { color: var(--rust); }
button, input, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.35rem, 6vw, 4.5rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.035em; }
h3 { font-size: 1.45rem; }
.wrap { width: min(70rem, calc(100% - 3rem)); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: 1rem; transform: translateY(-150%); z-index: 1; background: var(--paper); padding: .6rem; }
.skip:focus { transform: none; }

.masthead { border-bottom: 1px solid var(--line); }
.bar { min-height: 5rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font: 1.25rem/1 var(--serif); color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2.6rem; aspect-ratio: 1; border-radius: .55rem; background: var(--olive); color: var(--paper); flex: none; }
.brand-sub { display: block; margin-top: .38rem; font: 650 .59rem/1 system-ui, sans-serif; letter-spacing: .13em; color: var(--muted); }
.brand-mark svg, .button svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.brand-mark svg { width: 1.5rem; height: 1.5rem; }
.bar-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 0 .75rem; }
.bar-actions .button { white-space: nowrap; }
.bar-login { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .92rem; font-weight: 650; white-space: nowrap; }

.button { display: inline-flex; justify-content: center; align-items: center; gap: .5em; min-height: 2.75rem; padding: .57rem .95rem; border: 1px solid transparent; border-radius: .45rem; font-size: .92rem; font-weight: 650; line-height: 1.25; text-decoration: none; text-align: center; cursor: pointer; }
.primary { background: var(--olive); color: var(--paper); }
.primary:hover { background: var(--olive-dark); color: #fff; }
.outline { color: var(--olive-dark); background: transparent; border-color: #9e9c84; }
.outline:hover { color: var(--olive-dark); background: #ece7d8; }
.button:disabled { opacity: .57; cursor: wait; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }

.hero { margin-top: clamp(1.4rem, 4vw, 2.7rem); min-height: 23rem; display: grid; grid-template-columns: 1.14fr 1fr; align-items: center; gap: 1rem; padding: clamp(1.5rem, 5vw, 4rem); border: 1px solid #dcccae; border-radius: 1rem; background: radial-gradient(ellipse at 90% 25%, #f4e5c9, transparent 68%), #f1e8d6; }
.eyebrow { color: var(--rust); font-size: .71rem; font-weight: 750; letter-spacing: .15em; }
.eyebrow + h1, .eyebrow + h2 { margin-top: .48rem; }
.lede { color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); line-height: 1.55; max-width: 37ch; margin-top: .9rem; }
.hero .actions { margin-top: 1.6rem; }
.hero-art { display: block; width: 100%; max-width: 27rem; height: auto; margin-inline: auto; }

.shelf { margin-block: clamp(2.4rem, 6vw, 4rem); }
.section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.15rem; }
.count { color: var(--muted); flex: none; font-size: .9rem; }
.list-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  margin-block: .85rem 1rem;
}
.list-controls label {
  display: grid;
  gap: .25rem;
  flex: 1 1 8rem;
  max-inline-size: 13rem;
  font-size: .88rem;
  font-weight: 650;
}
.list-controls select {
  min-block-size: 2.75rem;
  min-inline-size: 0;
  padding: .45rem .65rem;
  border: 1px solid #a79f8e;
  border-radius: .32rem;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
.recipe-status {
  display: inline-block;
  justify-self: start;
  margin-block-start: .4rem;
  padding: .15rem .5rem;
  border-radius: .3rem;
  background: #f1e5d1;
  color: #604422;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.4;
}
.recipe-status[data-status="ready-for-print"] {
  background: #e3ead9;
  color: #34412a;
}
.paper { border: 1px solid var(--line); border-radius: .7rem; background: var(--paper); }
.empty { padding: clamp(1.3rem, 4vw, 2.15rem); }
.empty p { margin: .55rem 0 .9rem; color: var(--muted); }
.empty a { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; font-weight: 650; }
.recipe-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; margin: 0; padding: 0; }
.index-card { display: flex; justify-content: space-between; align-items: start; gap: .65rem; height: 100%; min-height: 8rem; padding: 1.2rem; color: var(--ink); text-decoration: none; border-top: 3px solid #869272; }
.index-card:hover { border-top-color: var(--rust); }
.index-card h3 { font-size: 1.52rem; }
.index-card p { margin-top: .45rem; font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.card-arrow { color: var(--olive-dark); }
.dish-image { display: block; height: auto; border: 1px solid var(--line); border-radius: .4rem; }
.index-card > .dish-image { flex: none; width: 3.75rem; }
.index-card > .dish-image + div { min-width: 0; margin-inline-end: auto; }

.inner { max-width: 49rem; margin: 1.25rem auto 3.5rem; }
.back { display: inline-flex; align-items: center; min-height: 2.75rem; margin-bottom: 1.15rem; font-size: .9rem; font-weight: 620; }
.inner > h1 { font-size: clamp(2.35rem, 6vw, 3.9rem); }
.inner .lede { max-width: 52ch; }
.entry-paper { margin-top: 1.7rem; padding: clamp(1rem, 4vw, 2rem); }
.photo-panel { background: #f3ede0; border: 1px solid var(--line); border-radius: .5rem; padding: 1rem; margin-bottom: 1.35rem; }
.photo-panel p { margin-top: .45rem; }
.photo-panel > .actions { margin-bottom: .55rem; }
.photo-panel .transcript + .actions { margin-top: .7rem; }
.body-field { display: block; font-weight: 650; }
.body-field { margin-top: 1.1rem; }
input:not([type]), textarea, .account-fields input { display: block; width: 100%; margin-top: .38rem; padding: .68rem .75rem; border: 1px solid #a79f8e; border-radius: .32rem; background: #fffefa; color: var(--ink); font-weight: 400; }
textarea { resize: vertical; min-height: 8rem; }
input::placeholder, textarea::placeholder { color: #6f6a60; }
.fine, .muted { color: var(--muted); }
.fine { font-size: .85rem; font-weight: 400; }
#recipe-hint { margin-top: .35rem; }
.message { font-weight: 600; }
.message:not(:empty) { margin-top: .85rem; }
.message[data-error] { color: #8b3328; }
.transcript { max-height: 15rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--paper); padding: .75rem; border-radius: .3rem; border: 1px solid var(--line); }
.form-actions { border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: 1.2rem; }

.account-page { max-width: 29rem; }
.account-fields { min-width: 0; padding: 0; border: 0; margin: 0; }
.account-fields .body-field:first-of-type { margin-top: 0; }
.account-fields input { border-color: var(--muted); }
.account-switch { margin-top: .85rem; }
.account-control[aria-disabled="true"] { opacity: .57; cursor: wait; }
.access-panel { margin-bottom: 1.25rem; }
.access-note { margin-top: .4rem; }
.access-requests { margin: 0; padding: 0; list-style: none; }
.access-requests > li { justify-content: space-between; padding-top: .65rem; margin-top: .65rem; border-top: 1px solid var(--line); }
.access-request-email { font-weight: 650; overflow-wrap: anywhere; }
#logout-status:not(:empty), #logout-error:not(:empty) { margin-bottom: .85rem; }

.recipe-page {
  padding: clamp(1rem, 5vw, 3.25rem) clamp(1rem, 6vw, 4rem);
  border-radius: 0;
  background: #fdfcf9;
  color: #242321;
  overflow-wrap: anywhere;
}
.recipe-header { margin-block-end: clamp(1.45rem, 4vw, 2.4rem); }
.recipe-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.7rem);
  font-weight: 700;
  font-style: italic;
  letter-spacing: normal;
  text-align: left;
  text-transform: uppercase;
}
.recipe-header .byline { margin-block-start: .6rem; font-style: italic; text-align: right; }
.dish-illustration { width: min(100%, 10rem); margin: 0 0 1.25rem; }
.dish-illustration .dish-image { width: 100%; }
.recipe-text { font-size: 1.05rem; line-height: 1.6; }
.recipe-text p { white-space: pre-wrap; }
.recipe-text h2 {
  margin-block-end: .55rem;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: normal;
}
.recipe-text > * + h2 { margin-block-start: 1.45rem; }
.recipe-text p + p, .recipe-ingredients + p { margin-block-start: .8rem; }
.recipe-ingredients {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2 14rem;
  column-gap: 2.25rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.55;
}
.recipe-ingredients > li { break-inside: avoid; }
.recipe-ingredients > li + li { margin-block-start: .35rem; }

#draft-dialog {
  width: min(46rem, calc(100% - 1rem));
  max-width: none;
  max-height: calc(100% - 1rem);
  max-height: calc(100dvh - 1rem);
  padding: clamp(.5rem, 2vw, .8rem);
  padding-block-start: 0;
  border: 1px solid #a99c84;
  border-radius: .75rem;
  color: var(--ink);
  background: var(--canvas);
  overflow: auto;
  overscroll-behavior: contain;
}
#draft-dialog::backdrop { background: #292c228c; }
.dialog-bar {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  padding-block: .65rem;
  background: var(--canvas);
}
.dialog-bar form { margin-inline-start: auto; }

.footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; align-items: center; padding-block: 1.5rem; color: var(--muted); }
.footer span:first-child { font-family: var(--serif); }
.footer span:last-child { font-size: .68rem; font-weight: 700; letter-spacing: .13em; }

@media (max-width: 42rem) {
  .wrap { width: calc(100% - 2rem); }
  .hero { grid-template-columns: 1fr; gap: .7rem; }
  .hero-art { width: min(100%, 18rem); }
  .index-card > .dish-image { width: 3rem; }
}
@media (max-width: 25rem) {
  .bar .button { padding-inline: .58rem; }
  .brand { font-size: 1.08rem; }
  .brand-sub { font-size: .52rem; }
  .brand-mark { width: 2.2rem; }
}
@media print {
  :root { background: white; }
  .masthead, .footer, .skip, .back, .dish-image, .dish-illustration { display: none; }
  .wrap, .inner { width: 100%; max-width: none; margin: 0; }
  body:has(#recipe-page > .recipe-page, > #draft-dialog[open]) { display: block; min-height: 0; }
  body:has(> #draft-dialog[open]) > main, #draft-dialog::backdrop, .dialog-bar { display: none; }
  #draft-dialog[open] {
    position: static;
    inset: auto;
    width: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .recipe-page { padding: 0; border: 0; background: white; }
  .recipe-header { margin-block-end: 1.35rem; break-inside: avoid; break-after: avoid; }
  .recipe-header h1 { font-size: 24pt; }
  .recipe-text { font-size: 11pt; orphans: 3; widows: 3; }
  .recipe-text h2 { break-after: avoid; }
}
