@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@1,6..72,500&display=swap');

:root {
  --ink: #15202b;
  --navy: #10263b;
  --navy-soft: #1c3851;
  --paper: #f4f1e9;
  --cream: #fbfaf6;
  --white: #fff;
  --orange: #f26a2e;
  --orange-dark: #d6531c;
  --sage: #91a69c;
  --line: rgba(21, 32, 43, .14);
  --muted: #68737e;
  --green: #277259;
  --red: #a2473d;
  --shadow: 0 24px 70px rgba(16, 38, 59, .12);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(242, 106, 46, .4); outline-offset: 3px; }

.topbar { min-height: 74px; padding: 0 clamp(20px, 4vw, 64px); display: flex; align-items: center; gap: 24px; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(251, 250, 246, .94); backdrop-filter: blur(15px); position: sticky; top: 0; z-index: 20; }
.brand { border: 0; background: none; color: var(--navy); display: flex; align-items: center; gap: 16px; padding: 0; }
.beyond-mark { color: var(--navy); font-size: 15px; line-height: 1; font-weight: 700; letter-spacing: .2em; }
.product-name { border-left: 1px solid #a9afb4; padding-left: 16px; font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.chapter-marker { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; white-space: nowrap; }

.eyebrow { margin: 0 0 14px; color: var(--orange); text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { font-size: clamp(42px, 6vw, 78px); line-height: .99; letter-spacing: -.055em; margin: 0; color: var(--navy); }
h1 em { font-family: "Newsreader", Georgia, serif; font-weight: 500; color: var(--orange); }
h2 { margin: 0; color: var(--navy); font-size: clamp(28px, 4vw, 46px); line-height: 1.05; letter-spacing: -.04em; }
h3 { color: var(--navy); letter-spacing: -.025em; }

.book-hero { min-height: 580px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: clamp(40px, 8vw, 130px); align-items: center; padding: 76px clamp(24px, 7vw, 110px); background: var(--navy); color: white; position: relative; overflow: hidden; }
.book-hero::before { content: ""; position: absolute; inset: 0; opacity: .14; background-image: radial-gradient(circle, #fff 1px, transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(90deg, black, transparent 70%); }
.book-hero::after { content: ""; position: absolute; width: 560px; height: 560px; border: 1px solid rgba(242, 106, 46, .28); border-radius: 50%; right: -250px; top: -300px; box-shadow: 0 0 0 80px rgba(242, 106, 46, .045), 0 0 0 160px rgba(242, 106, 46, .025); }
.book-hero-copy, .book-quote { position: relative; z-index: 1; }
.book-hero h1 { color: white; }
.hero-lede { max-width: 700px; color: #b9c5ce; font-size: clamp(18px, 2vw, 23px); line-height: 1.55; margin: 28px 0 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; color: #aebcc7; font-size: 12px; }
.book-quote { background: var(--cream); color: var(--navy); min-height: 330px; padding: 38px; display: flex; flex-direction: column; box-shadow: 14px 18px 0 rgba(242, 106, 46, .8), var(--shadow); transform: rotate(1.5deg); }
.book-quote > span { font-size: 11px; letter-spacing: .28em; font-weight: 700; }
.book-quote blockquote { margin: auto 0 28px; font-family: "Newsreader", Georgia, serif; font-style: italic; font-size: clamp(27px, 3vw, 38px); line-height: 1.16; letter-spacing: -.02em; }
.book-quote small { color: var(--muted); }

.live-status { display: inline-flex; gap: 8px; align-items: center; font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.live-status i { width: 7px; height: 7px; border-radius: 50%; background: #9aa2a9; }
.live-status.live i { background: #38a678; box-shadow: 0 0 0 4px rgba(56, 166, 120, .13); }
.live-status.checking i { background: #dc9730; animation: pulse 1.1s infinite; }
.book-hero .live-status { color: #aebcc7; }
@keyframes pulse { 50% { opacity: .35; } }

.library-shell { max-width: 1480px; margin: 0 auto; padding: 90px clamp(20px, 5vw, 76px) 120px; }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 38px; }
.library-heading h2 { max-width: 720px; }
.search { min-width: min(340px, 100%); display: grid; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.search input { width: 100%; border: 1px solid var(--line); border-radius: 3px; background: var(--cream); color: var(--ink); padding: 13px 14px; outline: none; text-transform: none; letter-spacing: 0; font-size: 14px; }
.search input:focus { border-color: var(--orange); }
.section-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 3px 0 16px; margin-bottom: 26px; scrollbar-width: thin; }
.section-tabs button { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 10px 14px; white-space: nowrap; border-radius: 999px; font-size: 12px; font-weight: 600; }
.section-tabs button small { margin-left: 5px; opacity: .65; }
.section-tabs button.active { background: var(--navy); color: white; border-color: var(--navy); }
.scenario-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.scenario-card { min-height: 330px; background: var(--cream); border: 1px solid var(--line); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.scenario-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(242, 106, 46, .6); }
.scenario-card > button { width: 100%; height: 100%; min-height: 330px; display: grid; grid-template-rows: auto 1fr auto; text-align: left; padding: 0; border: 0; background: transparent; color: inherit; }
.card-number { min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.card-number span { color: var(--orange); font-weight: 700; font-size: 13px; }
.card-number i { font-style: normal; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.completed .card-number i { color: var(--green); }
.card-body { padding: 24px 24px 20px; }
.capability { color: var(--orange-dark); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.card-body h3 { margin: 9px 0 13px; font-size: 24px; line-height: 1.08; }
.card-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.card-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding: 14px 18px; color: var(--muted); font-size: 11px; }
.card-foot strong { color: var(--navy); }
.card-foot b { color: var(--orange); margin-left: 7px; }
.empty-state { text-align: center; padding: 80px; background: var(--cream); border: 1px solid var(--line); }
.empty-state p { color: var(--muted); }

.briefing-page { max-width: 1400px; min-height: calc(100vh - 140px); margin: 0 auto; padding: 46px clamp(22px, 5vw, 72px) 90px; }
.back { border: 0; padding: 6px 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; }
.back:hover { color: var(--navy); }
.briefing-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .65fr); gap: clamp(55px, 9vw, 130px); margin-top: 45px; }
.briefing-copy h1 { max-width: 850px; }
.briefing-summary { max-width: 800px; color: var(--muted); font-size: 20px; line-height: 1.55; margin: 26px 0 42px; }
.situation-block { border-left: 3px solid var(--orange); padding: 3px 0 3px 22px; margin-bottom: 34px; max-width: 850px; }
.situation-block span, .your-move span, .pressure-note span, .task-card span, .practice-next span { display: block; color: var(--orange-dark); text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 700; margin-bottom: 8px; }
.situation-block p { margin: 0; line-height: 1.6; }
.fact-list { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: var(--line); gap: 1px; }
.fact-list article { padding: 22px; background: var(--cream); min-height: 142px; }
.fact-list span { color: var(--orange); font-size: 11px; font-weight: 700; }
.fact-list p { font-size: 13px; line-height: 1.5; margin: 13px 0 0; }
.your-move { margin-top: 22px; padding: 24px; background: var(--navy); color: white; }
.your-move p { margin: 0; line-height: 1.55; font-size: 16px; }
.briefing-panel { align-self: start; position: sticky; top: 110px; background: var(--cream); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 28px; }
.counterpart-card { display: flex; gap: 17px; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.initials, .context-person > span { width: 54px; height: 54px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: white; font-weight: 700; }
.counterpart-card small, .context-person small { display: block; color: var(--muted); margin-bottom: 3px; }
.counterpart-card h2 { font-size: 24px; margin: 0; }
.counterpart-card p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.role-row { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.role-row span { color: var(--muted); }
.role-row strong { text-align: right; }
.pressure-note { padding: 20px 0; }
.pressure-note p { margin: 0; font-size: 13px; line-height: 1.5; }
.difficulty-picker { border: 0; padding: 0; margin: 0 0 20px; display: grid; gap: 7px; }
.difficulty-picker legend { color: var(--muted); text-transform: uppercase; letter-spacing: .09em; font-size: 9px; font-weight: 700; margin-bottom: 8px; }
.difficulty-picker button { border: 1px solid var(--line); background: white; text-align: left; padding: 11px 12px; border-radius: 3px; }
.difficulty-picker button span { font-weight: 700; font-size: 12px; }
.difficulty-picker button small { display: block; color: var(--muted); margin-top: 3px; font-size: 10px; }
.difficulty-picker button.selected { border-color: var(--orange); box-shadow: inset 3px 0 0 var(--orange); }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; gap: 22px; border-radius: 3px; padding: 14px 19px; font-weight: 700; border: 1px solid transparent; }
.primary { background: var(--orange); color: white; }
.primary:hover { background: var(--orange-dark); }
.secondary { background: transparent; color: var(--navy); border-color: var(--line); }
.secondary:hover { border-color: var(--navy); }
.primary:disabled, .secondary:disabled { opacity: .35; cursor: not-allowed; }
.full { width: 100%; }
.privacy-note { display: block; text-align: center; color: var(--muted); font-size: 9px; line-height: 1.4; margin-top: 12px; }

.conversation-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; background: #eae7de; }
.conversation-grid { min-height: 0; display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); }
.conversation-context { padding: 42px 32px; background: var(--navy); color: white; }
.conversation-context .back { color: #a9bac6; margin-bottom: 52px; }
.conversation-context h2 { color: white; font-size: 32px; margin-bottom: 32px; }
.context-person { display: flex; align-items: center; gap: 14px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.14); border-bottom: 1px solid rgba(255,255,255,.14); }
.context-person > span { width: 44px; height: 44px; font-size: 12px; }
.context-person small { color: #aab9c5; margin-top: 3px; }
.task-card { margin: 25px 0; padding: 18px; background: rgba(255,255,255,.07); border-left: 2px solid var(--orange); }
.task-card p { margin: 0; color: #d1dbe2; line-height: 1.5; font-size: 13px; }
.conversation-context details { border-top: 1px solid rgba(255,255,255,.14); padding: 18px 0 28px; color: #c4d0d9; font-size: 12px; }
.conversation-context summary { cursor: pointer; color: white; font-weight: 600; }
.conversation-context li { margin: 9px 0; line-height: 1.4; }
.conversation-context .secondary { color: white; border-color: rgba(255,255,255,.25); }
.conversation-stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: calc(100vh - 74px); background: var(--cream); }
.conversation-stage > header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 23px clamp(24px, 5vw, 62px); border-bottom: 1px solid var(--line); }
.conversation-stage h1 { margin-top: 8px; font-size: 23px; letter-spacing: -.03em; }
.turn-count { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.transcript { overflow-y: auto; padding: 38px clamp(24px, 8vw, 110px); display: flex; flex-direction: column; gap: 24px; }
.message { display: flex; align-items: flex-start; gap: 12px; max-width: min(720px, 86%); }
.message.you { align-self: flex-end; justify-content: flex-end; }
.message-avatar { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: white; font-size: 10px; font-weight: 700; }
.message small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 6px 4px; }
.message.you small { text-align: right; margin-right: 4px; }
.message p { margin: 0; padding: 14px 17px; border-radius: 3px 15px 15px 15px; background: #e9e6dd; line-height: 1.55; font-size: 14px; }
.message.you p { background: var(--navy); color: white; border-radius: 15px 3px 15px 15px; }
.thinking p { display: flex; gap: 5px; padding: 17px 20px; }
.thinking p i { width: 5px; height: 5px; background: var(--muted); border-radius: 50%; animation: dots 1.2s infinite; }
.thinking p i:nth-child(2) { animation-delay: .15s; }.thinking p i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 50% { opacity: .25; transform: translateY(-2px); } }
.composer { padding: 17px clamp(24px, 8vw, 110px) 24px; border-top: 1px solid var(--line); background: white; }
.composer > label { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; margin-bottom: 7px; }
.composer > div { display: grid; grid-template-columns: 1fr 48px; border: 1px solid #cdd1d3; border-radius: 4px; overflow: hidden; }
.composer textarea { resize: none; border: 0; padding: 13px 15px; min-height: 56px; color: var(--ink); outline: none; }
.composer button { border: 0; background: var(--orange); color: white; font-size: 20px; }
.composer small { display: block; color: var(--muted); font-size: 10px; margin-top: 7px; }

.reflection-page { min-height: calc(100vh - 130px); display: grid; place-items: center; padding: 70px 24px; }
.reflection-page > section { width: min(860px, 100%); text-align: center; }
.reflection-page h1 { font-size: clamp(38px, 5vw, 64px); }
.reflection-page > section > p:not(.eyebrow) { color: var(--muted); font-size: 17px; line-height: 1.5; max-width: 650px; margin: 22px auto 35px; }
.reflection-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.reflection-options button { min-height: 135px; border: 1px solid var(--line); background: var(--cream); padding: 20px; text-align: left; color: var(--ink); }
.reflection-options button strong { display: block; color: var(--navy); font-size: 18px; margin-bottom: 8px; }
.reflection-options button span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.reflection-options button.selected { border-color: var(--orange); box-shadow: inset 0 -4px 0 var(--orange); }
.reflection-actions, .feedback-actions { margin-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }

.feedback-page { max-width: 1150px; margin: 0 auto; padding: 80px 24px 110px; }
.feedback-intro { text-align: center; margin-bottom: 45px; }
.feedback-intro h1 { font-size: clamp(40px, 5vw, 64px); }
.feedback-intro > p:last-child { color: var(--muted); font-size: 16px; }
.perspective-card { display: flex; gap: 24px; align-items: flex-start; padding: 34px; background: var(--navy); color: white; margin-bottom: 24px; }
.perspective-card small { color: var(--orange); text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 700; }
.perspective-card blockquote { margin: 12px 0 0; font-family: "Newsreader", Georgia, serif; font-style: italic; font-size: clamp(22px, 3vw, 32px); line-height: 1.25; }
.feedback-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.feedback-columns > section { padding: 26px; background: var(--cream); border: 1px solid var(--line); }
.evidence-card { display: flex; gap: 14px; padding: 17px 0; border-top: 1px solid var(--line); }
.evidence-card > span { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); }
.evidence-card.watch > span { background: var(--orange-dark); }
.evidence-card h3 { margin: 0 0 7px; font-size: 16px; }
.evidence-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.practice-next { display: grid; grid-template-columns: 1.4fr .6fr; gap: 0; margin-top: 24px; background: var(--orange); color: white; }
.practice-next > div, .practice-next aside { padding: 32px; }
.practice-next span { color: var(--navy); }
.practice-next h2 { color: white; font-size: 30px; }
.practice-next aside { background: var(--navy); }
.practice-next aside small { color: var(--orange); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.practice-next aside p { line-height: 1.55; }

footer { display: flex; justify-content: space-between; gap: 24px; padding: 20px clamp(22px, 5vw, 70px); border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.loading, .fatal { min-height: 100vh; display: grid; place-content: center; text-align: center; background: var(--navy); color: white; }
.loading span { color: var(--orange); letter-spacing: .25em; font-weight: 700; }
.loading p, .fatal p { color: #b8c4cd; }

@media (max-width: 1050px) {
  .scenario-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-hero { grid-template-columns: 1fr minmax(280px, .6fr); gap: 44px; }
  .briefing-grid { grid-template-columns: 1fr; }
  .briefing-panel { position: static; }
  .conversation-grid { grid-template-columns: 280px minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .topbar { min-height: 64px; flex-wrap: wrap; padding-top: 11px; padding-bottom: 11px; }
  .product-name, .chapter-marker { display: none; }
  .book-hero { min-height: auto; grid-template-columns: 1fr; padding-top: 60px; padding-bottom: 75px; }
  .book-quote { min-height: 250px; transform: none; box-shadow: 8px 10px 0 rgba(242, 106, 46, .8); }
  .library-heading { display: grid; align-items: start; }
  .search { min-width: 0; width: 100%; }
  .scenario-grid { grid-template-columns: 1fr; }
  .fact-list { grid-template-columns: 1fr; }
  .fact-list article { min-height: 0; }
  .briefing-page { padding-top: 28px; }
  .briefing-grid { margin-top: 30px; gap: 40px; }
  .conversation-grid { grid-template-columns: 1fr; }
  .conversation-context { padding: 24px; }
  .conversation-context .back { margin-bottom: 28px; }
  .conversation-context h2 { font-size: 26px; margin-bottom: 18px; }
  .conversation-context details, .task-card { display: none; }
  .conversation-context .secondary { margin-top: 20px; }
  .conversation-stage { min-height: 680px; }
  .transcript { min-height: 400px; max-height: 60vh; }
  .reflection-options, .feedback-columns, .practice-next { grid-template-columns: 1fr; }
  .reflection-actions, .feedback-actions { flex-direction: column-reverse; align-items: stretch; }
  .reflection-actions .back { padding: 15px; }
  footer { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
