
:root {
  --bg: #0b1016;
  --bg-2: #101722;
  --panel: rgba(17, 23, 34, 0.82);
  --panel-strong: rgba(13, 18, 27, 0.95);
  --text: #edf4ff;
  --muted: #93a2bb;
  --line: rgba(255,255,255,.08);
  --accent-blue: #2d7fff;
  --accent-blue-2: #56b8ff;
  --accent-green: #73d64f;
  --accent-green-2: #8ef38b;
  --danger: #ff7a7a;
  --shadow: 0 18px 50px rgba(0,0,0,.32);
  --radius: 22px;
  --radius-sm: 16px;
  --radius-xs: 12px;
  --input: rgba(255,255,255,.04);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", Inter, Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(45,127,255,.16), transparent 24%),
    radial-gradient(circle at top right, rgba(115,214,79,.14), transparent 26%),
    linear-gradient(180deg, #0b1016 0%, #0a0f15 100%);
  color: var(--text);
  overflow: hidden;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  overflow: hidden;
}

.glass {
  background: rgba(10, 15, 24, 0.62);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel {
  border-radius: var(--radius);
  padding: 16px;
}

.sidebar {
  border-radius: 28px;
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
  overflow: hidden;
  min-height: 0;
}

.brand-wrap {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.brand-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(115,214,79,.22));
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent-green-2);
  font-size: 11px;
  margin-bottom: 6px;
}

h1, h2, h3, p { margin: 0; }
h1 {
  font-size: 28px;
  line-height: 1.08;
}
.muted { color: var(--muted); }
.small { font-size: 12px; }

.status-card, .quick-panel { background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02)); }
.status-top, .progress-meta, .topbar-actions, .quick-actions, .card-actions, .field-grid, .choice-grid, .summary-grid, .flag-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
}

.chip-live { box-shadow: inset 0 0 0 1px rgba(115,214,79,.24); color: var(--accent-green-2); }
.chip-dark { box-shadow: inset 0 0 0 1px rgba(86,184,255,.24); color: #9ed3ff; }

.progress-block { margin-top: 12px; }
.progress-meta { justify-content: space-between; margin-bottom: 10px; }
.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
  transition: width .35s ease;
}

.timeline-title { font-weight: 700; margin-bottom: 12px; }
.timeline ul, .timeline li { list-style: none; padding: 0; margin: 0; }
.timeline {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.quick-panel {
  margin-top: 0;
  flex-shrink: 0;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.quick-actions .ghost-btn,
.quick-actions .primary-btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.main-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: calc(100vh - 36px);
  min-height: 0;
  overflow: hidden;
}

.topbar, .bottom-nav {
  border-radius: 24px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.topbar-title {
  font-weight: 800;
  font-size: 24px;
  line-height: 1.16;
  word-break: break-word;
}

.screen {
  flex: 1;
  min-height: 0;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scroll-behavior: smooth;
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 10%, rgba(45,127,255,.09), transparent 24%),
    radial-gradient(circle at 90% 20%, rgba(115,214,79,.09), transparent 26%);
}

.hero-card, .question-card, .summary-card {
  padding: 24px;
  margin: 16px;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}

.hero-card::after, .question-card::after, .summary-card::after {
  content: "";
  position: absolute;
  inset: auto -60px -70px auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(45,127,255,.22), transparent 60%);
  pointer-events: none;
}

