/* Interactive product labs + portable one-pager */
.review-lab,
.web-harness,
.case-linker,
.profile-export-bar,
.profile-sheet {
  margin-top: 18px;
}
.review-lab,
.web-harness {
  overflow: hidden;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border-color));
  background:
    radial-gradient(circle at 88% 4%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 30%),
    var(--bg-card);
}
.review-lab .primary-btn,
.web-harness .primary-btn {
  color: #fff !important;
}
.review-lab-toolbar,
.harness-intro,
.case-linker-head,
.index-lens-head,
.profile-export-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.review-lab-toolbar,
.harness-intro {
  padding: 24px 24px 18px;
}
.review-lab-toolbar h3,
.harness-intro h3,
.case-linker h3,
.index-lens h3 {
  margin: 5px 0 7px;
  font-size: 1.18rem;
}
.review-lab-toolbar p,
.harness-intro p,
.case-linker p,
.index-lens p {
  margin: 0;
  color: var(--text-secondary);
  max-width: 720px;
}
.review-controls,
.harness-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 24px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--bg-tertiary) 82%, transparent);
}
.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.segmented-control button,
.index-lens-head button,
.review-actions button,
.profile-export-bar button {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 9px 12px;
  font: inherit;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}
.segmented-control button:hover,
.index-lens-head button:hover,
.review-actions button:hover,
.profile-export-bar button:hover {
  color: var(--text-primary);
  border-color: var(--brand);
  transform: translateY(-1px);
}
.segmented-control button.active {
  color: #fff;
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 78%, #17213a);
}
.segmented-control.compact button {
  padding: 7px 10px;
  font-size: .68rem;
}
.review-workbench,
.harness-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(310px, .82fr);
  min-height: 430px;
}
.review-editor,
.harness-editor {
  min-width: 0;
  border-right: 1px solid var(--border-color);
  background: #0c1019;
}
.review-window-head,
.harness-window-head {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid #252d3b;
  color: #aeb8c8;
  font-size: .69rem;
}
.review-window-head > div,
.harness-window-head > div {
  display: flex;
  gap: 6px;
}
.review-window-head i,
.harness-window-head i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #394458;
}
.review-window-head i:first-child,
.harness-window-head i:first-child { background: #ff6b68; }
.review-window-head i:nth-child(2),
.harness-window-head i:nth-child(2) { background: #f3c857; }
.review-window-head i:nth-child(3),
.harness-window-head i:nth-child(3) { background: #51d68a; }
.review-window-head b,
.harness-window-head b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-code,
.harness-code {
  overflow: auto;
  padding: 16px 0 28px;
  color: #d8e1f0;
  font: 500 .78rem/1.72 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.review-code-line,
.harness-code-line {
  display: grid;
  grid-template-columns: 42px 1fr;
  min-width: max-content;
  padding-right: 16px;
}
.review-code-line:hover,
.harness-code-line:hover {
  background: rgba(255,255,255,.04);
}
.review-code-line > span,
.harness-code-line > span {
  padding-right: 12px;
  color: #596579;
  text-align: right;
  user-select: none;
}
.review-code-line code,
.harness-code-line code {
  white-space: pre;
  color: inherit;
}
.review-console,
.harness-runtime {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  background: color-mix(in srgb, var(--bg-secondary) 93%, #0b0f18);
}
.review-console-head,
.harness-runtime-head,
.harness-result-head {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.review-console-head span,
.harness-runtime-head span,
.harness-result-head span,
.review-result > span,
.harness-objective > span,
.basis-list > span {
  color: var(--brand-light);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .12em;
}
.review-console-head b,
.harness-runtime-head b {
  color: var(--text-primary);
  font-size: .78rem;
}
.review-stage-list,
.harness-stage-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}
.review-stage,
.harness-stage {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: .73rem;
  transition: all .25s ease;
}
.review-stage i,
.harness-stage i {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  font-style: normal;
  font-size: .62rem;
}
.review-stage.active,
.harness-stage.active {
  color: var(--text-primary);
  border-color: var(--brand);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 24%, transparent), 0 0 22px color-mix(in srgb, var(--brand) 12%, transparent);
}
.review-stage.active i,
.harness-stage.active i {
  background: var(--brand);
  color: #fff;
  animation: cellPulse 1s ease-in-out infinite;
}
.review-stage.complete,
.harness-stage.complete {
  color: var(--text-secondary);
  border-color: color-mix(in srgb, var(--accent-green) 42%, var(--border-color));
}
.review-stage.complete i,
.harness-stage.complete i {
  background: color-mix(in srgb, var(--accent-green) 24%, transparent);
  color: var(--accent-green);
}
.review-waiting,
.harness-waiting {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  margin-top: auto;
  color: var(--text-muted);
  font-size: .72rem;
}
.review-pulse,
.harness-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 50%, transparent);
  animation: tracePulse 1.7s ease-out infinite;
}
.review-result,
.harness-result {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  animation: fadeInUp .32s ease both;
}
.review-result.finding { border-color: color-mix(in srgb, var(--accent-yellow) 46%, var(--border-color)); }
.review-result.resolved { border-color: color-mix(in srgb, var(--accent-green) 48%, var(--border-color)); }
.review-result.limited { border-color: color-mix(in srgb, var(--text-muted) 35%, var(--border-color)); }
.review-result h4 {
  margin: 7px 0 9px;
  line-height: 1.35;
}
.review-result p,
.harness-result p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: .72rem;
  line-height: 1.55;
}
.evidence-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 12px 0;
}
.evidence-path span {
  padding: 5px 7px;
  border-radius: 6px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: .62rem;
}
.evidence-path i { color: var(--brand-light); font-style: normal; }
.review-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.review-actions button {
  border-color: var(--brand);
  color: #fff;
  background: color-mix(in srgb, var(--brand) 72%, #101827);
}
.review-actions small { color: var(--text-muted); }
.review-boundary,
.index-boundary {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  padding: 15px 24px;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: .72rem;
  line-height: 1.5;
}
.review-boundary b,
.index-boundary b { color: var(--text-primary); }
.case-linker {
  padding: 20px 22px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 8%, var(--bg-card)), var(--bg-card));
}
.case-linker-body {
  display: grid;
  grid-template-columns: minmax(150px, .55fr) minmax(280px, 1.6fr) auto;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}
