/* 工地智能体子页 — portal 深色适配（复用原 HTML 结构） */

body.portal .wrap { max-width: 1320px; margin: 0 auto; padding: 0 40px; }
body.portal .section { padding: 72px 0; background: transparent; color: var(--text); }
body.portal .section--elevated {
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
body.portal .section--surface {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg) 100%);
}
body.portal .portal-snap-section {
  min-height: min(100vh, 100svh);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
body.portal .section-tight { padding: 48px 0; }

/* ---------- Compact band headers ---------- */
body.portal .band-head {
  margin-bottom: 28px;
  max-width: 720px;
}
body.portal .band-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
body.portal .band-head__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
body.portal .band-head__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}
body.portal .band-head__lead {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ---------- Compliance (知识库边界) ---------- */
body.portal .compliance-panel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: stretch;
  padding: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
body.portal .compliance-panel__col h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}
body.portal .compliance-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.portal .compliance-list li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
}
body.portal .compliance-list strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 6px;
}
body.portal .compliance-panel__mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 8px;
  min-width: 120px;
}
body.portal .compliance-panel__hub {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--bg-inverse);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: var(--shadow-md);
}
body.portal .compliance-panel__mid p {
  font-size: 10px;
  font-family: ui-monospace, monospace;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-align: center;
}
body.portal .compliance-banner {
  margin-top: 14px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.06);
  border: 1px solid rgba(185, 28, 28, 0.18);
  border-radius: 8px;
  text-align: center;
}
body.portal .compliance-banner::before { content: '✘ '; }

/* ---------- MCP compact ---------- */
body.portal .mcp-panel {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 28px;
  align-items: start;
}
body.portal .mcp-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
body.portal .mcp-step {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
}
body.portal .mcp-step span {
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  background: var(--bg-inverse);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  margin-right: 6px;
}
body.portal .mcp-panel__aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body.portal .mcp-panel__shot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  max-height: 200px;
}
body.portal .mcp-panel__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
body.portal .mcp-code--compact .mcp-code__body {
  max-height: 180px;
  font-size: 11px;
  padding: 14px;
}

