/* Connecting networks: platform tiles, Telegram steps, Meta setup cards, AI app consent. */

/* ---------- platform picker ---------- */
.ptiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ptile {
  appearance: none; display: grid; justify-items: start; align-content: start; gap: 4px; padding: 16px; text-align: left; cursor: pointer;
  border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease, transform 90ms ease-out, background-color var(--t-fast) ease;
}
.ptile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; width: 100%; margin-bottom: 10px; }
.ptile-has { font-size: 0.6875rem; font-weight: 600; color: var(--ok); background: var(--ok-soft); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.ptile-name { font-weight: 600; }
.ptile-how { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; line-height: 1.35; color: var(--text-2); }
.ptile-how .ic { color: var(--accent-text); opacity: 0; transform: translateX(-3px); transition: opacity var(--t-fast) ease, transform var(--t-fast) var(--ease-out); }
@media (hover: hover) {
  .ptile:hover { border-color: var(--accent-text); box-shadow: var(--shadow); }
  .ptile:hover .ptile-how .ic { opacity: 1; transform: none; }
}
.ptile:active { transform: scale(0.985); }
.ptile:focus-visible { border-radius: var(--r); }

.psoon { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.psoon-title { font-size: 0.8125rem; font-weight: 550; color: var(--text-2); }
.psoon-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.psoon-list li { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--text-3); }
.psoon-list .pglyph { opacity: 0.6; }

/* ---------- Telegram ---------- */
.tg-step { display: grid; gap: 14px; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg); }
.tg-step-head { display: flex; align-items: center; gap: 10px; }
.tg-n {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent); color: var(--on-accent); font-size: 0.8125rem; font-weight: 650;
  transition: background-color var(--t) ease, color var(--t) ease;
}
.tg-n.done { background: var(--ok); color: var(--surface); }
.tg-n .ic { stroke-width: 2.6; }
/* sub-steps inside a numbered step: quiet dots, so numbers don't nest */
.steps.tg-list { gap: 10px; }
.steps.tg-list > li { padding-left: 20px; }
.steps.tg-list > li::before { content: ""; width: 6px; height: 6px; top: 0.6em; left: 4px; background: var(--accent-text); opacity: 0.55; }
.tg-finish { display: grid; gap: 12px; }

/* ---------- Meta connection cards ---------- */
.conn { scroll-margin-top: 24px; }
.conn-steps { gap: 18px; }
.conn-steps > li { display: grid; gap: 10px; }
.conn-steps > li.done::before { content: ""; background: var(--ok); }
.conn-steps > li.done::after {
  content: ""; position: absolute; left: 9px; top: 7px; width: 9px; height: 5px;
  border: solid var(--surface); border-width: 0 0 2px 2px; transform: rotate(-45deg);
}
.conn-steps .keys { display: grid; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); }
.conn-saved { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.875rem; }
.inline-btn { min-height: 28px; padding: 0 8px; }
.conn-action { padding-top: 2px; }
.conn-more > .stack { padding-top: 16px; }

/* phones: steps and their boxes use the full width */
@media (max-width: 640px) {
  .conn-steps > li { padding-left: 34px; }
  .conn-steps .keys, .conn-steps .copybox { margin-left: -34px; }
  .conn-action .btn { flex: 1 1 auto; }
  .conn .panel-head { flex-wrap: wrap; row-gap: 8px; }
  .conn .panel-head > .grow { flex-basis: calc(100% - 58px); }
  .conn .panel-head > .badge { margin-left: 58px; }
}

/* ---------- consent: an AI app asks for access ---------- */
.sheet.consent-sheet { width: min(480px, 100%); }
.consent { position: relative; }
.consent-close { position: absolute; top: -8px; right: -12px; }
.consent-mark { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 0 0; }
.consent-app {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.consent-link { display: inline-flex; gap: 5px; }
.consent-link i { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }
.consent-link i:nth-child(2) { background: var(--text-3); }
.brand-mark.lg { width: 56px; height: 56px; border-radius: 18px; }
.brand-mark.lg .ic { width: 24px; height: 24px; }
.consent-head { display: grid; gap: 8px; text-align: center; justify-items: center; }
.consent-head h2:focus-visible { outline: none; }
.consent-head h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.005em; max-width: 22ch; }
.consent-head p { font-size: 0.875rem; line-height: 1.55; max-width: 40ch; }
.consent-host {
  display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 999px; vertical-align: 1px;
  font-size: 0.8125rem; font-weight: 600; line-height: 22px; background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line);
}
.consent-host.ok .ic { color: var(--ok); }
.consent-host.warn .ic { color: var(--warn); }
.consent-box { display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); }
.consent-sub { font-size: 0.75rem; font-weight: 600; color: var(--text-2); }
.consent-sub + .consent-list { margin-bottom: 4px; }
.consent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.consent-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.875rem; line-height: 1.45; }
.consent-list li .ic { color: var(--ok); margin-top: 2px; }
.consent-list li.no .ic { color: var(--text-2); }
.consent .hint { text-align: center; }
@media (max-width: 640px) {
  .consent-close { right: -6px; }
}
