/* ==========================================================================
   DATA QUALITY upgrade page  (assets/css/data-quality.css)
   --------------------------------------------------------------------------
   Hero, feature rows, sticky "Have questions?" bar, plan comparison table,
   Talk to Sales / trial dialogs.  Markup: data-quality.php
   ========================================================================== */
.dq { --dq-dark: #0b4a50; --dq-ink: #213343; --dq-line: var(--border); position: relative; max-width: 1180px; margin: 0 auto; padding: 0 0 var(--sp-8, 48px); color: var(--text); }
.dq svg { display: block; }
.dq-p { margin: 0 0 var(--sp-3); line-height: 1.55; }
.dq-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dq :focus-visible, .dq-modal-ov :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.dq-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: var(--sp-3); font-size: 14px; font-weight: 600; color: var(--brand-ink, var(--brand)); text-decoration: none; }
.dq-back svg { width: 16px; height: 16px; }
.dq-back:hover { text-decoration: underline; }

/* buttons */
.dq-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--radius-pill); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.dq-btn svg { width: 14px; height: 14px; }
.dq-btn--dark { background: var(--dq-dark); color: #fff; }
.dq-btn--dark:hover { background: #083a3f; }
.dq-btn--outline { border-color: var(--text); background: var(--surface); color: var(--text); }
.dq-btn--outline:hover { background: var(--surface-2); }
.dq-btn--wide { width: 314px; max-width: 100%; }
.dq-btn--sm { height: 32px; padding: 0 16px; font-size: 13px; }
.dq-btn:disabled { opacity: .5; cursor: not-allowed; }

/* hero */
.dq-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--sp-6); padding: var(--sp-6) 0 var(--sp-8, 48px); }
.dq-hero h1 { margin: 0 0 var(--sp-5); font-size: clamp(30px, 4.2vw, 46px); line-height: 1.15; letter-spacing: -.01em; }
.dq-bullets { margin: 0 0 var(--sp-5); padding-left: 18px; font-size: 16px; line-height: 1.6; }
.dq-unlock { margin: 0 0 var(--sp-5); font-size: 16px; }
.dq-hero__acts { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); }
.dq-fine { width: 314px; max-width: 100%; margin: -4px 0 0; text-align: center; font-size: 12px; color: var(--text-muted); }
.dq-hero__art svg { width: 100%; height: auto; max-height: 440px; }
.dq-trialnote { margin-bottom: var(--sp-4); padding: var(--sp-3) var(--sp-4); border: 1px solid #7fd1a8; border-radius: var(--radius); background: #eefaf3; color: #1d4a33; font-size: 14px; line-height: 1.5; }
.dq-trialnote[hidden] { display: none; }

/* sticky bar */
.dq-stickywrap { position: sticky; top: var(--header-h, 56px); z-index: 30; height: 0; }
.dq-sticky { position: absolute; left: calc(var(--sp-5) * -1); right: calc(var(--sp-5) * -1); top: 0; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; padding: 12px var(--sp-5); border-bottom: 1px solid var(--dq-line); background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.dq-sticky[hidden] { display: none; }
.dq-sticky__txt { display: flex; align-items: center; gap: var(--sp-3); }
.dq-sticky__ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #e5f5f8; color: #0091ae; flex: none; }
.dq-sticky__ico svg { width: 26px; height: 26px; }
.dq-sticky__txt strong { display: block; font-size: 20px; }
.dq-sticky__txt span { font-size: 14px; color: var(--text); }
.dq-sticky__acts { display: flex; gap: var(--sp-2); }

/* features */
.dq-h2 { margin: var(--sp-6) 0 var(--sp-8, 48px); text-align: center; font-size: clamp(24px, 3vw, 34px); font-weight: 400; }
.dq-feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: var(--sp-8, 48px); margin-bottom: var(--sp-8, 64px); }
.dq-feature--rev .dq-feature__art { order: 2; }
.dq-feature__txt h3 { margin: 0 0 var(--sp-3); font-size: 21px; font-weight: 600; }
.dq-feature__txt p { margin: 0; font-size: 16px; line-height: 1.6; }
.dq-feature__art--panel { padding: var(--sp-6) var(--sp-5); border-radius: 18px; background: #f5f3ee; }
[data-theme="dark"] .dq-feature__art--panel { background: var(--surface-2); }

.dq-studio { display: grid; grid-template-columns: 70px minmax(0, 1fr) 170px; align-items: center; gap: 0; }
.dq-studio__src, .dq-studio__dst { display: flex; flex-direction: column; gap: 18px; position: relative; z-index: 1; }
.dq-tile { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 14px; background: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.12); font-size: 13px; font-weight: 800; }
.dq-tile--crm { color: #ff5c35; } .dq-tile--wh { color: #29b5e8; } .dq-tile--sheet { color: #0f9d58; } .dq-tile--s { color: #1a2b49; }
.dq-studio__card { margin: 0 -14px; padding: var(--sp-5) var(--sp-5); border-radius: 4px; background: #4a0d2e; color: #fde8f0; min-height: 280px; display: flex; flex-direction: column; justify-content: center; gap: var(--sp-5); }
.dq-studio__who { display: flex; gap: 12px; }
.dq-studio__who strong { display: block; font-size: 20px; font-weight: 500; margin-bottom: 4px; }
.dq-studio__who span { display: block; font-size: 12px; line-height: 1.7; }
.dq-studio__av { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #c98a6b; color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.dq-studio__acts { display: flex; gap: 8px; flex-wrap: wrap; }
.dq-studio__acts span { display: inline-flex; align-items: flex-end; justify-content: center; width: 38px; height: 46px; padding-bottom: 2px; border: 1px solid rgba(253,232,240,.6); border-radius: 4px; font-size: 9px; }
.dq-pill { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; background: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.12); color: #33475b; font-size: 17px; font-weight: 600; }
.dq-pill::before { content: ""; width: 26px; height: 26px; border: 2px solid #ff5c35; border-radius: 50%; flex: none; }

.dq-dupes { position: relative; padding-bottom: 70px; }
.dq-dupes table { width: 100%; max-width: 480px; margin: 0 auto; border-collapse: collapse; border: 1px solid #cbd6e2; border-radius: 6px; background: #fff; color: #33475b; font-size: 11px; }
.dq-dupes th { padding: 8px 10px; background: #f5f8fa; text-align: left; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; border: 1px solid #cbd6e2; }
.dq-dupes td { padding: 12px 10px; border: 1px solid #cbd6e2; font-weight: 600; white-space: nowrap; }
.dq-dupes td i { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; background: #7a5141; color: #fff; font-size: 8px; font-style: normal; vertical-align: middle; }
.dq-dupes td u { margin-right: 10px; color: #7c1a4b; font-weight: 400; }
.dq-dupes__card { position: absolute; left: 6%; right: -2%; bottom: 0; padding: var(--sp-4) var(--sp-5); border-radius: 10px; background: #4a0d2e; color: #fde8f0; box-shadow: 0 10px 30px rgba(74,13,46,.35); }
.dq-dupes__card p { margin: 0 0 10px; font-size: 18px; }
.dq-dupes__card span { display: block; padding: 10px 14px; border: 1px solid rgba(253,232,240,.55); border-radius: 6px; font-size: 18px; }

.dq-code { position: relative; max-width: 430px; padding: 12px 20px 20px; border-radius: 10px; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.08); color: #33475b; }
.dq-code__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; font-weight: 600; }
.dq-code__fs { padding: 4px 8px; border: 1px solid #cbd6e2; border-radius: 4px; font-weight: 400; font-size: 11px; }
.dq-code pre { margin: 0; padding: 10px; border: 1px solid #cbd6e2; border-radius: 4px; font: 11px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; color: #7c1a4b; white-space: pre-wrap; overflow: hidden; }
.dq-code pre span { display: inline-block; width: 16px; color: #33475b; }
.dq-code__tip { position: absolute; right: -14%; top: 40%; width: 260px; padding: var(--sp-4) var(--sp-5); border-radius: 10px; background: #f2c4dc; color: #4a0d2e; box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.dq-code__tip strong { display: block; margin-bottom: 6px; font-size: 22px; font-weight: 500; }
.dq-code__tip p { margin: 0; font-size: 13px; line-height: 1.6; }

/* comparison */
.dq-compare { margin-top: var(--sp-8, 48px); }
.dq-table { width: 100%; border-collapse: collapse; margin-bottom: var(--sp-6); table-layout: fixed; }
.dq-table th, .dq-table td { padding: 18px 16px; border-bottom: 1px solid var(--text); vertical-align: middle; text-transform: none; }
.dq-table thead th { border-bottom: 0; }
.dq-table td { text-align: center; font-size: 14px; line-height: 1.55; }
.dq-table td + td, .dq-table tbody td:first-of-type { border-left: 1px solid var(--text); }
.dq-table__sec { width: 35%; text-align: left; font-size: 26px; font-weight: 400; vertical-align: bottom !important; }
.dq-table__plan { text-align: center; font-size: 15px; font-weight: 700; }
.dq-table__plan span { display: block; margin-bottom: 10px; }
.dq-table tbody th { text-align: left; font-weight: 400; font-size: 15px; }
.dq-table tr.is-sub th { padding-left: 36px; }
.dq-feat { display: inline-flex; align-items: center; gap: 6px; }
.dq-feat.is-bold { font-weight: 700; }
.dq-beta { font-weight: 400; }
.dq-info { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--text); cursor: help; }
.dq-info svg { width: 14px; height: 14px; }
.dq-info:hover { background: var(--surface-2); }
.dq-check { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #2d3e50; color: #fff; }
.dq-check svg { width: 20px; height: 20px; }
.dq-celltext { display: block; max-width: 340px; margin: 0 auto; }
.dq-catalog { text-align: right; font-size: 14px; }
.dq-catalog a { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--brand-ink, var(--brand)); }
.dq-catalog svg { width: 13px; height: 13px; }
.dq-tip { position: fixed; z-index: 1400; max-width: 260px; padding: 8px 12px; border-radius: 6px; background: var(--dq-ink); color: #fff; font-size: 13px; line-height: 1.45; pointer-events: none; }

/* dialogs */
.dq-modal-ov { position: fixed; inset: 0; z-index: 1250; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15,23,42,.45); }
.dq-modal { width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.dq-modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); background: var(--dq-ink); color: #fff; }
.dq-modal__head h2 { margin: 0; font-size: 18px; color: inherit; }
.dq-x { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--radius); background: none; color: inherit; cursor: pointer; }
.dq-x:hover { background: rgba(255,255,255,.12); }
.dq-x svg { width: 18px; height: 18px; }
.dq-modal__body { padding: var(--sp-5); overflow-y: auto; }
.dq-modal__foot { display: flex; gap: var(--sp-2); flex-wrap: wrap; padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--dq-line); }
.dq-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); font-size: 14px; font-weight: 600; }
.dq-input { min-height: 40px; padding: 8px 12px; border: 1px solid var(--border-strong, var(--border)); border-radius: var(--radius); background: var(--surface-2); font: inherit; font-weight: 400; color: var(--text); }
textarea.dq-input { resize: none; }
.dq-input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus-ring, 0 0 0 3px var(--brand-soft)); background: var(--surface); }
.dq-err { margin: -8px 0 var(--sp-3); color: var(--danger); font-size: 13px; font-weight: 400; }
.dq-list { margin: 0 0 var(--sp-4); padding-left: 20px; line-height: 1.7; }
.dq-done { text-align: center; padding: var(--sp-4) 0; }
.dq-done strong { display: block; margin-bottom: 6px; font-size: 18px; }
.dq-noscroll { overflow: hidden; }

/* responsive */
@media (max-width: 1100px) {
  .dq-code__tip { right: -4%; width: 220px; }
}
@media (max-width: 900px) {
  .dq-hero { grid-template-columns: 1fr; padding-top: var(--sp-3); }
  .dq-hero__art { order: -1; max-width: 420px; margin: 0 auto; }
  .dq-feature, .dq-feature--rev { grid-template-columns: 1fr; gap: var(--sp-5); margin-bottom: var(--sp-8, 48px); }
  .dq-feature--rev .dq-feature__art { order: 0; }
  .dq-sticky { left: -16px; right: -16px; padding: 10px 16px; }
  .dq-sticky__txt strong { font-size: 17px; }
  .dq-code__tip { position: static; width: auto; margin-top: var(--sp-3); }
  .dq-code { max-width: none; }
}
@media (max-width: 640px) {
  .dq-btn--wide, .dq-fine { width: 100%; }
  .dq-hero__acts { align-items: stretch; }
  .dq-sticky__txt span { display: none; }
  .dq-sticky__ico { width: 36px; height: 36px; }
  .dq-sticky__acts { width: 100%; }
  .dq-sticky__acts .dq-btn { flex: 1; padding: 0 10px; }
  .dq-studio { grid-template-columns: 1fr; gap: var(--sp-3); }
  .dq-studio__src, .dq-studio__dst { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px; }
  .dq-tile { width: 52px; height: 52px; }
  .dq-pill { padding: 8px 12px; font-size: 14px; }
  .dq-pill::before { width: 18px; height: 18px; }
  .dq-studio__card { margin: 0; min-height: 0; }
  .dq-dupes { padding-bottom: 0; }
  .dq-dupes table { font-size: 10px; }
  .dq-dupes td { padding: 8px 6px; }
  .dq-dupes__card { position: static; margin-top: var(--sp-3); }
  .dq-dupes__card p, .dq-dupes__card span { font-size: 15px; }
  /* comparison becomes stacked cards */
  .dq-table, .dq-table tbody, .dq-table tr, .dq-table th, .dq-table td { display: block; width: 100%; }
  .dq-table thead tr { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-2); }
  .dq-table thead th { padding: 0; }
  .dq-table__sec { width: 100%; margin-bottom: var(--sp-2); font-size: 22px; }
  .dq-table thead .dq-table__plan { flex: 1 1 0; width: auto; padding: 8px; border: 1px solid var(--dq-line); border-radius: var(--radius); font-size: 13px; }
  .dq-table thead .dq-table__plan .dq-btn { width: 100%; padding: 0 8px; white-space: normal; height: auto; min-height: 32px; }
  .dq-table tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 14px 0; border-bottom: 1px solid var(--text); }
  .dq-table tbody th { grid-column: 1 / -1; padding: 0; border: 0; }
  .dq-table tr.is-sub th { padding-left: 16px; }
  .dq-table td { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border: 1px solid var(--dq-line) !important; border-radius: var(--radius); font-size: 13px; }
  .dq-table td::before { content: attr(data-plan); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
  .dq-table td .dq-sr { position: static; width: auto; height: auto; clip: auto; color: var(--text-muted); }
  .dq-check { width: 26px; height: 26px; }
  .dq-catalog { text-align: left; }
  .dq-modal__foot .dq-btn { flex: 1 1 100%; }
}

/* fixes */
.dq-bullets { list-style: disc; }
.dq-bullets li { display: list-item; }
.dq-studio__who .dq-studio__av { display: grid; line-height: 1; }
.dq-code pre { white-space: pre; }
.dq-feature > *, .dq-hero > * { min-width: 0; }
.dq-code pre { overflow-x: auto; }

/* ==========================================================================
   Buttons use the CRM button style (.btn-crm in base.css): 8px corners,
   brand-blue primary, bordered outline. No pill or circle buttons.
   ========================================================================== */
.dq-btn { height: 42px; padding: 0 18px; border-radius: var(--radius-sm, 8px); font-size: 14.5px; font-weight: 600; }
.dq-btn--sm { height: 34px; padding: 0 12px; font-size: 13.5px; }
.dq-btn--dark { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast, #fff); box-shadow: 0 1px 2px rgba(16, 24, 40, .1), inset 0 1px 0 rgba(255, 255, 255, .14); }
.dq-btn--dark:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.dq-btn--outline { border-color: var(--border-strong, var(--border)); background: var(--surface); color: var(--text); }
.dq-btn--outline:hover { border-color: var(--text-subtle); background: var(--surface-hover, var(--surface-2)); }
.dq-x { border-radius: var(--radius-sm, 8px); }

/* dialogs and tooltips live outside .dq (appended to <body>), so they can't use .dq tokens */
.dq-modal__head { background: var(--surface); color: var(--text); border-bottom: 1px solid var(--border); }
.dq-modal__head h2 { color: var(--text); font-size: 18px; }
.dq-x { color: var(--text-muted); }
.dq-x:hover { background: var(--surface-hover, var(--surface-2)); color: var(--text); }
.dq-tip { background: #213343; }
.dq-list { list-style: disc; }
.dq-list li { display: list-item; }