/* ---------- FAQ redesign ---------- */
body.portal .wrap--narrow { max-width: 960px; }
body.portal .portal-faq {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
body.portal .portal-faq__item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
body.portal .portal-faq__item:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
body.portal .portal-faq__item[open] {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
body.portal .portal-faq__item summary {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
  padding: 16px 40px 16px 18px;
  list-style: none;
  position: relative;
}
body.portal .portal-faq__item summary::-webkit-details-marker { display: none; }
body.portal .portal-faq__item summary::after {
  content: '+';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 400;
  color: var(--text-dim);
  transition: transform 0.2s;
}
body.portal .portal-faq__item[open] summary::after {
  content: '−';
}
body.portal .portal-faq__item .portal-faq__body {
  padding: 14px 18px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  margin-top: 0;
}
body.portal .portal-faq__item .portal-faq__body strong { color: var(--text); }
body.portal .portal-faq__item code {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  background: var(--bg-surface);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text);
}
body.portal .portal-faq__item--wide {
  grid-column: 1 / -1;
}


body.portal .sec-num { display: none; }
body.portal .sec-head {
  display: block;
  margin-bottom: 40px;
}
body.portal .sec-head .left { margin-bottom: 12px; }
body.portal .sec-head .h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.03em;
}
body.portal .sec-head .right {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 640px;
}
body.portal .hi-orange { color: var(--accent-cta); }
body.portal .hi-yellow { color: #b45309; }
body.portal .hi-rose { color: #be123c; }
body.portal .hi-accent { color: var(--accent-cta); font-weight: 700; }

body.portal .bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
body.portal .bento .cell {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  color: var(--text);
  box-shadow: none;
}
body.portal .bento .cell .body { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-top: 8px; }
body.portal .bento .h3 { font-size: 16px; font-weight: 600; }
body.portal .bento .img-wrap {
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  max-height: 200px;
}
body.portal .bento .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
body.portal .stamp {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  color: var(--text-muted);
  margin-bottom: 10px;
  border: none;
  box-shadow: none;
  transform: none;
}
body.portal .stamp.outlined {
  background: transparent;
  border: 1px solid var(--line);
}

body.portal .col-2 { grid-column: span 2; }
body.portal .col-3 { grid-column: span 3; }
body.portal .row-2 { grid-row: span 2; }

body.portal .showcase {
  display: grid;
  grid-template-columns: 1fr min(42%, 480px);
  gap: 40px;
  align-items: center;
  margin-bottom: 48px;
}
body.portal .showcase.flip { grid-template-columns: min(42%, 480px) 1fr; }
body.portal .showcase.flip .showcase-img { order: -1; }
body.portal .showcase-img {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  max-height: 320px;
  background: #0a0a0a;
}
body.portal .showcase-img img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  object-position: top;
  display: block;
}
body.portal .showcase-content .h2 { font-size: 28px; font-weight: 600; margin: 12px 0; }
body.portal .showcase-content .lead { font-size: 14px; color: var(--text-muted); line-height: 1.65; }
body.portal .showcase-list { list-style: none; margin-top: 16px; font-size: 13px; color: var(--text-muted); }
body.portal .showcase-list li { padding: 5px 0 5px 14px; position: relative; }
body.portal .showcase-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 11px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
body.portal .scribble,
body.portal .hand { display: none; }

body.portal .demo-shell {
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.68);
  --text-dim: rgba(255, 255, 255, 0.45);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  color: #fff;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
  max-height: 420px;
}
body.portal .demo-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-dim);
}
body.portal .demo-bar .live {
  color: #4ade80;
  font-weight: 600;
  font-size: 10px;
}
body.portal .demo-body { display: flex; min-height: 320px; max-height: 380px; }
body.portal .demo-side {
  width: 160px;
  border-right: 1px solid var(--line);
  padding: 12px;
  font-size: 11px;
  overflow-y: auto;
  flex-shrink: 0;
}
body.portal .demo-side .item {
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
}
body.portal .demo-side .item.active { background: rgba(255,255,255,0.08); color: var(--text); }
body.portal .demo-side .label { font-size: 10px; color: var(--text-dim); margin: 8px 0 4px; text-transform: uppercase; }
body.portal .demo-side .new-btn {
  width: 100%;
  padding: 8px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 11px;
  margin-bottom: 8px;
}
body.portal .demo-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
body.portal .demo-thread {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  font-size: 13px;
}
body.portal .demo-thread .msg { display: flex; gap: 8px; margin-bottom: 12px; }
body.portal .demo-thread .av {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  display: grid; place-items: center;
  font-size: 11px;
  flex-shrink: 0;
}
body.portal .demo-thread .bubble {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.5;
  color: var(--text-muted);
}
body.portal .demo-thread .msg.user .bubble { background: rgba(0,112,213,0.15); }
body.portal .demo-thread .citation { color: #7eb8ff; }
body.portal .demo-thread .think { display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 6px; }
body.portal .demo-input { border-top: 1px solid var(--line); padding: 10px; }
body.portal .suggest-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
body.portal .suggest {
  font-size: 11px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
}
body.portal .suggest:hover { border-color: rgba(255,255,255,0.3); color: var(--text); }
body.portal .input-row input {
  width: 100%;
  padding: 10px 12px;
  background: #0a0a0a;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 8px;
}
body.portal .ctrls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
body.portal .chip {
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
}
body.portal .chip.active { border-color: rgba(255,255,255,0.35); color: var(--text); }
body.portal .send-btn {
  margin-left: auto;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #fff;
  color: #000;
  font-weight: 600;
}

body.portal .portal-hero--demo {
  min-height: auto;
  padding-bottom: 0;
  align-items: stretch;
  color: var(--text);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
body.portal .portal-hero--demo .portal-hero__media { display: none; }
body.portal .portal-hero--demo .portal-hero__overlay { display: none; }
body.portal .portal-hero--demo .portal-hero__series {
  color: var(--text-dim);
}
body.portal .portal-hero--demo .portal-hero__title {
  color: var(--text);
  text-shadow: none;
}
body.portal .portal-hero--demo .portal-hero__tagline {
  color: var(--text-muted);
}
body.portal .portal-hero--demo .portal-btn--ghost {
  border-color: var(--line-strong);
  color: var(--text);
}
body.portal .portal-hero--demo .portal-btn--ghost:hover {
  background: var(--bg-surface);
}
body.portal .portal-hero--demo .portal-hero__body {
  padding-top: calc(var(--nav-h) + 48px);
  padding-bottom: 48px;
  text-align: left;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: center;
}

body.portal .compare table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
body.portal .compare th,
body.portal .compare td {
  border: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
}
body.portal .compare th { background: var(--bg-elevated); color: var(--text-muted); font-weight: 500; }
body.portal .compare .us { background: rgba(59, 158, 255, 0.12); }

/* ---------- KNOWLEDGE DIAGRAM ---------- */
body.portal .diagram {
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 36px 32px 48px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}
body.portal .diagram::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, var(--glow), transparent 70%);
  pointer-events: none;
}
body.portal .diagram-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  align-items: center;
  position: relative;
}
body.portal .dia-stack { display: flex; flex-direction: column; gap: 10px; }
body.portal .dia-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
body.portal .dia-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
body.portal .dia-card .badge {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  font-family: ui-monospace, monospace;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
body.portal .dia-card.aliyun-1 .badge { background: var(--accent-warm); color: #111; border-color: transparent; }
body.portal .dia-card.aliyun-2 .badge { background: var(--accent); color: #fff; border-color: transparent; }
body.portal .dia-card.aliyun-3 .badge { background: #a78bfa; color: #fff; border-color: transparent; }
body.portal .dia-card--model { background: rgba(255, 210, 63, 0.08); border-color: rgba(255, 210, 63, 0.25); }
body.portal .dia-card--model .badge { background: var(--bg-elevated); color: var(--text); }
body.portal .dia-card .meta { flex: 1; min-width: 0; }
body.portal .dia-card .name { font-weight: 600; font-size: 14px; color: var(--text); }
body.portal .dia-card .uri {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.portal .dia-card .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-teal);
  flex-shrink: 0;
  animation: portal-pulse 2s infinite;
}
@keyframes portal-pulse {
  0% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.5); }
  100% { box-shadow: 0 0 0 10px rgba(45, 212, 191, 0); }
}
body.portal .dia-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
body.portal .dia-arrow {
  width: 80px;
  height: 2px;
  background: var(--line-strong);
  position: relative;
}
body.portal .dia-arrow::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--line-strong);
  border-right: 2px solid var(--line-strong);
  transform: rotate(45deg);
}
body.portal .dia-arrow.flow {
  background: linear-gradient(to right, var(--accent) 50%, transparent 50%);
  background-size: 10px 2px;
  animation: portal-flow 2s linear infinite;
}
@keyframes portal-flow {
  0% { background-position: 0 0; }
  100% { background-position: 20px 0; }
}
body.portal .dia-core {
  width: 120px;
  height: 120px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-warm), #e65a1a);
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 700;
  color: #111;
  box-shadow: 0 0 40px rgba(255, 140, 66, 0.35);
  position: relative;
}
body.portal .dia-core::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: portal-spin 24s linear infinite;
}
@keyframes portal-spin { to { transform: rotate(360deg); } }
body.portal .dia-core__label {
  font-size: 10px;
  font-family: ui-monospace, monospace;
  font-weight: 500;
  letter-spacing: 0.1em;
  opacity: 0.8;
}
body.portal .dia-core__title {
  font-size: 16px;
  letter-spacing: -0.02em;
  margin-top: 2px;
  line-height: 1.2;
}
body.portal .dia-tag {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--line);
  letter-spacing: 0.08em;
}
body.portal .dia-tag--accent { background: rgba(59, 158, 255, 0.15); color: var(--accent); border-color: rgba(59, 158, 255, 0.3); }
body.portal .dia-blocked {
  position: absolute;
  bottom: 16px;
  right: 24px;
  font-weight: 600;
  font-size: 14px;
  color: #f87171;
  padding: 6px 12px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 6px;
}
body.portal .dia-blocked::before { content: '✘ '; }

