:root {
  --ink: #17324d;
  --muted: #66758a;
  --teal: #0f766e;
  --teal-dark: #0a5a55;
  --mint: #dff7ee;
  --cream: #f7f4ed;
  --paper: #fffdf9;
  --peach: #f5c9b8;
  --amber: #f4d58d;
  --line: #dce5e4;
  --danger: #8f3030;
  --shadow: 0 20px 70px rgba(23, 50, 77, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 95% 4%, rgba(244, 213, 141, 0.34), transparent 25rem),
    var(--cream);
}

button, input, select { font: inherit; }
button { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4.5rem, 10vw, 8.5rem) 1.25rem clamp(4rem, 8vw, 7rem);
  color: #f9fffd;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 22px),
    linear-gradient(150deg, #0a5a55, #0f766e 58%, #178e82);
}

.hero::after {
  content: "";
  position: absolute;
  width: 34rem;
  height: 34rem;
  right: -12rem;
  bottom: -22rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgba(255, 255, 255, 0.03), 0 0 0 9rem rgba(255, 255, 255, 0.025);
}

.hero__inner, main, footer {
  width: min(1120px, 100%);
  margin-inline: auto;
}

.eyebrow, .section-kicker {
  margin: 0 0 0.7rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow { color: #a7f3d0; }
.section-kicker { color: var(--teal); }

.hero__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.hero__nav .eyebrow { margin: 0; }

.language-switch {
  position: relative;
  z-index: 2;
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.22rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
}

.language-button {
  min-width: 52px;
  min-height: 34px;
  padding: 0.35rem 0.75rem;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
}

.language-button:hover { color: white; }
.language-button.is-active { color: var(--teal-dark); background: white; }
.language-button:focus-visible { outline: 3px solid rgba(255, 255, 255, 0.45); outline-offset: 2px; }

h1 {
  max-width: 930px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6.8rem);
  font-weight: 500;
  line-height: 0.93;
  letter-spacing: -0.055em;
}

h1 span { color: #f7dca2; }

.hero__copy {
  max-width: 720px;
  margin: 2rem 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.8rem;
  margin-top: 2.25rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.74);
}

.hero__meta span { display: inline-flex; gap: 0.3rem; }
.hero__meta strong { color: white; }

main { padding: 0 1.25rem 5rem; }

.dashboard {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 1.25rem;
  margin-top: -2.7rem;
}

.progress-card, .quick-note, .checklist-shell, .safety-callout {
  border: 1px solid rgba(23, 50, 77, 0.08);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.progress-card, .quick-note { padding: clamp(1.4rem, 4vw, 2.3rem); }
.progress-card__topline { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

h2, h3, h4 { margin: 0; color: var(--ink); }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1.1; }

.progress-ring {
  --progress-angle: 0deg;
  display: grid;
  flex: 0 0 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--teal) var(--progress-angle), #e8efed 0);
}

.progress-ring::before {
  content: "";
  position: absolute;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--paper);
}

.progress-ring span { position: relative; z-index: 1; font-weight: 800; }

.progress-track {
  height: 8px;
  margin-top: 1.8rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e8efed;
}

.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--teal); transition: width 260ms ease; }
.progress-card__details { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 1rem; margin-top: 0.9rem; color: var(--muted); font-size: 0.88rem; }
.progress-card__details p { margin: 0; }
.save-state::before { content: "•"; margin-right: 0.4rem; color: var(--teal); }

.quick-note { display: flex; flex-direction: column; justify-content: center; background: #f7dca2; }
.quick-note .section-kicker { color: #7a5713; }
.quick-note p:last-child { margin: 1rem 0 0; color: #6a562f; line-height: 1.6; }

.checklist-shell { margin-top: 1.5rem; padding: clamp(1.2rem, 4vw, 2.5rem); box-shadow: none; }
.checklist-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }

.button {
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
}

.button--quiet { border-color: var(--line); background: transparent; }
.button--quiet:hover { border-color: #9bb8b4; background: #f4faf8; }
.button:focus-visible, .filter-tab:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid rgba(15, 118, 110, 0.28); outline-offset: 2px; }

.controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) minmax(180px, 0.75fr) auto;
  gap: 0.8rem;
  margin-top: 2rem;
  padding: 0.85rem;
  border-radius: 18px;
  background: #f2f5f2;
}

