:root {
  --ink: #17352a;
  --muted: #65756e;
  --cream: #f7f3e8;
  --paper: #fffdf8;
  --green: #246b4b;
  --green-dark: #163b2c;
  --mint: #dfeee6;
  --amber: #eeaa4c;
  --amber-soft: #fff0d6;
  --line: #dedfd6;
  --shadow: 0 18px 50px rgba(28, 57, 45, .11);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 2%, rgba(238,170,76,.18), transparent 27rem),
    radial-gradient(circle at 94% 18%, rgba(36,107,75,.12), transparent 24rem),
    var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0 18px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 14px; color: #fff; background: var(--green-dark);
  box-shadow: 0 8px 20px rgba(22,59,44,.22);
}
.brand-mark svg { width: 24px; height: 24px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.source-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px;
  border: 1px solid rgba(36,107,75,.18); border-radius: 999px;
  color: var(--green); background: rgba(255,255,255,.55); font-size: 13px; font-weight: 700;
}
.source-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.tool-link {
  display: inline-flex; align-items: center; min-height: 37px; padding: 9px 13px;
  border-radius: 999px; color: #fff; background: var(--green-dark);
  text-decoration: none; font-size: 13px; font-weight: 800;
}
.tool-link:hover { background: var(--green); }
.tool-link:focus-visible { outline: 3px solid rgba(238,170,76,.65); outline-offset: 2px; }

