:root {
  color-scheme: light;
  --paper: #f8f7f2;
  --white: #fffefa;
  --ink: #222b22;
  --muted: #536054;
  --forest: #203d32;
  --leaf: #dce8d9;
  --line: #d9dfd4;
  --accent: #edf0bb;
  --serif: Georgia, 'Times New Roman', serif;
  font: 100%/1.55 system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #527f63; outline-offset: 3px; }
textarea { resize: vertical; }
h1, h2, h3, h4, h5, h6, p { margin: 0; overflow-wrap: anywhere; }
h1, h2, h3, h4, h5, h6 { line-height: 1.1; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.55rem; }
.shell { width: min(100% - 3rem, 75rem); margin-inline: auto; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; justify-content: space-between; align-items: center; min-height: 5rem; gap: 1rem; }
.brand { font: bold 1.36rem/1 var(--serif); text-decoration: none; white-space: nowrap; }
.brand-mark { color: var(--forest); font: 1.28rem system-ui; margin-right: .2rem; }
nav, .actions, .entry-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
nav { gap: clamp(.6rem, 2vw, 1.35rem); }
nav a { text-decoration: none; font-size: .94rem; }
nav .active { text-decoration: underline; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  border: 1px solid transparent; border-radius: 999px; padding: .64rem 1.1rem;
  text-decoration: none; font-weight: 650; font-size: .92rem; line-height: 1.3;
  text-align: center; min-height: 2.6rem;
}
.primary { background: var(--forest); color: white; }
.primary:hover { background: #335747; }
.secondary { border-color: var(--line); color: var(--forest); background: var(--white); }
.secondary:hover { background: var(--leaf); }
.quiet {
  border: 0; padding: .35rem .15rem; color: var(--forest); background: none;
  text-decoration: underline; text-underline-offset: .25em; font-size: .9rem;
}
.quiet:hover { color: #3f664c; }
.danger { color: #a1372e; }
.skip { position: absolute; left: 1rem; top: -6rem; background: white; padding: .8rem; z-index: 3; }
.skip:focus { top: .5rem; }
main { min-height: 64vh; padding-block: 2rem 4rem; }
.site-footer { border-top: 1px solid var(--line); padding-block: 1.5rem 2rem; color: var(--muted); }
.hero {
  display: grid; grid-template-columns: 1fr .95fr; min-height: 23rem;
  background: var(--forest); color: var(--white); border-radius: 1.45rem; overflow: hidden;
}
.hero-copy { align-self: center; padding: clamp(2rem, 5vw, 4.75rem); }
.hero h1 { max-width: 9ch; letter-spacing: -.05em; }
.hero p { color: #edf1e6; max-width: 33ch; margin: 1rem 0 1.35rem; }
.hero-button { background: var(--accent); color: #263621; }
.hero-button:hover { background: #faf4c9; }
.hero-photo {
  min-height: 15rem;
  background: #304d3b url('/assets/images/hero.webp') center / cover no-repeat;
}
.feed { margin-top: 2.2rem; scroll-margin-top: 1rem; }
.section-top { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.15rem; }
.section-top p, .page-heading p { margin-top: .45rem; }
.muted { color: var(--muted); }
.search { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; max-width: 100%; }
input:not([type=checkbox]), textarea {
  min-width: 0; width: 100%; padding: .65rem .82rem; border-radius: .55rem;
  border: 1px solid #aab8ac; color: var(--ink); background: var(--white);
}
.search input { width: min(53vw, 21rem); border-radius: 999px; }
.empty { padding: clamp(1.5rem, 4vw, 3rem); border: 1px dashed #aab8ac; border-radius: 1.05rem; text-align: center; background: var(--white); }
.empty p { margin: .5rem 0; color: var(--muted); }
.empty .button { margin-top: .5rem; }
.empty-mark { font-size: 1.6rem; color: var(--forest); display: block; margin-bottom: .35rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1.15rem; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; background: var(--white); }
.cover { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--leaf); text-decoration: none; overflow: hidden; }
.cover img { display: block; height: 100%; width: 100%; object-fit: cover; }
.cover-placeholder { color: #4f725c; font-size: 3.2rem; }
.card-body { padding: .9rem 1rem 1rem; }
.byline, .card-meta { font-size: .88rem; color: var(--muted); }
.card h3 { margin: .3rem 0 .45rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.tags a { text-decoration: none; background: #eef1e8; border-radius: 999px; padding: .2rem .55rem; font-size: .88rem; overflow-wrap: anywhere; }
.tags a:hover { background: var(--leaf); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: .45rem; margin-top: .65rem; }
.results > .button { margin-top: 1rem; }
.page-heading { margin-bottom: 1.25rem; }
.profile-banner { display: flex; align-items: start; gap: clamp(.7rem, 3vw, 1.5rem); background: var(--leaf); border-radius: 1.2rem; padding: clamp(1rem, 4vw, 2rem); }
.profile-banner > div { min-width: 0; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: clamp(3.3rem, 8vw, 5.3rem); aspect-ratio: 1; border-radius: 50%; background: var(--forest); color: white; font: 1.5rem var(--serif); }
.recipe-heading .actions { margin-top: 1rem; }
.recipe-heading h1 { margin-block: .4rem .6rem; letter-spacing: -.035em; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .8rem; margin-top: 1.25rem; }
.gallery img { width: 100%; height: clamp(15rem, 32vw, 28rem); object-fit: cover; display: block; border-radius: 1rem; }
.directions, .recipe-content { margin-top: 1.8rem; max-width: 55rem; }
.directions p, .recipe-part li { white-space: pre-wrap; overflow-wrap: anywhere; }
.directions p { margin-top: .7rem; }
.recipe-group { border-left: 2px solid #adc6b0; padding-left: clamp(.45rem, 1.25vw, 1rem); margin: 1.1rem 0; }
.recipe-part { margin-top: 1rem; }
.recipe-part li { margin-bottom: .4rem; }
.stack { display: grid; gap: 1rem; }
.field { display: grid; gap: .3rem; font-weight: 640; }
.field small { font-size: .88rem; font-weight: 400; color: var(--muted); }
.check { display: flex; gap: .55rem; align-items: center; overflow-wrap: anywhere; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--forest); flex: none; }
.editor { max-width: 56rem; }
.form-section { background: var(--white); border: 1px solid var(--line); border-radius: .9rem; padding: clamp(.7rem, 3vw, 1.4rem); display: grid; gap: .65rem; }
.form-section h2 { font-size: 1.7rem; }
.editor-entry { border-left: 2px solid #a9c3ad; padding-left: clamp(.35rem, 1.3vw, .8rem); margin-bottom: .75rem; }
.editor-group { background: #f8faf5; padding-block: .65rem; }
.editor-entry .entry-actions { margin-block: .3rem .55rem; }
.editor-photos { display: flex; flex-wrap: wrap; gap: .8rem; }
.editor-photos:empty, .error:empty { display: none; }
.editor-photos img { display: block; width: 7rem; height: 5rem; object-fit: cover; border-radius: .5rem; }
.error { color: #a1372e; font-size: .94rem; margin-top: .4rem; }
.new-list { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; margin-block: .85rem; }
.new-list .field { flex: 1 1 14rem; }
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; margin-top: 1rem; }
.list-link { display: block; background: var(--leaf); border-radius: .8rem; padding: 1.25rem; font: 1.4rem var(--serif); text-decoration: none; overflow-wrap: anywhere; }
.list-link:hover { text-decoration: underline; }
.list-options { display: grid; gap: .55rem; }
.back { margin-bottom: .5rem; }
dialog { width: min(calc(100% - 2rem), 30rem); max-height: calc(100% - 2rem); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 4vw, 1.6rem); color: var(--ink); background: var(--white); }
dialog::backdrop { background: #17291eb3; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.auth-switch { margin-top: .9rem; }
@media (max-width: 42rem) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { align-items: start; flex-direction: column; padding-block: .9rem; gap: .6rem; }
  main { padding-top: 1rem; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 1.5rem; }
  .hero-photo { min-height: 12rem; }
  .search input { width: min(57vw, 18rem); }
}
