@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/eb-garamond.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --heading: "EB Garamond", Garamond, Georgia, serif;
  --weight-heading: 700;
  --weight-emphasis: 600;
  --weight-label: 500;
  --ink: #142333;
  --muted: #455968;
  --gold: #c59a49;
  --brown: #79591f;
  --navy: #213b4d;
  --logo-navy: #011c2d;
  --teal: #176b7e;
  --teal-dark: #12576a;
  --wash: #e9f4f6;
  --line: #d8e4eb;
  --light: #f7fafb;
  --error: #a12926;
  --page-gutter: clamp(2rem, 4vw, 3.5rem);
  color: var(--ink);
  font: 400 clamp(1rem, .95rem + .15vw, 1.0625rem)/1.5 "Source Sans 3", "Segoe UI", sans-serif;
  background: var(--gold);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; overflow-wrap: anywhere; }
body:has(dialog:modal) { overflow: hidden; }
[hidden] { display: none !important; }
h1, h2, h3, h4, legend { font-family: var(--heading); font-weight: var(--weight-heading); line-height: 1.13; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
h3 { font-size: 1.52rem; }
h4 { font-size: 1.24rem; }
strong, th { font-weight: var(--weight-emphasis); }
a { color: var(--teal-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
.nav-menu-icon { position: relative; flex: none; width: 1.12rem; height: .8rem; border-block: 2px solid currentColor; }
.nav-menu-icon::after { content: ''; position: absolute; inset-inline: 0; inset-block-start: 50%; border-block-start: 2px solid; transform: translateY(-50%); }
:focus-visible { outline: 3px solid #197c96; outline-offset: 3px; }
summary { cursor: pointer; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-size: clamp(1.3rem, 2.2vw, 1.65rem); margin-bottom: .8rem; padding: 0; }
textarea, input[type="password"] {
  width: 100%;
  border: 1px solid #a6bac4;
  border-radius: .45rem;
  background: #fff;
  padding: .65rem .8rem;
}
textarea { display: block; resize: vertical; min-height: 3.5rem; }
.wrap { width: 100%; margin-inline: auto; padding-inline: var(--page-gutter); }
.muted { color: var(--muted); }
.error { padding: .65rem .85rem; border: 1px solid #deaeaa; border-radius: .45rem; background: #fff2f1; color: var(--error); font-weight: var(--weight-emphasis); }
.skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 2; background: white; padding: .5rem; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.topbar {
  min-height: 4.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .55rem 1.3rem;
  padding: .6rem var(--page-gutter);
  border-bottom: 1px solid #e4eaef;
  background: #fff;
}
.brand { display: flex; align-items: center; gap: clamp(.55rem, 2vw, 1.3rem); }
.brand-mark { display: block; width: clamp(120px, 17vw, 205px); height: auto; }
.brand-name { border-left: 1px solid var(--line); padding-left: .9rem; font: var(--weight-heading) clamp(1.1rem, 2vw, 1.5rem)/1.1 var(--heading); }
.portal-link { font-weight: var(--weight-label); text-underline-offset: 4px; }
.overview-band { background: white; }
.scenario-overview { padding-block: 1.25rem 1.1rem; }
.scenario-title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem 1.4rem; }
.scenario-title-row h1 { font-size: clamp(2.15rem, 4vw, 3.5rem); margin-top: .1rem; }
.eyebrow { font-size: .76rem; font-weight: var(--weight-emphasis); letter-spacing: .095em; color: var(--muted); }
.scenario-intro { margin-top: .45rem; color: var(--muted); }
.scenario-description { margin-top: .5rem; }
.scenario-description summary, .review-record summary { color: var(--teal-dark); font-weight: var(--weight-label); }
.scenario-brief { margin-top: .7rem; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: .45rem; background: var(--light); }
.brief-role { border-left: 3px solid var(--teal); padding-left: .6rem; margin-bottom: .35rem; }
.brief-role strong, .plan-label strong, .review-grid p strong { margin-right: .35rem; }
.scenario-desks { display: flex; flex-wrap: wrap; gap: .42rem; }
.desk-button {
  display: flex;
  align-items: center;
  gap: .38rem;
  border: 1px solid var(--navy);
  border-radius: .5rem;
  background: var(--navy);
  color: white;
  padding: .47rem .62rem;
  min-height: 2.55rem;
  font-weight: var(--weight-label);
  font-size: .88rem;
}
.desk-button:hover:not(:disabled) { background: var(--ink); }
.desk-button:disabled { color: #536573; background: #eff3f5; border-color: #dce5eb; }
.desk-button .chevron { margin-left: auto; padding-left: .2rem; }
.scenario-desks .desk-button:enabled { background: var(--gold); color: var(--ink); border-color: var(--brown); }
.scenario-desks .desk-button:enabled:hover { border-color: var(--ink); }

.stage-navigation { border-block: 1px solid #dfe7ec; }
.stage-nav { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .3rem; padding-block: .55rem; margin-block: 0; list-style: none; }
.stage-link {
  border: 1px solid transparent;
  background: transparent;
  border-radius: .5rem;
  color: var(--muted);
  text-align: left;
  display: flex;
  align-items: center;
  gap: .38rem;
  min-height: 3.25rem;
  width: 100%;
  padding: .28rem .32rem;
  line-height: 1.12;
}
.stage-link:not(:disabled, .selected):hover { color: var(--teal-dark); border-color: #bedce1; background: var(--wash); }
.stage-link.selected { color: white; border-color: var(--logo-navy); background: var(--logo-navy); }
.stage-link strong, .stage-link small { display: block; overflow-wrap: anywhere; }
.stage-link strong { font-size: .8rem; font-weight: var(--weight-label); }
.stage-link small { font-size: .68rem; margin-top: .2rem; }
.stage-number {
  border: 1px solid #cfdde5;
  background: white;
  border-radius: .4rem;
  min-width: 1.72rem;
  height: 1.72rem;
  padding-inline: .14rem;
  display: inline-grid;
  place-content: center;
  font-size: .77rem;
  font-weight: var(--weight-label);
  color: var(--teal-dark);
  flex: none;
}
.stage-link.selected .stage-number { background: var(--wash); color: var(--logo-navy); border-color: var(--wash); }
.recorded .stage-number { background: #eff6f7; }

.main-panel { padding-block: clamp(.8rem, 2vw, 1.8rem) 2.5rem; }
.content-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .7rem;
  background: var(--brown);
  border-radius: .7rem;
  color: white;
  padding: clamp(.75rem, 2.5vw, 1.6rem) clamp(.85rem, 2.5vw, 1.75rem);
  margin-bottom: clamp(.7rem, 1.7vw, 1.2rem);
}
.content-heading .eyebrow { color: #ffefcf; }
.content-heading h2 { margin: .14rem 0 .35rem; font-size: clamp(1.9rem, 4vw, 3.16rem); }
.content-heading h2:focus { outline: none; }
.content-heading > div { flex: 1; min-width: 0; }
.stage-tag { background: #f7ead1; color: #553c11; border-radius: .35rem; white-space: nowrap; padding: .28rem .55rem; font-size: .78rem; font-weight: var(--weight-label); }
.main-panel > .error { margin-bottom: .7rem; }
.workspace { display: grid; gap: 1rem; }
.has-sidebar { grid-template-columns: minmax(0, 1fr) minmax(14rem, 18.75rem); align-items: start; }
.stage-card, .side-panel {
  background: #fff;
  border: 1px solid #e1e8ee;
  border-radius: .7rem;
  padding: clamp(.8rem, 2.3vw, 1.5rem);
  box-shadow: 0 4px 20px #30200012;
  min-width: 0;
}
.sidebar { min-width: 0; display: grid; gap: .85rem; }
.side-panel { padding: .85rem 1rem; }
.side-panel h3 { margin-bottom: .45rem; }
.side-panel .secondary { margin-top: .6rem; }
.decision-list { list-style: none; display: grid; margin: 0; padding: 0; }
.decision-list li { display: flex; align-items: flex-start; gap: .48rem; padding: .45rem 0; line-height: 1.3; }
.decision-list li + li { border-top: 1px solid #e8eef1; }
.decision-list p { color: var(--muted); margin-top: .14rem; }
.sidebar .decision-list { font-size: .9rem; }

.primary, .secondary, .text-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .35rem;
  border-radius: .42rem;
  min-height: 2.5rem;
  padding: .4rem .8rem;
  font-weight: var(--weight-label);
  text-decoration: none;
  width: fit-content;
  max-width: 100%;
}
.primary { background: var(--teal); color: white; border: 1px solid var(--teal); }
.primary:hover:not(:disabled) { background: var(--teal-dark); }
.primary:disabled { background: #e6edf0; border-color: #92a4ac; color: #455968; }
.secondary { background: white; border: 1px solid #aac2cd; color: var(--teal-dark); }
.secondary:hover, .secondary[aria-pressed="true"] { background: var(--wash); border-color: var(--teal); }
.text-button { background: transparent; border: 0; color: var(--teal-dark); text-decoration: underline; text-underline-offset: 4px; padding-inline: 0; }
.stage-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-top: .95rem; }
.stage-form fieldset + fieldset { margin-top: 1.25rem; }
.form-label { display: block; margin-bottom: .8rem; }

.choice-grid { display: grid; gap: .55rem; }
.strategy-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.25rem), 1fr)); }
.choice-card {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  border: 1px solid #cbdce3;
  background: var(--light);
  border-radius: .55rem;
  min-height: 2.8rem;
  padding: .65rem .75rem;
  cursor: pointer;
}
.choice-card:hover, .choice-card:has(:checked) { background: var(--wash); border-color: var(--teal); }
.choice-card:has(:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }
.choice-card input { flex: none; margin: .25rem 0 0; width: 1rem; height: 1rem; accent-color: var(--teal); }
.choice-copy { display: grid; gap: .22rem; line-height: 1.28; }
.strategy-title { font-family: var(--heading); font-size: 1.28rem; font-weight: var(--weight-heading); line-height: 1.08; }
.strategy-cost { color: var(--teal-dark); font-weight: var(--weight-label); font-size: .88rem; margin-top: .16rem; }
.sequence-arrow { color: var(--teal-dark); display: inline-block; padding-inline: .4rem; }

.plan-label, .scenario-update {
  border-radius: .45rem;
  border-left: .2rem solid var(--teal);
  background: var(--wash);
  padding: .65rem .8rem;
}
.budget-breakdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: .75rem 0 .9rem; }
.budget-breakdown div { background: var(--light); border: 1px solid var(--line); border-radius: .4rem; padding: .45rem .55rem; }
.budget-breakdown dt { color: var(--muted); font-size: .81rem; }
.budget-breakdown dd { color: var(--teal-dark); font-weight: var(--weight-label); font-size: 1.16rem; font-variant-numeric: tabular-nums; }
.budget-breakdown .budget-balance { border-color: #a2cbd2; background: var(--wash); }
.budget-breakdown .over-budget { background: #fff0ee; border-color: #deaeaa; }
.over-budget dd { color: var(--error); }
.allocation-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.allocation-control { border: 1px solid var(--line); border-radius: .45rem; padding: .55rem .7rem; min-width: 0; }
.allocation-top, .allocation-scale { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.allocation-top output { color: var(--teal-dark); font-weight: var(--weight-label); font-variant-numeric: tabular-nums; }
.allocation-control input[type="range"] { display: block; width: 100%; height: 1.68rem; margin: .22rem 0 0; accent-color: var(--teal); cursor: pointer; }
.allocation-scale { font-size: .77rem; color: var(--muted); }
.budget-error { margin-top: .65rem; }

.mediation { margin-bottom: 1.2rem; }
.scenario-update h3 { margin-bottom: .25rem; }
#negotiation-heading { margin-block: .8rem .38rem; }
.mediation-roles { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
.mediation-roles .secondary { padding-inline: .6rem; }
.mediation-transcript, .desk-chat-log { border: 1px solid var(--line); background: var(--light); border-radius: .5rem; padding: .75rem; max-height: 18rem; overflow: auto; }
.mediation-transcript p { margin-top: .3rem; }
.mediation-transcript strong, .desk-chat-bubble strong { color: var(--teal-dark); margin-right: .25rem; }
.speaker-you { background: var(--wash); padding: .25rem .45rem; border-radius: .3rem; }
.consultation-form, .desk-chat-form { display: grid; gap: .4rem; margin-top: .65rem; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: .55rem; }
.review-grid section { background: var(--light); border: 1px solid var(--line); border-radius: .5rem; padding: .75rem; }
.review-grid .modeled-outcome { background: var(--wash); }
.review-grid p { margin-top: .35rem; }
.review-record { margin-block: .7rem 1rem; border-block: 1px solid var(--line); padding-block: .52rem; }
.review-record > p, .review-record > h4 { margin-top: .55rem; }
.allocation-record { display: grid; gap: .25rem; margin-top: .3rem; }
.allocation-record div { display: flex; justify-content: space-between; gap: .6rem; border-bottom: 1px solid var(--line); }
.allocation-record dd { color: var(--teal-dark); font-weight: var(--weight-label); }

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  border: 0;
  padding: 0;
  width: min(34rem, 100%);
  max-width: 100%;
  height: 100dvh;
  max-height: none;
  background: white;
  color: var(--ink);
  box-shadow: -12px 0 42px #1423333b;
}
.drawer::backdrop { background: #0a1b2768; }
.drawer-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  border-bottom: 1px solid var(--line);
  background: white;
  padding: .8rem 1rem;
}
.drawer-header h2 { font-size: 1.8rem; }
.close-button { background: #edf3f6; border: 0; border-radius: .35rem; width: 2.5rem; height: 2.5rem; font-size: 1.6rem; line-height: 1; }
.drawer-content { padding: .85rem 1rem 1.2rem; }
.drawer-error { margin: 0 1rem .8rem; }
.source-disclaimer { background: #fff6e9; color: #674717; border: 1px solid #efdbbb; border-radius: .45rem; padding: .55rem .65rem; }
.doc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin-block: .65rem; }
.doc-choice { text-align: left; border: 1px solid var(--line); border-radius: .42rem; padding: .6rem; background: white; min-height: 2.6rem; }
.doc-choice:hover, .doc-choice[aria-pressed="true"] { background: var(--wash); border-color: var(--teal); }
.doc-choice strong { font-weight: var(--weight-label); }
.doc-choice small { display: block; color: var(--muted); margin-top: .2rem; }
.doc-reader { background: #f9fcfd; border: 1px solid var(--line); border-radius: .5rem; padding: .8rem; }
.doc-reader h3 { margin-block: .2rem .45rem; }
.doc-type { color: #765423; font-size: .76rem; letter-spacing: .06em; font-weight: var(--weight-emphasis); }
.desk-description { margin-bottom: .65rem; color: var(--muted); }
.desk-chat-log { display: grid; gap: .5rem; }
.desk-chat-bubble { background: #fff; padding: .6rem; border-radius: .38rem; border: 1px solid var(--line); }
.desk-chat-bubble p + p { margin-top: .35rem; }

@media (max-width: 1050px) {
  .stage-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stage-link { min-height: 2.75rem; }
  .has-sidebar { grid-template-columns: minmax(0, 1fr) minmax(11rem, 15rem); }
  .budget-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 710px) {
  .has-sidebar { grid-template-columns: minmax(0, 1fr); }
  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .scenario-overview { padding-block: .8rem .75rem; }
  .scenario-desks { width: 100%; }
  .desk-button { flex: 1 1 auto; }
  .stage-link { flex-direction: column; align-items: center; justify-content: flex-start; gap: .15rem; text-align: center; min-height: 3.45rem; }
  .stage-link strong { font-size: .72rem; }
  .stage-link small { display: none; }
  .stage-tag { display: none; }
}

@media (max-width: 430px) {
  .topbar { align-items: flex-start; }
  .brand-name { max-width: 11rem; padding-left: .53rem; font-size: 1.07rem; }
  .scenario-desks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desk-button { justify-content: center; font-size: .79rem; padding-inline: .25rem; gap: .25rem; min-width: 0; line-height: 1.12; }
  .desk-button .chevron { display: none; }
  .allocation-list, .review-grid { grid-template-columns: minmax(0, 1fr); }
}

.consultation-options { display: grid; gap: .45rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.consultation-options select { display: block; width: 100%; border: 1px solid var(--line); border-radius: .42rem; background: var(--light); padding: .42rem; }
.commitment-summary { margin-bottom: .8rem; }
.commitment-summary p { margin-top: .3rem; }
.choice-card input { accent-color: var(--teal); }

.source-table { margin-top: .8rem; overflow-x: auto; }
.source-table table { width: 100%; border-collapse: collapse; font-size: .9rem; text-align: left; }
.source-table caption { font-weight: var(--weight-emphasis); text-align: left; margin-bottom: .35rem; }
.source-table th, .source-table td { border: 1px solid var(--line); padding: .35rem .45rem; }
.source-table thead { background: var(--wash); }

.stage-tool {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .8rem;
  padding: .65rem .75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--light);
}
.stage-tool p { color: var(--muted); }
.preview-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .55rem .85rem;
  padding: .65rem .8rem;
  margin-bottom: .8rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--wash);
}
