:root {
  --bg: #F5EFE0;
  --navy: #14304A;
  --yellow: #E8C463;
  --muted: #6B6356;
  --card: #FFFFFF;
  --border: #E2D9C2;
  --input-bg: #FBF8F0;
  --success: #2E7D4F;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); }

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.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;
}

/* Header */
.site-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.wordmark {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: var(--navy);
}

/* Hero */
.hero { text-align: center; padding: 32px 0 16px; }
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 12px;
}
.hero .subhead {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--muted);
  font-style: italic;
  margin: 0 0 20px;
}
.hero .intro {
  font-size: 17px;
  line-height: 1.55;
  max-width: 620px;
  margin: 0 auto;
  color: var(--navy);
}

/* Reveal CTA — gates the email opt-in section below the task list */
.reveal-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 8px 0 28px;
}
.start-btn {
  padding: 16px 32px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
  transition: transform 0.1s ease, opacity 0.15s ease;
}
.start-btn:hover:not(:disabled) { opacity: 0.92; }
.start-btn:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
.start-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.reveal-hint {
  font-family: system-ui, sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.reveal-hint.unlocked {
  color: var(--success);
  font-weight: 600;
}

/* Form panel */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 28px 0 14px;
  font-family: system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row input[type=text] {
  flex: 1 1 280px;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid #C8BFA8;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: var(--input-bg);
  color: var(--navy);
}
.row select {
  padding: 10px 12px;
  border: 1px solid #C8BFA8;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: var(--input-bg);
  color: var(--navy);
}
.row button {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.row button.secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid #C8BFA8;
}
.row button:hover:not(:disabled) { opacity: 0.92; }
.hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
  font-family: system-ui, sans-serif;
}

/* Counter */
.counter {
  font-family: system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  padding: 10px;
  margin: 0 0 12px;
}
.counter.met { color: var(--success); }
.counter.ideal { color: var(--success); }

/* Task list */
.task-list-wrap { margin: 8px 0 32px; }
.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: system-ui, sans-serif;
}
.task-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
}
.task-list .task-text {
  flex: 1 1 auto;
  font-size: 15px;
  color: var(--navy);
}
.task-list .pills {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: #EFE7D2;
  color: var(--navy);
}
.pill.planned   { background: #E8DFC2; }
.pill.reactive  { background: #F4D9B8; }
.pill.focus     { background: var(--yellow); color: var(--navy); }
.pill.process   { background: #D7DCE3; }
.task-list .remove {
  background: none;
  border: none;
  font-size: 18px;
  color: #B33;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.task-list:empty::after {
  content: "Add your first task above.";
  display: block;
  text-align: center;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  padding: 16px;
}

/* Capture: blurred preview + CTA */
.capture { margin: 16px 0 32px; }
.preview-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  min-height: 360px;
}
.preview-blur {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}
.cta-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  background: rgba(245, 239, 224, 0.86);
  backdrop-filter: blur(2px);
  text-align: center;
}
.cta-card h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 0 0 8px;
  font-weight: 700;
}
.cta-card .cta-sub {
  margin: 0 0 18px;
  font-size: 16px;
  color: var(--muted);
  max-width: 480px;
}
.lead-form {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: system-ui, sans-serif;
}
.lead-form input {
  padding: 12px 14px;
  border: 1px solid #C8BFA8;
  border-radius: 8px;
  font-size: 15px;
  background: var(--input-bg);
  color: var(--navy);
  font-family: inherit;
}
.lead-form button {
  padding: 13px 18px;
  border: none;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s ease;
}
.lead-form button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.lead-form button:hover:not(:disabled) { opacity: 0.92; }
.gate-msg {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}
.gate-msg.unlocked { color: var(--success); font-weight: 600; }
.consent {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.4;
}
.form-error {
  font-size: 13px;
  color: #B33;
  margin: 4px 0 0;
}

/* Result section (post-submit) */
.result { margin: 8px 0 32px; }
.result-title {
  font-size: clamp(24px, 3.2vw, 34px);
  text-align: center;
  margin: 0 0 4px;
}
.result-personal {
  text-align: center;
  color: var(--muted);
  margin: 0 0 18px;
  font-style: italic;
}