/* ---------- MCP SECTION ---------- */
body.portal .mcp-split {
  display: grid;
  grid-template-columns: 1fr min(44%, 400px);
  gap: 32px;
  align-items: center;
}
body.portal .mcp-code {
  --text: #e8e8ec;
  --text-muted: rgba(255, 255, 255, 0.72);
  --text-dim: rgba(255, 255, 255, 0.45);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  background: #0d0d10;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
body.portal .mcp-code__bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
body.portal .mcp-code__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}
body.portal .mcp-code__bar i:nth-child(1) { background: #ff6b2c; }
body.portal .mcp-code__bar i:nth-child(2) { background: #ffd23f; }
body.portal .mcp-code__bar i:nth-child(3) { background: var(--accent-teal); }
body.portal .mcp-code__bar span {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 11px;
  font-family: ui-monospace, monospace;
}
body.portal .mcp-code__body {
  margin: 0;
  padding: 18px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-muted);
  overflow-x: auto;
}
body.portal .mcp-code__body .c-comment { color: var(--text-dim); }
body.portal .mcp-code__body .c-key { color: #ffd23f; }
body.portal .mcp-code__body .c-str { color: var(--accent-teal); }
body.portal .mcp-code__body .c-var { color: var(--accent-warm); }
body.portal .mcp-cli {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--text-dim);
}
body.portal .mcp-cli__cmd {
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 4px;
  background: var(--bg-surface);
}
body.portal .mcp-cli__ok { color: var(--accent-warm); }

/* ---------- BOT INTEGRATION ---------- */
body.portal .bot-flow {
  display: grid;
  grid-template-columns: 1fr min(38%, 360px);
  gap: 36px;
  align-items: start;
  margin-top: 32px;
}
body.portal .bot-steps {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}
body.portal .bot-steps li {
  position: relative;
  padding: 20px 20px 20px 76px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.2s, transform 0.2s;
}
body.portal .bot-steps li:hover {
  border-color: var(--line-strong);
  transform: translateX(4px);
}
body.portal .bot-steps li .num {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 44px;
  height: 44px;
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: ui-monospace, monospace;
  font-weight: 700;
  font-size: 15px;
}
body.portal .bot-steps li:nth-child(1) .num { background: rgba(255, 140, 66, 0.2); color: var(--accent-warm); border-color: rgba(255, 140, 66, 0.35); }
body.portal .bot-steps li:nth-child(2) .num { background: rgba(45, 212, 191, 0.15); color: var(--accent-teal); border-color: rgba(45, 212, 191, 0.3); }
body.portal .bot-steps li:nth-child(3) .num { background: rgba(59, 158, 255, 0.15); color: var(--accent); border-color: rgba(59, 158, 255, 0.3); }
body.portal .bot-steps li:nth-child(4) .num { background: rgba(248, 113, 113, 0.15); color: #f87171; border-color: rgba(248, 113, 113, 0.3); }
body.portal .bot-steps li h4 {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text);
}
body.portal .bot-steps li p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}
body.portal .bot-steps li p code {
  font-family: ui-monospace, monospace;
  background: var(--bg-elevated);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
  color: var(--accent-teal);
}
body.portal .bot-steps li .caveat {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 8px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
body.portal .bot-steps li .caveat.honest {
  background: rgba(255, 210, 63, 0.12);
  border-color: rgba(255, 210, 63, 0.3);
  color: #ffd23f;
}
body.portal .bot-shot {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
  padding: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
body.portal .bot-shot img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
}
body.portal .bot-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
}
body.portal .bot-pair-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
body.portal .bot-pair-card.flip { background: var(--bg-surface); }
body.portal .bot-pair-card .h3 { font-size: 17px; font-weight: 600; margin: 12px 0 8px; }
body.portal .bot-pair-card p { color: var(--text-muted); font-size: 13px; line-height: 1.6; margin-bottom: 14px; }
body.portal .bot-pair-card img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 8px;
}

