/* role-pages.css — security/ops landing pages on the Nori design language.
   Load order: fonts.css → design-tokens.css → style.css → role-pages.css → animations.css.
   Only role-specific components live here; nav, hero grid, comparison table,
   buttons, and footer all come from style.css / design-tokens.css. The concept
   visuals (viz-*) are styled in animations.css. There is no light theme. */

/* ---- role eyebrow above the hero headline ---- */
.role-label {
  display: inline-block;
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--comment); margin: 0 0 14px;
}

/* ---- hero concept/chat visual sizing (inner styling in animations.css) ---- */
.role-page .hero-animation-container .slack-mock,
.role-page .hero-animation-container .concept-viz {
  height: 360px; min-height: 360px; max-height: 360px;
  display: flex; flex-direction: column; overflow: hidden;
  border: var(--hair); background: var(--base);
}
.role-page .hero-animation-container .concept-viz {
  align-items: center; justify-content: center; max-width: 100%; margin: 0;
}
.role-page .hero-animation-container .slack-mock-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-gutter: stable;
}

/* ---- capability rows: alternating copy / concept visual ---- */
.capability-list { display: flex; flex-direction: column; gap: 0; }
.capability-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: center; padding: 72px 0; border-bottom: var(--hair);
}
.capability-row:first-child { padding-top: 0; }
.capability-row:last-child { border-bottom: 0; padding-bottom: 0; }
.capability-row.is-reversed .capability-copy { order: 2; }
.capability-row.is-reversed .capability-visual { order: 1; }

.capability-copy h2 {
  font-family: var(--mono); font-size: var(--fs-h1); font-weight: 600;
  letter-spacing: -.01em; line-height: 1.2; margin: 0 0 12px;
  color: var(--fg); text-wrap: balance;
}
.capability-copy p {
  font-size: 14.5px; line-height: 1.7; color: var(--comment);
  margin: 0; max-width: 44ch; text-wrap: pretty;
}

.capability-visual { min-width: 0; }
.capability-visual .slack-mock,
.capability-visual .concept-viz {
  max-width: 100%; margin: 0; height: 300px;
  display: flex; flex-direction: column;
  border: var(--hair); background: var(--base);
}
.capability-visual .concept-viz { align-items: center; justify-content: center; }
.capability-visual .slack-mock-body { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; }

/* ---- comparison table scroll wrapper + 2-col variant (base table in style.css) ---- */
.comparison-table-wrap {
  display: block; width: 100%; max-width: 100%; margin-top: 8px;
  overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain; border: var(--hair);
}
.comparison-table-wrap .comparison-table { border: none; }
.comparison-table-two { min-width: 520px; }

/* ---- finance concept visuals (spend tracking) ---- */
.viz-fin { width: min(88%, 300px); margin-top: 18px; font-family: var(--mono); }
.viz-fin-head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 10px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--comment); margin-bottom: 12px;
}
.viz-fin-head b { color: var(--green); font-weight: 600; }

/* spend per user — labelled bars */
.viz-spend-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin-bottom: 12px; }
.viz-spend-row:last-child { margin-bottom: 0; }
.viz-spend-name { font-size: 12px; color: var(--text); }
.viz-spend-amt { font-size: 12px; color: var(--fg); font-weight: 600; }
.viz-spend-track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--surface); overflow: hidden; }
.viz-spend-fill { display: block; height: 100%; border-radius: 3px; background: var(--green); }

/* agent enablement matrix */
.viz-matrix { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 10px 12px; align-items: center; }
.viz-matrix-h { font-size: 9.5px; letter-spacing: .02em; text-transform: uppercase; color: var(--comment); text-align: center; }
.viz-matrix-h.user { text-align: left; }
.viz-matrix-name { font-size: 12px; color: var(--text); }
.viz-cell { justify-self: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--overlay); }
.viz-cell.on { background: var(--green); border-color: var(--green); }
.viz-cell.off { background: transparent; }

