:root {
  --cream: #faf8f4;
  --surface: #ffffff;
  --navy: #0b1742;
  --royal: #0820a3;
  --mist: #eef1ff;
  --amber: #c97a16;
  --amber-soft: #fdf3df;
  --teal: #0d6e6e;
  --teal-soft: #e6f5f2;
  --coral: #c44d34;
  --coral-soft: #fcece9;
  --ink: #1a2138;
  --muted: #55607a;
  --border: #dde2ee;
  --periwinkle: #5370ff;
  --display: Newsreader, Georgia, serif;
  --body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ui: "Plus Jakarta Sans", var(--body);
  --gutter: clamp(18px, 4.6vw, 78px);
  --panel-padding: clamp(18px, 2.8vw, 34px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 132px; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1rem/1.62 var(--body);
}

h1, h2, h3, h4 {
  margin: 0 0 0.42em;
  color: var(--navy);
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.024em;
  overflow-wrap: anywhere;
}

h1 { font-size: clamp(2.4rem, 4.7vw, 4.2rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 1.9vw, 1.65rem); }
h4 { font-size: 1.12rem; }

p { margin: 0.45em 0 0.95em; }
figure, blockquote { margin: 0; }
img, svg, video { max-width: 100%; }

small, .eyebrow, figcaption {
  font-size: 0.8rem;
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.55em;
  color: var(--royal);
  font: 700 0.76rem/1.4 var(--ui);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.eyebrow.teal { color: var(--teal); }
.eyebrow.amber { color: var(--amber); }
.eyebrow.coral { color: var(--coral); }

a { color: var(--royal); text-underline-offset: 0.19em; }
button, input, select, textarea { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button, a, summary { touch-action: manipulation; }

button, .primary, .secondary {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.62em 0.95em;
  background: var(--surface);
  font: 700 0.86rem/1.4 var(--ui);
  text-align: start;
  overflow-wrap: anywhere;
}

button:hover, .secondary:hover { border-color: var(--periwinkle); }
button:disabled { cursor: default; opacity: 0.5; }
:focus-visible { outline: 3px solid var(--periwinkle); outline-offset: 3px; }

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select, textarea {
  min-width: 0;
  max-width: 100%;
  border: 1px solid #b8c0d1;
  border-radius: 6px;
  padding: 0.55em 0.75em;
  background: var(--surface);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--royal);
  cursor: pointer;
}

.primary, .secondary, .text-link {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  text-decoration: none;
}

.primary {
  padding: 0.78em 1.15em;
  background: var(--royal);
  border-color: var(--royal);
  color: var(--surface);
}
.primary:hover { background: var(--navy); border-color: var(--navy); }

.secondary { color: var(--royal); }
.secondary:hover { background: var(--mist); }

.text-link {
  border: 0;
  padding: 0.35em 0;
  background: transparent;
  color: var(--royal);
  font: 700 0.86rem/1.4 var(--ui);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  border-radius: 999px;
  background: var(--mist);
  padding: 0.22em 0.75em;
  color: var(--royal);
  font: 700 0.76rem/1.4 var(--ui);
  white-space: nowrap;
}
.pill.teal { background: var(--teal-soft); color: var(--teal); }
.pill.amber { background: var(--amber-soft); color: #8c5206; }
.pill.coral { background: var(--coral-soft); color: #8f2d1a; }

.feedback {
  border-radius: 8px;
  padding: 0.85em 1.05em;
  background: var(--mist);
  border: 1px solid #d4dcff;
  font-size: 0.92rem;
}
.feedback:empty { display: none; }
.feedback.ok { background: var(--teal-soft); border-color: #b7dfd7; color: #0a4d4d; }
.feedback.warn { background: var(--amber-soft); border-color: #ecd19b; color: #744405; }
.feedback.bad { background: var(--coral-soft); border-color: #efb8ae; color: #872416; }

.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  z-index: 30;
  top: 6px;
  left: 6px;
  background: var(--surface);
  padding: 0.6em 1em;
}

/* Header & Navigation */
#top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}

.mast, #nav, #main {
  width: min(1400px, 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mast {
  display: flex;
  align-items: center;
  min-height: 64px;
  gap: 16px;
}

.mast-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand {
  color: var(--navy);
  text-decoration: none;
  font: 600 clamp(1.3rem, 1.95vw, 1.75rem)/1 var(--display);
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.mast-caption {
  color: var(--muted);
  font: 600 0.76rem/1.4 var(--ui);
  padding-inline-start: 16px;
  border-inline-start: 1px solid var(--border);
}

.tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
}

.tools button {
  white-space: nowrap;
  font-size: 0.79rem;
  text-align: center;
}

#focusMode {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border-color: transparent;
  padding-inline: 6px;
}

.toggle {
  display: inline-flex;
  width: 25px;
  height: 15px;
  padding: 3px;
  flex: none;
  border-radius: 999px;
  background: #767f94;
}
.toggle::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface);
}
.focus .toggle { justify-content: end; background: var(--royal); }

.book-btn {
  color: var(--surface);
  background: var(--navy);
  border-color: var(--navy);
}
.book-btn:hover { background: var(--royal); border-color: var(--royal); }

#nav {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

#nav a {
  display: flex;
  align-items: center;
  flex: none;
  gap: 6px;
  border-bottom: 3px solid transparent;
  padding: 10px 0 12px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  font: 700 clamp(0.74rem, 0.9vw, 0.84rem)/1.4 var(--ui);
}
#nav a:hover { color: var(--navy); }
#nav a[aria-current="page"] { color: var(--royal); border-color: var(--royal); }

.dot {
  width: 6px;
  height: 6px;
  flex: none;
  border: 1px solid #8993ab;
  border-radius: 50%;
}
.done .dot { border-color: var(--teal); background: var(--teal); }

/* Main Layout */
#main {
  min-height: 74vh;
  padding-block: clamp(24px, 3.6vw, 48px) 64px;
  outline: none;
}

.section-head { margin: 0 0 clamp(20px, 3.2vw, 34px); }
.section-head > p { max-width: 68ch; color: var(--muted); font-size: 1.03rem; }

.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--panel-padding);
  background: var(--surface);
}
.panel + .panel, .stack > * + * { margin-top: clamp(16px, 2.4vw, 28px); }

