:root {
  --bg: #f6faf7;
  --surface: #ffffff;
  --soft: #eaf7f3;
  --ink: #0c2030;
  --muted: #596872;
  --line: #d7e4df;
  --teal: #058579;
  --teal-dark: #006c63;
  --teal-soft: #dff4ef;
  --tomato: #f2675b;
  --tomato-soft: #ffe1dc;
  --sun: #ee9f26;
  --shadow: 0 18px 45px rgba(12, 32, 48, 0.08);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(135deg, rgba(223, 244, 239, 0.55), transparent 34%), var(--bg);
}

a {
  color: inherit;
}

.site-header,
.site-footer,
.hero,
.planner-shell,
.save-section,
.tomorrow-section,
.fit-section,
.resources {
  max-width: 1220px;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

.site-header,
.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.brand strong,
.site-header nav a:hover,
.site-footer nav a:hover {
  color: var(--teal);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--teal);
  color: #fff;
}

.brand-mark svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.brand-mark .mark-cut {
  fill: var(--teal);
}

.site-header nav,
.site-footer nav {
  display: flex;
  justify-content: center;
  gap: 34px;
  font-size: 0.9rem;
  font-weight: 700;
}

.site-header nav a,
.site-footer nav a,
.button,
.header-cta,
.footer-cta,
.resource-box a,
.fit-callout a,
.resource-list a {
  text-decoration: none;
}

.header-cta,
.footer-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--radius);
  padding: 0 18px;
  font-size: 0.94rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.header-cta,
.footer-cta {
  color: #fff;
  background: var(--tomato);
  box-shadow: 0 12px 22px rgba(242, 103, 91, 0.18);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(360px, 1.12fr);
  align-items: center;
  gap: 52px;
  padding-top: 58px;
  padding-bottom: 34px;
}

.hero h1 {
  max-width: 650px;
  margin: 0 0 22px;
  font-size: clamp(2.8rem, 5.2vw, 5rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero p {
  max-width: 560px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.35vw, 1.32rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button.primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 14px 30px rgba(5, 133, 121, 0.18);
}

.button.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.74);
  color: var(--teal-dark);
}

.hero-media {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow);
  background: var(--surface);
}

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

.planner-shell,
.fit-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 35px rgba(12, 32, 48, 0.05);
}

.planner-shell {
  padding-top: 28px;
  padding-bottom: 26px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 22px;
}

h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.section-heading p {
  max-width: 580px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.reset-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 760;
  padding: 0 14px;
  cursor: pointer;
}

.planner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
  gap: 26px;
}

.planner-controls,
.result-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
}

.field-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.field-row:first-child {
  padding-top: 0;
}

.field-row.meal-name {
  grid-template-columns: 46px minmax(180px, 0.72fr) minmax(220px, 1fr);
}

.field-icon,
.mini-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 820;
}

.field-copy strong {
  display: block;
  margin-bottom: 5px;
}

.field-copy small,
.profile-field p {
  display: block;
  color: var(--muted);
  line-height: 1.4;
}

input[type="text"] {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
}

.stepper {
  display: inline-grid;
  grid-template-columns: repeat(3, 44px);
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.stepper button {
  min-height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.stepper button:last-child {
  border-right: 0;
}

.stepper output {
  display: grid;
  place-items: center;
  min-height: 42px;
  font-weight: 820;
}

.profile-field {
  margin: 18px 0 0;
  border: 0;
  padding: 0;
}

.profile-field legend {
  margin-bottom: 4px;
  font-weight: 820;
}

.profile-field p {
  margin: 0 0 14px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--surface-soft, #fff);
  font-weight: 700;
}

.profile-grid input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.tip {
  margin: 18px 0 0;
  border: 1px solid #c8e8e1;
  border-radius: var(--radius);
  background: var(--soft);
  color: #24534f;
  padding: 14px 16px;
  line-height: 1.45;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.result-head h2 {
  font-size: 1.32rem;
}

#planBadge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.result-group {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}

.result-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.result-group h3,
.resource-box h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 820;
  text-align: right;
}

.result-group p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.resource-box {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  border: 1px solid #c8e8e1;
  border-radius: var(--radius);
  background: var(--soft);
  padding: 18px;
}

.resource-box a,
.fit-callout a {
  color: var(--teal-dark);
  font-weight: 820;
}

.save-section,
.tomorrow-section,
.resources {
  padding-top: 48px;
}

.save-section h2,
.tomorrow-section h2,
.resources h2 {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.rail-grid,
.tomorrow-grid,
.resource-list {
  display: grid;
  gap: 28px;
  margin-top: 24px;
}

.rail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tomorrow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rail-grid h3,
.tomorrow-grid h3 {
  margin: 12px 0 8px;
}

.rail-grid ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.tomorrow-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.fit-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  margin-top: 42px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
}

.check-list li::before {
  content: "v";
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-top: 2px;
  background: #43b972;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.fit-callout {
  border: 1px solid #c8e8e1;
  border-radius: var(--radius);
  background: var(--soft);
  padding: 24px;
}

.fit-callout p {
  margin: 0 0 16px;
  line-height: 1.55;
}

.resource-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-list a {
  display: grid;
  gap: 7px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.resource-list strong {
  color: var(--ink);
}

.resource-list span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.site-footer {
  max-width: none;
  margin-top: 54px;
  border-top: 1px solid var(--line);
  padding-left: max(28px, calc((100vw - 1220px) / 2 + 28px));
  padding-right: max(28px, calc((100vw - 1220px) / 2 + 28px));
}

.site-footer p {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(5, 133, 121, 0.35);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .hero,
  .planner-layout,
  .fit-section {
    grid-template-columns: 1fr;
  }

  .rail-grid,
  .tomorrow-grid,
  .resource-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header,
  .site-footer {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .site-header nav,
  .site-footer nav {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 18px;
  }

  .hero {
    padding-top: 42px;
    gap: 28px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 11.5vw, 4.1rem);
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer,
  .hero,
  .planner-shell,
  .save-section,
  .tomorrow-section,
  .fit-section,
  .resources {
    padding-left: 18px;
    padding-right: 18px;
  }

  .brand {
    font-size: 1.08rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .planner-controls,
  .result-panel {
    padding: 18px;
  }

  .field-row,
  .field-row.meal-name {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stepper {
    justify-self: start;
  }

  .profile-grid,
  .rail-grid,
  .tomorrow-grid,
  .resource-list {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .result-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