.case-linker-body > div { display: flex; flex-direction: column; gap: 4px; }
.case-linker-body strong {
  color: var(--text-primary);
  font-size: 1.15rem;
}
.case-linker-body span,
.case-linker-body a {
  color: var(--brand-light);
  font-size: .69rem;
  font-weight: 700;
}
.case-linker-body p { font-size: .76rem; }
.case-linker-body a { text-decoration: none; white-space: nowrap; }
.harness-objective {
  display: grid;
  grid-template-columns: 86px 1fr 210px;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}
.harness-objective p {
  margin: 0;
  color: var(--text-primary);
  font-size: .78rem;
  line-height: 1.5;
}
.harness-objective > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.harness-objective small { color: var(--text-muted); }
.harness-objective b { color: var(--brand-light); font-size: .68rem; }
.harness-result pre {
  max-height: 210px;
  overflow: auto;
  margin: 10px 0;
  padding: 12px;
  border-radius: 8px;
  background: #0b1018;
  color: #c9d7ea;
  font: 500 .68rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
}
.basis-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.basis-list a {
  color: var(--brand-light);
  font-size: .69rem;
  font-weight: 700;
  text-decoration: none;
}
.basis-list small { color: var(--text-muted); line-height: 1.45; }
.harness-matrix {
  margin: 20px 24px 24px;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}