.two-col, .three-col, .four-col {
  display: grid;
  gap: clamp(12px, 2vw, 24px);
}
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.four-col { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-col > *, .three-col > *, .four-col > * { min-width: 0; }

/* Hero & KPI strip */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  align-items: start;
  gap: clamp(22px, 3.5vw, 52px);
  padding-block: 4px clamp(26px, 4vw, 44px);
}

.hero h1 {
  max-width: 17ch;
  margin-bottom: 0.3em;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero .lead {
  max-width: 54ch;
  margin: 0 0 1.25em;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.14rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

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

.kpi-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  background: var(--surface);
}
.kpi-card.accent-teal { border-top: 3px solid var(--teal); }
.kpi-card.accent-royal { border-top: 3px solid var(--royal); }
.kpi-card.accent-amber { border-top: 3px solid var(--amber); }
.kpi-card.accent-coral { border-top: 3px solid var(--coral); }

.kpi-value {
  display: block;
  color: var(--navy);
  font: 600 clamp(1.6rem, 2.4vw, 2.2rem)/1.08 var(--display);
  letter-spacing: -0.03em;
}
.kpi-label {
  display: block;
  margin-top: 4px;
  font: 700 0.8rem/1.35 var(--ui);
  color: var(--ink);
}
.kpi-sub {
  display: block;
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Video block */
.video-panel video {
  display: block;
  width: 100%;
  max-height: 540px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--navy);
  object-fit: contain;
}

/* Interactive Entry Router ("Par où commencer") */
.diagnostic { border-top: 3px solid var(--amber); }
.diagnostic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(14px, 2.6vw, 28px);
  margin-top: 1em;
}
.diagnostic-choices { display: grid; gap: 8px; }
.diagnostic-choices button {
  padding: 0.8em 1em;
  font-family: var(--body);
  font-weight: 600;
}
.diagnostic-choices button[aria-pressed="true"],
.depth-tabs button[aria-pressed="true"],
.filter-bar button[aria-pressed="true"] {
  border-color: var(--royal);
  background: var(--mist);
  color: var(--royal);
}
.diagnostic-result {
  padding: clamp(16px, 2.2vw, 26px);
  border-radius: 8px;
  background: var(--mist);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.diagnostic-result h3 { color: var(--royal); margin-bottom: 0.25em; }

/* Alert / Callout Banner */
.callout {
  border-radius: 10px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-inline-start: 4px solid var(--royal);
}
.callout.amber { border-inline-start-color: var(--amber); background: var(--amber-soft); border-color: #ecd19b; }
.callout.teal { border-inline-start-color: var(--teal); background: var(--teal-soft); border-color: #b7dfd7; }
.callout.coral { border-inline-start-color: var(--coral); background: var(--coral-soft); border-color: #efb8ae; }
.callout h4 { margin-bottom: 0.25em; }
.callout p:last-child { margin-bottom: 0; }

/* Quote block */
.quote-block {
  border-inline-start: 3px solid var(--amber);
  padding: 6px 0 6px clamp(16px, 2.4vw, 28px);
  margin-block: 16px;
}
.quote-block blockquote {
  color: var(--navy);
  font: italic 400 clamp(1.18rem, 1.9vw, 1.55rem)/1.35 var(--display);
}
.quote-block figcaption { margin-top: 0.45em; }

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--surface);
}
th, td {
  text-align: left;
  padding: 10px 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  background: #f4f6fb;
  color: var(--navy);
  font: 700 0.78rem/1.35 var(--ui);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Timeline */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.timeline-step {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.timeline-step.active { border-top: 3px solid var(--royal); background: #fbfcff; }
.timeline-step .step-date { font: 700 0.76rem/1.3 var(--ui); color: var(--royal); }
.timeline-step h4 { margin: 0; }
.timeline-step p { font-size: 0.87rem; margin: 0; color: var(--muted); }

/* Price Bars */
.bar-list { display: grid; gap: 11px; margin-top: 12px; }
.bar-row { display: grid; gap: 4px; }
.bar-meta { display: flex; justify-content: space-between; font-size: 0.88rem; }
.bar-track {
  height: 11px;
  border-radius: 999px;
  background: #edf0f7;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #9aa5bf;
}
.bar-fill.lead { background: var(--teal); }

/* Product Sheet Cards */
.product-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  background: var(--surface);
  display: grid;
  gap: 14px;
}
.product-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.product-thumb {
  width: 100%;
  max-height: 290px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: zoom-in;
  background: #f5f7fb;
}
.claim-list { margin: 0; padding-inline-start: 1.25em; font-size: 0.92rem; }
.claim-list li + li { margin-top: 4px; }

/* Stakeholder Map */
.actor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.actor-btn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: 9px;
  background: var(--surface);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.actor-btn[aria-pressed="true"] {
  border-color: var(--royal);
  background: var(--mist);
}
.actor-btn strong { color: var(--navy); font-size: 0.95rem; }
.actor-btn span { font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.actor-detail {
  margin-top: 16px;
  padding: 20px;
  border-radius: 10px;
  background: #f8f9fe;
  border: 1px solid #d5dcf7;
}

/* Simulators */
.sim-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(16px, 2.8vw, 32px);
  align-items: start;
}
.control-group {
  display: grid;
  gap: 14px;
}
.field { display: grid; gap: 5px; }
.field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 0.88rem;
}
.field-head label { font-weight: 600; color: var(--navy); }
.field-val { font: 700 0.92rem/1 var(--ui); color: var(--royal); font-variant-numeric: tabular-nums; }
.field-hint { font-size: 0.78rem; color: var(--muted); }

.seg-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: #eff1f7;
}
.seg-switch button {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.45em 0.8em;
}
.seg-switch button[aria-pressed="true"] {
  background: var(--surface);
  border-color: var(--border);
  color: var(--royal);
}

.metric-box-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.metric-box {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 13px 15px;
  background: #fcfcfd;
}
.metric-box.highlight { background: var(--teal-soft); border-color: #b7dfd7; }
.metric-box.royal-hi { background: var(--mist); border-color: #cbd5ff; }
.metric-box.warn-hi { background: var(--amber-soft); border-color: #ecd19b; }
.metric-box.danger-hi { background: var(--coral-soft); border-color: #efb8ae; }
.metric-box small { display: block; font-size: 0.76rem; }
.metric-box strong {
  display: block;
  margin-top: 2px;
  font: 600 1.4rem/1.15 var(--display);
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

/* Budget builder */
.budget-bar-wrap { margin: 14px 0 18px; }
.budget-bar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.budget-bar-track {
  height: 14px;
  border-radius: 999px;
  background: #eaedf5;
  overflow: hidden;
}
.budget-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--teal);
  transition: width 0.2s ease, background-color 0.2s ease;
}
.budget-bar-fill.warn { background: var(--amber); }
.budget-bar-fill.over { background: var(--coral); }

.budget-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.budget-line:last-child { border-bottom: 0; }
.budget-line-info strong { display: block; font-size: 0.92rem; color: var(--navy); }
.budget-line-info small { display: block; font-size: 0.78rem; }

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.stepper button {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1rem;
}
.stepper span {
  min-width: 2.2ch;
  text-align: center;
  font: 700 0.9rem/1 var(--ui);
  font-variant-numeric: tabular-nums;
}
.budget-line-total {
  min-width: 72px;
  text-align: right;
  font: 700 0.9rem/1 var(--ui);
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

/* Questions & Checklist */
.q-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.q-tabs button {
  padding: 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.q-tabs button[aria-pressed="true"] {
  background: var(--royal);
  border-color: var(--royal);
  color: var(--surface);
}
.q-tabs button[aria-pressed="true"] small { color: #d8e0ff; }

.depth-tabs, .filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block: 14px;
}

.checklist { display: grid; gap: 8px; }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
.check-item input[type="checkbox"] {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
  flex: none;
}
.check-item.checked { background: var(--teal-soft); border-color: #b7dfd7; }
.check-item.checked strong { text-decoration: line-through; color: var(--teal); }
.check-item span { display: block; font-size: 0.82rem; color: var(--muted); }

/* Objections Trainer */
.objection-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.objection-quote {
  font: italic 500 1.12rem/1.35 var(--display);
  color: var(--navy);
}
.objection-answer {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

/* Glossary & Accordion */
.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.search-row input { flex: 1 1 260px; }

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.gloss-item {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px 16px;
  background: var(--surface);
}
.gloss-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.gloss-item strong { color: var(--navy); font-size: 0.95rem; }
.gloss-item p { margin: 0; font-size: 0.88rem; color: var(--muted); }

details.acc {
  border-bottom: 1px solid var(--border);
}
details.acc summary {
  padding: 12px 0;
  font-weight: 600;
  color: var(--navy);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; color: var(--royal); font-weight: 700; }
details.acc[open] summary::after { content: "−"; }
details.acc[open] summary { color: var(--royal); }
details.acc .acc-body { padding: 0 0 14px; font-size: 0.92rem; color: var(--ink); }

/* Pager */
.step-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.step-pager a:last-child { margin-inline-start: auto; }

/* Drawer & Lightbox */
#drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(440px, 96vw);
  max-width: none;
  height: 100dvh;
  max-height: 100%;
  margin: 0;
  padding: clamp(17px, 4vw, 26px);
  border: 0;
  border-inline-start: 1px solid var(--border);
  background: var(--cream);
  color: var(--ink);
  overscroll-behavior: contain;
}
#drawer::backdrop, #lightbox::backdrop { background: rgb(11 23 66 / 44%); }
body:has(#drawer[open]), body:has(#lightbox[open]) { overflow: hidden; }

#lightbox {
  width: min(860px, 94vw);
  max-height: 92dvh;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  background: var(--cream);
}
.lightbox-body {
  margin-top: 14px;
  overflow: auto;
  max-height: 75dvh;
  text-align: center;
}
.lightbox-body img { border-radius: 8px; border: 1px solid var(--border); }

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.drawer-head h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }
.drawer-head .close { padding: 0.15em 0.45em; font: 400 1.5rem/1 var(--body); }

.method-questions {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--mist);
}
.question-list { margin: 6px 0 0; padding-inline-start: 1.25em; font-size: 0.85rem; }
.question-list li + li { margin-top: 6px; }

.carnet-notes { margin: 20px 0; }
.carnet-notes-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.carnet-empty { margin: 6px 0 0; color: var(--muted); font-size: 0.86rem; }

.entry {
  padding-block: 11px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.entry h4 { margin-bottom: 0.2em; font-size: 1.02rem; }
.entry p { margin: 0; white-space: pre-wrap; font-size: 0.86rem; color: var(--muted); }
.entry-del { border: 0; padding: 2px 6px; background: transparent; color: var(--muted); font-size: 0.78rem; }
.entry-del:hover { color: var(--coral); }

.drawer-actions { display: flex; gap: 10px; }
.drawer-book {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--border);
  margin-top: 18px;
  padding-top: 12px;
  font-size: 0.78rem;
  color: var(--muted);
}

#carnet-print { display: none; }

/* Focus Mode */
body.focus #main { max-width: 960px; }
body.focus .aux, body.focus .mast-caption { display: none; }
body.focus .hero,
body.focus .diagnostic-layout,
body.focus .two-col,
body.focus .three-col,
body.focus .four-col,
body.focus .timeline,
body.focus .sim-grid,
body.focus .glossary-grid { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 1024px) {
  #nav { justify-content: space-between; }
}

@media (max-width: 960px) {
  .hero, .sim-grid, .diagnostic-layout { grid-template-columns: minmax(0, 1fr); }
  .timeline, .four-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .mast { min-height: 56px; flex-wrap: wrap; gap: 8px; padding-block: 8px; }
  .mast-identity { display: grid; gap: 2px; }
  .brand { font-size: 1.18rem; }
  .mast-caption { border: 0; padding: 0; font-size: 0.68rem; }
  .tools button { font-size: 0.72rem; padding-inline: 0.65em; }
  .two-col, .three-col, .four-col, .timeline, .kpi-grid,
  .metric-box-grid, .actor-grid, .glossary-grid, .q-tabs {
    grid-template-columns: minmax(0, 1fr);
  }
  .budget-line { grid-template-columns: minmax(0, 1fr) auto; }
  .budget-line-total { text-align: left; }
  .step-pager a { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  @page { margin: 14mm; }
  html, body { background: white; color: black; }
  #top, .skip, .step-pager, #drawer, #lightbox { display: none !important; }
  body:has(#drawer[open]) { overflow: visible; }
  body:has(#drawer[open]) #main { display: none !important; }
  body:has(#drawer[open]) #carnet-print { display: block; }
  #carnet-print { font-size: 10.5pt; line-height: 1.45; }
  #carnet-print h1, #carnet-print h2, #carnet-print h4 { color: black; break-after: avoid; }
}
