:root {
  --paper: #f7f3ec;
  --surface: #fffdf8;
  --surface-2: #edf2ef;
  --ink: #18211f;
  --muted: #61706b;
  --line: #d7ded8;
  --green: #173d33;
  --teal: #14706e;
  --blue: #365d7e;
  --gold: #c59b3a;
  --coral: #d65f4b;
  --plum: #72536f;
  --white: #ffffff;
  --shadow: 0 18px 60px rgba(18, 32, 28, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Segoe UI", sans-serif;
}

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

button {
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: var(--white);
  cursor: pointer;
  font-weight: 800;
  padding: 11px 14px;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

button:hover {
  background: var(--teal);
  box-shadow: 0 8px 22px rgba(20, 112, 110, 0.2);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

button.ghost {
  background: var(--surface-2);
  color: var(--green);
}

button.quiet {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 330px;
  height: 100vh;
  overflow: hidden;
}

.chapter-rail,
.facilitator-panel {
  height: 100vh;
  overflow-y: auto;
}

.chapter-rail {
  background: var(--green);
  color: var(--white);
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand-lockup {
  display: grid;
  gap: 4px;
  padding: 0 8px;
}

.brand-mark {
  font-size: 29px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-lockup strong {
  font-size: 15px;
}

.brand-lockup small,
.local-status {
  color: rgba(255, 255, 255, 0.7);
}

.chapter-nav {
  display: grid;
  gap: 7px;
}

.chapter-nav button {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.78);
  padding: 10px 9px;
  text-align: left;
  box-shadow: none;
}

.chapter-nav button:hover,
.chapter-nav button.is-active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--white);
  transform: none;
}

.chapter-nav span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
}

.chapter-nav strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.local-status {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  font-size: 12px;
}

.status-light {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #65d18e;
  box-shadow: 0 0 0 7px rgba(101, 209, 142, 0.14);
}

.deck-shell {
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.deck-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 25px 34px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 243, 236, 0.92);
  backdrop-filter: blur(14px);
}

.eyebrow,
.kicker {
  margin: 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.deck-header h1 {
  margin: 7px 0 0;
  color: var(--green);
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: 0;
}

.chapter-purpose {
  max-width: 860px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.chapter-meter {
  min-width: 128px;
  display: grid;
  gap: 9px;
  justify-items: end;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.meter-track {
  width: 128px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line);
}

.meter-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--coral));
  transition: width 300ms ease;
}

.stage {
  overflow-y: auto;
  padding: 22px 34px 64px;
}

.stage-section {
  width: min(1180px, 100%);
  margin: 0 auto 26px;
  padding: 28px 0 30px;
  display: grid;
  grid-template-columns: minmax(230px, 330px) minmax(0, 1fr);
  gap: 30px;
  border-top: 1px solid rgba(23, 61, 51, 0.13);
  animation: revealUp 420ms ease both;
  animation-delay: var(--delay);
}

.stage-section:first-child {
  border-top: 0;
}

.section-copy {
  position: sticky;
  top: 0;
  align-self: start;
}

.section-copy h2 {
  margin: 9px 0 0;
  color: var(--green);
  font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1.18;
  letter-spacing: 0;
}

.section-copy p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.68;
}

.visual-block {
  min-width: 0;
}

.facilitator-panel {
  border-left: 1px solid var(--line);
  background: var(--surface);
  padding: 24px 20px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.panel-block {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.panel-block h2 {
  margin: 8px 0 0;
  color: var(--green);
  font-size: 22px;
}

.panel-copy,
.panel-note {
  color: var(--muted);
  line-height: 1.58;
}

.control-grid,
.export-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.control-grid .quiet,
.export-actions .ghost:last-child {
  grid-column: 1 / -1;
}

.score-panel {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  align-items: center;
}

.score-panel .eyebrow {
  grid-column: 1 / -1;
}

.score-ring {
  --score: 0%;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--teal) 0 var(--score), var(--line) var(--score) 100%);
  position: relative;
}

.score-ring::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  background: var(--surface);
}

.score-ring span,
.score-ring small {
  position: relative;
  z-index: 1;
}

.score-ring span {
  font-size: 31px;
  font-weight: 900;
  color: var(--green);
}

.score-ring small {
  margin-top: 34px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.score-list {
  display: grid;
  gap: 8px;
}

.score-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.score-list strong {
  color: var(--green);
  font-size: 14px;
}

.hero-visual {
  min-height: 520px;
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  background: var(--green);
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  display: block;
  filter: saturate(0.95) contrast(1.02);
}

.hero-panel {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 28px;
  max-width: 720px;
  color: var(--white);
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.34);
}