/* ---------- TRUST GRID ---------- */
body.portal .trust-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  margin-top: 32px;
  align-items: start;
}
body.portal .trust-trace {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
}
body.portal .trust-trace .h3 { font-size: 16px; font-weight: 600; margin: 10px 0 12px; }
body.portal .trace-list {
  list-style: none;
  position: relative;
  margin: 8px 0 0;
  padding: 0;
}
body.portal .trace-list::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: var(--line-strong);
}
body.portal .trace-list li {
  position: relative;
  padding: 12px 0 12px 32px;
  border-bottom: 1px dashed var(--line);
}
body.portal .trace-list li:last-child { border-bottom: none; }
body.portal .trace-list li .dot {
  position: absolute;
  left: 0;
  top: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  z-index: 1;
}
body.portal .trace-list li .dot.ok { background: var(--accent-teal); border-color: transparent; }
body.portal .trace-list li .dot.warn { background: #ffd23f; border-color: transparent; }
body.portal .trace-list li .trace-h {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
  color: var(--text);
}
body.portal .trace-list li .trace-h code {
  font-family: ui-monospace, monospace;
  background: var(--bg-elevated);
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-teal);
}
body.portal .trace-list li .trace-h .bad {
  color: #f87171;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  background: rgba(248, 113, 113, 0.15);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 4px;
}
body.portal .trace-list li .trace-s {
  color: var(--text-dim);
  font-size: 12px;
  font-family: ui-monospace, monospace;
}
body.portal .trace-list .mono { font-family: ui-monospace, monospace; color: var(--text-dim); }
body.portal .trace-link {
  display: inline-block;
  margin-top: 16px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
body.portal .trust-side { display: grid; gap: 20px; }
body.portal .audit-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.2s;
}
body.portal .audit-card:hover { border-color: var(--line-strong); }
body.portal .audit-card .h3 { font-size: 16px; font-weight: 600; margin: 10px 0 6px; }
body.portal .audit-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.55; }
body.portal .audit-card img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  border-radius: 8px;
}
body.portal .audit-card code {
  font-family: ui-monospace, monospace;
  background: var(--bg-elevated);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}
