:root {
  color-scheme: light;
  --ink: #17141f;
  --muted: #6f6b78;
  --line: #e8e5ed;
  --paper: #f8f7fa;
  --card: #ffffff;
  --purple: #5425d6;
  --purple-dark: #321477;
  --violet: #9162ff;
  --blue: #65c9ff;
  --peach: #ffd39e;
  --green: #49c898;
  --danger: #b4374c;
  font-family: Inter, "Avenir Next", Avenir, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--purple); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(101, 201, 255, .85); outline-offset: 3px; }

.topbar { position: sticky; z-index: 20; top: 0; min-height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(4vw, 24px); background: rgba(255, 255, 255, .9); border-bottom: 1px solid rgba(23, 20, 31, .08); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: .94rem; font-weight: 720; letter-spacing: .035em; }
.brand-mark { position: relative; width: 25px; height: 30px; display: inline-block; transform: rotate(29deg); }
.brand-mark i { position: absolute; display: block; width: 8px; height: 25px; border-radius: 99px; background: linear-gradient(180deg, var(--blue), var(--purple)); }
.brand-mark i:first-child { left: 4px; top: 0; }
.brand-mark i:last-child { right: 3px; bottom: 0; background: linear-gradient(180deg, var(--violet), var(--purple-dark)); }
.main-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.main-nav a { color: var(--ink); text-decoration: none; font-size: .86rem; font-weight: 590; }
.main-nav > a:not(.nav-action):hover { color: var(--purple); }
.main-nav .nav-action { display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; color: white; border-radius: 999px; background: linear-gradient(110deg, var(--purple-dark), var(--purple)); box-shadow: 0 8px 24px rgba(84, 37, 214, .22); }
.container { width: min(1220px, 92vw); margin: 34px auto 90px; }

