:root {
  --paper: #faf9f6;
  --cream: #f4f1eb;
  --ink: #151628;
  --muted: #666978;
  --line: rgba(21, 22, 40, .13);
  --purple: #5638ef;
  --cyan: #70dce5;
  --green: #12b981;
  --orange: #f97316;
  --pad: clamp(20px, 6vw, 90px);
  --shadow: 0 26px 70px rgba(30, 27, 70, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", "Noto Sans SC", sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 78px;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 26px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 249, 246, .9);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand strong {
  color: var(--purple);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.09em;
}
.brand span {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 7px;
  line-height: 1.25;
  letter-spacing: .12em;
}

.step-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.step-rail button {
  min-height: 42px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.step-rail span {
  display: block;
  margin-bottom: 2px;
  color: #a3a5af;
  font-size: 9px;
  letter-spacing: .08em;
}
.step-rail button.active {
  border-color: rgba(86, 56, 239, .2);
  background: #efecff;
  color: var(--purple);
}
.step-rail button.done span { color: var(--green); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.primary, .ghost, .secondary, .text-action {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 4px;
  font-weight: 700;
}
.primary:disabled, .ghost:disabled, .secondary:disabled {
  cursor: not-allowed;
  opacity: .42;
}
.primary {
  border: 1px solid var(--purple);
  background: var(--purple);
  color: #fff;
  box-shadow: 0 16px 34px rgba(80, 56, 239, .18);
}
.primary.small { min-height: 38px; }
.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.secondary {
  border: 1px solid rgba(86, 56, 239, .22);
  background: rgba(86, 56, 239, .08);
  color: var(--purple);
}
.text-action {
  border: 0;
  background: transparent;
  color: var(--purple);
}
.large { min-height: 52px; }

.diagnosis-hero {
  min-height: 420px;
  padding: 90px var(--pad) 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 48px;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(244, 241, 235, .98), rgba(244, 241, 235, .62)),
    radial-gradient(circle at 85% 20%, rgba(112, 220, 229, .36), transparent 30%),
    radial-gradient(circle at 65% 70%, rgba(86, 56, 239, .2), transparent 35%),
    var(--cream);
}
.eyebrow {
  margin: 0 0 24px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  display: inline-block;
  margin-right: 10px;
  background: currentColor;
  vertical-align: middle;
}
.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(58px, 7.2vw, 112px);
  line-height: .94;
  letter-spacing: -.065em;
  font-weight: 600;
}
.hero-copy em {
  color: var(--purple);
  font-style: normal;
}
.hero-copy p:last-child {
  max-width: 680px;
  margin: 30px 0 0;
  color: #555766;
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.75;
}
.hero-status {
  padding: 22px;
  border: 1px solid rgba(86, 56, 239, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow);
}
.hero-status span { color: var(--muted); font-size: 12px; }
.hero-status strong {
  display: block;
  margin-top: 10px;
  color: var(--purple);
  font-size: 34px;
  letter-spacing: -.05em;
}
.hero-status p {
  min-height: 42px;
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.hero-status i {
  height: 7px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e4ef;
}
.hero-status b {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  transition: width .25s ease;
}

.diagnosis-flow {
  padding: 0 var(--pad) 80px;
  background: var(--paper);
}
.flow-step {
  min-height: calc(100svh - 78px);
  padding: 90px 0;
  display: none;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.flow-step.active { display: grid; }
.page-copy {
  position: sticky;
  top: 118px;
}
.page-copy small {
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
}
.page-copy h2 {
  margin: 16px 0 18px;
  font-size: clamp(42px, 5vw, 74px);
  line-height: 1.05;
  letter-spacing: -.052em;
  font-weight: 600;
}
.page-copy p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}
.page-panel {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(30, 27, 70, .07);
}
.gate-panel {
  max-width: 620px;
  background: linear-gradient(145deg, #fff, #f5f2ff);
}

label { display: grid; gap: 8px; }
label span, legend {
  color: #333542;
  font-size: 13px;
  font-weight: 700;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 13px 12px;
  outline: none;
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(86, 56, 239, .55);
  box-shadow: 0 0 0 3px rgba(86, 56, 239, .1);
}
.helper {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.span-2 { grid-column: 1 / -1; }

.stack-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.stack-picker {
  min-height: 215px;
  padding: 14px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  border: 1px solid rgba(86, 56, 239, .13);
  border-radius: 8px;
  background: #fbfaff;
}
.tag-list {
  display: flex;
  align-content: flex-start;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}
.tag-list button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(86, 56, 239, .18);
  border-radius: 999px;
  background: #fff;
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
}
.empty-tags {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.inventory-grid {
  display: block;
}
.inventory-card {
  min-height: 168px;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfd;
  color: var(--ink);
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.inventory-card:hover {
  transform: translateY(-2px);
  border-color: rgba(86, 56, 239, .32);
  box-shadow: 0 14px 34px rgba(30, 27, 70, .08);
}
.inventory-card.is-filled {
  border-color: rgba(18, 185, 129, .36);
  background: #f5fffb;
}
.inventory-card span {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #efecff;
  color: var(--purple);
  font-size: 11px;
  font-weight: 800;
}
.inventory-card.is-filled span {
  background: rgba(18, 185, 129, .12);
  color: #0f8f65;
}
.inventory-card strong {
  font-size: 18px;
  line-height: 1.25;
}
.inventory-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.inventory-card i {
  margin-top: auto;
  color: #4a4d5c;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}
.stack-extra {
  margin-top: 18px;
}

.inventory-wizard {
  position: relative;
  min-height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(16px, 2vw, 26px);
  align-items: stretch;
}
.wizard-main {
  min-height: 0;
  border: 0;
  background: transparent;
}
.wizard-main {
  position: relative;
  padding: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: clamp(18px, 3vh, 34px);
  align-content: stretch;
}
.wizard-progress {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  animation: wizardHeaderIn .46s ease both;
}
.wizard-progress span {
  color: #565a68;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
}
.wizard-progress i {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(21, 22, 40, .08);
}
.wizard-progress b {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
}
.wizard-question {
  width: min(980px, 100%);
  margin: 0 auto;
  align-self: center;
  text-align: center;
  animation: wizardQuestionIn .58s cubic-bezier(.2, .9, .2, 1) both;
}
.wizard-question small {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid rgba(21, 22, 40, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .66);
  color: #505465;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  box-shadow: 0 12px 34px rgba(40, 46, 80, .06);
}
.wizard-question h3 {
  max-width: 980px;
  margin: clamp(18px, 3vh, 30px) auto 0;
  color: #111426;
  font-size: clamp(40px, 5.7vw, 84px);
  line-height: 1.02;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.wizard-question p {
  max-width: 760px;
  margin: 18px auto 0;
  color: #656a78;
  line-height: 1.7;
}
.wizard-options {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(12px, 1.8vw, 20px);
}
.wizard-options button {
  position: relative;
  min-height: clamp(84px, 12vh, 126px);
  padding: 0 clamp(18px, 2.3vw, 30px);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid rgba(21, 22, 40, .1);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .84), rgba(255, 255, 255, .62));
  color: var(--ink);
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .88),
    0 24px 60px rgba(55, 62, 100, .12);
  backdrop-filter: blur(18px);
  transform: translateY(16px) scale(.96);
  opacity: 0;
  animation: optionPop .58s cubic-bezier(.18, .94, .2, 1.1) both;
  animation-delay: calc(var(--option-index, 0) * 70ms + 140ms);
  transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}
.wizard-options .option-text {
  position: relative;
  z-index: 2;
}
.option-logo {
  position: relative;
  z-index: 2;
  width: clamp(38px, 4.2vw, 54px);
  height: clamp(38px, 4.2vw, 54px);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  color: currentColor;
  box-shadow: none;
}
.option-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.option-logo-fallback {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}
.wizard-options button::before,
.wizard-options button::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.wizard-options button::before {
  inset: -1px;
  opacity: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(112, 220, 229, .34), transparent 30%),
    radial-gradient(circle at 86% 78%, rgba(255, 162, 107, .22), transparent 34%),
    linear-gradient(135deg, rgba(86, 56, 239, .1), rgba(255, 255, 255, .2));
  transition: opacity .22s ease;
}
.wizard-options button::after {
  width: 26px;
  height: 26px;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.2);
}
.wizard-options button:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(86, 56, 239, .24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 34px 80px rgba(60, 66, 110, .16);
}
.wizard-options button:hover::before {
  opacity: 1;
}
.wizard-options button.tone-positive {
  border-color: rgba(18, 185, 129, .2);
  background:
    radial-gradient(circle at 18% 18%, rgba(18, 185, 129, .14), transparent 32%),
    linear-gradient(180deg, rgba(247, 255, 251, .94), rgba(233, 250, 241, .76));
  color: #065f46;
}
.wizard-options button.tone-positive:hover {
  border-color: rgba(18, 185, 129, .38);
  box-shadow: 0 34px 80px rgba(18, 185, 129, .16);
}
.wizard-options button.tone-negative {
  border-color: rgba(239, 68, 68, .2);
  background:
    radial-gradient(circle at 18% 18%, rgba(239, 68, 68, .13), transparent 32%),
    linear-gradient(180deg, rgba(255, 248, 248, .94), rgba(255, 238, 238, .76));
  color: #991b1b;
}
.wizard-options button.tone-negative:hover {
  border-color: rgba(239, 68, 68, .4);
  box-shadow: 0 34px 80px rgba(239, 68, 68, .16);
}
.wizard-options button.tone-neutral {
  border-color: rgba(107, 114, 128, .16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .84), rgba(242, 244, 248, .72));
  color: #374151;
}
.wizard-options button.tone-brand {
  border-color: color-mix(in srgb, var(--logo-bg) 28%, rgba(21, 22, 40, .1));
}
.wizard-options button.is-selected,
.wizard-options button.is-pressed {
  border-color: var(--purple);
  background:
    radial-gradient(circle at 18% 12%, rgba(112, 220, 229, .26), transparent 32%),
    linear-gradient(135deg, #5638ef, #7957ff);
  color: #fff;
  box-shadow:
    0 30px 90px rgba(86, 56, 239, .28),
    0 0 0 1px rgba(255, 255, 255, .5) inset;
}
.wizard-options button.tone-positive.is-selected,
.wizard-options button.tone-positive.is-pressed {
  border-color: #10b981;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, .22), transparent 32%),
    linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 30px 90px rgba(16, 185, 129, .26);
}
.wizard-options button.tone-negative.is-selected,
.wizard-options button.tone-negative.is-pressed {
  border-color: #ef4444;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, .22), transparent 32%),
    linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 30px 90px rgba(239, 68, 68, .24);
}
.wizard-options button.tone-neutral.is-selected,
.wizard-options button.tone-neutral.is-pressed {
  border-color: #9ca3af;
  background:
    linear-gradient(135deg, #f4f5f8, #e6e9ef);
  color: #111827;
  box-shadow: 0 24px 70px rgba(107, 114, 128, .16);
}
.wizard-options button.is-pressed::after {
  animation: optionRipple .42s ease-out both;
}
.wizard-other {
  width: min(780px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  animation: wizardQuestionIn .5s ease both;
}
.wizard-other input {
  min-height: 56px;
  border-color: rgba(21, 22, 40, .11);
  border-radius: 16px;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 18px 48px rgba(55, 62, 100, .08);
}
.wizard-other .primary {
  min-height: 56px;
  border-radius: 16px;
}
.wizard-controls {
  width: min(980px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  animation: wizardHeaderIn .5s ease both;
}
.inventory-summary-panel {
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 0 0 8px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.summary-panel-head {
  display: grid;
  justify-content: start;
  align-items: center;
  color: #737887;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.summary-panel-head strong {
  color: #1e2234;
  font-size: 18px;
}
.inventory-progress-mini {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
.inventory-progress-mini i {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(21, 22, 40, .08);
}
.inventory-progress-mini b {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
}
.inventory-progress-mini span {
  display: none;
}
.inventory-wizard.is-switching .wizard-progress,
.inventory-wizard.is-switching .wizard-question,
.inventory-wizard.is-switching .wizard-options,
.inventory-wizard.is-switching .wizard-other,
.inventory-wizard.is-switching .wizard-controls {
  animation: wizardOut .22s ease both;
}
.segmented-field {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(86, 56, 239, .13);
  border-radius: 8px;
  background: #fbfaff;
}
.segmented-control {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.segmented-control label {
  display: block;
}
.segmented-control input,
.tool-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segmented-control span,
.tool-picker label span {
  min-height: 36px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.segmented-control input:checked + span,
.tool-picker input:checked + span {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
}
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tool-picker {
  display: grid;
  gap: 10px;
}
.tool-picker > span {
  color: #333542;
  font-size: 13px;
  font-weight: 800;
}
.tool-picker > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.question-list {
  display: grid;
  gap: 14px;
}
.question-card {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.question-card p {
  margin: 8px 0 14px;
  color: var(--muted);
  line-height: 1.65;
}
.rating {
  display: grid;
  grid-template-columns: repeat(5, 42px);
  gap: 8px;
}
.rating label { display: block; }
.rating input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.rating span {
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fafafa;
}
.rating input:checked + span {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
}

.department-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.department-card {
  padding: 16px;
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfd;
}
.department-card-wide {
  grid-column: 1 / -1;
}
.department-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.department-card-head span {
  color: #333542;
  font-size: 13px;
  font-weight: 800;
  text-wrap: pretty;
}
.dept-polish-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--purple);
  white-space: nowrap;
}
.department-card textarea {
  min-height: 116px;
  line-break: strict;
  text-wrap: pretty;
}
.department-card-wide textarea {
  min-height: 132px;
}
.dept-polish-result[hidden] {
  display: none;
}
.dept-polish-result {
  padding-top: 12px;
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(86, 56, 239, .12);
  animation: wizardHeaderIn .34s ease both;
}
.dept-polish-badge {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(86, 56, 239, .08);
  color: var(--purple);
  font-size: 11px;
  font-weight: 900;
}
.dept-polish-block {
  display: grid;
  gap: 4px;
}
.dept-polish-block span {
  color: #6f7380;
  font-size: 12px;
  font-weight: 800;
}
.dept-polish-block p {
  margin: 0;
  color: #272a36;
  font-size: 13px;
  line-height: 1.65;
}
.dept-polish-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dept-polish-tags i {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(21, 22, 39, .05);
  color: #505465;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.dept-polish-actions {
  display: flex;
  justify-content: flex-end;
}
.dept-polish-actions .secondary {
  min-height: 34px;
  border-radius: 999px;
}
.final-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px;
  align-items: end;
}
.final-panel h3 {
  margin: 0 0 12px;
  font-size: 24px;
}
.final-panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.9;
}
.report-actions {
  display: flex;
  gap: 12px;
  flex-direction: column;
}
.consultant-panel {
  display: grid;
  gap: 22px;
}
.consultant-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.consultant-header small {
  color: var(--purple);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}
.consultant-header h3 {
  position: relative;
  width: fit-content;
  margin: 8px 0 8px;
  display: block;
  font-size: 28px;
  letter-spacing: -.03em;
}

.consultant-header h3 span,
.incoming-call-card strong span {
  display: block;
  text-align: center;
}

.consultant-header h3 em,
.incoming-call-card strong em {
  position: absolute;
  left: calc(100% + 9px);
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .08em;
  white-space: nowrap;
}

.consultant-header h3 em {
  border: 1px solid color-mix(in srgb, var(--consultant-accent, #6d5dfc) 34%, transparent);
  background: color-mix(in srgb, var(--consultant-accent, #6d5dfc) 9%, #fff);
  color: color-mix(in srgb, var(--consultant-accent, #6d5dfc) 72%, #151628);
}
.consultant-header p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.consultant-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
}
.chat-box {
  min-height: 310px;
  max-height: 460px;
  overflow: auto;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid rgba(86, 56, 239, .13);
  border-radius: 8px;
  background: #fbfbfd;
}
.chat-message {
  max-width: 86%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.chat-message.assistant {
  border-color: rgba(86, 56, 239, .2);
  background: #f4f1ff;
}
.chat-message.user {
  justify-self: end;
  background: #f8fffe;
}
.chat-message b {
  color: var(--purple);
  font-size: 12px;
}
.chat-message p {
  margin: 8px 0 0;
  color: #333542;
  line-height: 1.7;
}
.chat-message small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.material-preview {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.material-preview h4 {
  margin: 0 0 12px;
  font-size: 16px;
}
#materialPreview {
  display: grid;
  gap: 10px;
}
#materialPreview div {
  padding: 12px;
  border: 1px solid rgba(86, 56, 239, .1);
  border-radius: 8px;
  background: #fbfaff;
}
#materialPreview span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
#materialPreview strong {
  color: var(--purple);
  font-size: 28px;
  letter-spacing: -.04em;
}
#materialPreview p {
  margin: 6px 0 0;
  color: #333542;
  font-size: 13px;
  line-height: 1.6;
}
.consultant-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}
.consultant-actions {
  display: grid;
  gap: 10px;
}
.compact-final {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.flow-actions {
  position: sticky;
  z-index: 12;
  bottom: 0;
  margin: 0 calc(var(--pad) * -1);
  padding: 15px var(--pad);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: rgba(250, 249, 246, .9);
  backdrop-filter: blur(16px);
}

.report-section {
  padding: 0 var(--pad) 110px;
  background: var(--paper);
}
.report-toolbar {
  position: fixed;
  top: 96px;
  right: max(22px, calc((100vw - 1180px) / 2 + 22px));
  z-index: 30;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}
.report-cover {
  min-height: 520px;
  padding: 70px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(86, 56, 239, .36), rgba(112, 220, 229, .08)),
    #171829;
  color: #fff;
}
.report-cover .eyebrow {
  color: #bcb0ff;
}
.report-cover h2 {
  max-width: 980px;
  margin: auto 0;
  font-size: clamp(52px, 7vw, 106px);
  line-height: .98;
  letter-spacing: -.065em;
  font-weight: 600;
}
.report-cover-foot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.17);
  color: #c8cad5;
}
.report-cover-foot strong {
  color: #fff;
  font-size: 16px;
  white-space: nowrap;
}
.report-cover-foot b {
  margin-right: 8px;
  color: var(--cyan);
  font-size: 58px;
  line-height: .8;
  letter-spacing: -.06em;
}
.report-band {
  margin-top: 18px;
  padding: 34px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  border: 1px solid var(--line);
  background: #fff;
}
.report-band small {
  color: var(--purple);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}
.report-band h3 {
  margin: 10px 0 0;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -.04em;
}
.stack-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stack-summary div {
  min-height: 120px;
  padding: 16px;
  border: 1px solid rgba(86, 56, 239, .13);
  border-radius: 8px;
  background: #fbfaff;
}
.stack-summary b {
  display: block;
  margin-bottom: 10px;
  color: var(--purple);
  font-size: 13px;
}
.stack-summary span {
  display: inline-block;
  margin: 0 6px 8px 0;
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}
.report-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 18px;
}
.report-panel {
  margin-top: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.report-grid .report-panel {
  margin-top: 0;
}
.report-panel h3 {
  margin: 0 0 20px;
  font-size: 24px;
  letter-spacing: -.02em;
}
.score-list {
  display: grid;
  gap: 14px;
}
.score-row {
  display: grid;
  grid-template-columns: 88px 1fr 38px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.score-row i {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e5ef;
}
.score-row b {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
}
.diagnosis-summary {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.75;
}
.matrix {
  position: relative;
  min-height: 330px;
  border-left: 1px solid #cbc8d6;
  border-bottom: 1px solid #cbc8d6;
  background:
    linear-gradient(90deg, transparent 49.6%, #e4e1ec 49.6% 50.2%, transparent 50.2%),
    linear-gradient(0deg, transparent 49.6%, #e4e1ec 49.6% 50.2%, transparent 50.2%),
    #fbfbfd;
}
.matrix::before {
  content: "业务价值";
  position: absolute;
  left: 10px;
  top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.matrix::after {
  content: "实施难度";
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}
.scene-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 6px 16px rgba(23, 32, 51, .18);
}
.scene-dot.green { background: var(--green); }
.scene-dot.orange { background: var(--orange); }
.scene-dot button {
  position: absolute;
  left: 18px;
  top: -8px;
  width: 148px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}
.scene-dot small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.scenario-list {
  display: grid;
  gap: 12px;
}
.scenario-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfd;
}
.scenario-card small {
  color: var(--purple);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}
.scenario-card h4 {
  margin: 6px 0;
  font-size: 22px;
  line-height: 1.2;
}
.scenario-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
dl {
  margin: 0;
  display: grid;
  gap: 9px;
}
dl div {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
}
dt {
  color: var(--muted);
  font-size: 12px;
}
dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}
.materials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.materials-grid div {
  padding: 16px;
  border: 1px solid rgba(86, 56, 239, .13);
  border-radius: 8px;
  background: #fbfaff;
}
.materials-grid b {
  display: block;
  margin-bottom: 8px;
  color: var(--purple);
  font-size: 13px;
}
.materials-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.interview-notes {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}
.interview-notes article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfd;
}
.interview-notes small {
  color: var(--purple);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}
.interview-notes h4 {
  margin: 8px 0;
  font-size: 16px;
  line-height: 1.45;
}
.interview-notes p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}
.roadmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.roadmap div {
  padding: 20px;
  border: 1px solid rgba(86, 56, 239, .13);
  border-radius: 8px;
  background: #fbfaff;
}
.roadmap strong {
  color: var(--purple);
  font-size: 24px;
}
.roadmap p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.toast {
  position: fixed;
  right: 26px;
  bottom: 76px;
  z-index: 40;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #101828;
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
  opacity: 0;
  transform: translateY(12px);
  transition: .25s ease;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: 1fr;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .header-actions { justify-content: space-between; }
  .flow-step, .diagnosis-hero, .workspace, .report-grid, .report-band {
    grid-template-columns: 1fr;
  }
  .page-copy { position: static; }
  .stack-grid, .stack-summary, .roadmap, .consultant-layout, .materials-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .step-rail {
    display: flex;
    overflow-x: auto;
  }
  .step-rail button { min-width: 116px; }
  .diagnosis-hero { padding-top: 55px; }
  .hero-copy h1 { font-size: 48px; }
  .flow-step { padding: 58px 0; }
  .page-copy h2 { font-size: 38px; }
  .page-panel { padding: 20px; }
  .form-grid, .department-grid, .final-panel, .scenario-card, .consultant-input, .consultant-header {
    grid-template-columns: 1fr;
  }
  .consultant-header { display: grid; }
  .chat-message { max-width: 100%; }
  .report-cover { min-height: 420px; padding: 32px 22px; }
  .report-cover h2 { font-size: 42px; }
  .report-cover-foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .flow-actions { justify-content: stretch; }
  .flow-actions button { flex: 1; }
}

/* Premium product-demo alignment */
:root {
  --paper: #fbfaf7;
  --cream: #f5f3ee;
  --ink: #151627;
  --muted: #696b79;
  --line: rgba(21, 22, 39, .13);
  --purple: #5638ef;
  --cyan: #70dce5;
  --magenta: #d230ab;
  --demo-shadow: 0 35px 90px rgba(80, 56, 239, .2);
  --panel-shadow: 0 24px 70px rgba(26, 17, 73, .16);
}

body {
  background: var(--paper);
  line-height: 1.65;
}

.site-header {
  min-height: 76px;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, .88);
}

.brand strong {
  color: var(--ink);
  font-size: 25px;
  letter-spacing: -.06em;
}

.brand span {
  color: #8b8d99;
}

.step-rail {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
}

.step-rail button {
  min-height: 50px;
  border-right: 1px solid var(--line);
  border-radius: 0;
  color: #565866;
  transition: background .25s ease, color .25s ease;
}

.step-rail button:last-child {
  border-right: 0;
}

.step-rail button.active {
  border-color: transparent;
  background: #efedff;
  color: var(--purple);
}

.primary,
.ghost,
.text-action {
  border-radius: 4px;
}

.primary {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: none;
}

.ghost {
  background: #fff;
}

.text-action {
  color: var(--purple);
}

.diagnosis-hero {
  min-height: 390px;
  padding: 92px var(--pad) 62px;
  grid-template-columns: 1fr;
  place-items: center;
  text-align: center;
  background: var(--paper);
}

.hero-copy h1 {
  max-width: 980px;
  font-size: clamp(52px, 6.8vw, 104px);
  line-height: .98;
  letter-spacing: -.064em;
}

.hero-copy p:last-child {
  max-width: 760px;
  margin: 30px auto 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-status {
  width: min(620px, 100%);
  margin-top: 34px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  align-items: center;
  border-color: var(--line);
  border-radius: 9px;
  box-shadow: none;
}

.hero-status strong {
  margin: 0;
  font-size: 24px;
  text-align: right;
}

.hero-status p {
  min-height: auto;
  margin: 0;
  text-align: left;
}

.hero-status i {
  grid-column: 1 / -1;
  height: 3px;
}

.diagnosis-flow {
  max-width: 1420px;
  margin: 0 auto;
  padding: 0 var(--pad) 100px;
}

.flow-step {
  position: relative;
  min-height: 650px;
  padding: 58px;
  grid-template-columns: minmax(245px, .58fr) minmax(0, 1.42fr);
  gap: 34px;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at 10% -18%, rgba(137, 194, 255, .45), transparent 35%),
    radial-gradient(circle at 92% 105%, rgba(255, 162, 107, .54), transparent 35%),
    linear-gradient(132deg, #4e48f5 0%, #7638e9 45%, #d230ab 100%);
  box-shadow: var(--demo-shadow);
}

.flow-step::after {
  content: "TYPE · ANALYZE · DIAGNOSE";
  position: absolute;
  left: 58px;
  right: 58px;
  bottom: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .28);
  color: rgba(255, 255, 255, .74);
  font-size: 10px;
  letter-spacing: .14em;
  pointer-events: none;
}

.page-copy {
  top: 108px;
  z-index: 1;
  align-self: center;
}

.page-copy small,
.page-copy h2,
.page-copy p {
  color: #fff;
}

.page-copy small {
  opacity: .74;
}

.page-copy h2 {
  margin-top: 14px;
  font-size: clamp(38px, 4.6vw, 68px);
  line-height: 1.03;
  letter-spacing: -.052em;
}

.page-copy p {
  color: rgba(255, 255, 255, .78);
  font-size: 16px;
}

.page-panel {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(18px);
}

.gate-panel {
  max-width: none;
  background: rgba(255, 255, 255, .94);
}

label span,
legend {
  color: #36394b;
  font-size: 12px;
}

input,
select,
textarea {
  border-color: rgba(21, 22, 39, .1);
  border-radius: 8px;
}

.stack-picker,
.department-card,
.question-card,
.material-preview,
#materialPreview div,
.materials-grid div,
.interview-notes article,
.roadmap div,
.scenario-card {
  border-color: rgba(21, 22, 39, .1);
  border-radius: 12px;
  background: #f7f7fb;
}

.rating {
  grid-template-columns: repeat(5, minmax(38px, 48px));
}

.rating span {
  border-radius: 9px;
  background: #fff;
}

.rating input:checked + span {
  border-color: var(--purple);
  background: var(--purple);
}

.tag-list button,
.stack-summary span,
.prompt-sources span {
  border-radius: 999px;
}

.consultant-header h3,
.final-panel h3,
.report-panel h3 {
  letter-spacing: -.03em;
}

.consultant-layout {
  grid-template-columns: minmax(0, .96fr) minmax(260px, .52fr);
}

.chat-box {
  border-color: rgba(21, 22, 39, .1);
  border-radius: 16px;
  background: #fff;
}

.chat-message {
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(26, 17, 73, .06);
}

.chat-message.assistant {
  border-color: rgba(86, 56, 239, .18);
  background: #efedff;
}

.chat-message.user {
  background: #f3fffd;
}

.consultant-input textarea {
  min-height: 108px;
}

.flow-actions {
  left: 0;
  right: 0;
  margin-top: 18px;
  border-top: 0;
  background: transparent;
  backdrop-filter: none;
}

.flow-actions .ghost,
.flow-actions .primary {
  min-width: 126px;
  box-shadow: 0 18px 36px rgba(21, 22, 39, .12);
}

.report-section {
  max-width: 1420px;
  margin: 0 auto;
  padding: 0 var(--pad) 110px;
}

.report-cover {
  min-height: 460px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 12% 0%, rgba(137, 194, 255, .42), transparent 34%),
    radial-gradient(circle at 90% 100%, rgba(255, 162, 107, .48), transparent 34%),
    linear-gradient(132deg, #151627 0%, #352388 48%, #5638ef 100%);
  box-shadow: var(--demo-shadow);
}

.report-band,
.report-panel {
  border-color: var(--line);
  border-radius: 18px;
  box-shadow: none;
}

.report-band {
  border-radius: 18px;
}

.stack-summary div {
  border-color: rgba(21, 22, 39, .1);
  border-radius: 12px;
  background: #f7f7fb;
}

.matrix {
  border-radius: 12px;
  overflow: hidden;
}

.score-row i,
.hero-status i,
.build-progress {
  background: #e8e7ed;
}

.score-row b,
.hero-status b {
  background: linear-gradient(90deg, var(--purple), var(--cyan));
}

.toast {
  border-radius: 12px;
  background: var(--ink);
}

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .flow-step {
    grid-template-columns: 1fr;
    padding: 45px 28px 72px;
  }

  .flow-step::after {
    left: 28px;
    right: 28px;
  }

  .page-copy {
    align-self: start;
  }
}

@media (max-width: 700px) {
  .site-header {
    padding-left: 14px;
    padding-right: 14px;
  }

  .step-rail {
    border: 0;
    background: transparent;
    gap: 8px;
    overflow-x: auto;
  }

  .step-rail button {
    min-width: 145px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
  }

  .diagnosis-hero {
    padding: 70px 20px 48px;
  }

  .hero-copy h1 {
    font-size: 48px;
  }

  .hero-copy p:last-child {
    font-size: 15px;
  }

  .hero-status {
    grid-template-columns: 1fr;
  }

  .hero-status strong,
  .hero-status p {
    text-align: left;
  }

  .diagnosis-flow,
  .report-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .flow-step {
    min-height: 640px;
    padding: 30px 12px 68px;
    border-radius: 21px;
  }

  .flow-step::after {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .page-copy h2 {
    font-size: 38px;
  }

  .page-panel {
    padding: 16px;
    border-radius: 16px;
  }

  .report-cover {
    border-radius: 21px;
  }
}

/* Locked login + fixed AI workspace */
body.is-locked {
  height: 100vh;
  overflow: hidden;
  background: #f7f8fc;
}

body.is-locked .site-header,
body.is-locked main {
  display: none;
}

body.is-unlocked {
  height: 100vh;
  overflow: hidden;
}

body.is-unlocked .login-screen {
  display: none;
}

.login-screen {
  position: relative;
  min-height: 100vh;
  padding: clamp(18px, 4vw, 46px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 26px;
  background:
    radial-gradient(circle at 18% 12%, rgba(112, 220, 229, .22), transparent 28%),
    radial-gradient(circle at 88% 90%, rgba(210, 48, 171, .16), transparent 32%),
    linear-gradient(180deg, #fbfcff 0%, #f4f6fb 100%);
  color: var(--ink);
  overflow: hidden;
}

.login-screen::before,
.login-screen::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.login-screen::before {
  inset: 0;
  opacity: .42;
  background-image:
    linear-gradient(rgba(21, 22, 39, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 22, 39, .055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 54% 48%, #000 0%, transparent 68%);
}

.login-screen::after {
  width: 42vw;
  height: 42vw;
  right: -12vw;
  top: -22vw;
  border-radius: 999px;
  background: conic-gradient(from 90deg, rgba(86, 56, 239, .08), rgba(112, 220, 229, .14), rgba(255, 162, 107, .1), rgba(86, 56, 239, .08));
  filter: blur(26px);
  animation: loginFloat 9s ease-in-out infinite;
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-brand strong {
  font-size: 30px;
  letter-spacing: -.06em;
}

.login-brand span {
  padding-left: 14px;
  border-left: 1px solid rgba(21, 22, 39, .14);
  color: #717585;
  font-size: 10px;
  letter-spacing: .12em;
}

.login-stage {
  position: relative;
  min-height: 0;
  padding: clamp(28px, 6vw, 76px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: clamp(28px, 7vw, 100px);
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 34px;
  background:
    radial-gradient(circle at 10% -18%, rgba(137, 194, 255, .45), transparent 35%),
    radial-gradient(circle at 92% 105%, rgba(255, 162, 107, .54), transparent 35%),
    linear-gradient(132deg, #4e48f5 0%, #7638e9 45%, #d230ab 100%);
  box-shadow: 0 38px 100px rgba(61, 45, 135, .28);
  backdrop-filter: blur(18px);
}

.login-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 22%, rgba(255, 255, 255, .74) 42%, transparent 58%);
  transform: translateX(-120%);
  animation: loginSweep 5.4s ease-in-out infinite;
  pointer-events: none;
}

.login-stage::after {
  content: "";
  position: absolute;
  left: clamp(22px, 5vw, 70px);
  bottom: clamp(22px, 4vw, 58px);
  width: min(360px, 44vw);
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .62), rgba(112, 220, 229, .4), transparent);
  box-shadow: 0 -34px 80px rgba(255, 255, 255, .1);
}

.login-aura {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.login-aura.aura-one {
  width: 54%;
  aspect-ratio: 1;
  left: -6%;
  top: -35%;
  background: radial-gradient(circle, rgba(137, 194, 255, .42), transparent 68%);
  animation: loginFloat 8s ease-in-out infinite;
}

.login-aura.aura-two {
  width: 48%;
  aspect-ratio: 1;
  right: -8%;
  bottom: -45%;
  background: radial-gradient(circle, rgba(255, 162, 107, .5), transparent 68%);
  animation: loginFloat 10s ease-in-out infinite reverse;
}

.login-copy,
.login-card {
  position: relative;
  z-index: 1;
}

.login-copy small {
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
}

.login-copy h1 {
  max-width: 780px;
  margin: 22px 0 28px;
  color: #fff;
  font-size: clamp(54px, 7vw, 104px);
  line-height: .98;
  letter-spacing: -.064em;
  font-weight: 600;
}

.login-copy h1 span {
  color: #bff8ff;
}

.login-copy p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, .78);
  font-size: 18px;
  line-height: 1.85;
}

.login-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 255, .92));
  box-shadow: 0 28px 80px rgba(70, 76, 112, .12);
  backdrop-filter: blur(18px);
  color: var(--ink);
}

.login-card-head {
  padding: 2px 4px 18px;
  display: flex;
  justify-content: space-between;
}

.login-card-head span {
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
}

.login-card-head small {
  color: #999aa6;
  font-size: 9px;
  letter-spacing: .12em;
}

.login-submit {
  width: 100%;
  margin-top: 14px;
  min-height: 50px;
}

.login-signal {
  margin-top: 18px;
  padding-top: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid rgba(21, 22, 39, .1);
  color: #717381;
  font-size: 11px;
}

.login-signal i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(112, 220, 229, .9);
}

body.is-unlocked .site-header {
  height: 76px;
  min-height: 76px;
  padding: 0 clamp(16px, 4vw, 54px);
  grid-template-columns: 170px minmax(0, 1fr) auto;
}

body.is-unlocked main {
  height: calc(100vh - 76px);
  overflow: hidden;
  background: var(--paper);
}

body.is-unlocked .diagnosis-hero {
  display: none;
}

body.is-unlocked .diagnosis-flow {
  position: relative;
  height: calc(100vh - 76px);
  max-width: none;
  padding: clamp(14px, 2vw, 24px);
}

body.is-unlocked .flow-step {
  position: absolute;
  inset: clamp(14px, 2vw, 24px) clamp(14px, 2vw, 24px) 86px;
  min-height: 0;
  height: auto;
  padding: clamp(24px, 4vw, 52px);
  display: grid;
  opacity: 0;
  visibility: hidden;
  transform: translateX(28px) scale(.985);
  transition: opacity .42s ease, transform .42s ease, visibility .42s ease;
}

body.is-unlocked .flow-step.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

body.is-unlocked .diagnosis-flow.is-transitioning .flow-step.active .page-panel {
  animation: panelRise .52s ease both;
}

body.is-unlocked .flow-step::after {
  content: "AIO DIAGNOSIS WORKSPACE";
}

body.is-unlocked .flow-step::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(105deg, transparent 15%, rgba(255, 255, 255, .14) 36%, transparent 58%);
  transform: translateX(-120%);
  animation: workspaceScan 4.8s ease-in-out infinite;
  pointer-events: none;
}

body.is-unlocked .page-copy {
  position: relative;
  top: auto;
}

body.is-unlocked .page-copy h2 {
  font-size: clamp(34px, 4.8vw, 72px);
}

body.is-unlocked .page-panel {
  max-height: calc(100vh - 220px);
  overflow: auto;
}

body.is-unlocked .flow-step[data-step="3"] {
  bottom: 124px;
}

body.is-unlocked .flow-step[data-step="3"] .page-panel {
  min-height: 0;
  max-height: calc(100vh - 235px);
}

body.is-unlocked .flow-step[data-step="3"] .page-copy {
  min-width: min(520px, 100%);
}

body.is-unlocked .flow-step[data-step="3"] .page-copy h2,
body.is-unlocked .flow-step[data-step="3"] .page-copy p {
  text-wrap: pretty;
}

body.is-unlocked .flow-step[data-step="3"] .page-copy p {
  max-width: 620px;
  line-break: strict;
}

body.is-unlocked .flow-step[data-step="1"],
body.is-unlocked .flow-step[data-step="2"] {
  grid-template-columns: 1fr;
  padding: clamp(22px, 4vw, 54px);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(112, 220, 229, .16), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(86, 56, 239, .1), transparent 30%),
    radial-gradient(circle at 70% 92%, rgba(255, 162, 107, .14), transparent 34%),
    linear-gradient(180deg, #fbfcff 0%, #f5f7fb 100%);
  box-shadow: none;
}

body.is-unlocked .flow-step[data-step="1"]::after,
body.is-unlocked .flow-step[data-step="2"]::after {
  content: "CLICK · LISTEN · NEXT";
  border-top-color: rgba(21, 22, 40, .1);
  color: rgba(21, 22, 40, .36);
}

body.is-unlocked .flow-step[data-step="1"] .page-copy,
body.is-unlocked .flow-step[data-step="2"] .page-copy {
  display: none;
}

body.is-unlocked .flow-step[data-step="1"] .page-panel,
body.is-unlocked .flow-step[data-step="2"] .page-panel {
  height: 100%;
  max-height: none;
  padding: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(14px, 2vh, 22px);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.is-unlocked .flow-step[data-step="1"] .stack-extra,
body.is-unlocked .flow-step[data-step="2"] .stack-extra {
  display: none;
}

body.is-unlocked .flow-step[data-step="1"] .stack-extra span,
body.is-unlocked .flow-step[data-step="2"] .stack-extra span {
  color: #686e7d;
  font-size: 12px;
  line-height: 1.5;
}

body.is-unlocked .flow-step[data-step="1"] .stack-extra textarea,
body.is-unlocked .flow-step[data-step="2"] .stack-extra textarea {
  min-height: 46px;
  height: 46px;
  resize: none;
  border-color: rgba(21, 22, 40, .08);
  border-radius: 16px;
  background: rgba(255, 255, 255, .64);
  box-shadow: 0 16px 38px rgba(55, 62, 100, .06);
}

body.is-unlocked .flow-step[data-step="4"] {
  grid-template-columns: 1fr;
}

body.is-unlocked .flow-step[data-step="4"] .page-copy {
  display: none;
}

body.is-unlocked .flow-step[data-step="4"] .consultant-panel {
  max-height: calc(100vh - 190px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 16px;
  overflow: hidden;
}

body.is-unlocked .flow-step[data-step="4"] .consultant-layout {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 320px;
}

body.is-unlocked .flow-step[data-step="4"] .chat-box {
  min-height: 0;
  max-height: none;
}

body.is-unlocked .flow-step[data-step="4"] .consultant-header {
  padding-bottom: 14px;
}

body.is-unlocked .flow-step[data-step="4"] .consultant-header > .ghost {
  align-self: center;
}

body.is-unlocked .flow-step[data-step="4"] .consultant-title p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

body.is-unlocked .flow-step[data-step="4"] .consultant-input {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
  border: 1px solid rgba(21, 22, 39, .1);
  border-radius: 18px;
  background: #fff;
}

body.is-unlocked .flow-step[data-step="4"] .consultant-input textarea {
  min-height: 76px;
  border: 0;
  padding: 6px 2px;
  resize: none;
  box-shadow: none;
}

body.is-unlocked .flow-step[data-step="4"] .consultant-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.consultant-connection {
  min-height: 74px;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 1px solid rgba(86, 56, 239, .12);
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(86, 56, 239, .08), rgba(112, 220, 229, .08));
}

.consultant-connection[hidden] {
  display: none;
}

.consultant-connection span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(86, 56, 239, .16);
  border-top-color: var(--purple);
  animation: consultantSpin .8s linear infinite;
}

.consultant-connection p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

body.is-unlocked .flow-actions {
  position: fixed;
  left: clamp(16px, 4vw, 54px);
  right: clamp(16px, 4vw, 54px);
  bottom: 18px;
  z-index: 30;
  padding: 0;
  margin: 0;
}

body.is-unlocked .flow-actions::before {
  content: "";
  flex: 1;
  height: 3px;
  align-self: center;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(86, 56, 239, .85), rgba(112, 220, 229, .75)),
    #e8e7ed;
}

