/* Shared components for the home and /agents marketing pages: example
 * conversations, channel chips, metric slots, closing CTA. brand.css must
 * load first; load this before the per-page stylesheet.
 */

  /* ── Example conversation (pages/_convo partial) ── */
  .convo {
    border: 1px solid var(--hairline-dark);
    background: var(--ink);
    padding: clamp(20px, 2vw, 28px);
  }
  .light .convo {
    border-color: var(--hairline-light);
    background: var(--bone-soft);
  }
  .convo-channel {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--signal);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .convo-channel::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--hairline-dark);
  }
  .light .convo-channel::after { background: var(--hairline-light); }
  .convo-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .convo-msg {
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: -0.005em;
    padding: 10px 14px;
    max-width: 85%;
  }
  .convo-msg.from-agent {
    align-self: flex-start;
    background: var(--ink-soft);
    color: var(--bone);
    border-radius: 2px 12px 12px 12px;
  }
  .convo-msg.from-customer {
    align-self: flex-end;
    background: var(--bone-warm);
    color: var(--ink);
    border-radius: 12px 2px 12px 12px;
  }
  .light .convo-msg.from-agent {
    background: var(--ink);
    color: var(--bone);
  }
  .light .convo-msg.from-customer {
    background: rgba(12, 34, 64, 0.06);
    color: var(--ink);
  }
  .convo-event {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--signal);
    margin: 4px 0;
  }
  .convo-event::before,
  .convo-event::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--hairline-dark);
  }
  .light .convo-event::before,
  .light .convo-event::after { background: var(--hairline-light); }

  /* ── Channel-styled chat cards (pages/_convo partial) ── */
  .xchat {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    margin: 0;
  }
  .xchat-head {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 18px;
  }
  .xchat-head-name { font-weight: 600; font-size: 13px; }
  .xchat-head-tag {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.75;
  }
  .xchat-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    flex: 1;
  }
  .xchat-msg {
    font-size: 13.5px;
    line-height: 1.55;
    padding: 10px 14px;
    max-width: 86%;
  }
  .xchat-msg.from-customer { align-self: flex-end; border-radius: 14px 14px 3px 14px; }
  .xchat-msg.from-agent    { align-self: flex-start; border-radius: 14px 14px 14px 3px; }
  .xchat-event {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--signal);
    margin: 4px 0;
  }
  .xchat-event::before,
  .xchat-event::after {
    content: "";
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: 0.35;
  }
  .xchat-wave {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 2.5px;
    height: 18px;
    flex: none;
  }
  .xchat-wave span {
    width: 3px;
    height: 100%;
    border-radius: 2px;
    background: #42E07F;
    animation: scWave 1s ease-in-out infinite;
  }
  .xchat-wave span:nth-child(2) { animation-delay: 0.15s; }
  .xchat-wave span:nth-child(3) { animation-delay: 0.3s; }
  .xchat-wave span:nth-child(4) { animation-delay: 0.45s; }
  .xchat-wave span:nth-child(5) { animation-delay: 0.6s; }

  /* Web chat — Float-style light-blue widget */
  .xchat-web { background: linear-gradient(180deg, #DCEDFE 0%, #F2F9FF 100%); color: #15324A; }
  .xchat-web .xchat-head { background: #2F93F0; color: #fff; }
  .xchat-web .xchat-msg.from-customer {
    background: #2F93F0;
    color: #fff;
    box-shadow: 0 8px 18px -10px rgba(47, 147, 240, 0.6);
  }
  .xchat-web .xchat-msg.from-agent { background: #fff; border: 1px solid rgba(21, 50, 74, 0.1); }

  /* SMS — green message bubbles */
  .xchat-sms { background: #fff; color: #111; }
  .xchat-sms .xchat-head { background: #F2F2F6; color: #111; border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
  .xchat-sms .xchat-msg.from-customer { background: #E9E9EB; color: #111; }
  .xchat-sms .xchat-msg.from-agent { background: #34C759; color: #fff; }

  /* Voice call — dark card, transcript bubbles, live waveform */
  .xchat-voice { background: var(--ink); color: #F2EDE2; }
  .xchat-voice .xchat-head {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(242, 237, 226, 0.12);
  }
  .xchat-voice .xchat-msg.from-customer { background: rgba(242, 237, 226, 0.92); color: #15324A; }
  .xchat-voice .xchat-msg.from-agent {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(242, 237, 226, 0.14);
  }

  /* WhatsApp */
  .xchat-wa { background: #ECE5DD; color: #111B21; }
  .xchat-wa .xchat-head { background: #008069; color: #fff; }
  .xchat-wa .xchat-msg.from-customer { background: #D9FDD3; color: #111B21; border-radius: 10px 0 10px 10px; box-shadow: 0 1px 0.5px rgba(0,0,0,0.13); }
  .xchat-wa .xchat-msg.from-agent { background: #fff; border-radius: 0 10px 10px 10px; box-shadow: 0 1px 0.5px rgba(0,0,0,0.13); }

  /* Shared avatar + presence atoms (also used by the homepage carousel) */
  .av {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--signal);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex: none;
  }
  .av-32 { width: 32px; height: 32px; font-size: 14px; }
  .av-38 { width: 38px; height: 38px; font-size: 16px; }
  .pulse-dot {
    margin-left: auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #42E07F;
    animation: scPulse 2.2s ease-in-out infinite;
  }
  @keyframes scPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
  @keyframes scWave  { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
  @keyframes scDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%           { transform: translateY(-3px); opacity: 1; }
  }
  @media (prefers-reduced-motion: reduce) {
    .pulse-dot, .xchat-wave span { animation: none; }
  }

  /* ── Fact list (plain capability bullets) ── */
  .fact-list {
    list-style: none;
    margin-bottom: clamp(28px, 3vw, 36px);
    /* Signal rule: 1px top line fading from red into the hairline. */
    background-image: linear-gradient(90deg, rgba(229,39,60,0.9), var(--hairline-dark) 30%, var(--hairline-dark) 100%);
    background-repeat: no-repeat;
    background-size: 100% 1px;
  }
  .light .fact-list {
    background-image: linear-gradient(90deg, rgba(229,39,60,0.9), var(--hairline-light) 30%, var(--hairline-light) 100%);
  }
  .fact-list li {
    position: relative;
    padding: 14px 0 14px 26px;
    border-bottom: 1px dashed var(--hairline-dark);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.5;
    max-width: 56ch;
  }
  .light .fact-list li { border-bottom-color: var(--hairline-light); }
  .fact-list li::before {
    content: "–";
    position: absolute;
    left: 0;
    top: 14px;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--signal);
  }

  /* ── Channel chips ── */
  .channel-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .chip {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 7px 14px;
    border: 1px solid currentColor;
    border-radius: 999px;
    opacity: 0.75;
    white-space: nowrap;
  }

  /* ── Metric slots (shipped now; slots uncommented once real numbers exist) ── */
  .metric-row {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(24px, 3vw, 48px);
    padding-top: 24px;
    border-top: 1px solid var(--hairline-dark);
  }
  .light .metric-row { border-top-color: var(--hairline-light); }
  .metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .metric-value {
    font-family: var(--mono);
    font-weight: 600;
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: -0.02em;
    color: var(--signal);
    line-height: 1;
  }
  .metric-label {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--mute-dark);
    max-width: 24ch;
  }
  .light .metric-label { color: var(--mute-light); }

  /* ── Closing CTA section (both pages) ── */
  .cta-close { text-align: center; }
  .cta-close .frame { max-width: 860px; }
  .cta-close .h2 {
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -0.025em;
    line-height: 1.08;
    max-width: 22ch;
    margin: 0 auto clamp(20px, 2.5vw, 28px);
    text-wrap: balance;
  }
  .cta-close-copy {
    font-family: var(--sans);
    font-size: clamp(15px, 1.3vw, 18px);
    line-height: 1.55;
    color: var(--mute-dark);
    max-width: 48ch;
    margin: 0 auto clamp(32px, 4vw, 44px);
  }
  .cta-close.light .cta-close-copy { color: var(--mute-light); }
  .cta-close-actions {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* ── Mock panels (rate table, guardrail log, event record) ── */
  .mock-figure {
    display: flex;
    flex-direction: column;
    margin: 0;
  }
  .mock-panel {
    border: 1px solid var(--hairline-dark);
    background: var(--ink);
  }
  .light .mock-panel {
    border-color: var(--hairline-light);
    background: var(--bone-soft);
  }
  .mock-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--mute-dark);
    padding: 12px 16px;
    border-bottom: 1px solid var(--hairline-dark);
  }
  .light .mock-panel-head {
    color: var(--mute-light);
    border-bottom-color: var(--hairline-light);
  }
  .mock-panel-head::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--signal);
    flex: none;
  }
  .mock-table-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 12px;
    font-family: var(--mono);
    font-size: 12px;
    padding: 10px 16px;
    border-bottom: 1px dashed var(--hairline-dark);
  }
  .light .mock-table-row { border-bottom-color: var(--hairline-light); }
  .mock-table-row:last-child { border-bottom: none; }
  .mock-table-row.head {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mute-dark);
  }
  .light .mock-table-row.head { color: var(--mute-light); }
  .mock-table-row.hit {
    color: var(--signal);
    font-weight: 600;
    background: rgba(230, 41, 61, 0.06);
    box-shadow: inset 2px 0 0 var(--signal);
  }
  .mock-rows { display: flex; flex-direction: column; }
  .mock-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.5;
    padding: 11px 16px;
    border-bottom: 1px dashed var(--hairline-dark);
  }
  .light .mock-row { border-bottom-color: var(--hairline-light); }
  .mock-row:last-child { border-bottom: none; }
  .mock-row-text { letter-spacing: -0.01em; }
  .mock-time {
    color: var(--mute-dark);
    flex: none;
  }
  .light .mock-time { color: var(--mute-light); }
  .mock-row .mock-time + .mock-row-text { margin-right: auto; }
  .mock-status {
    flex: none;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 4px 10px;
    border: 1px solid currentColor;
    border-radius: 999px;
    opacity: 0.7;
  }
  .mock-status.blocked {
    color: var(--signal);
    opacity: 1;
  }
  .mock-stem {
    width: 1px;
    height: 22px;
    background: var(--hairline-strong);
    margin-left: 32px;
  }
  .mock-figure > .convo-msg { max-width: 85%; }
  .mock-caption {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mute-dark);
    margin-top: 14px;
  }
  .light .mock-caption { color: var(--mute-light); }

  /* ── Channel icon chips (branded, shared by home + agents) ── */
  .chan-ic {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
  }
  .chan-ic svg {
    width: 15px;
    height: 15px;
  }
  .chan-ic-webchat { background: var(--ink); border: 1px solid rgba(242, 237, 226, 0.25); }
  .light .chan-ic-webchat { border-color: transparent; }
  .chan-ic-sms { background: #34c759; }
  .chan-ic-sms svg { width: 16px; height: 16px; }
  .chan-ic-whatsapp { background: #25d366; }
  .chan-ic-whatsapp svg { width: 16px; height: 16px; }
  .chan-ic-email { background: #ea4335; }
  .chan-ic-voice { background: var(--signal); gap: 2px; }
  .chan-wave {
    width: 2.5px;
    border-radius: 2px;
    background: #fff;
    animation: scWave 1.1s ease-in-out infinite;
  }
  .chan-wave:nth-child(1) { height: 7px; }
  .chan-wave:nth-child(2) { height: 13px; animation-delay: 0.18s; }
  .chan-wave:nth-child(3) { height: 9px; animation-delay: 0.36s; }
  .chan-wave:nth-child(4) { height: 12px; animation-delay: 0.54s; }

  /* Guardrail-screening panel (bone card, white rows, status pills). */
  .guard-figure { margin: 0; }
  .guard-panel {
    background: var(--bone);
    color: var(--ink);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.6);
  }
  .guard-head,
  .guard-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(12, 34, 64, 0.55);
  }
  .guard-head { border-bottom: 1px solid rgba(12, 34, 64, 0.1); background: var(--bone-warm); }
  .guard-foot { border-top: 1px solid rgba(12, 34, 64, 0.08); padding: 10px 18px; color: rgba(12, 34, 64, 0.5); }
  .guard-dot { width: 5px; height: 5px; border-radius: 1px; background: var(--signal); flex: none; }
  .guard-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
  .guard-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid rgba(12, 34, 64, 0.1);
    border-radius: 12px;
    padding: 13px 16px;
  }
  .guard-text {
    font-family: var(--sans);
    font-size: 13.5px;
    line-height: 1.55;
    color: rgba(12, 34, 64, 0.85);
  }
  .guard-status {
    margin-left: auto;
    flex: 0 0 auto;
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.14em;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    border-radius: 999px;
    padding: 5px 12px;
  }
  .guard-blocked { background: var(--signal); }
  .guard-pass { background: #2FBF71; }
