/* Tele Connector. No inline styles anywhere (CSP style-src 'self'), so every look is a class here. */
:root {
  --bg: #f5f7fa; --surface: #ffffff; --field: #f5f7fa; --tile: #f1f3f6;
  --text: #0f1720; --text-2: #4b5663; --muted: #5b6672;
  --border: #e2e7ed; --border-soft: #eef1f4;
  --brand: #2aabee; --accent: #1a7ab5; --accent-hover: #15689b; --on-accent: #ffffff;
  --accent-soft: #e8f4fb; --accent-soft-text: #155e8c;
  --ok: #157f3d; --ok-soft: #e7f6ec; --ok-text: #116632;
  --danger: #b42318; --danger-soft: #fdecea; --danger-border: #f1c8c3;
  --warn-bg: #fff7e6; --warn-border: #f0c36d;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  --radius: 16px; --radius-sm: 10px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116; --surface: #161b22; --field: #0e1116; --tile: #1f262f;
    --text: #e6edf3; --text-2: #c2ccd6; --muted: #9aa6b2;
    --border: #29313b; --border-soft: #222a33;
    --accent: #5cbdf2; --accent-hover: #8fd0f5;
    --accent-soft: #11283a; --accent-soft-text: #8fd0f5;
    --ok: #4cc36f; --ok-soft: #10261a; --ok-text: #7edb9a;
    --danger: #ff7a6e; --danger-soft: #2c1513; --danger-border: #5a2a24;
    --warn-bg: #2a2416; --warn-border: #6b5520;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font: 16px/1.55 var(--sans); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; }
h1 { font-size: 32px; line-height: 1.2; font-weight: 750; letter-spacing: -0.02em; }
h2 { font-size: 18px; line-height: 1.3; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 0.92em; overflow-wrap: anywhere; }
svg.icon { flex: none; width: 18px; height: 18px; }
svg.icon-sm { width: 14px; height: 14px; }
p > svg.icon { vertical-align: -3px; margin-right: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- frame ---------------------------------------------------------------------------- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700;
  font-size: 17px; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.user-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; max-width: 240px; padding: 0 14px 0 6px;
  border: 1px solid var(--border); border-radius: 999px; color: var(--text); text-decoration: none; font-size: 15px; font-weight: 600; }
.user-pill:hover { color: var(--text); background: var(--tile); }
.user-pill span.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

main { flex: 1; width: 100%; margin: 0 auto; padding: 40px 24px 56px; display: flex; flex-direction: column; gap: 20px; }
main.page { max-width: 880px; }
main.medium { max-width: 760px; }
main.narrow { max-width: 520px; padding-top: 48px; }
main.wide { max-width: 1040px; padding-top: 72px; gap: 56px; }

.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }

/* ---- building blocks ------------------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.card.roomy { padding: 32px 28px; gap: 24px; }
.card.rows { padding: 8px 24px; gap: 0; }
.card.danger-zone { border-color: var(--danger-border); }
.danger-zone h2 { color: var(--danger); }
.page-head { display: flex; flex-direction: column; gap: 8px; }
.page-head.center { text-align: center; align-items: center; }
.page-head.split { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.lead { color: var(--muted); }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-wrap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card.rows > .section-head { padding: 16px 0 8px; }
.eyebrow { font-size: 13px; font-weight: 650; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

/* buttons */
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 15px; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover, button:hover { background: var(--tile); color: var(--text); }
.btn-primary, button.btn-primary { background: #1a7ab5; border-color: #1a7ab5; color: var(--on-accent); }
.btn-primary:hover, button.btn-primary:hover { background: #15689b; border-color: #15689b; color: var(--on-accent); }
.btn-danger, button.btn-danger { background: #b42318; border-color: #b42318; color: #ffffff; }
.btn-danger:hover, button.btn-danger:hover { background: #962016; border-color: #962016; color: #ffffff; }
.btn-danger-outline, button.btn-danger-outline { color: var(--danger); border-color: var(--danger-border); }
.btn-danger-outline:hover, button.btn-danger-outline:hover { background: var(--danger-soft); color: var(--danger); }
.btn-lg { height: 52px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn-block { width: 100%; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.actions.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.actions.center { justify-content: center; }
form.inline { display: inline; }

/* chips, badges, tiles, avatars */
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent-soft-text); font-size: 13px; font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 650; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok-text); }
.badge-bad { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--accent-soft); color: var(--accent-soft-text); }
.badge .dot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.pill-ok { background: var(--ok-soft); color: var(--ok-text); }
.pill-bad { background: var(--danger-soft); color: var(--danger); }
.tag { display: inline-block; font-size: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0 8px; white-space: nowrap; }
.icon-tile { flex: none; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-soft-text);
  display: flex; align-items: center; justify-content: center; }
.icon-tile.sm { width: 36px; height: 36px; }
.app-tile { flex: none; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--tile); border: 1px solid var(--border);
  font-weight: 700; display: flex; align-items: center; justify-content: center; }
.app-tile.lg { width: 56px; height: 56px; border-radius: 14px; font-size: 24px; }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-soft-text);
  font-weight: 700; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.avatar.md { width: 32px; height: 32px; font-size: 14px; }
