/* Shared stylesheet for the Evaluation product suite:
   /evaluation, /evaluation/voice-simulation, /evaluation/call-monitoring,
   and /evaluation/human-review. Builds on site.css and demos.css. */

[hidden] { display: none !important; }

/* ---------------------------------------------------------------- hero */

.ev-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 6.5vw, 80px) 0 clamp(64px, 8vw, 96px);
}
.ev-hero .glow {
  top: -180px;
  right: -8%;
  width: 76%;
  height: 760px;
}
.ev-hero .wrap { position: relative; }

.ev-crumb {
  margin-bottom: 24px;
}
.ev-crumb ol {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-3);
}
.ev-crumb li { display: flex; align-items: center; gap: 8px; }
.ev-crumb svg { color: var(--ink-5); }
.ev-crumb a:hover { color: var(--ink); }
.ev-crumb [aria-current] { color: var(--ink); font-weight: 500; }

.ev-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: 44px 56px;
  align-items: center;
}

.ev-title {
  margin-top: 20px;
  max-width: 600px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 500;
  text-wrap: balance;
}
.ev-lede {
  margin-top: 20px;
  max-width: 540px;
  font-size: clamp(16.5px, 1.5vw, 18.5px);
  line-height: 1.58;
  color: var(--ink-3);
}
.ev-hero-actions { margin-top: 32px; }
.ev-hero-meta {
  margin-top: 20px;
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-3);
}

.ev-hero .eyebrow,
.ev-title,
.ev-lede,
.ev-hero-actions,
.ev-hero-meta,
.ev-panel {
  animation: rise-in var(--dur, 560ms) var(--ease-out) both;
}
.ev-hero .eyebrow { --dur: 420ms; }
.ev-title { --rise: 16px; --dur: 620ms; animation-delay: 50ms; }
.ev-lede { --rise: 10px; animation-delay: 140ms; }
.ev-hero-actions { --rise: 8px; --dur: 500ms; animation-delay: 210ms; }
.ev-hero-meta { --dur: 420ms; animation-delay: 270ms; }
.ev-panel { --rise: 18px; --dur: 680ms; animation-delay: 160ms; }

@media (prefers-reduced-motion: reduce) {
  .ev-hero .eyebrow,
  .ev-title,
  .ev-lede,
  .ev-hero-actions,
  .ev-hero-meta,
  .ev-panel { --rise: 0px; animation-duration: 240ms; animation-delay: 0ms; }
}

@media (max-width: 1039px) {
  .ev-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .ev-title, .ev-lede { max-width: 680px; }
}

/* ---------------------------------------------------------------- shared product mockup cards */

.ev-panel {
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-hero);
  overflow: hidden;
  font-size: 14px;
  line-height: 20px;
}
.ev-panel-soft {
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-card);
}

.ev-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.ev-bar-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--ink);
}
.ev-bar-meta {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--ink-3);
  font-feature-settings: 'tnum';
}

.ev-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--bg-sunken);
}
.ev-stat {
  padding: 12px 18px;
}
.ev-stat + .ev-stat { border-left: 1px solid var(--line); }
.ev-stat-k {
  display: block;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--ink-3);
}
.ev-stat-v {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  line-height: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-feature-settings: 'tnum';
}
.ev-stat-v.is-red { color: var(--red-text); }
.ev-stat-v.is-green { color: var(--green-text); }
.ev-stat-v.is-amber { color: var(--amber-text); }

/* Interactive call table */
.ev-table { padding: 8px 10px 10px; }
.ev-trow {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-2);
}
.ev-trow-head {
  padding-top: 4px;
  padding-bottom: 6px;
  font-size: 11.5px;
  color: var(--ink-4);
}
button.ev-trow { cursor: pointer; transition: background-color var(--motion); }
button.ev-trow:hover { background: var(--bg-subtle); }
button.ev-trow[aria-selected="true"] {
  background: var(--bg-subtle);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--ink);
}
.ev-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  font-feature-settings: 'tnum';
}