.hero-panel span,
.hero-metrics small {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-panel strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(29px, 4vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
  max-width: 560px;
}

.hero-metrics div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

.hero-metrics b {
  display: block;
  margin-top: 4px;
  font-size: 25px;
}

.scope-grid,
.glossary-grid,
.gate-board,
.mission-board,
.shield-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.scope-item,
.term-row,
.gate,
.mission,
.shield-tile,
.question-panel,
.path-node,
.agenda div,
.role-row,
.decision-checks div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.scope-item {
  min-height: 190px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.scope-item::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -28px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 16px solid rgba(20, 112, 110, 0.1);
}

.scope-item span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-weight: 900;
}

.scope-item strong,
.term-row strong,
.gate strong,
.mission strong,
.shield-tile strong {
  display: block;
  margin-top: 14px;
  color: var(--green);
  font-size: 19px;
  line-height: 1.2;
}

.scope-item p,
.term-row p,
.gate p,
.mission p,
.shield-tile p,
.path-node p,
.agenda p,
.question-panel p,
.case-copy p,
.case-copy li {
  color: var(--muted);
  line-height: 1.55;
}

.term-row {
  padding: 16px;
}

.term-row span {
  color: var(--coral);
  font-size: 22px;
  font-weight: 900;
}

.territory-wrap {
  min-height: 610px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(20, 112, 110, 0.14), transparent 34%),
    linear-gradient(135deg, #fffdf8, #edf2ef);
  border: 1px solid var(--line);
}

.territory-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 190px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  text-align: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: hidden;
  color: var(--white);
  box-shadow: 0 18px 46px rgba(23, 61, 51, 0.25);
}

.territory-center img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.62) saturate(0.9);
}

.territory-center strong,
.territory-center span {
  position: relative;
  z-index: 1;
}

.territory-center strong {
  align-self: end;
  font-size: 31px;
  font-weight: 900;
}

.territory-center span {
  align-self: start;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.territory-node {
  position: absolute;
  width: min(240px, 32%);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 14px 35px rgba(18, 32, 28, 0.1);
  animation: floatSoft 4s ease-in-out infinite;
}

.territory-node:nth-of-type(2) {
  left: 7%;
  top: 10%;
}

.territory-node:nth-of-type(3) {
  right: 7%;
  top: 12%;
  animation-delay: 500ms;
}

.territory-node:nth-of-type(4) {
  left: 8%;
  bottom: 11%;
  animation-delay: 900ms;
}

.territory-node:nth-of-type(5) {
  right: 7%;
  bottom: 10%;
  animation-delay: 1300ms;
}

.territory-node b {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  background: var(--teal);
}

.territory-node.blue b {
  background: var(--blue);
}

.territory-node.gold b {
  background: var(--gold);
}

.territory-node.coral b {
  background: var(--coral);
}

.territory-node strong {
  display: block;
  margin-top: 10px;
  color: var(--green);
  font-size: 20px;
}

.territory-node p {
  color: var(--muted);
  line-height: 1.48;
}

.rule-lane {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  position: relative;
}

.rule-lane::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 29px;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--coral));
}

.rule-step {
  position: relative;
  padding: 68px 16px 18px;
}

.pulse-dot {
  position: absolute;
  left: 16px;
  top: 17px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 10px rgba(20, 112, 110, 0.14);
  animation: pulse 1700ms ease-in-out infinite;
}

.rule-step strong {
  color: var(--green);
  font-size: 21px;
}

