/* Chat page styles. brand.css must load first. */

  body {
    background: var(--bone);
    color: var(--ink);
  }

  main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(48px, 6vw, 96px);
    max-width: var(--grid-max);
    margin: 0 auto;
    width: 100%;
  }
  .eyebrow {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--mute-light);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
  }
  .eyebrow::before {
    content: ""; width: 18px; height: 1px;
    background: currentColor; opacity: 0.45;
  }
  h1.title {
    font-family: var(--sans);
    font-weight: 800;
    font-size: clamp(34px, 4.6vw, 56px);
    line-height: 1.04;
    letter-spacing: -0.03em;
    text-align: center;
    max-width: 18ch;
    margin-bottom: clamp(14px, 1.5vw, 20px);
    color: var(--ink);
  }
  h1.title .signal { color: var(--signal); }
  .sub {
    font-family: var(--sans);
    font-weight: 400;
    font-size: clamp(15px, 1.3vw, 18px);
    line-height: 1.5;
    letter-spacing: -0.005em;
    color: rgba(10,24,50,0.7);
    text-align: center;
    max-width: 52ch;
    margin-bottom: clamp(32px, 4vw, 48px);
  }

  /* Chat card */
  .chat-card {
    background: var(--ink-soft);
    border: 1px solid var(--hairline-dark);
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
  }
  .chat-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--hairline-dark);
    background: rgba(242, 238, 229, 0.025);
  }
  .chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--signal);
    color: var(--bone);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--sans);
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.025em;
    line-height: 1;
    flex-shrink: 0;
  }
  .chat-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .chat-name {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.012em;
    color: var(--bone);
    line-height: 1.2;
  }
  .chat-status {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: -0.005em;
    color: var(--mute-dark);
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .chat-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ADE80;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.2);
  }
  #webchat-mount {
    height: clamp(420px, 65vh, 600px);
  }

  /* Inline error panel when the Subcontext Agent isn't seeded/live */
  .panel-warn {
    width: 100%;
    max-width: 640px;
    background: rgba(242, 238, 229, 0.05);
    border: 1px solid var(--hairline-dark);
    border-radius: 12px;
    padding: 24px 28px;
    color: rgba(242, 238, 229, 0.85);
    text-align: center;
  }
  .panel-warn code {
    font-family: var(--mono);
    background: rgba(242, 238, 229, 0.08);
    padding: 0.1em 0.4em;
    border-radius: 4px;
    font-size: 0.85em;
  }

  /* Footer */