/* Inline verdict inspector */
.ev-inspect {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-sunken);
}
.ev-inspect-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ev-inspect-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}
.ev-verdict-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
}
.ev-yn {
  height: 26px;
  padding: 0 11px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color var(--motion), color var(--motion), box-shadow var(--motion);
}
.ev-yn:hover { background: var(--bg-subtle); color: var(--ink); }
.ev-yn[aria-pressed="true"].is-yes {
  background: var(--green-tint);
  color: var(--green-text);
  box-shadow: inset 0 0 0 1px rgba(70, 142, 44, 0.35);
}
.ev-yn[aria-pressed="true"].is-no {
  background: var(--red-tint);
  color: var(--red-text);
  box-shadow: inset 0 0 0 1px rgba(210, 72, 61, 0.35);
}
.ev-inspect-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
  line-height: 19px;
  color: var(--ink-2);
}
.ev-inspect-status {
  margin-top: 8px;
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-3);
}

/* ---------------------------------------------------------------- 3-up feature cards */

.ev-cards-3 {
  margin-top: 48px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.ev-card {
  display: flex;
  flex-direction: column;
  padding: 24px 24px 26px;
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-card);
}
.section:not(.section-sunk) .ev-card {
  background: var(--bg-subtle);
  box-shadow: none;
}
.ev-card-ic {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--ink-2);
}
.section:not(.section-sunk) .ev-card-ic {
  background: var(--bg);
}
.ev-card h3 {
  margin-top: 18px;
  font-size: 18px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.ev-card p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 22px;
  color: var(--ink-3);
}

