/* Live demo (demo.html). Loaded after styles.css and reuses its tokens. */
:root {
  --ai: #2f7fd1; --ai-ink: #1d5fa3; --ai-bg: #e8f1fb; --ai-line: #cfe0f3;
  --person: #9a5b06; --person-bg: #fcf1df; --person-line: #f1d9b0;
  --ok: #2b7a4b; --ok-bg: #e4f3ea;
  --bad: #b33a2c; --bad-bg: #fbe9e6;
  --chip: #eef1f3; --chip-ink: #4a5864;
  --erp-side: #1c2a33; --erp-line: #e2e7eb; --erp-bg: #f4f6f8;
  --mop: #3f7d3a; --mop-2: #6aa84f;
}

.container.wide { max-width: 1280px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mini-h { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 18px 0 8px; font-weight: 800; }
.mini-h:first-child { margin-top: 0; }

/* Header */
.demo-head-actions { display: flex; align-items: center; gap: 10px; }
.demo-flag { font-size: .78rem; font-weight: 700; color: var(--person); background: var(--person-bg); border: 1px solid var(--person-line); padding: 5px 10px; border-radius: 99px; white-space: nowrap; }

/* Hero */
.demo-hero { background: var(--bg-alt); padding: 44px 0 36px; }
.demo-hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: center; }
.demo-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin-bottom: .4em; }
.demo-hero .lead { max-width: 680px; margin: 0; }
.co-card { background: #fff; border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.co-card .mop-logo { font-size: 1.05rem; margin-bottom: 4px; }
.co-card p { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.co-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.co-facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.co-facts dd { margin: 0; font-weight: 700; color: var(--navy); font-size: .92rem; }

/* Tabs */
.demo-tabs { position: sticky; top: 72px; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.demo-tabs .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.demo-tabs .container::-webkit-scrollbar { display: none; }
.tab { display: flex; align-items: center; gap: 10px; padding: 12px 18px 10px; text-decoration: none; border-bottom: 3px solid transparent; color: var(--muted); white-space: nowrap; }
.tab > span:last-child { display: grid; font-weight: 800; color: inherit; line-height: 1.25; }
.tab small { font-weight: 500; font-size: .78rem; color: var(--muted); }
.tab-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; background: var(--bg-alt); color: var(--navy); flex: none; }
.tab:hover { color: var(--navy); }
.tab.active { color: var(--navy); border-bottom-color: var(--navy); }
.tab.active .tab-n { background: var(--navy); color: #fff; }
.panel { padding: 28px 0 72px; }
.panel[hidden] { display: none; }

/* Pills and badges */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; background: var(--chip); color: var(--chip-ink); line-height: 1.4; vertical-align: middle; }
.pill img { width: 11px; height: auto; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--person-bg); color: var(--person); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.ai { background: var(--ai-bg); color: var(--ai-ink); }
.pill.person { background: var(--person-bg); color: var(--person); }
.pill.both { background: linear-gradient(90deg, var(--ai-bg), var(--person-bg)); color: var(--navy); }
.pill.mop { background: var(--ok-bg); color: var(--ok); }
.pill.sys { background: #fff; border: 1px solid var(--line); color: var(--chip-ink); font-weight: 600; }
.pill.stage { background: var(--navy); color: #fff; }
.ag-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 800; color: var(--ai-ink); background: var(--ai-bg); border: 1px solid var(--ai-line); padding: 3px 9px 3px 7px; border-radius: 99px; white-space: nowrap; }
.ag-badge img { width: 12px; height: auto; }
.new-tag { display: inline-block; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; background: var(--ai); color: #fff; padding: 1px 6px; border-radius: 4px; vertical-align: middle; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #d7e3ea; color: var(--navy); display: inline-grid; place-items: center; font-weight: 800; font-size: .78rem; flex: none; }
.avatar.ag { background: var(--ai-bg); }
.avatar.ag img { width: 14px; }

/* Tables */
.tbl-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--erp-line); border-radius: 12px; }
.tbl-wrap.flat { border: 0; border-radius: 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: .87rem; }
.tbl th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--erp-line); background: #fafbfc; white-space: nowrap; font-weight: 800; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--erp-line); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .nw { white-space: nowrap; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td, .tbl tr.click:focus td { background: #f5f9fd; }
.tbl tr.click:focus { outline: 2px solid var(--ai); outline-offset: -2px; }
.tbl tr.new td:first-child { box-shadow: inset 3px 0 0 var(--ai); }
.tbl tr.hl td { background: #fff7e3; }
.tbl tr.pending td { color: #9aa6b0; }
.trunc { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Shared cards */
.card { background: #fff; border: 1px solid var(--erp-line); border-radius: 12px; padding: 16px 18px; }
.card.flush { padding: 0; overflow: hidden; margin-top: 16px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.card-h.pad { padding: 14px 18px 4px; }
.card-h h4 { margin: 0; font-size: 1rem; }
.card-h a { font-weight: 700; color: var(--ai-ink); text-decoration: none; }
.kv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kv-grid > div { background: #f7f9fb; border: 1px solid var(--erp-line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.kv-grid small { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.kv-grid strong { color: var(--navy); }
.kv-grid span { font-size: .82rem; color: var(--muted); }
.flag { margin: 12px 0 0; background: var(--person-bg); border: 1px solid var(--person-line); color: var(--person); padding: 10px 14px; border-radius: 10px; font-weight: 700; font-size: .9rem; }
.ok-line { margin: 12px 0 0; font-weight: 600; font-size: .9rem; color: var(--navy); }
.erp-link { margin: 12px 0 0; }
.erp-link a { font-weight: 700; color: var(--ai-ink); text-decoration: none; }
.erp-link a:hover { text-decoration: underline; }
.dots { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: .9rem; }
.dots li::marker { color: var(--ai); }
.side-note { margin: 0; display: grid; gap: 10px; }
.side-note > div { background: #fff; border-radius: 12px; padding: 12px 16px; border: 1px solid var(--erp-line); }
.side-note dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.side-note dd { margin: 2px 0 0; font-weight: 600; color: var(--navy); }
.big-stat { background: var(--navy); color: #fff; border-radius: 14px; padding: 20px 22px; display: grid; gap: 2px; }
.big-stat strong { font-size: 2rem; line-height: 1.1; font-weight: 800; }
.big-stat span { font-weight: 600; color: rgba(255,255,255,.85); }
.big-stat small { color: rgba(255,255,255,.6); font-size: .82rem; }
.sum-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 14px 0; }
.note-ag { display: flex; gap: 10px; align-items: flex-start; background: var(--ai-bg); border: 1px solid var(--ai-line); border-radius: 10px; padding: 10px 12px; margin: 12px 0; font-size: .88rem; color: var(--navy); }
.note-ag .ag-badge { background: #fff; }
.lock { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted); margin: 12px 0 0; }
.lock img { width: 12px; }
.chip-btn { font: inherit; font-size: .84rem; font-weight: 700; border: 1px solid var(--line); background: #fff; color: var(--navy); padding: 6px 12px; border-radius: 99px; cursor: pointer; text-align: left; }
.chip-btn:hover { border-color: var(--navy); }
.chip-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ===== Part 1: the ERP ===== */
.wf-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--ai-bg); border: 1px solid var(--ai-line); color: var(--navy); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-size: .9rem; }
.wf-banner img { width: 14px; }
.wf-banner > span { flex: 1; min-width: 220px; }
.wf-banner a { font-weight: 800; color: var(--ai-ink); text-decoration: none; white-space: nowrap; }
.wf-banner.idle { background: #f6f8fa; border-color: var(--line); }
.erp { display: grid; grid-template-columns: 216px minmax(0, 1fr); border-radius: 16px; overflow: hidden; border: 1px solid #cdd5db; box-shadow: 0 24px 60px rgba(6,34,56,.12); background: var(--erp-bg); min-height: 660px; }
.erp-side { background: var(--erp-side); color: #b9c6cf; padding: 16px 10px; }
.erp-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; padding: 4px 8px 18px; }
.erp-logo small { display: block; font-weight: 600; font-size: .72rem; color: #8ea2af; }
.erp-navs { display: grid; gap: 2px; }
.erp-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; color: inherit; text-decoration: none; font-size: .9rem; font-weight: 600; }
.erp-nav:hover { background: rgba(255,255,255,.06); color: #fff; }
.erp-nav.active { background: rgba(255,255,255,.13); color: #fff; }
.erp-count { font-size: .72rem; background: rgba(255,255,255,.14); padding: 1px 8px; border-radius: 99px; color: #fff; }
.erp-sep { display: flex; align-items: center; gap: 7px; margin: 16px 12px 6px; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: #8fb7e3; font-weight: 800; }
.erp-sep img { width: 11px; filter: brightness(0) invert(1); opacity: .8; }
.erp-main { display: flex; flex-direction: column; min-width: 0; }
.erp-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--erp-line); }
.erp-crumb { font-weight: 800; color: var(--ink); white-space: nowrap; }
.erp-search { flex: 1; max-width: 320px; background: var(--erp-bg); border: 1px solid var(--erp-line); border-radius: 8px; padding: 6px 12px; color: #8a97a1; font-size: .85rem; white-space: nowrap; overflow: hidden; }
.erp-user { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--ink); font-weight: 700; }
.erp-who small { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; }
.erp-clock { font-size: .76rem; font-weight: 700; color: var(--muted); background: var(--erp-bg); border: 1px solid var(--erp-line); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.erp-body { padding: 20px; min-width: 0; }
.erp-note { margin: 12px 4px 0; }
.mop-mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--mop-2), var(--mop)); color: #fff; display: inline-grid; place-items: center; font-weight: 800; font-size: .82rem; flex: none; }
.mop-mark.big { width: 32px; height: 32px; font-size: .95rem; }
.mop-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); }
.view-h { margin-bottom: 14px; }
.view-h h3 { margin: 0 0 4px; font-size: 1.25rem; color: var(--ink); }
.view-h p { margin: 0; color: var(--muted); font-size: .9rem; max-width: 760px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters .muted { margin-left: 6px; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1320px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kpi { position: relative; background: #fff; border: 1px solid var(--erp-line); border-radius: 12px; padding: 13px 15px; display: grid; gap: 2px; }
.kpi.ag { border-color: var(--ai-line); }
.kpi .l { font-size: .74rem; font-weight: 700; color: var(--muted); padding-right: 18px; }
.kpi .v { font-size: 1.35rem; font-weight: 800; color: var(--ink); line-height: 1.2; }
.kpi .was { font-size: .76rem; color: var(--muted); }
.kpi.ag .was { color: var(--ai-ink); font-weight: 600; }
.kpi-ag { position: absolute; top: 11px; right: 11px; width: 20px; height: 20px; border-radius: 50%; background: var(--ai-bg); display: grid; place-items: center; }
.kpi-ag img { width: 10px; }
.dash-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; margin-top: 16px; }
.ag-card { border-color: var(--ai-line); }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #e8ecef; stroke-width: 1; }
.chart .ylab { font-size: 11px; fill: #8a97a1; text-anchor: end; font-family: inherit; }
.chart .xlab { font-size: 11px; fill: #8a97a1; text-anchor: middle; font-family: inherit; }
.chart .before { fill: #b9c4cc; }
.chart .after { fill: var(--mop); }
.chart .golive { stroke: var(--ai); stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart .golab { font-size: 11px; fill: var(--ai-ink); font-weight: 700; font-family: inherit; }
.todo { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.todo li { display: grid; gap: 1px; padding-bottom: 10px; border-bottom: 1px solid var(--erp-line); font-size: .88rem; }
.todo li:last-child { border-bottom: 0; padding-bottom: 0; }
.todo strong { color: var(--navy); }
.todo span { color: var(--muted); }
.todo a { color: var(--ai-ink); font-weight: 600; }

.agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.agent { background: #fff; border: 1px solid var(--ai-line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; }
.agent.off { border-color: var(--erp-line); background: #fbfcfd; }
.agent header { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.agent h4 { margin: 0; font-size: 1rem; }
.agent p { margin: 4px 0 10px; }
.agent dl { margin: 0 0 12px; display: grid; gap: 2px; font-size: .85rem; }
.agent dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; margin-top: 6px; }
.agent dd { margin: 0; color: var(--ink); }
.agent dd.acc { display: flex; flex-wrap: wrap; gap: 4px; }
.agent footer { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--erp-line); display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--muted); }
.agent footer strong { color: var(--ok); }
.act-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--erp-line); border-radius: 12px; }
.act-list li { display: grid; grid-template-columns: 120px 1fr auto; gap: 14px; align-items: start; padding: 11px 16px; border-bottom: 1px solid var(--erp-line); font-size: .88rem; }
.act-list li:last-child { border-bottom: 0; }
.act-list li.new { box-shadow: inset 3px 0 0 var(--ai); }
.act-t { color: var(--muted); font-weight: 700; font-size: .8rem; }
.act-w strong { display: block; color: var(--navy); }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(6,20,32,.55); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; border-radius: 16px; width: 100%; max-width: 780px; max-height: 90vh; overflow: auto; padding: 26px 26px 22px; position: relative; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal-box h3 { padding-right: 36px; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--navy); }
.modal-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.modal-box .side-note > div { background: #f7f9fb; }
.hist { margin: 0; padding-left: 18px; font-size: .88rem; display: grid; gap: 4px; color: var(--ink); }
.msg { margin: 0 0 14px; background: #f4f6f8; border-left: 3px solid var(--mop); padding: 12px 14px; border-radius: 0 10px 10px 0; font-size: .95rem; }

/* ===== Part 2: the workflow ===== */
.wf { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
.wf-steps { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; position: sticky; top: 148px; max-height: calc(100vh - 168px); overflow: auto; }
.wf-step { display: grid; grid-template-columns: 28px 1fr; gap: 10px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.wf-steps li:last-child .wf-step { border-bottom: 0; }
.wf-step:hover { background: #f7f9fb; }
.wf-step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .76rem; font-weight: 800; background: var(--bg-alt); color: var(--navy); }
.wf-step.done .n { background: var(--navy); color: #fff; }
.wf-step.current { background: var(--ai-bg); box-shadow: inset 3px 0 0 var(--ai); }
.wf-step.current .n { background: var(--ai); color: #fff; }
.wf-step-txt { display: grid; gap: 1px; min-width: 0; }
.wf-step .t { font-size: .72rem; color: var(--muted); font-weight: 700; }
.wf-step .h { font-weight: 700; font-size: .9rem; color: var(--navy); line-height: 1.3; }
.wf-step .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.wf-step .pill { font-size: .66rem; padding: 2px 7px; }
.wf-main { min-width: 0; }
.wf-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.wf-time { margin: 0; font-weight: 800; color: var(--ai-ink); font-size: .9rem; }
.wf-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; margin: 2px 0 6px; }
.wf-say { color: var(--muted); font-size: 1.02rem; max-width: 760px; margin-bottom: 14px; }
.wf-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.btn-gate { background: #e8930c; color: #fff; box-shadow: 0 0 0 0 rgba(232,147,12,.5); animation: gate 1.8s ease-out infinite; }
.btn-gate:hover { background: #c97d06; }
@keyframes gate { 0% { box-shadow: 0 0 0 0 rgba(232,147,12,.45); } 70% { box-shadow: 0 0 0 10px rgba(232,147,12,0); } 100% { box-shadow: 0 0 0 0 rgba(232,147,12,0); } }
.waiting { font-size: .85rem; font-weight: 700; color: var(--person); }
.wf-metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.metric { background: var(--navy); color: #fff; border-radius: 10px; padding: 7px 12px; }
.metric small { display: block; color: rgba(255,255,255,.65); font-size: .7rem; font-weight: 600; }
.metric strong { font-size: 1.02rem; }
.wf-stage { background: var(--bg-alt); border-radius: 16px; padding: 22px; min-height: 440px; }
.split { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 22px; align-items: start; }
.split-main, .split-side { min-width: 0; }

.phone { background: #fff; border-radius: 26px; border: 7px solid #13232f; overflow: hidden; box-shadow: var(--shadow); max-width: 340px; }
.phone-top { display: flex; align-items: center; gap: 10px; background: #1f4d43; color: #fff; padding: 10px 14px; }
.phone-top strong { display: block; font-size: .9rem; }
.phone-top small { color: rgba(255,255,255,.7); font-size: .72rem; }
.ph-av { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; font-weight: 800; font-size: .75rem; flex: none; }
.phone-body { background: #ece6dc; padding: 12px 10px; display: flex; flex-direction: column; gap: 7px; height: clamp(260px, calc(100vh - 500px), 400px); overflow-y: auto; }
.phone-foot { font-size: .68rem; text-align: center; color: var(--muted); padding: 6px; background: #f6f6f6; }
.day { align-self: center; font-size: .68rem; background: #fff; padding: 2px 10px; border-radius: 8px; color: #55636f; font-weight: 600; margin: 4px 0; }
.bub { max-width: 86%; padding: 7px 10px 5px; border-radius: 10px; font-size: .84rem; line-height: 1.42; box-shadow: 0 1px 1px rgba(0,0,0,.07); color: #1b2730; }
.bub.them { background: #fff; align-self: flex-start; border-top-left-radius: 3px; }
.bub.us { background: #d8f0cf; align-self: flex-end; border-top-right-radius: 3px; }
.bub .tag { display: block; font-size: .66rem; font-weight: 800; color: var(--ai-ink); margin-bottom: 2px; }
.bub .meta { display: block; text-align: right; font-size: .66rem; color: #6b7b85; margin-top: 2px; }
.bub.fresh { animation: rise .45s ease both; }
.file { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .78rem; font-weight: 700; background: rgba(0,0,0,.05); padding: 4px 9px; border-radius: 6px; color: var(--navy); }
.file::before { content: "PDF"; font-size: .6rem; font-weight: 800; background: #c0392b; color: #fff; padding: 1px 4px; border-radius: 3px; }
.bub .file { display: flex; width: fit-content; }

.ai-card { background: #fff; border-radius: 14px; border: 1px solid var(--ai-line); box-shadow: var(--shadow); overflow: hidden; }
.ai-card > header { display: flex; align-items: center; gap: 10px; padding: 11px 16px; background: #f1f7fd; border-bottom: 1px solid var(--ai-line); font-weight: 800; color: var(--navy); }
.ai-card.person { border-color: var(--person-line); }
.ai-card.person > header { background: #fff8ee; border-bottom-color: var(--person-line); }
.ai-card .body { padding: 16px; }
.ai-card .body > p:first-child { margin-top: 0; }
.ap-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }

.qdoc { background: #fff; border-radius: 10px; box-shadow: var(--shadow); padding: 22px; position: relative; overflow: hidden; font-size: .86rem; border: 1px solid var(--erp-line); }
.qdoc .wm { position: absolute; top: 26px; right: -44px; transform: rotate(35deg); background: var(--person-bg); color: var(--person); font-weight: 800; padding: 4px 56px; letter-spacing: .12em; font-size: .72rem; border: 1px solid var(--person-line); }
.qdoc-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 3px solid var(--mop); padding-bottom: 12px; margin-bottom: 12px; }
.qdoc-head small { color: var(--muted); }
.qdoc-no { text-align: right; display: grid; padding-right: 76px; }
.qdoc.compact .qdoc-no, .qdoc:not(:has(.wm)) .qdoc-no { padding-right: 0; }
.qdoc-no strong { font-size: 1.05rem; color: var(--ink); }
.qdoc-to { display: grid; gap: 1px; margin-bottom: 10px; }
.qdoc-to small { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.qdoc-to span { color: var(--muted); }
.qdoc .tbl { font-size: .82rem; }
.qdoc .tbl th, .qdoc .tbl td { padding: 7px 8px; }
.qdoc-tot { margin-left: auto; max-width: 300px; display: grid; gap: 4px; padding-top: 10px; border-top: 1px solid var(--erp-line); }
.qdoc-tot div { display: flex; justify-content: space-between; gap: 16px; font-variant-numeric: tabular-nums; }
.qdoc-tot .grand { font-weight: 800; font-size: 1rem; color: var(--ink); border-top: 2px solid var(--ink); padding-top: 4px; }
.qdoc.compact { padding: 16px; }
.qdoc.compact .qdoc-to span:last-child { display: none; }

.ap-card { background: #fff; border-radius: 14px; border: 1px solid var(--person-line); box-shadow: var(--shadow); overflow: hidden; max-width: 720px; }
.ap-card > header { display: flex; gap: 12px; align-items: center; padding: 14px 18px; background: #fff8ee; border-bottom: 1px solid var(--person-line); }
.ap-card > header strong { display: block; color: var(--navy); }
.ap-card > header small { color: var(--muted); }
.ap-body { padding: 18px; }
.ap-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.ap-sum > div { background: #f7f9fb; border-radius: 10px; padding: 9px 12px; display: grid; }
.ap-sum small { font-size: .7rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.ap-sum strong { color: var(--navy); font-size: .95rem; }
.ap-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ap-checks li { position: relative; padding-left: 28px; font-size: .92rem; }
.ap-checks li::before { position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; }
.ap-checks li.ok::before { content: "✓"; background: var(--ok-bg); color: var(--ok); }
.ap-checks li.warn::before { content: "!"; background: var(--person-bg); color: var(--person); }
.ap-checks li.warn { font-weight: 700; color: var(--person); }
.ap-checks li.idea::before { content: "?"; background: var(--ai-bg); color: var(--ai-ink); }

.mail { background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--erp-line); }
.mail-head { padding: 12px 16px; background: #f7f9fb; border-bottom: 1px solid var(--erp-line); display: grid; gap: 3px; font-size: .84rem; }
.mail-head small { display: inline-block; width: 58px; color: var(--muted); font-weight: 700; }
.mail-body { padding: 14px 16px; font-size: .88rem; }
.mail-body p { margin-bottom: .7em; }

.seq { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.seq li { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 10px; background: #f6f8fa; font-size: .88rem; color: var(--muted); }
.seq li span { font-weight: 800; font-size: .76rem; color: var(--navy); }
.seq li.done { background: var(--ok-bg); color: var(--ink); }
.seq li.now { background: var(--ai-bg); color: var(--ink); box-shadow: inset 3px 0 0 var(--ai); }

.erp-mini { background: #fff; border-radius: 12px; border: 1px solid var(--erp-line); box-shadow: var(--shadow); padding: 16px; }
.erp-mini > header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.erp-mini > header strong { color: var(--ink); }
.erp-mini .side-note > div { background: #f7f9fb; }
.erp-mini .fine { margin: 12px 0 0; }
.never { background: #fff; border-radius: 12px; border: 1px solid var(--erp-line); padding: 16px 18px; }
.never h4 { margin-bottom: 8px; }
.never ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.never li { padding-left: 26px; position: relative; font-weight: 600; color: var(--ink); font-size: .92rem; }
.never li::before { content: "✕"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--bad-bg); color: var(--bad); font-size: .65rem; display: grid; place-items: center; font-weight: 800; }

.summary .who-did { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.who-did > div { background: #fff; border-radius: 12px; padding: 16px 18px; border: 1px solid var(--erp-line); }
.who-did h4 { margin-bottom: 6px; }
.sum-cta { margin-top: 14px; background: #fff; border-radius: 12px; padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.sum-cta p { margin: 0; }

.wf-intro { background: var(--bg-alt); border-radius: 16px; padding: 32px; }
.wf-intro h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; }
.wf-intro .lead { max-width: 720px; }
.cast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.cast > div { background: #fff; border-radius: 12px; padding: 14px 16px; display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: center; }
.cast .avatar { grid-row: span 2; }
.cast strong { color: var(--navy); }
.cast small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.wf-intro-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }

/* ===== Part 3: everything we offer ===== */
.offer-intro h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: .3em; }
.offer-intro p { color: var(--muted); max-width: 720px; }
.offer-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; }
.on-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; padding: 7px 14px 7px 8px; border-radius: 99px; font-weight: 700; font-size: .88rem; color: var(--navy); text-decoration: none; }
.on-pill .k { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-alt); font-size: .74rem; }
.on-pill:hover { border-color: var(--navy); }
.on-pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.on-pill.active .k { background: rgba(255,255,255,.18); }
.offer-next { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.o-head { max-width: 780px; margin-bottom: 20px; }
.o-head h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 800; }
.o-head p { color: var(--muted); font-size: 1.02rem; }
.o-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.o-cols { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: start; }
.o-grid > *, .o-cols > *, .sync > *, .fix-layout > *, .dash-grid > *, .who-did > * { min-width: 0; }

.score-form.mini { padding: 24px; gap: 13px; }
.score-form.mini input, .score-form.mini select { padding: 9px 12px; }
.score-form.mini label small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.score-out { position: sticky; top: 150px; }
.score-bars { display: grid; gap: 10px; }
.bn-box { margin-top: 16px; background: #fff8ec; border: 1px solid #ffd59a; border-radius: 14px; padding: 18px 20px; }
.bn-box h3 { font-size: 1.6rem; color: #b86e00; margin-bottom: .4em; }
.bn-box .checks { margin-bottom: 12px; }
.bn-box p:last-child { margin: 0; }
.bn-box a, .o-head a, .sync-side a, .next-bn a { color: var(--ai-ink); font-weight: 700; }

.doc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px 36px; box-shadow: var(--shadow); max-width: 960px; }
.doc-meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; border-bottom: 3px solid var(--navy); padding-bottom: 14px; margin-bottom: 4px; }
.doc-meta h3 { font-size: 1.6rem; margin: 0; }
.doc > h4 { font-size: 1.12rem; margin: 26px 0 10px; }
.doc p { color: var(--ink); }
.src { display: inline-block; font-size: .7rem; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: var(--ok-bg); color: var(--ok); white-space: nowrap; }
.src.est { background: var(--person-bg); color: var(--person); }
.tree { margin: 4px 0 10px; font-size: .9rem; }
.tree ul { list-style: none; margin: 0; padding: 0 0 0 22px; }
.tree > ul { padding-left: 16px; }
.tree li { position: relative; padding: 6px 0 0 18px; }
.tree li::before { content: ""; position: absolute; left: 0; top: 0; height: 22px; width: 14px; border-left: 2px solid #c5cfd6; border-bottom: 2px solid #c5cfd6; border-bottom-left-radius: 6px; }
.tree li:not(:last-child)::after { content: ""; position: absolute; left: 0; top: 20px; bottom: 0; border-left: 2px solid #c5cfd6; }
.node { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #f6f8f9; border: 1px solid var(--line); padding: 5px 10px; border-radius: 8px; color: var(--ink); }
.tree > ul > li > .node { font-weight: 700; color: var(--navy); background: #fff; border-color: #b9c6cf; }
.node.goal { background: var(--navy); color: #fff; font-weight: 800; border-color: var(--navy); }
.rank { padding-left: 22px; display: grid; gap: 10px; }
.rank li { padding-left: 4px; }
.rank em { font-style: normal; font-weight: 700; color: var(--muted); }
.worth { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.worth > div { background: #f7f9fb; border: 1px solid var(--erp-line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 3px; align-content: start; }
.worth span { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 800; }
.worth strong { font-size: 1.3rem; color: var(--navy); }
.worth small { font-size: .8rem; color: var(--muted); }
.worth .rule5 { background: var(--navy); border-color: var(--navy); }
.worth .rule5 span, .worth .rule5 small { color: rgba(255,255,255,.7); }
.worth .rule5 strong { color: #fff; }

.fix-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.fix-list { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; position: sticky; top: 148px; }
.fix-group + .fix-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.fg-h { display: flex; align-items: center; gap: 8px; margin: 2px 6px 4px; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.race-l { width: 22px; height: 22px; border-radius: 6px; background: var(--navy); color: #fff; display: inline-grid; place-items: center; font-size: .74rem; font-weight: 800; flex: none; letter-spacing: 0; }
.fix-item { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: var(--navy); font-weight: 600; font-size: .9rem; }
.fix-item:hover { background: #f4f7f9; }
.fix-item.active { background: var(--ai-bg); color: var(--ai-ink); font-weight: 800; }
.sdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: #c6ced4; }
.sdot.live { background: var(--ok); }
.sdot.planned { background: #e8930c; }
.sdot-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: .74rem; color: var(--muted); margin: 10px 6px 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.sdot-key .sdot { margin-left: 4px; }
.sdot-key .sdot:first-child { margin-left: 0; }
.fix-detail { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px; box-shadow: var(--shadow); scroll-margin-top: 150px; }
.fix-detail h3 { font-size: 1.5rem; margin-bottom: .3em; }
.fix-detail > p { color: var(--muted); font-size: 1.02rem; }
.fix-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 6px; }
.fix-facts > div { background: #f7f9fb; border-radius: 10px; padding: 10px 12px; }
.fix-facts dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.fix-facts dd { margin: 2px 0 0; font-size: .9rem; color: var(--ink); font-weight: 600; }
.fix-facts .pill { white-space: normal; }
.sample { background: var(--bg-alt); border-radius: 12px; padding: 16px; }
.sample > *:last-child { margin-bottom: 0; }
.posts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.posts article { background: #fff; border-radius: 10px; padding: 12px 14px; font-size: .88rem; }
.posts h5 { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ai-ink); margin-bottom: 6px; }
.posts p { margin: 0; }
.best-ad { background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; display: grid; gap: 2px; border-left: 4px solid var(--ok); }
.best-ad small { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.best-ad span { font-size: .84rem; color: var(--ok); font-weight: 700; }
.chat-pair { display: flex; flex-direction: column; gap: 8px; background: #ece6dc; border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.chat-pair .bub { max-width: 92%; }
.transcript { background: #fff; border-radius: 10px; padding: 14px 16px; display: grid; gap: 8px; }
.tr-h { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; margin: 0 0 4px; }
.tr { margin: 0; font-size: .9rem; display: grid; grid-template-columns: 104px 1fr; gap: 10px; }
.tr b { font-size: .78rem; color: var(--muted); }
.tr.ai b { color: var(--ai-ink); }
.digest { background: #fff; border-radius: 10px; padding: 16px 18px; font-size: .9rem; }
.digest h5 { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ai-ink); margin: 12px 0 4px; }
.digest p { margin-bottom: .6em; }
.digest ol { padding-left: 18px; display: grid; gap: 6px; margin: 0 0 10px; }
.race-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.race-mini > div { background: #fff; border-radius: 10px; padding: 12px; display: grid; gap: 2px; border: 1px solid var(--erp-line); }
.race-mini > div.hot { border-color: #ffb547; background: #fff8ec; }
.race-mini strong { color: var(--navy); }
.race-mini span:not(.race-l) { font-weight: 700; font-size: .88rem; }
.race-mini small { color: var(--muted); font-size: .78rem; }
.mem-qs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mem-a { background: #fff; border-radius: 10px; padding: 14px 16px; border-left: 4px solid var(--ai); }
.mem-a p { margin-bottom: .5em; }
.src-line { font-size: .82rem; color: var(--ai-ink); font-weight: 700; margin: 0 !important; }

.eval-ctrl { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 12px; }
.verdict { font-weight: 800; color: var(--muted); }
.verdict.pass { color: var(--ok); }
.verdict.fail { color: var(--bad); }
.score { display: inline-block; font-weight: 800; padding: 2px 8px; border-radius: 6px; font-size: .82rem; }
.score.shi { background: var(--ok-bg); color: var(--ok); }
.score.sok { background: var(--ai-bg); color: var(--ai-ink); }
.score.slo { background: var(--person-bg); color: var(--person); }
.evals tbody tr:not(.pending) td { animation: rise .35s ease both; }

.phases { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.phases li { padding: 10px 14px 10px 40px; border-radius: 10px; background: #f6f8fa; position: relative; font-size: .9rem; }
.phases li::before { position: absolute; left: 12px; top: 11px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: .66rem; font-weight: 800; }
.phases li.done::before { content: "✓"; background: var(--ok-bg); color: var(--ok); }
.phases li.never::before { content: "✕"; background: var(--bad-bg); color: var(--bad); }
.sop { background: #fffdf6; border: 1px solid #ece3c7; border-radius: 12px; padding: 20px 22px; box-shadow: var(--shadow); }
.sop-k { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; margin-bottom: 6px; }
.sop ol { padding-left: 20px; display: grid; gap: 6px; font-size: .92rem; }

.sync { display: grid; grid-template-columns: 1.4fr .6fr; gap: 20px; align-items: start; }
.sync-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.sync-card > header { padding: 14px 18px; background: #f7f9fb; border-bottom: 1px solid var(--line); display: grid; }
.sync-card > header strong { color: var(--navy); }
.sync-card > header small { color: var(--muted); }
.agenda { margin: 0; padding: 8px 18px 14px 40px; display: grid; gap: 4px; }
.agenda li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.agenda li:last-child { border-bottom: 0; }
.agenda strong { display: block; color: var(--navy); }
.agenda span { color: var(--ink); font-size: .92rem; }
.sync-side p { margin-top: 12px; font-size: .92rem; }

.report { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px 28px; box-shadow: var(--shadow); }
.report > header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.report > header h3 { margin: 0; }
.next-bn { background: #fff8ec; border: 1px solid #ffd59a; border-radius: 12px; padding: 16px 18px; }
.next-bn h4 { color: #b86e00; margin-bottom: 4px; }
.next-bn p { margin: 0; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); display: grid; gap: 14px; }
.timeline li { position: relative; display: grid; gap: 1px; padding-left: 8px; }
.timeline li::before { content: ""; position: absolute; left: -31px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #c6ced4; }
.timeline li.done::before { background: var(--navy); border-color: var(--navy); }
.timeline li.now::before { background: var(--ai); border-color: var(--ai-bg); box-shadow: 0 0 0 3px var(--ai); }
.tl-d { font-size: .76rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.timeline strong { color: var(--navy); }
.timeline li > span:last-child { color: var(--muted); font-size: .9rem; }
.incl { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.incl .checks { margin-bottom: 0; }
.agency { margin-top: 14px; background: var(--navy); color: #fff; border-radius: 14px; padding: 20px 22px; }
.agency h4 { color: #fff; }
.agency p { color: rgba(255,255,255,.78); font-size: .92rem; }
.agency .eyebrow { color: #5fb0ff; }
.agency .btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.agency .btn-ghost:hover { background: #fff; color: var(--navy); }

/* ===== Part 4: built in n8n ===== */
.nn-wrap { background: #fafbfc radial-gradient(#dde4e9 1px, transparent 1px) 0 0 / 18px 18px; border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px 12px; }
.nn-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; min-height: 40px; margin-bottom: 14px; }
.nn-clock { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; min-width: 66px; text-align: center; }
.nn-status { font-size: .88rem; color: var(--muted); font-weight: 600; }
.nn-status.wait { color: var(--person); }
.nn-status.ok { color: var(--ok); }
.nn-canvas { display: grid; gap: 18px; overflow-x: auto; padding: 8px 4px 6px; }
.nn-row { display: flex; align-items: flex-start; }
.nn-group { flex: none; background: rgba(255,255,255,.8); border: 1px dashed #c4ced5; border-radius: 14px; padding: 8px 10px 10px; }
.nn-gname { margin: 0 0 8px 2px; font-size: .68rem; line-height: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }
.nn-nodes, .nn-lane { display: flex; align-items: flex-start; }
.nn-node { appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer; width: 100px; flex: none; display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--ink); }
.nn-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: #fff; border: 2px solid #8b98a3; color: var(--chip-ink); position: relative; transition: box-shadow .2s, transform .2s; }
.nn-txt { display: grid; gap: 1px; }
.nn-name { font-size: .74rem; font-weight: 700; line-height: 1.25; color: var(--navy); }
.nn-tag { font-size: .66rem; color: var(--muted); font-weight: 600; }
.nn-link { flex: none; width: 24px; height: 2px; background: #b5c0c8; position: relative; }
.nn-link::after { content: ""; position: absolute; right: -1px; top: -4px; border-left: 6px solid #b5c0c8; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.nn-nodes > .nn-link, .nn-lane > .nn-link { margin-top: 25px; }
.nn-row > .nn-link { margin-top: 56px; }
.nn-row > .nn-node { margin-top: 31px; }
.nn-branch { display: grid; gap: 12px; border-left: 2px solid #b5c0c8; padding-left: 10px; }
.nn-lane-l { font-size: .64rem; font-weight: 800; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 2px 7px; margin: 17px 8px 0 0; white-space: nowrap; min-width: 72px; text-align: center; }
.nn-cont { flex: none; margin: 50px 8px 0; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.nn-cont.down::after { content: " \2193"; }
.nn-cont:not(.down)::after { content: " \2192"; }

.k-trigger .nn-ico, .nn-ico.k-trigger { border-color: var(--navy); color: var(--navy); }
.k-erp .nn-ico, .nn-ico.k-erp { border-color: var(--mop); color: var(--mop); }
.k-erpw .nn-ico, .nn-ico.k-erpw { border-color: var(--mop); color: var(--mop); background: #eef6ec; }
.k-ai .nn-ico, .nn-ico.k-ai { border-color: var(--ai); color: var(--ai-ink); background: var(--ai-bg); }
.k-person .nn-ico, .nn-ico.k-person { border-color: var(--person); color: var(--person); background: var(--person-bg); }
.k-sim .nn-ico, .nn-ico.k-sim { border-style: dashed; }
.k-done .nn-ico, .nn-ico.k-done { border-color: var(--ok); color: var(--ok); }

.nn-node:hover .nn-ico { transform: translateY(-2px); box-shadow: var(--shadow); }
.nn-node:focus-visible { outline: none; }
.nn-node:focus-visible .nn-ico { outline: 3px solid var(--ai); outline-offset: 3px; }
.nn-node.is-sel .nn-ico { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--navy); }
.nn-node.is-sel .nn-name { text-decoration: underline; text-underline-offset: 3px; }
.nn-node.is-run .nn-ico { animation: nnrun 1s ease-in-out infinite; }
.nn-node.is-wait .nn-ico { animation: nnwait 1.2s ease-in-out infinite; }
.nn-node.is-done .nn-ico::after { content: "\2713"; position: absolute; right: -8px; top: -8px; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); color: #fff; font-size: .62rem; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.nn-node.is-skip { opacity: .35; }
@keyframes nnrun { 0%, 100% { box-shadow: 0 0 0 0 rgba(47,127,209,.5); } 50% { box-shadow: 0 0 0 9px rgba(47,127,209,0); } }
@keyframes nnwait { 0%, 100% { box-shadow: 0 0 0 0 rgba(154,91,6,.5); } 50% { box-shadow: 0 0 0 9px rgba(154,91,6,0); } }

.nn-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; font-size: .74rem; color: var(--muted); }
.nn-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; border: 2px solid #8b98a3; background: #fff; margin-right: 6px; vertical-align: -2px; }
.nn-legend .k-ai i { border-color: var(--ai); background: var(--ai-bg); }
.nn-legend .k-erp i { border-color: var(--mop); }
.nn-legend .k-erpw i { border-color: var(--mop); background: #eef6ec; }
.nn-legend .k-person i { border-color: var(--person); background: var(--person-bg); }
.nn-legend .k-sim i { border-style: dashed; }

.nn-detail { margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; box-shadow: var(--shadow); scroll-margin-top: 150px; }
.nn-d-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.nn-d-head .nn-ico { flex: none; }
.nn-d-head .eyebrow { margin: 0 0 2px; }
.nn-d-head h3 { margin: 0; font-size: 1.35rem; }
.nn-d-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; align-items: start; }
.nn-d-grid > * { min-width: 0; }
.nn-d-grid p { font-size: .95rem; }
.nn-kv { display: grid; gap: 6px; margin: 0; }
.nn-kv > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; background: #f7f9fb; border-radius: 8px; padding: 7px 10px; }
.nn-kv dt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; color: var(--muted); padding-top: 2px; }
.nn-kv dd { margin: 0; font-size: .88rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.nn-wa { background: #ece6dc; border-radius: 12px; padding: 12px; }
.nn-wa small { display: block; font-size: .72rem; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.nn-wa p { margin: 0; background: #fff; border-radius: 10px 10px 10px 2px; padding: 10px 12px; font-size: .9rem; line-height: 1.5; max-width: 92%; }
.nn-wa.us small { text-align: right; }
.nn-wa.us p { background: #dcf8c6; border-radius: 10px 10px 2px 10px; margin-left: auto; }
.nn-note { font-size: .88rem; margin: 10px 0 0; }
.nn-tot { font-size: .9rem; margin: 10px 0 0; }
.nn-checks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: .86rem; }
.nn-checks li { padding-left: 25px; position: relative; }
.nn-checks li::before { position: absolute; left: 0; top: 1px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: .62rem; font-weight: 800; }
.nn-checks li.ok::before { content: "\2713"; background: var(--ok-bg); color: var(--ok); }
.nn-checks li.warn::before { content: "!"; background: var(--person-bg); color: var(--person); }
.nn-checks li.idea::before { content: "+"; background: var(--ai-bg); color: var(--ai-ink); }
.nn-form { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: #fff; }
.nn-form h4 { text-align: center; margin: 0 0 10px; }
.nn-form-q { font-size: .88rem; margin: 0; }
.nn-form label { display: grid; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--navy); margin-top: 12px; }
.nn-fake-select, .nn-fake-text { display: block; border: 1px solid #cfd8de; border-radius: 8px; padding: 8px 10px; font-weight: 500; font-size: .86rem; color: var(--ink); background: #fff; }
.nn-fake-select::after { content: "\25BE"; float: right; color: var(--muted); }
.nn-donecard { border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.nn-donecard .eyebrow { color: var(--ok); margin-bottom: 4px; }
.nn-donecard h4 { margin: 0 0 12px; }
.nn-done-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nn-done-stats > div { background: #f4f6f8; border-radius: 8px; padding: 10px 12px; display: grid; }
.nn-done-stats small { font-size: .74rem; color: var(--muted); }
.nn-done-stats strong { font-size: 1.2rem; color: var(--navy); }
.nn-below { margin-top: 26px; }
.nn-rules, .nn-vs { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.nn-rules h3, .nn-vs h3 { font-size: 1.15rem; }
.nn-rules li { margin-bottom: 6px; }
.nn-rules a { color: var(--ai-ink); font-weight: 700; }
.nn-cta { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg-alt); border-radius: 14px; padding: 18px 22px; }
.nn-cta p { margin: 0; max-width: 760px; }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .nn-canvas { overflow: visible; gap: 0; padding: 0; }
  .nn-row, .nn-nodes, .nn-lane { flex-direction: column; align-items: stretch; }
  .nn-row + .nn-row::before { content: ""; width: 2px; height: 16px; background: #b5c0c8; margin: 4px 0 4px 32px; }
  .nn-node { width: auto; grid-template-columns: 44px minmax(0, 1fr); justify-items: start; align-items: center; text-align: left; gap: 12px; }
  .nn-ico { width: 44px; height: 44px; border-radius: 12px; }
  .nn-link, .nn-nodes > .nn-link, .nn-lane > .nn-link, .nn-row > .nn-link { width: 2px; height: 14px; margin: 4px 0 4px 21px; }
  .nn-row > .nn-link { margin-left: 32px; }
  .nn-row > .nn-node { margin: 0 0 0 11px; }
  .nn-link::after { right: auto; left: -4px; top: auto; bottom: -2px; border: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #b5c0c8; }
  .nn-branch { border-left: 0; padding-left: 0; gap: 10px; }
  .nn-lane { border-left: 2px solid #dde4e9; padding-left: 10px; }
  .nn-lane-l { align-self: flex-start; margin: 0 0 6px; }
  .nn-cont { display: none; }
  .nn-d-grid { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 1100px) {
  .wf { grid-template-columns: 1fr; }
  .wf-steps { position: relative; top: 0; max-height: 240px; }
  .wf-metrics { grid-template-columns: repeat(3, 1fr); }
  .dash-grid, .o-grid, .o-cols, .sync, .fix-layout { grid-template-columns: 1fr; }
  .fix-list, .score-out { position: static; }
  .worth { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .demo-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .erp { grid-template-columns: 1fr; min-height: 0; }
  .erp-side { padding: 10px; }
  .erp-logo { padding: 2px 4px 10px; }
  .erp-navs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .erp-navs::-webkit-scrollbar { display: none; }
  .erp-nav { white-space: nowrap; flex: none; }
  .erp-sep { margin: 0 4px 0 8px; white-space: nowrap; flex: none; }
  .erp-search, .erp-who { display: none; }
  .erp-top { padding: 10px 14px; }
  .erp-body { padding: 14px; }
  .split { grid-template-columns: 1fr; }
  .phone { margin: 0 auto; }
  .kv-grid, .cast { grid-template-columns: 1fr; }
  .ap-sum { grid-template-columns: 1fr 1fr; }
  .summary .who-did, .posts, .race-mini { grid-template-columns: 1fr 1fr; }
  .act-list li { grid-template-columns: 1fr; gap: 4px; }
  .doc, .report { padding: 22px 20px; }
}
@media (max-width: 600px) {
  .demo-flag, .hide-sm { display: none; }
  .demo-hero { padding: 32px 0 26px; }
  .co-facts { grid-template-columns: 1fr 1fr; }
  .tab { padding: 10px 12px 8px; }
  .tab small { display: none; }
  .wf-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .wf-metrics .metric:nth-child(n+4) { display: none; }
  .metric { padding: 6px 9px; }
  .wf-controls .btn-gate { flex: 1 1 100%; order: -1; }
  .wf-stage { padding: 14px; }
  .summary .who-did, .posts, .race-mini, .worth, .fix-facts { grid-template-columns: 1fr; }
  .wf-intro { padding: 22px 18px; }
  .tr { grid-template-columns: 1fr; gap: 0; }
  .fix-detail { padding: 20px 18px; }
  .offer-next .btn { width: 100%; }
  .qdoc { padding: 16px; }
  .qdoc-no { text-align: left; padding-right: 0; }
  .nn-wrap { padding: 12px; }
  .nn-detail { padding: 18px 16px; }
  .nn-kv > div { grid-template-columns: 1fr; gap: 2px; }
  .nn-bar .btn { flex: 1 1 100%; }
  .nn-cta .btn { width: 100%; }
}
