:root {
  font-family: 'DM Sans', Arial, sans-serif;
  color: #25352d;
  background: #f7f5ef;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: Newsreader, Georgia, serif;
  font-weight: 500;
}
h1 {
  font-size: clamp(2.8rem, 5vw, 5.2rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}
h2 {
  font-size: 2rem;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.35rem;
}
p {
  line-height: 1.6;
}
input,
textarea,
select {
  min-width: 0;
  border: 1px solid #d6dcd1;
  border-radius: 9px;
  background: #fff;
  padding: 12px 13px;
  color: #25352d;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #577967;
  outline-offset: 1px;
}
textarea {
  width: 100%;
  resize: vertical;
}
button:not(.text-button):not(.brand):not(.inline-link):not(.back-link):not(.recipe-card) {
  background: #315741;
  border: 1px solid #315741;
  color: #fff;
  border-radius: 9px;
  padding: 11px 17px;
  font-weight: 600;
}
button.secondary {
  background: transparent !important;
  color: #315741 !important;
  border-color: #a8b8a8 !important;
}
button.small {
  font-size: 0.86rem;
  padding: 8px 12px !important;
}
.text-button,
.back-link,
.inline-link {
  background: none;
  border: 0;
  color: #426e53;
  padding: 0;
  font-weight: 600;
}
.text-button:hover,
.back-link:hover,
.inline-link:hover {
  text-decoration: underline;
}
.danger {
  color: #a24536 !important;
}
.wide {
  width: 100%;
}
.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  color: #6a866f;
  font-weight: 700;
}
.shell {
  min-height: 100vh;
}
.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(32px, calc((100vw - 1312px) / 2));
  border-bottom: 1px solid #dce3d8;
  background: #fbfaf6;
  gap: 24px;
}
.brand {
  font-family: Newsreader, Georgia, serif !important;
  font-size: 1.65rem;
  font-weight: 600;
  border: 0;
  background: none;
  color: #284534;
  padding: 0;
  white-space: nowrap;
}
.brand em {
  font-weight: 400;
}
.brand-mark {
  font-family: Arial, sans-serif;
  font-size: 1.05rem;
  margin-left: 7px;
  color: #bd8f57;
}
.topbar nav {
  display: flex;
  gap: 8px;
  height: 100%;
  align-items: center;
}
.topbar nav button {
  border: 0;
  background: none;
  color: #6e786d;
  padding: 10px 14px;
  font-weight: 600;
}
.topbar nav button.active {
  color: #315741;
  border-bottom: 2px solid #315741;
  border-radius: 0;
}
.account {
  display: flex;
  gap: 15px;
  align-items: center;
  color: #69766a;
  font-size: 0.87rem;
}
.account .text-button {
  font-size: 0.84rem;
}
.page,
.review-page {
  max-width: 1240px;
  margin: auto;
  padding: 48px 30px 100px;
}
.boot {
  padding: 15vh 10vw;
}
.sign-in {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 75% 20%, #e5ece0, transparent 45%), #f7f5ef;
  padding: 20px;
}
.sign-card {
  max-width: 560px;
  background: #fffdf9;
  padding: clamp(28px, 6vw, 70px);
  box-shadow: 0 15px 60px #24402b12;
  border: 1px solid #e4e6dc;
  border-radius: 20px;
}
.sign-card h1 {
  margin: 15px 0 23px;
}
.sign-card p {
  font-size: 1.12rem;
  color: #617062;
}
.sign-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 25px 0;
}
.sign-card small {
  color: #819082;
}
.hero {
  min-height: 282px;
  background: #e9eee4;
  border: 1px solid #dce5d9;
  border-radius: 17px;
  padding: 45px 52px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  position: relative;
  overflow: hidden;
}
.hero:after {
  content: '✳';
  font-size: 310px;
  position: absolute;
  right: 18%;
  top: -120px;
  color: #d3e0d1;
  line-height: 1;
  pointer-events: none;
}
.hero > * {
  position: relative;
  z-index: 1;
}
.hero h1 {
  margin: 10px 0 12px;
}
.hero h1 em {
  color: #597c5f;
  font-weight: 400;
}
.hero p {
  margin: 0;
  color: #627366;
  font-size: 1.07rem;
}
.hero button {
  white-space: nowrap;
}
.book-controls {
  display: flex;
  gap: 22px;
  justify-content: space-between;
  margin: 34px 0 35px;
  align-items: center;
  flex-wrap: wrap;
}
.search-box {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid #d9e0d6;
  border-radius: 11px;
  min-width: min(100%, 380px);
  max-width: 540px;
  flex: 1;
  padding: 0 13px;
}
.search-box span {
  font-size: 1.8rem;
  color: #859a87;
}
.search-box input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 13px;
}
.search-box input:focus {
  outline: none;
}
.search-box button {
  background: none !important;
  border: 0 !important;
  color: #647c69 !important;
  padding: 0 4px !important;
  font-size: 1.4rem;
}
.filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  background: #eeeee7;
  padding: 5px;
  border-radius: 10px;
}
.filters button {
  background: transparent !important;
  color: #637166 !important;
  border: 0 !important;
  padding: 9px 13px !important;
  font-size: 0.87rem;
}
.filters button.active {
  background: #fff !important;
  color: #315741 !important;
  box-shadow: 0 2px 6px #2a493017;
}
.list-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: #738076;
}
.list-heading h2 {
  color: #2e4736;
  margin-bottom: 20px;
}
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.recipe-card {
  text-align: left;
  border: 1px solid #dfe4dc;
  background: #fffdf9;
  border-radius: 13px;
  min-height: 205px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  color: #273f30;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px #34523b12;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #6e8975;
}
.type-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  background: #e8f0e6;
  padding: 6px 9px;
  border-radius: 5px;
}
.recipe-card strong {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.75rem;
  font-weight: 500;
  margin: 18px 0 8px;
}
.card-desc {
  font-size: 0.85rem;
  color: #68776b;
}
.card-foot {
  margin-top: auto;
  padding-top: 23px;
  font-size: 0.75rem;
  color: #8b978c;
}
.card-foot span {
  padding: 0 4px;
}
.match-reason {
  font-size: 0.82rem;
  color: #59745c;
  margin-top: 11px;
  border-left: 2px solid #a9c0a6;
  padding-left: 9px;
}
.empty-state {
  text-align: center;
  padding: 85px 20px;
  background: #fffdf9;
  border: 1px dashed #d2ddce;
  border-radius: 14px;
}
.empty-state h2 {
  margin: 8px 0;
}
.empty-state p {
  max-width: 430px;
  margin: 0 auto 23px;
  color: #69766b;
}
.empty-icon {
  font-size: 3.1rem;
  color: #9caf9c;
}
.clarification {
  background: #f0e9d9;
  color: #6f603e;
  padding: 14px 18px;
  border-radius: 9px;
}
.back-link {
  display: inline-block;
  margin-bottom: 30px;
}
.recipe-heading {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: end;
  border-bottom: 1px solid #d9e0d6;
  padding-bottom: 30px;
  margin-bottom: 30px;
}
.recipe-heading h1 {
  margin: 10px 0;
}
.recipe-heading p {
  color: #6f7a6c;
  margin: 0;
}
.recipe-layout,
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(305px, 0.8fr);
  gap: 25px;
}
.recipe-main,
.editor-main,
.editor-side {
  min-width: 0;
}
.reading-card,
.form-card,
.nutrition-card,
.memory-compose {
  background: #fffdf9;
  border: 1px solid #e0e5dd;
  border-radius: 13px;
  padding: 28px;
  margin-bottom: 22px;
}
.reading-card h2,
.form-card h2,
.nutrition-card h2 {
  margin-bottom: 19px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
}
.section-head p {
  color: #748074;
  font-size: 0.9rem;
}
.scale-control {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 0.85rem;
  color: #68796a;
}
.scale-control select {
  padding: 7px 8px;
}
.ingredients {
  padding: 0;
  margin: 8px 0;
  list-style: none;
}
.ingredients li {
  border-bottom: 1px solid #edf0e8;
  padding: 15px 0;
  display: flex;
  gap: 17px;
  align-items: baseline;
}
.ingredients li strong {
  min-width: 68px;
  color: #45684d;
}
.ingredients li span {
  flex: 1;
}
.ingredients li small {
  display: block;
  color: #879486;
  font-size: 0.79rem;
  margin-top: 3px;
}
.view-only {
  font-size: 0.78rem;
  color: #909b90;
  margin: 18px 0 0;
}
.instructions {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.23rem;
  line-height: 1.62;
  color: #38473a;
}
.instructions p {
  line-height: 1.63;
}
.nutrition-card {
  background: #f0f2e9;
}
.nutrition-card h2 {
  margin: 8px 0 18px;
}
.nutrient-group {
  border-top: 1px solid #d4dece;
  padding: 17px 0;
}
.nutrient-group h3 {
  margin: 0 0 4px;
}
.nutrient-group > p {
  font-size: 0.81rem;
  color: #778274;
  margin: 0 0 10px;
}
.nutrient-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}
.nutrient-row span small {
  display: block;
  color: #8b9388;
  font-size: 0.7rem;
  margin-top: 2px;
}
.nutrient-row strong {
  white-space: nowrap;
}
.nutrient-row strong small {
  font-weight: 400;
}
.portion-input {
  border-top: 1px solid #d4dece;
  padding: 17px 0;
}
.portion-input h3 {
  margin-bottom: 9px;
}
.portion-input .form-grid {
  grid-template-columns: 2fr 1fr;
}
.editor-page h1 {
  margin: 12px 0 28px;
}
.editor-layout {
  align-items: start;
}
.editor-side {
  position: sticky;
  top: 18px;
}
.form-card h2 {
  margin-bottom: 14px;
}
.form-card > p {
  color: #6d7c6f;
  font-size: 0.89rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  margin-bottom: 16px;
}
.field > span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #526955;
}
.field input,
.field select {
  width: 100%;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ingredient-fields {
  grid-template-columns: minmax(100px, 2fr) minmax(80px, 1fr) minmax(80px, 1fr) minmax(100px, 1.5fr);
}
.ingredient-editor {
  border-top: 1px solid #e4e9df;
  padding: 20px 0 5px;
}
.ingredient-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}
.ingredient-source {
  display: flex;
  gap: 18px;
  margin: 4px 0 18px;
  font-size: 0.87rem;
  color: #506650;
}
.ingredient-source label,
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ingredient-source input,
.check input,
.manual-review input {
  accent-color: #315741;
}
.chosen-food {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  align-items: center;
  background: #eff4ea;
  padding: 13px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.chosen-food small {
  display: block;
  width: 100%;
  color: #6b786b;
}
.muted {
  font-size: 0.82rem;
  color: #879387;
}
.food-picker,
.manual-food {
  background: #f3f5ef;
  border: 1px solid #dce5d8;
  border-radius: 9px;
  padding: 16px;
  margin-top: 12px;
}
.food-picker .field {
  margin-bottom: 8px;
}
.food-hits {
  display: grid;
  max-height: 240px;
  overflow: auto;
  margin: 12px 0;
}
.food-hits button {
  background: #fff !important;
  color: #33513b !important;
  border: 1px solid #dbe3d6 !important;
  text-align: left;
  margin: 3px 0;
}
.food-hits small {
  display: block;
  color: #859185;
}
.manual-food h4 {
  margin: 0 0 15px;
}
.override {
  border-top: 1px solid #e7ebe2;
  padding: 14px 0;
}
.override .check {
  font-weight: 600;
  margin-bottom: 11px;
}
.override .field {
  margin-bottom: 8px;
}
.manual-review {
  background: #f6eee0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
  font-size: 0.85rem;
}
.manual-review p {
  margin: 6px 0;
  color: #796e5b;
}
.manual-review label {
  display: block;
  margin: 6px 0;
}
.editor-actions .wide {
  margin: 9px 0 15px;
}
.review-page > p {
  color: #667668;
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.review-grid section {
  background: #fffdf9;
  border: 1px solid #dfe5dd;
  border-radius: 12px;
  padding: 22px;
  min-width: 0;
}
.review-grid h2 {
  font-size: 1.4rem;
}
.exact-object,
.conflict pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 60vh;
  overflow: auto;
  background: #f5f5ef;
  padding: 17px;
  border-radius: 7px;
  font-size: 0.78rem;
  line-height: 1.5;
}
.review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 25px;
}
.empty-copy {
  color: #879486;
}
.warning {
  background: #f5ead9;
  border-left: 3px solid #b78c50;
  padding: 12px;
  color: #72593b;
}
.notice {
  max-width: 1240px;
  margin: 16px auto 0;
  padding: 12px 18px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.notice button {
  background: none !important;
  border: 0 !important;
  color: inherit !important;
  font-size: 1.3rem;
  padding: 0 !important;
}
.notice.success {
  background: #e6f0e3;
  color: #305b38;
}
.notice.error {
  background: #f8e7df;
  color: #924b37;
}
.conflict {
  max-width: 1240px;
  margin: 16px auto;
  padding: 22px;
  border: 1px solid #d9b997;
  background: #f8eddd;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}
.conflict h2 {
  font-size: 1.5rem;
  margin: 6px 0;
}
.conflict p {
  margin: 0 0 8px;
}
.conflict details {
  max-width: 750px;
}
.page-intro {
  max-width: 720px;
  margin-bottom: 30px;
}
.page-intro h1 {
  margin: 12px 0;
}
.page-intro p {
  color: #667969;
}
.memory-compose {
  max-width: 790px;
}
.memory-compose h2 {
  font-size: 1.7rem;
}
.row-end {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.memory-list {
  max-width: 790px;
  display: grid;
  gap: 14px;
}
.memory-card {
  border: 1px solid #dfe5dd;
  background: #fffdf9;
  border-radius: 11px;
  padding: 22px;
}
.memory-card p {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.memory-card small {
  color: #788579;
}
.memory-card details {
  margin-top: 15px;
  color: #66786a;
  font-size: 0.83rem;
}
.memory-card details p {
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 0.82rem;
  margin: 9px 0;
}
.card-actions {
  display: flex;
  gap: 17px;
  margin-top: 18px;
}
.original {
  color: #8e795f;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1240px;
  margin: auto;
  padding: 25px 30px 45px;
  border-top: 1px solid #e0e5dc;
  color: #8b978b;
  font-size: 0.75rem;
}
footer span {
  margin-left: auto;
  color: #b4a084;
}
@media (max-width: 850px) {
  .topbar {
    height: auto;
    min-height: 74px;
    padding: 12px 24px;
    flex-wrap: wrap;
  }
  .topbar nav {
    order: 3;
    width: 100%;
    height: auto;
  }
  .topbar nav button {
    padding: 8px 9px;
  }
  .account {
    margin-left: auto;
  }
  .recipe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .recipe-layout,
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .editor-side {
    position: static;
  }
  .hero:after {
    right: 0;
  }
  .book-controls {
    align-items: stretch;
  }
  .filters {
    max-width: 100%;
  }
}
@media (max-width: 560px) {
  .page,
  .review-page {
    padding: 28px 17px 70px;
  }
  .topbar {
    padding: 10px 17px;
    gap: 8px;
  }
  .brand {
    font-size: 1.45rem;
  }
  .account {
    gap: 8px;
    font-size: 0.75rem;
  }
  .topbar nav {
    gap: 0;
  }
  .topbar nav button {
    font-size: 0.78rem;
  }
  .hero {
    min-height: 0;
    padding: 32px 23px;
    display: block;
  }
  .hero:after {
    font-size: 210px;
    top: -70px;
    right: -45px;
  }
  .hero h1 {
    font-size: 3.2rem;
  }
  .hero p {
    font-size: 0.94rem;
  }
  .hero button {
    margin-top: 23px;
  }
  .book-controls {
    margin: 23px 0;
    gap: 15px;
  }
  .search-box {
    min-width: 100%;
  }
  .filters {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
  .filters button {
    font-size: 0.69rem;
    padding: 8px 2px !important;
  }
  .recipe-grid {
    grid-template-columns: 1fr;
  }
  .recipe-card {
    min-height: 175px;
  }
  .recipe-heading {
    display: block;
  }
  .recipe-heading h1 {
    font-size: 3.3rem;
  }
  .recipe-heading button {
    margin-top: 22px;
  }
  .reading-card,
  .form-card,
  .nutrition-card,
  .memory-compose {
    padding: 21px;
  }
  .section-head {
    flex-wrap: wrap;
  }
  .ingredients li {
    gap: 11px;
  }
  .ingredient-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ingredient-fields .field:first-child {
    grid-column: 1/-1;
  }
  .form-grid {
    gap: 9px;
  }
  .review-grid {
    grid-template-columns: 1fr;
  }
  .review-actions {
    flex-direction: column-reverse;
  }
  .conflict {
    margin: 12px 17px;
    display: block;
  }
  .conflict button {
    margin-top: 15px;
  }
  footer {
    padding: 20px 17px 35px;
  }
}
.food-provenance {
  margin-top: 8px;
  font-size: 0.78rem;
  color: #657866;
}
.food-provenance summary {
  cursor: pointer;
  color: #3d6a4b;
  font-weight: 600;
}
.food-provenance dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 5px;
  margin: 9px 0;
}
.food-provenance dt {
  font-weight: 700;
}
.food-provenance dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.review-content h3 {
  margin: 2px 0 6px;
  font-size: 1.6rem;
}
.review-content h4 {
  margin: 17px 0 6px;
}
.review-content p,
.review-content li {
  overflow-wrap: anywhere;
}
.review-content ul {
  padding-left: 20px;
}
.review-content details {
  margin-top: 15px;
  color: #52745a;
}
.review-content summary {
  cursor: pointer;
}
.review-text {
  white-space: pre-wrap;
}
.review-meta {
  font-size: 0.75rem;
  color: #829182;
}
.review-memory {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.3rem;
}
.topbar nav button {
  background: transparent !important;
  border: 0 !important;
  color: #6e786d !important;
  border-radius: 0 !important;
}
.topbar nav button.active {
  color: #315741 !important;
  border-bottom: 2px solid #315741 !important;
}