body.is-unlocked .flow-step[data-step="1"].active ~ .flow-actions::before,
body.is-unlocked .flow-step[data-step="2"].active ~ .flow-actions::before,
body.is-unlocked .flow-step[data-step="3"].active ~ .flow-actions::before {
  display: none;
}

.consultant-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.consultant-avatar,
.message-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #dcfff0, #95e7bd);
  color: #137344;
  font-size: 13px;
  font-weight: 800;
}

.consultant-avatar {
  position: relative;
  width: 68px;
  height: 68px;
  flex-basis: 68px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 35% 28%, #ffffff 0 7%, transparent 8%),
    linear-gradient(145deg, #dcfff0, #95e7bd 54%, #70dce5);
  box-shadow: 0 18px 44px rgba(18, 185, 129, .22);
}

.consultant-avatar i {
  width: 32px;
  height: 32px;
  display: block;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 38%, #137344 0 7%, transparent 8%),
    radial-gradient(circle at 65% 38%, #137344 0 7%, transparent 8%),
    linear-gradient(#137344 0 0) center 66% / 18px 3px no-repeat,
    rgba(255, 255, 255, .74);
}

.consultant-avatar::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(18, 185, 129, .42);
  animation: onlineBreath 1.8s ease-in-out infinite;
}

.message-avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 50%;
}

.user-avatar {
  background: linear-gradient(145deg, #efedff, #d9d2ff);
  color: var(--purple);
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.chat-message.compact-message {
  margin-top: 4px;
  opacity: .84;
}

.chat-message.user {
  margin-left: auto;
}

.chat-message.user .message-avatar {
  order: 2;
}

.chat-message.user > div {
  text-align: right;
}

.voice-button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(86, 56, 239, .18);
  border-radius: 50%;
  background: #efedff;
  color: var(--purple);
}

.voice-button span {
  width: 16px;
  height: 22px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 999px;
  position: relative;
}

.voice-button span::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 12px;
  height: 7px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%);
}