.hero {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: stretch;
  padding: 42px; border-radius: 30px; color: #fff; overflow: hidden; position: relative;
  background: linear-gradient(125deg, #153b2b 0%, #245f45 68%, #2e7656 100%);
  box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; width: 320px; height: 320px; border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%; right: -110px; top: -165px; box-shadow: 0 0 0 48px rgba(255,255,255,.025), 0 0 0 96px rgba(255,255,255,.02);
}
.eyebrow { margin: 0 0 12px; color: #bfe1d0; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; max-width: 660px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(40px, 6vw, 68px); line-height: .98; letter-spacing: -.045em; font-weight: 500; }
.hero-copy { max-width: 630px; margin: 22px 0 0; color: rgba(255,255,255,.76); line-height: 1.65; font-size: 16px; }
.setup-card {
  position: relative; z-index: 1; align-self: center; padding: 24px;
  border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius);
  background: rgba(255,255,255,.1); backdrop-filter: blur(14px);
}
.setup-card label { display: block; margin-bottom: 9px; color: #d9eee3; font-size: 13px; font-weight: 800; }
.date-wrap { display: flex; gap: 10px; }
input[type="date"] {
  min-width: 0; width: 100%; padding: 14px 15px; color: var(--ink); background: #fff;
  border: 0; border-radius: 13px; outline: none; font-weight: 700;
}
input[type="date"]:focus { box-shadow: 0 0 0 3px rgba(238,170,76,.55); }
.primary {
  border: 0; border-radius: 13px; padding: 13px 17px; color: var(--green-dark);
  background: var(--amber); font-weight: 850; white-space: nowrap;
}
.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.helper { margin: 13px 0 0; color: rgba(255,255,255,.66); font-size: 12px; line-height: 1.5; }

.dashboard { display: none; padding: 28px 0 52px; }
.dashboard.active { display: block; }
.topline { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin: 12px 2px 22px; }
.topline h2 { margin: 0 0 5px; font-family: Georgia, serif; font-size: 34px; font-weight: 500; letter-spacing: -.025em; }
.topline p { margin: 0; color: var(--muted); }
.ghost {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px;
  color: var(--green); background: rgba(255,255,255,.55); font-weight: 750;
}
.ghost:hover { background: #fff; }

.grid { display: grid; grid-template-columns: .84fr 1.16fr; gap: 22px; }
.card { border: 1px solid rgba(23,53,42,.08); border-radius: var(--radius); background: var(--paper); box-shadow: 0 12px 32px rgba(33,58,47,.07); }
.today-card { padding: 26px; min-height: 298px; display: flex; flex-direction: column; }
.card-label { margin: 0 0 15px; color: var(--muted); font-size: 12px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.big-date { font-family: Georgia, serif; font-size: 31px; line-height: 1.1; letter-spacing: -.025em; }
.day-tag { display: inline-block; width: fit-content; margin-top: 9px; padding: 6px 10px; border-radius: 999px; color: var(--green); background: var(--mint); font-size: 12px; font-weight: 800; }
.med-box { margin-top: auto; padding-top: 23px; }
.med-name { margin: 0 0 7px; font-size: 21px; font-weight: 850; line-height: 1.22; }
.med-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.empty-state { color: var(--muted); line-height: 1.6; }
.complete-btn {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin-top: 17px;
  border: 1px solid #bdd5c9; border-radius: 11px; padding: 9px 12px; color: var(--green);
  background: #f4faf6; font-weight: 800; font-size: 13px;
}
.complete-btn.done { color: #fff; border-color: var(--green); background: var(--green); }

.calendar-card { padding: 22px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.calendar-head h3 { margin: 0; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.cal-nav { display: flex; gap: 7px; }
.icon-btn { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; font-size: 18px; }
.weekdays, .calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.weekdays div { padding: 5px 0; text-align: center; color: #87928d; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.cal-day {
  position: relative; aspect-ratio: 1.1; min-height: 42px; border: 1px solid transparent; border-radius: 12px;
  color: var(--ink); background: transparent; font-size: 13px; font-weight: 700;
}
.cal-day:hover:not(:disabled) { border-color: #b9d2c5; background: var(--mint); }
.cal-day.muted { color: #b4bbb7; }
.cal-day.selected { color: #fff; background: var(--green-dark); }
.cal-day.today { border-color: var(--amber); }
.cal-day.has-med::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); transform: translateX(-50%); }
.cal-day.done::after { background: #75c9a0; }

.timeline-card { grid-column: 1 / -1; padding: 26px; }
.timeline-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.timeline-head h3 { margin: 0; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.timeline-list { display: grid; gap: 10px; }
.timeline-item {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; align-items: center;
  padding: 15px 17px; border: 1px solid var(--line); border-radius: 15px; background: #fff;
}
.timeline-item.past { opacity: .56; }
.timeline-item.done { border-color: #b9d8c7; background: #f4faf6; }
.timeline-date { font-weight: 850; font-size: 13px; }
.timeline-date span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 650; }
.timeline-med { font-weight: 800; line-height: 1.35; }
.type { padding: 6px 9px; border-radius: 999px; color: #8c5c19; background: var(--amber-soft); font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.type.vaccine { color: var(--green); background: var(--mint); }

.notice { display: flex; gap: 13px; margin-top: 22px; padding: 17px 19px; border: 1px solid #ead4ae; border-radius: 16px; color: #704d20; background: #fff6e6; font-size: 13px; line-height: 1.55; }
.notice strong { display: block; margin-bottom: 2px; }
footer { padding: 0 0 30px; color: #7b8781; text-align: center; font-size: 12px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 29px; }
  .hero-copy { margin-top: 16px; }
  .grid { grid-template-columns: 1fr; }
  .timeline-card { grid-column: auto; }
}
@media (max-width: 560px) {
  .shell { width: min(100% - 20px, 1180px); }
  header { padding-top: 16px; }
  .source-pill { display: none; }
  .tool-link { font-size: 12px; padding-inline: 11px; }
  .hero { padding: 25px 20px; border-radius: 23px; }
  h1 { font-size: 43px; }
  .date-wrap { flex-direction: column; }
  .topline { align-items: flex-start; flex-direction: column; }
  .timeline-item { grid-template-columns: 82px 1fr; gap: 10px; }
  .timeline-item .type { grid-column: 2; width: fit-content; }
  .calendar-card, .today-card, .timeline-card { padding: 19px; }
  .cal-day { min-height: 38px; }
}
