/*
 * How It Works — S2 "See it in action" (page centerpiece).
 *
 * A 3-tab worked-example browser. Each tab shows a homeowner/bot chat
 * transcript ending in a result card (scoped estimate, or routed for a
 * site visit). Transcripts are illustrative drafts — to be replaced
 * with real captured sessions (docs/plans/how-it-works-page-spec.md §7).
 */

.hiw-examples {
  padding: 120px 48px;
  background: var(--ink-1);
  border-bottom: 1px solid var(--ink-3);
}
.hiw-examples-inner { max-width: 1100px; margin: 0 auto; }
.hiw-examples-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.hiw-eyebrow-amber {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 20px;
}
.hiw-h2-light {
  font-family: var(--display);
  font-weight: 600;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--paper);
  margin-bottom: 20px;
  text-wrap: balance;
}
.hiw-examples-lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--gray-3);
  text-wrap: pretty;
}

/* ---- Tab bar ---- */
.hiw-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--ink-3);
}
.hiw-tab {
  padding: 20px 24px;
  text-align: left;
  color: var(--gray-3);
  border-right: 1px solid var(--ink-3);
  transition: background 0.15s, color 0.15s;
}
.hiw-tab:last-child { border-right: none; }
.hiw-tab:hover { color: var(--paper); }
.hiw-tab.is-active { background: var(--amber-2); color: var(--ink-0); }
.hiw-tab.is-active:hover { color: var(--ink-0); }
.hiw-tab-label {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.hiw-tab-sub {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

/* ---- Transcript card ---- */
.hiw-transcript {
  background: var(--ink-0);
  border: 1px solid var(--ink-3);
  border-top: none;
}
.hiw-transcript[hidden] { display: none; }
.hiw-transcript-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--ink-2);
  border-bottom: 1px solid var(--ink-3);
}
.hiw-transcript-head-l { display: flex; align-items: center; gap: 14px; }
.hiw-transcript-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--amber);
}
.hiw-transcript-customer { font-family: var(--mono); font-size: 11px; color: var(--gray-2); }
.hiw-transcript-time {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--gray-1);
}
.hiw-transcript-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 24px;
}

/* ---- Message bubbles ---- */
.hiw-msg { display: flex; flex-direction: column; gap: 6px; max-width: 78%; }
.hiw-msg--ai { align-self: flex-start; }
.hiw-msg--user { align-self: flex-end; align-items: flex-end; }
.hiw-msg-author {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  font-weight: 700;
}
.hiw-msg--ai .hiw-msg-author { color: var(--amber); }
.hiw-msg--user .hiw-msg-author { color: var(--gray-2); }
.hiw-msg-bubble { padding: 12px 16px; font-size: 14px; line-height: 1.5; }
.hiw-msg--ai .hiw-msg-bubble {
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  color: var(--paper);
}
.hiw-msg--user .hiw-msg-bubble {
  background: var(--amber-2);
  color: var(--ink-0);
  font-weight: 500;
}

/* ---- Result card ---- */
.hiw-result {
  margin: 0 24px 24px;
  padding: 28px;
  background: var(--ink-1);
  border: 1px solid var(--amber-2);
  border-left: 4px solid var(--amber-2);
}
.hiw-result--routed { border-color: var(--amber); border-left-color: var(--amber); }
.hiw-result-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 16px;
}
.hiw-result-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink-3);
}
.hiw-result-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.hiw-result-range {
  font-family: var(--display);
  font-weight: 600;
  font-size: 36px;
  letter-spacing: -0.025em;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.hiw-result-table { width: 100%; border-collapse: collapse; }
.hiw-result-table td {
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--ink-3);
}
.hiw-result-table td:first-child { color: var(--gray-3); }
.hiw-result-table td:last-child {
  text-align: right;
  font-family: var(--mono);
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.hiw-result-meta {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--gray-2);
}
.hiw-result-fineprint {
  margin-top: 14px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--gray-1);
}
.hiw-result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.hiw-result-btn { padding: 12px 20px; font-size: 13px; transition: filter 0.15s, background 0.15s; }
.hiw-result-btn--primary { background: var(--amber-2); color: var(--ink-0); font-weight: 600; }
.hiw-result-btn--primary:hover { filter: brightness(1.08); }
.hiw-result-btn--ghost {
  background: transparent;
  color: var(--paper);
  font-weight: 500;
  border: 1px solid var(--ink-4);
}
.hiw-result-btn--ghost:hover { background: var(--ink-2); }
.hiw-result-subtitle { margin: 6px 0 16px; font-size: 16px; color: var(--gray-3); }
.hiw-result-explanation {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(212, 140, 60, 0.08);
  border: 1px solid rgba(212, 140, 60, 0.3);
  font-size: 13px;
  line-height: 1.5;
  color: var(--paper);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hiw-examples { padding: 80px 32px; }
  .hiw-h2-light { font-size: 40px; }
}
@media (max-width: 600px) {
  .hiw-examples { padding: 56px 20px; }
  .hiw-h2-light { font-size: 30px; }
  .hiw-tabs { grid-template-columns: 1fr; }
  .hiw-tab { border-right: none; border-bottom: 1px solid var(--ink-3); }
  .hiw-tab:last-child { border-bottom: none; }
  .hiw-result { margin: 0 12px 12px; padding: 20px; }
  .hiw-result-range { font-size: 28px; }
  .hiw-msg { max-width: 90%; }
}
