/* ==========================================================================
   ExtractHelp — Chrome extension pages: /chrome-extension/, /dashboard/extension/, /dashboard/sheets/
   The four contact sources share one colour each, as in the extension's side panel (chrome-extension/panel/).
   ========================================================================== */
:root { --lvl-verified: #1E9A4E; --lvl-shared: #2453D6; --lvl-published: #C27B00; --lvl-db: #7A86A3; }
[data-theme="dark"] { --lvl-verified: #4ADE80; --lvl-shared: #7FA2FF; --lvl-published: #FFC861; --lvl-db: #8D99B8; }

/* ---------------------------------------------------------------- public page: what the panel shows */
.xp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.xp__text h2 { margin: 0 0 14px; max-width: 14em; }
.xp__text > p { color: var(--muted); max-width: 56ch; }
.xp-fields { display: grid; gap: 8px; margin: 18px 0; padding: 0; list-style: none; }
.xp-fields li { position: relative; padding-inline-start: 22px; color: var(--text); }
.xp-fields li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--brand-orange); transform: rotate(45deg); }

.xp-panel { margin: 0; justify-self: center; width: min(380px, 100%); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--bg-soft); box-shadow: var(--shadow-float); }
.xp-panel__bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--brand-navy); color: #fff; }
.xp-panel__bar b { font-size: .98rem; }
.xp-panel__bal { margin-inline-start: auto; padding: 4px 10px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; font-size: .78rem; font-weight: 650; }
.xp-panel__body { display: grid; gap: 10px; padding: 12px; }
.xp-card { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.xp-card__title { margin: 0 0 10px; color: var(--heading); font-weight: 750; font-size: .92rem; }
.xp-person { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; }
.xp-person__av { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--brand-navy); color: #fff; font-weight: 750; }
.xp-person div { display: grid; gap: 1px; }
.xp-person__name { color: var(--heading); font-size: 1.05rem; }
.xp-person span { font-size: .88rem; }
.xp-person small { color: var(--muted); font-size: .8rem; }
.xp-ct { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.xp-ct li { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; padding: 9px 10px 9px 14px; border-radius: 10px; background: var(--bg-soft); }
.xp-ct li::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: var(--lvl, var(--lvl-db)); }
.xp-ct .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--muted); }
.xp-ct span { display: grid; gap: 2px; min-width: 0; }
.xp-ct b { color: var(--heading); font-size: .9rem; overflow-wrap: anywhere; }
.xp-ct small { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.xp-ct em { color: var(--lvl); font-style: normal; font-weight: 700; }
[data-lvl="verified"] { --lvl: var(--lvl-verified); }
[data-lvl="shared"] { --lvl: var(--lvl-shared); }
[data-lvl="published"] { --lvl: var(--lvl-published); }
[data-lvl="database"] { --lvl: var(--lvl-db); }
.xp-dock { display: flex; gap: 8px; align-items: center; padding: 10px; border-top: 1px solid var(--line); margin: 2px -12px -12px; background: var(--surface); }
.xp-dock__sel { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-dock__btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 9px; background: var(--brand-orange); color: #fff; font-size: .84rem; font-weight: 700; white-space: nowrap; }
.xp-dock__btn .icon { width: 14px; height: 14px; }
.xp-panel figcaption { padding: 10px 14px 12px; color: var(--muted); font-size: .78rem; text-align: center; }

/* ---------------------------------------------------------------- where each contact detail comes from */
.src-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.src { position: relative; padding: 22px 20px 22px 26px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.src::before { content: ""; position: absolute; left: 0; top: 20px; bottom: 20px; width: 4px; border-radius: 0 4px 4px 0; background: var(--lvl); }
.src h3 { margin: 0 0 8px; color: var(--lvl); font-size: 1.05rem; }
[data-theme="dark"] .src h3 { filter: none; }
.src p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.55; }

/* ---------------------------------------------------------------- sheet columns */
.xs-cols { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.xs-cols li { padding: 4px 10px; border: 1px solid var(--ink-line, rgba(255, 255, 255, .16)); border-radius: 999px; font-size: .8rem; color: var(--ink-text, #DCE3F5); }

/* ---------------------------------------------------------------- install from the file */
.xd { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); padding: clamp(22px, 3.5vw, 40px); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); }
.xd__intro h2 { margin: 0 0 10px; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
.xd__intro p { color: var(--muted); }
.xd__steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: xd; }
.xd__steps li { position: relative; padding: 0 0 0 44px; counter-increment: xd; color: var(--muted); }
.xd__steps li::before { content: counter(xd); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy-soft); color: var(--heading); font-weight: 750; }
.xd__steps b { color: var(--heading); }
.xd code, .xc code { padding: 1px 6px; border-radius: 6px; background: var(--bg-soft); color: var(--heading); font-family: "Google Sans Code", ui-monospace, monospace; font-size: .88em; }

/* ---------------------------------------------------------------- cost */
.xcost { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.xcost h2 { margin: 0 0 12px; }
.xcost p { color: var(--muted); }
.xcost__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; }
.xcost__list div { padding: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.xcost__list dt { color: var(--heading); font-weight: 750; font-size: 1.15rem; }
.xcost__list dd { margin: 4px 0 0; color: var(--muted); font-size: .94rem; }

/* ---------------------------------------------------------------- privacy */
.xpriv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.xpriv__col { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.xpriv__col h3 { margin: 0 0 14px; font-size: 1.1rem; }
.tick-list--no .tick-list__tick { background: var(--danger-soft); color: var(--danger); }
.xpriv__note { margin: 18px 0 0; color: var(--muted); font-size: .94rem; max-width: 80ch; }

/* ---------------------------------------------------------------- dashboard: connect */
.xc { margin-block-end: 20px; }
.xc-steps { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.xc-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-block-start: 1px dashed var(--line); }
.xc-step:first-child { border-block-start: 0; padding-top: 4px; }
.xc-step__n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy-soft); color: var(--heading); font-weight: 750; }
.xc-step[data-state="done"] .xc-step__n { background: var(--success-soft); color: var(--success); font-size: 0; }
.xc-step[data-state="done"] .xc-step__n::before { content: "✓"; font-size: 1rem; }
.xc-step[data-state="next"] .xc-step__n { background: var(--brand-orange); color: #fff; }
.xc-step b { color: var(--heading); }
.xc-step p { margin: 3px 0 0; color: var(--muted); font-size: .94rem; }
.xc-step__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 10px; }
.xc-step__acts[hidden] { display: none; }
.xc-hint { color: var(--muted); font-size: .86rem; }
.xc-msg { margin: 4px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--success-soft); color: var(--success); font-weight: 650; }
.xc-msg.is-bad { background: var(--danger-soft); color: var(--danger); }
.xc-msg[hidden] { display: none; }
.xc-big { margin: 0; font-size: 1.02rem; color: var(--text); }
.xc-big b { color: var(--heading); font-size: 1.6rem; }

/* ---------------------------------------------------------------- dashboard: your sheets */
.cs-list .cs-name { color: var(--heading); }
.cs-list .cs-name:hover b { color: var(--accent-text); }
.cs-rename { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.cs-rename .input { flex: 1 1 220px; min-width: 0; }
.xs-empty__acts { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 1100px) {
  .src-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .xp, .xd, .xcost { grid-template-columns: minmax(0, 1fr); }
  .xp-panel { justify-self: stretch; }
}
@media (max-width: 600px) {
  .src-grid, .xcost__list, .xpriv { grid-template-columns: minmax(0, 1fr); }
}
