:root {
  --paper: #f3eee4;
  --ink: #1b1814;
  --muted: #6b6358;
  --line: #d8cfc0;
  --sage: #2f5d4e;
  --sage-2: #1f3f35;
  --clay: #c45c26;
  --cream: #faf6ee;
  --card: #fffaf2;
  --good: #2f5d4e;
  --warn: #9a5b1a;
  --shadow: 0 18px 40px rgba(27, 24, 20, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans SC", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.04;
  background-image: radial-gradient(#1b1814 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  z-index: 0;
}

header, main, footer { position: relative; z-index: 1; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 7vw;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--sage);
  color: var(--cream);
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  border-radius: 8px;
}

.brand-text {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.nav a:hover { color: var(--ink); }

.hero {
  padding: 72px 7vw 28px;
  max-width: 1100px;
}

.eyebrow {
  color: var(--clay);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}

h1 {
  font-family: "Noto Serif SC", "Instrument Serif", serif;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.18;
  font-weight: 600;
}

h1 em {
  font-style: italic;
  color: var(--sage);
}

.lede {
  margin-top: 22px;
  max-width: 680px;
  color: var(--muted);
  font-size: 17px;
}

.stage { padding: 20px 7vw 40px; }

.dropzone {
  background: var(--card);
  border: 1.5px dashed #cbbfaa;
  border-radius: 20px;
  min-height: 280px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  cursor: pointer;
}

.dropzone.dragover {
  border-color: var(--sage);
  background: #f4f8f5;
  transform: translateY(-2px);
}

.drop-inner {
  text-align: center;
  padding: 40px 24px;
}

.drop-icon {
  color: var(--sage);
  margin-bottom: 12px;
}

.drop-inner h2 {
  font-family: "Noto Serif SC", serif;
  font-size: 26px;
  margin-bottom: 8px;
}

.drop-inner p { color: var(--muted); margin-bottom: 22px; }

.primary-btn, .ghost-btn, .text-btn {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

.primary-btn {
  background: var(--sage);
  color: var(--cream);
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
}

.primary-btn:hover { background: var(--sage-2); }

.ghost-btn {
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink);
}

.text-btn {
  background: none;
  color: var(--sage);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hint-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}

.how, .science { padding: 20px 7vw 56px; }

.how h2, .science h2, .ws-head h2 {
  font-family: "Noto Serif SC", serif;
  font-size: 28px;
  margin-bottom: 22px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.steps article {
  background: var(--card);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.steps span {
  font-family: "Instrument Serif", serif;
  font-size: 28px;
  color: var(--clay);
}

.steps h3 { margin: 10px 0 8px; }

.science {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: start;
}

.science-copy p { color: var(--muted); max-width: 560px; }

.science-list {
  list-style: none;
  background: var(--sage);
  color: var(--cream);
  padding: 28px;
  border-radius: 18px;
}

.science-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(250, 246, 238, 0.18);
}

.science-list li:last-child { border-bottom: none; }

.workspace { padding: 10px 7vw 80px; }

.ws-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.ws-actions { display: flex; gap: 10px; }

.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.tab {
  background: none;
  border: none;
  padding: 10px 16px;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tab.active {
  color: var(--ink);
  border-bottom-color: var(--sage);
  font-weight: 600;
}

.hidden { display: none !important; }

.grid-4, .grid-3, .grid-2 {
  display: grid;
  gap: 14px;
}

.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.metric, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.metric .label { font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }
.metric .value {
  font-family: "Noto Serif SC", serif;
  font-size: 30px;
  margin: 6px 0 2px;
}
.metric .sub { font-size: 13px; color: var(--muted); }

.badge {
  display: inline-block;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e7efe9;
  color: var(--sage);
  margin-right: 6px;
}

.badge.warn { background: #f6ead8; color: var(--warn); }

.section-title {
  font-family: "Noto Serif SC", serif;
  font-size: 22px;
  margin: 26px 0 12px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--sage);
  margin-left: 18px;
}

.slot {
  position: relative;
  padding: 0 0 22px 28px;
}

.slot::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--sage);
  border-radius: 50%;
  position: absolute;
  left: -7px;
  top: 6px;
}

.slot .time {
  font-weight: 700;
  color: var(--sage);
  font-size: 14px;
}

.slot h3 { font-size: 17px; margin: 2px 0 4px; }
.slot p { color: var(--muted); font-size: 14px; }

.meal {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.meal:last-child { border-bottom: none; }
.meal .when { font-weight: 700; color: var(--sage); }
.meal ul { padding-left: 18px; color: var(--muted); }

.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.day-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  min-height: 180px;
}

.day-card h3 { font-size: 15px; margin-bottom: 8px; }
.day-card p { font-size: 13px; color: var(--muted); }

.file-chip {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 6px 10px;
  background: #efe8db;
  border-radius: 8px;
  font-size: 13px;
}

.profile-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}

.profile-block h3 { font-size: 15px; margin-bottom: 8px; }
.profile-block pre {
  white-space: pre-wrap;
  font-family: inherit;
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 16px;
  border-radius: 12px;
  z-index: 9;
}

.foot {
  padding: 28px 7vw 48px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .steps, .science, .grid-4, .grid-3, .week { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; gap: 12px; align-items: flex-start; }
  .meal { grid-template-columns: 1fr; }
}