.harness-matrix-head,
.harness-matrix-row {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  min-width: 720px;
}
.harness-matrix-head span,
.harness-matrix-row span {
  padding: 10px;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  font-size: .67rem;
  line-height: 1.35;
}
.harness-matrix-head span {
  color: var(--brand-light);
  background: var(--bg-tertiary);
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.harness-matrix-row span { color: var(--text-secondary); }
.harness-matrix-row .label { color: var(--text-primary); font-weight: 700; }
.harness-matrix-row:last-child span { border-bottom: 0; }
.harness-matrix-head span:last-child,
.harness-matrix-row span:last-child { border-right: 0; }
.index-lens {
  margin: 0 24px 24px;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
}
.index-lens.open { border-color: color-mix(in srgb, var(--brand) 42%, var(--border-color)); }
.index-network {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 190px;
  margin-top: 18px;
  overflow: hidden;
}
.index-source,
.index-core {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-card);
  text-align: center;
}
.index-core {
  min-height: 108px;
  border-color: var(--brand);
  box-shadow: 0 0 26px color-mix(in srgb, var(--brand) 16%, transparent);
}
.index-source small,
.index-core small { margin-top: 5px; color: var(--text-muted); font-size: .6rem; }
.index-network .beam {
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  animation: beamMove 2.4s linear infinite;
}
.index-network .b2 { animation-delay: -.6s; }
.index-network .b3 { animation-delay: -1.2s; }
.index-network .b4 { animation-delay: -1.8s; }
.index-boundary {
  grid-template-columns: 180px 1fr auto;
  padding: 15px 0 0;
  margin-top: 10px;
}
.index-boundary a { color: var(--brand-light); text-decoration: none; font-size: .7rem; font-weight: 700; }
.profile-section { scroll-margin-top: 28px; }
.profile-export-bar {
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-card);
}
.profile-export-bar > div { display: flex; align-items: center; gap: 9px; }
.profile-export-bar > div:first-child { align-items: flex-start; flex-direction: column; gap: 2px; }
.profile-export-bar span { color: var(--text-muted); font-size: .68rem; }
.profile-export-bar .primary-btn { color: #fff; border-color: var(--brand); background: var(--brand); }
.profile-sheet {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(225px, .86fr);
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #f6f8fc;
  color: #172033;
}
.profile-main { padding: 30px 30px 28px; }
.profile-rail {
  padding: 30px 24px;
  border-left: 1px solid #dce2eb;
  background: #eef2f8;
}
.profile-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.25rem;
}
.profile-logo .brand-mark,
.profile-logo .rabbit-mark { color: var(--brand); }
.profile-deck {
  margin: 9px 0 13px;
  color: #26344c;
  font-size: 1.08rem;
  font-weight: 700;
}
.profile-summary {
  max-width: 760px;
  margin: 0 0 20px;
  color: #46536a;
  font-size: .82rem;
  line-height: 1.6;
}
.profile-block {
  padding: 14px 0;
  border-top: 1px solid #dce2eb;
}
.profile-block h3 {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.profile-block ul { margin: 0; padding-left: 17px; }
.profile-block li {
  margin: 5px 0;
  color: #354258;
  font-size: .75rem;
  line-height: 1.48;
}
.profile-rail > span {
  color: var(--brand);
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .12em;
}
.profile-rail dl { margin: 14px 0 20px; }
.profile-rail dt {
  margin-top: 12px;
  color: #718096;
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.profile-rail dd {
  margin: 3px 0 0;
  color: #1f2a3e;
  font-size: .78rem;
  font-weight: 700;
}
.profile-source-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 16px;
  border-top: 1px solid #d4dce7;
}
.profile-source-list b { margin-bottom: 3px; font-size: .69rem; }
.profile-source-list a { color: #4158bd; font-size: .66rem; text-decoration: none; }
@keyframes tracePulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 45%, transparent); }
  100% { box-shadow: 0 0 0 12px transparent; }
}
@keyframes beamMove {
  0% { transform: translateX(-45%); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateX(45%); opacity: 0; }
}
@media (max-width: 1040px) {
  .review-workbench,
  .harness-workbench { grid-template-columns: 1fr; }
  .review-editor,
  .harness-editor { border-right: 0; border-bottom: 1px solid var(--border-color); }
  .case-linker-body { grid-template-columns: 1fr; gap: 10px; }
  .harness-objective { grid-template-columns: 1fr; }
  .index-network { grid-template-columns: 1fr 1fr; }
  .index-core { grid-column: 1 / -1; grid-row: 1; }
  .index-network .beam { display: none; }
}
@media (max-width: 720px) {
  .review-lab-toolbar,
  .harness-intro,
  .case-linker-head,
  .index-lens-head,
  .profile-export-bar,
  .review-controls,
  .harness-controls { flex-direction: column; }
  .review-lab-toolbar,
  .harness-intro,
  .review-controls,
  .harness-controls { padding-left: 16px; padding-right: 16px; }
  .review-boundary,
  .index-boundary { grid-template-columns: 1fr; }
  .harness-matrix { margin-left: 16px; margin-right: 16px; }
  .index-lens { margin-left: 16px; margin-right: 16px; }
  .profile-sheet { grid-template-columns: 1fr; }
  .profile-rail { border-left: 0; border-top: 1px solid #dce2eb; }
  .profile-main,
  .profile-rail { padding: 22px 18px; }
}
@media print {
  body.print-profile { background: #fff !important; }
  .print-profile .sidebar,
  .print-profile .right-panel,
  .print-profile .mobile-nav-toggle,
  .print-profile .mobile-overlay,
  .print-profile .page > * { display: none !important; }
  .print-profile .main-content {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .print-profile .page,
  .print-profile .profile-section {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .print-profile .profile-section > .section-heading,
  .print-profile .profile-export-bar { display: none !important; }
  .print-profile .profile-sheet {
    display: grid !important;
    grid-template-columns: 68% 32% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .print-profile .profile-main { padding: .35in .25in .3in .35in !important; }
  .print-profile .profile-rail { padding: .35in .28in !important; }
  @page { size: letter; margin: .35in; }
}