h1, h2, h3, p { text-wrap: pretty; }
h1 { margin: 8px 0 20px; font-size: clamp(3rem, 6.5vw, 6.25rem); font-weight: 370; letter-spacing: -.065em; line-height: .98; }
h2 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.9rem); font-weight: 430; letter-spacing: -.04em; line-height: 1.04; }
h3 { margin: 0; font-size: 1.2rem; letter-spacing: -.025em; }
.eyebrow { margin: 0 0 14px; text-transform: uppercase; letter-spacing: .16em; font-size: .69rem; font-weight: 780; color: var(--purple); }
.gradient-text { color: transparent; background: linear-gradient(95deg, var(--purple) 10%, #7842eb 48%, #4caee8); -webkit-background-clip: text; background-clip: text; }
.muted, .section-heading > span { color: var(--muted); }

.dashboard-hero { position: relative; min-height: 540px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(390px, .9fr); gap: 45px; align-items: center; overflow: hidden; padding: clamp(40px, 6vw, 76px); border: 1px solid white; border-radius: 32px; background: radial-gradient(circle at 78% 65%, rgba(255, 211, 158, .5), transparent 27%), radial-gradient(circle at 88% 22%, rgba(145, 98, 255, .18), transparent 34%), linear-gradient(135deg, #fff 0%, #f5f1fb 56%, #eee8f5 100%); box-shadow: 0 30px 80px rgba(39, 21, 76, .09); }
.dashboard-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .16; background-image: linear-gradient(rgba(84,37,214,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(84,37,214,.12) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(90deg, transparent, black); }
.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 { max-width: 760px; }
.hero-lede { max-width: 650px; margin: 0; color: #514c5a; font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1.55; }
.hero-pills { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-top: 30px; }
.hero-pills span, .hero-pills a { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 13px; border: 1px solid rgba(84, 37, 214, .12); border-radius: 999px; background: rgba(255,255,255,.68); color: #514c5a; font-size: .77rem; text-decoration: none; }
.hero-pills a { color: var(--purple); font-weight: 700; }
.status-dot { width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(73, 200, 152, .15); }

.signal-stage { position: relative; z-index: 2; width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.signal-orb { position: relative; width: 70%; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(from 155deg, #311076, #8660ef 18%, #74cef7 35%, #f7c786 52%, #7944c9 69%, #291268 100%); box-shadow: inset 20px -24px 55px rgba(29, 9, 80, .55), inset -24px 18px 50px rgba(255, 224, 174, .35), 0 38px 70px rgba(62, 28, 137, .28); transform: rotate(-12deg); }
.signal-orb::before { content: ""; position: absolute; inset: 10%; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: repeating-radial-gradient(ellipse at 64% 45%, transparent 0 7px, rgba(255,255,255,.22) 8px 9px); transform: rotate(28deg) scaleX(.75); }
.signal-orb::after { content: ""; position: absolute; inset: 28% 18%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f7d4a1, #7b43bd 50%, #1d0a54 76%); box-shadow: 0 0 35px rgba(255, 218, 160, .55); }
.signal-orb span { position: absolute; inset: 38%; z-index: 1; border-radius: 50%; background: #180843; box-shadow: inset 5px 6px 12px rgba(255,255,255,.16); }
.orbit { position: absolute; border: 1px solid rgba(84, 37, 214, .18); border-radius: 50%; }
.orbit-one { width: 88%; height: 52%; transform: rotate(24deg); }
.orbit-two { width: 78%; height: 46%; transform: rotate(-34deg); }
.signal-card { position: absolute; display: grid; gap: 2px; min-width: 88px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.75); border-radius: 14px; background: rgba(255,255,255,.72); box-shadow: 0 14px 32px rgba(42,24,76,.12); backdrop-filter: blur(14px); }
.signal-card b { color: var(--purple); font-size: .68rem; letter-spacing: .13em; }
.signal-card span { font-size: .79rem; font-weight: 680; }
.signal-card-one { left: 0; top: 26%; }
.signal-card-two { right: 0; top: 44%; }
.signal-card-three { left: 16%; bottom: 8%; }

.workspace-section { margin-top: 78px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.section-heading h1 { font-size: clamp(2.2rem, 5vw, 4.5rem); }
.section-heading > span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: white; font-size: .72rem; }
.mode-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 18px; align-items: start; }
.mode-card { display: grid; gap: 17px; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: 0 18px 45px rgba(35, 20, 68, .055); }
.mode-card-primary { border-color: rgba(84, 37, 214, .24); box-shadow: 0 22px 60px rgba(84, 37, 214, .09); }
.archive-card { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); align-items: center; }
.archive-card .mode-card-head, .archive-card .mode-description, .archive-card .archive-guardrails { grid-column: 1; }
.archive-card > label, .archive-card > .notice, .archive-card > button { grid-column: 2; }
.archive-card > label { grid-row: 1 / span 2; }
.mode-icon.archive-icon { color: #153c31; background: linear-gradient(140deg, #9ce8cc, #49c898); box-shadow: 0 10px 25px rgba(73,200,152,.2); }
.archive-guardrails { display: flex; flex-wrap: wrap; gap: 7px; }
.archive-guardrails span { padding: 6px 9px; border-radius: 999px; color: #26775e; background: #e7f8f1; font-size: .64rem; font-weight: 680; }
.mode-card-head { display: flex; gap: 14px; align-items: center; }
.mode-card-head h3 { margin-top: 5px; font-size: 1.35rem; }
.mode-icon { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 15px; color: white; background: linear-gradient(140deg, var(--violet), var(--purple)); font-size: 1.4rem; box-shadow: 0 10px 25px rgba(84,37,214,.2); }
.muted-icon { color: var(--purple); background: #f0ecf8; box-shadow: none; }
.availability { color: #8b8693; font-size: .67rem; font-weight: 760; letter-spacing: .11em; text-transform: uppercase; }
.availability.active { color: #248968; }
.mode-description { margin: 0; color: var(--muted); font-size: .91rem; line-height: 1.55; }
.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 7px; color: #3e3946; font-weight: 680; font-size: .79rem; }
label small { color: #928d99; font-size: .67rem; font-weight: 520; }
label.check { display: flex; align-items: center; gap: 9px; font-weight: 540; }
input[type="date"], input[type="file"] { width: 100%; min-height: 45px; border: 1px solid #dad6e0; border-radius: 11px; padding: 10px 12px; background: #fbfafc; color: var(--ink); }
input[type="file"]::file-selector-button { margin: -6px 10px -6px -8px; padding: 8px 10px; border: 0; border-radius: 8px; background: #ece7f7; color: var(--purple); font-weight: 700; cursor: pointer; }
input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(145, 98, 255, .1); outline: 0; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--purple); }
button, .button-link, .pill-button { border: 0; border-radius: 999px; padding: 13px 19px; background: var(--purple); color: white; font: inherit; font-size: .84rem; font-weight: 720; cursor: pointer; text-decoration: none; text-align: center; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
button:hover, .button-link:hover, .pill-button:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(84,37,214,.22); }
.primary-action { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background: linear-gradient(105deg, var(--purple-dark), var(--purple) 60%, #7550e8); }
.secondary-action { color: var(--purple); background: #eeeaf6; }
button:disabled, input:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; transform: none; }
.notice { margin: 0; border: 1px solid #eee0c9; border-radius: 11px; background: #fff9ed; padding: 11px 13px; color: #725729; font-size: .76rem; line-height: 1.45; }
.format-help { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }
.format-help summary { cursor: pointer; color: var(--purple); font-size: .76rem; font-weight: 680; }
.format-help p { margin: 10px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.55; }
code { padding: 2px 5px; border-radius: 5px; background: #eeeaf5; color: #482397; font-size: .87em; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 12px 32px rgba(35, 20, 68, .035); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: .82rem; }
th { color: #918b99; background: #fcfbfd; font-size: .65rem; text-transform: uppercase; letter-spacing: .11em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbf9ff; }
.table-link { position: relative; z-index: 1; min-height: 44px; display: inline-flex; gap: 4px; align-items: center; color: var(--ink); font-weight: 720; text-decoration: none; }
.table-link span { color: var(--purple); }
.badge { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-size: .65rem; font-weight: 760; background: #eceaef; }
.badge-running, .badge-queued { background: #fff0c9; color: #745400; }
.badge-succeeded { background: #dff6ed; color: #147454; }
.badge-failed { background: #fde3e7; color: var(--danger); }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; }
.report-card, .empty-card { position: relative; min-height: 180px; display: grid; align-content: end; gap: 7px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--card); padding: 22px; color: var(--ink); text-decoration: none; }
.report-card::before { content: ""; position: absolute; width: 120px; height: 120px; right: -28px; top: -40px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--peach), var(--violet) 55%, var(--purple-dark)); opacity: .85; }
.report-card:hover { border-color: rgba(84,37,214,.35); transform: translateY(-2px); box-shadow: 0 15px 38px rgba(84,37,214,.08); }
.report-arrow { position: absolute; z-index: 1; top: 15px; right: 16px; color: white; font-size: 1.15rem; }
.report-card strong { font-size: 1.45rem; letter-spacing: -.035em; }
.report-card > span:not(.report-arrow), .report-card small, .stat span, .stat small, .empty-card > span { color: var(--muted); }
.empty-card { min-height: 180px; align-content: center; justify-items: center; text-align: center; }
.empty-orb { width: 48px; height: 48px; margin-bottom: 5px; border-radius: 50%; background: radial-gradient(circle at 35% 25%, var(--peach), var(--violet) 55%, var(--purple-dark)); box-shadow: 0 10px 25px rgba(84,37,214,.2); }

.site-footer { width: min(1220px, 92vw); min-height: 120px; display: grid; grid-template-columns: 1fr auto auto; gap: 30px; align-items: center; margin: 0 auto; padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .74rem; }
.footer-brand { font-size: .78rem; }
.footer-brand .brand-mark { transform: rotate(29deg) scale(.78); transform-origin: left center; margin-right: -4px; }

.back-link { display: inline-flex; margin-bottom: 20px; text-decoration: none; font-weight: 680; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 22px 0; }
.stat { display: grid; gap: 5px; min-height: 105px; align-content: center; border: 1px solid var(--line); border-radius: 16px; background: white; padding: 16px; }
.stat strong { font-size: 1.3rem; letter-spacing: -.025em; }
.downloads { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 25px; }
.downloads a { padding: 9px 13px; border-radius: 999px; background: #eeeaf6; text-decoration: none; font-size: .76rem; font-weight: 680; }
.stream-card { margin-top: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.alert { border: 1px solid #f0cbd1; border-radius: 12px; background: #fff1f3; padding: 14px; margin: 18px 0; color: var(--danger); }
.import-success { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 22px; border: 1px solid #bce8d8; border-radius: 18px; background: #edfaf5; }
.import-success > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); }
.import-success h3, .import-success p { margin: 0; }
.import-success p { margin-top: 5px; color: var(--muted); font-size: .78rem; }
.date-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.date-cloud a { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: white; font-size: .7rem; font-weight: 650; text-decoration: none; }
.date-cloud a:hover { border-color: var(--violet); color: var(--purple); }
.import-audit { margin-top: 35px; }
.log { min-height: 240px; max-height: 65vh; overflow: auto; white-space: pre-wrap; word-break: break-word; padding: 20px; border-radius: 16px; background: #17121f; color: #e7ddf6; font-size: .76rem; line-height: 1.6; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.empty { text-align: center; color: var(--muted); padding: 32px; }

.architecture-page { background: #fff; }
.architecture-page .container { width: min(1320px, 94vw); margin-top: 24px; }
.architecture-hero { position: relative; min-height: 690px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(400px, .95fr); gap: 40px; align-items: center; overflow: hidden; padding: clamp(42px, 7vw, 92px); border-radius: 32px; color: white; background: radial-gradient(circle at 79% 43%, rgba(114, 194, 255, .28), transparent 24%), radial-gradient(circle at 65% 90%, rgba(255, 198, 129, .18), transparent 30%), linear-gradient(135deg, #150a30, #341373 47%, #4a258a 100%); box-shadow: 0 35px 90px rgba(31, 12, 73, .22); }
.architecture-hero::before { content: ""; position: absolute; inset: 0; opacity: .17; background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px); background-size: 54px 54px; mask-image: radial-gradient(circle at 78% 50%, black, transparent 68%); }
.architecture-copy { position: relative; z-index: 2; }
.architecture-copy h1 { max-width: 780px; }
.architecture-copy h1 span { color: #bda2ff; }
.architecture-copy > p:not(.eyebrow) { max-width: 650px; color: #d8ceec; font-size: clamp(1.05rem, 1.45vw, 1.3rem); line-height: 1.55; }
.light-eyebrow { color: #b9dfff; }
.architecture-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 31px; }
.pill-button { display: inline-flex; align-items: center; justify-content: center; }
.light-button { background: white; color: var(--purple-dark); }
.glass-button { border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.09); color: white; backdrop-filter: blur(8px); }
.dark-button { background: var(--ink); color: white; }
.architecture-orb { position: relative; z-index: 2; width: min(100%, 530px); aspect-ratio: 1; justify-self: center; }
.core-orb { position: absolute; inset: 15%; border-radius: 50%; background: conic-gradient(from 210deg, #ffd09b, #814fe2 23%, #60c7ff 43%, #20104e 61%, #a16cf3 78%, #ffd09b); box-shadow: inset 18px -22px 50px rgba(28, 9, 73, .55), 0 40px 80px rgba(8, 3, 30, .35); }
.core-orb::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: repeating-radial-gradient(ellipse at 55% 45%, transparent 0 7px, rgba(255,255,255,.25) 8px 9px); transform: rotate(-24deg) scaleX(.78); }
.core-orb::after { content: ""; position: absolute; inset: 34%; border-radius: 50%; background: #13072f; box-shadow: 0 0 28px rgba(255, 215, 166, .5), inset 5px 7px 12px rgba(255,255,255,.12); }
.data-tag { position: absolute; padding: 8px 11px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(20,8,48,.38); color: #ede8f8; font-size: .6rem; font-weight: 760; letter-spacing: .16em; backdrop-filter: blur(10px); }
.tag-one { left: 3%; top: 24%; }
.tag-two { right: 0; top: 34%; }
.tag-three { left: 2%; bottom: 25%; }
.tag-four { right: 9%; bottom: 14%; color: #1b1240; background: #b8e4ff; }

.audience-strip { display: grid; grid-template-columns: 1.1fr repeat(3, 1fr); gap: 0; margin: 18px 0 100px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.audience-strip > * { padding: 20px; border-right: 1px solid var(--line); }
.audience-strip > *:last-child { border-right: 0; }
.audience-strip > span { color: var(--muted); font-size: .74rem; }
.audience-strip a { color: var(--ink); text-decoration: none; font-size: .78rem; font-weight: 680; }
.audience-strip b { margin-right: 8px; color: var(--purple); font-size: .63rem; }

.story-section, .value-section, .technical-section, .delivery-section { scroll-margin-top: 100px; }
.story-section { padding: 0 clamp(10px, 4vw, 55px); }
.story-intro { max-width: 900px; margin-bottom: 42px; }
.story-intro h2 { max-width: 720px; }
.story-intro .statement { margin: 17px 0 0; color: var(--purple); font-size: clamp(1.45rem, 3vw, 2.6rem); font-weight: 420; letter-spacing: -.04em; }
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.story-card { position: relative; min-height: 360px; overflow: hidden; display: flex; flex-direction: column; justify-content: end; padding: 30px; border-radius: 24px; }
.story-card::before { content: ""; position: absolute; width: 190px; height: 190px; right: -50px; top: -50px; border-radius: 50%; border: 1px solid rgba(255,255,255,.55); box-shadow: inset 0 0 0 28px rgba(255,255,255,.08), inset 0 0 0 58px rgba(255,255,255,.07); }
.story-card h3 { font-size: 1.55rem; }
.story-card p { margin: 10px 0 0; max-width: 350px; font-size: .88rem; line-height: 1.6; }
.step-number { position: absolute; left: 30px; top: 28px; font-size: .65rem; font-weight: 760; letter-spacing: .15em; }
.story-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 23px; border: 1px solid rgba(255,255,255,.52); border-radius: 50%; background: rgba(255,255,255,.2); font-size: 1.4rem; }
.violet-card { color: white; background: linear-gradient(145deg, #4c20b5, #8557eb); }
.blue-card { color: #17214b; background: linear-gradient(145deg, #a9e5ff, #6fc5ef); }
.peach-card { color: #3d244d; background: linear-gradient(145deg, #ffe2bd, #f6b8b9); }

.value-section { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; margin: 130px 0; padding: clamp(40px, 7vw, 90px); border-radius: 28px; background: #f5f2f8; }
.value-copy h2 { position: sticky; top: 110px; }
.value-list { display: grid; }
.value-list article { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 25px 0; border-bottom: 1px solid #dcd6e2; }
.value-list article:last-child { border-bottom: 0; }
.value-list article > span { color: var(--purple); font-size: .67rem; font-weight: 760; }
.value-list h3 { font-size: 1.25rem; }
.value-list p { margin: 8px 0 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }

.technical-section { overflow: hidden; padding: clamp(45px, 7vw, 90px); border-radius: 30px; color: white; background: #17121f; }
.technical-heading { display: grid; grid-template-columns: 1.2fr .8fr; gap: 60px; align-items: end; }
.technical-heading p:last-child { margin: 0; color: #aaa2b5; line-height: 1.65; }
.architecture-flow { display: grid; grid-template-columns: 1fr 34px 1fr 34px 1fr 34px 1fr; gap: 8px; align-items: center; margin: 55px 0; padding: 24px; border: 1px solid rgba(255,255,255,.11); border-radius: 22px; background: rgba(255,255,255,.035); }
.flow-column { display: grid; gap: 9px; }
.flow-label { margin: 0 0 3px 3px; color: #81798b; font-size: .59rem; font-weight: 760; letter-spacing: .15em; text-transform: uppercase; }
.flow-node { min-height: 72px; display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: #241d2e; }
.featured-node { border-color: rgba(159,112,255,.7); background: linear-gradient(135deg, #4c2794, #322052); }
.dimmed-node { opacity: .52; }
.flow-node div { display: grid; gap: 4px; }
.flow-node b { font-size: .76rem; }
.flow-node small { color: #9990a5; font-size: .62rem; }
.node-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,255,255,.05); }
.purple-dot { background: var(--violet); }
.blue-dot { background: var(--blue); }
.peach-dot { background: var(--peach); }
.green-dot { background: var(--green); }
.white-dot { background: white; }
.flow-arrow { color: #746b81; text-align: center; }
.technical-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.technical-grid article { min-height: 225px; padding: 23px; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(255,255,255,.04); }
.technical-grid h3 { margin-top: 27px; font-size: 1.15rem; }
.technical-grid p { color: #a9a1b3; font-size: .78rem; line-height: 1.6; }
.tech-kicker { color: #b9dfff; font-size: .61rem; font-weight: 760; text-transform: uppercase; letter-spacing: .14em; }

.delivery-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; margin: 130px 0; padding: 0 clamp(10px, 4vw, 55px); align-items: start; }
.delivery-copy > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.delivery-copy .pill-button { margin-top: 14px; }
.release-rail { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.release-rail li { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 23px 0; border-bottom: 1px solid var(--line); }
.release-rail li > span { color: var(--purple); font-size: .64rem; font-weight: 760; }
.release-rail div { display: grid; gap: 6px; }
.release-rail b { font-size: 1.04rem; }
.release-rail small { color: var(--muted); line-height: 1.5; }

.architecture-cta { position: relative; min-height: 440px; display: grid; place-items: center; align-content: center; overflow: hidden; padding: 55px; border-radius: 30px; color: white; text-align: center; background: radial-gradient(circle at 18% 100%, rgba(255,205,151,.33), transparent 26%), radial-gradient(circle at 90% 0%, rgba(101,201,255,.2), transparent 28%), linear-gradient(125deg, #2a0e66, #5425b2 52%, #351373); }
.architecture-cta h2 { position: relative; z-index: 2; max-width: 760px; font-size: clamp(2.3rem, 5vw, 4.5rem); }
.architecture-cta > *:not(.mini-orb) { position: relative; z-index: 2; }
.architecture-cta .pill-button { margin-top: 25px; }
.mini-orb { position: absolute; width: 280px; height: 280px; right: -65px; bottom: -95px; border-radius: 50%; background: conic-gradient(var(--blue), var(--violet), var(--peach), var(--purple)); box-shadow: inset 20px -20px 50px rgba(29,9,73,.5); opacity: .78; }

@media (max-width: 980px) {
  .dashboard-hero, .architecture-hero { grid-template-columns: 1fr; }
  .dashboard-hero { padding-bottom: 20px; }
  .signal-stage { width: min(520px, 90%); justify-self: center; }
  .architecture-orb { width: min(480px, 100%); }
  .mode-grid, .value-section, .delivery-section { grid-template-columns: 1fr; }
  .archive-card { grid-template-columns: 1fr; }
  .archive-card > *, .archive-card > label, .archive-card > .notice, .archive-card > button { grid-column: 1; grid-row: auto; }
  .story-grid { grid-template-columns: 1fr; }
  .story-card { min-height: 290px; }
  .technical-heading { grid-template-columns: 1fr; gap: 20px; }
  .architecture-flow { grid-template-columns: repeat(2, 1fr); }
  .flow-arrow { display: none; }
  .technical-grid { grid-template-columns: repeat(2, 1fr); }
  .audience-strip { grid-template-columns: 1fr 1fr; }
  .audience-strip > * { border-bottom: 1px solid var(--line); }
  .value-copy h2 { position: static; }
}

@media (max-width: 680px) {
  .topbar { min-height: 66px; padding: 0 18px; }
  .brand { font-size: .78rem; }
  .main-nav > a:not(.nav-action) { display: none; }
  .main-nav .nav-action { padding: 9px 13px; font-size: .72rem; }
  .container, .architecture-page .container { width: min(94vw, 100%); margin-top: 16px; }
  .dashboard-hero, .architecture-hero { min-height: 0; padding: 34px 24px; border-radius: 23px; }
  h1 { font-size: clamp(2.65rem, 14vw, 4rem); }
  .signal-stage { margin-top: 8px; }
  .signal-card { min-width: 72px; padding: 9px; }
  .hero-pills { align-items: stretch; flex-direction: column; }
  .workspace-section { margin-top: 58px; }
  .section-heading { align-items: start; flex-direction: column; }
  .upload-grid { grid-template-columns: 1fr; }
  .mode-card { padding: 21px; border-radius: 19px; }
  .site-footer { grid-template-columns: 1fr; gap: 10px; }
  .import-success { grid-template-columns: auto 1fr; }
  .import-success .button-link { grid-column: 1 / -1; }
  .architecture-actions { flex-direction: column; align-items: stretch; }
  .architecture-orb { margin: -30px 0; }
  .audience-strip { grid-template-columns: 1fr; margin-bottom: 75px; }
  .audience-strip > * { border-right: 0; }
  .value-section, .technical-section { margin: 90px 0; padding: 34px 23px; border-radius: 22px; }
  .architecture-flow, .technical-grid { grid-template-columns: 1fr; }
  .delivery-section { margin: 90px 0; gap: 45px; }
  .architecture-cta { min-height: 390px; padding: 45px 24px; border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Conversational analytics workspace */
.insights-page { background: #f5f5f7; }
.insights-page .container { width: min(1480px, 95vw); }
.insights-hero { position: relative; display: grid; grid-template-columns: 1.35fr .65fr; gap: 36px; align-items: end; overflow: hidden; min-height: 330px; padding: clamp(38px, 5vw, 72px); border-radius: 30px; color: white; background: radial-gradient(circle at 78% 18%, rgba(101,201,255,.28), transparent 25%), radial-gradient(circle at 15% 100%, rgba(255,211,158,.18), transparent 30%), linear-gradient(125deg, #160831, #351278 54%, #5424a1); box-shadow: 0 28px 70px rgba(38,17,85,.2); }
.insights-hero::after { content: ""; position: absolute; inset: 0; opacity: .17; background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px); background-size: 46px 46px; mask-image: linear-gradient(90deg, transparent, black); }
.insights-hero > * { position: relative; z-index: 1; }
.insights-hero h1 { max-width: 850px; margin-bottom: 16px; font-size: clamp(3rem, 5.8vw, 5.7rem); }
.insights-hero .gradient-text { background-image: linear-gradient(95deg, #c9b5ff, #8fbaff 52%, #75dcff); }
.insights-hero > div:first-child > p:last-child { max-width: 760px; margin: 0; color: #d6cceb; font-size: 1rem; line-height: 1.6; }
.trust-card { display: flex; gap: 14px; align-items: center; padding: 20px; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; background: rgba(255,255,255,.09); backdrop-filter: blur(15px); }
.trust-card div { display: grid; gap: 5px; }
.trust-card small { color: #c5b9da; line-height: 1.45; }
.trust-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #123d30; background: #7ce1b9; box-shadow: 0 0 0 7px rgba(124,225,185,.11); }

.insights-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 370px); gap: 20px; align-items: start; margin-top: 20px; }
.insights-shell.is-arranging-dashboard { grid-template-columns: minmax(0, 1fr); }
.is-arranging-dashboard .chat-panel { display: none; }
.is-arranging-dashboard .insights-dashboard { border-color: #cbbde9; box-shadow: 0 20px 55px rgba(55,31,94,.1); }
.insights-dashboard { min-width: 0; padding: clamp(22px, 3vw, 34px); border: 1px solid #dedbe2; border-radius: 20px; background: #f8f8fa; }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.dashboard-heading h2 { font-size: clamp(1.9rem, 3vw, 3rem); }
.dashboard-heading > div > p:last-child { max-width: 630px; margin: 10px 0 0; color: var(--muted); font-size: .85rem; }
.dashboard-actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: end; }
.freshness-chip { flex: 0 0 auto; padding: 8px 12px; border: 1px solid #dcd7e5; border-radius: 999px; background: white; color: var(--muted); font-size: .68rem; font-weight: 700; }
.dashboard-tool { min-height: 36px; padding: 8px 13px; border-radius: 10px; font-size: .67rem; font-weight: 720; }
.secondary-tool { border: 1px solid #d8d1e2; color: #5d5366; background: white; }
.primary-tool { border: 1px solid #5425d6; color: white; background: #5425d6; box-shadow: 0 4px 12px rgba(84,37,214,.14); }
.arrange-mode-callout { display: flex; gap: 12px; align-items: center; margin: -9px 0 20px; padding: 14px 16px; border: 1px solid #d5c9ef; border-radius: 14px; color: #4a267f; background: linear-gradient(110deg, #f1eaff, #f8f5ff); }
.arrange-mode-callout[hidden] { display: none; }
.arrange-mode-callout > span { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: white; background: #6034cf; font-size: 1rem; }
.arrange-mode-callout > div { display: grid; gap: 2px; }
.arrange-mode-callout strong { font-size: .7rem; }
.arrange-mode-callout small { color: #76658c; font-size: .61rem; line-height: 1.45; }
.coverage-strip { display: grid; grid-template-columns: .7fr 1.4fr 1fr; gap: 1px; overflow: hidden; margin-bottom: 14px; border: 1px solid #e4e0e9; border-radius: 17px; background: #e4e0e9; }
.coverage-strip > div { position: relative; display: grid; gap: 4px; min-height: 70px; align-content: center; padding: 14px 18px; background: white; }
.coverage-strip span { color: #9a94a1; font-size: .59rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.coverage-strip strong { overflow: hidden; color: #3c3446; font-size: .77rem; text-overflow: ellipsis; white-space: nowrap; }
.coverage-strip > div:last-child { grid-template-columns: auto 1fr; column-gap: 8px; }
.coverage-strip > div:last-child strong { grid-column: 2; }
.coverage-live-dot { width: 7px; height: 7px; align-self: center; border-radius: 50%; background: #49c898; box-shadow: 0 0 0 4px rgba(73,200,152,.13); }
.analytics-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.analytics-widget { min-width: 0; display: grid; align-content: start; min-height: 325px; padding: clamp(20px, 2.2vw, 28px); border: 1px solid #e2dee8; border-radius: 22px; background: white; box-shadow: 0 16px 38px rgba(40,24,70,.055); }
.analytics-widget.span-compact { grid-column: span 6; min-height: 235px; }
.analytics-widget.span-wide { grid-column: span 6; }
.analytics-widget.span-full { grid-column: 1 / -1; }
.analytics-widget > header { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 25px; }
.analytics-widget > header div { min-width: 0; }
.analytics-widget > header small { color: #918a99; font-size: .64rem; font-weight: 650; letter-spacing: .01em; }
.analytics-widget > header h3 { margin-top: 7px; font-size: clamp(1.1rem, 1.7vw, 1.32rem); line-height: 1.15; }
.widget-actions { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; }
.widget-kind { padding: 5px 8px; border-radius: 7px; color: var(--purple); background: #f0ebf9; font-size: .58rem; font-weight: 760; text-transform: uppercase; letter-spacing: .1em; }
.widget-edit { padding: 5px 8px; border: 1px solid #e2dce8; border-radius: 7px; color: #73697c; background: white; font-size: .58rem; font-weight: 720; }
.widget-edit:hover { color: var(--purple); border-color: #b9a7dc; background: #f8f5fc; box-shadow: none; }
.widget-kpi { position: relative; overflow: hidden; border-color: #ded8e8; background: radial-gradient(circle at 100% 0, rgba(112,73,219,.1), transparent 42%), linear-gradient(145deg, #fff, #faf8fd); }
.widget-kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(180deg, #5425d6, #8a69e7); }
.widget-kpi:nth-of-type(2)::before { background: linear-gradient(180deg, #6b43d4, #b48cef); }
.widget-kpi:nth-of-type(3)::before { background: linear-gradient(180deg, #168b82, #5bc6a9); }
.widget-kpi:nth-of-type(4)::before { background: linear-gradient(180deg, #8c326d, #d16aa6); }
.widget-kpi > header { margin-bottom: 14px; }
.widget-kpi .widget-kind { display: none; }
.widget-kpi .widget-evidence summary { color: #6541bd; }
.kpi-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: end; min-height: 78px; }
.kpi-value { color: #2b2434; font-size: clamp(3.15rem, 5vw, 5rem); font-weight: 430; line-height: .95; letter-spacing: -.065em; }
.kpi-delta { max-width: 100%; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; justify-self: end; padding: 7px 10px; border-radius: 12px; color: #167657; background: #e8f7f1; font-size: .7rem; font-style: normal; font-weight: 750; }
.kpi-delta.delta-down { color: #a7395a; background: #fdebf1; }
.kpi-delta.delta-flat { color: #6c6574; background: #f0edf3; }
.kpi-delta b { font: inherit; }
.kpi-delta em { padding-left: 6px; border-left: 1px solid currentColor; font-size: .61rem; font-style: normal; opacity: .72; }
.kpi-delta small { flex-basis: 100%; color: inherit; opacity: .68; font-size: .56rem; font-weight: 650; }
.kpi-context { align-self: center; justify-self: end; color: #837b8b; font-size: .64rem; }

.trend-chart { position: relative; min-height: 230px; padding-left: 38px; }
.trend-chart svg { width: 100%; height: 205px; overflow: visible; }
.trend-gridline { stroke: #eae6ee; stroke-width: 1; vector-effect: non-scaling-stroke; }
.trend-area { vector-effect: non-scaling-stroke; }
.trend-line { fill: none; stroke: #6235cf; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 5px 5px rgba(84,37,214,.18)); }
.trend-dot { fill: white; stroke: #6235cf; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.trend-y-axis { position: absolute; inset: 5px auto 29px 0; display: flex; flex-direction: column; justify-content: space-between; color: #9b94a3; font-size: .55rem; }
.trend-x-axis { display: flex; justify-content: space-between; padding: 0 2px; color: #9b94a3; font-size: .55rem; }

.column-chart { height: 235px; display: flex; gap: clamp(8px, 2vw, 20px); align-items: stretch; justify-content: space-around; padding: 0 4px; border-bottom: 1px solid #e9e5ed; }
.column-item { min-width: 0; flex: 1; display: grid; grid-template-rows: 28px 1fr 34px; gap: 7px; align-items: end; text-align: center; }
.column-item strong { align-self: center; font-size: .64rem; }
.column-item > span { overflow: hidden; align-self: start; color: #726b79; font-size: .57rem; text-overflow: ellipsis; white-space: nowrap; }
.column-track { position: relative; height: 100%; overflow: hidden; border-radius: 9px 9px 2px 2px; background: linear-gradient(180deg, #f4f1f7, #ece8f0); }
.column-track i { position: absolute; inset: auto 0 0; min-height: 3px; border-radius: inherit; background: linear-gradient(180deg, #8d68eb, #5526c1); box-shadow: inset 0 1px rgba(255,255,255,.25); }

.donut-chart { display: grid; grid-template-columns: minmax(210px, .75fr) minmax(260px, 1.25fr); gap: clamp(30px, 6vw, 72px); align-items: center; min-height: 270px; padding: 8px clamp(4px, 3vw, 30px); }
.donut-ring { position: relative; width: min(245px, 100%); aspect-ratio: 1; display: grid; place-items: center; justify-self: center; filter: drop-shadow(0 14px 22px rgba(63,35,107,.12)); }
.donut-ring > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.donut-track, .donut-segment { fill: none; stroke-width: 17; }
.donut-track { stroke: #eeeaf2; }
.donut-segment { stroke-linecap: butt; }
.donut-ring > div { position: relative; z-index: 1; width: 52%; aspect-ratio: 1; display: grid; place-items: center; align-content: center; border-radius: 50%; background: white; }
.donut-ring strong { color: #31283a; font-size: 1.7rem; }
.donut-ring span { max-width: 70px; color: #948d9b; font-size: .56rem; line-height: 1.25; text-align: center; text-transform: uppercase; letter-spacing: .08em; }
.donut-legend { display: grid; gap: 3px; }
.donut-legend > div { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 42px; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid #eeeaf2; }
.donut-legend > div:last-child { border-bottom: 0; }
.donut-legend svg { width: 10px; height: 10px; }
.donut-legend span { overflow: hidden; color: #554d5d; font-size: .72rem; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend strong { font-size: .72rem; }
.donut-legend small { color: #918a99; font-size: .63rem; text-align: right; }
.metric-table { overflow: auto; }
.metric-table table { width: 100%; border-collapse: collapse; font-size: .7rem; }
.metric-table th, .metric-table td { padding: 10px; border-bottom: 1px solid #ece8f0; text-align: left; }
.metric-table th:last-child, .metric-table td:last-child { text-align: right; }
.widget-evidence { margin-top: auto; padding-top: 18px; }
.widget-evidence summary { cursor: pointer; color: var(--purple); font-size: .65rem; font-weight: 700; }
.widget-evidence > div { max-height: 160px; overflow: auto; margin-top: 10px; padding: 10px; border-radius: 10px; background: #f7f5f9; }
.widget-evidence p { display: grid; gap: 3px; margin: 0 0 9px; color: var(--muted); font-size: .63rem; }
.widget-evidence code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget-empty { display: grid; justify-items: center; align-content: center; min-height: 150px; color: var(--muted); text-align: center; }
.widget-empty > span { color: #b19ed7; font-size: 2.2rem; }
.widget-empty p { margin: 8px 0 3px; color: var(--ink); font-weight: 700; }
.widget-empty small { font-size: .68rem; }
.dashboard-empty { grid-column: 1 / -1; }
.dashboard-empty .dashboard-tool { margin-top: 10px; }

/* Integration control plane */
.integrations-page { background: #f7f5fa; }
.integration-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); gap: 50px; align-items: end; margin: 30px 0 28px; padding: clamp(34px, 5vw, 68px); overflow: hidden; border-radius: 32px; color: #fff; background: radial-gradient(circle at 92% 5%, rgba(89,211,198,.32), transparent 28%), radial-gradient(circle at 15% 120%, rgba(113,60,230,.7), transparent 42%), #180f24; box-shadow: 0 25px 70px rgba(30,16,45,.16); }
.integration-hero h1 { max-width: 710px; margin: 8px 0 15px; font-size: clamp(2.6rem, 5vw, 5rem); line-height: .98; letter-spacing: -.055em; }
.integration-hero p:last-child { max-width: 720px; margin: 0; color: #cfc6d8; font-size: .88rem; line-height: 1.7; }
.integration-guardrail { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: center; padding: 17px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(255,255,255,.06); backdrop-filter: blur(10px); }
.integration-guardrail span { display: grid; gap: 3px; color: #e9e2ef; font-size: .66rem; text-align: center; }
.integration-guardrail b { color: #7ee4c0; font-size: .55rem; letter-spacing: .1em; }
.integration-guardrail i { color: #766b80; font-style: normal; }
.integration-error { margin: 0 0 20px; }
.connection-progress { display: flex; gap: 16px; align-items: center; margin: 0 0 20px; padding: 18px 22px; border: 1px solid #d8c9f8; border-radius: 18px; color: #44227f; background: #f3edff; }
.connection-progress div { display: grid; gap: 3px; }
.connection-progress span { color: #716580; font-size: .7rem; }
.progress-spinner { width: 24px; height: 24px; flex: 0 0 auto; border: 3px solid #d9caf6; border-top-color: #5c2bd0; border-radius: 50%; animation: integration-spin .8s linear infinite; }
@keyframes integration-spin { to { transform: rotate(360deg); } }
.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-bottom: 30px; }
.integration-card { display: flex; min-width: 0; flex-direction: column; padding: clamp(23px, 3vw, 34px); border: 1px solid #e1dce7; border-radius: 26px; background: #fff; box-shadow: 0 16px 45px rgba(38,23,50,.07); }
.integration-card > header { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.provider-mark { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; color: #fff; background: linear-gradient(135deg, #5c29d2, #9069ed); box-shadow: 0 10px 24px rgba(91,41,210,.2); font-size: 1.1rem; font-weight: 800; }
.provider-nextlevel { background: linear-gradient(135deg, #17394b, #2e7d82); box-shadow: 0 10px 24px rgba(28,89,94,.2); }
.integration-kicker { color: #918a99; font-size: .54rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.integration-card h2 { margin: 2px 0 0; font-size: 1.45rem; }
.connection-badge { padding: 7px 10px; border-radius: 999px; color: #6f6379; background: #f0edf3; font-size: .54rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.status-ready .connection-badge { color: #126148; background: #dff7ed; }
.status-paused .connection-badge { color: #6b4a11; background: #fff1cf; }
.status-testing .connection-badge, .status-queued .connection-badge { color: #4d2a9d; background: #eee7ff; }
.status-failed .connection-badge, .status-not_configured .connection-badge { color: #9a3833; background: #fee9e6; }
.integration-state-line { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 6px; padding: 13px 15px; border-radius: 13px; color: #716979; background: #f8f6f9; font-size: .66rem; }
.integration-state-line span { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.integration-state-line small { color: #98909f; font-size: .55rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.integration-state-line .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #b1a8b8; }
.status-ready .integration-state-line .status-dot { background: #49c699; box-shadow: 0 0 0 5px rgba(73,198,153,.12); }
.integration-details { display: grid; gap: 0; margin: 8px 0 18px; }
.integration-details div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 10px 2px; border-bottom: 1px solid #eeeaf1; }
.integration-details dt { color: #918a99; font-size: .61rem; }
.integration-details dd { min-width: 0; overflow-wrap: anywhere; margin: 0; color: #4c4552; font-size: .64rem; font-weight: 650; text-align: right; }
.integration-notice { display: grid; gap: 4px; margin: 0 0 16px; padding: 14px 15px; border-left: 3px solid #a889eb; border-radius: 5px 12px 12px 5px; color: #5d5366; background: #f6f2fd; }
.integration-notice strong { color: #3d2b58; font-size: .65rem; }
.integration-notice span { font-size: .6rem; line-height: 1.5; }
.integration-notice.success { border-color: #45bc91; background: #eefaf6; }
.integration-notice.success strong { color: #17664d; }
.integration-notice.warning { border-color: #dc8176; background: #fff4f2; }
.integration-notice.warning strong { color: #973e35; }
.integration-technical { margin-bottom: 20px; }
.integration-technical summary { cursor: pointer; color: #6b5d76; font-size: .61rem; font-weight: 700; }
.integration-technical > div { display: grid; gap: 9px; margin-top: 12px; padding: 13px; border-radius: 12px; background: #f8f6f9; }
.integration-technical p { display: grid; gap: 3px; margin: 0; }
.integration-technical p span { color: #918a99; font-size: .53rem; }
.integration-technical code { overflow-wrap: anywhere; color: #4c4056; font-size: .55rem; }
.integration-card > footer { display: flex; gap: 10px; margin-top: auto; }
.integration-card > footer form:first-child { flex: 1; }
.integration-action { width: 100%; min-height: 42px; padding: 10px 14px; border-radius: 12px; font-size: .64rem; }
.integration-action[disabled] { cursor: not-allowed; opacity: .42; }
.quiet-action { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border: 1px solid #ded8e4; border-radius: 12px; color: #5e5368; background: #fff; font-size: .64rem; font-weight: 750; text-decoration: none; }
.quiet-action:hover { border-color: #b6a4d5; color: #4d229f; }
.integration-history { margin-top: 0; }
.integration-manual-fallback { display: flex; gap: 30px; align-items: center; justify-content: space-between; margin: 28px 0 55px; padding: 24px 28px; border: 1px solid #ded8e4; border-radius: 20px; background: #fff; }
.integration-manual-fallback > div { display: flex; gap: 15px; align-items: center; }
.integration-manual-fallback strong { font-size: .78rem; }
.integration-manual-fallback p { margin: 4px 0 0; color: #817887; font-size: .64rem; }

@media (max-width: 900px) {
  .integration-hero { grid-template-columns: 1fr; gap: 30px; }
  .integration-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .integration-hero { margin-top: 15px; padding: 30px 22px; border-radius: 23px; }
  .integration-guardrail { grid-template-columns: 1fr; }
  .integration-guardrail i { display: none; }
  .integration-card > header { grid-template-columns: 46px minmax(0, 1fr); }
  .connection-badge { grid-column: 1 / -1; justify-self: start; }
  .integration-details div { grid-template-columns: 1fr; gap: 4px; }
  .integration-details dd { text-align: left; }
  .integration-manual-fallback { align-items: stretch; flex-direction: column; }
}

.chart-builder { width: min(720px, calc(100vw - 30px)); max-height: min(850px, calc(100vh - 30px)); overflow: auto; padding: 0; border: 0; border-radius: 24px; color: var(--ink); background: #fbfafe; box-shadow: 0 35px 100px rgba(21,11,39,.34); }
.chart-builder::backdrop { background: rgba(20,12,31,.66); backdrop-filter: blur(8px); }
.chart-builder-form > header { display: flex; gap: 22px; align-items: start; justify-content: space-between; padding: 28px 30px 23px; color: white; background: radial-gradient(circle at 90% 0, rgba(115,205,255,.25), transparent 35%), linear-gradient(125deg, #1b0b36, #482092); }
.chart-builder-form > header h2 { margin-top: 4px; font-size: 2rem; }
.chart-builder-form > header p:last-child { max-width: 560px; margin: 8px 0 0; color: #cfc3e4; font-size: .76rem; line-height: 1.55; }
.builder-close { width: 34px; height: 34px; flex: 0 0 auto; padding: 0; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: white; background: rgba(255,255,255,.08); font-size: 1.35rem; font-weight: 400; line-height: 1; }
.builder-close:hover { background: rgba(255,255,255,.16); box-shadow: none; transform: none; }
.builder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 26px 30px 18px; }
.builder-field { min-width: 0; display: grid; gap: 7px; }
.builder-field-wide { grid-column: 1 / -1; }
.builder-field > span { color: #51495a; font-size: .66rem; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.builder-field > span small { color: #9a92a1; font-weight: 600; text-transform: none; letter-spacing: 0; }
.builder-field > small { color: #8e8696; font-size: .61rem; line-height: 1.4; }
.builder-field input, .builder-field select { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid #dad4e0; border-radius: 11px; color: #302936; background: white; font: inherit; font-size: .76rem; }
.builder-field input:focus, .builder-field select:focus { border-color: #7450d5; outline: 0; box-shadow: 0 0 0 3px rgba(116,80,213,.12); }
.builder-field input:disabled, .builder-field select:disabled { color: #756c7c; background: #efedf2; }
.number-field { position: relative; }
.number-field input { padding-right: 48px; }
.number-field span { position: absolute; right: 12px; top: 50%; color: #8e8696; font-size: .64rem; transform: translateY(-50%); }
.builder-assurance { display: flex; gap: 11px; align-items: center; margin: 0 30px; padding: 13px 15px; border: 1px solid #dceae5; border-radius: 12px; color: #286952; background: #f1faf7; }
.builder-assurance > span { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: white; background: #4db68e; }
.builder-assurance p { display: grid; gap: 2px; margin: 0; }
.builder-assurance strong { font-size: .69rem; }
.builder-assurance small { color: #668477; font-size: .6rem; }
.builder-status { min-height: 18px; margin: 10px 30px 0; color: #6a6072; font-size: .65rem; }
.builder-status.error-text { color: #b52f52; }
.chart-builder-form > footer { position: sticky; z-index: 2; bottom: 0; display: grid; grid-template-columns: auto 1fr auto auto; gap: 9px; padding: 17px 30px 26px; border-top: 1px solid #e8e3ec; background: rgba(251,250,254,.96); backdrop-filter: blur(12px); }
.chart-builder-form > footer button { min-height: 40px; padding: 9px 15px; border-radius: 10px; font-size: .68rem; font-weight: 720; }
.builder-delete { border: 1px solid #f0c8d2; color: #ae3150; background: #fff4f6; }
.builder-cancel { border: 1px solid #d9d3df; color: #625969; background: white; }
.builder-save { border: 1px solid #5425d6; color: white; background: linear-gradient(135deg, #5425d6, #7348df); }

.chat-panel { position: sticky; top: 94px; overflow: hidden; height: min(680px, calc(100vh - 112px)); min-height: 440px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; border: 1px solid #312a38; border-radius: 18px; color: #f7f3ff; background: #18151c; box-shadow: 0 12px 34px rgba(23,14,37,.14); }
.chat-panel > header { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.chat-panel > header > div { min-width: 0; flex: 1 1 auto; display: flex; gap: 11px; align-items: center; }
.chat-panel > header > div > div { min-width: 0; display: grid; gap: 3px; }
.chat-panel > header strong { white-space: nowrap; }
.chat-panel header small { color: #938c98; font-size: .6rem; }
.assistant-orb { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #5a4d69; border-radius: 9px; color: #f4effa; background: #302838; box-shadow: none; }
.assistant-orb::after { content: "D"; font-size: .68rem; font-weight: 760; }
.chat-panel.is-thinking { border-color: #4b3d5c; }
.live-indicator { flex: 0 0 auto; color: #7de0b9; font-size: .62rem; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; }
.live-indicator::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; }
.live-indicator.is-thinking { color: #c9b5ee; }
.live-indicator.is-thinking::before { animation: discovery-pulse 1.4s ease-in-out infinite; }
.chat-messages { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 18px; scroll-padding-block: 18px; overscroll-behavior: contain; }
.chat-message { max-width: 88%; padding: 11px 13px; border-radius: 11px; color: #ddd8e1; background: #28232d; font-size: .74rem; line-height: 1.5; }
.chat-message p { margin: 0; white-space: pre-line; }
.chat-message > small { display: block; margin-top: 7px; color: #a99db8; }
.chat-answer-mode { width: fit-content; display: block; margin-top: 9px; padding: 3px 0; color: #99d8bf; font-size: .56rem; font-weight: 700; letter-spacing: .02em; }
.chat-message details { margin-top: 8px; color: #bda8ee; }
.chat-message details small { display: block; margin-top: 5px; color: #9c92a8; }
.chat-message details small b { color: #d7c8fa; }
.user-message { align-self: end; color: white; background: #5b31c7; }
.assistant-message { align-self: start; }
.discovery-thinking { box-sizing: border-box; width: 100%; max-width: 100%; min-height: 62px; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: center; padding: 13px 14px; overflow: visible; border: 1px solid #51435e; border-radius: 11px; background: #211c26; }
.discovery-thinking > div { min-width: 0; display: grid; gap: 3px; }
.discovery-thinking strong { color: #f2eef5; font-size: .69rem; font-weight: 680; line-height: 1.3; }
.discovery-thinking small { display: block; overflow: hidden; color: #a9a1ad; font-size: .59rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.discovery-spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.14); border-top-color: #b9a2e8; border-radius: 50%; animation: discovery-spin 1s linear infinite; }
.prompt-suggestions { position: relative; z-index: 1; display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px 12px; border-top: 1px solid rgba(255,255,255,.07); scrollbar-width: thin; overscroll-behavior-x: contain; }
.prompt-suggestions button { flex: 0 0 auto; padding: 7px 9px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; color: #c7bdce; background: transparent; font-size: .61rem; font-weight: 600; }
.prompt-suggestions button:hover { box-shadow: none; background: rgba(255,255,255,.06); }
.prompt-suggestions button:disabled { cursor: wait; opacity: .38; }
.chat-form { display: grid; gap: 7px; padding: 15px; border-top: 1px solid rgba(255,255,255,.08); background: #1e1a22; }
.chat-form > label { color: #a69cac; font-size: .61rem; text-transform: uppercase; letter-spacing: .1em; }
.chat-form > div { display: grid; grid-template-columns: 1fr 42px; gap: 8px; align-items: end; }
.chat-form textarea { width: 100%; resize: none; border: 1px solid #403a45; border-radius: 9px; padding: 11px; color: white; background: #17151a; font: inherit; font-size: .75rem; line-height: 1.45; }
.chat-form textarea:focus { border-color: var(--violet); outline: 0; box-shadow: 0 0 0 3px rgba(145,98,255,.12); }
.chat-form button { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; font-size: 1.15rem; }
.chat-form button:disabled { cursor: wait; color: #d6c6f7; background: #463852; opacity: 1; }
.chat-form > small { color: #827989; font-size: .58rem; }
.chat-form > small.error-text { color: #ff9cad; }
.chat-form > small.thinking-status { color: #c8b2f5; font-weight: 700; }

@keyframes discovery-spin { to { transform: rotate(360deg); } }
@keyframes discovery-pulse { 0%, 100% { opacity: .4; box-shadow: 0 0 0 0 currentColor; } 50% { opacity: 1; box-shadow: 0 0 0 5px transparent; } }

@media (prefers-reduced-motion: reduce) {
  .live-indicator.is-thinking::before { animation: none; }
  .discovery-spinner { animation-duration: 2.5s; }
}

.catalog-strip { display: grid; grid-template-columns: minmax(260px, .45fr) 1fr; gap: 50px; margin: 90px 0 40px; padding: clamp(26px, 4vw, 48px); border: 1px solid var(--line); border-radius: 24px; background: white; }
.catalog-list { display: flex; flex-wrap: wrap; gap: 8px; align-content: center; }
.catalog-list span { padding: 8px 11px; border-radius: 999px; color: #51485c; background: #f0edf4; font-size: .67rem; }

@media (max-width: 1120px) {
  .insights-shell { grid-template-columns: 1fr; }
  .chat-panel { position: static; height: min(680px, calc(100vh - 90px)); }
}

@media (max-width: 760px) {
  .insights-hero { grid-template-columns: 1fr; min-height: 0; padding: 34px 24px; border-radius: 23px; }
  .analytics-widget.span-compact, .analytics-widget.span-wide, .analytics-widget.span-full { grid-column: 1 / -1; }
  .dashboard-heading { align-items: start; flex-direction: column; }
  .dashboard-actions { justify-content: start; }
  .coverage-strip { grid-template-columns: 1fr; }
  .coverage-strip > div { min-height: 58px; }
  .donut-chart { grid-template-columns: 1fr; }
  .donut-ring { width: 190px; }
  .catalog-strip { grid-template-columns: 1fr; gap: 25px; margin-top: 60px; }
  .insights-dashboard { padding: 18px; }
  .builder-grid { grid-template-columns: 1fr; padding: 22px 20px 15px; }
  .builder-field-wide { grid-column: auto; }
  .chart-builder-form > header { padding: 24px 20px 20px; }
  .builder-assurance { margin: 0 20px; }
  .builder-status { margin-inline: 20px; }
  .chart-builder-form > footer { grid-template-columns: 1fr 1fr; padding: 14px 20px 22px; }
  .chart-builder-form > footer > span { display: none; }
  .builder-delete { grid-column: 1 / -1; }
  .prompt-suggestions { flex-wrap: wrap; overflow-x: visible; }
  .prompt-suggestions button { flex: 1 1 calc(50% - 6px); min-width: 0; }
}

/* Production identity and workspace access */
.account-menu { position: relative; }
.account-menu > summary { display: flex; gap: 8px; align-items: center; cursor: pointer; list-style: none; color: #51485b; font-size: .67rem; font-weight: 700; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-avatar, .user-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(135deg, #5425d6, #8c67e6); font-size: .68rem; font-weight: 800; }
.account-menu > div { position: absolute; z-index: 20; top: calc(100% + 12px); right: 0; width: 220px; display: grid; gap: 4px; padding: 10px; border: 1px solid #e0dae7; border-radius: 14px; background: rgba(255,255,255,.98); box-shadow: 0 20px 50px rgba(29,14,49,.16); }
.account-menu > div > span { padding: 8px 9px; color: #938a9c; font-size: .58rem; text-transform: capitalize; }
.account-menu > div a, .account-menu > div button { width: 100%; display: block; padding: 9px; border: 0; border-radius: 8px; color: #4d4455; background: transparent; font: inherit; font-size: .67rem; font-weight: 650; text-align: left; }
.account-menu > div a:hover, .account-menu > div button:hover { color: #4d20bd; background: #f2eef9; box-shadow: none; transform: none; }

.auth-page { background: radial-gradient(circle at 15% 16%, rgba(137,97,231,.12), transparent 30%), #f7f5fa; }
.auth-page .container { display: grid; align-items: center; min-height: calc(100vh - 190px); }
.auth-shell { display: grid; grid-template-columns: 1.1fr minmax(340px, .65fr); gap: clamp(45px, 9vw, 130px); align-items: center; padding: 70px 0; }
.auth-story h1 { margin: 12px 0 24px; font-size: clamp(3rem, 6vw, 6rem); line-height: .95; letter-spacing: -.065em; }
.auth-story > p:last-of-type { max-width: 650px; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.auth-trust { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.auth-trust span { padding: 8px 11px; border: 1px solid #dfd9e7; border-radius: 999px; color: #615768; background: rgba(255,255,255,.75); font-size: .62rem; font-weight: 650; }
.auth-card, .settings-card { display: grid; gap: 17px; padding: clamp(28px, 4vw, 42px); border: 1px solid #dfd9e6; border-radius: 25px; background: rgba(255,255,255,.94); box-shadow: 0 28px 75px rgba(38,18,66,.1); }
.auth-card h2, .settings-card h2 { margin-top: 5px; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.auth-card label, .settings-card label, .user-actions label { display: grid; gap: 7px; color: #554c5d; font-size: .65rem; font-weight: 700; }
.auth-card input, .settings-card input, .settings-card select, .user-actions input, .user-actions select { width: 100%; min-height: 47px; padding: 11px 13px; border: 1px solid #d9d2e0; border-radius: 11px; color: #2f2736; background: white; font: inherit; font-size: .74rem; }
.auth-card input:focus, .settings-card input:focus, .settings-card select:focus, .user-actions input:focus, .user-actions select:focus { border-color: #7652d8; outline: 0; box-shadow: 0 0 0 3px rgba(118,82,216,.12); }
.auth-card .primary-action, .settings-card .primary-action { width: 100%; margin-top: 5px; }
.form-error, .form-success { margin: 0; padding: 12px 14px; border-radius: 11px; font-size: .67rem; line-height: 1.5; }
.form-error { color: #9f2f48; border: 1px solid #f0c6d0; background: #fff2f5; }
.form-success { color: #196d51; border: 1px solid #bfe6d6; background: #eefaf5; }
.form-help, .account-identity { margin: 0; color: #8b8292; font-size: .62rem; text-align: center; }
.settings-card label small { color: #958d9d; font-size: .58rem; font-weight: 500; }

.settings-shell { display: grid; grid-template-columns: 1fr minmax(370px, .75fr); gap: clamp(45px, 9vw, 130px); align-items: center; min-height: 620px; padding: 65px 0; }
.settings-copy h1 { margin: 12px 0 18px; font-size: clamp(3rem, 5vw, 5rem); }
.settings-copy p:last-child { max-width: 560px; color: var(--muted); line-height: 1.65; }
.admin-hero { display: flex; gap: 30px; align-items: end; justify-content: space-between; padding: 64px 0 36px; }
.admin-hero h1 { margin: 8px 0 12px; font-size: clamp(3rem, 6vw, 5.5rem); }
.admin-hero p:last-child { max-width: 670px; color: var(--muted); line-height: 1.6; }
.security-badge { flex: 0 0 auto; display: flex; gap: 9px; align-items: center; margin-bottom: 10px; padding: 10px 13px; border: 1px solid #d6e9e1; border-radius: 999px; color: #34725c; background: #f2faf7; font-size: .65rem; font-weight: 700; }
.admin-error { margin-bottom: 20px; }
.admin-grid { display: grid; grid-template-columns: minmax(300px, .7fr) minmax(0, 1.3fr); gap: 22px; align-items: start; }
.create-user-card { position: sticky; top: 90px; }
.user-list-card, .audit-card { padding: clamp(24px, 3vw, 38px); border: 1px solid var(--line); border-radius: 25px; background: white; }
.user-list { display: grid; }
.user-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 17px 0; border-top: 1px solid #ebe7ef; }
.user-avatar { width: 42px; height: 42px; }
.user-summary { min-width: 0; display: grid; gap: 4px; }
.user-summary strong { font-size: .75rem; }
.user-summary span, .user-summary small { overflow: hidden; color: #82798a; font-size: .61rem; text-overflow: ellipsis; white-space: nowrap; }
.user-actions { position: relative; }
.user-actions > summary { cursor: pointer; list-style: none; padding: 8px 11px; border: 1px solid #dcd5e3; border-radius: 9px; color: #5d5364; font-size: .62rem; font-weight: 700; }
.user-actions > summary::-webkit-details-marker { display: none; }
.user-actions > form { position: absolute; z-index: 5; top: calc(100% + 8px); right: 0; width: 290px; display: grid; gap: 12px; padding: 17px; border: 1px solid #ddd6e5; background: white; box-shadow: 0 20px 55px rgba(35,18,54,.16); }
.user-actions > form:first-of-type { border-radius: 14px 14px 0 0; }
.user-actions > form:last-of-type { top: calc(100% + 302px); border-top: 0; border-radius: 0 0 14px 14px; }
.user-actions .check { display: flex; }
.user-actions .check input { width: auto; min-height: 0; }
.user-actions button { min-height: 39px; padding: 8px 10px; border-radius: 9px; font-size: .63rem; }
.text-action { color: #a22e4d; border: 1px solid #efcad3; background: #fff4f6; }
.audit-card { margin: 22px 0 80px; }
.member-welcome { display: flex; gap: 30px; align-items: center; justify-content: space-between; margin: 50px 0 25px; padding: clamp(28px, 4vw, 48px); border-radius: 25px; color: white; background: radial-gradient(circle at 92% 10%, rgba(99,210,255,.25), transparent 30%), linear-gradient(125deg, #1c0b3d, #4d2198); }
.member-welcome h2 { margin: 7px 0 11px; font-size: clamp(2rem, 4vw, 3.3rem); }
.member-welcome p:last-child { max-width: 760px; color: #d2c7e5; line-height: 1.6; }
.member-welcome .primary-action { flex: 0 0 auto; color: #39206f; background: white; }

@media (max-width: 900px) {
  .auth-shell, .settings-shell, .admin-grid { grid-template-columns: 1fr; }
  .auth-story { text-align: center; }
  .auth-story > p:last-of-type { margin-inline: auto; }
  .auth-trust { justify-content: center; }
  .create-user-card { position: static; }
}

@media (max-width: 760px) {
  .main-nav > a:not(.nav-action), .account-menu > summary > span:last-child { display: none; }
  .account-menu > div { right: -5px; }
  .auth-shell { padding: 38px 0; }
  .auth-page .auth-card { order: -1; }
  .auth-story h1 { font-size: 3.35rem; }
  .admin-hero, .member-welcome { align-items: stretch; flex-direction: column; }
  .user-row { grid-template-columns: auto minmax(0, 1fr); }
  .user-actions { grid-column: 1 / -1; }
  .user-actions > form { position: static; width: 100%; margin-top: 8px; border: 1px solid #ddd6e5 !important; border-radius: 12px !important; box-shadow: none; }
}
