/* Spacing and layout refinements applied last.
 * A later pass over the base layer — order matters, keep it loaded after the files above. */
.table-scroll{overflow:auto}
.commit-card{margin-bottom:20px;border-left:4px solid #4f76ca}
.commit-card select{width:100%;padding:10px;border:1px solid #d7dfec;border-radius:9px}
.learning-grid .meta{line-height:1.5}
.plan-choice{display:block;text-align:left;border:1px solid #d6deea;padding:18px;border-radius:16px;background:#fff;cursor:pointer}
.plan-choice:has(input:checked){border-color:#5681df;background:#eef4ff}
.plan-choice input{margin-right:8px}
.research-preview{max-height:280px;overflow:auto;white-space:pre-wrap;word-break:break-word;font-size:12px;background:#f4f6fa;padding:16px;border-radius:12px}
@media(max-width:720px){.learning-grid{grid-template-columns:1fr}.onboard-wrap{padding:12px}.onboard-card{border-radius:22px}.rigor-table td,.rigor-table th{padding:8px}.onboard-card .grid2{grid-template-columns:1fr}}
/* Keep onboarding content independent of the progress indicator. */
.onboard-card{min-width:0;height:auto;overflow:visible}
#journey-form{display:block;width:100%;min-width:0}
#journey-form .field > span{display:block;height:auto;margin-bottom:8px;line-height:1.45}
.research-choice > span{display:block;flex:1;min-width:0;height:auto;line-height:1.5;overflow-wrap:anywhere}
.research-choice small{display:block;margin-top:6px;line-height:1.5}
/* ── Layout & spacing improvements ── */
/* Ensure page-head never clips content */
.page-head{margin-bottom:32px;padding-bottom:4px}
.page-head h1{margin-bottom:12px}
.page-intro{max-width:820px;margin:16px 0 0!important;padding:13px 16px;border-left:3px solid #91add0;border-radius:0 10px 10px 0;background:linear-gradient(90deg,#eaf1f9 0%,#eef4fa 72%,transparent 100%);color:#40536d!important;font-size:.96rem;line-height:1.65;font-weight:500}
.page-head.row>div:first-child{min-width:0;flex:1}
/* Give hero sections room to breathe */
.hero{margin-bottom:30px}
/* Stats row spacing */
.grid3.stats{margin-bottom:28px}
/* Section heads */
.section-head{margin:34px 0 20px}
.section-heading-copy h2{margin-bottom:5px}
.section-heading-copy p{margin:0}
/* Scenario grid gap */
.grid2{gap:22px}
/* Workspace side aside top gap on small */
.workspace>aside{display:flex;flex-direction:column;gap:20px}
.workspace>aside>.card,.workspace>aside>.note{margin-top:0!important}
/* Prevent cropped note blocks */
.note{margin:22px 0;padding:18px 20px}
/* Chat log min-height relief on tight viewports */
.chat-log{min-height:280px}
/* Live numbers even padding */
.live-numbers{margin-bottom:18px}
.live-numbers>div{padding:14px 16px}
/* Negotiation table metrics spacing */
.deal-metrics{gap:18px}
.deal-metrics>div{padding-left:20px}
/* lesson layout workspace */
.lesson-layout .workspace{gap:26px}
.lesson-content{display:flex;flex-direction:column;gap:16px;min-width:0}
.lesson-content>.key-learning{margin:0}
/* Give the bibliography catalogue the page instead of squeezing it into a sidebar. */
.bibliography-catalog{margin-top:28px}
.bibliography-selected{max-width:900px;margin:28px 0 38px}
.bibliography-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}
.bibliography-section-heading .eyebrow{margin:0}
.bibliography-section-heading .meta{margin:6px 0 0}
.bibliography-section-heading>.tag{flex:0 0 auto}
.bibliography-section-heading>.btn{min-height:0;padding:6px 0;color:var(--blue)}
.bibliography-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));align-items:stretch;gap:18px}
.bibliography-detail{display:flex;flex-direction:column;gap:18px}
.bibliography-detail>.card,.bibliography-detail>.note,.bibliography-detail>details{margin:0}
.book-card{display:flex;flex-direction:column;align-items:stretch;width:100%;height:100%;min-width:0}
.book-card>.row:first-child{align-items:center;flex-wrap:nowrap}
.book-card>.row:first-child>div{min-width:0}
.book-card>.meta{flex:1;margin:14px 0 0;line-height:1.55}
.book-card .book-evidence-row{margin-top:16px}
.book-card .book-theme-row{margin-top:9px}
.bibliography-privacy{max-width:760px;margin:20px 0 0;line-height:1.6}
/* Align reference titles with the text inside their type chips. */
.reference-card>h3{margin-left:10px}
.account-grid+.account-grid{margin-top:22px}
.scripted-brief-card{display:flex;flex-direction:column}
.scripted-brief-card>.btn{align-self:flex-start;margin-top:auto}
.scripted-dialogue{min-height:0;max-height:none;margin:0 0 16px;padding:20px}
.scripted-dialogue .chat-avatar{display:grid;place-items:center;color:#4f6482;font-size:.78rem;font-weight:700}
.scripted-dialogue .chat-bubble{max-width:calc(100% - 44px)}
.scripted-move-panel>.meta{margin-bottom:16px}
.scripted-moves{gap:10px}
.scripted-moves .choice{display:grid;grid-template-columns:28px minmax(0,1fr);align-items:start;gap:10px;min-height:86px;padding:14px;border-radius:12px;background:#fbfcfe;line-height:1.5}
.scripted-moves .choice:hover:not(:disabled){border-color:#aabbd2;background:#f5f8fc}
.move-letter{width:28px;height:28px;display:grid;place-items:center;border-radius:8px;background:#e8eef7;color:#49627f;font-size:.75rem;font-weight:700}
.move-copy{padding-top:3px}
.live-prep-content{display:flex;flex-direction:column;gap:18px;min-width:0}
@media(min-width:1101px){.live-prep-workspace>aside{position:sticky;top:97px;align-self:start}}
.style-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.style-choice{display:flex!important;flex-direction:column;gap:12px;min-height:170px;padding:18px!important;border-radius:14px!important;background:#fbfcfe!important}
.style-choice:hover:not(:disabled){border-color:#a9bcd4;background:#f5f8fc!important}
.style-choice.selected{background:#edf4fd!important;border-color:#84a7d4;color:var(--ink)}
.style-choice-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;width:100%;text-align:left}
.style-name{display:block;font-size:.96rem;line-height:1.25;color:#263750}
.style-alias{display:block;margin-top:4px;font-size:.75rem;line-height:1.35;color:#6e7d91}
.style-difficulty{flex:0 0 auto;padding:5px 8px;border-radius:7px;background:#edf1f6;color:#617289;font-size:.65rem;font-weight:700;letter-spacing:.03em;text-transform:uppercase}
.style-blurb{display:block;font-size:.8rem;line-height:1.55;color:#64748a;text-align:left}
.style-usual{margin-top:auto;align-self:flex-start;padding:5px 8px;border-radius:7px;background:#e5edf8;color:#4f6e96;font-size:.68rem;font-weight:700}
.surprise-style{background:linear-gradient(145deg,#fbfcfe,#f3f7fb)!important}
.live-start-panel{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:20px 22px;border:1px solid #dfe5ee;border-radius:18px;background:#f8fafc}
.live-start-panel.is-ready{border-color:#cbdcb1;background:#f4f8ed}
.live-start-copy{min-width:0}
.live-start-copy>.eyebrow{display:block;margin:0 0 6px;color:#728096}
.live-start-copy>strong{display:block;font-size:1rem}
.live-requirements{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}
.live-requirements span{padding:5px 8px;border-radius:7px;background:#eceff3;color:#7b8797;font-size:.7rem;font-weight:600}
.live-requirements span.done{background:#e4efd5;color:#58713f}
.live-start-panel>.btn{flex:0 0 auto;min-width:190px}
/* Filter row breathing */
.filter{margin:22px 0}
/* Card inner top/bottom rhythm */
.card>*:first-child{margin-top:0}
.card>*:last-child{margin-bottom:0}
/* Divider spacing */
.divider{margin:26px 0}
/* Brief list spacing */
.brief li{padding:16px 0}
/* Issue fieldset gap */
.issue{padding:22px 0}
/* Steps bar spacing */
.steps{margin:26px 0}
/* API key setup card */
.api-key-panel{background:#fff8f0c8;border:1px solid #f0dfc8;border-radius:16px;padding:22px 24px;margin-bottom:22px}
.api-key-panel h3{margin:0 0 8px;font-size:1rem}
.api-key-panel p{margin:0 0 14px;font-size:.86rem;color:#6b5843}
.api-key-panel .row{gap:10px;margin-top:0}
.api-key-panel input[type=password]{flex:1;font-family:monospace;letter-spacing:.05em}
/* Top bar btn alignment fix */
.top>.row{gap:10px;flex-wrap:nowrap}
@media(max-width:760px){
  .page-head{margin-bottom:22px}
  .page-intro{margin-top:12px!important;padding:11px 13px;font-size:.9rem;line-height:1.58}
  .grid2{gap:16px}
  .workspace>aside{gap:14px}
  .note{margin:16px 0;padding:14px 16px}
  .deal-metrics{gap:12px}
  .deal-metrics>div{padding-left:0}
  .api-key-panel{padding:16px}
  .bibliography-catalog{margin-top:22px}
  .bibliography-selected{margin:22px 0 30px}
  .bibliography-section-heading{align-items:flex-start}
}
@media(max-width:520px){
  .choices{grid-template-columns:1fr;gap:8px}
  .choice{padding:12px;text-align:left;font-size:.82rem}
  .scripted-dialogue{padding:14px}
  .scripted-moves .choice{min-height:0;padding:12px}
  .ask-row{flex-direction:column}
  .ask-submit{width:100%}
  .style-grid{grid-template-columns:1fr}
  .style-choice{min-height:0}
  .live-start-panel{align-items:stretch;flex-direction:column}
  .live-start-panel>.btn{width:100%;min-width:0}
}
.access-grid .module-card{display:grid;grid-template-rows:auto auto auto 1fr auto;align-content:start;gap:16px}
.access-grid .module-card > .tag{justify-self:start;align-self:start;height:auto;min-height:0;line-height:1.4;padding:6px 10px}
.access-grid .module-card > h2{margin:0;line-height:1.2}
.access-grid .module-card > b{line-height:1.5}
.access-grid .module-card > .btn{margin-top:0;width:100%;align-self:end}
