:root {
  --ink: #183329;
  --muted: #52685f;
  --green: #2f6c50;
  --green-dark: #214d3a;
  --green-soft: #e8f1eb;
  --gold: #8a6d2e;
  --paper: #fbfcfa;
  --line: #d8e1da;
  --danger: #8d2f2f;
  --danger-soft: #fff0ef;
  --safe: #e9f5ee;
  font-family: Aptos, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #edf3ee;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #f9fbf6 0, #eaf1eb 55%, #e3ece5 100%); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 3px solid #9b6b00; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.demo-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(250px, 360px) minmax(360px, 520px); justify-content: center; gap: 64px; padding: 42px; }
.context-panel { padding: 32px 12px; align-self: start; }
.brand-large { font-size: 38px; font-weight: 850; letter-spacing: -1px; color: var(--green-dark); }
.brand-tag { margin-top: 3px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: 2px; }
.context-panel h1 { margin: 58px 0 12px; font-size: 31px; line-height: 1.05; }
.context-panel p { color: var(--muted); line-height: 1.65; }
.journey-list { list-style: none; margin: 30px 0; padding: 0; display: grid; gap: 6px; counter-reset: journey; }
.journey-list li { counter-increment: journey; padding: 13px 14px; border-radius: 8px; color: #465b52; font-weight: 700; }
.journey-list li::before { content: counter(journey); display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 12px; border-radius: 50%; background: #dfe8e1; font-size: 12px; }
.journey-list li.current { background: #dcebe0; color: var(--green-dark); }
.journey-list li.current::before { background: var(--green-dark); color: white; }
.context-note { font-size: 13px; border-top: 1px solid #cad7cc; padding-top: 18px; }

.app-frame { position: relative; min-height: 830px; max-height: calc(100vh - 60px); align-self: start; display: grid; grid-template-rows: auto auto 1fr auto; background: white; border: 8px solid #213d32; border-radius: 38px; overflow: hidden; box-shadow: 0 24px 70px rgba(25, 55, 41, .18); }
.app-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 26px 15px; }
.app-header strong { display: block; font-size: 23px; color: var(--green-dark); }
.app-header small { display: block; margin-top: 2px; color: var(--gold); font-size: 8px; font-weight: 850; letter-spacing: 1.4px; }
.language-form select { min-width: 70px; min-height: 44px; border: 1px solid var(--line); border-radius: 22px; padding: 0 14px; background: white; color: var(--ink); font-weight: 750; }
.mode-bar { margin: 0 20px 14px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; background: #eef3ef; border-radius: 12px; }
.mode-bar a { min-height: 44px; display: grid; place-items: center; text-decoration: none; font-size: 13px; font-weight: 800; border-radius: 9px; }
.mode-bar a.active { background: white; box-shadow: 0 2px 8px rgba(31, 68, 49, .10); }

.screen-content { padding: 8px 20px 26px; overflow-y: auto; background: var(--paper); }
.hero-card, .passport-hero { padding: 26px; border-radius: 20px; color: white; background: linear-gradient(135deg, #295f46, #438462); position: relative; overflow: hidden; }
.hero-card::after, .passport-hero::after { content: "✳"; position: absolute; right: 18px; top: 8px; font-size: 96px; line-height: 1; color: rgba(255,255,255,.12); }
.eyebrow { display: block; margin-bottom: 10px; color: inherit; font-size: 10px; font-weight: 850; letter-spacing: 1.5px; }
.hero-card h2, .passport-hero h2 { max-width: 340px; margin: 0 0 12px; font-size: 27px; line-height: 1.12; }
.hero-card p, .passport-hero p { position: relative; max-width: 360px; color: #e5f2e9; line-height: 1.55; }
.section-heading { padding: 12px 4px 18px; }
.section-heading.compact { padding-bottom: 8px; }
.section-heading .eyebrow { color: var(--gold); }
.section-heading h2 { margin: 0 0 7px; font-size: 25px; }
.section-heading p { margin: 0; color: var(--muted); line-height: 1.5; }

.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 0 19px; border: 0; border-radius: 11px; text-decoration: none; font-weight: 800; cursor: pointer; }
.button.primary { color: white; background: var(--green-dark); }
.hero-card .button.primary { color: var(--green-dark); background: white; position: relative; margin-top: 6px; }
.button.secondary { color: var(--green-dark); background: var(--green-soft); }
.button.full { width: 100%; }

.principles-grid { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.principles-grid article { min-height: 126px; padding: 16px; display: flex; flex-direction: column; gap: 7px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.principles-grid article span { font-size: 22px; }
.principles-grid article strong { font-size: 13px; }
.principles-grid article small { color: var(--muted); line-height: 1.35; }

.consent-form { display: grid; gap: 10px; }
.consent-card { min-height: 80px; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: white; cursor: pointer; }
.consent-card:has(input:checked) { border: 2px solid var(--green); background: var(--green-soft); }
.consent-card input { width: 20px; height: 20px; accent-color: var(--green); }
.consent-card strong, .consent-card small { display: block; }
.consent-card small { margin-top: 4px; color: var(--muted); line-height: 1.35; }
.processing-consent { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; padding: 13px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.processing-consent input { width: 18px; height: 18px; accent-color: var(--green); }

.chat-log { min-height: 220px; max-height: 410px; padding: 12px 2px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.message { max-width: 88%; padding: 13px 15px; border-radius: 16px; background: white; border: 1px solid var(--line); }
.message.user { align-self: flex-end; background: var(--green-dark); color: white; border-bottom-right-radius: 4px; }
.message.assistant { align-self: flex-start; border-bottom-left-radius: 4px; }
.message.urgent, .message.professional, .message.scope { border: 2px solid #d38b84; background: var(--danger-soft); }
.message strong { font-size: 11px; letter-spacing: .7px; }
.message p { margin: 6px 0 0; line-height: 1.45; }
.ladder { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.ladder h3 { margin: 0 0 9px; font-size: 16px; }
.ladder div { padding: 9px 0; display: grid; gap: 3px; border-top: 1px dashed var(--line); }
.ladder div b { color: var(--green-dark); font-size: 12px; }
.ladder div span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.ladder .product-step.none { padding: 10px; border: 1px solid #bfd4c5; background: #edf6f0; border-radius: 8px; }
.ladder .product-step.none b { color: var(--green-dark); }
.product-facts { margin: 10px 0 0; display: grid; gap: 6px; }
.product-facts div { padding: 7px 0; border-top: 1px solid var(--line); }
.product-facts dt { color: var(--muted); font-size: 11px; font-weight: 800; }
.product-facts dd { margin: 3px 0 0; color: var(--ink); font-size: 12px; line-height: 1.4; }
.source, .commercial-note { display: block; margin-top: 9px; color: #4e6258; line-height: 1.4; }
.commercial-note { padding: 9px; background: #f4efe2; color: #624e20; border-radius: 8px; }
.message form { margin-top: 12px; }
.prompt-chips { padding: 10px 0; display: flex; gap: 7px; overflow-x: auto; }
.prompt-chips button { min-height: 38px; flex: 0 0 auto; border: 1px solid #91a99a; border-radius: 19px; padding: 0 12px; color: var(--green-dark); background: white; cursor: pointer; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.chat-form input { min-width: 0; min-height: 48px; padding: 0 14px; border: 1px solid #b7c6bc; border-radius: 11px; color: var(--ink); background: white; }

.passport-list { margin: 14px 0; display: grid; gap: 9px; }
.passport-list div, .cbo-summary div { padding: 15px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.passport-list dt, .cbo-summary span { color: var(--muted); font-size: 12px; font-weight: 750; }
.passport-list dd, .cbo-summary strong { display: block; margin: 6px 0 0; line-height: 1.4; }
.cbo-summary { display: grid; gap: 9px; }
.alert { margin: 12px 0; padding: 13px 15px; border-radius: 11px; line-height: 1.45; }
.alert.error { background: var(--danger-soft); color: var(--danger); border: 1px solid #e5b3ae; }
.alert.safe { background: var(--safe); color: var(--green-dark); border: 1px solid #bcd8c6; }

.app-footer { min-height: 58px; padding: 10px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: white; border-top: 1px solid var(--line); color: #52685f; font-size: 11px; }
.app-footer button { border: 0; padding: 9px 10px; color: var(--green-dark); background: var(--green-soft); border-radius: 8px; font-weight: 800; cursor: pointer; }

@media (max-width: 900px) {
  .demo-shell { display: block; padding: 0; }
  .context-panel { display: none; }
  .app-frame { width: 100%; min-height: 100vh; max-height: none; border: 0; border-radius: 0; box-shadow: none; }
}

@media (max-width: 380px) {
  .app-header { padding-inline: 16px; }
  .mode-bar, .screen-content { margin-inline: 0; }
  .screen-content { padding-inline: 14px; }
  .principles-grid { grid-template-columns: 1fr; }
  .hero-card, .passport-hero { padding: 21px; }
  .hero-card h2, .passport-hero h2 { font-size: 24px; }
}

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

