/* ================================================================
   AGENT JOURNEY — styles.css
   NxN Design System v1 — Agent Journey Edition
   ================================================================ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  /* Brand colors — North by Normal */
  --teal:        #2C5F5F;
  --teal-light:  #3a7a7a;
  --teal-pale:   #E4EEEC;
  --orange:      #E07A3F;

  /* Oatmeal palette — warm, earthy, calm */
  --bg:          #FAF8F5;
  --surface:     #F2EDE6;
  --surface-2:   #EAE4DB;
  --border:      #DDD7CE;
  --border-dark: #C4BDB4;

  /* Text */
  --dark:        #292524;
  --body:        #57534E;
  --muted:       #A8A29E;

  /* Semantic */
  --white:       #FFFFFF;
  --green:       #4D7C62;

  /* Section states */
  --section-empty:  #F2EDE6;
  --section-active: #E4EEEC;
  --section-done:   #FFFFFF;

  /* Tokens */
  --radius: 6px;
  --shadow: 0 1px 3px rgba(41, 37, 36, 0.07), 0 1px 8px rgba(41, 37, 36, 0.04);
  --trans:  0.2s ease;

  /* Typography */
  --font-heading: 'Jost', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'Zilla Slab', Georgia, serif;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }


/* ================================================================
   BUTTONS
   ================================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: var(--white);
  border: 2px solid var(--teal);
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  transition: background var(--trans), transform var(--trans), border-color var(--trans);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary:hover {
  background: var(--teal-light);
  border-color: var(--teal-light);
  text-decoration: none;
  color: var(--white);
}
.btn-primary:active { transform: scale(0.98); }

.btn-primary.btn-orange {
  background: #F25E0C;
  border-color: #F25E0C;
}
.btn-primary.btn-orange:hover {
  background: #d4520a;
  border-color: #d4520a;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--border-dark);
  padding: 9px 20px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  transition: background var(--trans), border-color var(--trans);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn-secondary:hover {
  background: var(--surface);
  border-color: var(--teal);
  text-decoration: none;
  color: var(--teal);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.825rem;
}

.btn-text {
  background: none;
  border: none;
  color: var(--body);
  font-family: var(--font-body);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  transition: color var(--trans);
  white-space: nowrap;
}
.btn-text:hover { color: var(--teal); }

.btn-icon {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--teal);
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--trans), border-color var(--trans);
  flex-shrink: 0;
}
.btn-icon:hover {
  background: var(--surface);
  border-color: var(--teal);
}


/* ================================================================
   LANDING PAGE
   ================================================================ */
body.landing {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  padding: 18px 40px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.site-header .logo { height: 32px; width: auto; }

main { flex: 1; }

/* Hero */
.hero {
  text-align: center;
  padding: 68px 24px 36px;
  max-width: 600px;
  margin: 0 auto;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 300;
  color: var(--teal);
  line-height: 1.15;
  margin-bottom: 8px;
}
.hero .tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 22px;
  font-style: italic;
  font-weight: 300;
}
.hero .subhead {
  font-size: 1.1rem;
  color: var(--body);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.75;
  font-weight: 300;
}

/* Scenario section */
.scenario-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 24px 80px;
}

.scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.scenario-card {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color var(--trans), background var(--trans),
              transform var(--trans), box-shadow var(--trans);
  font-family: inherit;
  outline: none;
}
.scenario-card:hover {
  border-color: var(--teal);
  background: var(--teal-pale);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.scenario-card:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(44, 95, 95, 0.18);
}
.scenario-card.selected {
  border-color: var(--teal);
  background: var(--teal-pale);
  box-shadow: var(--shadow);
}
.scenario-card.selected::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 13px;
  color: var(--teal);
  font-size: 0.875rem;
  font-family: var(--font-heading);
  font-weight: 600;
}

.card-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.card-body { flex: 1; }
.card-label {
  font-family: var(--font-heading);
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
  line-height: 1.3;
}
.card-subtext {
  font-family: var(--font-body);
  font-size: 0.825rem;
  color: var(--body);
  line-height: 1.45;
  font-weight: 300;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 40px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--white);
  font-family: var(--font-body);
}


/* ================================================================
   APP PAGE — LAYOUT
   ================================================================ */
body.app {
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}


/* ================================================================
   CHAT PANEL (left — 38%)
   ================================================================ */
.chat-panel {
  width: 38%;
  min-width: 300px;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--white);
  flex-shrink: 0;
}