.search-field, .select-field {
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.search-field svg { width: 20px; height: 20px; margin-left: 0.9rem; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.search-field input { width: 100%; min-width: 0; padding: 0.85rem; border: 0; outline: 0; background: transparent; color: var(--ink); }

.select-field { position: relative; }
.select-field span { margin-left: 0.9rem; color: var(--muted); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.select-field select { flex: 1; min-width: 0; padding: 0.85rem 0.7rem; border: 0; outline: 0; background: transparent; color: var(--ink); font-weight: 700; }

.filter-tabs { display: flex; align-items: center; gap: 0.25rem; padding: 0.25rem; border-radius: 13px; background: white; }
.filter-tab { min-height: 40px; padding: 0.55rem 0.75rem; border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--muted); font-weight: 750; }
.filter-tab:hover { color: var(--ink); }
.filter-tab.is-active { color: white; background: var(--teal); }

.results-summary { min-height: 1.3rem; margin: 1rem 0 0; color: var(--muted); font-size: 0.88rem; }
.checklist { margin-top: 1rem; }
.category-section + .category-section { margin-top: 2.25rem; }

.category-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
  padding: 0 0.3rem;
}

.category-number { margin: 0 0 0.25rem; color: var(--teal); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.category-title { font-size: 1.25rem; }
.category-progress { margin: 0; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.item-list { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; }

.checklist-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.75rem;
  padding: 1rem;
  background: white;
  transition: background 180ms ease, opacity 180ms ease;
}

.checklist-item + .checklist-item { border-top: 1px solid var(--line); }
.checklist-item:hover { background: #fbfdfb; }
.checklist-item.is-complete { background: #f5faf8; }
.checklist-item.is-complete .item-title { color: #70837f; text-decoration: line-through; text-decoration-thickness: 1px; }
.checklist-item.is-complete .item-meta, .checklist-item.is-complete .item-badges { opacity: 0.66; }

.check-control { display: grid; place-items: start center; padding-top: 0.05rem; cursor: pointer; }
.item-checkbox { position: absolute; opacity: 0; pointer-events: none; }
.custom-check { display: grid; width: 26px; height: 26px; place-items: center; border: 2px solid #9bb8b4; border-radius: 8px; background: white; transition: 160ms ease; }
.custom-check svg { width: 17px; height: 17px; fill: none; stroke: white; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(0.7); transition: 160ms ease; }
.item-checkbox:focus-visible + .custom-check { outline: 3px solid rgba(15, 118, 110, 0.25); outline-offset: 2px; }
.item-checkbox:checked + .custom-check { border-color: var(--teal); background: var(--teal); }
.item-checkbox:checked + .custom-check svg { opacity: 1; transform: scale(1); }

.item-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.item-title { font-size: 1rem; line-height: 1.45; }
.item-badges { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: end; gap: 0.35rem; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0.18rem 0.55rem; border-radius: 999px; font-size: 0.7rem; font-weight: 850; }
.badge--essential { color: #8c2525; background: #fee2e2; }
.badge--needed { color: #1e4f8c; background: #dbeafe; }
.badge--defer { color: #44505e; background: #e5e7eb; }
.badge--avoid { color: white; background: var(--danger); }
.item-meta { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.82rem; }

.item-details { margin-top: 0.75rem; }
.item-details summary { width: max-content; cursor: pointer; color: var(--teal); font-size: 0.82rem; font-weight: 800; }
.item-details__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0.75rem; }
.item-details__grid > div { padding: 0.85rem; border-radius: 12px; background: #f6f8f5; }
.item-details__grid span { display: block; margin-bottom: 0.35rem; color: var(--muted); font-size: 0.68rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.item-details__grid p { margin: 0; color: #43566b; font-size: 0.85rem; line-height: 1.55; }

.empty-state { padding: 4rem 1rem; text-align: center; }
.empty-state p { color: var(--muted); }

.safety-callout { display: grid; grid-template-columns: 54px 1fr; gap: 1.25rem; margin-top: 1.5rem; padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: none; }
.safety-callout__mark { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: white; background: var(--teal); font-family: Georgia, serif; font-size: 1.4rem; font-style: italic; }
.safety-callout p:last-child { margin: 0.9rem 0 0; color: var(--muted); line-height: 1.6; }

footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; padding: 0 1.25rem 2.5rem; color: var(--muted); font-size: 0.8rem; }
footer p { margin: 0; }

@media (max-width: 900px) {
  .dashboard { grid-template-columns: 1fr; }
  .controls { grid-template-columns: 1fr 1fr; }
  .filter-tabs { grid-column: 1 / -1; justify-content: space-between; }
}

@media (max-width: 620px) {
  .hero { padding-top: 4rem; }
  .hero__nav { align-items: flex-start; }
  .hero__nav .eyebrow { max-width: 13rem; }
  .language-button { min-width: 46px; padding-inline: 0.6rem; }
  .hero__meta { display: grid; gap: 0.55rem; }
  .progress-card__topline { align-items: flex-start; }
  .progress-ring { flex-basis: 68px; height: 68px; }
  .progress-ring::before { width: 51px; height: 51px; }
  .checklist-heading { align-items: flex-start; }
  .controls { grid-template-columns: 1fr; }
  .filter-tabs { grid-column: auto; overflow-x: auto; justify-content: flex-start; }
  .filter-tab { white-space: nowrap; }
  .item-title-row { display: block; }
  .item-badges { justify-content: flex-start; margin-top: 0.55rem; }
  .item-details__grid { grid-template-columns: 1fr; }
  .safety-callout { grid-template-columns: 1fr; }
}

@media print {
  body { background: white; }
  .hero { padding: 2rem; }
  .dashboard { margin-top: 1rem; }
  .controls, .button, .save-state, .quick-note { display: none !important; }
  .checklist-shell, .progress-card, .safety-callout { box-shadow: none; }
  .category-section, .checklist-item { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