.num { flex: none; width: 32px; height: 32px; border-radius: 999px; background: #1a7ab5; color: #ffffff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; }
.num.sm { width: 28px; height: 28px; font-size: 14px; }

/* messages */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--ok-soft); color: var(--ok-text); font-weight: 600; }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); border: 1px solid var(--warn-border); }
.note-box { padding: 12px 14px; border-radius: 12px; background: var(--bg); color: var(--text-2); font-size: 14px; }
.error-text { color: var(--danger); font-weight: 600; }

/* forms */
label.field-label { font-size: 14px; font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=search], input.field {
  font: inherit; height: 44px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--field); color: var(--text); width: 100%; min-width: 0; }
input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
input.mono-field { font-family: var(--mono); font-size: 15px; }
.copy-field { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-field input { flex: 1 1 300px; }
.copy-field.lg input, .copy-field.lg button { height: 48px; }
.field-short { max-width: 260px; }
fieldset { border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px 16px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
legend { padding: 0 6px; font-weight: 650; }
.radio { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.radio input { margin-top: 5px; }
pre.token { margin: 0; font-family: var(--mono); font-size: 14px; background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; white-space: pre-wrap; word-break: break-all; }

/* lists of rows */
.info-row { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--border-soft); }
.info-row:first-child { border-top: 0; }
.info-row .text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.info-row strong { font-size: 15px; }
.info-row .text > span { font-size: 14px; color: var(--muted); }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border-soft); flex-wrap: wrap; }
.list-row .text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; }
.list-row .host { font-weight: 400; color: var(--muted); font-family: var(--mono); font-size: 13px; }
.empty { padding: 16px 0; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: 15px; }

/* tables */
.table-box { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
table.data th { text-align: left; padding: 10px 14px; font-weight: 600; color: var(--muted); background: var(--bg); }
table.data td { padding: 10px 14px; border-top: 1px solid var(--border-soft); vertical-align: top; }
table.data td.nowrap { white-space: nowrap; }
table.data td.mono { font-size: 13px; }

/* home */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: 48px; line-height: 1.1; letter-spacing: -0.025em; }
.hero .lead { font-size: 19px; color: var(--text-2); max-width: 600px; }
.hero .actions { justify-content: center; margin-top: 8px; }
.connector-card { max-width: 720px; width: 100%; margin: 0 auto; }
.feature { gap: 10px; }
.feature p, .step span { font-size: 15px; color: var(--muted); }
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.step { display: flex; flex-direction: column; gap: 8px; }
.card.setup { padding: 32px; gap: 20px; }
.card.setup h2 { font-size: 24px; }

/* sign-in, QR */
.qr-card { flex-direction: row; gap: 40px; align-items: center; flex-wrap: wrap; justify-content: center; padding: 32px; }
.qr-side { flex: none; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.qr-frame { width: 264px; height: 264px; padding: 14px; background: #ffffff; border: 1px solid var(--border); border-radius: 14px; }
.qr-frame img { display: block; width: 234px; height: 234px; }
.qr-steps { flex: 1 1 260px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 18px; }
.qr-steps li { display: flex; gap: 14px; align-items: flex-start; }
.qr-steps li > span:last-child { padding-top: 2px; }

/* consent */
.consent-head { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.consent-head h1 { font-size: 26px; line-height: 1.25; }
.app-pair { display: flex; align-items: center; gap: 14px; }
.app-pair img { width: 56px; height: 56px; border-radius: 14px; }
.connector-line { width: 40px; height: 2px; background-image: linear-gradient(to right, var(--muted) 50%, transparent 50%); background-size: 7px 2px; opacity: 0.6; }
.verified { display: inline-flex; align-items: center; gap: 6px; }
.verified svg { color: var(--ok); }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.perm-col { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.perm-col .eyebrow { font-size: 12px; font-weight: 700; }
.perm-col.can .eyebrow, .perm-col.can svg { color: var(--ok); }
.perm-col.cannot .eyebrow, .perm-col.cannot svg { color: var(--danger); }
.perm { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.perm svg { margin-top: 3px; }
.signed-in { display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--border-soft); font-size: 14px; color: var(--text-2); }
.signed-in strong { color: var(--text); }

/* account */
.profile { flex-direction: row; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile .who { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.profile .who strong { font-size: 19px; }
.profile .who span { font-size: 14px; color: var(--muted); }
.picker-list { max-height: 380px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; padding: 4px 0; }
.picker-list label { display: flex; gap: 10px; align-items: center; padding: 8px 14px; cursor: pointer; }
.picker-list label:hover { background: var(--bg); }
.picker-list label span.title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* legal pages */
.prose { gap: 0; }
.prose h2 { margin: 20px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 10px; color: var(--text-2); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); }

@media (max-width: 760px) {
  main { padding: 28px 16px 40px; }
  main.wide { padding-top: 40px; gap: 40px; }
  .wrap { padding: 0 16px; }
  .hero h1 { font-size: 34px; }
  .hero .lead { font-size: 17px; }
  .grid-2, .grid-3, .steps, .perm-grid { grid-template-columns: minmax(0, 1fr); }
  .card.setup, .qr-card { padding: 24px 20px; }
  .card.roomy { padding: 24px 20px; }
  .user-pill span.name { display: none; }
  .user-pill { padding-right: 6px; }
}