.chat-header {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  flex-shrink: 0;
}
.back-link {
  font-size: 0.775rem;
  color: var(--muted);
  display: inline-block;
  margin-bottom: 7px;
  font-family: var(--font-heading);
  letter-spacing: 0.01em;
}
.back-link:hover { color: var(--teal); text-decoration: none; }

.chat-header h2 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 300;
  color: var(--teal);
  margin-bottom: 1px;
  line-height: 1.2;
}

.scenario-tag {
  display: block;
  font-size: 0.7rem;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 10px;
}

/* Turn progress */
.turn-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}
.progress-bar {
  flex: 1;
  height: 3px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s ease;
}
.progress-label {
  font-size: 0.68rem;
  color: var(--muted);
  font-family: var(--font-heading);
  white-space: nowrap;
  letter-spacing: 0.02em;
  min-width: 60px;
  text-align: right;
}
.progress-label.warn { color: var(--orange); }

/* Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
}

.msg {
  max-width: 90%;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.65;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg-ai {
  background: var(--white);
  color: var(--dark);
  align-self: flex-start;
  border: 1px solid var(--border);
  border-bottom-left-radius: 2px;
}
.msg-user {
  background: var(--teal);
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}
.msg-system {
  background: var(--teal-pale);
  color: var(--teal);
  align-self: center;
  font-size: 0.8rem;
  text-align: center;
  border: 1px solid var(--teal);
  max-width: 100%;
  font-family: var(--font-heading);
  border-radius: var(--radius);
  padding: 9px 14px;
}

/* Confirmation card */
.msg-confirmation {
  align-self: flex-start;
  width: 95%;
  background: var(--teal-pale);
  border: 1px solid var(--teal);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 14px 16px;
  animation: fadeIn 0.3s ease;
}
.confirmation-label {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 8px;
}
.confirmation-text {
  font-size: 0.875rem;
  color: var(--dark);
  line-height: 1.65;
  margin-bottom: 12px;
  font-family: var(--font-body);
}
.confirmation-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.confirmed-note {
  font-size: 0.8rem;
  color: var(--teal);
  font-family: var(--font-heading);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-bottom-left-radius: 2px;
  align-self: flex-start;
  width: fit-content;
}
.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--border-dark);
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%            { transform: translateY(-5px); }
}

/* Input area */
.chat-input-area {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: var(--white);
  flex-shrink: 0;
}
#user-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 0.875rem;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--dark);
  resize: none;
  line-height: 1.5;
  transition: border-color var(--trans);
  min-height: 42px;
  max-height: 120px;
  overflow-y: auto;
}
#user-input::placeholder { color: var(--muted); }
#user-input:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--white);
}
#user-input:disabled {
  background: var(--surface);
  color: var(--muted);
  cursor: not-allowed;
}
#send-btn:disabled {
  background: var(--border-dark);
  border-color: var(--border-dark);
  cursor: not-allowed;
}


/* ================================================================
   BRIEF PANEL (right — flex: 1)
   ================================================================ */
.brief-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.brief-title {
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
}
.brief-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brief-logo {
  height: 26px;
  width: auto;
  display: block;
  opacity: 0.85;
  transition: opacity var(--trans);
}
.brief-logo:hover { opacity: 1; }
.scenario-tag-brief {
  font-size: 0.68rem;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

/* Brief content scrollable area — 2-col top row, then full-width */
.brief-content {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
}

/* Doc header, sections 3–6, toolkit, and print note all span both columns */
.brief-doc-header,
#section-approaches,
#section-recruitment,
#section-success_looks,
#section-effort_level,
.toolkit-divider,
#toolkit-content-area,
.print-footer-note {
  grid-column: 1 / -1;
}

/* Brief document header */
.brief-doc-header {
  padding-bottom: 12px;
  border-bottom: 2px solid var(--teal);
  margin-bottom: 2px;
}
.brief-doc-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--teal);
  line-height: 1.15;
}
.brief-doc-meta {
  font-size: 0.775rem;
  color: var(--muted);
  font-family: var(--font-heading);
  margin-top: 3px;
}

/* ── Brief section cards ──────────────────────────────────────── */
.brief-section {
  border-radius: var(--radius);
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border: 1.5px solid transparent;
  transition: background var(--trans), border-color var(--trans), box-shadow var(--trans);
}

/* Empty state */
.brief-section.state-empty {
  background: var(--section-empty);
  border-color: var(--border);
}
.brief-section.state-empty .section-content {
  color: var(--muted);
  font-style: italic;
}

