@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500&display=swap');

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

:root {
  --accent:     #C2692A;
  --accent-bg:  #FDF0E8;
  --accent-bdr: #E8B08A;
  --accent-dk:  #A8561F;
  --accent-txt: #5C3010;
}

body {
  background: #FAFAF8;
  color: #1A1A18;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

.shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

.wordmark {
  font-family: 'DM Serif Display', serif;
  font-size: 30px;
  color: #1A1A18;
  letter-spacing: -0.5px;
}
.wordmark span { color: var(--accent); }

.tagline {
  font-size: 14px;
  color: #888880;
  margin-top: 5px;
  margin-bottom: 2.5rem;
}

.phase-bar {
  display: flex;
  border: 0.5px solid #E2E0D8;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
}
.phase-tab {
  flex: 1;
  padding: 10px 6px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  color: #AAAAAA;
  background: #F4F3EF;
  border-right: 0.5px solid #E2E0D8;
}
.phase-tab:last-child { border-right: none; }
.phase-tab.active { background: #fff; color: var(--accent); }
.phase-tab.done   { background: #fff; color: #888880; }

.card {
  background: #fff;
  border: 0.5px solid #E2E0D8;
  border-radius: 14px;
  padding: 1.4rem;
  margin-bottom: 1rem;
}
.card-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #AAAAAA;
  margin-bottom: 1.1rem;
}

textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  background: #fff;
  border: 0.5px solid #D8D6CE;
  border-radius: 10px;
  color: #1A1A18;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s;
}
textarea:focus { border-color: var(--accent); }
textarea::placeholder { color: #BBBBBB; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-bg);
  border: 0.5px solid var(--accent-bdr);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}
.chip:hover { background: #F8DEC8; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 1rem;
}
.btn-primary:hover   { background: var(--accent-dk); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  border: 0.5px solid #D8D6CE;
  border-radius: 10px;
  color: #888880;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-ghost:hover { background: #F4F3EF; }

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 3rem 0;
  color: #AAAAAA;
  font-size: 13px;
}
.dots { display: flex; gap: 5px; }
.dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounce 1.2s infinite;
}
.dots span:nth-child(2) { animation-delay: .2s; }
.dots span:nth-child(3) { animation-delay: .4s; }
@keyframes bounce {
  0%,80%,100% { transform: translateY(0); opacity: .3; }
  40%          { transform: translateY(-5px); opacity: 1; }
}

/* ---- Summary bar ---- */
.summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
}
.summary-pill {
  font-size: 12px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  padding: 6px 16px;
  border-radius: 999px;
  background: #F4F3EF;
  color: #666660;
  border: 0.5px solid #E2E0D8;
}
.summary-pill.accent {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: var(--accent-bdr);
}

/* ---- Clarified idea ---- */
.clarified-text {
  font-size: 15px;
  color: #1A1A18;
  line-height: 1.8;
}

/* ---- Assumptions ---- */
.assumption {
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: #555550;
  padding: 10px 0;
  border-bottom: 0.5px solid #EDEBE3;
  line-height: 1.6;
}
.assumption:last-child { border-bottom: none; }
.assumption::before {
  content: "→";
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 500;
}

/* ---- Risks ---- */
.risk-item {
  padding: 12px 0;
  border-bottom: 0.5px solid #EDEBE3;
}
.risk-item:last-child { border-bottom: none; }
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 5px;
}
.risk-note {
  font-size: 13px;
  color: #666660;
  line-height: 1.6;
  padding-left: 2px;
}
.risk-h { background: #FCEBEB; color: #791F1F; }
.risk-m { background: #FAEEDA; color: #633806; }
.risk-l { background: #EAF3DE; color: #27500A; }

/* ---- Execution paths ---- */
.paths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 1rem;
}
.path-card {
  border: 0.5px solid #E2E0D8;
  border-radius: 12px;
  padding: 1rem;
  background: #FAFAF8;
  transition: border-color 0.15s;
}
.path-card.recommended {
  border: 1.5px solid var(--accent);
  background: var(--accent-bg);
}
.path-rec-badge {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: #fff;
  border: 0.5px solid var(--accent-bdr);
  border-radius: 999px;
  padding: 2px 8px;
  display: inline-block;
  margin-bottom: 8px;
}
.path-name {
  font-family: 'DM Serif Display', serif;
  font-size: 16px;
  color: #1A1A18;
  margin-bottom: 6px;
  text-transform: capitalize;
}
.path-desc {
  font-size: 12px;
  color: #666660;
  line-height: 1.6;
}
.path-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}
.path-tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #F4F3EF;
  color: #888880;
}
.path-tag.accent { background: #fff; color: var(--accent); border: 0.5px solid var(--accent-bdr); }
.path-reasoning {
  font-size: 13px;
  color: #5C3010;
  background: #FDF0E8;
  border-radius: 10px;
  padding: 12px 14px;
  line-height: 1.7;
}
.path-reasoning::before {
  content: "Why this path → ";
  font-weight: 500;
  color: var(--accent);
}

@media (max-width: 520px) {
  .paths-grid { grid-template-columns: 1fr; }
}

/* ---- Milestones ---- */
.milestone {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 13px 0;
  border-bottom: 0.5px solid #EDEBE3;
}
.milestone:last-child { border-bottom: none; }
.m-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent);
  font-family: 'DM Serif Display', serif;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.m-title {
  font-size: 14px;
  font-weight: 500;
  color: #1A1A18;
  line-height: 1.5;
}
.m-time {
  font-size: 12px;
  color: #AAAAAA;
  margin-left: 8px;
  font-weight: 400;
}
.m-detail {
  font-size: 13px;
  color: #666660;
  margin-top: 4px;
  line-height: 1.6;
}