.hero-copy { max-width: 980px; }
.hero-copy h2 { font-size: 40px; line-height: 1.08; margin-bottom: 14px; }
.hero-copy p { color: #dbe7f8; font-size: 17px; line-height: 1.65; }
.hero-badge {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(115,214,79,.22);
  color: var(--accent-green-2);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-grid, .choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.choice-card {
  position: relative;
  text-align: left;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  color: var(--text);
  border-radius: 24px;
  padding: 18px;
  min-height: 130px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.choice-card:hover,
.choice-card.active,
.choice-card.selected {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(86,184,255,.38);
  box-shadow:
    0 18px 40px rgba(0,0,0,.26),
    0 0 0 1px rgba(115,214,79,.18) inset,
    0 0 24px rgba(86,184,255,.12);
}
.choice-card.selected {
  background: linear-gradient(135deg, rgba(45,127,255,.20), rgba(115,214,79,.16));
  border-color: rgba(86,184,255,.70);
}
.choice-card.selected::after {
  content: "✓ wybrane";
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  color: #dfffea;
  background: rgba(10,15,24,.78);
  border: 1px solid rgba(115,214,79,.34);
  box-shadow: 0 0 14px rgba(115,214,79,.10);
}
.choice-card strong { display: block; font-size: 24px; margin: 10px 0 8px; }
.choice-card small, .choice-kicker { display: block; color: var(--muted); }
.choice-kicker { color: var(--accent-green-2); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.choice-card.selected strong { color: #ffffff; }
.choice-card.selected small { color: #d7e7ff; }

.question-card h2 { font-size: 34px; margin-bottom: 8px; }
.question-card .lead { color: #d6e2f2; margin-bottom: 22px; line-height: 1.65; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-column: span 6;
}
.field.full { grid-column: 1 / -1; }
.field.third { grid-column: span 4; }
label { color: #c6d4e8; font-size: 14px; }
input, select, textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: var(--input);
  color: var(--text);
  padding: 14px 16px;
  outline: none;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(86,184,255,.38);
  background: rgba(255,255,255,.06);
  transform: translateY(-1px);
}
textarea { min-height: 120px; resize: vertical; }

select.text-input,
select {
  background: #0d1117;
  color: #eaf2ff;
  border: 1px solid rgba(255,255,255,0.15);
}

select.text-input option,
select option {
  background: #0d1117;
  color: #eaf2ff;
}

.helper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(115,214,79,.08);
  border: 1px solid rgba(115,214,79,.16);
}
.helper-row .title { font-weight: 700; }

.info-box, .flag-pill {
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(45,127,255,.08);
  border: 1px solid rgba(45,127,255,.16);
}
.flag-pill.warning {
  background: rgba(255,122,122,.09);
  border-color: rgba(255,122,122,.15);
}

.primary-btn, .ghost-btn {
  border: 0;
  border-radius: 16px;
  padding: 12px 18px;
  font-weight: 700;
  transition: transform .2s ease, filter .2s ease, opacity .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.primary-btn:hover, .ghost-btn:hover { transform: translateY(-1px); }
.primary-btn {
  color: #071018;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-blue-2));
}
.primary-btn.secondary {
  background: linear-gradient(90deg, var(--accent-blue), #62d0ff);
}
.primary-btn.alt {
  background: linear-gradient(90deg, #d6ebff, #9fd9ff);
}
.ghost-btn {
  color: var(--text);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.summary-panel {
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
}
.summary-panel h3 { margin-bottom: 14px; font-size: 20px; }
.summary-list { display: grid; gap: 10px; }
.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255,255,255,.08);
}
.summary-item span:first-child { color: var(--muted); }
.summary-item span:last-child { text-align: right; }

.bottom-meta { color: var(--muted); text-align: center; flex: 1; }
.hidden { display: none !important; }

.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: rgba(10, 15, 24, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.35);
}

.enter-rise { animation: riseIn .45s ease both; }
.pulse { animation: softPulse 2.6s ease-in-out infinite; }
.glow-border { position: relative; }
.glow-border::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(45,127,255,.65), rgba(115,214,79,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .35;
  pointer-events: none;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes softPulse {
  0%,100% { box-shadow: 0 0 0 rgba(115,214,79,0); }
  50% { box-shadow: 0 0 0 10px rgba(115,214,79,.05); }
}

#timelineList.compact-timeline {
  display: grid;
  gap: 10px;
}

#timelineList.compact-timeline li {
  margin: 0;
  padding: 0;
  list-style: none;
  cursor: default;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.02));
  color: var(--text);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, opacity .22s ease;
}
#timelineList.compact-timeline li:hover { transform: translateX(2px); }
#timelineList.compact-timeline li .timeline-item-inner {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
}
#timelineList.compact-timeline li .timeline-step {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #d8e9ff;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
  flex-shrink: 0;
}
#timelineList.compact-timeline li .timeline-copy {
  min-width: 0;
  overflow: hidden;
}
#timelineList.compact-timeline li .timeline-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
  color: var(--text);
  word-break: break-word;
}
#timelineList.compact-timeline li .timeline-copy small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
#timelineList.compact-timeline li.active {
  border-color: rgba(86,184,255,.45);
  background: linear-gradient(135deg, rgba(45,127,255,.20), rgba(115,214,79,.14));
  box-shadow: 0 0 0 1px rgba(86,184,255,.16) inset, 0 10px 24px rgba(0,0,0,.18), 0 0 24px rgba(86,184,255,.10);
}
#timelineList.compact-timeline li.active .timeline-step {
  border-color: rgba(86,184,255,.45);
  background: linear-gradient(135deg, rgba(45,127,255,.24), rgba(115,214,79,.18));
  color: #ffffff;
}
#timelineList.compact-timeline li.next { opacity: .92; }
#timelineList.compact-timeline li.next .timeline-step { color: #cfe3ff; }