.rule-step p {
  color: var(--muted);
  line-height: 1.58;
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.persona-tile {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  min-height: 320px;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.persona-tile img {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(18, 32, 28, 0.16);
}

.persona-tile span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.persona-tile h3 {
  margin: 5px 0 0;
  color: var(--green);
  font-size: 31px;
}

.persona-tile p,
.persona-tile li {
  color: var(--muted);
  line-height: 1.56;
}

.persona-tile ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

.overlap-map {
  min-height: 460px;
  position: relative;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #fffdf8, #edf2ef);
  overflow: hidden;
}

.venn-circle {
  position: absolute;
  top: 72px;
  width: 360px;
  height: 360px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 44px;
  border-radius: 50%;
  text-align: center;
}

.venn-circle strong {
  color: var(--green);
  font-size: 23px;
}

.venn-circle span {
  color: var(--muted);
  line-height: 1.45;
}

.venn-circle.emma {
  left: calc(50% - 370px);
  background: rgba(20, 112, 110, 0.18);
}

.venn-circle.claire {
  right: calc(50% - 370px);
  background: rgba(214, 95, 75, 0.18);
}

.overlap-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 230px;
  min-height: 230px;
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 26px;
  border-radius: 50%;
  color: var(--white);
  text-align: center;
  transform: translate(-50%, -50%);
  background: var(--green);
  box-shadow: 0 16px 42px rgba(23, 61, 51, 0.24);
}

.overlap-core b {
  display: block;
  font-size: 17px;
}

.gate {
  padding: 18px;
}

.gate span,
.mission span,
.question-panel span,
.case-copy span,
.two-stage span,
.agenda span,
.decision-status span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.chrono-shell {
  display: grid;
  gap: 10px;
}

.chrono-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 900;
}

.chrono {
  position: relative;
  min-height: 760px;
  padding: 14px 0;
}

.chrono-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--teal), var(--gold), var(--coral));
  transform: translateX(-50%);
}

.chrono-node {
  position: absolute;
  left: 50%;
  width: 50%;
  transform: translateY(-50%);
}

.chrono-node.left {
  transform: translate(-100%, -50%);
  padding-right: 32px;
}

.chrono-node.right {
  padding-left: 32px;
}

.chrono-dot {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  border: 4px solid var(--teal);
  transform: translateY(-50%);
  box-shadow: 0 0 0 10px rgba(20, 112, 110, 0.12);
}

.chrono-node.left .chrono-dot {
  right: -9px;
}

.chrono-node.right .chrono-dot {
  left: -9px;
}

.chrono-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(18, 32, 28, 0.08);
}

.chrono-card strong {
  display: block;
  color: var(--green);
  font-size: 19px;
}