.voice-button.is-listening {
  background: var(--purple);
  color: #fff;
  animation: voicePulse 1s ease-in-out infinite;
}

body.is-reporting {
  overflow: hidden;
}

body.is-reporting .diagnosis-flow {
  display: none;
}

body.is-reporting .report-section {
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: none;
  overflow: auto;
  padding: 18px clamp(16px, 4vw, 54px) 80px;
  background: var(--paper);
}

@page {
  size: A4;
  margin: 12mm;
}

@media print {
  html,
  body {
    width: auto;
    height: auto;
    overflow: visible !important;
    background: #fff !important;
    color: #111 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .no-print,
  .site-header,
  .login-screen,
  .diagnosis-hero,
  .diagnosis-flow,
  .flow-actions,
  .toast {
    display: none !important;
  }

  body.is-reporting {
    overflow: visible !important;
  }

  body.is-reporting main,
  body.is-reporting .report-section,
  .report-section {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .report-cover {
    min-height: 210mm;
    padding: 22mm 18mm;
    border-radius: 0;
    page-break-after: always;
    break-after: page;
  }

  .report-cover h2 {
    font-size: 48pt;
    letter-spacing: 0;
  }

  .report-cover-foot b {
    font-size: 42pt;
  }

  .report-band,
  .report-panel {
    margin-top: 10mm;
    padding: 9mm;
    border: 1px solid #d8d8df;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-grid {
    display: block;
  }

  .report-band {
    grid-template-columns: 1fr;
  }

  .stack-summary {
    grid-template-columns: 1fr;
  }

  .matrix {
    min-height: 88mm;
  }

  .scenario-card,
  .interview-notes article,
  .roadmap div {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-panel h3,
  .report-band h3 {
    letter-spacing: 0;
  }
}

@keyframes panelRise {
  from {
    opacity: .35;
    transform: translateY(16px) scale(.992);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes workspaceScan {
  0%, 62% {
    transform: translateX(-120%);
    opacity: 0;
  }
  72% {
    opacity: .85;
  }
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

@keyframes consultantSpin {
  to { transform: rotate(360deg); }
}

@keyframes voicePulse {
  50% { box-shadow: 0 0 0 8px rgba(86, 56, 239, .13); }
}

@keyframes onlineBreath {
  0%, 100% {
    transform: scale(.96);
    box-shadow: 0 0 0 0 rgba(18, 185, 129, .38);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(18, 185, 129, 0);
  }
}

@keyframes wizardHeaderIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wizardQuestionIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(.985);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes wizardOut {
  to {
    opacity: 0;
    transform: translateY(-16px) scale(.985);
    filter: blur(7px);
  }
}

@keyframes optionPop {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(.92);
    filter: blur(8px);
  }
  68% {
    opacity: 1;
    transform: translateY(-4px) scale(1.018);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes optionRipple {
  0% {
    opacity: .55;
    transform: translate(-50%, -50%) scale(.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(12);
  }
}

@keyframes loginSweep {
  0%, 58% {
    transform: translateX(-120%);
    opacity: 0;
  }
  68% {
    opacity: .72;
  }
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

@keyframes loginFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(18px, -16px, 0) rotate(10deg);
  }
}

@media (max-width: 1050px) {
  .login-stage {
    grid-template-columns: 1fr;
  }

  .inventory-wizard {
    grid-template-columns: 1fr;
  }

  .wizard-main,
  .inventory-summary-panel {
    min-height: auto;
  }

  body.is-unlocked {
    overflow: auto;
    height: auto;
  }

  body.is-unlocked main,
  body.is-unlocked .diagnosis-flow {
    height: auto;
    min-height: calc(100vh - 76px);
    overflow: visible;
  }

  body.is-unlocked .flow-step {
    position: relative;
    inset: auto;
    min-height: calc(100vh - 150px);
    display: none;
  }

  body.is-unlocked .flow-step.active {
    display: grid;
  }

  body.is-unlocked .flow-step[data-step="3"] {
    bottom: auto;
    padding-bottom: 96px;
  }

  body.is-unlocked .flow-step[data-step="4"] .consultant-layout {
    grid-template-columns: 1fr;
  }

  body.is-consultant-step .flow-step[data-step="4"] .consultant-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.is-consultant-step .flow-step[data-step="4"] .consultant-header-actions {
    max-width: 100%;
    justify-content: flex-start;
  }

  body.is-consultant-step .flow-step[data-step="4"] .consultant-title p {
    max-width: calc(100vw - 130px);
  }

  body.is-unlocked .page-panel {
    max-height: none;
  }
}

@media (max-width: 700px) {
  .login-screen {
    padding: 12px;
  }

  .login-stage {
    padding: 30px 14px;
    border-radius: 22px;
  }

  .login-copy h1 {
    font-size: 48px;
  }

  .login-copy p {
    font-size: 15px;
  }

  .wizard-main {
    padding: 0;
    gap: 16px;
  }

  .wizard-question h3 {
    font-size: 34px;
  }

  .wizard-options {
    grid-template-columns: 1fr;
  }

  .wizard-options button,
  .wizard-other input,
  .wizard-other .primary {
    min-height: 64px;
  }

  .wizard-other {
    grid-template-columns: 1fr;
  }

  .wizard-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .wizard-controls .ghost:last-child {
    grid-column: 1 / -1;
  }

  body.is-unlocked .site-header {
    height: auto;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  body.is-unlocked main {
    min-height: calc(100vh - 154px);
  }

  body.is-unlocked .diagnosis-flow {
    min-height: calc(100vh - 154px);
    padding: 12px;
  }

  body.is-unlocked .flow-step {
    min-height: calc(100vh - 230px);
  }

  body.is-unlocked .flow-step[data-step="1"],
  body.is-unlocked .flow-step[data-step="2"] {
    padding: 18px 14px 62px;
  }

  body.is-unlocked .flow-step[data-step="1"] .stack-extra,
  body.is-unlocked .flow-step[data-step="2"] .stack-extra {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.is-unlocked .flow-actions {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  body.is-unlocked .flow-actions::before {
    display: none;
  }

  body.is-consultant-step .flow-step[data-step="4"] {
    padding: 10px;
  }

  body.is-consultant-step .flow-step[data-step="4"] .consultant-panel {
    border-radius: 22px;
    padding: 14px;
  }

  body.is-consultant-step .flow-step[data-step="4"] .chat-box {
    padding: 18px 18px;
  }

  body.is-consultant-step .flow-step[data-step="4"] .consultant-input {
    width: 100%;
  }

  body.is-reporting .report-section {
    top: 154px;
    padding: 12px 12px 70px;
  }
}

/* Consultant video-call redesign */
.consultant-connection {
  min-height: 260px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 18%, rgba(112, 220, 229, .18), transparent 35%),
    linear-gradient(135deg, rgba(21, 22, 39, .98), rgba(57, 38, 132, .96));
  color: #fff;
  overflow: hidden;
}

.consultant-connection span {
  width: auto;
  height: auto;
  border: 0;
  animation: none;
}

.consultant-connection p {
  color: rgba(255, 255, 255, .72);
}

.incoming-call-card {
  position: relative;
  width: min(340px, 86%);
  min-height: 220px;
  padding: 26px 24px 22px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 28px;
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .24);
  backdrop-filter: blur(18px);
}

.incoming-call-card img {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, .82);
  border-radius: 50%;
  box-shadow: 0 20px 52px rgba(112, 220, 229, .28);
  animation: avatarBreath 2.6s ease-in-out infinite;
}

.incoming-call-card strong {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin-top: 14px;
  justify-self: center;
  display: block;
  font-size: 20px;
  letter-spacing: -.02em;
}

.incoming-call-card strong em {
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .82);
}

.incoming-call-card i {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  color: rgba(255, 255, 255, .54);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .16em;
}

.call-ring,
.call-ring::before,
.call-ring::after {
  position: absolute;
  inset: 34px;
  border: 1px solid rgba(112, 220, 229, .32);
  border-radius: 50%;
  animation: callPulse 1.8s ease-out infinite;
}

.call-ring::before,
.call-ring::after {
  content: "";
  inset: -22px;
}

.call-ring::after {
  animation-delay: .55s;
}

.consultant-avatar {
  overflow: visible;
  border: 2px solid rgba(255, 255, 255, .92);
  background: #151627;
}

.consultant-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.consultant-avatar i {
  display: none;
}

.message-avatar {
  overflow: hidden;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.is-unlocked .flow-step[data-step="4"] .consultant-input {
  padding: 12px 12px 12px 16px;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(26, 17, 73, .08);
}

body.is-unlocked .flow-step[data-step="4"] .consultant-input textarea {
  min-height: 62px;
  line-height: 1.65;
}

.voice-button {
  width: 48px;
  height: 48px;
}

@keyframes callPulse {
  0% {
    opacity: .9;
    transform: scale(.72);
  }
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@keyframes avatarBreath {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 24px 70px rgba(86, 56, 239, .16),
      0 0 0 14px rgba(255, 255, 255, .58),
      0 0 0 26px color-mix(in srgb, var(--consultant-accent, #70dce5) 10%, transparent);
  }
  50% {
    transform: scale(1.035);
    box-shadow:
      0 34px 92px rgba(86, 56, 239, .2),
      0 0 0 20px rgba(255, 255, 255, .7),
      0 0 0 40px color-mix(in srgb, var(--consultant-accent, #70dce5) 16%, transparent);
  }
}

@keyframes siriOrb {
  0%, 100% {
    transform: scale(.86) rotate(0deg);
    border-radius: 45% 55% 52% 48%;
  }
  35% {
    transform: scale(1.04) rotate(118deg);
    border-radius: 58% 42% 46% 54%;
  }
  68% {
    transform: scale(.94) rotate(252deg);
    border-radius: 42% 58% 56% 44%;
  }
}

/* Full-screen consultant connection mode */
body.is-consultant-connecting .site-header,
body.is-consultant-connecting .flow-actions {
  opacity: 0;
  transform: translateY(calc(-100% - 2px));
  pointer-events: none;
}

body.is-consultant-step:not(.is-consultant-connecting) .flow-actions {
  display: none;
}

body.is-consultant-connecting main {
  height: 100vh;
}

body.is-consultant-connecting .diagnosis-flow {
  height: 100vh;
  padding: 0;
}

body.is-consultant-connecting .flow-step[data-step="4"] {
  inset: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--consultant-accent, #70dce5) 16%, transparent), transparent 33%),
    radial-gradient(circle at 30% 24%, rgba(182, 226, 255, .45), transparent 32%),
    radial-gradient(circle at 72% 78%, rgba(240, 166, 255, .34), transparent 34%),
    linear-gradient(180deg, #fbfcff 0%, #f5f7fb 58%, #eef1f8 100%);
}

body.is-consultant-connecting .flow-step[data-step="4"]::before,
body.is-consultant-connecting .flow-step[data-step="4"]::after {
  display: none;
}

body.is-consultant-connecting .flow-step[data-step="4"] .consultant-panel {
  max-height: none;
  width: 100%;
  height: 100%;
  padding: clamp(24px, 5vw, 72px);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.is-consultant-connecting .flow-step[data-step="4"] .consultant-header,
body.is-consultant-connecting .flow-step[data-step="4"] .chat-box,
body.is-consultant-connecting .flow-step[data-step="4"] .consultant-input,
body.is-consultant-connecting .flow-step[data-step="4"] .consultant-footer {
  display: none;
}

body.is-consultant-connecting .consultant-connection {
  width: min(760px, 92vw);
  min-height: min(620px, 78vh);
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
}

body.is-consultant-connecting .incoming-call-card {
  width: min(560px, 88vw);
  min-height: 430px;
  padding: 34px 26px 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.is-consultant-connecting .incoming-call-card img {
  width: 146px;
  height: 146px;
  border: 4px solid rgba(255, 255, 255, .9);
  box-shadow:
    0 28px 80px rgba(86, 56, 239, .16),
    0 0 0 18px rgba(255, 255, 255, .6);
}

body.is-consultant-connecting .incoming-call-card strong {
  margin-top: 26px;
  color: #151628;
  font-size: clamp(28px, 4vw, 42px);
}

body.is-consultant-connecting .incoming-call-card strong em {
  border-color: color-mix(in srgb, var(--consultant-accent, #70dce5) 32%, rgba(21, 22, 39, .08));
  background: rgba(255, 255, 255, .72);
  color: color-mix(in srgb, var(--consultant-accent, #70dce5) 68%, #151628);
  box-shadow: 0 10px 30px rgba(26, 17, 73, .07);
}

body.is-consultant-connecting .incoming-call-card p {
  max-width: 500px;
  margin-top: 10px;
  color: #5f6472;
  font-size: 15px;
  line-height: 1.75;
}

body.is-consultant-connecting .incoming-call-card i {
  margin-top: 28px;
  color: #8b90a0;
  letter-spacing: .2em;
}

body.is-consultant-connecting .call-ring,
body.is-consultant-connecting .call-ring::before,
body.is-consultant-connecting .call-ring::after {
  inset: 42px;
  border: 0;
  border-radius: 999px;
  background:
    conic-gradient(from 0deg,
      rgba(112, 220, 229, .02),
      color-mix(in srgb, var(--consultant-accent, #70dce5) 42%, transparent),
      rgba(155, 140, 255, .34),
      rgba(240, 166, 255, .28),
      rgba(112, 220, 229, .02));
  filter: blur(18px);
  opacity: .78;
  animation: siriOrb 5.4s ease-in-out infinite;
}

body.is-consultant-connecting .call-ring::before {
  inset: 34px;
  opacity: .68;
  animation-duration: 6.6s;
  animation-direction: reverse;
}

body.is-consultant-connecting .call-ring::after {
  inset: 88px;
  opacity: .52;
  filter: blur(26px);
  animation-duration: 4.8s;
}

.connect-success {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 80;
  min-width: 220px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(21, 22, 39, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .84);
  color: #151628;
  box-shadow: 0 24px 70px rgba(26, 17, 73, .14);
  backdrop-filter: blur(18px);
  transform: translate(-50%, -50%);
  animation: successPop 1.25s ease both;
}

.connect-success[hidden] {
  display: none;
}

.connect-success span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 45%, #101828 45% 55%, transparent 55%) 7px 11px / 10px 4px no-repeat,
    var(--consultant-accent, #70dce5);
}

.connect-success strong {
  font-size: 15px;
}

@keyframes successPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.92);
  }
  18%, 72% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -54%) scale(.98);
  }
}

/* Consultant chat full-screen mode after connection */
body.is-consultant-step .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: grid;
  transform: translateY(calc(-100% - 2px));
  opacity: 0;
  transition: transform .28s ease, opacity .28s ease;
}

body.is-consultant-step .site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -26px;
  height: 26px;
}

body.is-consultant-step .site-header:hover {
  transform: translateY(0);
  opacity: 1;
}

body.is-consultant-step.is-consultant-connecting .site-header {
  transform: translateY(calc(-100% - 2px));
  opacity: 0;
  pointer-events: none;
}

body.is-consultant-step main {
  height: 100vh;
  overflow: hidden;
}

body.is-consultant-step .diagnosis-flow {
  height: 100vh;
  max-width: none;
  padding: 0;
  overflow: hidden;
}

body.is-consultant-step .flow-step[data-step="4"] {
  inset: 0;
  min-height: 100vh;
  height: 100vh;
  padding: clamp(14px, 2vw, 28px);
  border-radius: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(112, 220, 229, .12), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(86, 56, 239, .12), transparent 30%),
    #f7f7fb;
  box-shadow: none;
}

body.is-consultant-step.is-consultant-connecting .flow-step[data-step="4"] {
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--consultant-accent, #70dce5) 16%, transparent), transparent 33%),
    radial-gradient(circle at 30% 24%, rgba(182, 226, 255, .45), transparent 32%),
    radial-gradient(circle at 72% 78%, rgba(240, 166, 255, .34), transparent 34%),
    linear-gradient(180deg, #fbfcff 0%, #f5f7fb 58%, #eef1f8 100%);
}

body.is-consultant-step .flow-step[data-step="4"]::before,
body.is-consultant-step .flow-step[data-step="4"]::after {
  display: none;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-panel {
  position: relative;
  width: min(1500px, 100%);
  height: 100%;
  max-height: none;
  margin: 0 auto;
  padding: clamp(12px, 1.7vw, 22px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(21, 22, 39, .08);
  border-radius: 30px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 34px 90px rgba(26, 17, 73, .1);
  backdrop-filter: blur(22px);
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-header {
  min-height: 48px;
  padding: 0 0 6px;
  gap: 16px;
  border-bottom-color: rgba(21, 22, 39, .08);
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-header-actions {
  max-width: min(360px, 42vw);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  align-self: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-header-actions .ghost,
body.is-consultant-step .flow-step[data-step="4"] .consultant-header-actions .primary {
  min-width: 92px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  white-space: nowrap;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-header-actions .primary {
  min-width: 126px;
  box-shadow: 0 14px 30px rgba(21, 22, 39, .14);
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-avatar {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  border-radius: 16px;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-avatar::after {
  right: -4px;
  bottom: -4px;
  width: 13px;
  height: 13px;
  border-width: 2px;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-header h3 {
  margin: 2px 0 2px;
  font-size: 24px;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-title p {
  max-width: min(560px, 46vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.45;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-connection[hidden] {
  display: none;
}

body.is-consultant-step .flow-step[data-step="4"] .chat-box {
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: clamp(18px, 2vw, 28px) clamp(30px, 6vw, 96px);
  border: 0;
  border-radius: 22px;
  background: #fff;
}

body.is-consultant-step .flow-step[data-step="4"] .chat-message {
  max-width: min(820px, 88%);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  margin-bottom: 18px;
}

body.is-consultant-step .flow-step[data-step="4"] .chat-message > div {
  padding: 0;
}

body.is-consultant-step .flow-step[data-step="4"] .chat-message p {
  margin-top: 6px;
  color: #292b3a;
  font-size: 16px;
  line-height: 1.85;
}

body.is-consultant-step .flow-step[data-step="4"] .chat-message b {
  color: #606371;
  font-size: 12px;
}

body.is-consultant-step .flow-step[data-step="4"] .chat-message.user {
  margin-left: auto;
  padding: 14px 16px;
  border-radius: 20px;
  background: #f1efff;
}

body.is-consultant-step .flow-step[data-step="4"] .chat-message.user p {
  margin: 4px 0 0;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-input {
  width: min(980px, calc(100% - 20px));
  min-height: 76px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding: 12px 12px 12px 18px;
  border: 1px solid rgba(21, 22, 39, .1);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(26, 17, 73, .12);
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-input label {
  gap: 4px;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-input label span {
  display: none;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-input textarea {
  height: auto;
  min-height: 46px;
  max-height: 120px;
  padding: 10px 2px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  resize: none;
  box-shadow: none;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-input textarea::placeholder {
  color: #a2a4af;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-actions {
  align-items: center;
  gap: 8px;
}

body.is-consultant-step .flow-step[data-step="4"] .voice-button {
  width: 48px;
  height: 48px;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-actions .primary {
  min-width: 72px;
  min-height: 44px;
  border-radius: 999px;
}

body.is-consultant-step:not(.is-consultant-connecting) .flow-actions {
  display: none;
}

body.is-consultant-connecting .flow-step[data-step="4"] {
  padding: 0;
}

body.is-consultant-connecting .flow-step[data-step="4"] .consultant-panel {
  width: 100%;
  height: 100%;
  max-width: none;
  padding: clamp(24px, 5vw, 72px);
  grid-template-rows: 1fr;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.is-consultant-connecting .flow-step[data-step="4"] .consultant-connection {
  grid-row: 1;
}

/* Consultant visible analysis summary */
body.is-consultant-step .flow-step[data-step="4"] .reasoning-message {
  width: min(820px, 92%);
  max-width: min(820px, 92%);
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-card {
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(21, 22, 39, .08);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(247, 248, 255, .9)),
    #fff;
  box-shadow: 0 18px 46px rgba(26, 17, 73, .08);
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-card.is-thinking {
  border-color: color-mix(in srgb, var(--consultant-accent, #6d5dfc) 28%, rgba(21, 22, 39, .08));
  box-shadow: 0 20px 56px color-mix(in srgb, var(--consultant-accent, #6d5dfc) 16%, transparent);
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-head span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-head b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-step {
  position: relative;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(21, 22, 39, .06);
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
  overflow: hidden;
  transition: border-color .28s ease, background .28s ease, box-shadow .28s ease, transform .28s ease;
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-step::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 36%, rgba(255, 255, 255, .82) 48%, transparent 62% 100%);
  opacity: 0;
  transform: translateX(-120%);
  pointer-events: none;
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-step.is-active {
  border-color: color-mix(in srgb, var(--consultant-accent, #6d5dfc) 42%, rgba(21, 22, 39, .08));
  background: color-mix(in srgb, var(--consultant-accent, #6d5dfc) 7%, #fff);
  box-shadow: 0 16px 36px color-mix(in srgb, var(--consultant-accent, #6d5dfc) 13%, transparent);
  transform: translateY(-2px);
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-step.is-active::after {
  opacity: 1;
  animation: reasoningScan 1.2s ease-in-out infinite;
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-step.is-complete {
  border-color: color-mix(in srgb, var(--consultant-accent, #6d5dfc) 24%, rgba(21, 22, 39, .08));
  background: color-mix(in srgb, var(--consultant-accent, #6d5dfc) 4%, #fff);
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-step.is-pending {
  opacity: .55;
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-step i {
  display: grid;
  width: 24px;
  height: 24px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--consultant-accent, #6d5dfc) 14%, #fff);
  color: color-mix(in srgb, var(--consultant-accent, #6d5dfc) 70%, #161827);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  transition: background .24s ease, color .24s ease, transform .24s ease;
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-step.is-active i {
  background: var(--consultant-accent, #6d5dfc);
  color: #fff;
  animation: activeStepPulse 1.05s ease-in-out infinite;
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-step.is-complete i {
  background: color-mix(in srgb, var(--consultant-accent, #6d5dfc) 74%, #fff);
  color: #fff;
  font-size: 0;
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-step.is-complete i::before {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(-45deg);
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-step strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

body.is-consultant-step .flow-step[data-step="4"] .reasoning-step p {
  margin: 6px 0 0;
  color: #606371;
  font-size: 12px;
  line-height: 1.55;
}

body.is-consultant-step .flow-step[data-step="4"] .reference-trace {
  margin-top: 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid rgba(21, 22, 39, .06);
  border-radius: 16px;
  background: rgba(250, 251, 255, .72);
}

body.is-consultant-step .flow-step[data-step="4"] .reference-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 8px;
  opacity: .32;
  transform: translateY(3px);
  transition: opacity .28s ease, transform .28s ease;
}

body.is-consultant-step .flow-step[data-step="4"] .reference-item.is-visible {
  opacity: 1;
  transform: none;
}

body.is-consultant-step .flow-step[data-step="4"] .reference-item > span {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 999px;
  background: rgba(96, 99, 113, .28);
}

body.is-consultant-step .flow-step[data-step="4"] .reference-item.is-visible > span {
  background: var(--consultant-accent, #6d5dfc);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--consultant-accent, #6d5dfc) 14%, transparent);
}

body.is-consultant-step .flow-step[data-step="4"] .reference-item b,
body.is-consultant-step .flow-step[data-step="4"] .reference-item strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
}

body.is-consultant-step .flow-step[data-step="4"] .reference-item p {
  margin: 4px 0 0;
  color: #6d7080;
  font-size: 10px;
  line-height: 1.5;
}

body.is-consultant-step .flow-step[data-step="4"] .process-message {
  width: min(860px, 94%);
  max-width: min(860px, 94%);
}

body.is-consultant-step .flow-step[data-step="4"] .process-message > div {
  width: 100%;
}

body.is-consultant-step .flow-step[data-step="4"] .process-message .reference-trace {
  margin-top: 10px;
}

body.is-consultant-step .flow-step[data-step="4"] .hello-message p {
  font-size: 17px;
}

body.is-consultant-step .flow-step[data-step="4"] .info-table-message {
  width: min(760px, 92%);
  max-width: min(760px, 92%);
}

body.is-consultant-step .flow-step[data-step="4"] .info-table-message > div {
  width: 100%;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-info-table {
  width: 100%;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid rgba(21, 22, 39, .08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 253, .92));
  box-shadow: 0 18px 45px rgba(26, 17, 73, .06);
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-info-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(21, 22, 39, .07);
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-info-row:last-child {
  border-bottom: 0;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-info-row span {
  color: #8a8d99;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-info-row strong {
  min-width: 0;
  color: #202232;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

body.is-consultant-step .flow-step[data-step="4"] .typing-message p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.is-consultant-step .flow-step[data-step="4"] .typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transform: translateY(1px);
}

body.is-consultant-step .flow-step[data-step="4"] .typing-dots i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--consultant-accent, #6d5dfc);
  animation: typingPulse 1s ease-in-out infinite;
}

body.is-consultant-step .flow-step[data-step="4"] .typing-dots i:nth-child(2) {
  animation-delay: .12s;
}

body.is-consultant-step .flow-step[data-step="4"] .typing-dots i:nth-child(3) {
  animation-delay: .24s;
}

body.is-consultant-step .flow-step[data-step="4"] .streaming-message p {
  min-height: 30px;
  white-space: pre-line;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-reply,
body.is-consultant-step .flow-step[data-step="4"] .consultant-recovery {
  white-space: pre-line;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-recovery {
  color: color-mix(in srgb, var(--consultant-accent, #6d5dfc) 60%, #292b3a);
}

body.is-consultant-step .flow-step[data-step="4"] .stream-cursor {
  display: inline-block;
  width: 7px;
  height: 18px;
  margin-left: 3px;
  border-radius: 999px;
  background: var(--consultant-accent, #6d5dfc);
  transform: translateY(3px);
  animation: streamCursorBlink .82s steps(2, start) infinite;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-input textarea:disabled {
  color: #7b7e8c;
  cursor: wait;
}

body.is-consultant-step .flow-step[data-step="4"] .consultant-actions button:disabled {
  cursor: wait;
  opacity: .72;
}

@keyframes typingPulse {
  0%, 70%, 100% {
    opacity: .35;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

@keyframes streamCursorBlink {
  50% {
    opacity: .15;
  }
}

@keyframes reasoningScan {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@keyframes activeStepPulse {
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--consultant-accent, #6d5dfc) 14%, transparent);
  }
}

@media (max-width: 960px) {
  body.is-consultant-step .flow-step[data-step="4"] .reasoning-steps {
    grid-template-columns: 1fr;
  }

  body.is-consultant-step .flow-step[data-step="4"] .reference-trace {
    grid-template-columns: 1fr;
  }

  body.is-consultant-step .flow-step[data-step="4"] .consultant-info-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  body.is-consultant-step .flow-step[data-step="4"] .reasoning-step {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  body.is-consultant-step .flow-step[data-step="4"] .reasoning-step i {
    margin-bottom: 0;
  }
}

/* Client-facing diagnosis report */
.report-section {
  max-width: 1180px;
  margin: 0 auto;
}

.report-toolbar {
  position: fixed;
  top: 96px;
  right: max(22px, calc((100vw - 1180px) / 2 + 22px));
  z-index: 30;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.report-download-fab {
  position: relative;
  min-height: 46px;
  padding: 0 18px 0 42px;
  pointer-events: auto;
  border: 1px solid rgba(177, 25, 33, .34);
  border-radius: 999px;
  background: #c8242f;
  color: #fff;
  box-shadow: 0 18px 42px rgba(200, 36, 47, .26);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.report-download-fab::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(255, 255, 255, .75);
  border-radius: 999px;
  background: #ff5b62;
  box-shadow: 0 0 0 5px rgba(255, 91, 98, .18);
  transform: translateY(-50%);
}

.report-download-fab:hover {
  background: #ab1d27;
  transform: translateY(-1px);
  box-shadow: 0 22px 46px rgba(200, 36, 47, .32);
}

.report-download-fab:disabled {
  cursor: wait;
  opacity: .76;
  transform: none;
}

.report-download-fab:focus-visible {
  outline: 3px solid rgba(200, 36, 47, .24);
  outline-offset: 3px;
}

.report-page,
.report-panel,
.report-band {
  break-inside: avoid;
  page-break-inside: avoid;
}

.report-page {
  margin-top: 18px;
  padding: 34px;
  border: 1px solid rgba(21, 22, 39, .11);
  border-radius: 10px;
  background: #fff;
}

.report-section-head,
.panel-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.report-section-head > span,
.panel-title > small {
  min-width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(21, 22, 39, .12);
  border-radius: 6px;
  background: #f7f8fb;
  color: #34515f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.report-section-head small,
.panel-title small + h3,
.panel-title div small {
  color: #6f7280;
}

.report-section-head small {
  display: block;
  color: #6f7280;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.report-section-head h3,
.panel-title h3 {
  margin: 4px 0 0;
  color: #171829;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: 0;
}

.panel-title {
  margin-bottom: 18px;
}

.report-panel > h3 {
  display: none;
}

.executive-summary {
  display: grid;
  gap: 16px;
}

.summary-hero {
  min-height: 210px;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 24px;
  align-items: end;
  border: 1px solid rgba(21, 22, 39, .1);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(35, 56, 71, .96), rgba(22, 24, 41, .98)),
    #171829;
  color: #fff;
}

.summary-hero small,
.summary-cards span,
.profile-grid span,
.roadmap small,
.methodology-grid b,
.tier-card small {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.summary-hero strong {
  display: block;
  margin: 8px 0 12px;
  font-size: 42px;
  line-height: 1;
  letter-spacing: 0;
}

.summary-hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, .78);
  line-height: 1.75;
}

.summary-score {
  justify-self: end;
  text-align: right;
}

.summary-score b {
  display: block;
  color: #8fe3d5;
  font-size: 82px;
  line-height: .85;
  letter-spacing: 0;
}

.summary-score span {
  color: rgba(255, 255, 255, .62);
  font-weight: 800;
}

.summary-cards,
.profile-grid,
.tier-grid,
.methodology-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.summary-cards div,
.profile-grid div,
.methodology-grid div {
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(21, 22, 39, .1);
  border-radius: 8px;
  background: #fbfbfd;
}

.summary-cards span,
.profile-grid span {
  display: block;
  color: #6e7280;
}

.summary-cards b,
.profile-grid b {
  display: block;
  margin-top: 10px;
  color: #171829;
  font-size: 20px;
  line-height: 1.25;
}

.summary-cards p,
.profile-grid p,
.methodology-grid p {
  margin: 10px 0 0;
  color: #626574;
  line-height: 1.7;
}

.summary-priority {
  padding: 18px;
  border: 1px solid rgba(21, 22, 39, .1);
  border-radius: 8px;
  background: #fff;
}

.summary-priority span {
  display: block;
  color: #6e7280;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.summary-priority ol {
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  counter-reset: priority-scenario;
}

.summary-priority li {
  min-height: 72px;
  padding: 14px 14px 14px 46px;
  position: relative;
  border: 1px solid rgba(21, 22, 39, .09);
  border-radius: 8px;
  background: #fbfbfd;
  color: #252838;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

.summary-priority li::before {
  counter-increment: priority-scenario;
  content: counter(priority-scenario);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #34515f;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.profile-grid div:nth-child(4),
.profile-grid div:nth-child(5),
.profile-grid div:nth-child(6) {
  min-height: 150px;
}

.maturity-detail {
  margin: -6px 0 8px 100px;
  padding: 12px 14px;
  border-left: 3px solid rgba(52, 81, 95, .28);
  background: #f8fafb;
}

.maturity-detail b {
  display: block;
  color: #242636;
  font-size: 13px;
}

.maturity-detail p {
  margin: 7px 0 0;
  color: #666a78;
  font-size: 12px;
  line-height: 1.65;
}

.maturity-detail strong {
  margin-right: 8px;
  color: #34515f;
}

.tier-card {
  min-height: 260px;
  padding: 18px;
  border: 1px solid rgba(21, 22, 39, .1);
  border-radius: 8px;
  background: #fbfbfd;
}

.tier-card.immediate { border-top: 4px solid #10a37f; }
.tier-card.prepare { border-top: 4px solid #5b6ee1; }
.tier-card.defer { border-top: 4px solid #e28438; }
.tier-card.avoid { border-top: 4px solid #c3423f; }

.tier-card small {
  color: #6f7280;
}

.tier-card h4 {
  margin: 8px 0 14px;
  color: #171829;
  font-size: 20px;
}

.tier-card article {
  padding: 12px 0;
  border-top: 1px solid rgba(21, 22, 39, .08);
}

.tier-card b {
  display: block;
  color: #252838;
  font-size: 14px;
}

.tier-card p {
  margin: 6px 0 0;
  color: #646876;
  font-size: 12px;
  line-height: 1.65;
}

.risk-badge {
  width: fit-content;
  margin-top: 14px;
  padding: 6px 9px;
  display: inline-flex;
  border: 1px solid rgba(16, 163, 127, .26);
  border-radius: 999px;
  background: rgba(16, 163, 127, .08);
  color: #12745d;
  font-size: 12px;
  font-weight: 800;
}

.scenario-card dl div {
  grid-template-columns: 96px minmax(0, 1fr);
  padding: 7px 0;
  border-bottom: 1px solid rgba(21, 22, 39, .07);
}

.scenario-card dl div:last-child {
  border-bottom: 0;
}

.scenario-card dt {
  font-weight: 800;
}

.roadmap div {
  position: relative;
  min-height: 250px;
  background: #fff;
}

.roadmap div::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 58px;
  height: 1px;
  background: rgba(21, 22, 39, .11);
}

.roadmap h4 {
  margin: 18px 0 10px;
  color: #171829;
  font-size: 17px;
  line-height: 1.3;
}

.roadmap small {
  display: block;
  margin-top: 12px;
  color: #626574;
  line-height: 1.55;
  text-transform: none;
  letter-spacing: 0;
}

.review-checklist {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.review-checklist label {
  min-height: 86px;
  padding: 14px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(21, 22, 39, .1);
  border-radius: 8px;
  background: #fbfbfd;
}

.review-checklist input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #34515f;
}

.export-checkbox {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(52, 81, 95, .48);
  border-radius: 3px;
  color: #34515f;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.review-checklist span {
  color: #343746;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}

.methodology-grid div {
  min-height: 150px;
}

.methodology-grid b {
  display: block;
  color: #34515f;
}

.appendix-page {
  margin-bottom: 40px;
}

@media (max-width: 980px) {
  .summary-hero,
  .summary-cards,
  .profile-grid,
  .tier-grid,
  .methodology-grid,
  .review-checklist {
    grid-template-columns: 1fr;
  }

  .summary-priority ol {
    grid-template-columns: 1fr;
  }

  .summary-score {
    justify-self: start;
    text-align: left;
  }

  .maturity-detail {
    margin-left: 0;
  }
}

.report-export-stage {
  position: fixed;
  left: -200vw;
  top: 0;
  z-index: -1;
  width: 1180px;
  min-height: 100px;
  overflow: visible;
  background: #faf9f6;
  pointer-events: none;
}

.report-export-root {
  width: 1180px;
  max-width: 1180px;
  margin: 0;
  padding: 0 0 56px;
  background: #faf9f6;
}

.report-export-root .report-cover {
  margin-top: 0;
}

.decision-grid,
.pilot-brief-grid,
.path-grid,
.internal-followup-grid,
.aio-action-steps,
.matrix-legend {
  display: grid;
  gap: 12px;
}

.decision-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.decision-grid div {
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(21, 22, 39, .1);
  border-radius: 8px;
  background: #fff;
}

.decision-grid span,
.pilot-brief-head small,
.path-head small,
.internal-followup-grid span {
  display: block;
  color: #5b6ee1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.decision-grid b {
  display: block;
  margin-top: 10px;
  color: #171829;
  font-size: 20px;
  line-height: 1.25;
}

.decision-grid p {
  margin: 10px 0 0;
  color: #626574;
  line-height: 1.7;
}

.onsite-hero strong {
  font-size: 38px;
}

.pilot-brief,
.support-paths {
  padding: 22px;
  border: 1px solid rgba(21, 22, 39, .1);
  border-radius: 10px;
  background: #fbfbfd;
}

.pilot-brief-head h4,
.path-head h4 {
  margin: 7px 0 8px;
  color: #171829;
  font-size: 22px;
  line-height: 1.2;
}

.pilot-brief-head p,
.path-head p {
  max-width: 780px;
  margin: 0;
  color: #626574;
  line-height: 1.75;
}

.pilot-brief-grid,
.internal-followup-grid {
  margin-top: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.path-grid,
.aio-action-steps {
  margin-top: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pilot-brief-grid div,
.path-grid article,
.internal-followup-grid div,
.aio-action-steps article {
  padding: 16px;
  border: 1px solid rgba(21, 22, 39, .09);
  border-radius: 8px;
  background: #fff;
}

.pilot-brief-grid b,
.internal-questions b {
  display: block;
  margin-bottom: 10px;
  color: #171829;
  font-size: 14px;
}

.pilot-brief-grid ul,
.internal-questions ul {
  margin: 0;
  padding-left: 18px;
  color: #555968;
  font-size: 13px;
  line-height: 1.65;
}

.risk-note,
.internal-note,
.aio-action-note {
  margin: 16px 0 0;
  color: #626574;
  font-size: 13px;
  line-height: 1.7;
}

.path-grid h5 {
  margin: 0 0 10px;
  color: #171829;
  font-size: 18px;
}

.path-grid p {
  margin: 8px 0 0;
  color: #555968;
  font-size: 13px;
  line-height: 1.65;
}

.path-grid p b {
  margin-right: 8px;
  color: #171829;
}

.path-grid small {
  display: block;
  margin-top: 12px;
  color: #5b6ee1;
  font-size: 12px;
  line-height: 1.55;
}

.matrix-plot {
  position: relative;
  min-height: 300px;
  border-left: 1px solid #cbc8d6;
  border-bottom: 1px solid #cbc8d6;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 49.6%, #e4e1ec 49.6% 50.2%, transparent 50.2%),
    linear-gradient(0deg, transparent 49.6%, #e4e1ec 49.6% 50.2%, transparent 50.2%),
    #fbfbfd;
}

.matrix-plot::before {
  content: "业务价值";
  position: absolute;
  left: 10px;
  top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.matrix-plot::after {
  content: "实施难度";
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.matrix-plot .scene-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 6px 16px rgba(23, 32, 51, .18);
}

.matrix-plot .scene-dot.green { background: var(--green); }
.matrix-plot .scene-dot.orange { background: var(--orange); }

.matrix-plot .scene-dot span {
  position: absolute;
  inset: -2px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.matrix-legend {
  margin-top: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.matrix-legend article {
  padding: 10px 12px;
  border: 1px solid rgba(21, 22, 39, .09);
  border-radius: 8px;
  background: #fff;
}

.matrix-legend b {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.matrix-legend b span {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font-size: 10px;
}

.matrix-legend p {
  margin: 6px 0 0 26px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.report-transition {
  margin-top: 18px;
  padding: 30px;
  border: 1px solid rgba(86, 56, 239, .14);
  border-radius: 8px;
  background: linear-gradient(135deg, #fbfaff, #f7fbff);
}

.report-transition small,
.aio-action-lead strong,
.aio-action-steps small {
  color: var(--purple);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.report-transition h3 {
  margin: 8px 0 10px;
  color: #171829;
  font-size: 26px;
  line-height: 1.2;
}

.report-transition p {
  max-width: 820px;
  margin: 0;
  color: #555968;
  line-height: 1.8;
}

.aio-action-panel {
  border-color: rgba(86, 56, 239, .18);
  background: #fbfaff;
}

.aio-action-lead {
  display: grid;
  gap: 12px;
}

.aio-action-lead p {
  margin: 0;
  color: #555968;
  line-height: 1.75;
}

.aio-action-lead strong {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  background: #fff;
  color: #3b2fc9;
  letter-spacing: 0;
  text-transform: none;
}

.aio-action-steps h4 {
  margin: 8px 0 12px;
  color: #171829;
  font-size: 18px;
  line-height: 1.35;
}

.aio-action-steps p {
  margin: 10px 0 0;
  color: #555968;
  line-height: 1.7;
}

.aio-action-steps b {
  display: block;
  margin-bottom: 4px;
  color: #171829;
}

.internal-followup-panel {
  border-color: rgba(200, 36, 47, .22);
  background: #fff9fa;
}

.internal-followup-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.internal-followup-grid div {
  background: #fff;
}

.internal-followup-grid p {
  margin: 10px 0 0;
  color: #343746;
  line-height: 1.7;
}

.internal-questions {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(200, 36, 47, .16);
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 980px) {
  .decision-grid,
  .pilot-brief-grid,
  .path-grid,
  .aio-action-steps,
  .internal-followup-grid,
  .matrix-legend {
    grid-template-columns: 1fr;
  }

  .maturity-detail {
    margin-left: 0;
  }
}

@media (max-width: 700px) {
  .report-toolbar {
    top: 82px;
    right: 14px;
  }

  .report-download-fab {
    min-height: 42px;
    padding-right: 14px;
    padding-left: 36px;
    font-size: 13px;
  }

  .report-download-fab::before {
    left: 14px;
    width: 9px;
    height: 9px;
  }

  .report-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .report-page,
  .report-panel,
  .report-band {
    padding: 20px;
  }

  .report-section-head h3,
  .panel-title h3 {
    font-size: 22px;
  }

  .summary-hero {
    padding: 22px;
  }

  .summary-hero strong {
    font-size: 34px;
  }

  .summary-score b {
    font-size: 64px;
  }
}

/* Admin invites */
body.admin-page {
  min-height: 100vh;
  background: #f5f7fb;
  color: var(--ink);
  overflow: auto;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.admin-hero {
  min-height: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0 24px;
  border-bottom: 1px solid rgba(21, 22, 39, .1);
}

.admin-hero small,
.admin-panel-head small {
  color: var(--purple);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.admin-hero h1 {
  margin: 8px 0 8px;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: 0;
}

.admin-hero p {
  max-width: 620px;
  margin: 0;
  color: #5f6270;
  font-size: 16px;
  line-height: 1.75;
}

.admin-link {
  flex: 0 0 auto;
  color: var(--purple);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.admin-panel {
  padding: 18px;
  border: 1px solid rgba(21, 22, 39, .1);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 48px rgba(70, 76, 112, .08);
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-panel-head > span {
  font-size: 18px;
  font-weight: 800;
}

.admin-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
}

.admin-code-result {
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(30, 184, 199, .34);
  background: rgba(112, 220, 229, .12);
}

.admin-code-result span {
  display: block;
  color: #5f6270;
  font-size: 12px;
  font-weight: 700;
}

.admin-code-result strong {
  display: block;
  margin: 8px 0;
  font-size: 20px;
  letter-spacing: .04em;
  word-break: break-all;
}

.admin-code-result p {
  margin: 0;
  color: #5f6270;
  font-size: 13px;
}

.admin-list-panel {
  min-width: 0;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(21, 22, 39, .08);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: #777b89;
  font-size: 12px;
  font-weight: 800;
}

.admin-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(21, 22, 39, .08);
  color: #4b4d58;
  font-size: 12px;
  font-weight: 800;
}

.admin-status.unused {
  background: rgba(112, 220, 229, .18);
  color: #047481;
}

.admin-status.used {
  background: rgba(111, 98, 255, .14);
  color: var(--purple);
}

.admin-status.void {
  background: rgba(113, 115, 129, .14);
  color: #717381;
}

body.admin-page .toast {
  position: fixed;
}

@media (max-width: 860px) {
  .admin-hero,
  .admin-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-link {
    justify-self: start;
  }
}

@media print {
  @page {
    size: A4;
    margin: 14mm;
  }

  html,
  body {
    background: #fff !important;
    color: #111 !important;
  }

  .site-header,
  .diagnosis-hero,
  .diagnosis-flow,
  .report-toolbar,
  .toast,
  .login-screen,
  .no-print {
    display: none !important;
  }

  main,
  .report-section {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .report-cover {
    min-height: 240mm;
    padding: 22mm 18mm;
    page-break-after: always;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .report-cover h2 {
    font-size: 42pt;
    letter-spacing: 0;
  }

  .report-page,
  .report-panel,
  .report-band {
    margin: 0 0 8mm !important;
    padding: 8mm !important;
    border: 1px solid #d9dce3 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-grid,
  .summary-cards,
  .profile-grid,
  .tier-grid,
  .roadmap,
  .materials-grid,
  .methodology-grid,
  .review-checklist {
    gap: 4mm !important;
  }

  .summary-hero {
    min-height: auto;
    padding: 8mm;
    background: #202333 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .scenario-card,
  .tier-card,
  .roadmap div,
  .materials-grid div,
  .interview-notes article,
  .summary-cards div,
  .profile-grid div,
  .methodology-grid div,
  .review-checklist label {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
  }

  .matrix {
    min-height: 90mm;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  button {
    color: inherit;
  }
}

@page {
  size: A4;
  margin: 10mm;
}

@media print {
  html,
  body {
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    background: #faf9f6 !important;
    color: var(--ink) !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.is-reporting,
  body.is-printing-report {
    overflow: visible !important;
  }

  .site-header,
  .login-screen,
  .diagnosis-hero,
  .diagnosis-flow,
  .flow-actions,
  .report-toolbar,
  .toast,
  .no-print {
    display: none !important;
  }

  main,
  body.is-reporting main,
  .report-section,
  body.is-reporting .report-section {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #faf9f6 !important;
  }

  .report-cover {
    min-height: 132mm !important;
    margin: 0 0 8mm !important;
    padding: 20mm 16mm !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    background:
      linear-gradient(135deg, rgba(35, 56, 71, .98), rgba(54, 30, 146, .98) 54%, rgba(158, 93, 190, .96)),
      #2c236f !important;
    color: #fff !important;
    box-shadow: none !important;
    break-after: avoid;
    page-break-after: auto;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-cover .eyebrow {
    color: #b9a8ff !important;
  }

  .report-cover h2 {
    max-width: 100% !important;
    margin: 16mm 0 8mm !important;
    color: #fff !important;
    font-size: 42pt !important;
    line-height: .98 !important;
    letter-spacing: 0 !important;
  }

  .report-cover-foot {
    color: rgba(255, 255, 255, .76) !important;
  }

  .report-cover-foot b {
    color: #70dce5 !important;
    font-size: 44pt !important;
  }

  .report-page,
  .report-panel,
  .report-band,
  .report-transition {
    margin: 0 0 7mm !important;
    padding: 8mm !important;
    border: 1px solid rgba(21, 22, 39, .11) !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .report-page,
  .report-band,
  .report-transition {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-panel {
    break-inside: auto;
    page-break-inside: auto;
  }

  .report-grid {
    display: block !important;
    margin-top: 0 !important;
  }

  .report-grid .report-panel {
    margin: 0 0 7mm !important;
  }

  .report-section-head,
  .panel-title,
  .pilot-brief-head,
  .path-head {
    break-after: avoid;
    page-break-after: avoid;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-section-head h3,
  .panel-title h3,
  .report-transition h3 {
    color: #171829 !important;
    font-size: 22pt !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
  }

  .summary-hero {
    min-height: auto !important;
    padding: 8mm !important;
    grid-template-columns: minmax(0, 1fr) 34mm !important;
    border-radius: 8px !important;
    background:
      linear-gradient(135deg, rgba(35, 56, 71, .96), rgba(22, 24, 41, .98)),
      #171829 !important;
    color: #fff !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .summary-hero strong {
    color: #fff !important;
    font-size: 30pt !important;
    line-height: 1.05 !important;
  }

  .summary-hero p {
    color: rgba(255, 255, 255, .78) !important;
  }

  .summary-score b {
    color: #8fe3d5 !important;
    font-size: 48pt !important;
  }

  .summary-cards,
  .profile-grid,
  .decision-grid,
  .tier-grid,
  .materials-grid,
  .methodology-grid,
  .review-checklist,
  .path-grid,
  .aio-action-steps,
  .matrix-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4mm !important;
  }

  .pilot-brief-grid,
  .internal-followup-grid,
  .roadmap {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4mm !important;
  }

  .stack-summary {
    grid-template-columns: 1fr !important;
    gap: 4mm !important;
  }

  .decision-grid div,
  .summary-cards div,
  .profile-grid div,
  .tier-card,
  .pilot-brief,
  .support-paths,
  .pilot-brief-grid div,
  .path-grid article,
  .aio-action-steps article,
  .roadmap div,
  .materials-grid div,
  .interview-notes article,
  .methodology-grid div,
  .review-checklist label,
  .matrix-legend article {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
  }

  .scenario-card {
    display: block !important;
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
  }

  .scenario-card > div {
    margin-bottom: 4mm !important;
  }

  .matrix,
  .matrix-plot {
    min-height: 82mm !important;
    break-inside: avoid;
    page-break-inside: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .report-transition,
  .aio-action-panel {
    background: #fbfaff !important;
  }

  .score-row,
  .maturity-detail,
  dl div,
  p,
  li {
    orphans: 3;
    widows: 3;
  }

  button {
    color: inherit;
  }
}