/* Populating state — animated teal border */
.brief-section.state-populating {
  background: var(--section-active);
  border-color: var(--teal);
  animation: borderPulse 0.6s ease-in-out infinite;
}
@keyframes borderPulse {
  0%   { box-shadow: 0 0 0 0 rgba(44, 95, 95, 0.2); }
  50%  { box-shadow: 0 0 0 4px rgba(44, 95, 95, 0.08); }
  100% { box-shadow: 0 0 0 0 rgba(44, 95, 95, 0); }
}

/* Done state */
.brief-section.state-done {
  background: var(--section-done);
  border-color: var(--border-dark);
  box-shadow: var(--shadow);
}
.brief-section.state-done .section-content {
  color: var(--dark);
  font-style: normal;
}

/* Pop animation when section fills in */
.brief-section.state-just-filled {
  animation: sectionPop 0.45s ease;
}
@keyframes sectionPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.012); box-shadow: 0 4px 18px rgba(44, 95, 95, 0.14); }
  100% { transform: scale(1); }
}

.section-label {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  flex-shrink: 0;
}

.section-content {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
  font-style: italic;
  outline: none;
  min-height: 22px;
  word-break: break-word;
}

/* Edit affordance on done sections */
.brief-section.state-done .section-content[contenteditable="true"]:hover {
  outline: 1px dashed var(--border-dark);
  border-radius: 2px;
  cursor: text;
}
.brief-section.state-done .section-content[contenteditable="true"]:focus {
  outline: 2px solid rgba(44, 95, 95, 0.25);
  border-radius: 2px;
}

/* ── Approaches section ──────────────────────────────────────── */
.approach-item {
  margin-bottom: 10px;
  line-height: 1.7;
}
.approach-item:last-child { margin-bottom: 0; }
.approach-item strong {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--dark);
}
.approach-tradeoff {
  color: var(--body);
  font-style: italic;
}

/* ── Effort level badge ──────────────────────────────────────── */
.effort-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px 3px;
  border-radius: 3px;
  vertical-align: baseline;
  line-height: 1.6;
}
.effort-light      { background: #EBF5EE; color: #276749; }
.effort-moderate   { background: #FEF3E7; color: #92400E; }
.effort-significant { background: #FEECEC; color: #9B1C1C; }
.effort-explanation { color: var(--dark); font-style: normal; }


/* ================================================================
   TOOLKIT
   ================================================================ */
.toolkit-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 2px;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.toolkit-divider::before,
.toolkit-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.toolkit-block {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--dark);
}
.toolkit-block p { margin-bottom: 8px; }
.toolkit-block p:last-child { margin-bottom: 0; }
.toolkit-block strong {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--teal);
  display: block;
  margin: 12px 0 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.toolkit-block strong:first-child { margin-top: 0; }


/* ================================================================
   COMPLETION FOOTER (sticky bottom of brief panel)
   ================================================================ */
.completion-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--white);
  padding: 14px 20px 16px;
}

/* Constellation block */
.constellation-block { margin-bottom: 12px; }

.constellation-prompt {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.constellation-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.constellation-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  background: var(--bg);
  transition: border-color var(--trans), background var(--trans);
}
.constellation-link:hover {
  border-color: var(--teal);
  background: var(--teal-pale);
  text-decoration: none;
}

.constellation-icon {
  font-size: 0.9rem;
  color: var(--teal);
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.7;
}
.constellation-link-body { flex: 1; }
.constellation-link-name {
  font-family: var(--font-heading);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--teal);
  line-height: 1.3;
}
.constellation-link-desc {
  font-size: 0.775rem;
  color: var(--body);
  line-height: 1.4;
  margin-top: 1px;
}

/* CTAs row */
.completion-ctas {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* Feedback line */
.feedback-prompt {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-body);
  line-height: 1.55;
}
.feedback-prompt a {
  color: var(--muted);
  text-decoration: underline;
}
.feedback-prompt a:hover { color: var(--teal); }

/* Print footer note — screen: hidden, print: visible */
.print-footer-note { display: none; }


/* ================================================================
   SHARED VIEW (read-only brief, no chat panel)
   ================================================================ */
body.shared-view .chat-panel  { display: none !important; }
body.shared-view .brief-panel { flex: 1; }
body.shared-view .section-content { pointer-events: none; }

.shared-view-banner {
  background: var(--teal-pale);
  border-bottom: 1px solid var(--teal);
  padding: 10px 20px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--teal);
  text-align: center;
  flex-shrink: 0;
}
.shared-view-banner a {
  font-weight: 600;
  color: var(--teal);
  text-decoration: underline;
}


/* ================================================================
   PRINT / PDF STYLES
   ================================================================ */