.module-copy { max-width: 980px; margin-bottom: 6px; }
.module-intro {
  color: #dbe7f8;
  font-size: 16px;
  line-height: 1.65;
  margin-top: 2px;
}

.computed-box {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(115,214,79,.18);
  background: linear-gradient(180deg, rgba(115,214,79,.08), rgba(45,127,255,.06));
}
.computed-box strong { font-size: 22px; color: #f4fbff; }
.computed-box small { color: var(--muted); }

.computed-box.computed-neutral {
  border-color: rgba(140,155,180,.28);
  background: linear-gradient(180deg, rgba(126,140,166,.10), rgba(36,52,77,.16));
}
.computed-box.computed-green {
  border-color: rgba(115,214,79,.24);
  background: linear-gradient(180deg, rgba(115,214,79,.10), rgba(45,127,255,.06));
}
.computed-box.computed-yellow {
  border-color: rgba(255,179,0,.34);
  background: linear-gradient(180deg, rgba(255,179,0,.12), rgba(73,50,10,.16));
}
.computed-box.computed-red {
  border-color: rgba(255,59,59,.34);
  background: linear-gradient(180deg, rgba(255,59,59,.12), rgba(84,12,12,.16));
}

.toggle-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border-radius:16px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.03)}
.toggle-switch{position:relative;display:inline-flex;align-items:center}
.toggle-switch input{position:absolute;opacity:0;pointer-events:none}
.toggle-slider{width:58px;height:32px;border-radius:999px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.12);position:relative;display:inline-block;transition:.2s ease}
.toggle-slider::after{content:"";position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:#dce8fb;transition:.2s ease;box-shadow:0 4px 12px rgba(0,0,0,.28)}
.toggle-switch input:checked + .toggle-slider{background:linear-gradient(90deg,var(--accent-blue),var(--accent-green))}
.toggle-switch input:checked + .toggle-slider::after{transform:translateX(26px);background:#fff}
.field-hint{display:block;color:var(--muted);margin-top:8px}
.money-input{text-align:left}

.summary-section-title {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(32,74,145,.82), rgba(8,34,77,.92));
  color: #eef6ff;
  border: 2px solid rgba(111,175,255,.5);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.summary-flags-block { display: grid; gap: 14px; }
.flag-group { border-radius: 18px; padding: 14px; border: 2px solid rgba(255,255,255,.16); background: rgba(255,255,255,.03); }
.flag-group-head { font-weight: 800; margin-bottom: 12px; font-size: 18px; }
.flag-card-list { display: grid; gap: 10px; }
.flag-card { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; border: 2px solid transparent; background: rgba(255,255,255,.04); }
.flag-card strong { font-size: 15px; }
.flag-card span { color: #d8e4f2; line-height: 1.5; }
.flag-empty { margin: 0; color: var(--muted); }
.flag-red { border-color: #ff3b3b; background: linear-gradient(135deg, rgba(120,0,0,.18), rgba(255,59,59,.08)); }
.flag-red .flag-group-head, .flag-card.flag-red strong { color: #ff7272; }
.flag-yellow { border-color: #ffb300; background: linear-gradient(135deg, rgba(120,78,0,.18), rgba(255,179,0,.08)); }
.flag-yellow .flag-group-head, .flag-card.flag-yellow strong { color: #ffd34f; }
.flag-green { border-color: #00c853; background: linear-gradient(135deg, rgba(0,110,45,.18), rgba(0,200,83,.08)); }
.flag-green .flag-group-head, .flag-card.flag-green strong { color: #69ef9a; }
.flag-neutral { border-color: #8da0ba; background: linear-gradient(135deg, rgba(65,78,100,.22), rgba(141,160,186,.08)); }
.flag-neutral .flag-group-head, .flag-card.flag-neutral strong { color: #d7e2f0; }
.print-summary-badge { border-width: 2px; }
.print-avoid-break, .summary-item, .flag-group, .flag-card, .crm-record, .crm-borrower-card { break-inside: avoid; page-break-inside: avoid; }

.crm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 18, .72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2000;
}
.crm-modal-overlay.open { display: flex; }
.crm-modal {
  width: min(1100px, 96vw);
  max-height: 92vh;
  overflow: auto;
  border-radius: 28px;
  padding: 24px;
  position: relative;
}
.crm-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 24px;
}
.crm-header-row, .crm-record-top, .crm-actions, .crm-actions-inline, .crm-toolbar {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.crm-title { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.crm-borrower-card, .crm-record, .crm-empty {
  margin-top: 16px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.025));
}
.crm-subtitle { font-size: 18px; font-weight: 800; margin-bottom: 12px; color: #dff0ff; }
.crm-grid, .crm-summary-mini, .crm-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.crm-full { grid-column: 1 / -1; }
.crm-person { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); }
.danger-btn { border-color: rgba(255,122,122,.35) !important; color: #ffd2d2 !important; }
.danger-btn:hover { background: rgba(255,122,122,.12) !important; }
.crm-note { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.035); color: #dce6f5; line-height: 1.6; }

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
  }
  .main-stage,
  .sidebar { height: calc(100vh - 28px); }
  .brand-wrap { grid-template-columns: 72px 1fr; gap: 12px; }
  .brand-logo { width: 72px; height: 72px; }
  h1 { font-size: 23px; }
  .panel { padding: 14px; }
  .topbar-title { font-size: 20px; }
  .hero-copy h2, .question-card h2 { font-size: 30px; }
  .hero-card, .question-card, .summary-card { padding: 20px; margin: 14px; }
  .choice-card { min-height: 116px; padding: 16px; }
  .choice-card strong { font-size: 20px; }
  #timelineList.compact-timeline li .timeline-item-inner { grid-template-columns: 38px 1fr; gap: 10px; padding: 12px; }
  #timelineList.compact-timeline li .timeline-step { width: 38px; height: 38px; border-radius: 12px; font-size: 13px; }
  #timelineList.compact-timeline li .timeline-copy strong { font-size: 13px; }
  #timelineList.compact-timeline li .timeline-copy small { font-size: 11px; }
}

@media (max-height: 900px) {
  .app-shell {
    grid-template-columns: 292px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }
  .main-stage,
  .sidebar { height: calc(100vh - 28px); }
  .sidebar { padding: 14px; gap: 10px; }
  .brand-wrap { grid-template-columns: 64px 1fr; gap: 10px; }
  .brand-logo { width: 64px; height: 64px; }
  h1 { font-size: 20px; }
  .muted { font-size: 13px; }
  .chip { padding: 5px 8px; font-size: 11px; }
  .panel { padding: 12px; }
  .progress-bar { height: 8px; }
  .timeline-title { margin-bottom: 10px; font-size: 15px; }
  .topbar, .bottom-nav { padding: 12px 14px; border-radius: 20px; }
  .topbar-title { font-size: 18px; }
  .hero-card, .question-card, .summary-card { padding: 18px; margin: 12px; }
  .module-intro, .hero-copy p, .question-card .lead { font-size: 15px; line-height: 1.55; }
  .choice-card { min-height: 100px; padding: 14px; }
  .choice-card strong { font-size: 18px; margin: 6px 0; }
  .quick-actions { gap: 8px; }
  .quick-actions .ghost-btn, .quick-actions .primary-btn { padding: 10px 12px; font-size: 14px; }
}

@media (max-width: 1100px) {
  body { overflow: auto; }
  .app-shell {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .sidebar {
    position: static;
    top: auto;
    height: auto;
    max-height: none;
    overflow: visible;
    grid-template-rows: auto auto auto auto;
  }
  .timeline {
    max-height: none;
    overflow: visible;
  }
  .main-stage {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .screen {
    min-height: 580px;
    max-height: none;
    overflow: visible;
  }
  .bottom-nav { position: static; box-shadow: none; }
}

@media (max-width: 760px) {
  .app-shell { padding: 12px; gap: 12px; }
  .topbar, .bottom-nav { flex-direction: column; align-items: stretch; }
  .topbar-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .topbar-actions > * { width: 100%; }
  .brand-wrap { grid-template-columns: 64px 1fr; }
  .brand-logo { width: 64px; height: 64px; }
  .hero-copy h2, .question-card h2 { font-size: 26px; }
  .hero-grid, .choice-grid { grid-template-columns: 1fr; }
  .field, .field.third { grid-column: 1 / -1; }
  .topbar-title { font-size: 20px; }
  .crm-grid, .crm-summary-mini, .crm-people { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff; color: #111; overflow: visible; }
  .sidebar, .topbar-actions, .bottom-nav, #printBtn, #sendSheetsBtn, #sendCrmBtn, #restartBtn, #copySummaryBtn, #editCrmBtn { display: none !important; }
  .app-shell { display: block; padding: 0; height: auto; }
  .main-stage, .screen, .summary-card, .summary-panel { box-shadow: none !important; border: 0 !important; background: #fff !important; color: #111 !important; }
  .summary-item span:first-child, .summary-item strong, .summary-item, .flag-card span, .flag-card strong, .flag-group-head, .flag-card, .flag-group, .computed-box, .computed-box strong, .computed-box small { color: #111 !important; }
  .hero-card::after, .question-card::after, .summary-card::after, .screen::before, .glow-border::before, .disposable-income-block::after { display: none !important; content: none !important; }
  .tool-modal-overlay { display: none !important; }
  .print-summary-badge { color: #0f3e90 !important; border: 3px solid #0f3e90 !important; background: #eaf2ff !important; }
  .summary-section-title { background: #0f3e90 !important; color: #fff !important; border: 3px solid #0b2f6d !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .flag-group.flag-red, .flag-card.flag-red { border: 3px solid #d40000 !important; background: #fff5f5 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .flag-group.flag-yellow, .flag-card.flag-yellow { border: 3px solid #c99000 !important; background: #fff9e8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .flag-group.flag-green, .flag-card.flag-green { border: 3px solid #0d9f3f !important; background: #eefcf3 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}


.summary-toolbar{margin-bottom:10px}
.summary-copy-btn{border-color:rgba(61,132,255,.38);color:#9fd0ff;background:rgba(24,56,112,.32)}
@media print{
  .summary-copy-btn{display:none !important}
}