@media (max-width: 899px) {
  .ev-cards-3 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- alternating showcase rows */

.ev-loop {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}
.ev-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 40px 56px;
  align-items: center;
}
.ev-row.is-flip > :first-child { order: 2; }
.ev-row-k {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-3);
}
.ev-row-num {
  font-weight: 500;
  color: var(--ink-4);
  font-feature-settings: 'tnum';
}
.ev-row h3 {
  margin-top: 10px;
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.ev-row-lede {
  margin-top: 12px;
  font-size: 16px;
  line-height: 24px;
  color: var(--ink-3);
}
.ev-bullets {
  margin-top: 22px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ev-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  line-height: 21px;
  color: var(--ink-2);
}
.ev-bullets b { font-weight: 500; color: var(--ink); }
.ev-bullets svg { flex: none; margin-top: 2px; color: var(--ink-3); }
.ev-row-cta { margin-top: 24px; }

@media (max-width: 959px) {
  .ev-row { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .ev-row.is-flip > :first-child { order: 0; }
}

/* ---------------------------------------------------------------- persona controls widget */

.ev-persona-body { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.ev-ctl-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.ev-ctl-val { font-weight: 500; color: var(--ink); font-feature-settings: 'tnum'; }
.ev-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-chip {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color var(--motion), color var(--motion);
}
.ev-chip:hover { background: var(--bg-muted); color: var(--ink); }
.ev-chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.ev-persona-summary {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
  line-height: 19px;
  color: var(--ink-2);
}
.ev-persona-summary b { font-weight: 500; color: var(--ink); }

/* ---------------------------------------------------------------- metrics tiles grid */

.ev-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
}
.ev-metric {
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  box-shadow: inset 0 0 0 1px var(--line);
}
.ev-metric.is-alert {
  background: var(--amber-tint);
  box-shadow: inset 0 0 0 1px rgba(219, 136, 49, 0.35);
}
.ev-metric-k { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.ev-metric-v {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  line-height: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-feature-settings: 'tnum';
}
.ev-metric.is-alert .ev-metric-v { color: var(--amber-text); }
.ev-metric-sub { display: block; margin-top: 4px; font-size: 11.5px; color: var(--ink-4); }
.ev-metric.is-alert .ev-metric-sub { color: var(--amber-text); }

@media (max-width: 559px) {
  .ev-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- terminal window */

.ev-term {
  border-radius: var(--radius-lg);
  background: #141414;
  color: #ededed;
  box-shadow: var(--shadow-hero);
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 21px;
}
.ev-term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-sans);
  font-size: 12px;
  color: #a1a1a1;
}
.ev-term-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.ev-term-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 4px; }
.ev-term-cmd { color: #ffffff; margin-bottom: 8px; }
.ev-term-prompt { color: #8c8c8c; margin-right: 8px; }
.ev-term-dim { color: #8c8c8c; }
.ev-term-row { display: flex; align-items: center; gap: 10px; font-feature-settings: 'tnum'; }
.ev-term-ok { color: #7fd36a; }
.ev-term-fail { color: #f07b72; }
.ev-term-time { margin-left: auto; color: #8c8c8c; }
.ev-term-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  color: #b5b5b5;
}

/* ---------------------------------------------------------------- trace waterfall */

.ev-trace { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.ev-trace-axis {
  display: flex;
  justify-content: space-between;
  padding-left: 148px;
  font-size: 11px;
  color: var(--ink-4);
  font-feature-settings: 'tnum';
}
.ev-trace-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.ev-trace-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ev-trace-track {
  position: relative;
  height: 22px;
  border-radius: 6px;
  background: var(--bg-subtle);
}
.ev-trace-span {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: var(--x);
  width: var(--w);
  border-radius: 4px;
  background: var(--ink);
  display: flex;
  align-items: center;
  padding: 0 7px;
  font-size: 10.5px;
  color: var(--on-ink);
  white-space: nowrap;
  overflow: hidden;
}
.ev-trace-span.is-blue { background: var(--blue); }
.ev-trace-span.is-teal { background: var(--teal-text); }
.ev-trace-span.is-amber { background: var(--amber); }
.ev-trace-span.is-red { background: var(--red); }
.ev-trace-ms {
  text-align: right;
  font-size: 12px;
  color: var(--ink-3);
  font-feature-settings: 'tnum';
}
@media (max-width: 559px) {
  .ev-trace-axis { display: none; }
  .ev-trace-row { grid-template-columns: 116px minmax(0, 1fr) 48px; }
}

/* ---------------------------------------------------------------- latency chart & alerts */

.ev-alert-card {
  margin: 16px 18px 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--red-tint);
  box-shadow: inset 0 0 0 1px rgba(210, 72, 61, 0.28);
}
.ev-alert-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--red-text);
}
.ev-alert-title { margin-top: 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
.ev-alert-desc { margin-top: 2px; font-size: 13px; line-height: 19px; color: var(--ink-2); }

.ev-chart-wrap { padding: 18px; }
.ev-chart-svg { width: 100%; height: auto; display: block; }

.ev-rule-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.ev-rule-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.ev-rule-box {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.ev-rule-box span { display: block; font-size: 11px; color: var(--ink-4); }
.ev-rule-box b { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--ink); }

/* ---------------------------------------------------------------- human review queue cards */

.ev-review-stack { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ev-review-item {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  box-shadow: inset 0 0 0 1px var(--line);
}
.ev-review-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ev-review-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}
.ev-review-desc {
  margin-top: 8px;
  font-size: 13px;
  line-height: 19px;
  color: var(--ink-3);
}

/* Progress bar for review queue */
.ev-progress-body { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.ev-seg-bar {
  display: flex;
  height: 10px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--line);
  gap: 2px;
}
.ev-seg-bar i { display: block; height: 100%; }
.ev-seg-done { background: var(--green); }
.ev-seg-active { background: var(--amber); }
.ev-seg-pending { background: var(--ink-5); }

.ev-progress-rows { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ev-progress-rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--ink-2);
  font-feature-settings: 'tnum';
}
.ev-progress-label { display: inline-flex; align-items: center; gap: 8px; }
.ev-swatch { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* Calibration comparison */
.ev-cal-list { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ev-cal-row {
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ev-cal-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ev-cal-side {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12.5px;
  line-height: 18px;
  color: var(--ink-2);
}
.ev-cal-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
}
@media (max-width: 599px) {
  .ev-cal-pair { grid-template-columns: minmax(0, 1fr); }
  .ev-rule-row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- sibling navigation cards */

.ev-siblings {
  margin-top: 32px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.ev-sibling {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg);
  border: 1px solid var(--line);
  transition: background-color var(--motion), border-color var(--motion);
}
.ev-sibling:hover { background: var(--bg-subtle); border-color: var(--line-strong); }
.ev-sibling-k { font-size: 12px; color: var(--ink-4); }
.ev-sibling h3 { margin-top: 10px; font-size: 18px; line-height: 24px; font-weight: 500; }
.ev-sibling p { margin-top: 6px; margin-bottom: 18px; font-size: 14.5px; line-height: 21px; color: var(--ink-3); }
.ev-sibling-go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.ev-sibling-go svg { transition: transform var(--motion); }
.ev-sibling:hover .ev-sibling-go svg { transform: translateX(3px); }

@media (max-width: 899px) {
  .ev-siblings { grid-template-columns: minmax(0, 1fr); }
}

.footer-cols a[aria-current="page"] { color: var(--ink); font-weight: 500; }
