/* ═════════════════════════════════════════════════════════════════════════════
   js/deal-detail-v2-redesign.css — WIP-UI-DEAL-DETAIL-V2-01
   Deal detail v2: Client Details top bar + AI Summary + Quick Actions
   (Build Quote → SpartanCAD) + value-callout + tabs/composer/timeline.
   All scoped under .dd2-page to avoid colliding with .ld-page (lead detail)
   and the existing v1 deal-detail / portal-* classes.
   ═════════════════════════════════════════════════════════════════════════════ */

:root {
  --ai-purple: #7C3AED;
  --ai-purple-bg: #F3E8FF;
  --bal-low: #15803D;        --bal-low-bg: #DCFCE7;
  --bal-12: #D97706;         --bal-12-bg: #FEF3C7;
  --bal-29: #DC2626;         --bal-29-bg: #FEE2E2;
  --heritage-fg: #7C2D12;    --heritage-bg: #FED7AA;
  --nathers-poor: #DC2626;
  --src-fb: #1877F2;         --src-fb-bg: #EBF3FE;
  --src-li: #0A66C2;         --src-li-bg: #EAF2FB;
  --src-rea: #E4002B;
  --src-domain: #0D5C4D;
}

@keyframes dd2-pulse-won {
  0%, 100% { box-shadow: 0 0 0 0 rgba(21,128,61,.5), 0 1px 2px rgba(21,128,61,.2), 0 8px 18px -6px rgba(21,128,61,.4); }
  50%      { box-shadow: 0 0 0 8px rgba(21,128,61,0), 0 1px 2px rgba(21,128,61,.2), 0 8px 18px -6px rgba(21,128,61,.4); }
}
@keyframes dd2-pulse-stage {
  0%, 100% { box-shadow: 0 0 0 0 rgba(250,204,21,.35); }
  70%      { box-shadow: 0 0 0 5px rgba(250,204,21,0); }
}
@keyframes dd2-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes dd2-ai-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
  50%      { box-shadow: 0 0 0 4px rgba(124,58,237,.15); }
}
@media (prefers-reduced-motion: reduce) {
  .dd2-page .btn-won.pulse,
  .dd2-page .stage-now .stage-dot,
  .dd2-page .ai-spark,
  .dd2-page .qa-cad::before {
    animation: none !important;
  }
}

/* ── Page chassis ─────────────────────────────────────────────────────── */
.dd2-page { padding: 4px 0 32px; font-family: var(--ff-sans, 'Archivo', system-ui, sans-serif); }