/* Matrix (used on-page after submit AND off-screen for PDF snapshot) */
.matrix {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.axis-label {
  position: absolute;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: clamp(10px, 1vw, 14px);
  letter-spacing: 3px;
  color: var(--navy);
  text-transform: uppercase;
}
.axis-label.planned  { top: 4%;  left: 22%; }
.axis-label.reactive { top: 4%;  right: 22%; }
.axis-label.focus    { left: 12px; top: 25%;  transform: rotate(-90deg); transform-origin: left top; }
.axis-label.process  { left: 12px; top: 75%;  transform: rotate(-90deg); transform-origin: left top; }

.cross { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.quad {
  position: absolute;
  width: 50%;
  height: 50%;
  padding: 8% 7% 5%;
  overflow: hidden;
}
.quad.q1 { top: 0;    left: 0;    text-align: left;   padding-left: 11%; padding-top: 9%; }
.quad.q2 { top: 0;    right: 0;   text-align: right;  padding-right: 11%; padding-top: 9%; }
.quad.q3 { bottom: 0; left: 0;    text-align: left;   padding-left: 11%; padding-top: 5%; }
.quad.q4 { bottom: 0; right: 0;   text-align: right;  padding-right: 11%; padding-top: 5%; }

.task {
  display: block;
  font-family: Georgia, serif;
  font-size: clamp(11px, 1.2vw, 16px);
  color: var(--navy);
  margin: 0.25em 0;
  line-height: 1.2;
}
.quad.q1 .task:nth-child(2) { margin-left:  16px; }
.quad.q1 .task:nth-child(3) { margin-left:  32px; }
.quad.q1 .task:nth-child(4) { margin-left:  48px; }
.quad.q1 .task:nth-child(5) { margin-left:  64px; }
.quad.q1 .task:nth-child(6) { margin-left:  80px; }
.quad.q1 .task:nth-child(7) { margin-left:  96px; }
.quad.q1 .task:nth-child(n+8) { margin-left: 112px; }

.quad.q2 .task:nth-child(2) { margin-right:  16px; }
.quad.q2 .task:nth-child(3) { margin-right:  32px; }
.quad.q2 .task:nth-child(4) { margin-right:  48px; }
.quad.q2 .task:nth-child(5) { margin-right:  64px; }
.quad.q2 .task:nth-child(6) { margin-right:  80px; }
.quad.q2 .task:nth-child(7) { margin-right:  96px; }
.quad.q2 .task:nth-child(n+8) { margin-right: 112px; }

.quad.q3 .task:nth-child(1) { margin-left:  48px; }
.quad.q3 .task:nth-child(2) { margin-left:  32px; }
.quad.q3 .task:nth-child(3) { margin-left:  16px; }
.quad.q3 .task:nth-child(n+4) { margin-left: 0; }

.quad.q4 .task:nth-child(1) { margin-right:  48px; }
.quad.q4 .task:nth-child(2) { margin-right:  32px; }
.quad.q4 .task:nth-child(3) { margin-right:  16px; }
.quad.q4 .task:nth-child(n+4) { margin-right: 0; }

/* Breakdown stat cards */
.breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0 8px;
  font-family: system-ui, sans-serif;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 18px;
  text-align: center;
}
.stat-card.featured {
  background: var(--yellow);
  border-color: #d8b04f;
}
.stat-card .pct {
  font-family: Georgia, serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--navy);
  display: block;
  line-height: 1.05;
}
.stat-card .label {
  font-size: 13px;
  color: var(--navy);
  margin-top: 6px;
  line-height: 1.4;
}

.confirmation {
  text-align: center;
  margin-top: 24px;
  font-size: 17px;
}
.redownload {
  display: inline-block;
  margin-top: 8px;
  font-family: system-ui, sans-serif;
  font-size: 14px;
}

/* Off-screen PDF render target — fixed pixel size for consistent snapshot */
#pdfRenderRoot {
  position: absolute;
  left: -10000px;
  top: 0;
  width: 1400px;
}
#pdfRenderRoot .matrix {
  width: 1400px;
  height: 800px;
  aspect-ratio: auto;
}
#pdfRenderRoot .task {
  font-size: 18px;
}

/* Preview-mode banner (only shows with ?preview in URL) */
.preview-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #14304A;
  color: #fff;
  padding: 10px 16px;
  font-family: system-ui, sans-serif;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.preview-banner strong { color: var(--yellow); }
.preview-banner button {
  background: var(--yellow);
  color: var(--navy);
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.preview-banner button:hover { opacity: 0.9; }

/* Footer */
.site-footer {
  text-align: center;
  padding: 24px 20px 48px;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }

/* Responsive */
@media (max-width: 600px) {
  .breakdown { grid-template-columns: 1fr; }
  .row input[type=text],
  .row select,
  .row button { flex: 1 1 100%; }
  .task-list li { flex-wrap: wrap; }
  .task-list .pills { width: 100%; }
}
