/* ADP Discovery Chat — widget.css
   Reuses design tokens from site.css (:root block).
   No framework, no CDN.
   Spec §12. */

/* ── Reset (scoped to widget) ───────────────────────────────────────────── */
#adp-widget * { box-sizing: border-box; }
#adp-widget { font-family: var(--font-body, "DM Sans", system-ui, sans-serif); }

/* ── Widget shell ───────────────────────────────────────────────────────── */
#adp-widget {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e6e6e3);
  border-radius: 10px;
  overflow: hidden;
  color: var(--text, #1f2328);
  font-size: 16px;
  line-height: 1.55;
}

@media (max-width: 360px) {
  #adp-widget {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}

/* ── Desktop: wider widget (T46) ─────────────────────────────────────────── */
@media (min-width: 900px) {
  #adp-widget        { max-width: 760px; }
  .adp-mount-confirm { max-width: 760px; }
  .adp-cfm-shell     { max-width: 760px; }
}

/* Q&A steps (no card sections): keep a readable ~65ch text measure at desktop.
   The card step (:has(.adp-card-section)) keeps full-body width for the grid. */
@media (min-width: 900px) {
  .adp-body:not(:has(.adp-card-section)) {
    padding-left: 80px;
    padding-right: 80px;
  }
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.adp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #e6e6e3);
  background: var(--surface, #ffffff);
}
.adp-brand {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text, #1f2328);
}
.adp-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent, #1d6a57);
  background: color-mix(in srgb, var(--accent, #1d6a57) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #1d6a57) 30%, transparent);
  border-radius: 20px;
  padding: 3px 9px 3px 6px;
}
.adp-ai-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent, #1d6a57);
  flex-shrink: 0;
}

/* ── Body ───────────────────────────────────────────────────────────────── */
.adp-body {
  padding: 20px 20px 24px;
  min-height: 120px;
}

@media (max-width: 340px) {
  .adp-body { padding: 14px 12px 18px; }
}

/* ── Live region (sr-only) ──────────────────────────────────────────────── */
.adp-sr-only {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Headings ───────────────────────────────────────────────────────────── */
.adp-body h2 {
  font-family: var(--font-head, "Bricolage Grotesque", system-ui, sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 14px;
  color: var(--text, #1f2328);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.adp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 18px;
  margin-top: 12px;
  font-size: .95rem;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.2;
  border-radius: 8px;
  border: 2px solid var(--accent, #1d6a57);
  cursor: pointer;
  text-decoration: none;
  transition: filter .15s;
}
.adp-btn--primary {
  background: var(--accent, #1d6a57);
  color: var(--accent-text, #ffffff);
}
.adp-btn--primary:hover { filter: brightness(1.08); }
.adp-btn--secondary {
  background: transparent;
  color: var(--accent, #1d6a57);
}
.adp-btn--secondary:hover { background: color-mix(in srgb, var(--accent,#1d6a57) 6%, transparent); }
.adp-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--accent, #1d6a57);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  width: auto;
  padding: 4px 0;
  margin-top: 6px;
}
.adp-btn--ghost:hover { color: var(--text, #1f2328); }
.adp-btn--outline {
  background: transparent;
  border: 2px solid var(--border, #e6e6e3);
  color: var(--text, #1f2328);
}

.adp-btn:focus-visible {
  outline: 3px solid var(--accent, #1d6a57);
  outline-offset: 3px;
}

/* ── Fields ─────────────────────────────────────────────────────────────── */
.adp-field { margin-bottom: 14px; }
.adp-field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text, #1f2328);
}
.adp-field input,
.adp-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: .95rem;
  padding: 9px 11px;
  border: 1.5px solid var(--field-border, #7d838c);
  border-radius: 6px;
  background: var(--bg, #fbfbfa);
  color: var(--text, #1f2328);
  transition: border-color .15s;
}
.adp-field input:focus,
.adp-field textarea:focus {
  outline: none;
  border-color: var(--accent, #1d6a57);
}
.adp-field textarea { resize: vertical; }
.adp-chars {
  font-size: .78rem;
  font-weight: 400;
  color: var(--muted, #545c68);
}

/* Code input */
.adp-code-input {
  width: 100%;
  font-family: monospace;
  font-size: 1.6rem;
  letter-spacing: 0.2em;
  text-align: center;
  padding: 12px;
  border: 1.5px solid var(--field-border, #7d838c);
  border-radius: 6px;
  background: var(--bg, #fbfbfa);
  color: var(--text, #1f2328);
}
.adp-code-input:focus {
  outline: none;
  border-color: var(--accent, #1d6a57);
}

/* ── Notice box ─────────────────────────────────────────────────────────── */
.adp-notice {
  background: color-mix(in srgb, var(--accent, #1d6a57) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #1d6a57) 20%, transparent);
  border-radius: 6px;
  padding: 10px 13px;
  font-size: .85rem;
  margin-bottom: 12px;
  color: var(--text, #1f2328);
}
.adp-notice a { color: var(--accent, #1d6a57); }
.adp-notice-warn {
  font-size: .82rem;
  color: var(--muted, #545c68);
  margin-bottom: 14px;
  font-style: italic;
}

/* ── Checkbox row ───────────────────────────────────────────────────────── */
.adp-check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 10px;
  font-size: .88rem;
}
.adp-check-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--accent, #1d6a57);
}

/* ── Divider ─────────────────────────────────────────────────────────────── */
.adp-divider {
  border: none;
  border-top: 1px solid var(--border, #e6e6e3);
  margin: 16px 0;
}

/* ── Readiness ───────────────────────────────────────────────────────────── */
.adp-progress-line {
  font-size: .8rem;
  color: var(--muted, #545c68);
  margin-bottom: 4px;
}
.adp-progress-pip {
  display: flex;
  gap: 5px;
  margin-bottom: 14px;
}
.adp-pip {
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: var(--border, #e6e6e3);
}
.adp-pip--done { background: color-mix(in srgb, var(--accent, #1d6a57) 60%, transparent); }
.adp-pip--current { background: var(--accent, #1d6a57); }

.adp-r-question {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 12px;
  line-height: 1.3;
}
.adp-r-options { display: flex; flex-direction: column; gap: 8px; }
.adp-r-opt {
  width: 100%;
  text-align: left;
  padding: 10px 13px;
  border: 1.5px solid var(--border, #e6e6e3);
  border-radius: 8px;
  background: var(--bg, #fbfbfa);
  color: var(--text, #1f2328);
  font-family: inherit;
  font-size: .92rem;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.adp-r-opt:hover, .adp-r-opt[aria-pressed="true"] {
  border-color: var(--accent, #1d6a57);
  background: color-mix(in srgb, var(--accent, #1d6a57) 7%, transparent);
}
.adp-r-opt:focus-visible {
  outline: 3px solid var(--accent, #1d6a57);
  outline-offset: 2px;
}

/* ── Need form ───────────────────────────────────────────────────────────── */
.adp-attach-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.adp-attach-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--accent, #1d6a57);
  cursor: pointer;
}
.adp-attach-label:focus-within {
  outline: 3px solid var(--accent, #1d6a57);
  outline-offset: 2px;
  border-radius: 4px;
}
.adp-attach-paste {
  font-size: .82rem;
  color: var(--muted, #545c68);
}

/* ── Document states ─────────────────────────────────────────────────────── */
.adp-doc-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.adp-doc-name {
  flex: 1;
  font-size: .88rem;
  color: var(--muted, #545c68);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adp-doc-cancel {
  font-size: .82rem;
  background: none;
  border: none;
  color: var(--accent, #1d6a57);
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
}
.adp-doc-meta {
  font-size: .78rem;
  color: var(--muted, #545c68);
  margin-bottom: 6px;
}
.adp-doc-error {
  background: #fff3f3;
  border: 1px solid #f0b8b8;
  border-radius: 6px;
  padding: 10px 13px;
  font-size: .88rem;
  color: #a02020;
  margin-bottom: 14px;
  role: alert;
}
@media (prefers-color-scheme: dark) {
  .adp-doc-error { background: #2a1010; border-color: #a02020; color: #f0b8b8; }
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.adp-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border, #e6e6e3);
  border-top-color: var(--accent, #1d6a57);
  border-radius: 50%;
  animation: adp-spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes adp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .adp-spinner { animation: none; opacity: .6; }
}

/* ── Thinking ────────────────────────────────────────────────────────────── */
.adp-thinking-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}
.adp-thinking-dots {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
}
.adp-thinking-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent, #1d6a57);
  animation: adp-bounce .9s ease-in-out infinite;
}
.adp-thinking-dot:nth-child(2) { animation-delay: .15s; }
.adp-thinking-dot:nth-child(3) { animation-delay: .3s; }
@keyframes adp-bounce { 0%,80%,100% { transform: scale(.7); opacity:.5 } 40% { transform: scale(1); opacity:1 } }
@media (prefers-reduced-motion: reduce) {
  .adp-thinking-dot { animation: none; }
}

/* ── Follow-up ───────────────────────────────────────────────────────────── */
.adp-fup-q {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
  line-height: 1.35;
}
.adp-skip-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.adp-card-section { margin-bottom: 16px; }
.adp-card-section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.adp-card-section-title {
  font-weight: 700;
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted, #545c68);
}
.adp-card-ai-chip {
  font-size: .72rem;
  font-weight: 600;
  color: var(--accent, #1d6a57);
  background: color-mix(in srgb, var(--accent,#1d6a57) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent,#1d6a57) 25%, transparent);
  border-radius: 12px;
  padding: 1px 7px;
}
.adp-card-text {
  font-size: .92rem;
  margin: 0;
  color: var(--text, #1f2328);
}
.adp-card-outcome-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}
.adp-card-outcome-body { font-size: .9rem; color: var(--muted, #545c68); }

/* R3 tools-section sub-line (spec §7.4 "The R3 card") */
.adp-r3-subline {
  font-size: .85rem;
  color: var(--muted, #545c68);
  margin: 0 0 10px;
}

.adp-tool-card {
  border: 1px solid var(--border, #e6e6e3);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--bg, #fbfbfa);
}
.adp-tool-card h3 { font-size: .95rem; font-weight: 700; margin: 0 0 3px; }
.adp-tool-price { font-weight: 700; color: var(--accent, #1d6a57); font-size: .9rem; margin-bottom: 2px; }
.adp-tool-meta { font-size: .8rem; color: var(--muted, #545c68); margin: 0; }

.adp-reason-item, .adp-step-item {
  display: flex;
  gap: 9px;
  font-size: .88rem;
  margin-bottom: 6px;
  align-items: flex-start;
}
.adp-step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent, #1d6a57);
  color: var(--accent-text, #ffffff);
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* T40: 10-segment readiness bar */
.adp-rdns-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}
.adp-rdns-seg {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--border, #e6e6e3);
}
.adp-rdns-seg--filled { background: var(--accent, #1d6a57); }
.adp-rdns-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.adp-rdns-score-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text, #1f2328);
}
.adp-rdns-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: .78rem;
  font-weight: 600;
}
.adp-rdns-chip--low    { background: color-mix(in srgb, #e67e22 15%, transparent); color: #7a3e00; }
.adp-rdns-chip--medium { background: color-mix(in srgb, #2980b9 15%, transparent); color: #1a4a6e; }
.adp-rdns-chip--high   { background: color-mix(in srgb, #1d6a57 15%, transparent); color: #0e3829; }
/* Dark mode: WCAG AA ≥ 4.5:1 — bright text on the same tinted dark bg (T46).
   Measured ratios (approx): low 6.5:1, medium 6.7:1, high 7.1:1. */
@media (prefers-color-scheme: dark) {
  .adp-rdns-chip--low    { background: color-mix(in srgb, #e67e22 20%, transparent); color: #ffb347; }
  .adp-rdns-chip--medium { background: color-mix(in srgb, #2980b9 20%, transparent); color: #7ec8f0; }
  .adp-rdns-chip--high   { background: color-mix(in srgb, #1d6a57 20%, transparent); color: #6fcfb0; }
}
.adp-rdns-sentence {
  font-size: .9rem;
  color: var(--muted, #545c68);
  margin: 0 0 10px;
}
.adp-rdns-lowers-h {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text, #1f2328);
  margin: 6px 0 4px;
}
.adp-rdns-lowers-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.adp-rdns-lowers-item {
  font-size: .82rem;
  color: var(--muted, #545c68);
  padding: 2px 0;
}
.adp-data-gate {
  font-size: .82rem;
  color: var(--muted, #545c68);
  background: color-mix(in srgb, #f5a623 15%, transparent);
  border: 1px solid color-mix(in srgb, #f5a623 35%, transparent);
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 8px;
}

.adp-card-footer {
  font-size: .75rem;
  color: var(--muted, #545c68);
  margin-top: 14px;
  text-align: right;
}

/* ── Currency switch ─────────────────────────────────────────────────────── */
.adp-currency-switch {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.adp-currency-btn {
  border: 1.5px solid var(--accent, #1d6a57);
  border-radius: 4px;
  background: transparent;
  color: var(--accent, #1d6a57);
  cursor: pointer;
  font-family: inherit;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 12px;
  line-height: 1;
  letter-spacing: .04em;
}
.adp-currency-btn[aria-pressed="true"] {
  background: var(--accent, #1d6a57);
  color: var(--accent-text, #ffffff);
}
.adp-currency-btn:hover {
  background: color-mix(in srgb, var(--accent, #1d6a57) 12%, transparent);
}
.adp-currency-btn[aria-pressed="true"]:hover {
  background: var(--accent, #1d6a57);
}
.adp-currency-btn:focus-visible {
  outline: 3px solid var(--accent, #1d6a57);
  outline-offset: 2px;
}

/* ── Offers ──────────────────────────────────────────────────────────────── */
.adp-offers-heading {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 10px;
}
.adp-offer-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1.5px solid var(--border, #e6e6e3);
  border-radius: 8px;
  background: var(--bg, #fbfbfa);
  cursor: pointer;
  font-family: inherit;
  font-size: .92rem;
  color: var(--text, #1f2328);
  transition: border-color .15s;
  text-align: left;
}
.adp-offer-btn--primary {
  border-color: var(--accent, #1d6a57);
  background: color-mix(in srgb, var(--accent, #1d6a57) 6%, transparent);
}
.adp-offer-btn:hover { border-color: var(--accent, #1d6a57); }
.adp-offer-btn:focus-visible {
  outline: 3px solid var(--accent, #1d6a57);
  outline-offset: 2px;
}
.adp-offer-price { font-weight: 700; color: var(--accent, #1d6a57); font-size: .85rem; margin-top: 2px; }
.adp-talk-note {
  font-size: .82rem;
  color: var(--muted, #545c68);
  margin-top: 8px;
  text-align: center;
}
.adp-talk-note a { color: var(--accent, #1d6a57); }

/* ── Offer entry wrapper + collapsible disclosure (T44) ─────────────────── */
.adp-offer-entry {
  margin-bottom: 8px;
}
.adp-offer-entry .adp-offer-btn {
  margin-bottom: 0;
}
.adp-offer-details {
  border: 1.5px solid var(--border, #e6e6e3);
  border-radius: 8px;
  margin-top: 3px;
  background: var(--bg, #fbfbfa);
}
.adp-offer-disc-sum {
  display: block;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: .83rem;
  color: var(--accent, #1d6a57);
  list-style: none;
}
.adp-offer-disc-sum::-webkit-details-marker { display: none; }
.adp-offer-details[open] .adp-offer-disc-sum {
  border-bottom: 1px solid var(--border, #e6e6e3);
}
.adp-offer-disc-body {
  padding: 6px 14px 10px;
}
.adp-offer-desc,
.adp-offer-when {
  margin: 0 0 4px;
  font-size: .83rem;
  color: var(--muted, #545c68);
  line-height: 1.4;
}

/* ── Offer confirm ───────────────────────────────────────────────────────── */
.adp-confirm-box {
  background: var(--bg, #fbfbfa);
  border: 1px solid var(--border, #e6e6e3);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  text-align: center;
}
.adp-confirm-box .adp-offer-name { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.adp-confirm-box .adp-offer-price-line { color: var(--accent, #1d6a57); font-weight: 700; }

/* ── Outcome ─────────────────────────────────────────────────────────────── */
.adp-outcome-wrap { text-align: center; padding: 14px 0 10px; }
.adp-outcome-icon { font-size: 2rem; margin-bottom: 8px; }
.adp-outcome-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; }
.adp-outcome-body { font-size: .9rem; color: var(--muted, #545c68); }

/* ── Capacity ────────────────────────────────────────────────────────────── */
.adp-capacity-wrap { text-align: center; padding: 12px 0 16px; }
.adp-capacity-icon { font-size: 2rem; margin-bottom: 8px; }

/* ── Deterministic card ──────────────────────────────────────────────────── */
.adp-det-note {
  background: color-mix(in srgb, var(--muted, #545c68) 10%, transparent);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: .82rem;
  color: var(--muted, #545c68);
  margin-bottom: 10px;
}

/* ── Error ───────────────────────────────────────────────────────────────── */
.adp-error-box {
  background: #fff8f8;
  border: 1px solid #f0b8b8;
  border-radius: 8px;
  padding: 14px 16px;
  text-align: center;
}
@media (prefers-color-scheme: dark) {
  .adp-error-box { background: #1e1010; border-color: #7a2020; }
}
.adp-error-code {
  font-family: monospace;
  font-size: .78rem;
  color: var(--muted, #545c68);
  margin-bottom: 4px;
}
.adp-error-msg { font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.adp-error-hint { font-size: .88rem; color: var(--muted, #545c68); margin-bottom: 12px; }
.adp-error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.adp-error-actions .adp-btn { width: auto; }

/* ── Confirm page (inline widget on the confirm pages) ───────────────────── */
.adp-cfm-head { margin-bottom: 16px; }
.adp-cfm-badge {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted, #545c68);
  background: color-mix(in srgb, var(--muted,#545c68) 10%, transparent);
  border-radius: 12px;
  padding: 2px 9px;
  margin-bottom: 8px;
}

/* ── Disclosure page ─────────────────────────────────────────────────────── */
.adp-disc-header {
  text-align: center;
  padding: 8px 0 14px;
}
.adp-disc-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
}
.adp-disc-body {
  font-size: .88rem;
  color: var(--muted, #545c68);
  margin-bottom: 16px;
}

/* ── Page layout (start/confirm HTML pages) ─────────────────────────────── */
.adp-page-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
}
.adp-mount-full { width: 100%; }
.adp-mount-confirm { width: 100%; max-width: 480px; }
.adp-page-note { margin-top: 18px; text-align: center; }
.adp-page-footer { font-size: .85rem; margin: 0; padding: 20px 0; }

/* ── Code form ───────────────────────────────────────────────────────────── */
.adp-code-sub { font-size: .88rem; color: var(--muted, #545c68); }
.adp-code-resend { text-align: center; margin-top: 8px; }

/* ── Need form / file input ──────────────────────────────────────────────── */
.adp-file-hidden { position: absolute; left: -9999px; }
.adp-need-cta { margin-top: 16px; }

/* ── Doc preview ─────────────────────────────────────────────────────────── */
.adp-preview-h { font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.adp-preview-sub { font-size: .8rem; color: var(--muted, #545c68); margin-bottom: 8px; }
.adp-doc-actions { display: flex; gap: 10px; margin-top: 10px; align-items: center; }
.adp-remove-doc { font-size: .85rem; }
.adp-use-doc { flex: 1; margin-top: 0; }
textarea[disabled] { opacity: .5; }

/* ── Thinking ────────────────────────────────────────────────────────────── */
.adp-think-h { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.adp-think-sub { font-size: .85rem; color: var(--muted, #545c68); }

/* ── Tool card description line ──────────────────────────────────────────── */
.adp-tool-desc { font-size: .8rem; color: var(--muted, #545c68); margin: 4px 0 0; }

/* ── Deterministic card body ─────────────────────────────────────────────── */
.adp-det-body { font-size: .9rem; color: var(--muted, #545c68); margin-bottom: 16px; }

/* ── Outcome/offer note (delete link, talk note) ─────────────────────────── */
.adp-offer-note { font-size: .82rem; color: var(--muted, #545c68); text-align: center; }

/* ── Capacity screen ─────────────────────────────────────────────────────── */
.adp-cap-h { margin-bottom: 8px; }
.adp-cap-body { font-size: .9rem; color: var(--muted, #545c68); margin-bottom: 18px; }

/* ── Confirm widget ──────────────────────────────────────────────────────── */
.adp-cfm-no-action { color: var(--muted, #545c68); text-align: center; }
.adp-cfm-shell {
  background: var(--surface, #f5f5f4);
  border: 1px solid var(--border, #e6e6e3);
  border-radius: 10px;
  overflow: hidden;
  max-width: 480px;
  margin: 0 auto;
}
.adp-cfm-offer { font-size: .85rem; color: var(--muted, #545c68); margin-bottom: 12px; }
.adp-cfm-start-link {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-top: 16px;
}

/* ── Demo mode box (demo only: shown only when demoCode is returned by the API) */
.adp-demo-box {
  background: color-mix(in srgb, #b45309 8%, transparent);
  border: 2px solid color-mix(in srgb, #b45309 30%, transparent);
  border-radius: 6px;
  padding: 10px 13px;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text, #1f2328);
}
.adp-demo-box .adp-demo-msg { margin: 0; }

/* ── Inline thinking status (inserted under choices/field while waiting for API) */
.adp-thinking-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--border, #d1d5db);
}
/* Dots inside inline status: smaller gap, no bottom margin */
.adp-thinking-status .adp-thinking-dots {
  margin-bottom: 0;
  gap: 5px;
}
.adp-thinking-status .adp-thinking-dot {
  width: 7px;
  height: 7px;
}
.adp-think-inline {
  margin: 0;
  font-size: .85rem;
  color: var(--muted, #545c68);
}

/* ── Talk-top link (all steps before the card — now at bottom) ──────────── */
.adp-talk-top {
  margin-top: 14px;
  text-align: center;
}
.adp-talk-top-link {
  font-size: .82rem;
  color: var(--accent, #1d6a57);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.adp-talk-top-link:hover { opacity: .8; }

/* ── Follow-up choice buttons ────────────────────────────────────────────── */
.adp-fup-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.adp-choice-btn {
  padding: 7px 14px;
  border: 1.5px solid var(--accent, #1d6a57);
  border-radius: 20px;
  background: transparent;
  color: var(--accent, #1d6a57);
  font-size: .88rem;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.adp-choice-btn:hover,
.adp-choice-btn:focus-visible,
.adp-choice-btn[aria-pressed="true"] {
  background: var(--accent, #1d6a57);
  color: var(--accent-text, #ffffff);
  outline: none;
}
.adp-choice-btn[aria-pressed="true"] { cursor: default; }
.adp-choice-btn:focus-visible { outline: 3px solid var(--accent, #1d6a57); outline-offset: 2px; }

/* ── Card AI notice ──────────────────────────────────────────────────────── */
.adp-card-ai-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 6px 0 14px;
  flex-wrap: wrap;
}
.adp-card-ai-notice-text {
  font-size: .82rem;
  color: var(--muted, #545c68);
  margin: 0;
  flex: 1 1 200px;
}
.adp-card-ai-notice-text a { color: var(--accent, #1d6a57); }

/* ── Comparison grid (one column per tool on wide screens) ───────────────── */
.adp-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.adp-tools-grid .adp-tool-card { margin-bottom: 0; }

/* ── Tool card role badge ─────────────────────────────────────────────────── */
.adp-tool-role {
  font-size: .72rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 7px;
  display: inline-block;
  margin-bottom: 6px;
}
.adp-tool-role--best {
  background: color-mix(in srgb, var(--accent,#1d6a57) 12%, transparent);
  color: var(--accent, #1d6a57);
  border: 1px solid color-mix(in srgb, var(--accent,#1d6a57) 30%, transparent);
}
.adp-tool-role--sel {
  background: color-mix(in srgb, var(--accent,#1d6a57) 7%, transparent);
  color: var(--accent, #1d6a57);
  border: 1px solid color-mix(in srgb, var(--accent,#1d6a57) 20%, transparent);
}
.adp-tool-role--alt {
  background: color-mix(in srgb, var(--muted,#545c68) 10%, transparent);
  color: var(--muted, #545c68);
  border: 1px solid var(--border, #e6e6e3);
}

/* ── Tool card grid detail sections ─────────────────────────────────────── */
.adp-tool-plan { font-size: .82rem; color: var(--muted, #545c68); margin: 2px 0 6px; }
.adp-tool-detail { margin-top: 8px; }
.adp-tool-detail-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted, #545c68);
  margin-bottom: 3px;
}
.adp-tool-list {
  margin: 0;
  padding-left: 16px;
  font-size: .82rem;
  color: var(--text, #1f2328);
}
.adp-tool-list li { margin-bottom: 2px; }
.adp-tool-detail-text { font-size: .82rem; color: var(--text, #1f2328); margin: 0; }
.adp-tool-source {
  margin-top: 8px;
  font-size: .78rem;
  color: var(--muted, #545c68);
}
.adp-tool-source a { color: var(--accent, #1d6a57); }

/* ── Cost estimate block (T75) ───────────────────────────────────────────── */
.adp-cost-range {
  font-weight: 700;
  font-size: .95rem;
  color: var(--accent, #1d6a57);
  margin: 0 0 4px;
}
.adp-cost-min-seats {
  font-size: .85rem;
  color: var(--muted, #545c68);
  margin: 0 0 4px;
}
.adp-cost-lets-you {
  font-size: .9rem;
  color: var(--text, #1f2328);
  margin: 0 0 6px;
}
.adp-cost-assumptions {
  margin: 0 0 6px;
  padding-left: 16px;
  font-size: .82rem;
  color: var(--muted, #545c68);
}
.adp-cost-assumptions li { margin-bottom: 2px; }
.adp-cost-disclaimer,
.adp-tools-note {
  font-size: .78rem;
  color: var(--muted, #545c68);
  margin: 4px 0 0;
  font-style: italic;
}

/* ── WhatsApp offer button (screen only; same visual weight as secondary) ─── */
.adp-offer-wa-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  text-align: center;
  font-size: .9rem;
}

/* ── Print button (screen only) ──────────────────────────────────────────── */
.adp-print-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  text-align: center;
  font-size: .85rem;
}

/* ── Progress stepper (Email · Five questions · Your task · Your card) ───── */
.adp-stepper-wrap {
  border-bottom: 1px solid var(--border, #e6e6e3);
  background: var(--bg-subtle, #fbfbfa);
}
.adp-stepper {
  list-style: none;
  margin: 0;
  padding: 10px 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  font-size: .78rem;
}
.adp-step {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted, #545c68);
  line-height: 1.2;
}
.adp-step[aria-current="step"] {
  font-weight: 700;
  color: var(--accent, #1d6a57);
}
.adp-step-icon {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-muted, #c9ccc9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .69rem;
  font-weight: 600;
}
.adp-step-icon--current {
  background: var(--accent, #1d6a57);
  border-color: var(--accent, #1d6a57);
  color: var(--accent-text, #ffffff);
}
.adp-step-icon--done {
  background: var(--accent-bg, #eef5f2);
  border-color: var(--accent-border, #cfe3da);
  color: var(--accent, #1d6a57);
}

/* Stepper: collapse labels on very small viewports */
@media (max-width: 390px) {
  .adp-stepper {
    gap: 4px;
    padding: 8px 12px;
  }
  .adp-step-label {
    font-size: .7rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}

/* ── Welcome / disclosure redesign ─────────────────────────────────────────── */
.adp-disc-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent, #1d6a57);
  margin-bottom: 6px;
}
.adp-disc-tagline {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 10px;
  font-family: var(--font-heading, 'Bricolage Grotesque', system-ui, sans-serif);
}
.adp-disc-sub {
  font-size: .88rem;
  color: var(--muted, #545c68);
  margin: 0 0 14px;
  line-height: 1.55;
}
.adp-disc-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.adp-disc-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .82rem;
  line-height: 1.35;
}
.adp-disc-step-num {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent, #1d6a57);
  color: var(--accent-text, #ffffff);
  font-size: .69rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.adp-disc-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--border, #e6e6e3) 15%, var(--bg, #fbfbfa));
  border: 1px solid var(--border, #e6e6e3);
  border-radius: 6px;
  font-size: .88rem;
  color: var(--text, #1f2328);
  line-height: 1.5;
}

/* ── Email step "why" sub-heading ─────────────────────────────────────────── */
.adp-email-why {
  margin: 0 0 4px;
  font-size: .88rem;
  color: var(--muted, #545c68);
  line-height: 1.5;
}
.adp-notice-noconf {
  font-size: .78rem;
  color: var(--muted, #545c68);
}

/* ── Need step: sub text, chips ───────────────────────────────────────────── */
.adp-need-sub {
  margin: -8px 0 10px;
  font-size: .88rem;
  color: var(--muted, #545c68);
  line-height: 1.5;
}
.adp-chips-wrap {
  margin-bottom: 10px;
}
.adp-chips-nudge {
  margin: 0 0 6px;
  font-size: .78rem;
  color: var(--muted, #545c68);
}
.adp-need-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.adp-chip-btn {
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--accent-border, #cfe3da);
  border-radius: 999px;
  background: var(--accent-bg, #eef5f2);
  color: var(--accent, #1d6a57);
  font-family: inherit;
  font-size: .82rem;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.adp-chip-btn:hover,
.adp-chip-btn:focus-visible {
  background: color-mix(in srgb, var(--accent, #1d6a57) 20%, transparent);
  border-color: var(--accent, #1d6a57);
  outline: none;
}
.adp-chip-btn:focus-visible { outline: 3px solid var(--accent, #1d6a57); outline-offset: 2px; }

/* ── Attach-info text (replaces "paste key part") ────────────────────────── */
.adp-attach-info {
  font-size: .78rem;
  color: var(--muted, #545c68);
  line-height: 1.4;
  margin-top: 4px;
}

/* ── Print-only elements (hidden on screen) ──────────────────────────────── */
.adp-print-header,
.adp-print-about,
.adp-print-footer,
.adp-offers-print { display: none; }

/* ── Print stylesheet (spec §7.4) ────────────────────────────────────────── */
@media print {
  /* Black on white regardless of colour scheme */
  :root { color-scheme: light; }
  body  { background: #fff !important; color: #000 !important; }

  /* Hide site chrome on start pages (scoped via :has so other pages are unaffected) */
  body:has(.adp-mount-full) .skip,
  body:has(.adp-mount-full) .site-nav,
  body:has(.adp-mount-full) .adp-page-note,
  body:has(.adp-mount-full) .site-footer { display: none !important; }

  /* Hide widget screen-only chrome (including progress stepper) */
  .adp-head,
  .adp-stepper-wrap,
  .adp-progress-line,
  .adp-progress-pip,
  .adp-talk-top,
  .adp-demo-box,
  .adp-currency-switch,
  .adp-print-btn,
  .adp-offer-wa-btn,
  .adp-divider,
  .adp-offers-heading,
  .adp-offer-entry { display: none !important; }

  /* Full-width card: remove the constrained column, border, radius, shadow */
  #adp-widget {
    max-width: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  /* Show print-only elements */
  .adp-print-header,
  .adp-print-about,
  .adp-print-footer,
  .adp-offers-print { display: block !important; }

  /* Print header (page 1): full width, contact items stay on one line */
  .adp-print-header {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1.5px solid #000;
    padding-bottom: 6px;
    margin-bottom: 16px;
    width: 100%;
  }
  .adp-print-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }
  .adp-print-logo { height: 28px; width: auto; }
  .adp-print-brand { font-size: .85rem; font-weight: 700; }
  .adp-print-header-right {
    font-size: .78rem;
    text-align: right;
    flex-shrink: 0;
    /* allow wrapping between contact items but not within each one */
  }
  .adp-print-contact-item { white-space: nowrap; }
  .adp-print-contact-sep  { white-space: nowrap; }

  /* About AVApmo closing page (T76) */
  .adp-print-about {
    page-break-before: always;
    margin-top: 0;
    padding-top: 16px;
  }
  .adp-print-about-h { font-size: 1.1rem; margin-bottom: 10px; }
  .adp-print-about-subh { font-size: .95rem; margin: 12px 0 6px; }
  .adp-print-how { margin: 0 0 10px; padding-left: 20px; }
  .adp-print-how li { margin-bottom: 4px; font-size: .9rem; }
  .adp-print-next { margin-top: 12px; }
  .adp-print-next a::after { content: '' !important; } /* suppress global link rule */
  .adp-print-qr { display: block; margin: 8px 0; }
  .adp-print-contact { font-size: .82rem; margin-top: 4px; }
  .adp-print-legal { margin-top: 12px; font-size: .72rem; color: #555; }

  /* Footer line at end of About page (embedded — never creates its own page) */
  .adp-print-footer {
    margin-top: 16px;
    font-size: .78rem;
    color: #666;
    border-top: 1px solid #ccc;
    padding-top: 6px;
  }

  /* Offers heading (T83 — print only, sits inside adp-offers-print).
     Override text-transform so it prints in sentence case as written. */
  .adp-offers-print-heading {
    margin: 0 0 8px;
    text-transform: none !important;
    font-weight: bold;
  }

  /* WhatsApp contact line under the offers heading (T84) */
  .adp-wa-print-line {
    margin: 0 0 10px;
    font-size: .85rem;
  }

  /* QR figure wrappers: two QR codes side by side on the About page (T84 + T83 print fix) */
  .adp-print-qr-fig {
    display: inline-block;
    vertical-align: top;
    margin: 8px 16px 8px 0;
    text-align: center;
  }
  .adp-print-qr-fig .adp-print-qr {
    display: block;
    margin: 0 auto;
  }
  .adp-print-qr-caption {
    font-size: .78rem;
    margin: 3px 0 0;
    max-width: 120px;
  }

  /* Offers as plain lines: name, price, description, when */
  .adp-offer-print-entry { margin-bottom: 8px; }
  .adp-offer-print-line {
    margin: 0 0 2px;
    font-size: .9rem;
    font-weight: 600;
    color: #000;
  }
  .adp-offer-print-desc,
  .adp-offer-print-when {
    margin: 0;
    font-size: .78rem;
    color: #333;
  }

  /* Readiness bar: restore filled segments in print */
  .adp-rdns-bar {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .adp-rdns-seg {
    background: transparent !important;
    border: 1px solid #000 !important;
    box-shadow: none !important;
  }
  .adp-rdns-seg--filled {
    background: #000 !important;
    border-color: #000 !important;
  }

  /* Force all text/background black on white (lower specificity than class rules above) */
  * { color: #000 !important; background: transparent !important; box-shadow: none !important; }

  /* Print the href of booking and site links (T76) */
  .adp-print-next a[href]::after,
  .adp-card-ai-notice a[href]::after { content: ' (' attr(href) ')'; font-size: .78rem; }

  /* Page margins */
  @page { margin: 1cm; }
}