/* ---- 30/60/90 ---- */
.plan-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 1rem;
  border-bottom: 0.5px solid #EDEBE3;
  padding-bottom: 0.85rem;
}
.plan-tab {
  font-size: 12px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  color: #AAAAAA;
  background: transparent;
  border: 0.5px solid #E2E0D8;
  border-radius: 999px;
  padding: 5px 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.plan-tab:hover { background: #F4F3EF; color: #888880; }
.plan-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.plan-content { counter-reset: plan-counter; }
.plan-item {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #444440;
  padding: 9px 0;
  border-bottom: 0.5px solid #EDEBE3;
  line-height: 1.6;
  align-items: flex-start;
}
.plan-item:last-child { border-bottom: none; }
.plan-item::before {
  content: counter(plan-counter);
  counter-increment: plan-counter;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #F4F3EF;
  color: #888880;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---- First step ---- */
.first-step-box {
  background: var(--accent-bg);
  border: 0.5px solid var(--accent-bdr);
  border-radius: 10px;
  padding: 1.2rem 1.3rem;
}
.first-step-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.first-step-text {
  font-size: 15px;
  color: var(--accent-txt);
  line-height: 1.7;
}
.first-step-time {
  font-size: 12px;
  color: var(--accent);
  margin-top: 8px;
  font-weight: 500;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
}

.disclaimer {
  font-size: 12px;
  color: #BBBBBB;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 0.5px solid #EDEBE3;
  line-height: 1.8;
  text-align: center;
}

.hidden { display: none; }
.fade-in { animation: fadeIn 0.35s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .shell { padding: 2rem 1rem 5rem; }
  .wordmark { font-size: 24px; }
}
.context-intro {
  font-size: 13px;
  color: #888880;
  margin-bottom: 1.4rem;
  line-height: 1.6;
}
.context-group {
  padding: 14px 0;
  border-bottom: 0.5px solid #EDEBE3;
}
.context-group:last-child { border-bottom: none; }
.context-q {
  font-size: 13px;
  font-weight: 500;
  color: #333330;
  margin-bottom: 10px;
}
.ctx-chip.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-dk);
}

/* ---- PDF / Print ---- */
@media print {
  body { background: #fff !important; }
  .shell { max-width: 100% !important; padding: 1.5rem 2rem !important; }

  /* hide all chrome */
  .phase-bar, .nav-row, .btn-ghost, .btn-primary, .chips,
  #p3-loading, #p2-loading, .plan-tabs,
  #phase-1, #phase-2 { display: none !important; }

  /* force plan visible */
  #phase-3  { display: block !important; }
  #p3-content { display: block !important; }

  /* neutralise JS reveal inline styles */
  #p3-content > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .card {
    break-inside: avoid;
    border: 0.5px solid #D8D6CE !important;
    margin-bottom: 0.85rem;
    box-shadow: none;
  }

  /* show all three 30/60/90 sections */
  #plan-30, #plan-60, #plan-90 { display: block !important; }
  #plan-60 { border-top: 0.5px solid #EDEBE3; padding-top: 0.75rem; margin-top: 0.75rem; }
  #plan-90 { border-top: 0.5px solid #EDEBE3; padding-top: 0.75rem; margin-top: 0.75rem; }
  #plan-60::before {
    content: "Days 31 – 60";
    display: block;
    font-size: 11px; font-weight: 500; letter-spacing: 0.07em;
    text-transform: uppercase; color: #AAAAAA; margin-bottom: 8px;
  }
  #plan-90::before {
    content: "Days 61 – 90";
    display: block;
    font-size: 11px; font-weight: 500; letter-spacing: 0.07em;
    text-transform: uppercase; color: #AAAAAA; margin-bottom: 8px;
  }

  .paths-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .disclaimer { display: block !important; }

  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}