/* ============================================================
   The Tree of Clarity workshop worksheet
   Calm, adult, no gamification. Phone-first.
   ============================================================ */

:root {
  --paper: #f7f5f0;
  --card: #ffffff;
  --ink: #1c2629;
  --muted: #7a8a8b;
  --line: #d8d2c4;
  --teal: #2f6a62;
  --teal-bright: #3dbdb9;
  --teal-soft: #e6f0ee;
  --old: #b0524a;
  --old-deep: #8f3f38;
  --old-soft: #f6e8e6;
  --new: #3f8a58;
  --new-deep: #2f6a44;
  --new-soft: #e9f2ea;
  --fruit: #ef7f00;
  --sun: #e0a52e;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(28, 38, 41, 0.07), 0 8px 24px rgba(28, 38, 41, 0.05);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, .serif {
  font-family: "Lora", Georgia, serif;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.4em;
}

p { margin: 0 0 0.9em; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-mark { color: var(--teal); display: inline-flex; }
.brand-name {
  font-family: "Lora", Georgia, serif;
  font-size: 1.02rem;
  font-weight: 600;
}
.step-indicator {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- the tree ---------- */
.tree-figure {
  margin: 0 auto;
  max-width: 720px;
  padding: 4px 10px 0;
}
.tree-figure svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 240px;
}
.soil { fill: #f0eadd; }
.groundline { stroke: var(--line); stroke-width: 2; stroke-linecap: round; }

.skeleton path {
  fill: none;
  stroke: #cdc6b6;
  stroke-width: 5;
  stroke-linecap: round;
}
.skeleton path:nth-child(n+5) { stroke-width: 4; opacity: 0.8; }

.tstage {
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 1s ease, transform 1s ease;
}
.tstage.on { opacity: 1; transform: none; }

.cloud { fill: #99a3ad; opacity: 0.85; }
.bolt { fill: none; stroke: var(--sun); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.limb, .twig { fill: none; stroke: var(--old); stroke-linecap: round; }
.limb { stroke-width: 5; }
.twig { stroke-width: 3; }
.leaf-old { fill: var(--old); opacity: 0.55; }
.trunkline { fill: none; stroke: var(--old); stroke-width: 6; stroke-linecap: round; opacity: 0.85; }
.knot { fill: var(--old-deep); opacity: 0.7; }
.root { fill: none; stroke: var(--old); stroke-width: 4.5; stroke-linecap: round; }
.root.thin { stroke-width: 3; }
.root.deep { stroke-width: 6; }
.belief-node-old { fill: var(--old-deep); }

.sun { fill: var(--sun); opacity: 0.9; }
.rays line { stroke: var(--sun); stroke-width: 2.6; stroke-linecap: round; opacity: 0.85; }
.trunkline-new { fill: none; stroke: var(--new); stroke-width: 6; stroke-linecap: round; opacity: 0.9; }
.limb-new, .twig-new { fill: none; stroke: var(--new-deep); stroke-linecap: round; }
.limb-new { stroke-width: 5; }
.twig-new { stroke-width: 3; }
.canopy { fill: var(--new); opacity: 0.72; }
.canopy.small { opacity: 0.6; }
.root-new { fill: none; stroke: var(--new); stroke-width: 4.5; stroke-linecap: round; }
.root-new.thin { stroke-width: 3; }
.root-new.deep { stroke-width: 6; }
.belief-node-new { fill: var(--new-deep); }
.fruit { fill: var(--fruit); }
.sprout { fill: none; stroke: var(--new); stroke-width: 3; stroke-linecap: round; }
.sprout-leaf { fill: var(--new); opacity: 0.8; }

.tlabel {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.tlabel-old { fill: var(--old-deep); }
.tlabel-new { fill: var(--new-deep); }
.tlabel-mid { fill: #7c8792; }

@media (max-width: 430px) {
  .tlabel { font-size: 15px; }
  .tree-figure svg { max-height: 190px; }
}

/* ---------- screens ---------- */
.screen {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 16px 48px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px;
  margin-bottom: 14px;
}

.card h1 { font-size: 1.7rem; }
.card h2 { font-size: 1.32rem; }

.kicker {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.kicker.old-side { color: var(--old); }
.kicker.new-side { color: var(--new); }

.lead { font-size: 1.02rem; }
.note { font-size: 0.87rem; color: var(--muted); }
.quote {
  font-family: "Lora", Georgia, serif;
  font-style: italic;
  font-size: 1.06rem;
  color: var(--teal);
  border-left: 3px solid var(--teal-bright);
  padding-left: 12px;
  margin: 14px 0;
}

/* section intro accents */
.card.intro-old { border-top: 4px solid var(--old); }
.card.intro-new { border-top: 4px solid var(--new); }
.card.pause {
  border-top: 4px solid var(--teal-bright);
  text-align: center;
  padding: 34px 22px;
}
.pause .pause-mark { font-size: 1.5rem; color: var(--teal); margin-bottom: 6px; font-family: "Lora", serif; }

/* ---------- inputs ---------- */
label.field-label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin: 14px 0 6px;
}
input[type="text"], textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fdfcfa;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
}
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus {
  outline: 2px solid var(--teal-bright);
  outline-offset: 0;
  border-color: transparent;
}
::placeholder { color: #a8b0af; }

.numbered-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.numbered-row .num {
  flex: 0 0 26px;
  height: 26px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip {
  border: 1px solid var(--line);
  background: #fdfcfa;
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.chip:hover { border-color: var(--teal-bright); }
.chip.selected {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.chip.selected.old-pick { background: var(--old); border-color: var(--old); }
.chip.selected.new-pick { background: var(--new); border-color: var(--new); }

.group-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.group-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.group-tab.active { background: var(--teal-soft); color: var(--teal); font-weight: 600; }

.picked-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; min-height: 36px; }
.picked {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--teal);
  color: #fff;
  border-radius: 999px;
  padding: 7px 8px 7px 14px;
  font-size: 0.9rem;
}
.picked.old-pick { background: var(--old); }
.picked.new-pick { background: var(--new); }
.picked button {
  border: none;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-add { display: flex; gap: 8px; margin-top: 10px; }
.custom-add input { flex: 1; }

/* voices */
.voice-card {
  border-radius: 12px;
  padding: 16px 16px 14px;
  margin-top: 14px;
  border: 1px solid var(--line);
}
.voice-card.judge { background: var(--old-soft); border-color: #e8d2cf; }
.voice-card.cheer { background: #f3ede2; border-color: #e5dcc9; }
.voice-card.coach { background: var(--new-soft); border-color: #d3e5d8; }
.voice-card h3 { font-size: 1.05rem; margin-bottom: 2px; }
.voice-card .note { margin-bottom: 8px; }

/* belief builder */
.belief-templates { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.belief-template {
  border: 1.5px dashed var(--line);
  background: transparent;
  border-radius: 10px;
  padding: 9px 14px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--teal);
  font-weight: 500;
  cursor: pointer;
}
.belief-template:hover { border-color: var(--teal-bright); background: var(--teal-soft); }

.belief-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--old);
  border-radius: 10px;
  background: #fdfcfa;
  padding: 12px;
  margin-bottom: 10px;
}
.belief-card.new-belief { border-left-color: var(--new); }
.belief-card .belief-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.belief-card .belief-kind {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.belief-card .remove-belief {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
}
.belief-tags { display: flex; gap: 6px; margin-top: 8px; }
.belief-tag {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 4px 11px;
  font: inherit;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
}
.belief-tag.active { background: var(--old-soft); border-color: var(--old); color: var(--old-deep); font-weight: 600; }

/* reframe cards */
.reframe-old {
  font-family: "Lora", Georgia, serif;
  font-style: italic;
  color: var(--old-deep);
  background: var(--old-soft);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 0.98rem;
}
.softener-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.softener {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  font-size: 0.8rem;
  color: var(--teal);
  cursor: pointer;
}
.softener:hover { background: var(--teal-soft); }

.nudge {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.84rem;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 8px;
  padding: 8px 11px;
  margin-top: 8px;
}

/* integration sentence */
.hero-sentence {
  font-family: "Lora", Georgia, serif;
  font-size: 1.22rem;
  line-height: 1.6;
  background: var(--new-soft);
  border: 1px solid #d3e5d8;
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 14px;
}
.hero-sentence .slot { color: var(--new-deep); font-weight: 600; }

/* ---------- buttons & nav ---------- */
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  flex-wrap: wrap;
}
.btn {
  border: none;
  border-radius: 999px;
  padding: 13px 26px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: #275a53; }
.btn-ghost { background: transparent; color: var(--muted); padding: 13px 14px; }
.btn-ghost:hover { color: var(--ink); }
.btn-old { background: var(--old); color: #fff; }
.btn-new { background: var(--new); color: #fff; }

.step-hint {
  display: none;
  font-size: 0.87rem;
  color: var(--old-deep);
  background: var(--old-soft);
  border-radius: 8px;
  padding: 9px 12px;
  margin-top: 10px;
}
.step-hint.show { display: block; }

/* ---------- summary ---------- */
.summary-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.summary-card.side-old { border-left: 4px solid var(--old); }
.summary-card.side-new { border-left: 4px solid var(--new); }
.summary-card h3 { font-size: 1rem; margin-bottom: 6px; }
.summary-card ul { margin: 0; padding-left: 20px; }
.summary-card li { margin-bottom: 4px; }
.summary-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.summary-chip {
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.85rem;
  background: var(--teal-soft);
  color: var(--teal);
}
.summary-chip.old-pick { background: var(--old-soft); color: var(--old-deep); }
.summary-chip.new-pick { background: var(--new-soft); color: var(--new-deep); }

.dream-statement {
  font-family: "Lora", Georgia, serif;
  font-size: 1.18rem;
  line-height: 1.65;
  background: var(--new-soft);
  border: 1px solid #d3e5d8;
  border-left: 4px solid var(--new);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
}

.summary-tree { padding: 6px 0 0; }
.summary-tree svg { max-height: 340px; }

.tiny-note { font-size: 0.8rem; color: var(--muted); text-align: center; margin-top: 10px; }

/* ---------- footer ---------- */
.foot {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 16px 34px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

/* printing clone: keep colours */
.printing .card, .printing .summary-card { box-shadow: none; }