body.portal .trust-callout {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}
body.portal .trust-callout p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}
body.portal .trust-callout strong {
  color: var(--accent-warm);
  font-weight: 600;
}
body.portal .trust-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
}
body.portal .trust-stats > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 8px;
  background: var(--bg-card);
}
body.portal .trust-stats b {
  display: block;
  font-weight: 700;
  font-size: 26px;
  color: var(--accent-warm);
  line-height: 1;
}
body.portal .trust-stats span {
  display: block;
  margin-top: 4px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: var(--text-dim);
}

/* ---------- SHARED IMAGE FRAME ---------- */
body.portal .portal-shot {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}
body.portal .portal-shot img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
}
body.portal .portal-shot--md img { max-height: 280px; }
body.portal .portal-shot--sm img { max-height: 200px; }

body.portal .compare {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
}
body.portal .compare .mark.yes { color: #4ade80; }
body.portal .compare .mark.no { color: #f87171; }
body.portal .compare .mark.ok { color: var(--text-muted); }

body.portal .bot-pair-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: ui-monospace, monospace;
  line-height: 1.5;
}
body.portal .trust-callout__text { margin-top: 12px; font-size: 14px; color: var(--text-muted); line-height: 1.65; }

/* ---------- MEMORY / PAIR GRID ---------- */
body.portal .portal-pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
body.portal .portal-pair-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
body.portal .portal-pair-card .h3 { font-size: 17px; font-weight: 600; margin: 12px 0 8px; }
body.portal .portal-pair-card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 14px; }
body.portal .portal-pair-card img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* ---------- STATS BAR ---------- */
body.portal .portal-stats-bar {
  background: linear-gradient(135deg, rgba(255, 140, 66, 0.12) 0%, rgba(59, 158, 255, 0.08) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 48px 0;
}
body.portal .portal-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
body.portal .portal-stat-num {
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
body.portal .portal-stat-label {
  margin-top: 8px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ---------- QUOTE ---------- */
body.portal .quote-block {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 48px 40px;
  background: var(--bg-card);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
  position: relative;
}
body.portal .quote-block blockquote {
  font-weight: 600;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 28px;
}
body.portal .quote-block .who {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
body.portal .quote-block .who .av {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 210, 63, 0.2);
  display: grid;
  place-items: center;
  font-weight: 600;
}
body.portal .quote-block .who-name { font-weight: 600; }
body.portal .quote-block .who-role { color: var(--text-dim); font-size: 13px; }

/* ---------- ROADMAP ---------- */
body.portal .roadmap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
body.portal .road-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
  padding: 20px;
  position: relative;
}
body.portal .road-item .when {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
body.portal .road-item h4 {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--text);
}
body.portal .road-item ul {
  list-style: none;
  font-size: 12px;
  color: var(--text-muted);
  padding: 0;
  margin: 0;
}
body.portal .road-item ul li {
  padding: 4px 0;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
body.portal .road-item ul li::before {
  content: '◆';
  color: var(--accent-warm);
  font-size: 8px;
  margin-top: 5px;
}
body.portal .road-item.now {
  background: rgba(255, 140, 66, 0.08);
  border-color: rgba(255, 140, 66, 0.3);
}
body.portal .road-item.now::before {
  content: 'NOW SHIPPING';
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--accent-warm);
  color: #111;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
body.portal .road-item.later { background: var(--bg-elevated); }
body.portal .road-item.dream {
  background: transparent;
  border-style: dashed;
  border-color: var(--line);
}
body.portal .road-item.dream .when { color: #a78bfa; }

body.portal .faq details,
body.portal .portal-faq__item {
  color: var(--text-muted);
}
body.portal .faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  padding: 16px 20px;
  background: var(--bg-elevated);
}
body.portal .faq summary { font-weight: 600; color: var(--text); cursor: pointer; }

body.portal .footer,
body.portal .logo-strip,
body.portal .announce { display: none; }

body.portal .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}
body.portal .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1024px) {
  body.portal .bento { grid-template-columns: 1fr 1fr; }
  body.portal .col-2, body.portal .col-3, body.portal .row-2 { grid-column: span 1; grid-row: span 1; }
  body.portal .showcase, body.portal .showcase.flip { grid-template-columns: 1fr; }
  body.portal .showcase.flip .showcase-img { order: 0; }
  body.portal .portal-hero--demo .portal-hero__body { grid-template-columns: 1fr; }
  body.portal .diagram-grid { grid-template-columns: 1fr; gap: 20px; }
  body.portal .dia-mid { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  body.portal .dia-arrow { width: 40px; }
  body.portal .bot-flow { grid-template-columns: 1fr; }
  body.portal .bot-shot { position: relative; top: 0; max-width: 400px; margin: 0 auto; }
  body.portal .mcp-panel { grid-template-columns: 1fr; }
  body.portal .compliance-panel { grid-template-columns: 1fr; }
  body.portal .compliance-panel__mid { flex-direction: row; padding: 8px 0; }
  body.portal .portal-faq { grid-template-columns: 1fr; }
  body.portal .trust-grid { grid-template-columns: 1fr; }
  body.portal .trust-callout { grid-template-columns: 1fr; }
  body.portal .bot-pair { grid-template-columns: 1fr; }
  body.portal .portal-pair-grid { grid-template-columns: 1fr; }
  body.portal .portal-stats-grid { grid-template-columns: 1fr 1fr; }
  body.portal .roadmap { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  body.portal .wrap { padding: 0 20px; }
  body.portal .bento { grid-template-columns: 1fr; }
  body.portal .demo-body { flex-direction: column; max-height: none; }
  body.portal .demo-side { width: 100%; border-right: none; border-bottom: 1px solid var(--line); max-height: 120px; }
  body.portal .portal-stats-grid { grid-template-columns: 1fr; }
  body.portal .roadmap { grid-template-columns: 1fr; }
  body.portal .quote-block { padding: 32px 20px; }
}
