:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17202b;
  background: #f4f6f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #17202b;
  --muted: #647181;
  --line: #dfe5eb;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --blue: #1769aa;
  --blue-dark: #10558d;
  --blue-soft: #eaf3fb;
  --green: #18794e;
  --green-soft: #e9f6ef;
  --amber: #8a5a00;
  --amber-soft: #fff6df;
  --red: #a72a2a;
  --red-soft: #fff0ef;
  --shadow: 0 12px 32px rgba(22, 35, 50, .06);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f4f6f8; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(23,105,170,.28); outline-offset: 2px; }
.app-shell { max-width: 1600px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 76px; padding: 14px 28px; display: flex; justify-content: space-between; align-items: center; gap: 18px; background: #fff; border-bottom: 1px solid var(--line); }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 250px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: white; background: #183e61; font-weight: 800; letter-spacing: -.05em; }
.brand-name { font-size: 16px; font-weight: 750; letter-spacing: -.02em; }
.brand-subtitle { margin-top: 3px; font-size: 11px; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 9px; }
.project-switch-label { color: var(--muted); font-size: 12px; }
#project-switch { min-width: 180px; max-width: 270px; }
.privacy-strip { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 8px 28px; background: #eef5fa; color: #28485f; font-size: 12px; border-bottom: 1px solid #dce8f0; }
.privacy-dot { width: 8px; height: 8px; border-radius: 50%; background: #25845d; flex: 0 0 auto; }
.save-status { margin-left: auto; white-space: nowrap; font-weight: 650; color: #315b42; }
.workspace { flex: 1; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; padding: 22px 28px 26px; }
.sidebar { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 14px 16px; display: flex; flex-direction: column; min-height: 650px; box-shadow: var(--shadow); }
.sidebar-heading { color: #8a96a3; font-size: 10px; font-weight: 800; letter-spacing: .12em; padding: 0 10px 13px; }
.step-nav { display: grid; gap: 4px; }
.step-link { display: flex; align-items: center; gap: 11px; padding: 10px; border: 0; border-radius: 9px; background: transparent; color: #526071; text-align: left; width: 100%; font-size: 13px; }
.step-link:hover { background: #f5f8fa; }
.step-link[aria-current="step"] { color: #144e7b; background: var(--blue-soft); font-weight: 700; }
.step-number { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; border: 1px solid #d9e0e6; background: #fff; color: #687787; font-size: 11px; flex: 0 0 auto; }
.step-link[aria-current="step"] .step-number { background: #1769aa; color: #fff; border-color: #1769aa; }
.sidebar-foot { margin-top: auto; padding: 18px 10px 0; }
.progress-label { display: flex; justify-content: space-between; font-size: 11px; font-weight: 650; color: #5c6b79; }
.progress-track { height: 6px; background: #edf0f3; border-radius: 8px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; width: 10%; background: #1769aa; border-radius: 8px; transition: width .2s ease; }
.sidebar-foot p { color: #8a96a3; font-size: 10px; line-height: 1.55; margin: 14px 0 0; }
.main-panel { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 30px 34px 22px; display: flex; flex-direction: column; }
#step-content { flex: 1; min-width: 0; }
.step-kicker { color: #1769aa; font-size: 10px; letter-spacing: .12em; font-weight: 800; text-transform: uppercase; }
h1 { margin: 8px 0 8px; font-size: clamp(23px, 3vw, 31px); letter-spacing: -.04em; line-height: 1.15; }
.step-intro { margin: 0 0 25px; max-width: 800px; color: #647181; font-size: 13px; line-height: 1.65; }
h2 { font-size: 15px; margin: 24px 0 12px; letter-spacing: -.02em; }
h3 { font-size: 13px; margin: 0 0 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px 18px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label, .field-label { font-size: 12px; font-weight: 700; color: #344252; }
.field small, .help-text { color: #7b8794; font-size: 11px; line-height: 1.5; }
input, select, textarea { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid #d5dde5; border-radius: 8px; background: #fff; color: #1b2733; font-size: 13px; }
textarea { min-height: 82px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a3adb7; }
input:disabled, select:disabled { background: #f2f4f6; color: #8a96a3; }
.checkbox-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.checkbox-card { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; border: 1px solid #e1e6eb; border-radius: 9px; background: #fff; min-height: 45px; }
.checkbox-card:has(input:checked) { border-color: #9fc2df; background: #f4f9fd; }
.checkbox-card input { width: 15px; min-height: 15px; margin: 2px 0 0; flex: 0 0 auto; accent-color: #1769aa; }
.checkbox-card span { font-size: 12px; color: #334151; line-height: 1.35; }
.event-group { border: 1px solid #e5e9ed; border-radius: 11px; padding: 13px; margin: 13px 0; }
.event-group-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.event-group-heading strong { font-size: 12px; text-transform: capitalize; }
.event-group-heading span { color: #8994a0; font-size: 10px; }
.panel { border: 1px solid #e1e6eb; border-radius: 11px; padding: 16px; margin: 16px 0; background: #fff; }
.panel.soft { background: #f8fafb; }
.panel.warning { border-color: #f0dca5; background: #fffaf0; }
.panel.danger { border-color: #edc5c2; background: #fff6f5; }
.panel.success { border-color: #c7e5d3; background: #f4fbf6; }
.panel p { margin: 4px 0 0; color: #667482; font-size: 12px; line-height: 1.55; }
.inline-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline-row > * { flex: 1; }
.button { min-height: 38px; padding: 8px 14px; border-radius: 8px; border: 1px solid transparent; font-size: 12px; font-weight: 700; transition: background .15s ease, border .15s ease; }
.button-primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { color: #354454; background: #fff; border-color: #d5dde5; }
.button-secondary:hover { background: #f5f7f9; }
.button-danger { color: #a72a2a; background: #fff; border-color: #e6c6c3; }
.button-danger:hover { background: #fff4f3; }
.button-small { min-height: 30px; padding: 5px 9px; font-size: 11px; }
.wizard-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #edf0f3; margin-top: 30px; padding-top: 18px; }
.footer-right { display: flex; gap: 8px; }
.global-alert { padding: 11px 14px; margin-bottom: 16px; border-radius: 9px; font-size: 12px; line-height: 1.5; }
.global-alert.error { background: var(--red-soft); color: var(--red); border: 1px solid #f0c9c6; }
.global-alert.success { background: var(--green-soft); color: var(--green); border: 1px solid #c9e5d4; }
.global-alert.info { background: #edf5fc; color: #245a83; border: 1px solid #d4e6f5; }
.issue-list { display: grid; gap: 8px; margin-top: 12px; }
.issue { padding: 10px 12px; border-radius: 8px; border: 1px solid #efd0cd; background: #fff8f7; }
.issue.warning { border-color: #f0dfb2; background: #fffaf0; }
.issue strong { display: block; color: #82302b; font-size: 11px; }
.issue.warning strong { color: #805600; }
.issue span { display: block; margin-top: 4px; font-size: 11px; color: #5e6873; line-height: 1.45; }
.issue code { font-size: 10px; color: #687482; }
.summary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 15px 0; }
.summary-card { border: 1px solid #e2e7ec; border-radius: 9px; padding: 12px; background: #fbfcfd; min-width: 0; }
.summary-card span { display: block; color: #82909d; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.summary-card strong { display: block; margin-top: 6px; font-size: 13px; overflow-wrap: anywhere; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table th, .data-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid #e9edf0; vertical-align: middle; }
.data-table th { color: #7a8794; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.data-table td { color: #354353; }
.table-wrap { overflow-x: auto; }
.empty-state { padding: 22px; text-align: center; color: #83909c; background: #f8fafb; border: 1px dashed #d9e0e6; border-radius: 9px; font-size: 12px; }
.badge { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 20px; font-size: 10px; font-weight: 750; background: #eef1f4; color: #596776; }
.badge.green { background: #e8f5ed; color: #236d48; }
.badge.amber { background: #fff4d9; color: #805600; }
.badge.red { background: #fff0ef; color: #9b322c; }
.checklist { display: grid; gap: 9px; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #e2e7ec; border-radius: 8px; font-size: 12px; color: #405060; }
.checklist input { width: 15px; min-height: 15px; margin-top: 1px; accent-color: #1769aa; }
.app-footer { display: flex; justify-content: space-between; padding: 0 28px 18px; color: #9aa4ad; font-size: 10px; }
.hidden { display: none !important; }
@media (max-width: 1050px) {
  .workspace { grid-template-columns: 220px minmax(0,1fr); gap: 14px; padding: 16px; }
  .main-panel { padding: 24px 22px 18px; }
  .topbar { padding: 12px 18px; }
  .privacy-strip { padding: 8px 18px; }
  .form-grid.three { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; flex-wrap: wrap; }
  #project-switch { flex: 1; min-width: 140px; }
  .privacy-strip { align-items: flex-start; flex-wrap: wrap; }
  .save-status { margin-left: 17px; }
  .workspace { display: block; padding: 12px; }
  .sidebar { min-height: 0; margin-bottom: 12px; padding: 13px; }
  .sidebar-heading, .sidebar-foot { display: none; }
  .step-nav { display: flex; overflow-x: auto; gap: 5px; padding-bottom: 3px; }
  .step-link { min-width: max-content; width: auto; padding: 7px 8px; }
  .step-link .step-title { display: none; }
  .step-number { width: 28px; height: 28px; }
  .main-panel { padding: 22px 16px 16px; }
  .form-grid, .form-grid.three, .checkbox-list, .summary-grid { grid-template-columns: 1fr; }
  .app-footer { padding: 0 14px 14px; gap: 8px; flex-wrap: wrap; }
}

.diagnostics-output{white-space:pre-wrap;overflow-wrap:anywhere;background:#101827;color:#dbeafe;padding:14px;border-radius:8px;font-size:12px;max-height:320px;overflow:auto}
