:root {
  --paper: #f5f1e8;
  --ink: #20221d;
  --muted: #67695f;
  --green: #315b45;
  --line: #d5d0c4;
  --amber: #8a5d18;
  --red: #9a3029;
}
* {
  box-sizing: border-box;
}
html {
  font-size: 16px;
  min-height: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.55;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
h1,
h2,
h3 {
  font-family: Georgia, serif;
  line-height: 1.1;
}
h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  letter-spacing: -0.04em;
}
.container {
  max-width: 1080px;
}
.navbar {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.navbar-brand {
  font-family: Georgia, serif;
  color: var(--ink);
  font-weight: bold;
}
.navbar-brand span {
  display: inline-grid;
  place-items: center;
  background: var(--green);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 8px;
}
.navbar .nav-link {
  color: var(--ink);
}
main {
  min-height: 70vh;
  padding: 64px 0 96px;
}
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
}
.footer .container {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--muted);
  margin: 0 0 8px;
}
.hero {
  max-width: 800px;
  padding: 7vh 0;
}
.hero h1 {
  max-width: 700px;
}
.hero > p:not(.eyebrow) {
  font-size: 1.25rem;
  max-width: 650px;
  color: var(--muted);
}
.actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 20px;
  border: 0;
  border-radius: 4px;
  background: var(--green);
  color: white;
  text-decoration: none;
  font-weight: 700;
}
.button:disabled {
  opacity: 0.5;
}
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.principles article {
  padding: 32px 32px 0 0;
}
.principles span,
.meal-time {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.page-head,
.analysis-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}
.page-head h1 {
  margin: 0;
}
.meal-list {
  border-top: 1px solid var(--line);
}
.meal-row {
  display: grid;
  grid-template-columns: 180px 1fr 130px;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.meal-row h2 {
  margin: 0 0 8px;
}
.meal-row p {
  margin: 0;
}
.status {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.empty {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.empty.compact {
  padding: 32px;
}
.form-page {
  max-width: 720px;
}
.form-page h1 {
  margin-top: 0;
}
.field {
  margin: 24px 0;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}
.field small {
  color: var(--muted);
  font-weight: 400;
}
input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  background: #fffdf8;
  border: 1px solid #aaa69c;
  border-radius: 3px;
  color: var(--ink);
}
textarea {
  resize: vertical;
}
.field span,
.validation {
  color: var(--red);
}
.meal-photo {
  display: block;
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  background: #e9e4d9;
  margin: 32px 0;
}
.analysis-head {
  margin-top: 48px;
}
.analysis-head h2 {
  margin: 0;
}
.notice,
.estimate-label,
.caveats {
  padding: 16px 20px;
  border-left: 3px solid var(--green);
  background: #e9eee8;
  margin: 24px 0;
}
.warning {
  border-color: var(--amber);
  background: #f2e9d8;
}
.score-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 36px 0;
}
.score span {
  font-family: Georgia, serif;
  font-size: 5rem;
}
.score small {
  display: block;
  color: var(--muted);
}
.score-grid dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}
.score-grid dl div {
  background: var(--paper);
  padding: 14px;
}
.score-grid dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted);
}
.score-grid dd {
  font-size: 1.15rem;
  margin: 4px 0;
}
.analysis-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.fine-print,
.caveats {
  font-size: 0.9rem;
  color: var(--muted);
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.danger-zone {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.danger {
  background: none;
  color: var(--red);
  border: 1px solid var(--red);
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 3px;
}
@media (max-width: 700px) {
  main {
    padding-top: 40px;
  }
  .footer .container,
  .page-head,
  .analysis-head {
    flex-direction: column;
  }
  .principles,
  .analysis-columns,
  .field-grid,
  .score-grid {
    grid-template-columns: 1fr;
  }
  .meal-row {
    grid-template-columns: 1fr;
  }
  .score-grid dl {
    grid-template-columns: 1fr 1fr;
  }
  .actions {
    flex-wrap: wrap;
  }
}
.date-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 2rem;
}
.date-nav input {
  min-height: 42px;
  padding: 0.5rem;
  border: 1px solid var(--line);
  background: #fffdf7;
}
.date-nav a {
  padding: 0.5rem 0.7rem;
}
.home-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.home-summary article {
  border: 1px solid var(--line);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.25);
}
.home-summary span,
.home-summary small {
  display: block;
  color: var(--muted);
}
.home-summary strong {
  display: block;
  font-size: 1.7rem;
  margin: 0.35rem 0;
}
.timeline {
  display: grid;
  gap: 0.65rem;
}
.timeline-card {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 1rem;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}
.timeline-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.timeline-card h3 {
  margin: 0.15rem 0;
  font-size: 1.15rem;
}
.timeline-card p {
  margin: 0;
  color: var(--muted);
}
.timeline-links {
  display: flex;
  gap: 0.75rem;
}
.timeline-links a {
  font-size: 0.9rem;
}
.timeline-section {
  margin-top: 2rem;
}
.home-head {
  margin-bottom: 0;
}
.product-filters {
  margin: 2rem 0 0;
  padding: 1.1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.24);
}
.product-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}
.product-search input,
.product-sort select {
  min-height: 46px;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fffdf7;
}
.product-filter-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.85rem;
}
.product-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.product-checks label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  cursor: pointer;
}
.product-checks input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--green);
}
.product-sort {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
}
.product-sort select {
  min-width: 180px;
}
.product-empty {
  max-width: 600px;
  margin: 3.5rem auto;
  padding: 2.5rem;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.product-empty h2 {
  font-size: 2rem;
  margin: 0.35rem 0;
}
.product-empty > p:not(.eyebrow) {
  color: var(--muted);
}
.product-empty .actions {
  justify-content: center;
  margin-top: 1.5rem;
}
.product-list {
  margin-top: 2rem;
}
@media (max-width: 700px) {
  .home-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .timeline-card {
    grid-template-columns: 52px 1fr;
  }
  .timeline-links {
    grid-column: 2;
  }
  .timeline-links a {
    padding: 0.35rem 0;
  }
  .date-nav {
    justify-content: space-between;
  }
  .product-search {
    grid-template-columns: 1fr;
  }
  .product-filter-options {
    align-items: stretch;
    flex-direction: column;
  }
  .product-sort {
    display: grid;
    grid-template-columns: auto 1fr;
  }
  .product-sort select {
    min-width: 0;
  }
  .product-empty {
    margin: 2rem 0;
    padding: 2rem 1rem;
  }
  .product-empty .actions {
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
  }
}
