:root {
  color-scheme: light;
  --ink: #17332c;
  --muted: #52645f;
  --paper: #fffdf8;
  --cream: #f4eddf;
  --sage: #dce8df;
  --green: #173f35;
  --green-light: #2f6756;
  --rust: #b95839;
  --line: #cbd7cf;
  --shadow: 0 1rem 3rem rgb(23 51 44 / 10%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 20rem; background: radial-gradient(circle at 10% 0%, #fff8e9 0, transparent 34rem), var(--cream); }
a { color: var(--green); text-underline-offset: 0.2em; }
a:hover { color: var(--rust); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 10; padding: 0.75rem 1rem; background: var(--paper); border: 2px solid var(--green); border-radius: 0.5rem; }
.skip-link:focus { top: 1rem; }

.site-header { width: min(76rem, calc(100% - 2rem)); margin: 1rem auto 0; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; font-weight: 850; font-size: 1.05rem; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--green); color: white; }
.site-header nav, footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.site-header nav a, footer nav a { font-weight: 700; text-decoration: none; }

main { width: min(76rem, calc(100% - 2rem)); margin: 0 auto; }
.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(17rem, 0.65fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 5rem); }
.eyebrow { margin: 0 0 0.65rem; color: var(--rust); font-size: 0.76rem; font-weight: 850; letter-spacing: 0.16em; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--ink); }
h1 { max-width: 18ch; margin: 0; font-size: clamp(2.7rem, 7vw, 5.5rem); line-height: 0.98; letter-spacing: -0.045em; }
h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.05; }
h3 { margin: 0 0 1.2rem; font-size: 1.45rem; }
.hero-copy { max-width: 42rem; margin: 1.5rem 0 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.7; }
.hero-actions, .data-actions, .toolbar-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-actions { margin-top: 1.8rem; }
.button { display: inline-flex; min-height: 2.8rem; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.75rem 1rem; border: 2px solid transparent; border-radius: 0.7rem; font-weight: 800; line-height: 1; text-decoration: none; cursor: pointer; }
.button.primary { background: var(--green); color: white; }
.button.primary:hover { background: var(--green-light); color: white; }
.button.secondary { background: var(--paper); border-color: var(--green); color: var(--green); }
.button.secondary:hover { background: var(--sage); color: var(--green); }
.button.danger { background: transparent; border-color: #a43e32; color: #852f25; }
.button.compact { min-height: 2.45rem; padding: 0.58rem 0.8rem; font-size: 0.9rem; }
.privacy-card { padding: 1.6rem; border: 1px solid var(--line); border-radius: 1.2rem; background: rgb(255 253 248 / 82%); box-shadow: var(--shadow); }
.privacy-card strong { font-size: 1.1rem; }
.privacy-card ul { margin: 1rem 0 0; padding-left: 1.2rem; color: var(--muted); line-height: 1.8; }

.planner-shell { scroll-margin-top: 1rem; padding: clamp(1.2rem, 4vw, 3rem); border: 1px solid var(--line); border-radius: 1.4rem; background: var(--paper); box-shadow: var(--shadow); }
.section-heading, .project-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; }
.storage-note { margin: 0; color: var(--muted); font-weight: 650; }
.project-toolbar { margin-top: 2rem; padding: 1rem; border-radius: 0.8rem; background: var(--sage); }
.project-picker { display: grid; gap: 0.35rem; min-width: min(22rem, 100%); font-weight: 750; }

.form-section { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field { display: grid; gap: 0.4rem; color: var(--ink); font-size: 0.92rem; font-weight: 750; }
.field.span-2 { grid-column: span 2; }
input, select, textarea { width: 100%; border: 1px solid #9fb0a7; border-radius: 0.55rem; background: white; color: #17211e; padding: 0.72rem 0.8rem; font-weight: 500; }
textarea { resize: vertical; line-height: 1.55; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #d88959; outline-offset: 2px; }
.tool-links { display: flex; flex-wrap: wrap; gap: 0.65rem 1rem; margin-top: 1rem; }
.tool-links a { font-size: 0.92rem; font-weight: 750; }

.counter { display: grid; grid-template-columns: auto minmax(8rem, 1fr) auto; align-items: center; max-width: 25rem; margin: 1.5rem auto 1rem; text-align: center; }
.counter-button { width: 3.25rem; height: 3.25rem; border: 0; border-radius: 50%; background: var(--green); color: white; font-size: 1.8rem; cursor: pointer; }
.counter output { font-weight: 850; font-size: 1.25rem; }
.progress-track { height: 0.8rem; overflow: hidden; border-radius: 999px; background: #dfe5e1; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--rust); transition: width 160ms ease; }
.progress-copy { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.9rem; }

.summary { margin-top: 2rem; padding: 1.4rem; border-radius: 1rem; background: var(--green); color: white; }
.summary h3, .summary .eyebrow { color: white; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.summary-grid div { display: grid; gap: 0.3rem; padding: 0.9rem; border: 1px solid rgb(255 255 255 / 20%); border-radius: 0.7rem; }
.summary-grid span { color: #dbe9e3; font-size: 0.85rem; }
.summary-grid strong { font-size: 1.05rem; }
.data-actions { margin-top: 1rem; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.status { min-height: 1.5rem; margin-bottom: 0; color: var(--muted); font-weight: 650; }
.notice { margin-top: 1rem; padding: 1rem; border-radius: 0.7rem; }
.notice.error { background: #ffe9e5; color: #732a21; }

.division-of-labor { padding: clamp(4rem, 9vw, 7rem) 0; }
.role-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1.6rem; }
.role-grid article { padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: 1rem; background: rgb(255 253 248 / 78%); }
.role-grid p { color: var(--muted); line-height: 1.65; }

footer { width: min(76rem, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 3rem; border-top: 1px solid #b9c5be; color: var(--muted); }
footer p { max-width: 52rem; line-height: 1.6; }
.content-page { max-width: 52rem; padding: clamp(4rem, 10vw, 8rem) 0; }
.content-page h1, .error-page h1 { font-size: clamp(2.5rem, 7vw, 4.7rem); }
.content-page h2 { margin-top: 2.3rem; font-size: 1.7rem; }
.content-page p, .error-page p { color: var(--muted); font-size: 1.05rem; line-height: 1.75; }
.error-page { width: min(48rem, calc(100% - 2rem)); min-height: 100vh; margin: 0 auto; display: grid; align-content: center; }
.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; }

@media (max-width: 760px) {
  .site-header, .hero, .section-heading, .project-toolbar { align-items: stretch; }
  .site-header { flex-direction: column; }
  .hero { grid-template-columns: 1fr; padding-top: 3.5rem; }
  .section-heading, .project-toolbar { flex-direction: column; }
  .project-picker { min-width: 0; width: 100%; }
  .form-grid, .summary-grid, .role-grid { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: auto; }
}

@media print {
  :root { background: white; }
  body { background: white; }
  .site-header, .hero, .project-toolbar, .tool-links, .data-actions, .division-of-labor, footer, .counter-button, .status { display: none !important; }
  main { width: 100%; }
  .planner-shell { border: 0; box-shadow: none; padding: 0; }
  input, select, textarea { border-color: #777; }
  .summary { background: white; color: black; border: 1px solid #777; }
  .summary h3, .summary .eyebrow, .summary-grid span { color: black; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .progress-track span { transition: none; }
}