.chrono-card em {
  color: var(--coral);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.chrono-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.gantt {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.gantt-scale,
.gantt-row {
  display: grid;
  grid-template-columns: 210px minmax(220px, 1fr) 88px;
  gap: 12px;
  align-items: center;
}

.gantt-scale {
  grid-template-columns: 210px repeat(5, 1fr) 88px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.gantt-scale::before {
  content: "";
}

.gantt-row span {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.gantt-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.gantt-track {
  height: 17px;
  position: relative;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(20, 112, 110, 0.08), rgba(197, 155, 58, 0.08), rgba(214, 95, 75, 0.08));
  overflow: hidden;
}

.gantt-track i {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  animation: fillBar 700ms ease both;
}

.role-table {
  display: grid;
  gap: 10px;
}

.role-row {
  display: grid;
  grid-template-columns: 72px minmax(180px, 250px) minmax(0, 1fr) 66px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.role-row span {
  color: var(--teal);
  font-weight: 900;
}

.role-row strong {
  color: var(--green);
}

.role-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.role-row em {
  justify-self: end;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(20, 112, 110, 0.12);
  font-style: normal;
  font-weight: 900;
}

.role-row em.risk {
  color: var(--coral);
  background: rgba(214, 95, 75, 0.12);
}

.pricing-dashboard {
  display: grid;
  gap: 18px;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi-strip div {
  padding: 16px;
  border-radius: 8px;
  background: var(--green);
  color: var(--white);
}

.kpi-strip span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 900;
}

.kpi-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.bar-chart {
  display: grid;
  gap: 9px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(170px, 240px) minmax(180px, 1fr) 110px 62px;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.bar-row > span {
  color: var(--green);
  font-weight: 800;
}

.bar-row > div {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.bar-row i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  animation: fillBar 680ms ease both;
}

.bar-row.is-risk i {
  background: linear-gradient(90deg, var(--coral), var(--gold));
}

.bar-row strong,
.bar-row em {
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

.pie-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: center;
}

.revenue-pie {
  width: 320px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: var(--shadow);
}

.revenue-pie::after {
  content: "";
  position: absolute;
  inset: 64px;
  border-radius: inherit;
  background: var(--paper);
}

.revenue-pie span {
  position: relative;
  z-index: 1;
  color: var(--green);
  font-size: 35px;
  font-weight: 900;
}

.pie-legend {
  display: grid;
  gap: 10px;
}

.pie-legend div {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
}

.pie-legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.pie-legend span {
  color: var(--green);
  font-weight: 800;
}

.pie-legend strong {
  color: var(--muted);
}

.shield-map {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shield-tile {
  min-height: 190px;
  padding: 18px;
}

.shield-tile span {
  display: block;
  width: 42px;
  height: 48px;
  clip-path: polygon(50% 0, 100% 18%, 88% 100%, 12% 100%, 0 18%);
  background: linear-gradient(180deg, var(--teal), var(--green));
}

.question-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.question-panel {
  padding: 20px;
}

.question-panel strong {
  display: block;
  margin-top: 10px;
  color: var(--green);
  font-size: 24px;
  line-height: 1.18;
}

.question-panel.is-answer {
  background: var(--surface-2);
}

.arrow-flow {
  display: grid;
  place-items: center;
  color: var(--coral);
  font-size: 32px;
  font-weight: 900;
}

.case-layout {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.case-layout img {
  width: 100%;
  min-height: 350px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.case-copy {
  padding: 20px 0;
}

.case-copy h3 {
  margin: 8px 0 0;
  color: var(--green);
  font-size: 30px;
}

.case-copy ul {
  margin: 16px 0 0;
  padding-left: 20px;
}

.matrix-wrap {
  display: grid;
  grid-template-columns: 24px 1fr;
  grid-template-rows: 1fr auto auto;
  gap: 10px;
}

.matrix-axis {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.matrix-axis.y {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  align-self: center;
  justify-self: center;
}

.matrix-axis.x {
  grid-column: 2;
  justify-self: end;
}

.naming-matrix {
  min-height: 420px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(23, 61, 51, 0.14) calc(50% - 1px), rgba(23, 61, 51, 0.14) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), rgba(23, 61, 51, 0.14) calc(50% - 1px), rgba(23, 61, 51, 0.14) calc(50% + 1px), transparent calc(50% + 1px)),
    var(--surface);
}

.name-token {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 150px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  color: var(--green);
  text-align: left;
}

.name-token:hover,
.name-token.is-selected {
  border-color: var(--teal);
  background: rgba(20, 112, 110, 0.12);
  color: var(--green);
}

.name-token span {
  color: var(--muted);
  font-weight: 600;
}

.selected-naming {
  grid-column: 2;
  margin: 0;
  color: var(--teal);
  font-weight: 900;
}

.funnel {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.funnel-step {
  width: var(--w);
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px 22px;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(90deg, var(--green), var(--teal));
  animation: revealWidth 550ms ease both;
}

.funnel-step:nth-child(2) {
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.funnel-step:nth-child(3) {
  background: linear-gradient(90deg, var(--blue), var(--plum));
}

.funnel-step:nth-child(4) {
  background: linear-gradient(90deg, var(--gold), var(--coral));
}

.funnel-step:nth-child(5) {
  background: linear-gradient(90deg, var(--coral), var(--green));
}

.funnel-step strong {
  line-height: 1.2;
}

.funnel-step small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
}

.funnel-step span {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.45;
}

.path-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  position: relative;
}

.path-map::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 34px;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--coral));
}

.path-node {
  position: relative;
  padding: 68px 16px 18px;
}

.path-node span {
  position: absolute;
  top: 18px;
  left: 16px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--green);
  font-weight: 900;
}

.path-node strong {
  display: block;
  color: var(--green);
  font-size: 23px;
}

.path-node em {
  display: block;
  color: var(--teal);
  font-style: normal;
  font-weight: 900;
}

.two-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.two-stage div {
  min-height: 260px;
  display: grid;
  align-content: center;
  padding: 24px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.two-stage strong {
  display: block;
  margin-top: 9px;
  color: var(--green);
  font-size: 30px;
}

.two-stage p {
  color: var(--muted);
  line-height: 1.58;
}

.two-stage i {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--coral));
  position: relative;
}

.two-stage i::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 18px;
  height: 18px;
  border-top: 4px solid var(--coral);
  border-right: 4px solid var(--coral);
  transform: translateY(-50%) rotate(45deg);
}

.mission-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mission {
  min-height: 260px;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.mission em {
  margin-top: auto;
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

.agenda {
  display: grid;
  gap: 10px;
}

.agenda div {
  display: grid;
  grid-template-columns: 80px 170px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.agenda strong {
  color: var(--green);
  font-size: 18px;
}

.agenda p {
  margin: 0;
}

.prework-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.prework-grid label,
.brief-preview {
  display: grid;
  gap: 7px;
}

.prework-grid label span,
.brief-preview strong {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.prework-grid .wide {
  grid-column: 1 / -1;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 112, 110, 0.12);
}

.slider-set {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.range-field {
  display: grid;
  gap: 8px;
}

.range-field b {
  color: var(--teal);
}

.brief-preview,
.output-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #17231f;
}

.brief-preview strong {
  color: rgba(255, 255, 255, 0.82);
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #edf2ef;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
}

.decision-board {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
}

.decision-status {
  min-height: 260px;
  padding: 24px;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, var(--gold), var(--green));
}

.decision-status.is-go {
  background: linear-gradient(135deg, var(--teal), var(--green));
}

.decision-status.is-nogo {
  background: linear-gradient(135deg, var(--coral), var(--plum));
}

.decision-status strong {
  display: block;
  margin-top: 10px;
  font-size: 32px;
  line-height: 1.1;
}

.decision-status p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.58;
}

.decision-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.decision-checks div {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 124px;
  padding: 18px;
}

.decision-checks span {
  color: var(--muted);
  font-weight: 900;
}

.decision-checks strong {
  color: var(--green);
  font-size: 29px;
}

.output-panel {
  max-height: 680px;
  overflow: auto;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fillBar {
  from {
    transform: scaleX(0);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 8px rgba(20, 112, 110, 0.14);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(20, 112, 110, 0.04);
  }
}

@keyframes floatSoft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes revealWidth {
  from {
    opacity: 0;
    transform: scaleX(0.96);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .facilitator-panel {
    display: none;
  }

  .stage-section {
    grid-template-columns: 1fr;
  }

  .section-copy {
    position: static;
  }
}

@media (max-width: 820px) {
  .app-shell {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .chapter-rail {
    height: auto;
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 14px;
  }

  .brand-lockup {
    grid-template-columns: auto 1fr;
    align-items: baseline;
  }

  .brand-lockup small,
  .local-status {
    display: none;
  }

  .chapter-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .chapter-nav button {
    min-width: 150px;
  }

  .deck-shell,
  .chapter-rail {
    height: auto;
    overflow: visible;
  }

  .deck-header {
    display: grid;
    padding: 20px;
  }

  .stage {
    overflow: visible;
    padding: 18px 20px 52px;
  }

  .hero-visual,
  .hero-visual img {
    min-height: 480px;
  }

  .hero-panel {
    left: 18px;
    right: 18px;
  }

  .hero-metrics,
  .scope-grid,
  .glossary-grid,
  .gate-board,
  .mission-board,
  .shield-map,
  .persona-grid,
  .kpi-strip,
  .slider-set,
  .path-map,
  .decision-checks {
    grid-template-columns: 1fr;
  }

  .territory-wrap,
  .overlap-map,
  .chrono {
    min-height: auto;
  }

  .territory-wrap,
  .overlap-map {
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .territory-center,
  .territory-node,
  .venn-circle,
  .overlap-core {
    position: static;
    transform: none;
    width: auto;
    height: auto;
    border-radius: 8px;
  }

  .territory-center {
    min-height: 150px;
  }

  .overlap-core {
    min-height: 0;
  }

  .rule-lane,
  .path-map {
    grid-template-columns: 1fr;
  }

  .rule-lane::before,
  .path-map::before {
    display: none;
  }

  .persona-tile,
  .case-layout,
  .question-layout,
  .two-stage,
  .pie-layout,
  .decision-board {
    grid-template-columns: 1fr;
  }

  .arrow-flow,
  .two-stage i {
    display: none;
  }

  .chrono {
    display: grid;
    gap: 12px;
  }

  .chrono-line,
  .chrono-dot {
    display: none;
  }

  .chrono-node,
  .chrono-node.left,
  .chrono-node.right {
    position: static;
    width: 100%;
    padding: 0;
    transform: none;
  }

  .gantt-scale {
    display: none;
  }

  .gantt-row,
  .role-row,
  .bar-row,
  .agenda div {
    grid-template-columns: 1fr;
  }

  .funnel-step {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .prework-grid {
    grid-template-columns: 1fr;
  }

  .naming-matrix {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
}

@media print {
  body {
    background: var(--white);
  }

  .chapter-rail,
  .facilitator-panel,
  .deck-header,
  button {
    display: none !important;
  }

  .app-shell,
  .deck-shell {
    display: block;
    height: auto;
    overflow: visible;
  }

  .stage {
    overflow: visible;
    padding: 0;
  }

  .stage-section {
    page-break-inside: avoid;
  }
}
