/* Azure AI 体验中心 — product UI
   Fluent-aligned on purpose: this is a Microsoft seller's demo, so it should feel like a Microsoft product.
   Palette: canvas #F4F5F8 · surface #FFF · ink #1B2333 · brand #0F6CBD · ok #107C41 · warn #9D5D00 · bad #C50F1F
   One loud element: the dark live trace in the Agent workbench. Everything else stays calm. */

:root {
  --canvas: #F4F5F8;
  --surface: #FFFFFF;
  --surface-2: #F8F9FB;
  --line: #E3E6EC;
  --line-2: #D2D7E0;
  --ink: #1B2333;
  --ink-2: #4A5568;
  --ink-3: #7A8699;
  --brand: #0F6CBD;
  --brand-2: #115EA3;
  --brand-soft: #EBF3FC;
  --brand-line: #B4D6FA;
  --ok: #107C41;
  --ok-soft: #E9F6EE;
  --warn: #9D5D00;
  --warn-soft: #FFF6DC;
  --bad: #C50F1F;
  --bad-soft: #FDE7E9;
  --night: #0F1A2E;

  --font: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, monospace;

  --r-sm: 6px; --r: 8px; --r-md: 12px; --r-lg: 16px;
  --side: 232px;
  --shadow-pop: 0 8px 28px rgba(27, 35, 51, .14), 0 1px 3px rgba(27, 35, 51, .08);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.6; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 99; border-radius: 6px; }
