:root {
  --background: #f7f7f8;
  --surface: #ffffff;
  --text: #111318;
  --muted: #646872;
  --border: #d9dce2;
  --border-strong: #a8adb7;
  --primary: #002fa7;
  --primary-hover: #00247f;
  --danger: #b42318;
  --danger-soft: #fff2f0;
  --success: #157347;
  --success-soft: #edf8f2;
  --warning: #8a5a00;
  --warning-soft: #fff8e6;
  --font: "Helvetica Neue", Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--primary);
}

.site-header {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 32px;
}

.brand {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.phase-label,
.header-link {
  color: var(--muted);
  font-size: 14px;
}

.header-link:hover {
  color: var(--primary);
}

.header-nav {
  display: flex;
  gap: 24px;
}

.page-shell {
  margin: 0 auto;
  max-width: 1120px;
  padding: 48px 32px 72px;
}

.page-shell-narrow {
  max-width: 900px;
}

.page-shell-report {
  max-width: 1272px;
}

.page-heading {
  border-left: 6px solid var(--primary);
  margin-bottom: 32px;
  padding-left: 18px;
}

.page-heading-report {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.page-heading h1 {
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 0 10px;
}

.page-heading p {
  color: var(--muted);
  margin: 0;
}

.report-body img {
  border: 1px solid var(--border);
  display: block;
  height: auto;
  margin: 24px auto;
  max-width: 100%;
}

/* Fundamental report fragments are served without their export-only <style> tag. */
.report-body .report-shell {
  color: #0b172a;
  font: 15px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.report-body .report-hero {
  align-items: flex-start;
  background: #fff;
  color: #202124;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 44px;
}

.report-body .eyebrow {
  color: #9edff1;
  font-size: 11px;
  letter-spacing: .14em;
  margin: 0;
}

.report-body .report-hero h1 {
  font-size: 36px;
  letter-spacing: -.04em;
  margin: 8px 0;
}

.report-body .hero-tag {
  border: 1px solid #6e9fc9;
  height: max-content;
  padding: 12px 16px;
  text-align: right;
}

.report-body .hero-tag span,
.report-body .kpi span,
.report-body .kpi small,
.report-body .metric-table span,
.report-body .advice p,
.report-body footer {
  color: #637287;
}

.report-body .hero-tag span { color: #bdd1e5; font-size: 12px; }
.report-body .summary-grid,
.report-body .chart-grid { display: grid; gap: 18px; grid-template-columns: 1.5fr 1fr; margin: 18px 0; }
.report-body .summary-grid article,
.report-body .summary-grid aside,
.report-body .section,
.report-body .chart-card,
.report-body .evidence { background: #fff; border: 1px solid #dbe3ed; padding: 24px; }
.report-body .summary-grid h2,
.report-body .chart-card h2 { font-size: 16px; margin: 0 0 12px; }
.report-body .mainline { border-left: 3px solid #4cc9f0; padding-left: 12px; }
.report-body .kpi-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); margin: 18px 0; }
.report-body .kpi { background: #fff; border-top: 3px solid #112b4d; padding: 16px; }
.report-body .kpi span,
.report-body .kpi small { display: block; font-size: 12px; }
.report-body .kpi strong { display: block; font-size: 22px; margin: 4px 0; overflow-wrap: anywhere; }
.report-body .section { margin: 18px 0; }
.report-body .section-heading { align-items: center; border-bottom: 1px solid #dbe3ed; display: flex; gap: 10px; margin-bottom: 14px; padding-bottom: 10px; }
.report-body .section-heading span { background: #112b4d; color: #fff; font-size: 11px; padding: 2px 7px; }
.report-body .section-heading h2 { font-size: 18px; margin: 0; }
.report-body .chart-card canvas { display: block; height: 260px; width: 100%; }
.report-body .metric-table { border-top: 1px solid #dbe3ed; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 16px; }
.report-body .metric-table span { border-right: 1px solid #dbe3ed; font-size: 12px; padding: 12px 8px; }
.report-body .metric-table b { color: #0b172a; display: block; font-size: 17px; }
.report-body .risk { border-left: 3px solid #d97706; }
.report-body .advice { border-left: 3px solid #2563eb; }
.report-body .evidence summary { cursor: pointer; font-weight: 650; }
.report-body footer { font-size: 12px; padding: 16px 4px; }

@media (max-width: 760px) {
  .report-body .report-hero,
  .report-body .summary-grid,
  .report-body .chart-grid { display: block; }
  .report-body .hero-tag { margin-top: 20px; text-align: left; }
  .report-body .kpi-grid,
  .report-body .metric-table { grid-template-columns: repeat(2, 1fr); }
  .report-body .report-hero { padding: 28px; }
  .report-body .section,
  .report-body .summary-grid article,
  .report-body .summary-grid aside,
  .report-body .chart-card,
  .report-body .evidence { border-left: 0; border-right: 0; }
}

.technical-stages {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.technical-stages li {
  border-top: 3px solid var(--border-strong);
  color: var(--muted);
  font-size: 13px;
  padding-top: 8px;
}

.technical-stages li[data-state="RUNNING"] {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}

.technical-stages li[data-state="COMPLETED"] {
  border-color: var(--success);
  color: var(--success);
}

.technical-stages li[data-state="FAILED"],
.technical-stages li[data-state="CANCELLED"] {
  border-color: var(--danger);
  color: var(--danger);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  padding: 28px;
}

.panel h2 {
  font-size: 20px;
  margin: 0 0 24px;
}

.form-panel {
  border-top: 3px solid var(--primary);
}

.form-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field span {
  font-size: 14px;
  font-weight: 600;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text);
  min-height: 44px;
  padding: 9px 12px;
  width: 100%;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 650;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-primary {
  background: var(--primary);
  color: #ffffff;
}

.button-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.button-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.button-secondary:hover:not(:disabled) {
  background: var(--background);
}

.button-danger {
  background: var(--surface);
  border-color: var(--danger);
  color: var(--danger);
}

.button-danger:hover:not(:disabled) {
  background: var(--danger-soft);
}

.section-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-header h2 {
  margin: 0;
}

.section-note {
  color: var(--muted);
  font-size: 13px;
}

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

table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 13px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

tbody tr:hover {
  background: var(--background);
}

.execution-table {
  table-layout: fixed;
}

.execution-table th:nth-child(1),
.execution-table td:nth-child(1) {
  width: 21%;
}

.execution-table th:nth-child(2),
.execution-table td:nth-child(2) {
  width: 28%;
}

.execution-table th:nth-child(3),
.execution-table td:nth-child(3),
.execution-table th:nth-child(4),
.execution-table td:nth-child(4) {
  width: 12%;
}

.execution-table td {
  overflow-wrap: anywhere;
}

.execution-profile {
  font-size: 12px;
}

.empty-state {
  color: var(--muted);
  text-align: center;
}

.notice {
  border: 1px solid currentColor;
  border-radius: 6px;
  margin: 16px 0;
  padding: 12px 14px;
}

.notice-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-badge {
  background: var(--warning-soft);
  border: 1px solid currentColor;
  border-radius: 6px;
  color: var(--warning);
  display: inline-block;
  font-size: 13px;
  font-weight: 650;
  padding: 4px 9px;
}

.status-badge.is-success {
  background: var(--success-soft);
  color: var(--success);
}

.status-badge.is-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.detail-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 28px;
}

.detail-grid div {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.detail-grid dt {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.detail-grid dd {
  font-weight: 600;
  margin: 0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.progress-track {
  background: #e7e8ec;
  height: 10px;
  overflow: hidden;
}

.progress-bar {
  background: var(--primary);
  height: 100%;
  transition: width 180ms ease;
  width: 0;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.event-ledger {
  counter-reset: event;
  list-style: none;
  margin: 0;
  padding: 0;
}

.event-ledger li:not(.empty-state) {
  border-top: 1px solid var(--border);
  counter-increment: event;
  display: grid;
  gap: 6px 18px;
  grid-template-columns: 42px 1fr auto;
  padding: 16px 0;
}

.event-ledger li:not(.empty-state)::before {
  color: var(--primary);
  content: counter(event, decimal-leading-zero);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  grid-row: 1 / 3;
}

.event-stage {
  font-weight: 650;
}

.event-message,
.event-time {
  color: var(--muted);
  font-size: 14px;
}

.event-time {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.report-body {
  padding: clamp(24px, 6vw, 64px);
}

.report-body h1 {
  border-bottom: 2px solid var(--primary);
  font-size: 34px;
  margin: 0 0 32px;
  padding-bottom: 16px;
}

.report-body h2 {
  border-top: 1px solid var(--border);
  font-size: 22px;
  margin: 36px 0 16px;
  padding-top: 24px;
}

.report-body li,
.report-body p {
  line-height: 1.75;
}

.report-body code {
  background: var(--background);
  border: 1px solid var(--border);
  padding: 2px 4px;
}

[hidden] {
  display: none !important;
}

/* Institutional research report fragments mirror the standalone HTML. */
.page-shell-report .report-body { background: transparent; border: 0; padding: 0; }
.report-body .report-shell,
.report-body .technical-report-shell { max-width: 1160px; margin: 0 auto; padding: 48px 56px 80px; background: #fff; color: #202124; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 15.5px; line-height: 1.8; font-variant-numeric: tabular-nums; }
.report-body .report-hero,
.report-body .technical-hero { align-items: end; background: #fff; border: 0; border-bottom: 1px solid #D9DDE3; color: #202124; display: grid; grid-template-columns: 1fr auto; gap: 28px; padding: 0 0 22px; }
.report-body .eyebrow { color: #163A5F; font-size: 12px; font-weight: 600; letter-spacing: .08em; margin: 0 0 5px; }
.report-body .report-hero h1,
.report-body .technical-hero h1 { color: #202124; font-family: inherit; font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin: 0 0 8px; }
.report-body .hero-tag,
.report-body .technical-hero aside { align-self: start; border: 0; border-left: 1px solid #D9DDE3; color: #666B73; font-size: 12px; padding: 0 0 0 18px; text-align: left; }
.report-body .summary-grid { background: #fff; border: 0; border-bottom: 1px solid #D9DDE3; display: grid; gap: 32px; grid-template-columns: minmax(0,1.7fr) minmax(250px,1fr); margin: 40px 0 32px; padding-bottom: 32px; }
.report-body .summary-grid article,.report-body .summary-grid aside { background: #fff; border: 0; padding: 0; }
.report-body .summary-grid aside { border-left: 1px solid #D9DDE3; padding-left: 28px; }
.report-body .summary-grid h2 { border-bottom: 2px solid #163A5F; font-size: 19px; font-weight: 700; margin: 0 0 12px; padding-bottom: 8px; }
.report-body .mainline,.report-body .section-claim { background: #F5F7F9; border: 0; border-left: 4px solid #163A5F; color: #202124; font-family: inherit; font-size: 16px; font-weight: 600; margin: 16px 0 0; padding: 14px 18px; }
.report-body .kpi-grid { background: #fff; border: 0; border-bottom: 1px solid #D9DDE3; border-top: 1px solid #D9DDE3; display: grid; gap: 0; grid-template-columns: repeat(4,1fr); margin: 0 0 48px; }
.report-body .kpi { background: #fff; border: 0; border-right: 1px solid #D9DDE3; min-height: 92px; padding: 14px 16px; }.report-body .kpi:last-child{border-right:0}
.report-body .kpi strong { color: #202124; font-family: inherit; font-size: 20px; font-variant-numeric: tabular-nums; }
.report-body .thematic-section,.report-body .section { background: #fff; border: 0; margin: 52px 0 0; padding: 0; }
.report-body .section-heading { align-items: baseline; border-bottom: 2px solid #163A5F; display: grid; gap: 12px; grid-template-columns: 44px 1fr; margin-bottom: 20px; padding-bottom: 10px; }
.report-body .section-heading span { background: transparent; color: #8A9099; font-size: 12px; font-weight: 600; padding: 0; }
.report-body .section-heading h2 { color: #202124; font-family: inherit; font-size: 25px; font-weight: 700; }
.report-body .observation,.report-body .chart-notes,.report-body .visual-empty { background: #F5F7F9; border: 0; border-left: 4px solid #163A5F; margin-top: 20px; padding: 14px 18px; }
.report-body .chart-card { background: #fff; border: 0; border-bottom: 1px solid #D9DDE3; margin: 32px 0 44px; padding: 0 0 20px; }
.report-body .chart-card h2 { color: #202124; font-family: inherit; font-size: 14px; font-weight: 600; margin: 0; }
.report-body .chart-kicker { color: #8A9099; font-size: 11px; font-weight: 400; letter-spacing: 0; margin: 0; text-transform: none; }
.report-body .chart-card canvas { display: block; height: 360px; width: 100%; }
.report-body .chart-unit,.report-body .chart-explanation,.report-body .chart-sources,.report-body .chart-source { color: #666B73; font-size: 11px; }
.report-body .metric-table { background: #F8F9FA; border: 0; border-bottom: 1px solid #D9DDE3; border-top: 1px solid #D9DDE3; display: grid; grid-template-columns: repeat(4,1fr); }
.report-body .metric-table span { border-right: 1px solid #D9DDE3; font-size: 12px; padding: 10px 12px; }.report-body .metric-table span:last-child{border-right:0}
.report-body .metric-table b { color: #202124; font-size: 18px; font-variant-numeric: tabular-nums; text-align: right; }
.report-body .technical-report-shell .chart-grid { display: block; margin: 44px 0 52px; }
.report-body .technical-copy { background: #fff; border: 0; margin-top: 0; padding: 0; }
.report-body .technical-copy h2 { border: 0; border-bottom: 2px solid #163A5F; color: #202124; font-family: inherit; font-size: 25px; font-weight: 700; margin: 52px 0 20px; padding: 0 0 10px; }
.report-body table { border-collapse: collapse; font-size: 13px; width: 100%; }.report-body th{background:#F1F3F5;font-weight:600}.report-body th,.report-body td{border-bottom:1px solid #D9DDE3;padding:8px 10px}

@media (max-width:760px) {.report-body .report-shell,.report-body .technical-report-shell{padding:28px 18px 48px}.report-body .report-hero,.report-body .technical-hero,.report-body .summary-grid{display:block}.report-body .hero-tag,.report-body .technical-hero aside{border-left:0;border-top:1px solid #D9DDE3;margin-top:16px;padding:10px 0 0}.report-body .summary-grid aside{border-left:0;border-top:1px solid #D9DDE3;margin-top:22px;padding:20px 0 0}.report-body .kpi-grid,.report-body .metric-table{grid-template-columns:repeat(2,1fr)}.report-body .chart-card canvas{height:320px}}

@media (max-width: 700px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 16px 20px;
  }

  .page-shell {
    padding: 32px 16px 56px;
  }

  .page-heading-report {
    align-items: stretch;
    flex-direction: column;
  }

  .panel {
    padding: 20px;
  }

  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .event-ledger li:not(.empty-state) {
    grid-template-columns: 36px 1fr;
  }

  .event-time {
    grid-column: 2;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; }
  .site-header,
  .page-heading-report,
  .chart-tooltip { display: none !important; }
  .page-shell-report { max-width: none; padding: 0; }
  .page-shell-report .report-body { margin: 0; }
  .report-body .report-shell,
  .report-body .technical-report-shell { max-width: none; padding: 0; }
  .report-body .thematic-section,
  .report-body .section,
  .report-body .chart-card,
  .report-body .metric-table,
  .report-body table,
  .report-body .observation { break-inside: avoid; page-break-inside: avoid; }
  .report-body h2,
  .report-body h3,
  .report-body .section-heading { break-after: avoid; page-break-after: avoid; }
  .report-body .chart-card canvas { height: 320px; }
  .report-body a { color: #202124; text-decoration: none; }
}

/* Self-contained report fragments use the same Institutional Vision system as exports. */
.page-shell-report {
  max-width: 1240px;
  background:
    radial-gradient(circle at 12% 5%, rgba(10, 132, 255, .13), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(123, 97, 255, .11), transparent 28%),
    linear-gradient(180deg, #F5F8FC 0%, #EDF2F7 100%);
}
.report-body .report-shell,
.report-body .technical-report-shell {
  max-width: 1160px;
  margin: 28px auto 56px;
  padding: 48px 56px 80px;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 28px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 28px 80px rgba(34,52,73,.13), inset 0 1px 0 rgba(255,255,255,.96);
  backdrop-filter: blur(28px) saturate(130%);
  -webkit-backdrop-filter: blur(28px) saturate(130%);
}
.report-body .hero-tag,
.report-body .technical-hero aside {
  padding: 11px 14px;
  border: 1px solid rgba(10,132,255,.14);
  border-radius: 12px;
  background: rgba(10,132,255,.055);
}
.report-body .summary-grid {
  padding: 22px 24px;
  border: 1px solid rgba(255,255,255,.84);
  border-radius: 18px;
  background: rgba(248,250,252,.68);
  box-shadow: 0 12px 34px rgba(44,62,82,.055);
  backdrop-filter: blur(18px);
}
.report-body .chart-component {
  position: relative;
  margin: 22px 0 30px;
  padding: 20px 22px 18px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 18px;
  background: linear-gradient(145deg,rgba(255,255,255,.88),rgba(247,250,253,.72));
  box-shadow: 0 16px 42px rgba(37,55,76,.09), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  overflow: hidden;
}
.report-body .chart-component::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg,#0A84FF,#7B61FF);
  opacity: .72;
}
.report-body .chart-stage {
  position: relative;
  margin-top: 8px;
  border-top: 1px solid rgba(90,102,118,.12);
  border-bottom: 1px solid rgba(90,102,118,.12);
  background: rgba(255,255,255,.42);
}
.report-body .chart-legend { display: flex; flex-wrap: wrap; gap: 7px 18px; margin: 10px 0; color: #666B73; font-size: 12px; }
.report-body .chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.report-body .chart-legend i { width: 15px; height: 3px; border-radius: 2px; background: #163A5F; }
.report-body .chart-legend span:nth-child(2) i { background: #6F8294; }
.report-body .chart-legend span:nth-child(3) i { background: #202124; }
.report-body .chart-legend span:nth-child(4) i { background: #AAB2BB; }
.report-body .chart-tooltip { position: absolute; z-index: 4; max-width: 320px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.22); border-radius: 9px; background: rgba(24,28,36,.88); box-shadow: 0 10px 30px rgba(0,0,0,.18); backdrop-filter: blur(14px); color: #fff; font-size: 12px; pointer-events: none; }
.report-body .pattern-visual { margin: 28px 0 42px; }
.report-body .pattern-heading { display: flex; align-items: baseline; gap: 12px; }
.report-body .pattern-heading span { color: #0A84FF; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.report-body .pattern-heading h3 { margin: 0; }
.report-body .signal-rules { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 14px; border: 1px solid rgba(90,102,118,.18); border-radius: 11px; background: rgba(90,102,118,.18); overflow: hidden; }
.report-body .signal-rules > div { padding: 10px 12px; background: rgba(255,255,255,.8); }
.report-body .signal-rules strong,
.report-body .signal-rules span { display: block; }
.report-body .signal-rules strong { color: #0A84FF; font-size: 11px; }
.report-body .signal-rules span { color: #666B73; font-size: 12px; }

@media (max-width:760px) {
  .report-body .report-shell,
  .report-body .technical-report-shell { margin: 0; padding: 28px 18px 48px; border: 0; border-radius: 0; }
  .report-body .chart-component { margin-left: -4px; margin-right: -4px; padding: 17px 12px; border-radius: 14px; }
  .report-body .signal-rules { grid-template-columns: 1fr; }
}

@media print {
  .report-body .report-shell,
  .report-body .technical-report-shell,
  .report-body .chart-component { background: #fff; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .report-body .chart-component { border: 1px solid #D9DDE3; }
  .report-body .chart-component::before { display: none; }
}

/* Xianyue Research application shell. Report surfaces above remain independent. */
.app-page {
  --app-bg: #f7f7f8;
  --app-surface: #ffffff;
  --app-text: #111318;
  --app-muted: #646872;
  --app-faint: #8f949d;
  --app-border: #d9dce2;
  --app-border-strong: #a8adb7;
  --app-primary: #002fa7;
  --app-primary-hover: #00247f;
  --app-danger: #b42318;
  --app-success: #157347;
  background: var(--app-bg);
  color: var(--app-text);
  font-family: "Helvetica Neue", Helvetica, sans-serif;
  min-height: 100vh;
}

.app-page a {
  color: inherit;
}

.app-header {
  align-items: center;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  display: flex;
  height: 72px;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
}

.app-brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.brand-symbol {
  fill: none;
  height: 38px;
  stroke: var(--app-text);
  stroke-linecap: square;
  stroke-width: 1.7;
  width: 38px;
}

.brand-symbol path:last-child {
  stroke: var(--app-primary);
}

.app-brand > span {
  display: grid;
  gap: 1px;
}

.app-brand strong {
  font-size: 17px;
  letter-spacing: -.02em;
}

.app-brand small {
  color: var(--app-muted);
  font-size: 11px;
}

.app-header-link {
  border-bottom: 1px solid var(--app-border-strong);
  color: var(--app-muted) !important;
  font-size: 13px;
  padding: 5px 0;
  text-decoration: none;
  transition: border-color 150ms ease, color 150ms ease;
}

.app-header-link:hover {
  border-color: var(--app-primary);
  color: var(--app-primary) !important;
}

.selection-shell,
.process-shell {
  background: var(--app-surface);
  border-left: 1px solid var(--app-border);
  border-right: 1px solid var(--app-border);
  margin: 0 auto;
  max-width: 1380px;
  min-height: calc(100vh - 72px);
}

.selection-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(480px, 7fr);
  min-height: 660px;
}

.selection-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  overflow: hidden;
  padding: clamp(40px, 6vw, 78px) clamp(28px, 5vw, 68px) 44px;
  position: relative;
}

.selection-intro h1 {
  font-size: clamp(44px, 5.3vw, 72px);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: .98;
  margin: 0;
  max-width: 520px;
}

.selection-intro > div:first-child > p {
  color: var(--app-muted);
  font-size: 15px;
  line-height: 1.75;
  margin: 24px 0 0;
  max-width: 480px;
}

.signal-disc {
  height: clamp(220px, 28vw, 370px);
  margin: -12px -96px -48px auto;
  opacity: .96;
  width: clamp(220px, 28vw, 370px);
}

.signal-disc svg {
  fill: none;
  height: 100%;
  stroke: var(--app-text);
  stroke-width: 1;
  width: 100%;
}

.signal-disc circle:nth-child(2) {
  stroke: var(--app-border-strong);
}

.signal-disc circle:nth-child(3),
.signal-disc path:nth-last-child(2) {
  stroke: var(--app-border);
}

.signal-disc path:last-child {
  stroke: var(--app-primary);
  stroke-width: 3;
}

.research-mode-switcher {
  border: 0;
  display: grid;
  gap: 0;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  padding: 0;
}

.research-mode-switcher legend {
  border-bottom: 1px solid var(--app-border);
  color: var(--app-muted);
  font-size: 12px;
  margin-bottom: 0;
  padding: 0 0 9px;
  width: 100%;
}

.research-mode {
  border-bottom: 1px solid var(--app-border);
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 32px 1fr;
  min-width: 0;
  padding: 15px 12px 15px 0;
  position: relative;
  transition: border-color 150ms ease, color 150ms ease;
}

.research-mode + .research-mode {
  border-left: 1px solid var(--app-border);
  padding-left: 16px;
}

.research-mode input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.research-mode:has(input:focus-visible) {
  outline: 2px solid var(--app-primary);
  outline-offset: 2px;
}

.research-mode:has(input:checked) {
  border-bottom-color: var(--app-primary);
  color: var(--app-primary);
}

.mode-number {
  color: var(--app-faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.research-mode:has(input:checked) .mode-number {
  color: var(--app-primary);
}

.research-mode > span:last-child {
  display: grid;
  gap: 3px;
}

.research-mode strong {
  font-size: 14px;
}

.research-mode small {
  color: var(--app-muted);
  font-size: 11px;
  line-height: 1.45;
}

.workflow-preview {
  border-top: 1px solid var(--app-text);
  margin-top: 26px;
  padding-top: 14px;
}

.workflow-preview > strong {
  font-size: 14px;
}

.workflow-preview > p {
  color: var(--app-muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 6px 0 15px;
}

.workflow-preview ol {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(5, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
}

.workflow-preview li {
  border-top: 2px solid var(--app-border);
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 8px 6px 0 0;
}

.workflow-preview li:first-child {
  border-color: var(--app-primary);
}

.workflow-preview li span {
  color: var(--app-faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.workflow-preview li strong {
  font-size: 10px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.research-form-shell {
  background: var(--app-bg);
  border-left: 1px solid var(--app-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(42px, 7vw, 96px) clamp(34px, 8vw, 108px);
}

.research-form-shell > header {
  border-bottom: 1px solid var(--app-border);
  margin-bottom: 36px;
  padding-bottom: 18px;
}

.research-form-shell h2 {
  font-size: 27px;
  letter-spacing: -.035em;
  margin: 0;
}

.research-form-shell header p,
.research-history .section-header p,
.workflow-panel header p,
.process-section .section-header p,
.current-work .section-header p {
  color: var(--app-muted);
  font-size: 12px;
  margin: 5px 0 0;
}

.app-page .field {
  gap: 8px;
}

.app-page .field span {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 600;
}

.app-page input,
.app-page select {
  background: var(--app-surface);
  border: 1px solid var(--app-border-strong);
  border-radius: 0;
  color: var(--app-text);
  min-height: 48px;
  padding: 11px 13px;
}

.app-page .field-emphasis input {
  border-color: var(--app-text);
  font-size: 18px;
  min-height: 58px;
}

.app-page input:focus,
.app-page select:focus,
.app-page button:focus-visible,
.app-page a:focus-visible {
  outline: 2px solid var(--app-primary);
  outline-offset: 2px;
}

.app-page .form-grid {
  gap: 16px;
  margin: 18px 0 24px;
}

.app-page .button {
  border-radius: 2px;
  min-height: 43px;
}

.app-page .button-primary {
  background: var(--app-primary);
}

.app-page .button-primary:hover:not(:disabled) {
  background: var(--app-primary-hover);
}

.app-page .button-secondary {
  background: var(--app-surface);
  border-color: var(--app-border-strong);
}

.app-page .button-secondary:hover:not(:disabled) {
  background: var(--app-bg);
  border-color: var(--app-text);
}

.app-page .button-danger {
  border-color: var(--app-border-strong);
  color: var(--app-danger);
}

.submit-research {
  justify-content: space-between;
  min-height: 52px !important;
  padding: 10px 16px !important;
  width: 100%;
}

.submit-research svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 1.5;
  width: 20px;
}

.form-footnote {
  border-top: 1px solid var(--app-border);
  color: var(--app-muted);
  display: flex;
  font-size: 11px;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 13px;
}

.research-history {
  border-top: 1px solid var(--app-border);
  padding: 38px clamp(28px, 5vw, 68px) 72px;
}

.app-page .section-header {
  align-items: flex-end;
}

.research-history h2,
.process-section h2,
.current-work h2,
.workflow-panel h2 {
  font-size: 20px;
  letter-spacing: -.025em;
  margin: 0;
}

.app-page table {
  min-width: 760px;
}

.app-page th {
  color: var(--app-muted);
  font-size: 11px;
  font-weight: 600;
}

.app-page th,
.app-page td {
  border-color: var(--app-border);
  padding: 14px 10px;
}

.app-page tbody tr:hover {
  background: var(--app-bg);
}

.research-table td:first-child a {
  color: var(--app-primary);
  font-weight: 700;
  text-decoration: none;
}

.app-page .notice {
  border-radius: 0;
  font-size: 13px;
}

.app-page .status-badge {
  background: transparent;
  border-color: var(--app-border-strong);
  border-radius: 2px;
  color: var(--app-muted);
  font-size: 11px;
  padding: 3px 7px;
}

.app-page .status-badge.is-success {
  background: transparent;
  border-color: var(--app-success);
  color: var(--app-success);
}

.app-page .status-badge.is-error {
  background: transparent;
  border-color: var(--app-danger);
  color: var(--app-danger);
}

.app-page .status-badge.is-review {
  background: transparent;
  border-color: #8a5a00;
  color: #8a5a00;
}

.process-shell {
  padding: 0 clamp(24px, 4vw, 58px) 72px;
}

.page-notice {
  margin-top: 24px !important;
}

.run-masthead {
  display: grid;
  gap: 0 32px;
  grid-template-columns: 1fr auto;
  padding: clamp(44px, 6vw, 76px) 0 32px;
}

.run-id {
  color: var(--app-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}

.run-masthead h1 {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  font-size: clamp(42px, 5vw, 68px);
  gap: 12px 20px;
  letter-spacing: -.055em;
  line-height: 1;
  margin: 0;
}

.run-masthead h1 small {
  color: var(--app-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.current-stage {
  color: var(--app-muted);
  font-size: 15px;
  margin: 17px 0 0;
}

.run-state {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.run-state > strong {
  font-size: 44px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.05em;
  line-height: 1;
}

.process-page .progress-track {
  background: var(--app-border);
  grid-column: 1 / -1;
  height: 3px;
  margin-top: 32px;
}

.process-page .progress-bar {
  background: var(--app-primary);
}

.run-facts {
  border-bottom: 1px solid var(--app-border);
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(5, 1fr);
  margin: 26px 0 0;
}

.run-facts div {
  border-right: 1px solid var(--app-border);
  min-width: 0;
  padding: 0 16px 16px;
}

.run-facts div:first-child {
  padding-left: 0;
}

.run-facts div:last-child {
  border-right: 0;
}

.run-facts dt {
  color: var(--app-muted);
  font-size: 10px;
  margin-bottom: 6px;
}

.run-facts dd {
  font-size: 12px;
  font-weight: 600;
  margin: 0;
  overflow-wrap: anywhere;
}

.process-layout {
  border-bottom: 1px solid var(--app-border);
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}

.workflow-panel {
  border-right: 1px solid var(--app-border);
  min-width: 0;
  padding: 34px 32px 42px 20px;
}

.workflow-panel > header {
  border-bottom: 1px solid var(--app-text);
  margin-bottom: 22px;
  padding-bottom: 15px;
}

.workflow-track {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.workflow-track-long {
  max-height: 710px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-color: var(--app-border-strong) transparent;
  scrollbar-width: thin;
}

.workflow-node {
  border-left: 2px solid var(--app-border);
  color: var(--app-muted);
  display: grid;
  gap: 12px;
  grid-template-columns: 36px 1fr;
  min-height: 50px;
  padding: 10px 10px 12px 13px;
}

.workflow-node > span {
  color: var(--app-faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.workflow-node > strong {
  font-size: 12px;
  font-weight: 600;
}

.workflow-node[data-state="RUNNING"] {
  background: #f3f6ff;
  border-left-color: var(--app-primary);
  color: var(--app-primary);
}

.workflow-node[data-state="COMPLETED"] {
  border-left-color: var(--app-text);
  color: var(--app-text);
}

.workflow-node[data-state="FAILED"],
.workflow-node[data-state="CANCELLED"] {
  background: #fff2f0;
  border-left-color: var(--app-danger);
  color: var(--app-danger);
}

.workflow-node[data-state="HUMAN_REVIEW_REQUIRED"] {
  background: #fff8e6;
  border-left-color: #8a5a00;
  color: #8a5a00;
}

.workflow-branch {
  border-bottom: 1px solid var(--app-border);
  border-top: 1px solid var(--app-border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 7px 0;
}

.workflow-branch .workflow-node {
  border-left-width: 1px;
  display: block;
  min-height: 76px;
  padding: 12px;
}

.workflow-branch .workflow-node + .workflow-node {
  border-left: 1px solid var(--app-border);
}

.workflow-branch .workflow-node > span,
.workflow-branch .workflow-node > strong {
  display: block;
}

.workflow-branch .workflow-node > strong {
  margin-top: 7px;
}

.process-content {
  min-width: 0;
  padding: 34px 0 42px 38px;
}

.current-work,
.process-section {
  border-bottom: 1px solid var(--app-border);
  padding: 0 0 34px;
}

.process-section {
  padding-top: 34px;
}

.node-label {
  border-bottom: 2px solid var(--app-primary);
  color: var(--app-primary);
  font-size: 12px;
  font-weight: 700;
  padding: 0 0 5px;
}

.current-work-body {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: 92px 1fr;
  min-height: 116px;
}

.current-work-body > p {
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
  max-width: 740px;
}

.work-signal {
  align-items: end;
  border-bottom: 1px solid var(--app-border-strong);
  display: flex;
  gap: 5px;
  height: 48px;
  padding-bottom: 4px;
}

.work-signal i {
  animation: signal-pulse 1.4s ease infinite;
  background: var(--app-primary);
  display: block;
  height: 35%;
  opacity: .22;
  width: 7px;
}

.work-signal i:nth-child(2),
.work-signal i:nth-child(6) { height: 58%; animation-delay: 100ms; }
.work-signal i:nth-child(3),
.work-signal i:nth-child(5) { height: 86%; animation-delay: 200ms; }
.work-signal i:nth-child(4) { height: 100%; animation-delay: 300ms; }
.work-signal i:nth-child(7) { height: 25%; animation-delay: 400ms; }

@keyframes signal-pulse {
  0%, 100% { opacity: .2; }
  45% { opacity: 1; }
}

.process-page .actions {
  border-top: 1px solid var(--app-border);
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 18px;
}

.process-page .event-ledger li:not(.empty-state) {
  grid-template-columns: 42px minmax(160px, .35fr) auto minmax(260px, 1fr);
}

.process-page .event-ledger li:not(.empty-state)::before {
  color: var(--app-faint);
  grid-row: auto;
}

.process-page .event-message {
  color: var(--app-text);
}

@media (max-width: 980px) {
  .selection-grid {
    grid-template-columns: 1fr;
  }

  .selection-intro {
    min-height: 620px;
  }

  .research-form-shell {
    border-left: 0;
    border-top: 1px solid var(--app-border);
  }

  .process-layout {
    display: block;
  }

  .workflow-panel {
    border-bottom: 1px solid var(--app-border);
    border-right: 0;
    padding-right: 0;
  }

  .workflow-track,
  .workflow-track-long {
    display: flex;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 10px;
  }

  .workflow-node {
    border-left: 0;
    border-top: 2px solid var(--app-border);
    flex: 0 0 170px;
  }

  .workflow-node[data-state="RUNNING"],
  .workflow-node[data-state="COMPLETED"],
  .workflow-node[data-state="FAILED"],
  .workflow-node[data-state="CANCELLED"],
  .workflow-node[data-state="HUMAN_REVIEW_REQUIRED"] {
    border-left: 0;
  }

  .workflow-node[data-state="RUNNING"] { border-top-color: var(--app-primary); }
  .workflow-node[data-state="COMPLETED"] { border-top-color: var(--app-text); }
  .workflow-node[data-state="FAILED"],
  .workflow-node[data-state="CANCELLED"] { border-top-color: var(--app-danger); }
  .workflow-node[data-state="HUMAN_REVIEW_REQUIRED"] { border-top-color: #8a5a00; }

  .workflow-branch {
    flex: 0 0 340px;
    margin: 0;
  }

  .workflow-branch .workflow-node {
    border-top: 2px solid var(--app-border);
  }

  .process-content {
    padding-left: 0;
  }
}

@media (max-width: 700px) {
  .app-header {
    align-items: center;
    flex-direction: row;
    height: 64px;
    padding: 0 18px;
  }

  .app-brand small {
    display: none;
  }

  .selection-shell,
  .process-shell {
    border-left: 0;
    border-right: 0;
    min-height: calc(100vh - 64px);
  }

  .selection-intro,
  .research-form-shell,
  .research-history {
    padding-left: 20px;
    padding-right: 20px;
  }

  .selection-intro {
    min-height: 560px;
    padding-bottom: 30px;
    padding-top: 48px;
  }

  .selection-intro h1 {
    font-size: 46px;
  }

  .signal-disc {
    height: 230px;
    margin: -8px -74px -26px auto;
    width: 230px;
  }

  .research-mode-switcher {
    grid-template-columns: 1fr;
  }

  .research-mode + .research-mode {
    border-left: 0;
    padding-left: 0;
  }

  .research-form-shell {
    padding-bottom: 56px;
    padding-top: 56px;
  }

  .form-footnote {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .process-shell {
    padding: 0 20px 56px;
  }

  .run-masthead {
    display: block;
    padding-top: 46px;
  }

  .run-masthead h1 {
    display: grid;
    font-size: 48px;
  }

  .run-state {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 28px;
  }

  .run-state > strong {
    font-size: 36px;
  }

  .run-facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .run-facts div,
  .run-facts div:first-child {
    border-bottom: 1px solid var(--app-border);
    padding: 12px 10px;
  }

  .run-facts div:nth-child(even) {
    border-right: 0;
  }

  .run-facts div:last-child {
    grid-column: 1 / -1;
  }

  .current-work-body {
    display: block;
  }

  .work-signal {
    margin-bottom: 20px;
    width: 92px;
  }

  .process-page .event-ledger li:not(.empty-state) {
    grid-template-columns: 32px 1fr;
  }

  .process-page .event-time,
  .process-page .event-message {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-page *,
  .app-page *::before,
  .app-page *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

.access-gate {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 6, 12, .72);
  backdrop-filter: blur(18px);
}

.access-gate-card {
  width: min(100%, 420px);
  padding: 34px;
  border: 1px solid rgba(173, 198, 255, .24);
}

.access-gate-card h1 { margin: 4px 0 8px; font-size: 28px; }
.access-gate-card p { color: #aebbd3; line-height: 1.7; }
.access-gate-card .field { display: grid; gap: 8px; margin: 24px 0 14px; }
.access-gate-card .button { width: 100%; justify-content: center; }
.access-gate-eyebrow { margin: 0; color: #91b8ff !important; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* Eclipse Glass: the application shell only. The standalone report keeps its own theme. */
.app-page {
  --app-bg: #07080b;
  --app-surface: rgba(16, 19, 31, .68);
  --app-surface-strong: rgba(13, 15, 25, .86);
  --app-text: #eef2ff;
  --app-muted: #a2aec4;
  --app-faint: #68748d;
  --app-border: rgba(209, 220, 255, .14);
  --app-border-strong: rgba(193, 207, 255, .32);
  --app-primary: #7f9cff;
  --app-primary-hover: #9a8cff;
  --app-danger: #ff7d8d;
  --app-success: #71e0b3;
  background: var(--app-bg);
  color: var(--app-text);
  isolation: isolate;
  overflow-x: hidden;
}

.ambient-field {
  background:
    radial-gradient(60rem 44rem at 5% -10%, rgba(72, 86, 222, .25), transparent 66%),
    radial-gradient(52rem 38rem at 96% 20%, rgba(143, 75, 207, .18), transparent 70%),
    radial-gradient(40rem 32rem at 46% 115%, rgba(35, 98, 196, .15), transparent 72%);
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  z-index: -2;
}

.ambient-orb {
  border-radius: 50%;
  filter: blur(10px);
  opacity: .46;
  position: absolute;
  will-change: transform;
}

.ambient-orb-primary {
  background: #516eea;
  height: 32rem;
  left: -14rem;
  top: 26vh;
  width: 32rem;
  animation: ambient-drift-primary 22s ease-in-out infinite alternate;
}

.ambient-orb-secondary {
  background: #884fc7;
  height: 26rem;
  right: -9rem;
  top: 50vh;
  width: 26rem;
  animation: ambient-drift-secondary 27s ease-in-out infinite alternate;
}

.ambient-grid {
  background-image:
    linear-gradient(rgba(202, 215, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(202, 215, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  inset: 0;
  opacity: .42;
  position: absolute;
}

.cursor-spotlight {
  background: radial-gradient(380px circle at var(--spotlight-x, -999px) var(--spotlight-y, -999px), rgba(124, 155, 255, .13), transparent 72%);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 280ms ease;
  z-index: -1;
}

.cursor-spotlight[data-visible="true"] {
  opacity: 1;
}

.app-page .app-header,
.app-page .selection-shell,
.app-page .process-shell {
  position: relative;
  z-index: 1;
}

.glass-surface {
  background: var(--app-surface);
  border-color: var(--app-border) !important;
  -webkit-backdrop-filter: blur(20px) saturate(118%);
  backdrop-filter: blur(20px) saturate(118%);
}

.app-page .app-header {
  background: rgba(8, 10, 17, .63);
  border-bottom-color: var(--app-border);
}

.app-page .brand-symbol {
  stroke: #eff3ff;
}

.app-page .brand-symbol path:last-child {
  stroke: var(--app-primary);
}

.app-page .app-header-link {
  border-bottom-color: rgba(190, 204, 255, .4);
  color: var(--app-muted) !important;
}

.app-page .app-header-link:hover {
  border-bottom-color: var(--app-primary);
  color: #fff !important;
}

.app-page .selection-shell,
.app-page .process-shell {
  background: rgba(5, 6, 11, .26);
  border-color: var(--app-border);
}

.app-page .selection-intro {
  background: rgba(8, 10, 17, .24);
}

.app-page .selection-intro > div:first-child > p,
.app-page .workflow-preview > p,
.app-page .research-form-shell header p,
.app-page .research-history .section-header p,
.app-page .workflow-panel header p,
.app-page .process-section .section-header p,
.app-page .current-work .section-header p,
.app-page .current-stage,
.app-page .run-id {
  color: var(--app-muted);
}

.app-page .signal-disc {
  filter: drop-shadow(0 0 30px rgba(103, 132, 255, .18));
}

.app-page .signal-disc svg {
  animation: eclipse-spin 36s linear infinite;
  stroke: rgba(231, 237, 255, .72);
  transform-origin: 50% 50%;
}

.app-page .signal-disc circle:nth-child(2),
.app-page .signal-disc circle:nth-child(3),
.app-page .signal-disc path:nth-last-child(2) {
  stroke: rgba(179, 195, 255, .2);
}

.app-page .signal-disc path:last-child {
  stroke: #8aa3ff;
}

.app-page .research-mode-switcher legend,
.app-page .research-mode,
.app-page .workflow-preview,
.app-page .research-form-shell > header,
.app-page .form-footnote,
.app-page .research-history,
.app-page .run-facts,
.app-page .run-facts div,
.app-page .process-layout,
.app-page .workflow-panel,
.app-page .workflow-panel > header,
.app-page .current-work,
.app-page .process-section,
.app-page .process-page .actions {
  border-color: var(--app-border);
}

.app-page .research-mode {
  overflow: hidden;
}

.app-page .research-mode:has(input:checked) {
  background: rgba(92, 119, 234, .1);
  border-bottom-color: var(--app-primary);
  color: #fff;
}

.app-page .research-mode small,
.app-page .mode-number,
.app-page .workflow-preview li span {
  color: var(--app-muted);
}

.app-page .research-mode:has(input:checked) .mode-number {
  color: var(--app-primary);
}

.border-beam::after {
  animation: border-beam-pass 1.4s ease-out 1;
  background: linear-gradient(90deg, transparent, rgba(205, 220, 255, .94), transparent);
  bottom: -1px;
  content: "";
  height: 2px;
  left: -42%;
  position: absolute;
  width: 42%;
}

.app-page .research-form-shell {
  background: rgba(12, 15, 25, .58);
}

.app-page input,
.app-page select {
  background: rgba(5, 7, 13, .54);
  border-color: var(--app-border-strong);
  color: var(--app-text);
}

.app-page input::placeholder {
  color: #758199;
}

.app-page input:focus,
.app-page select:focus,
.app-page button:focus-visible,
.app-page a:focus-visible {
  outline-color: #a8bbff;
}

.app-page .field-emphasis input {
  border-color: rgba(208, 218, 255, .54);
}

.app-page .button-primary {
  background: #708df5;
  box-shadow: 0 8px 22px rgba(76, 98, 210, .2);
  overflow: hidden;
  position: relative;
}

.app-page .button-primary::after {
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.app-page .button-primary:hover:not(:disabled) {
  background: #819cf7;
}

.app-page .submit-research:hover::after,
.app-page .submit-research:focus-visible::after {
  animation: button-shimmer 720ms ease-out 1;
}

.app-page .button-secondary,
.app-page .button-danger {
  background: rgba(18, 22, 35, .48);
  border-color: var(--app-border-strong);
  color: var(--app-text);
}

.app-page .button-danger {
  color: var(--app-danger);
}

.app-page .button-secondary:hover:not(:disabled) {
  background: rgba(68, 80, 125, .24);
  border-color: rgba(200, 212, 255, .6);
}

.app-page .research-history,
.app-page .run-masthead,
.app-page .workflow-panel,
.app-page .current-work,
.app-page .process-section {
  background: var(--app-surface);
}

.app-page .run-masthead {
  border: 1px solid var(--app-border);
  border-top: 0;
  margin: 0 -1px;
  padding-left: 32px;
  padding-right: 32px;
}

.app-page .run-masthead h1,
.app-page .research-history h2,
.app-page .process-section h2,
.app-page .current-work h2,
.app-page .workflow-panel h2 {
  color: #f5f7ff;
}

.app-page .run-masthead h1 small {
  color: var(--app-muted);
}

.app-page .run-facts dd,
.app-page .current-work-body > p,
.app-page .event-message {
  color: var(--app-text);
}

.app-page .process-layout {
  background: rgba(8, 10, 17, .32);
}

.app-page .process-content {
  padding-right: 0;
}

.app-page .current-work,
.app-page .process-section {
  border: 1px solid var(--app-border);
  margin-bottom: 18px;
  padding: 28px;
}

.app-page .workflow-panel {
  border-right-color: var(--app-border);
}

.app-page .workflow-node {
  border-left-color: rgba(198, 211, 255, .17);
  color: var(--app-muted);
  position: relative;
}

.app-page .workflow-node[data-state="RUNNING"] {
  background: rgba(93, 119, 234, .16);
  border-left-color: #8ca6ff;
  color: #eaf0ff;
}

.app-page .workflow-node[data-state="COMPLETED"] {
  border-left-color: rgba(210, 221, 255, .65);
  color: #dbe5ff;
}

.app-page .workflow-node[data-state="FAILED"],
.app-page .workflow-node[data-state="CANCELLED"] {
  background: rgba(150, 50, 68, .17);
  border-left-color: var(--app-danger);
  color: #ffc3cb;
}

.app-page .workflow-node[data-state="HUMAN_REVIEW_REQUIRED"] {
  background: rgba(174, 129, 49, .15);
  border-left-color: #f1c16d;
  color: #ffe1a6;
}

.node-flow::after {
  animation: node-flow-travel 1.8s linear infinite;
  background: linear-gradient(180deg, transparent, #bdcbff, transparent);
  content: "";
  height: 42px;
  left: -2px;
  position: absolute;
  top: -42px;
  width: 2px;
}

.app-page .workflow-branch {
  border-color: var(--app-border);
}

.app-page .workflow-branch .workflow-node + .workflow-node {
  border-left-color: var(--app-border);
}

.app-page .node-label {
  border-bottom-color: var(--app-primary);
  color: #aebeff;
}

.app-page .process-page .progress-track,
.app-page .work-signal {
  background: rgba(188, 204, 255, .12);
  border-color: var(--app-border-strong);
}

.app-page .process-page .progress-bar,
.app-page .work-signal i {
  background: #7f9cff;
  box-shadow: 0 0 12px rgba(127, 156, 255, .5);
}

.app-page .status-badge {
  background: rgba(18, 22, 35, .44);
  border-color: var(--app-border-strong);
  color: #c9d5f6;
}

.app-page .status-badge.is-success {
  border-color: rgba(113, 224, 179, .7);
  color: var(--app-success);
}

.app-page .status-badge.is-error {
  border-color: rgba(255, 125, 141, .7);
  color: var(--app-danger);
}

.app-page .status-badge.is-review {
  border-color: rgba(241, 193, 109, .7);
  color: #f1c16d;
}

.app-page th,
.app-page td {
  border-color: var(--app-border);
}

.app-page tbody tr:hover {
  background: rgba(110, 133, 218, .1);
}

.app-page .research-table td:first-child a {
  color: #aebeff;
}

.app-page .notice-error {
  background: rgba(129, 38, 54, .22);
  color: #ffb4be;
}

@keyframes ambient-drift-primary {
  from { transform: translate3d(-4%, -5%, 0) scale(.92); }
  to { transform: translate3d(18%, 10%, 0) scale(1.12); }
}

@keyframes ambient-drift-secondary {
  from { transform: translate3d(8%, 5%, 0) scale(.9); }
  to { transform: translate3d(-16%, -12%, 0) scale(1.14); }
}

@keyframes eclipse-spin {
  to { transform: rotate(360deg); }
}

@keyframes border-beam-pass {
  from { transform: translateX(0); }
  to { transform: translateX(360%); }
}

@keyframes button-shimmer {
  0% { opacity: 0; transform: translateX(-44%); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateX(44%); }
}

@keyframes node-flow-travel {
  from { transform: translateY(0); }
  to { transform: translateY(94px); }
}

@supports not (backdrop-filter: blur(1px)) {
  .app-page .glass-surface,
  .app-page .research-history,
  .app-page .run-masthead,
  .app-page .workflow-panel,
  .app-page .current-work,
  .app-page .process-section {
    background: var(--app-surface-strong);
  }
}

@media (hover: none), (pointer: coarse) {
  .cursor-spotlight {
    display: none;
  }
}

@media (max-width: 700px) {
  .app-page .run-masthead {
    margin: 0;
    padding-left: 20px;
    padding-right: 20px;
  }

  .app-page .current-work,
  .app-page .process-section {
    margin-left: -4px;
    margin-right: -4px;
    padding: 22px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-page .ambient-orb,
  .app-page .signal-disc svg,
  .app-page .border-beam::after,
  .app-page .node-flow::after,
  .app-page .button-primary::after {
    animation: none !important;
  }

  .app-page .cursor-spotlight {
    display: none;
  }
}

/* Deep Space Fintech refinement — application pages only. */
.app-page {
  --app-void: #050711;
  --app-glass: rgba(14, 20, 37, .72);
  --app-ice: #91b8ff;
  --app-aurora: #7d72ff;
  --app-ink: #eef4ff;
  --app-muted: #a4b1ca;
  --app-faint: #71809b;
  --app-border: rgba(174, 196, 255, .16);
  --app-border-strong: rgba(179, 205, 255, .33);
  --app-bg: var(--app-void);
  --app-surface: var(--app-glass);
  --app-surface-strong: rgba(9, 14, 29, .91);
  --app-text: var(--app-ink);
  --app-primary: var(--app-ice);
  --app-primary-hover: #c2d6ff;
  --app-danger: #ff8295;
  --app-success: #79dfc2;
  background:
    radial-gradient(880px 520px at 7% -12%, rgba(74, 104, 202, .17), transparent 68%),
    radial-gradient(780px 500px at 97% 9%, rgba(125, 74, 202, .14), transparent 70%),
    var(--app-void);
}

.app-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 16%, rgba(113, 152, 255, .05) 48%, transparent 80%),
    repeating-linear-gradient(90deg, rgba(156, 186, 255, .022) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(156, 186, 255, .018) 0 1px, transparent 1px 96px);
  mask-image: radial-gradient(ellipse 85% 72% at 50% 8%, #000 12%, transparent 87%);
}

.app-page .ambient-field {
  background:
    radial-gradient(700px 540px at 8% 2%, rgba(80, 111, 226, .16), transparent 71%),
    radial-gradient(640px 500px at 96% 18%, rgba(129, 73, 228, .15), transparent 72%),
    radial-gradient(640px 420px at 55% 105%, rgba(27, 91, 151, .10), transparent 72%);
}

.app-page .ambient-grid {
  opacity: .34;
  background-size: 84px 84px;
  mask-image: radial-gradient(ellipse 82% 68% at 53% 18%, #000 8%, transparent 87%);
}

.app-page .ambient-orb {
  filter: blur(30px);
  opacity: .58;
}

.app-page .app-header {
  width: min(1440px, calc(100% - 36px));
  margin: 16px auto 0;
  border: 1px solid var(--app-border);
  border-radius: 17px;
  background: linear-gradient(112deg, rgba(34, 44, 76, .62), rgba(12, 16, 31, .72));
  box-shadow: 0 18px 54px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(234, 243, 255, .10);
  backdrop-filter: blur(20px) saturate(126%);
}

.app-page .app-brand-mark {
  border-color: rgba(165, 192, 255, .44);
  color: var(--app-ice);
  box-shadow: 0 0 26px rgba(105, 143, 255, .24), inset 0 1px 0 rgba(237, 246, 255, .22);
}

.app-page .app-brand-subtitle,
.app-page .app-header-meta,
.app-page .section-kicker,
.app-page .muted,
.app-page .helper-text,
.app-page .field-help {
  color: var(--app-muted);
}

.app-page .selection-shell,
.app-page .process-shell {
  width: min(1440px, calc(100% - 36px));
  margin: 22px auto 68px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.app-page .selection-grid {
  align-items: stretch;
  gap: 22px;
  grid-template-columns: minmax(0, .94fr) minmax(470px, 1.06fr);
}

.app-page .selection-intro,
.app-page .research-form-shell,
.app-page .research-history,
.app-page .run-masthead,
.app-page .workflow-panel,
.app-page .current-work,
.app-page .process-section,
.app-page .glass-surface {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--app-border);
  background:
    linear-gradient(130deg, rgba(42, 54, 91, .42), rgba(13, 18, 34, .58) 46%, rgba(17, 17, 39, .63)),
    var(--app-glass);
  box-shadow: 0 22px 68px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(236, 244, 255, .095);
  backdrop-filter: blur(22px) saturate(130%);
}

.app-page .glass-surface::before,
.app-page .selection-intro::before,
.app-page .research-history::before,
.app-page .run-masthead::before,
.app-page .workflow-panel::before,
.app-page .current-work::before,
.app-page .process-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .42;
  background: linear-gradient(116deg, transparent 18%, rgba(180, 207, 255, .16) 48%, transparent 77%);
  transform: translateX(-122%);
  animation: glass-beam-sweep 13s cubic-bezier(.22, .61, .36, 1) infinite;
}

.app-page .selection-intro > *,
.app-page .research-form-shell > *,
.app-page .research-history > *,
.app-page .run-masthead > *,
.app-page .workflow-panel > *,
.app-page .current-work > *,
.app-page .process-section > * {
  position: relative;
  z-index: 1;
}

.app-page .glass-surface > * {
  position: relative;
  z-index: 1;
}

.app-page .selection-intro,
.app-page .research-form-shell {
  border-radius: 24px;
}

.app-page .research-history,
.app-page .run-masthead {
  border-radius: 22px;
}

.app-page .workflow-panel,
.app-page .current-work,
.app-page .process-section {
  border-radius: 19px;
}

.app-page .signal-disc {
  background: radial-gradient(circle at 42% 35%, rgba(174, 205, 255, .26), rgba(72, 101, 196, .08) 43%, transparent 70%);
  box-shadow: 0 0 0 1px rgba(161, 189, 255, .20), 0 0 58px rgba(90, 124, 255, .16), inset 0 0 28px rgba(150, 179, 255, .09);
}

.app-page .signal-disc::before {
  border-color: rgba(153, 186, 255, .28);
}

.app-page .research-mode,
.app-page .workflow-preview,
.app-page .research-history-item,
.app-page .execution-item,
.app-page .agent-summary-item {
  border-color: rgba(166, 190, 248, .15);
  background: rgba(9, 14, 29, .40);
  box-shadow: inset 0 1px 0 rgba(240, 246, 255, .04);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.app-page .research-mode:hover,
.app-page .workflow-preview:hover,
.app-page .research-history-item:hover,
.app-page .execution-item:hover,
.app-page .agent-summary-item:hover {
  transform: translateY(-2px);
  border-color: rgba(156, 189, 255, .36);
  background: rgba(32, 43, 76, .42);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(240, 246, 255, .07);
}

.app-page .research-mode.is-selected,
.app-page .research-mode input:checked + .research-mode-content {
  border-color: rgba(145, 184, 255, .54);
  background: linear-gradient(135deg, rgba(84, 120, 220, .25), rgba(60, 43, 123, .18));
  box-shadow: 0 0 0 1px rgba(126, 165, 255, .10), inset 0 1px 0 rgba(239, 246, 255, .12);
}

.app-page input,
.app-page select,
.app-page textarea {
  border-color: rgba(171, 195, 252, .22);
  border-radius: 12px;
  background: rgba(4, 8, 20, .55);
  color: var(--app-ink);
  box-shadow: inset 0 1px 0 rgba(237, 245, 255, .035);
}

.app-page input:focus,
.app-page select:focus,
.app-page textarea:focus {
  border-color: rgba(145, 184, 255, .68);
  box-shadow: 0 0 0 3px rgba(111, 156, 255, .14), inset 0 1px 0 rgba(237, 245, 255, .06);
}

.app-page .button-primary {
  border: 1px solid rgba(205, 222, 255, .54);
  color: #071025;
  background: linear-gradient(135deg, #c7d9ff 0%, #91b8ff 48%, #9a9fff 100%);
  box-shadow: 0 13px 28px rgba(73, 114, 229, .27), inset 0 1px 0 rgba(255, 255, 255, .68);
}

.app-page .button-primary:hover {
  color: #040b1b;
  background: linear-gradient(135deg, #e1ebff 0%, #abc9ff 48%, #b2adff 100%);
  box-shadow: 0 16px 36px rgba(84, 124, 237, .38), inset 0 1px 0 rgba(255, 255, 255, .74);
}

.app-page .button-secondary,
.app-page .button-quiet {
  border-color: rgba(170, 195, 255, .24);
  color: #dce7ff;
  background: rgba(24, 31, 55, .52);
}

.app-page .button-secondary:hover,
.app-page .button-quiet:hover {
  border-color: rgba(156, 190, 255, .48);
  background: rgba(53, 68, 111, .54);
}

.app-page .process-layout {
  gap: 22px;
  border: 0;
  background: transparent;
}

.app-page .workflow-node[data-state="RUNNING"] {
  border-color: rgba(145, 184, 255, .52);
  background: linear-gradient(100deg, rgba(88, 126, 225, .30), rgba(58, 44, 126, .25));
  box-shadow: 0 0 0 1px rgba(146, 182, 255, .09), 0 0 28px rgba(100, 138, 255, .12), inset 0 1px 0 rgba(237, 245, 255, .13);
  animation: node-breathe 2.7s ease-in-out infinite;
}

.app-page .progress-bar {
  background: linear-gradient(90deg, #769dff 0%, #b6d0ff 48%, #988fff 100%);
  background-size: 180% 100%;
  box-shadow: 0 0 18px rgba(128, 166, 255, .42);
  animation: progress-sheen 2.8s linear infinite;
}

.app-page .research-history table,
.app-page .process-section table {
  border-color: rgba(167, 189, 244, .14);
}

.app-page .research-history th,
.app-page .process-section th {
  color: #c5d6fb;
  background: rgba(99, 117, 172, .11);
}

.app-page .research-history td,
.app-page .process-section td {
  border-color: rgba(167, 189, 244, .11);
}

@keyframes glass-beam-sweep {
  0%, 28% { opacity: 0; transform: translateX(-122%); }
  39% { opacity: .58; }
  61%, 100% { opacity: 0; transform: translateX(122%); }
}

@keyframes node-breathe {
  0%, 100% { box-shadow: 0 0 0 1px rgba(146, 182, 255, .09), 0 0 22px rgba(100, 138, 255, .11), inset 0 1px 0 rgba(237, 245, 255, .13); }
  50% { box-shadow: 0 0 0 1px rgba(168, 201, 255, .20), 0 0 36px rgba(104, 143, 255, .23), inset 0 1px 0 rgba(237, 245, 255, .18); }
}

@keyframes progress-sheen {
  from { background-position: 180% 0; }
  to { background-position: -20% 0; }
}

@media (max-width: 1040px) {
  .app-page .selection-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .app-page .app-header,
  .app-page .selection-shell,
  .app-page .process-shell {
    width: min(100% - 22px, 1440px);
  }

  .app-page .app-header {
    margin-top: 10px;
    border-radius: 14px;
  }

  .app-page .selection-shell,
  .app-page .process-shell {
    margin-top: 14px;
    margin-bottom: 38px;
  }

  .app-page .selection-intro,
  .app-page .research-form-shell,
  .app-page .research-history,
  .app-page .run-masthead,
  .app-page .workflow-panel,
  .app-page .current-work,
  .app-page .process-section {
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-page .glass-surface::before,
  .app-page .selection-intro::before,
  .app-page .research-history::before,
  .app-page .run-masthead::before,
  .app-page .workflow-panel::before,
  .app-page .current-work::before,
  .app-page .process-section::before,
  .app-page .workflow-node[data-state="RUNNING"],
  .app-page .progress-bar {
    animation: none !important;
  }
}
