/* Connections tab in Keystone (28 Oct 2026): one card per platform, one button each; full-screen sign-in panel. */
.cx-intro p { margin: 0 0 8px; font-size: 14.5px; }
.cx-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-sum span { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--rule); color: var(--muted); }
.cx-sum .ok { background: #e3f6ec; border-color: transparent; color: #17784e; font-weight: 600; }
.cx-sum .warn { background: #fff4e5; border-color: transparent; color: #8a4b00; font-weight: 600; }
.cx-needs { border-color: #f2c48b; background: #fffaf2; }
.cx-needrow { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--rule); }
.cx-needrow:first-of-type { border-top: 0; }
.cx-group { margin-top: 14px; }
.cx-gh { font-family: "Geist", system-ui, sans-serif; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 2px 8px; }
.cx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.cx-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; min-width: 0; }
.cx-card.needs_you { border-color: #f2c48b; box-shadow: inset 3px 0 0 #e8912d; }
.cx-card.connected { box-shadow: inset 3px 0 0 #22a06b; }
.cx-card.waiting_backbone, .cx-card.manual { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); }
.cx-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cx-head h4 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.25; }
.cx-card.checklist { grid-column: 1 / -1; }
.cx-palist { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 8px; }
.cx-parow { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; background: var(--bg); min-width: 0; }
.cx-parow.ready { border-color: #17784e55; }
.cx-pahead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cx-pastep { display: grid; grid-template-columns: 92px 1fr; gap: 8px; margin-top: 8px; font-size: 13px; }
.cx-pastep p { margin: 0 0 4px; }
.cx-palbl { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding-top: 2px; }
.cx-pasel { font: inherit; font-size: 12.5px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); color: inherit; max-width: 100%; }
.cx-patick { font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; }
.cx-pill { flex: none; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--rule); white-space: nowrap; }
.cx-pill.ok { background: #e3f6ec; color: #17784e; border-color: transparent; }
.cx-pill.warn { background: #fff4e5; color: #8a4b00; border-color: transparent; }
.cx-pill.info { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.cx-why { margin: 6px 0 4px; font-size: 13.5px; color: var(--muted); }
.cx-gain { margin: 2px 0 4px; font-size: 13px; color: var(--ink); }
.cx-gain b { font-weight: 600; }
.cx-eff { font-style: italic; }
.cx-card.waiting_backbone { padding: 12px 14px; }
.cx-card.waiting_backbone .cx-gain { color: var(--muted); }
.cx-acc { margin: 4px 0 0; font-size: 13.5px; overflow-wrap: anywhere; }
.cx-acc svg { vertical-align: -3px; margin-right: 4px; }
.cx-acc svg, .cx-warnline svg { width: 15px; height: 15px; flex: none; }
.cx-acc svg { color: #17784e; }
.cx-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.cx-warnline { margin: 4px 0 0; font-size: 13px; color: #8a4b00; display: flex; gap: 6px; align-items: flex-start; }
.cx-owner { margin-top: 8px; font-size: 12px; padding: 7px 9px; border-radius: 10px; background: var(--notice); border: 1px dashed var(--rule); overflow-wrap: anywhere; }
.cx-act { margin-top: auto; padding-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.cx-btn { border: 1px solid var(--rule); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 10px 14px; font-size: 14.5px; font-weight: 600; min-height: 44px; }
.cx-btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.cx-btn.danger { color: #b42318; }
.cx-btn.small { padding: 7px 12px; font-size: 13.5px; min-height: 40px; }
.cx-btn[disabled] { opacity: .55; cursor: default; }
.cx-btn.busy { opacity: .65; }
.cx-act .cx-btn.primary:only-child, .cx-act .cx-btn:only-child { flex: 1; }
.cx-more { margin-top: 8px; font-size: 13px; }
.cx-more summary { color: var(--muted); cursor: pointer; padding: 10px 0; min-height: 44px; box-sizing: border-box; }
.cx-more .cx-btn { margin: 6px 6px 0 0; }
.cx-hist { margin-top: 14px; }
.cx-hist summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.cx-hist summary h3 { margin: 0; }
.cx-hist ul { list-style: none; margin: 10px 0 0; padding: 0; font-size: 12.5px; }
.cx-hist li { padding: 5px 0; border-top: 1px solid var(--rule); overflow-wrap: anywhere; }
.cx-hist li span { color: var(--muted); }
.cx-hist li small { color: var(--muted); }
.cx-cap { margin: 10px 2px 0; }

/* modal + toast */
.cx-modal { position: fixed; inset: 0; z-index: 90; background: rgba(10, 12, 20, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cx-mbox { background: var(--surface); color: var(--ink); border-radius: 18px; padding: 20px; width: 100%; max-width: 460px; max-height: 88vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.cx-mbox h3 { margin: 0 0 8px; font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 26px; display: flex; align-items: center; gap: 8px; }
.cx-mbox h3 svg { width: 22px; height: 22px; color: #17784e; }
.cx-mbox p { font-size: 14.5px; }
.cx-mbtns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.cx-steps { padding-left: 20px; font-size: 14px; } .cx-steps li { margin: 4px 0; }
.cx-fld { display: block; margin-top: 10px; } .cx-fld span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.cx-fld input { width: 100%; font: inherit; font-size: 16px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--rule); background: var(--bg); color: var(--ink); }
.cx-bad { color: #b42318; font-size: 13.5px; }
.cx-prog { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.cx-spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rule); border-top-color: var(--accent); animation: cxspin .8s linear infinite; margin-right: 6px; vertical-align: -2px; flex: none; }
@keyframes cxspin { to { transform: rotate(360deg); } }
.cx-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 95; background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100vw - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.cx-toast.bad { background: #b42318; color: #fff; }

/* the full-screen sign-in panel (works on a phone: the viewer has its own Keyboard and Paste buttons) */
.cx-panel { position: fixed; inset: 0; z-index: 80; background: #0f1117; display: flex; flex-direction: column; }
.cx-panel header { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px 14px; background: var(--surface); border-bottom: 1px solid var(--rule); color: var(--ink); }
.cx-ptitle { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cx-ptitle b { font-size: 15px; }
.cx-ptitle span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-pbody { position: relative; flex: 1; min-height: 0; }
.cx-pbody iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #0f1117; }
.cx-pnote { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #d8dbe4; background: #0f1117; }
.cx-pnote p { max-width: 440px; margin: 6px 0; font-size: 15px; }
.cx-pnote .cx-sub { color: #9aa0b2; }
.cx-pnote .cx-big { font-family: "Instrument Serif", Georgia, serif; font-size: 28px; display: flex; gap: 8px; align-items: center; }
.cx-pnote .cx-big svg { width: 26px; height: 26px; color: #5fd39b; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cx-sum .ok, :root:not([data-theme="light"]) .cx-pill.ok { background: #12392a; color: #6fe0a8; }
  :root:not([data-theme="light"]) .cx-sum .warn, :root:not([data-theme="light"]) .cx-pill.warn { background: #2b1f0c; color: #f2b45a; }
  :root:not([data-theme="light"]) .cx-needs { background: #1d170c; border-color: #5c3d12; }
  :root:not([data-theme="light"]) .cx-warnline { color: #f2b45a; }
  :root:not([data-theme="light"]) .cx-btn.danger, :root:not([data-theme="light"]) .cx-bad { color: #ff8a80; }
}
@media (max-width: 520px) {
  .cx-grid { grid-template-columns: 1fr; }
  .cx-needrow { flex-direction: column; align-items: stretch; }
  .cx-mbtns .cx-btn { flex: 1; }
}

/* ───── Desktop (28 Oct 2026): a denser card grid, mouse states, and the sign-in browser as a wide right-hand panel
   over the dimmed page. Below 1024px is untouched. ───── */
@media (min-width: 1024px) {
  .cx-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: center; }
  .cx-intro > h3 { grid-column: 1 / -1; }
  .cx-intro > p { margin: 0; }
  .cx-intro > .cx-sum { justify-content: flex-end; }
  .cx-group { margin-top: 6px; }
  .cx-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
  .cx-card { transition: border-color .12s, box-shadow .12s; }
  .cx-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); }
  .cx-btn { min-height: 38px; padding: 8px 14px; font-size: 14px; cursor: pointer; }
  .cx-btn.small { min-height: 34px; }
  .cx-btn:hover:not([disabled]) { border-color: var(--accent); color: var(--accent); }
  .cx-btn.primary:hover:not([disabled]) { color: var(--accent-ink); filter: brightness(1.08); }
  .cx-btn.danger:hover:not([disabled]) { color: #b42318; border-color: #f2b3a6; }
  .cx-more summary, .cx-hist summary { min-height: 36px; padding: 6px 0; }
  .cx-more summary:hover, .cx-hist summary:hover h3 { color: var(--accent); }
  .cx-needrow { padding: 10px 0; }
  .cx-hist ul { columns: 2; column-gap: 28px; }
  .cx-hist li { break-inside: avoid; }
  .cx-toast { bottom: 32px; left: calc(50% + var(--side-w, 240px) / 2); }
  .cx-mbox { max-width: 520px; padding: 24px 26px; }
  .cx-card button:focus-visible, .cx-mbox button:focus-visible, .cx-panel button:focus-visible, .cx-more summary:focus-visible, .cx-hist summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  /* the secure sign-in browser: wide enough for a real website, page dimmed beside it (Close or Esc ends it; a stray
     click beside it does nothing, so a half-done sign-in is never lost) */
  .cx-panel { left: auto; width: min(1120px, calc(100vw - var(--side-w, 240px) - 40px)); background: transparent; }
  .cx-panel::before { content: ""; position: fixed; inset: 0; z-index: -1; background: rgba(8, 10, 16, .45); }
  .cx-panel > header, .cx-panel > .cx-pbody { border-left: 1px solid var(--rule); animation: drawer-in .18s ease-out; }
  .cx-panel > .cx-pbody { background: #0f1117; }
  .cx-panel header { padding: 10px 12px 10px 18px; }
}
@media (min-width: 1440px) {
  .cx-grid { gap: 16px; }
}
/* Backbone's browser on the social cards (28 Oct 2026): one row per platform, its state and one button */
.cx-br { margin-top: 6px; border-top: 1px solid var(--rule); }
.cx-brrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.cx-brrow:last-child { border-bottom: 0; }
.cx-brtxt { min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; }
.cx-brtxt .cx-sub { margin: 0; }
.cx-brok { color: #17784e; font-weight: 600; }
.cx-brok svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
@media (max-width: 420px) { .cx-brrow { flex-direction: column; align-items: stretch; } .cx-brrow .cx-btn { width: 100%; } }