.skip:focus { left: 8px; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 16px 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; grid-template-columns: 8px 8px; gap: 2px; }
.brand-mark i { width: 8px; height: 8px; display: block; }
.brand-mark i:nth-child(1) { background: #F25022; } .brand-mark i:nth-child(2) { background: #7FBA00; }
.brand-mark i:nth-child(3) { background: #00A4EF; } .brand-mark i:nth-child(4) { background: #FFB900; }
.brand b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.nav-group { margin: 14px 10px 6px; font-size: 12px; color: var(--ink-3); }
.nav { list-style: none; margin: 0; padding: 0; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r); color: var(--ink-2); text-decoration: none; position: relative; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav .live-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); opacity: .7; }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.side-foot p { margin: 0 0 6px; }
.side-foot kbd { font: inherit; font-size: 11px; padding: 0 5px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--ink-2); background: var(--surface-2); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 28px; background: rgba(244, 245, 248, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.crumb { font-size: 14px; color: var(--ink-3); }
.crumb b { color: var(--ink); font-weight: 600; }
.top .spacer { flex: 1; }
.cust { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.top .cust input { width: 9em; height: 30px; border: 1px solid transparent; background: transparent; padding: 4px 8px; border-radius: var(--r-sm); font-weight: 600; color: var(--ink); }
.top .cust input:hover, .top .cust input:focus { border-color: var(--line-2); background: var(--surface); outline: none; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.status-pill.ok .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.status-pill.bad .dot { background: var(--bad); }

.stage { padding: 28px 28px 72px; width: 100%; max-width: 1480px; }
.view { display: none; }
.view.active { display: block; animation: viewIn .22s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(32px, 3.6vw, 46px); line-height: 1.15; font-weight: 650; letter-spacing: -.02em; }
h2 { font-size: 24px; line-height: 1.3; font-weight: 600; }
h3 { font-size: 16px; line-height: 1.4; font-weight: 600; }
h4 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; text-decoration: none; }
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.subtle { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.subtle:hover { background: var(--surface); border-color: var(--line); }
.btn.hold { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 42px; padding: 0 20px; font-size: 15px; }
.btn.block { width: 100%; }
.btn .i { width: 16px; height: 16px; }

.field { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin: 0 0 6px; }
.field-row + .field-row { margin-top: 16px; }
textarea, input[type=text], input[type=search], input[type=number], select { width: 100%; border: 1px solid var(--line-2); border-radius: var(--r); padding: 8px 10px; background: var(--surface); }
textarea { resize: vertical; min-height: 88px; line-height: 1.6; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { accent-color: var(--brand); width: 15px; height: 15px; }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 2px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 4px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(27,35,51,.12); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); text-align: left; }
.chips button:hover { border-color: var(--brand-line); color: var(--brand); }
.chips button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; line-height: 18px; padding: 0 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; font-weight: 500; }
.tag.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.tag.new { background: #F3EDFD; color: #6B3FC9; border-color: transparent; }

.status { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; min-height: 20px; }
.status:empty { display: none; }
.status.busy::before { content: ""; width: 12px; height: 12px; border: 2px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
.status.err { color: var(--bad); }
.status.ok { color: var(--ok); }
@keyframes spin { to { transform: rotate(360deg); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h h3 { flex: 1; }

/* ---------- page header ---------- */
.ph { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ph > div:first-child { flex: 1 1 480px; }
.ph p { margin-top: 4px; color: var(--ink-2); max-width: 62em; }
.ph .tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- workbench template ---------- */
.wb { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.wb > .panel { position: sticky; top: 76px; }
.wb3 { display: grid; grid-template-columns: 320px minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.wb3 > .panel, .wb3 > .side-panel { position: sticky; top: 76px; }
.panel .card + .card { margin-top: 12px; }
.panel .actions { display: flex; gap: 8px; margin-top: 16px; }
.panel .actions .btn.primary { flex: 1; }
.canvas { min-height: 520px; }
.empty { border: 1px dashed var(--line-2); border-radius: var(--r-md); background: var(--surface); min-height: 420px; display: grid; place-items: center; text-align: center; padding: 40px; color: var(--ink-3); }
.empty .i { width: 36px; height: 36px; stroke-width: 1.2; color: var(--line-2); margin-bottom: 10px; }
.empty b { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }

/* markdown */
.md { font-size: 14px; line-height: 1.7; }
.md p { margin: 0 0 .7em; }
.md p:last-child { margin-bottom: 0; }
.md ul, .md ol { margin: 0 0 .7em; padding-left: 1.3em; }
.md h4 { font-size: 14px; margin: 1em 0 .4em; }
.md strong { font-weight: 600; }
.md code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); }
.md table { border-collapse: collapse; width: 100%; font-size: 13px; margin: .4em 0 .8em; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.md th { color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.caret::after { content: "▍"; color: var(--brand); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
pre.code, .kql { font-family: var(--mono); font-size: 12.5px; background: var(--night); color: #D7E3FF; padding: 10px 12px; border-radius: var(--r); white-space: pre-wrap; margin: 6px 0; overflow-x: auto; }
.datatable { width: 100%; border-collapse: collapse; font-size: 13px; }
.datatable th, .datatable td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; }
.datatable th { color: var(--ink-3); font-weight: 600; font-size: 12px; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: end; padding: 12px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.hero h1 { max-width: 13em; }
.hero .lede { margin-top: 14px; font-size: 16px; color: var(--ink-2); max-width: 40em; }
.hero .cta { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.live { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.live h4 { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.live h4 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.live-grid b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 650; line-height: 1.1; }
.live-grid span { font-size: 12.5px; color: var(--ink-3); }
.vendors { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); line-height: 1.8; }
.sec-h { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; }
.sec-h h2 { font-size: 18px; }
.sec-h p { color: var(--ink-3); font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 36px; }
.tile { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s var(--ease); min-height: 168px; }
.tile:hover { text-decoration: none; border-color: var(--brand-line); box-shadow: var(--shadow-pop); transform: translateY(-2px); }
.tile .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.tile .ico .i { width: 20px; height: 20px; }
.tile h3 { font-size: 15px; }
.tile p { font-size: 13px; color: var(--ink-2); flex: 1; }
.tile .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.home-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); align-items: baseline; }
.facts li:first-child { border-top: 0; padding-top: 0; }
.facts .n { font-family: var(--font-display); font-size: 24px; font-weight: 650; color: var(--brand); }
.facts p { font-size: 13.5px; }
.facts cite { display: block; font-style: normal; font-size: 12px; color: var(--ink-3); }
.goal-box { display: flex; gap: 8px; }
.goal-box input { font-size: 15px; height: 42px; }
.goal-box + .chips { margin-top: 10px; }
.route { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: r; }
.route li { counter-increment: r; display: flex; gap: 10px; align-items: baseline; padding: 6px 0; font-size: 13.5px; border-top: 1px solid var(--line); }
.route li::before { content: counter(r); width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); font-size: 11.5px; display: grid; place-items: center; color: var(--ink-3); flex: none; transform: translateY(3px); }
.route li span { margin-left: auto; color: var(--ink-3); font-size: 12px; }

/* ---------- agent workbench ---------- */
.presets { display: grid; gap: 6px; }
.presets button { display: flex; flex-direction: column; align-items: flex-start; gap: 0; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 8px 12px; cursor: pointer; }
.presets button b { font-size: 13px; font-weight: 600; }
.presets button span { font-size: 12px; color: var(--ink-3); }
.presets button:hover { border-color: var(--brand-line); }
.presets button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.presets button[aria-pressed="true"] b { color: var(--brand); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px; overflow: hidden; transition: border-color .15s; }
.step.run { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-soft); }
.step-h { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; }
.step-h::before { counter-increment: st; content: counter(st); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-3); }
.step.run .step-h::before { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.ok .step-h::before { background: var(--ok); border-color: var(--ok); color: #fff; content: "✓"; }
.step.err .step-h::before { background: var(--bad); border-color: var(--bad); color: #fff; content: "!"; }
.step.hold .step-h::before { background: var(--warn); border-color: var(--warn); color: #fff; content: "?"; }
.step-h b { font-size: 14px; font-weight: 600; display: block; }
.step-h small { font-size: 12px; color: var(--ink-3); }
.step-b { padding: 0 16px 16px 56px; display: none; }
.step.open .step-b { display: block; }
.step-tool { font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; }
.step-tool code { font-family: var(--mono); background: var(--surface-2); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); color: var(--ink-2); }
.gate { margin-top: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--warn-soft); border: 1px solid #F1D99B; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13.5px; }
.gate p { margin: 0; flex: 1 1 240px; }
.result-img { width: 100%; max-width: 420px; border-radius: var(--r); border: 1px solid var(--line); display: block; margin-top: 8px; }
.final { margin-top: 16px; background: var(--surface); border: 1px solid var(--brand-line); border-radius: var(--r-md); padding: 20px 22px; box-shadow: 0 0 0 3px var(--brand-soft); }
.final h3 { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }

/* trace — the loud element */
.trace { background: var(--night); color: #D5DEEE; border-radius: var(--r-md); padding: 16px 18px 18px; }
.trace-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.trace-h h3 { color: #fff; font-size: 14px; }
.trace-h span { font-size: 12px; color: #8A9BBA; }
.trace-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,.08); border-radius: var(--r); overflow: hidden; margin-bottom: 14px; }
.trace-stats div { background: #15233D; padding: 10px 12px; }
.trace-stats b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 600; color: #fff; line-height: 1.2; }
.trace-stats span { font-size: 11px; color: #8A9BBA; }
.lane { display: grid; grid-template-columns: 64px 1fr; align-items: center; min-height: 28px; border-top: 1px solid rgba(255,255,255,.06); }
.lane-n { font-size: 11.5px; color: #9DB0CF; }
.lane-t { position: relative; height: 28px; }
.bar { position: absolute; top: 7px; height: 14px; border-radius: 3px; min-width: 4px; background: #4C9BFF; transition: width .2s linear, left .2s linear; }
.bar.tool { background: #2CC9AC; }
.bar.safety { background: #F4B740; }
.bar.human { background: repeating-linear-gradient(45deg, #F4B740 0 5px, #C68B12 5px 10px); }
.bar.err { background: #FF5C8A; }
.bar.run { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.trace-axis { display: grid; grid-template-columns: 64px 1fr; font-size: 11px; color: #6F82A3; margin-top: 4px; }
.trace-axis div { display: flex; justify-content: space-between; }
.trace-log { margin-top: 12px; max-height: 300px; overflow: auto; font-size: 12px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 6px; }
.trace-log div { display: grid; grid-template-columns: 48px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px dashed rgba(255,255,255,.06); }
.trace-log .t { color: #6F82A3; }
.trace-log .m { display: block; color: #8A9BBA; font-size: 11.5px; }
.trace-log .safe { color: #5ED3B8; }
.trace-log .warn { color: #F4B740; }
.trace-log .bad { color: #FF7FA2; }
.trace-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: #8A9BBA; margin-top: 10px; }
.trace-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }

/* ---------- voice ---------- */
.orb { width: 120px; height: 120px; border-radius: 50%; margin: 8px auto 12px; display: grid; place-items: center; border: 0; cursor: pointer; background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; position: relative; box-shadow: 0 10px 30px rgba(15,108,189,.3); }
.orb::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; }
.orb.live { background: var(--ok); box-shadow: 0 10px 30px rgba(16,124,65,.3); }
.orb.live::after { border-color: var(--ok); animation: ring 1.6s ease-out infinite; }
@keyframes ring { from { opacity: .7; transform: scale(.92); } to { opacity: 0; transform: scale(1.18); } }
.voice-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.convo { height: 480px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 86%; padding: 8px 12px; border-radius: 14px; font-size: 14px; }
.msg.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.tool { align-self: stretch; max-width: none; background: var(--ok-soft); color: #0B5A30; font-size: 12px; font-family: var(--mono); border-radius: var(--r); white-space: pre-wrap; }
.records { font-size: 13px; }
.records h4 { margin: 16px 0 6px; font-size: 13px; color: var(--ink-2); }
.records h4:first-child { margin-top: 0; }
.records table { width: 100%; border-collapse: collapse; }
.records td, .records th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.records th { color: var(--ink-3); font-weight: 600; font-size: 12px; }
.records td:first-child, .records td:nth-child(2) { white-space: nowrap; }
.records tr.hit { background: var(--ok-soft); }
.records .new { animation: flash 1.4s ease; }
@keyframes flash { from { background: #C6EBD5; } to { background: transparent; } }

/* ---------- image studio ---------- */
.model-pick { display: grid; gap: 6px; }
.model-pick label { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; font-size: 13px; }
.model-pick label:hover { border-color: var(--brand-line); }
.model-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.model-pick input { accent-color: var(--brand); margin: 0; }
.model-pick small { display: block; font-size: 11.5px; color: var(--ink-3); }
.drop { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 14px; text-align: center; font-size: 13px; color: var(--ink-3); cursor: pointer; background: var(--surface-2); }
.drop:hover { border-color: var(--brand); color: var(--brand); }
.drop img { max-width: 100%; max-height: 160px; border-radius: 6px; display: block; margin: 0 auto 6px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.shot { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; }
.shot-img { aspect-ratio: 1 / 1; background: repeating-conic-gradient(#EEF0F4 0% 25%, #F8F9FB 0% 50%) 50% / 20px 20px; display: grid; place-items: center; position: relative; }
.shot-img.r32 { aspect-ratio: 3 / 2; }
.shot-img.r23 { aspect-ratio: 2 / 3; }
.shot-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shot-img .status { position: absolute; }
.shot-f { padding: 10px 14px; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); font-size: 12.5px; }
.shot-f b { font-size: 13.5px; }
.shot-f .muted { margin-left: auto; }
.history { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 2px; margin-top: 16px; }
.history img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); cursor: pointer; flex: none; background: var(--surface-2); }

/* ---------- model arena ---------- */
.vendor-pick { display: grid; gap: 10px; }
.vendor-pick h4 { font-size: 12px; color: var(--ink-3); font-weight: 600; margin-bottom: 4px; }
.arena { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.contender { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); display: flex; flex-direction: column; min-height: 300px; }
.contender-h { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.contender-h b { font-size: 14px; }
.contender-h .muted { font-size: 12px; margin-left: auto; }
.contender-b { padding: 14px 16px; flex: 1; overflow: auto; max-height: 440px; }
.contender-f { padding: 10px 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 11.5px; color: var(--ink-3); background: var(--surface-2); border-radius: 0 0 var(--r-md) var(--r-md); }
.contender-f b { display: block; font-size: 15px; color: var(--ink); font-weight: 600; }
.contender.win { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok); }

/* ---------- knowledge ---------- */
.hits { display: grid; gap: 10px; }
.hit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; font-size: 13px; }
.hit-h { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.hit-h b { font-size: 13.5px; }
.hit-h .muted { margin-left: auto; font-size: 12px; }
.hit p { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cite { color: var(--brand); background: var(--brand-soft); border-radius: 4px; padding: 0 4px; font-size: 12px; white-space: nowrap; }
.kb-list { list-style: none; margin: 0; padding: 0; font-size: 12.5px; color: var(--ink-2); max-height: 220px; overflow: auto; }
.kb-list li { padding: 4px 0; border-top: 1px solid var(--line); display: flex; gap: 6px; }
.kb-list li:first-child { border-top: 0; }

/* ---------- data ---------- */
.chart .row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr 56px; gap: 10px; align-items: center; font-size: 13px; padding: 3px 0; }
.chart .row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.chart .track { height: 10px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.chart .fill { height: 100%; background: var(--brand); border-radius: 3px; }
.chart .v { text-align: right; }

/* ---------- content factory ---------- */
.markets { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 16px; }
.market { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; font-size: 13.5px; }
.market h4 { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.market .copy { font-size: 15px; font-weight: 600; margin: 4px 0 8px; }
.market ul { margin: 0; padding-left: 1.1em; font-size: 13px; color: var(--ink-2); }
.market .note { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }
.market .risk { font-size: 12.5px; color: var(--warn); margin-top: 6px; }
.create-top { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }

/* ---------- trust ---------- */
.attacks { display: grid; gap: 8px; }
.attack { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 10px 12px; cursor: pointer; }
.attack:hover { border-color: var(--brand-line); }
.attack b { display: block; font-size: 13.5px; }
.attack span { font-size: 12px; color: var(--ink-3); }
.verdict { border-radius: var(--r-md); padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.verdict.blocked { border-color: #F3B5BB; background: var(--bad-soft); }
.verdict.passed { border-color: #B7DFC6; background: var(--ok-soft); }
.verdict h4 { font-size: 16px; margin-bottom: 8px; }
.filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.filters div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; font-size: 12px; }
.filters b { display: block; font-size: 13px; }
.filters .hit b { color: var(--bad); }
.layers { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.layers li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; font-size: 13px; }
.layers li b { display: block; font-size: 14px; margin-bottom: 4px; }
.layers li p { color: var(--ink-2); }

/* ---------- industry ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; cursor: pointer; font-size: 14px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.ind-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.scen { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; margin-bottom: 14px; }
.scen-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.scen-head h3 { font-size: 17px; }
.kpi { font-size: 12.5px; color: var(--ok); font-weight: 600; }
.scen-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.scen-cols h4 { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.scen-cols p { font-size: 13.5px; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.flow span { font-size: 12px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.flow i { font-style: normal; color: var(--ink-3); font-size: 12px; }
.scen-foot { margin-top: 14px; }
.proof { position: sticky; top: 76px; }
.proof .story { padding: 12px 0; border-top: 1px solid var(--line); font-size: 13px; }
.proof .story b { display: block; font-size: 14px; }

/* ---------- capability center ---------- */
.cc-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cc-stats { flex: 1 1 560px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cc-stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; }
.cc-stats b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 650; line-height: 1.15; }
.cc-stats span { font-size: 12.5px; color: var(--ink-3); }
.cc-act { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cc-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.cc-filter input[type=search] { width: 220px; height: 30px; padding: 4px 10px; }
.cc-latest { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); margin-left: 6px; cursor: pointer; }
.cc-layer { margin-bottom: 28px; }
.cc-layer-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cc-layer-h p { color: var(--ink-3); font-size: 13px; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cap-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; font-size: 13px; display: flex; flex-direction: column; }
.cap-card-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.cap-card h4 { font-size: 14.5px; line-height: 1.4; }
.cap-card p { margin-top: 6px; color: var(--ink-2); }
.cap-card .cap-prod { font-size: 12px; }
.cap-card .cap-prod a { color: var(--ink-3); }
.cap-card .cap-prod a:hover { color: var(--brand); }
.cap-card .cap-why { color: var(--ink-3); font-size: 12.5px; }
.cap-card .cap-api { font-size: 12px; color: var(--ink-3); }
.cap-card code, .api-t code { font-family: var(--mono); font-size: 11.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); color: var(--ink-2); }
.cap-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: auto; padding-top: 12px; }
.cap-foot .btn { margin-left: auto; }
.badge { font-size: 11px; padding: 0 7px; line-height: 18px; border-radius: 999px; white-space: nowrap; flex: none; font-weight: 500; display: inline-block; }
.badge.ga { background: var(--ok-soft); color: var(--ok); }
.badge.pre { background: var(--warn-soft); color: var(--warn); }
.badge.demo { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.badge.demo:hover { background: var(--brand); color: #fff; text-decoration: none; }
.chip { font-size: 11.5px; line-height: 20px; padding: 0 8px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.chip.live { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.hold { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.block { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.plain { background: var(--surface-2); color: var(--ink-3); }
.probe-out { margin-top: 10px; padding: 8px 10px; border-radius: var(--r); background: var(--surface-2); font-size: 12.5px; line-height: 1.55; word-break: break-word; }
.probe-out b { margin-right: 4px; }
.probe-out small { display: block; color: var(--ink-3); }
.probe-out.ok { background: var(--ok-soft); }
.probe-out.ok b { color: var(--ok); }
.probe-out.err { background: var(--bad-soft); color: var(--bad); }
.probe-out img { display: block; width: 140px; border-radius: 6px; margin-top: 6px; }
.scen-g { margin-bottom: 22px; }
.scen-g h3 { margin-bottom: 6px; }
.scen-row { display: grid; grid-template-columns: 240px 1fr; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: start; }
.scen-n { font-size: 13.5px; font-weight: 600; }
.scen-n small { display: block; font-weight: 400; font-size: 12px; color: var(--ok); }
.scen-link { color: var(--ink); }
.scen-caps { display: flex; flex-wrap: wrap; gap: 6px; }
.cap-pill { font-size: 12px; padding: 1px 9px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); white-space: nowrap; }
.cap-pill.t-live { background: var(--ok-soft); border-color: #B7DFC6; color: #0B5A30; }
.cap-pill.t-partial { background: var(--warn-soft); border-color: #F1D99B; color: #7A4700; }
.cap-pill.t-down { background: var(--bad-soft); border-color: #F3B5BB; color: var(--bad); }
.cap-pill.t-deployed { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.cap-pill.t-catalog { color: var(--ink-3); border-style: dashed; }
.cc-legend { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.model-grid { columns: 3 300px; column-gap: 14px; }
.model-v { break-inside: avoid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 14px; }
.model-v h3 { font-size: 14px; margin-bottom: 6px; }
.model-v h3 small { color: var(--ink-3); font-weight: 400; }
.model-v ul { list-style: none; margin: 0; padding: 0; }
.model-v li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.model-v li .mn { font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.model-v li.on { color: var(--ink); }
.model-v li.on .mn { font-weight: 600; }
.api-g { margin-bottom: 18px; }
.api-g h3 { font-size: 14px; margin-bottom: 4px; }
.api-x { opacity: .55; }
.api-t td:first-child { width: 56px; }
.api-t td:nth-child(2) { width: 280px; }
.api-t td:last-child { width: 70px; text-align: right; }
.api-t .verb { font-size: 11px; font-weight: 600; color: var(--ok); }
.api-t tr.api-res td { border-bottom: 0; padding: 0 8px 6px 72px; text-align: left; width: auto; }
.api-t tr.api-res .probe-out { margin-top: 0; }
.api-t tr.api-res td:empty { display: none; }

/* ---------- value ---------- */
.value-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; align-items: start; }
.slider { margin-bottom: 14px; }
.slider label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; color: var(--ink-2); }
.slider output { font-weight: 600; color: var(--ink); }
.slider input { width: 100%; accent-color: var(--brand); }
.roi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.roi > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; }
.roi b { display: block; font-family: var(--font-display); font-size: 28px; font-weight: 650; line-height: 1.15; }
.roi span { font-size: 12.5px; color: var(--ink-3); }
.roi > div:first-child b { color: var(--ok); }
.plan { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; }
.plan h4 { margin-bottom: 6px; }
.plan ul { margin: 0; padding-left: 1.1em; font-size: 13px; color: var(--ink-2); }

/* ---------- backstage drawer & notes ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-pop); z-index: 50; transform: translateX(100%); transition: transform .22s var(--ease); display: flex; flex-direction: column; }
.drawer.show { transform: none; }
.drawer-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer-h h3 { flex: 1; }
.drawer-b { overflow: auto; padding: 14px 18px; flex: 1; }
.apilog { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.apilog li { padding: 9px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.apilog code { font-family: var(--mono); font-size: 12px; color: var(--ink); word-break: break-all; }
.apilog .m { color: var(--ink-3); font-size: 11.5px; }
.apilog .s { font-weight: 600; text-align: right; }
.apilog .s.ok { color: var(--ok); }
.apilog .s.bad { color: var(--bad); }
.notes { position: fixed; left: calc(var(--side) + 20px); bottom: 20px; width: min(460px, calc(100vw - 40px)); max-height: 60vh; overflow: auto; background: #FFFBEA; border: 1px solid #F1D99B; border-radius: var(--r-md); padding: 16px 18px; z-index: 40; box-shadow: var(--shadow-pop); font-size: 13.5px; display: none; }
.notes.show { display: block; }
.notes h4 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.notes ul { margin: 0; padding-left: 1.1em; }
.notes li { margin: 4px 0; }
.notes .q { margin-top: 10px; padding-top: 10px; border-top: 1px solid #F1D99B; font-size: 12.5px; color: #6B5A22; }

body.present .side { display: none; }
body.present .shell { grid-template-columns: 1fr; }
body.present .stage { max-width: none; }
body.present .notes { left: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 1360px) {
  .wb3 { grid-template-columns: 300px minmax(0, 1fr); }
  .wb3 > .side-panel { grid-column: 1 / -1; position: static; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layers { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1080px) {
  .wb, .wb3, .hero, .home-split, .ind-body, .value-grid, .voice-cols, .create-top { grid-template-columns: 1fr; }
  .wb > .panel, .wb3 > .panel, .proof { position: static; }
  .arena { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 10px; }
  .side .nav-group, .side-foot { display: none; }
  .side .nav { display: flex; overflow-x: auto; gap: 2px; }
  .side .nav a { white-space: nowrap; }
  .side .nav a[aria-current="page"]::before { display: none; }
  .brand { padding-bottom: 8px; }
  .top { padding: 0 12px; gap: 6px; }
  .top .crumb, .top .cust { display: none; }
  .top .btn.subtle { font-size: 0; gap: 0; padding: 0 8px; }
  .top .btn.subtle .i { font-size: 14px; }
  .side .nav { flex-wrap: nowrap; }
  .side { overflow: hidden; }
  .stage { padding: 20px 16px 56px; }
  .tiles, .cc-stats, .roi, .plan, .scen-cols, .filters, .trace-stats, .layers { grid-template-columns: 1fr 1fr; }
  .scen-row { grid-template-columns: 1fr; gap: 6px; }
  .notes { left: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(15, 26, 46, .82); z-index: 80; display: grid; place-items: center; padding: 32px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--r-md); box-shadow: 0 20px 60px rgba(0,0,0,.4); background: repeating-conic-gradient(#EEF0F4 0% 25%, #F8F9FB 0% 50%) 50% / 20px 20px; }
.shot-img img { cursor: zoom-in; }
.chips + .field-row, .chips + .actions { margin-top: 16px; }