/* ── Header ──────────────────────────────────────────────────────────── */
.dd2-page .dd2-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--s200, #E7E5E4);
  flex-wrap: wrap;
}
.dd2-page .dd2-h-l { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.dd2-page .dd2-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--s500, #78716C);
  padding: 5px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--s200, #E7E5E4);
  cursor: pointer;
  letter-spacing: 0.02em;
  width: fit-content;
  text-decoration: none;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.dd2-page .dd2-back:hover { border-color: var(--ink, #0A0A0A); color: var(--ink, #0A0A0A); }
.dd2-page .dd2-h1-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.dd2-page .dd2-h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink, #0A0A0A);
  line-height: 1;
  margin: 0;
}
.dd2-page .dd2-h-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.dd2-page .dd2-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dd2-page .dd2-chip-stage {
  background: var(--info-bg, #DBEAFE);
  color: var(--info-fg, #1D4ED8);
}
.dd2-page .dd2-chip-stage::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--info-fg, #1D4ED8);
  margin-right: 4px;
  display: inline-block;
}
.dd2-page .dd2-chip-value {
  background: var(--ink, #0A0A0A);
  color: #fff;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.dd2-page .dd2-chip-src {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
}
.dd2-page .dd2-chip-src .src-mark {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.dd2-page .dd2-chip-src.fb { background: var(--src-fb-bg); color: var(--src-fb); }
.dd2-page .dd2-chip-src.fb .src-mark { background: var(--src-fb); font-family: Georgia, serif; }
.dd2-page .dd2-chip-src.google { background: #FEEDEB; color: #EA4335; }
.dd2-page .dd2-chip-src.website { background: var(--s100, #F5F5F4); color: var(--ink, #0A0A0A); }
.dd2-page .dd2-chip-src.referral { background: var(--ok-bg, #DCFCE7); color: var(--ok-fg, #15803D); }
.dd2-page .dd2-chip-src.phone { background: var(--pale-red, #fefce8); color: var(--red, #a16207); }

.dd2-page .dd2-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.dd2-page .dd2-btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.dd2-page .dd2-btn-w {
  background: #fff;
  color: var(--s700, #44403C);
  border-color: var(--s200, #E7E5E4);
  box-shadow: var(--shadow-rest);
}
.dd2-page .dd2-btn-w:not([disabled]):hover { border-color: var(--ink, #0A0A0A); color: var(--ink, #0A0A0A); }

/* ════════════════════════════════════════════════════════════════════════════
   S-223 CONVERSATIONS — premium, brand-styled timeline. UNSCOPED so it renders
   identically on the Sales deal/lead detail AND the Job CRM (the .dd2-page
   .tl-* styles above don't reach the Job page). Uses the Spartan tokens so it
   matches the app: red #a16207, ink, stone scale, Syne headings, pulsing CTA.
   ════════════════════════════════════════════════════════════════════════════ */
/* Unscoped base for the shared secondary buttons (Reply / load-history / empty). */
.dd2-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:10px;font-size:13px;font-weight:700;border:1px solid transparent;white-space:nowrap;cursor:pointer;font-family:var(--ff-sans,inherit);transition:all 180ms cubic-bezier(.4,0,.2,1)}
.dd2-btn-sm{padding:6px 11px;font-size:12px;border-radius:8px}
.dd2-btn-w{background:#fff;color:var(--s700,#44403C);border-color:var(--s200,#E7E5E4)}
.dd2-btn-w:not([disabled]):hover{border-color:var(--ink,#0A0A0A);color:var(--ink,#0A0A0A)}
.dd2-btn-d{background:var(--fos-plate);color:var(--fos-on-plate);border-color:var(--red,#a16207)}
.dd2-btn-d:not([disabled]):hover{background:var(--fos-plate-hover);border-color:var(--red-dark,#eab308)}

/* Filter chips */
.conv-chips{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:4px}
.conv-chip{font-family:var(--ff-sans);font-size:11.5px;font-weight:700;color:var(--s600,#57534E);background:#fff;border:1px solid var(--s200,#E7E5E4);border-radius:999px;padding:5px 13px;cursor:pointer;transition:all .15s;letter-spacing:-.01em}
.conv-chip:hover{border-color:var(--s400,#A8A29E);color:var(--ink)}
.conv-chip.on{background:var(--ink,#0A0A0A);border-color:var(--ink,#0A0A0A);color:#fff}

/* Timeline rows */
.conv-list{display:flex;flex-direction:column}
.conv-item{display:flex;gap:13px;padding:16px 2px;border-bottom:1px solid var(--s100,#F5F5F4)}
.conv-item:last-child{border-bottom:none}
.conv-ava{width:38px;height:38px;border-radius:11px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.conv-ava svg,.conv-ava .ico{width:17px;height:17px}
.conv-ava.call{background:var(--ok-bg,#DCFCE7);color:var(--ok-fg,#15803D)}
.conv-ava.voicemail{background:var(--info-bg,#DBEAFE);color:var(--info-fg,#1D4ED8)}
.conv-ava.sms{background:#F3E8FF;color:#7C3AED}
.conv-ava.email{background:var(--info-bg,#DBEAFE);color:var(--info-fg,#1D4ED8)}
.conv-ava.note{background:var(--warn-bg,#FEF3C7);color:var(--warn-fg,#92400E)}
.conv-mid{flex:1;min-width:0}
.conv-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.conv-title{font-family:'Syne',var(--ff-sans);font-weight:800;font-size:13.5px;color:var(--ink,#0A0A0A);letter-spacing:-.01em;display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
.conv-when{font-size:11px;color:var(--s500,#78716C);font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums;flex-shrink:0}
.conv-sub{font-size:12px;color:var(--s600,#57534E);font-weight:600;margin-top:2px}
/* Attribution — who made the call / sent the SMS or email. Legible, on-brand
   (not washy grey): brand-tinted pill with the rep's name in ink. */
.conv-meta{margin-top:5px;display:flex;flex-wrap:wrap;gap:6px}
.conv-by{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;color:var(--ink,#0A0A0A);background:var(--s100,#F5F5F4);border:1px solid var(--s200,#E7E5E4);border-radius:999px;padding:2px 9px 2px 7px;letter-spacing:-.005em}
.conv-by .ico{width:12px;height:12px;color:var(--red,#a16207);flex-shrink:0}
.conv-body{font-size:13px;color:var(--s800,#292524);line-height:1.55;margin-top:6px;word-break:break-word;font-weight:500}
.conv-dir{font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;padding:2px 7px;border-radius:6px}
.conv-dir.in{background:var(--ok-bg,#DCFCE7);color:var(--ok-fg,#15803D)}
.conv-dir.out{background:var(--pale-red,#fefce8);color:var(--red,#a16207)}
.conv-flag{display:inline-flex;align-items:center;gap:4px;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;padding:2px 8px;border-radius:20px}
.conv-flag.pos{background:var(--ok-bg,#DCFCE7);color:var(--ok-fg,#15803D)}
.conv-flag.neu{background:var(--s100,#F5F5F4);color:var(--s600,#57534E)}
.conv-flag.neg{background:var(--pale-red,#fefce8);color:var(--red,#a16207)}
.conv-flag.vm{background:var(--info-bg,#DBEAFE);color:var(--info-fg,#1D4ED8)}
.conv-dot{width:7px;height:7px;border-radius:50%;background:var(--red,#a16207);display:inline-block}

/* Recording player card */
.conv-rec{display:flex;align-items:center;gap:11px;background:#fff;border:1px solid var(--s200,#E7E5E4);border-radius:12px;padding:8px 12px 8px 8px;margin-top:9px;max-width:380px;box-shadow:0 1px 2px rgba(10,10,10,.05)}
.conv-play{width:36px;height:36px;border-radius:50%;border:none;background:var(--fos-plate);color:var(--fos-on-plate);display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;box-shadow:0 2px 7px rgba(250,204,21,.38);animation:conv-pulse 2.2s ease-in-out infinite;transition:background .15s}
.conv-play:hover{background:var(--fos-plate-hover);animation:none}
.conv-play svg,.conv-play .ico{width:15px;height:15px}
.conv-wave{flex:1;height:24px;display:flex;align-items:center;gap:2px}
.conv-wave i{flex:1;min-width:2px;background:var(--s300,#D6D3D1);border-radius:2px}
.conv-rec-cap{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:var(--s500,#78716C);white-space:nowrap;font-variant-numeric:tabular-nums}
.conv-rec audio{width:100%;height:36px}
@keyframes conv-pulse{0%,100%{box-shadow:0 2px 7px rgba(250,204,21,.38),0 0 0 0 rgba(250,204,21,.42)}70%{box-shadow:0 2px 7px rgba(250,204,21,.38),0 0 0 9px rgba(250,204,21,0)}}

/* AI summary callout */
.conv-summary{margin-top:9px;background:linear-gradient(180deg,#fff,var(--pale-red,#fefce8));border:1px solid rgba(161,98,7,.14);border-left:3px solid var(--red,#a16207);border-radius:10px;padding:9px 12px;display:flex;gap:8px;align-items:flex-start}
.conv-summary .conv-flag{flex-shrink:0}
.conv-summary-t{font-size:12.5px;color:var(--s800,#292524);line-height:1.5;font-weight:500}

/* Transcript */
/* S-264 follow-up — the transcript toggle is a BIG, unmissable brand-red
   dropdown button (Phoenix: "High UI red button drop down super obvious,
   dumby proof"): solid red pill, white uppercase label, caret that points
   down when open and sideways when collapsed. Shared by lead/deal/job. */
.conv-tx-btn{margin-top:10px;display:inline-flex;align-items:center;gap:8px;font-family:var(--ff-sans);font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--fos-on-plate);background:var(--fos-plate);border:none;border-radius:10px;padding:10px 18px;cursor:pointer;box-shadow:0 2px 8px rgba(250,204,21,.35);min-height:38px}
.conv-tx-btn:hover{background:var(--fos-plate-hover);box-shadow:0 3px 10px rgba(250,204,21,.45)}
.conv-tx-btn:active{transform:translateY(1px)}
.conv-tx-btn:focus-visible{outline:3px solid rgba(161,98,7,.4);outline-offset:2px}
.conv-tx-btn .ico{color:var(--fos-on-plate)}
.conv-tx-caret{display:inline-block;font-size:10px;line-height:1;transition:transform .15s ease}
.conv-tx-btn[aria-expanded="false"] .conv-tx-caret{transform:rotate(-90deg)}
.conv-tx{margin-top:10px;background:var(--s100,#F5F5F4);border:1px solid var(--s200,#E7E5E4);border-radius:13px;padding:14px;display:flex;flex-direction:column;gap:11px;max-height:440px;overflow-y:auto;overscroll-behavior:contain;content-visibility:auto;contain-intrinsic-size:auto 440px}
.conv-turn{display:flex;gap:9px;align-items:flex-start}
.conv-turn.right{flex-direction:row-reverse}
.conv-turn-ava{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;color:#fff;flex-shrink:0;font-family:var(--ff-sans)}
.conv-turn-col{max-width:80%;min-width:0;display:flex;flex-direction:column}
.conv-turn.right .conv-turn-col{align-items:flex-end}
.conv-turn-who{font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;margin-bottom:3px}
.conv-bubble{font-size:12.5px;line-height:1.5;padding:9px 13px;border-radius:14px;word-break:break-word;color:var(--s900,#1C1917);background:#fff;box-shadow:0 1px 1px rgba(10,10,10,.05)}
.conv-turn.right .conv-bubble{background:var(--fos-plate);color:var(--fos-on-plate);border-bottom-right-radius:4px}
.conv-turn.left .conv-bubble{border-bottom-left-radius:4px}
.conv-tx-plain{font-size:12.5px;line-height:1.6;color:var(--s800,#292524);white-space:pre-wrap;word-break:break-word;margin-top:10px;background:var(--s100,#F5F5F4);border:1px solid var(--s200,#E7E5E4);border-radius:13px;padding:14px;max-height:440px;overflow-y:auto;overscroll-behavior:contain;content-visibility:auto;contain-intrinsic-size:auto 440px}

@media (prefers-reduced-motion: reduce){ .conv-play{animation:none} }
.dd2-page .dd2-btn-d {
  background: var(--ink, #0A0A0A);
  color: #fff;
  border-color: var(--ink, #0A0A0A);
}
.dd2-page .dd2-btn-d:not([disabled]):hover { background: var(--s900, #1C1917); }
.dd2-page .dd2-btn-r {
  background: var(--fos-plate);
  color: var(--fos-on-plate);
  border-color: var(--red, #a16207);
  box-shadow: 0 1px 2px rgba(250,204,21,.2), 0 4px 12px -4px rgba(250,204,21,.4);
}
.dd2-page .dd2-btn-r:not([disabled]):hover { background: var(--fos-plate-hover); transform: translateY(-1px); }
.dd2-page .btn-won {
  background: var(--ok-fg, #15803D);
  color: #fff;
  border-color: var(--ok-fg, #15803D);
  box-shadow: 0 1px 2px rgba(21,128,61,.2), 0 8px 18px -6px rgba(21,128,61,.4);
}
.dd2-page .btn-won:not([disabled]):hover { background: #106B33; transform: translateY(-1px); }
.dd2-page .btn-won.pulse { animation: dd2-pulse-won 1.8s ease-in-out infinite; }
.dd2-page .btn-not-proceeding {
  background: #fff;
  color: #B91C1C;
  border-color: rgba(185,28,28,.25);
  box-shadow: var(--shadow-rest);
}
.dd2-page .btn-not-proceeding:hover {
  background: #FEE2E2;
  border-color: #B91C1C;
  transform: translateY(-1px);
}

.dd2-page .owner-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px 6px 6px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--s200, #E7E5E4);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink, #0A0A0A);
  cursor: pointer;
  font-family: inherit;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.dd2-page .owner-pill:hover { border-color: var(--ink, #0A0A0A); }
.dd2-page .owner-pill-av {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--fos-plate);
  color: var(--fos-on-plate);
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Pipeline stage bar ──────────────────────────────────────────────── */
.dd2-page .pipeline {
  margin-bottom: 14px;
  display: flex;
  background: #fff;
  border: 1px solid var(--s200, #E7E5E4);
  border-radius: 12px;
  padding: 6px;
  gap: 4px;
  box-shadow: var(--shadow-rest);
}
/* A-668 — the pipeline is six stages at `flex:1` in a nowrap row. At 344px its
 * content box is 318px and its scroll width 341 — a 23px overflow with
 * `overflow-x: visible`, so it pushed straight out through .dd2-page,
 * #appPageWrap and <main> and widened the layout viewport to 354. Nothing on the
 * page LOOKED broken (no element passed the viewport edge once it had grown), and
 * the consequence surfaced two steps away: the Edit Details drawer sizes to the
 * viewport, so it came up 354px wide on a 344px screen with its Save button off
 * the edge. Found by scanning for the element whose scrollWidth exceeded its own
 * clientWidth, rather than for elements past the viewport edge.
 *
 * It scrolls rather than wraps, for the same reason as the job phase track: a
 * pipeline is a sequence, and a sequence broken across two lines stops reading as
 * one. The active stage is what the user wants to see, and it is scrolled into
 * view by the browser once it is focusable/current. */
html[data-vp="xs"] .dd2-page .pipeline,
html[data-vp="sm"] .dd2-page .pipeline,
html[data-vp="md"] .dd2-page .pipeline {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  max-width: 100%;
}
html[data-vp="xs"] .dd2-page .pipeline::-webkit-scrollbar,
html[data-vp="sm"] .dd2-page .pipeline::-webkit-scrollbar,
html[data-vp="md"] .dd2-page .pipeline::-webkit-scrollbar { height: 0; }
html[data-vp="xs"] .dd2-page .stage,
html[data-vp="sm"] .dd2-page .stage {
  flex: 0 0 auto;
  min-width: 104px;
  padding: 9px 11px;
  scroll-snap-align: start;
}

.dd2-page .stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  text-align: left;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.dd2-page .stage:hover { background: var(--s50, #FAFAF9); }
.dd2-page .stage-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--s500, #78716C);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dd2-page .stage-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--s300, #D6D3D1);
}
.dd2-page .stage-days {
  font-size: 10.5px;
  color: var(--s400, #A8A29E);
  font-weight: 700;
  margin-top: 2px;
}
.dd2-page .stage.done .stage-label { color: var(--ok-fg, #15803D); }
.dd2-page .stage.done .stage-dot   { background: var(--ok-fg, #15803D); }
.dd2-page .stage.now {
  background: var(--pale-red, #fefce8);
}
.dd2-page .stage.now .stage-label { color: var(--red, #a16207); }
.dd2-page .stage.now .stage-dot {
  background: var(--red, #a16207);
  animation: dd2-pulse-stage 1.6s infinite;
}
.dd2-page .stage.now .stage-days { color: var(--red, #a16207); font-weight: 800; }

/* ── Client Details TOP BAR ──────────────────────────────────────────── */
.dd2-page .client-bar {
  background: #fff;
  border: 1px solid var(--s200, #E7E5E4);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-rest);
  margin-bottom: 14px;
  position: relative;
}
.dd2-page .client-bar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    var(--src-rea) 0%,
    var(--src-domain) 22%,
    var(--ai-purple) 45%,
    var(--bal-12) 65%,
    var(--src-fb) 82%,
    var(--info-fg, #1D4ED8) 100%);
  z-index: 1;
}
.dd2-page .cb-h {
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--s100, #F5F5F4);
  background: var(--s50, #FAFAF9);
}
.dd2-page .cb-h-l { display: flex; align-items: center; gap: 10px; }
.dd2-page .cb-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink, #0A0A0A);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dd2-page .cb-title .ico { width: 13px; height: 13px; }
.dd2-page .cb-status {
  font-size: 10.5px;
  color: var(--s500, #78716C);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.dd2-page .cb-status b { color: var(--ink, #0A0A0A); font-weight: 800; }
.dd2-page .cb-refresh {
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  color: var(--s700, #44403C);
  background: #fff;
  border: 1px solid var(--s200, #E7E5E4);
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.dd2-page .cb-refresh:hover {
  background: var(--ink, #0A0A0A);
  color: #fff;
  border-color: var(--ink, #0A0A0A);
}
.dd2-page .cb-refresh .ico { width: 11px; height: 11px; transition: transform 180ms cubic-bezier(.4,0,.2,1); }
.dd2-page .cb-refresh:hover .ico { transform: rotate(180deg); }

.dd2-page .cb-body {
  display: grid;
  /* A-668: every track is minmax(0, …). A bare `260px` is a MINIMUM as well as a
   * maximum for the purposes of the row's total, and a bare `1fr` is
   * minmax(auto, 1fr) whose auto floor is min-content — so one cell holding a
   * long word forced the whole row wider than the card, and the card clips for
   * its rounded corners. Measured on a 1024px tablet in landscape: the ratings
   * cell ended 14px past the card edge, so "BAL · Bushfire" and its value were
   * simply not there. minmax(0, …) lets the tracks give way instead. */
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr) minmax(0, 260px) minmax(0, 196px);
}
@media (max-width: 1320px) {
  .dd2-page .cb-body { grid-template-columns: minmax(0, 280px) minmax(0, 1fr) minmax(0, 240px); }
  .dd2-page .cb-sources-cell { display: none; }
}
@media (max-width: 980px) {
  .dd2-page .cb-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dd2-page .cb-ratings { grid-column: 1 / -1; }
}
/* A-668 — the ladder above stopped at TWO columns, which on a 344px screen is
 * 162px per cell. The card sets overflow:hidden for its rounded corners, so the
 * ratings cell and the property cell were not merely cramped: their content was
 * CLIPPED and unreachable — no scroll gesture gets to it — while the page
 * reported zero horizontal overflow, because the clip was doing its job. That is
 * the failure mode a scrollWidth assertion never sees, and it is why
 * e2e/offline-harness/a668-responsive-sweep.mjs now reports clipped elements
 * separately from overflowing ones.
 *
 * Keyed on the tier attribute rather than another max-width so it cannot drift
 * from SpartanVP's boundaries (see CONTRACT-responsive-layout.md). The cell
 * borders become bottom borders: a right border on a full-width cell draws a
 * stray line down the edge of the card. */
html[data-vp="xs"] .dd2-page .cb-body,
html[data-vp="sm"] .dd2-page .cb-body { grid-template-columns: minmax(0, 1fr); }
html[data-vp="xs"] .dd2-page :where(.cb-identity, .cb-property, .cb-ratings),
html[data-vp="sm"] .dd2-page :where(.cb-identity, .cb-property, .cb-ratings) {
  border-right: 0;
  border-bottom: 1px solid var(--s100, #F5F5F4);
}

/* Identity cell */
.dd2-page .cb-identity {
  padding: 14px 18px;
  border-right: 1px solid var(--s100, #F5F5F4);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.dd2-page .client-photo-wrap { position: relative; flex-shrink: 0; }
.dd2-page .client-photo {
  width: 74px;
  height: 74px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--info-fg, #1D4ED8) 0%, #3B82F6 100%);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 4px 14px -4px rgba(29,78,216,.4);
}
.dd2-page .client-photo img { width: 100%; height: 100%; object-fit: cover; }
.dd2-page .client-photo-src {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,.15);
}
.dd2-page .client-photo-src.fb { background: var(--src-fb); font-family: Georgia, serif; }
.dd2-page .client-photo-src.gravatar { background: var(--ink, #0A0A0A); }
.dd2-page .client-photo-src.linkedin { background: var(--src-li); }
.dd2-page .identity-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.dd2-page .client-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink, #0A0A0A);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.dd2-page .client-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--ok-fg, #15803D);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dd2-page .client-verified .ico { width: 10px; height: 10px; }
.dd2-page .identity-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.dd2-page .contact-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--s700, #44403C);
  font-weight: 600;
  min-width: 0;
}
.dd2-page .contact-row > .ico { color: var(--s400, #A8A29E); width: 12px; height: 12px; flex-shrink: 0; }
.dd2-page .contact-row a { color: var(--info-fg, #1D4ED8); font-weight: 700; text-decoration: none; cursor: pointer; }
.dd2-page .contact-row a:hover { text-decoration: underline; }
/* A-668 — the client's email is the widest single token on this card
 * (samuel.thompson@example.test measured 212px) and `.contact-row .v` sets
 * white-space:nowrap + ellipsis, which is right on a wide card and is what kept
 * the page 10px too wide at 344px. Ellipsising a customer's EMAIL ADDRESS is also
 * the wrong trade on a phone: it is the thing you are looking at the card to
 * read, and the row it lives in is the one you tap to mail them. Let it wrap onto
 * a second line — the card has the vertical room, it does not have the
 * horizontal.
 *
 * (The anchor carries no href, so js/responsive.css's a[href^="mailto:"] rule
 * cannot reach it — hence the fix here rather than there.) */
html[data-vp="xs"] .dd2-page .contact-row,
html[data-vp="sm"] .dd2-page .contact-row { align-items: flex-start; }
html[data-vp="xs"] .dd2-page .contact-row .v,
html[data-vp="sm"] .dd2-page .contact-row .v {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
html[data-vp="xs"] .dd2-page .contact-row > .ico,
html[data-vp="sm"] .dd2-page .contact-row > .ico { margin-top: 3px; }
.dd2-page .contact-row .v {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dd2-page .contact-call {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--fos-plate);
  color: var(--fos-on-plate);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.dd2-page .contact-call:hover { background: var(--fos-plate-hover); transform: translateY(-1px); }
.dd2-page .contact-call .ico { width: 11px; height: 11px; color: var(--fos-on-plate); }

/* Property cell */
.dd2-page .cb-property {
  display: flex;
  gap: 14px;
  padding: 14px 18px;
  border-right: 1px solid var(--s100, #F5F5F4);
  align-items: stretch;
}
.dd2-page .prop-photo-mini {
  width: 130px;
  height: 104px;
  border-radius: 10px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #D6CFC4 0%, #A89C8A 100%);
}
.dd2-page .prop-photo-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dd2-page .prop-photo-mini.placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 30%, rgba(255,255,255,.4) 0%, transparent 50%);
}
.dd2-page .prop-photo-mini.placeholder::after {
  content: '';
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 8%;
  top: 32%;
  background: linear-gradient(180deg, #7C6F5A 0%, #403727 100%);
  clip-path: polygon(0 30%, 50% 0%, 100% 30%, 100% 100%, 0 100%);
}
.dd2-page .prop-photo-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: 8.5px;
  font-weight: 800;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dd2-page .prop-photo-tag .ico { width: 8px; height: 8px; }
.dd2-page .prop-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dd2-page .prop-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--s500, #78716C);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dd2-page .prop-eyebrow .ico { width: 11px; height: 11px; }
.dd2-page .prop-eyebrow .src-tag { margin-left: auto; font-size: 9.5px; font-weight: 700; color: var(--src-rea); }
.dd2-page .prop-summary {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink, #0A0A0A);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.dd2-page .prop-summary b { color: var(--info-fg, #1D4ED8); }
.dd2-page .prop-facts-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  font-size: 11px;
  color: var(--s700, #44403C);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.dd2-page .fact-mini { display: inline-flex; align-items: center; gap: 4px; }
.dd2-page .fact-mini .ico { color: var(--s400, #A8A29E); width: 11px; height: 11px; }
.dd2-page .fact-mini b { color: var(--ink, #0A0A0A); font-weight: 800; }
.dd2-page .prop-estimate {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed var(--s200, #E7E5E4);
  flex-wrap: wrap;
}
.dd2-page .prop-est-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--s500, #78716C);
}
.dd2-page .prop-est-val {
  font-size: 14px;
  font-weight: 900;
  color: var(--ink, #0A0A0A);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.dd2-page .prop-est-conf {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--ok-bg, #DCFCE7);
  color: var(--ok-fg, #15803D);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.dd2-page .prop-est-conf .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ok-fg, #15803D); }
.dd2-page .prop-est-conf.low { background: var(--s100, #F5F5F4); color: var(--s500, #78716C); }
.dd2-page .prop-est-conf.low .dot { background: var(--s400, #A8A29E); }
.dd2-page .prop-empty {
  font-size: 11.5px;
  color: var(--s500, #78716C);
  font-style: italic;
  font-weight: 600;
}

/* Ratings cell */
.dd2-page .cb-ratings {
  padding: 14px 18px;
  border-right: 1px solid var(--s100, #F5F5F4);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.dd2-page .rating-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--s50, #FAFAF9);
  border: 1px solid var(--s100, #F5F5F4);
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.dd2-page .rating-row:hover { background: #fff; border-color: var(--s200, #E7E5E4); }
.dd2-page .rating-ico {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid var(--s200, #E7E5E4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dd2-page .rating-ico .ico { width: 14px; height: 14px; }
.dd2-page .rating-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dd2-page .rating-name {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--s500, #78716C);
  line-height: 1.1;
}
.dd2-page .rating-val {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink, #0A0A0A);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.dd2-page .rating-row.nathers .rating-ico {
  background: rgba(220,38,38,.1);
  color: var(--nathers-poor);
  border-color: rgba(220,38,38,.2);
}
.dd2-page .nathers-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: 12px;
  letter-spacing: -0.06em;
  color: var(--nathers-poor);
}
.dd2-page .nathers-stars .empty { color: var(--s300, #D6D3D1); }
.dd2-page .rating-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}
.dd2-page .rating-tag.opportunity {
  background: var(--pale-red, #fefce8);
  color: var(--red, #a16207);
  border: 1px solid rgba(161,98,7,.18);
}
.dd2-page .rating-row.bal .rating-ico {
  background: var(--bal-12-bg);
  color: var(--bal-12);
  border-color: rgba(217,119,6,.2);
}
.dd2-page .bal-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.dd2-page .bal-pill.low { background: var(--bal-low-bg); color: var(--bal-low); }
.dd2-page .bal-pill.b12 { background: var(--bal-12-bg); color: var(--bal-12); }
.dd2-page .bal-pill.b29 { background: var(--bal-29-bg); color: var(--bal-29); }
.dd2-page .bal-pill.unknown { background: var(--s100, #F5F5F4); color: var(--s500, #78716C); }
.dd2-page .rating-row.heritage .rating-ico {
  background: var(--s100, #F5F5F4);
  color: var(--s500, #78716C);
  border-color: var(--s200, #E7E5E4);
}
.dd2-page .heritage-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
}
.dd2-page .heritage-pill.none { background: var(--s100, #F5F5F4); color: var(--s600, #57534E); }
.dd2-page .heritage-pill.flagged { background: var(--heritage-bg); color: var(--heritage-fg); }

/* Sources cell */
.dd2-page .cb-sources-cell {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.dd2-page .cb-sources-h {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--s500, #78716C);
  margin-bottom: 3px;
}
.dd2-page .src-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 7px;
  background: var(--s50, #FAFAF9);
  border: 1px solid var(--s100, #F5F5F4);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink, #0A0A0A);
  cursor: pointer;
  text-decoration: none;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.dd2-page .src-link:hover { background: #fff; border-color: var(--s300, #D6D3D1); transform: translateX(2px); }
.dd2-page .src-link.disabled { opacity: 0.5; }
.dd2-page .src-link.disabled:hover { transform: none; background: var(--s50, #FAFAF9); border-color: var(--s100, #F5F5F4); }
.dd2-page .src-mark-sm {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.dd2-page .src-mark-sm.rea        { background: var(--src-rea); }
.dd2-page .src-mark-sm.domain     { background: var(--src-domain); }
.dd2-page .src-mark-sm.streetview { background: var(--ink, #0A0A0A); font-family: Georgia, serif; }
.dd2-page .src-mark-sm.fb         { background: var(--src-fb); font-family: Georgia, serif; }
.dd2-page .src-mark-sm.li         { background: var(--src-li); }
.dd2-page .src-link .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dd2-page .src-link .ico { margin-left: auto; color: var(--s400, #A8A29E); width: 10px; height: 10px; }
.dd2-page .src-link .status-mini {
  font-size: 9px;
  color: var(--s400, #A8A29E);
  font-weight: 700;
  text-transform: uppercase;
}

/* ── AI Summary strip ─────────────────────────────────────────────────── */
.dd2-page .ai-summary {
  background: linear-gradient(135deg, #fff 0%, var(--ai-purple-bg) 100%);
  border: 1px solid rgba(124,58,237,.2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-rest);
  margin-bottom: 18px;
  display: flex;
  align-items: stretch;
}
.dd2-page .ai-spark-col {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border-right: 1px dashed rgba(124,58,237,.18);
  background: linear-gradient(180deg, rgba(124,58,237,.04) 0%, rgba(124,58,237,.08) 100%);
}
.dd2-page .ai-spark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--ai-purple) 0%, #A855F7 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px -2px rgba(124,58,237,.4);
  animation: dd2-ai-glow 2.4s ease-in-out infinite;
}
.dd2-page .ai-spark .ico { width: 20px; height: 20px; }
.dd2-page .ai-spark-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ai-purple);
  text-align: center;
  line-height: 1.2;
}
.dd2-page .ai-body {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.dd2-page .ai-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dd2-page .ai-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ai-purple);
}
.dd2-page .ai-meta {
  font-size: 10px;
  color: var(--s500, #78716C);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.dd2-page .ai-meta b { color: var(--ink, #0A0A0A); font-weight: 800; }
.dd2-page .ai-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.dd2-page .ai-action-btn {
  padding: 4px 9px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--s700, #44403C);
  background: #fff;
  border: 1px solid var(--s200, #E7E5E4);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.dd2-page .ai-action-btn:hover {
  background: var(--ai-purple);
  color: #fff;
  border-color: var(--ai-purple);
  transform: translateY(-1px);
}
.dd2-page .ai-action-btn .ico { width: 11px; height: 11px; }
.dd2-page .ai-text {
  font-size: 13px;
  color: var(--ink, #0A0A0A);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.005em;
  margin: 0;
}
.dd2-page .ai-text b {
  font-weight: 700;
  color: var(--ai-purple);
  background: rgba(124,58,237,.08);
  padding: 0 3px;
  border-radius: 3px;
}
.dd2-page .ai-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 5px;
  border-top: 1px dashed rgba(124,58,237,.15);
  flex-wrap: wrap;
}
.dd2-page .ai-foot-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ai-purple);
  font-weight: 800;
  text-transform: uppercase;
}
.dd2-page .ai-source-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--s700, #44403C);
  padding: 2px 6px;
  background: #fff;
  border: 1px solid var(--s200, #E7E5E4);
  border-radius: 5px;
}
.dd2-page .ai-source-chip .src-mark-sm { width: 10px; height: 10px; font-size: 7px; }
.dd2-page .ai-disclaimer {
  margin-left: auto;
  font-size: 9.5px;
  color: var(--s400, #A8A29E);
  font-weight: 600;
  font-style: italic;
}
.dd2-page .ai-empty {
  font-size: 12px;
  color: var(--s500, #78716C);
  font-weight: 600;
  font-style: italic;
  padding: 4px 0;
}
.dd2-page .ai-empty b { color: var(--ink, #0A0A0A); font-weight: 800; font-style: normal; }

/* ── Rich AI brief (web-search-powered Claude output) ─────────────────── */
.dd2-page .ai-summary-rich .ai-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dd2-page .ai-streetview {
  position: relative;
  display: block;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 2 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--s100, #F5F5F4);
  margin-top: 4px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dd2-page .ai-streetview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dd2-page .ai-streetview-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(10,10,10,0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  backdrop-filter: blur(2px);
}
.dd2-page .ai-streetview-tag .ico { width: 11px; height: 11px; color: #fff; }
.dd2-page .ai-streetview-fallback {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 16px;
  color: var(--s600, #57534E);
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, #F5F5F4 0%, #E7E5E4 100%);
}
.dd2-page .ai-streetview-fallback .ico { width: 24px; height: 24px; color: var(--s400, #A8A29E); }
.dd2-page .ai-streetview-broken .ai-streetview-tag { display: none; }
.dd2-page .ai-streetview-broken .ai-streetview-fallback { display: flex; }
.dd2-page .ai-headline {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--ink, #0A0A0A);
  padding: 4px 0;
}
.dd2-page .ai-headline b { font-weight: 800; }
.dd2-page .ai-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
@media (max-width: 900px) {
  .dd2-page .ai-sections { grid-template-columns: 1fr; }
}
.dd2-page .ai-section {
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--s100, #F5F5F4);
  border-radius: 10px;
  padding: 10px 12px;
}
.dd2-page .ai-section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--s600, #57534E);
  margin-bottom: 6px;
}
.dd2-page .ai-section-label .ico { width: 12px; height: 12px; color: var(--red, #a16207); }
.dd2-page .ai-section p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink, #0A0A0A);
}
.dd2-page .ai-section p b { font-weight: 700; }
.dd2-page .ai-section.ai-section-conversation_angles {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, #FEF7E6 0%, #FFFCF3 100%);
  border-color: #F5E0A8;
}
.dd2-page .ai-section.ai-section-conversation_angles .ai-section-label { color: #92400E; }
.dd2-page .ai-section.ai-section-conversation_angles .ai-section-label .ico { color: #92400E; }
.dd2-page .ai-bullets {
  margin: 0;
  padding: 0 0 0 16px;
  list-style: none;
}
.dd2-page .ai-bullets li {
  position: relative;
  padding: 4px 0 4px 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink, #0A0A0A);
}
.dd2-page .ai-bullets li::before {
  content: '→';
  position: absolute;
  left: -16px;
  top: 4px;
  color: #92400E;
  font-weight: 800;
}
.dd2-page .ai-source-none {
  font-style: italic;
  opacity: 0.7;
}

/* ── AI Brief loading state — engaged while Claude is researching ─────── */
.dd2-page .ai-summary-loading {
  position: relative;
  overflow: hidden;
}
.dd2-page .ai-summary-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(250, 204, 21, 0.06) 30%,
    rgba(139, 92, 246, 0.08) 50%,
    rgba(250, 204, 21, 0.06) 70%,
    transparent 100%);
  background-size: 200% 100%;
  animation: ai-sheen 3s linear infinite;
  pointer-events: none;
  border-radius: inherit;
}
@keyframes ai-sheen {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.dd2-page .ai-spark.ai-spark-pulse {
  animation: ai-spark-pulse 1.6s ease-in-out infinite;
  color: #000;
  background: linear-gradient(135deg, #8B5CF6 0%, #facc15 100%);
  box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.45);
}
@keyframes ai-spark-pulse {
  0%, 100% { transform: scale(1);   box-shadow: 0 0 0 0   rgba(250, 204, 21, 0.45); }
  50%      { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(250, 204, 21, 0); }
}
.dd2-page .ai-eyebrow-loading {
  background: linear-gradient(90deg, #8B5CF6, #a16207, #8B5CF6);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: ai-text-shimmer 3s linear infinite;
  font-weight: 800;
}
@keyframes ai-text-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.dd2-page .ai-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16A34A;
  margin-right: 4px;
  vertical-align: 1px;
}
.dd2-page .ai-dot-blink { animation: ai-dot-blink 1.2s ease-in-out infinite; }
@keyframes ai-dot-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.85); }
}
.dd2-page .ai-loading-messages {
  position: relative;
  height: 22px;
  margin: 4px 0 10px;
}
.dd2-page .ai-loading-msg {
  position: absolute;
  inset: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink, #0A0A0A);
  opacity: 0;
  transform: translateY(6px);
  animation: ai-msg-cycle 14s ease-in-out infinite;
  letter-spacing: 0.01em;
}
.dd2-page .ai-loading-msg:nth-child(1) { animation-delay: 0s;  }
.dd2-page .ai-loading-msg:nth-child(2) { animation-delay: 2s;  }
.dd2-page .ai-loading-msg:nth-child(3) { animation-delay: 4s;  }
.dd2-page .ai-loading-msg:nth-child(4) { animation-delay: 6s;  }
.dd2-page .ai-loading-msg:nth-child(5) { animation-delay: 8s;  }
.dd2-page .ai-loading-msg:nth-child(6) { animation-delay: 10s; }
.dd2-page .ai-loading-msg:nth-child(7) { animation-delay: 12s; }
@keyframes ai-msg-cycle {
  0%       { opacity: 0; transform: translateY(6px); }
  3%, 12%  { opacity: 1; transform: translateY(0); }
  15%, 100%{ opacity: 0; transform: translateY(-6px); }
}
.dd2-page .ai-skeleton-hero {
  width: 100%;
  max-width: 640px;
  aspect-ratio: 2 / 1;
  border-radius: 10px;
  margin-top: 4px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%),
    linear-gradient(135deg, #EEE7FB 0%, #FDE7EB 100%);
  background-size: 200% 100%, 100% 100%;
  background-repeat: no-repeat;
  animation: ai-skeleton-sheen 1.6s linear infinite;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
}
@keyframes ai-skeleton-sheen {
  0%   { background-position: -100% 0, 0 0; }
  100% { background-position:  200% 0, 0 0; }
}
.dd2-page .ai-skeleton-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
@media (max-width: 900px) {
  .dd2-page .ai-skeleton-sections { grid-template-columns: 1fr; }
}
.dd2-page .ai-skeleton-card {
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--s100, #F5F5F4);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dd2-page .ai-skeleton-card.ai-skeleton-wide {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, #FEF7E6 0%, #FFFCF3 100%);
  border-color: #F5E0A8;
}
.dd2-page .ai-skeleton-label,
.dd2-page .ai-skeleton-line,
.dd2-page .ai-skeleton-bullet {
  background: linear-gradient(90deg,
    rgba(250, 204, 21, 0.08) 0%,
    rgba(139, 92, 246, 0.14) 50%,
    rgba(250, 204, 21, 0.08) 100%);
  background-size: 200% 100%;
  animation: ai-skeleton-shimmer 1.4s linear infinite;
  border-radius: 4px;
}
@keyframes ai-skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.dd2-page .ai-skeleton-label { height: 9px;  width: 35%; }
.dd2-page .ai-skeleton-line  { height: 10px; width: 100%; }
.dd2-page .ai-skeleton-line.short { width: 70%; }
.dd2-page .ai-skeleton-bullet { height: 10px; width: 100%; }
.dd2-page .ai-skeleton-card.ai-skeleton-wide .ai-skeleton-bullet:nth-child(2) { width: 92%; }
.dd2-page .ai-skeleton-card.ai-skeleton-wide .ai-skeleton-bullet:nth-child(3) { width: 78%; }
.dd2-page .ai-skeleton-card.ai-skeleton-wide .ai-skeleton-bullet:nth-child(4) { width: 86%; }
.dd2-page .ai-foot-loading {
  border-top: 1px dashed rgba(139, 92, 246, 0.25);
  margin-top: 4px;
  padding-top: 10px;
}
.dd2-page .ai-foot-tip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--s600, #57534E);
  font-style: italic;
  font-weight: 600;
}
.dd2-page .ai-foot-tip .ico { width: 12px; height: 12px; color: #8B5CF6; }

/* ── Main two-col layout ──────────────────────────────────────────────── */
.dd2-page .dd2-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) {
  .dd2-page .dd2-layout { grid-template-columns: 1fr; }
}
.dd2-page .dd2-left-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 96px;
  align-self: start;
  min-width: 0;
}
.dd2-page .dd2-left-stack > * {
  position: relative;
  width: 100%;
  flex-shrink: 0;
}
.dd2-page .dd2-right-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* ── Value callout ────────────────────────────────────────────────────── */
.dd2-page .value-callout {
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--ink, #0A0A0A) 0%, var(--s800, #292524) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 14px;
  box-shadow: var(--shadow-rest);
}
.dd2-page .value-l { flex: 1; min-width: 0; }
.dd2-page .value-eyebrow {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  margin-bottom: 3px;
}
.dd2-page .value-num {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.dd2-page .value-num .sm { font-size: 14px; font-weight: 700; color: rgba(255,255,255,.5); margin-left: 5px; }
.dd2-page .value-sub {
  font-size: 10.5px;
  color: rgba(255,255,255,.6);
  font-weight: 600;
  margin-top: 4px;
}
.dd2-page .value-sub b { color: rgba(255,255,255,.85); font-weight: 800; }
.dd2-page .value-r { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.dd2-page .value-prob {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
}
.dd2-page .value-prob-bar {
  width: 60px;
  height: 5px;
  background: rgba(255,255,255,.15);
  border-radius: 3px;
  overflow: hidden;
}
.dd2-page .value-prob-fill {
  height: 100%;
  background: linear-gradient(90deg, #22C55E 0%, var(--ok-fg, #15803D) 100%);
}
.dd2-page .value-prob-num {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* ── Quick Actions card (Build Quote → SpartanCAD hero) ──────────────── */
.dd2-page .qa-card {
  background: #fff;
  border: 1px solid var(--s200, #E7E5E4);
  border-radius: 14px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-rest);
}
.dd2-page .qa-cad {
  background: linear-gradient(135deg, var(--fos-plate) 0%, var(--fos-plate-hover) 100%);
  color: var(--fos-on-plate);
  border: 1px solid var(--red, #a16207);
  padding: 13px;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(250,204,21,.2), 0 8px 18px -4px rgba(250,204,21,.5);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  border-radius: 10px;
  font-family: inherit;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.dd2-page .qa-cad::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: dd2-shimmer 3s infinite;
}
.dd2-page .qa-cad:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(250,204,21,.25), 0 14px 26px -6px rgba(250,204,21,.6);
}
.dd2-page .qa-cad .ico { width: 18px; height: 18px; position: relative; z-index: 1; color: var(--fos-on-plate); }
.dd2-page .qa-cad-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
.dd2-page .qa-cad-main {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.005em;
  color: var(--fos-on-plate);
}
.dd2-page .qa-cad-sub {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,0,0,.7);
}
.dd2-page .qa-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dd2-page .qa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink, #0A0A0A);
  background: var(--s50, #FAFAF9);
  border: 1px solid var(--s100, #F5F5F4);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.dd2-page .qa-btn:hover {
  background: #fff;
  border-color: var(--ink, #0A0A0A);
  transform: translateY(-1px);
  box-shadow: var(--shadow-rest);
}
.dd2-page .qa-btn .ico { width: 12px; height: 12px; }
.dd2-page .qa-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ── Smart cluster (left rail) ────────────────────────────────────────── */
.dd2-page .cluster-card {
  background: linear-gradient(180deg, #fff 0%, var(--pale-red, #fefce8) 100%);
  border: 1px solid rgba(161,98,7,.2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-rest);
}
.dd2-page .cluster-card-h {
  padding: 11px 14px 9px;
  border-bottom: 1px solid rgba(161,98,7,.1);
}
.dd2-page .cluster-card-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red, #a16207);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.dd2-page .cluster-card-title .ico { width: 12px; height: 12px; }
.dd2-page .cluster-card-body { padding: 11px 14px; }
.dd2-page .cluster-card-headline {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink, #0A0A0A);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.dd2-page .cluster-card-headline b { color: var(--red, #a16207); }
.dd2-page .cluster-card-sub {
  font-size: 11px;
  color: var(--s500, #78716C);
  font-weight: 600;
  margin-top: 3px;
}
.dd2-page .cluster-card-cta {
  padding: 10px 14px;
  border-top: 1px solid rgba(161,98,7,.1);
  background: rgba(255,255,255,.6);
}
.dd2-page .cluster-card-cta .dd2-btn {
  width: 100%;
  justify-content: center;
  padding: 9px;
}

/* ── Detail card (left rail) ──────────────────────────────────────────── */
.dd2-page .detail-card {
  background: #fff;
  border: 1px solid var(--s200, #E7E5E4);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-rest);
}
.dd2-page .detail-card-h {
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--s100, #F5F5F4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dd2-page .detail-card-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--s500, #78716C);
}
.dd2-page .detail-card-action {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--s500, #78716C);
  cursor: pointer;
  padding: 3px 7px;
  border-radius: 5px;
  background: none;
  border: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dd2-page .detail-card-action:hover { color: var(--ink, #0A0A0A); background: var(--s50, #FAFAF9); }
.dd2-page .detail-card-action .ico { width: 11px; height: 11px; }
.dd2-page .detail-card-body {
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.dd2-page .detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}
.dd2-page .detail-row .k { color: var(--s500, #78716C); font-weight: 600; }
.dd2-page .detail-row .v { color: var(--ink, #0A0A0A); font-weight: 800; font-variant-numeric: tabular-nums; }
.dd2-page .detail-row .v.muted { color: var(--s500, #78716C); font-weight: 600; }

/* ── Focus next banner (right col) ────────────────────────────────────── */
.dd2-page .focus-next {
  background: linear-gradient(135deg, #fff 0%, var(--pale-red, #fefce8) 100%);
  border: 1px solid rgba(161,98,7,.18);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-rest);
}
.dd2-page .focus-next-body {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.dd2-page .focus-next-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--fos-plate);
  color: var(--fos-on-plate);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dd2-page .focus-next-ico .ico { width: 18px; height: 18px; }
.dd2-page .focus-next-mid { flex: 1; min-width: 0; }
.dd2-page .focus-next-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red, #a16207);
  margin-bottom: 3px;
}
.dd2-page .focus-next-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink, #0A0A0A);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.dd2-page .focus-next-sub {
  font-size: 11.5px;
  color: var(--s600, #57534E);
  font-weight: 600;
  margin-top: 3px;
}
.dd2-page .focus-next-sub b { color: var(--ink, #0A0A0A); font-weight: 800; }
.dd2-page .focus-next-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

/* ── Tabs / composer / timeline ──────────────────────────────────────── */
.dd2-page .tabs-card {
  background: #fff;
  border: 1px solid var(--s200, #E7E5E4);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-rest);
}
.dd2-page .tabs-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--s200, #E7E5E4);
  padding: 0 4px;
  gap: 2px;
  overflow-x: auto;
}
.dd2-page .tab {
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--s500, #78716C);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.dd2-page .tab:hover { color: var(--ink, #0A0A0A); }
.dd2-page .tab.on { color: var(--ink, #0A0A0A); }
.dd2-page .tab.on::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: var(--red, #a16207);
  border-radius: 1px 1px 0 0;
}
.dd2-page .tab .ico { width: 14px; height: 14px; }
.dd2-page .tab-c {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--s100, #F5F5F4);
  color: var(--s600, #57534E);
}
.dd2-page .tab.on .tab-c { background: var(--fos-plate); color: var(--fos-on-plate); }

.dd2-page .composer {
  padding: 18px 22px;
  border-bottom: 1px solid var(--s100, #F5F5F4);
  background: linear-gradient(180deg, var(--s50, #FAFAF9) 0%, #fff 100%);
}
.dd2-page .composer-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--s500, #78716C);
  margin-bottom: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.dd2-page .composer-eyebrow .ico { width: 12px; height: 12px; }
.dd2-page .action-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 13px;
  flex-wrap: wrap;
}
.dd2-page .action-chip {
  padding: 7px 12px;
  background: #fff;
  border: 1px solid var(--s200, #E7E5E4);
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--s700, #44403C);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.dd2-page .action-chip:hover {
  border-color: var(--ink, #0A0A0A);
  color: var(--ink, #0A0A0A);
  transform: translateY(-1px);
}
.dd2-page .action-chip.on.primary {
  background: var(--fos-plate);
  color: var(--fos-on-plate);
  border-color: var(--red, #a16207);
}
.dd2-page .action-chip .ico { width: 12px; height: 12px; }
.dd2-page .composer-input textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--s200, #E7E5E4);
  border-radius: 9px;
  padding: 11px 13px;
  font-size: 12.5px;
  line-height: 1.4;
  min-height: 54px;
  color: var(--ink, #0A0A0A);
  resize: vertical;
  font-family: inherit;
}
.dd2-page .composer-input textarea:focus {
  outline: none;
  border-color: var(--ink, #0A0A0A);
  box-shadow: 0 0 0 3px rgba(10,10,10,.05);
}
.dd2-page .composer-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 11px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.dd2-page .composer-hint {
  font-size: 10.5px;
  color: var(--s400, #A8A29E);
  font-weight: 600;
}
.dd2-page .composer-hint b { color: var(--s700, #44403C); }

.dd2-page .timeline { padding: 6px 22px 22px; }
.dd2-page .timeline-day {
  padding: 14px 0 8px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--s400, #A8A29E);
  display: flex;
  align-items: center;
  gap: 9px;
}
.dd2-page .timeline-day::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--s200, #E7E5E4);
}
.dd2-page .tl-item { display: flex; gap: 11px; padding: 10px 0; }
.dd2-page .tl-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--s100, #F5F5F4);
  color: var(--s600, #57534E);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dd2-page .tl-ico .ico { width: 14px; height: 14px; }
.dd2-page .tl-ico.created { background: var(--info-bg, #DBEAFE); color: var(--info-fg, #1D4ED8); }
.dd2-page .tl-ico.ai { background: var(--ai-purple-bg); color: var(--ai-purple); }
.dd2-page .tl-ico.call { background: var(--ok-bg, #DCFCE7); color: var(--ok-fg, #15803D); }
.dd2-page .tl-ico.sms { background: var(--pale-red, #fefce8); color: var(--red, #a16207); }
.dd2-page .tl-ico.email { background: var(--info-bg, #DBEAFE); color: var(--info-fg, #1D4ED8); }
.dd2-page .tl-mid { flex: 1; min-width: 0; }
.dd2-page .tl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.dd2-page .tl-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink, #0A0A0A);
  letter-spacing: -0.005em;
}
.dd2-page .tl-meta {
  font-size: 10.5px;
  color: var(--s400, #A8A29E);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.dd2-page .tl-meta b { color: var(--s700, #44403C); font-weight: 800; }
.dd2-page .tl-body {
  font-size: 12px;
  color: var(--s700, #44403C);
  line-height: 1.5;
  font-weight: 500;
}
.dd2-page .tl-body b { color: var(--ink, #0A0A0A); font-weight: 700; }

/* Empty timeline / tab states */
.dd2-page .empty-state {
  padding: 32px 18px;
  text-align: center;
  color: var(--s500, #78716C);
}
.dd2-page .empty-state .ico-lg { width: 32px; height: 32px; color: var(--s400, #A8A29E); }
.dd2-page .empty-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink, #0A0A0A);
  margin: 8px 0 4px;
}
.dd2-page .empty-sub {
  font-size: 11.5px;
  color: var(--s500, #78716C);
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.5;
}
/* GP-014 — first-action buttons under the Conversations empty state; dd2 had
   no rule for this (ld-page's equivalent lives in lead-detail-redesign.css). */
.dd2-page .empty-actions {
  margin-top: 4px;
  display: inline-flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Quotes tab — clickable quote cards (open in SpartanCAD) ──────────── */
/* S-137: the whole card is the click target (cq-edit / cq-view); secondary
   qt-act buttons carry their own data-action so delegation never falls
   through to the row. */
.dd2-page .qt-wrap {
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dd2-page .qt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.dd2-page .qt-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--s500, #78716C);
  min-width: 0;
}
.dd2-page .qt-hint .ico { width: 13px; height: 13px; color: var(--s400, #A8A29E); flex: 0 0 auto; }
.dd2-page .qt-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--s200, #E7E5E4);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.dd2-page .qt-row:hover,
.dd2-page .qt-row:focus-within {
  border-color: rgba(161, 98, 7, .4);
  box-shadow: 0 2px 6px rgba(28, 25, 23, .06), 0 10px 24px -12px rgba(250, 204, 21, .35);
  transform: translateY(-1px);
}
.dd2-page .qt-row.is-active::before,
.dd2-page .qt-row.is-won::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--red, #a16207);
}
.dd2-page .qt-row.is-won::before { background: var(--ok-fg, #15803D); }
.dd2-page .qt-ico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--s100, #F5F5F4);
  color: var(--s600, #57534E);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: background .15s ease, color .15s ease;
}
.dd2-page .qt-ico .ico { width: 18px; height: 18px; }
.dd2-page .qt-row:hover .qt-ico { background: var(--pale-red, #fefce8); color: var(--red, #a16207); }
.dd2-page .qt-row.is-won:hover .qt-ico { background: var(--ok-bg, #F0FDF4); color: var(--ok-fg, #15803D); }
.dd2-page .qt-main { flex: 1; min-width: 0; }
.dd2-page .qt-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink, #0A0A0A);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.dd2-page .qt-meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--s500, #78716C);
  margin-top: 2px;
}
.dd2-page .qt-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 5px;
}
.dd2-page .qt-chip .ico { width: 10px; height: 10px; }
.dd2-page .qt-chip-active {
  background: var(--pale-red, #fefce8);
  color: var(--red, #a16207);
  border: 1px solid rgba(161, 98, 7, .25);
}
.dd2-page .qt-chip-won {
  background: var(--ok-bg, #DCFCE7);
  color: var(--ok-fg, #15803D);
  border: 1px solid rgba(21, 128, 61, .25);
}
.dd2-page .qt-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.dd2-page .qt-act {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--s600, #57534E);
  background: #fff;
  border: 1px solid var(--s200, #E7E5E4);
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.dd2-page .qt-act .ico { width: 11px; height: 11px; }
.dd2-page .qt-act:hover {
  border-color: var(--ink, #0A0A0A);
  color: var(--ink, #0A0A0A);
  background: var(--s50, #FAFAF9);
}
.dd2-page .qt-act.qt-act-danger:hover {
  border-color: #FECACA;
  color: #B91C1C;
  background: #FEF2F2;
}
.dd2-page .qt-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}
.dd2-page .qt-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink, #0A0A0A);
  font-variant-numeric: tabular-nums;
}
/* A real <button> — the card's discrete keyboard/AT control. */
.dd2-page .qt-open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  font-family: inherit;
  padding: 4px 10px;
  border-radius: 7px;
  color: var(--red, #a16207);
  background: var(--pale-red, #fefce8);
  border: 1px solid rgba(161, 98, 7, .2);
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.dd2-page .qt-open .ico { width: 11px; height: 11px; }
.dd2-page .qt-open:focus-visible { outline: 2px solid var(--red, #a16207); outline-offset: 2px; }
.dd2-page .qt-row:hover .qt-open,
.dd2-page .qt-open:focus-visible {
  background: var(--fos-plate);
  color: var(--fos-on-plate);
  border-color: var(--red, #a16207);
}
.dd2-page .qt-open-view {
  color: var(--ok-fg, #15803D);
  background: var(--ok-bg, #F0FDF4);
  border-color: rgba(21, 128, 61, .25);
}
.dd2-page .qt-open-view:focus-visible { outline-color: var(--ok-fg, #15803D); }
.dd2-page .qt-row:hover .qt-open-view,
.dd2-page .qt-open-view:focus-visible {
  background: var(--ok-fg, #15803D);
  color: #fff;
  border-color: var(--ok-fg, #15803D);
}
.dd2-page .qt-chev {
  width: 15px;
  height: 15px;
  color: var(--s300, #D6D3D1);
  flex: 0 0 auto;
  transition: color .15s ease, transform .15s ease;
}
.dd2-page .qt-row:hover .qt-chev { color: var(--red, #a16207); transform: translateX(2px); }
.dd2-page .qt-row.is-won:hover .qt-chev { color: var(--ok-fg, #15803D); }
.dd2-page .dd2-btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
/* Disabled buttons still match :hover — the :not([disabled]) guards on the
   four dd2-btn hover variants above keep a locked button (e.g. New Quote on a
   won deal) visually inert while preserving its explanatory title tooltip
   (pointer-events:none would drop it). */
@media (max-width: 640px) {
  .dd2-page .qt-row { flex-wrap: wrap; }
  .dd2-page .qt-side {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    padding-left: 52px;
    box-sizing: border-box; /* padding inside the 100% — else the pill clips off the card */
  }
  .dd2-page .qt-chev { display: none; }
}


/* A-668 — the client-details card header is a single flex row (eyebrow, status
 * note, Edit Details, Refresh). At 344px the last button was pushed past the
 * card's overflow:hidden edge, so "Refresh" — the control the note itself tells
 * you to press ("Not enriched yet · click Refresh to fetch") — could not be
 * reached. Let it wrap. */
html[data-vp="xs"] .dd2-page :where(.cb-h, .cb-head),
html[data-vp="sm"] .dd2-page :where(.cb-h, .cb-head) { flex-wrap: wrap; gap: 8px; row-gap: 8px; }
html[data-vp="xs"] .dd2-page :where(.cb-h, .cb-head) > * { min-width: 0; }
/* The action pair inside the header sets flex-shrink:0 inline (correct on a wide
 * header — the buttons must not squash). With the header wrapping they simply
 * move to a second line, but they still need to be allowed to fill it. */
html[data-vp="xs"] .dd2-page :where(.cb-h, .cb-head) > [style*="flex-shrink:0"],
html[data-vp="sm"] .dd2-page :where(.cb-h, .cb-head) > [style*="flex-shrink:0"] { flex: 1 1 100%; }