/* token cost per PR */
.viz-pr-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 3px 12px; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid var(--overlay);
}
.viz-pr-row:first-of-type { padding-top: 0; }
.viz-pr-row:last-of-type { border-bottom: 0; padding-bottom: 0; }
.viz-pr-title { font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-pr-tok { font-size: 11px; color: var(--comment); }
.viz-pr-cost { font-size: 12px; color: var(--fg); font-weight: 600; }

/* cost controls — model routing + hard cap */
.viz-controls { display: flex; flex-direction: column; gap: 14px; }
.viz-route { display: flex; flex-direction: column; gap: 8px; }
.viz-route-line { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.viz-route-task { flex: 1; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-route-arrow { color: var(--comment); }
.viz-route-model {
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--green);
  color: var(--green); font-size: 10px; white-space: nowrap;
}
.viz-cap { border-top: 1px solid var(--overlay); padding-top: 12px; }
.viz-cap-top { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 6px; }
.viz-cap-top span { color: var(--comment); }
.viz-cap-top b { color: var(--fg); font-weight: 600; }
.viz-cap-track { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.viz-cap-fill { display: block; height: 100%; background: var(--green); }
.viz-cap-fill.blocked { background: var(--red); }
.viz-cap-note { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 10.5px; color: var(--red); }
.viz-cap-note .x { font-weight: 700; }

/* ---- data page: rotating master-data headline ---- */
/* Rides the shared .hero h1 flex column: each direct-child span is its own
   line, so the rotating master-data term sits alone on the middle line with
   "clean." beneath it. The green accent marks the swapping term. */
.data-rotator { color: var(--green); }
.data-rotator-word { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .data-rotator-word { transition: opacity 240ms ease; }
  .data-rotator-word.is-out { opacity: 0; }
}

/* ---- data page concept visuals (master-data quality) ---- */
.viz-data { width: min(88%, 300px); font-family: var(--mono); }

/* hero: overall health score + per-domain bars */
.viz-data-score { margin-bottom: 16px; }
.viz-data-score-num { display: block; font-size: 30px; font-weight: 600; color: var(--green); letter-spacing: -.02em; }
.viz-data-score-cap { font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--comment); }
.viz-data-domain { display: grid; grid-template-columns: 1fr; gap: 5px; margin-bottom: 11px; }
.viz-data-domain:last-child { margin-bottom: 0; }
.viz-data-domain-name { font-size: 12px; color: var(--text); }
.viz-data-track { height: 6px; border-radius: 3px; background: var(--surface); overflow: hidden; }
.viz-data-fill { display: block; height: 100%; border-radius: 3px; background: var(--green); }

/* dedupe: two duplicate records merged into a golden record */
.viz-dupe { display: flex; flex-direction: column; gap: 8px; }
.viz-rec { border: 1px solid var(--overlay); border-radius: 4px; padding: 8px 10px; }
.viz-rec-name { display: block; font-size: 12px; color: var(--text); }
.viz-rec-meta { font-size: 10.5px; color: var(--comment); }
.viz-rec.is-dupe { border-style: dashed; color: var(--comment); }
.viz-rec.is-golden { border-color: var(--green); background: color-mix(in srgb, var(--green) 8%, transparent); }
.viz-rec.is-golden .viz-rec-name { color: var(--fg); font-weight: 600; }
.viz-badge {
  margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  border: 1px solid var(--green); color: var(--green);
  font-size: 9px; letter-spacing: .04em; text-transform: uppercase; font-weight: 500;
}
.viz-merge { font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--green); text-align: center; }

/* repair: field before -> after */
.viz-fields { display: flex; flex-direction: column; gap: 10px; }
.viz-field { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: center; gap: 8px; font-size: 11.5px; }
.viz-field-k { color: var(--comment); }
.viz-field-v { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-field-v.was { color: var(--comment); text-decoration: line-through; }
.viz-field-v.missing { color: var(--red); }
.viz-field-v.now { color: var(--green); }
.viz-field-arrow { color: var(--comment); }

/* review: audited change log */
.viz-audit { display: flex; flex-direction: column; }
.viz-audit-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--overlay); font-size: 11.5px;
}
.viz-audit-row:first-child { padding-top: 0; }
.viz-audit-row:last-child { border-bottom: 0; padding-bottom: 0; }
.viz-audit-dot { width: 8px; height: 8px; border-radius: 50%; }
.viz-audit-dot.ok { background: var(--green); }
.viz-audit-dot.wait { background: transparent; border: 1px solid var(--comment); }
.viz-audit-text { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-audit-by { font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--comment); }

/* ---- payoff CTA row ---- */
.role-cta-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .capability-row { grid-template-columns: 1fr; gap: 28px; padding: 48px 0; }
  .capability-row.is-reversed .capability-copy,
  .capability-row.is-reversed .capability-visual { order: 0; }
}