@media print {
  body {
    height: auto;
    overflow: visible;
    font-size: 10pt;
    background: white;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.app { height: auto; overflow: visible; }

  .chat-panel,
  .brief-header,
  .completion-footer,
  .shared-view-banner {
    display: none !important;
  }

  .app-layout {
    display: block;
    height: auto;
  }

  .brief-panel {
    width: 100%;
    height: auto;
    overflow: visible;
    background: white;
  }

  .brief-content {
    overflow: visible;
    padding: 0;
    gap: 6pt;
    display: block; /* override grid — single column for PDF */
  }

  /* Ensure all sections are full-width in print */
  #section-learning_questions,
  #section-why_now {
    grid-column: auto;
  }

  .brief-doc-header {
    padding-bottom: 8pt;
    margin-bottom: 10pt;
    border-bottom: 1.5pt solid #2C5F5F;
  }
  .brief-doc-title {
    font-size: 18pt;
    font-weight: 300;
    color: #2C5F5F;
  }
  .brief-doc-meta {
    font-size: 8pt;
    color: #A8A29E;
    margin-top: 2pt;
  }

  .brief-section {
    border: 0.75pt solid #DDD7CE !important;
    border-radius: 3pt;
    padding: 8pt 10pt;
    background: white !important;
    break-inside: avoid;
    margin-bottom: 6pt;
    display: block;
  }
  .section-label {
    font-size: 6.5pt;
    font-weight: 700;
    color: #2C5F5F;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4pt;
  }
  .section-content {
    font-size: 9.5pt !important;
    color: #292524 !important;
    font-style: normal !important;
    line-height: 1.55;
    display: block;
  }
  .section-content[data-placeholder="true"] {
    color: #C4BDB4 !important;
    font-style: italic !important;
  }

  .approach-item { margin-bottom: 6pt; }
  .approach-item strong { color: #292524; }
  .approach-tradeoff { color: #57534E; }

  .effort-badge {
    border: 0.5pt solid currentColor;
    font-size: 6.5pt;
    padding: 1pt 5pt;
  }

  /* Toolkit on page 2 if present */
  .toolkit-divider {
    display: block !important;
    page-break-before: always;
    font-size: 8pt;
    color: #A8A29E;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0 0 10pt 0;
    border-bottom: 0.5pt solid #DDD7CE;
    margin-bottom: 10pt;
    text-align: center;
  }
  .toolkit-divider::before,
  .toolkit-divider::after { display: none; }

  .toolkit-block {
    border: 0.75pt solid #DDD7CE;
    border-radius: 3pt;
    padding: 8pt 10pt;
    font-size: 9pt;
    background: white;
    break-inside: avoid;
    margin-bottom: 6pt;
  }
  .toolkit-block strong {
    font-size: 7pt;
    color: #2C5F5F;
    display: block;
    margin: 8pt 0 3pt;
  }

  /* Footer — every print page */
  .print-footer-note {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 7pt;
    color: #A8A29E;
    text-align: center;
    padding: 4pt 0;
    border-top: 0.5pt solid #DDD7CE;
    font-family: 'Jost', sans-serif;
    background: white;
  }

  a::after { content: none !important; }
}


/* ================================================================
   RESPONSIVE — TABLET / MOBILE
   ================================================================ */
@media (max-width: 768px) {
  body.app {
    height: auto;
    overflow: auto;
  }

  .app-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .chat-panel {
    width: 100%;
    max-width: 100%;
    height: 45vh;
    min-height: 340px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .brief-panel {
    width: 100%;
    height: auto;
    min-height: 60vh;
    overflow: visible;
  }

  .brief-content {
    grid-template-columns: 1fr; /* collapse to single column on mobile */
    overflow: visible;
    padding-bottom: 200px; /* room for fixed footer on mobile */
  }

  /* On mobile all sections are full-width already, but be explicit */
  #section-learning_questions,
  #section-why_now {
    grid-column: 1 / -1;
  }

  .completion-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    box-shadow: 0 -2px 12px rgba(41, 37, 36, 0.1);
    max-height: 50vh;
    overflow-y: auto;
  }

  .hero { padding: 48px 24px 30px; }
  .scenario-section { padding-bottom: 60px; }
  .site-header { padding: 16px 20px; }
}

@media (max-width: 480px) {
  .scenario-grid { grid-template-columns: 1fr; }

  .completion-ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .completion-ctas .btn-primary,
  .completion-ctas .btn-secondary,
  .completion-ctas .btn-text {
    text-align: center;
    justify-content: center;
  }
}
