/* AppConnect — getappconnect.com
   Single stylesheet. No build step, no dependencies. */

:root {
  --accent: #2f5bd7;
  --accent-ink: #ffffff;
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --surface: #ffffff;
  --border: #e3e6ea;
  --border-strong: #c9ced6;
  --text: #15181d;
  --text-muted: #5a626e;
  --radius: 10px;
  --maxw: 880px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #7d9bf5;
    --accent-ink: #0d1016;
    --bg: #0e1117;
    --bg-alt: #151a22;
    --surface: #151a22;
    --border: #262d38;
    --border-strong: #3a4350;
    --text: #e8ebf0;
    --text-muted: #a2aab8;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 650;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand svg { display: block; flex: none; }
.brand .b-connect { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 15px;
}

.site-nav a { color: var(--text-muted); text-decoration: none; }
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

/* ---------- type ---------- */

main { padding: 44px 0 8px; }

h1 {
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

h2 {
  font-size: clamp(20px, 4vw, 24px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}

h3 {
  font-size: 17px;
  margin: 24px 0 6px;
}

p { margin: 0 0 16px; }

.lede {
  font-size: clamp(18px, 3.2vw, 20px);
  color: var(--text-muted);
  max-width: 62ch;
}

a { color: var(--accent); }

ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 8px; }

code, .scope {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  /* Scope URLs are one long unbroken token: let them break anywhere rather
     than push the page sideways on a phone. */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.muted { color: var(--text-muted); }
.small { font-size: 15px; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ---------- blocks ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 20px 0 8px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
}

.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.callout {
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: 18px;
  margin: 20px 0;
}

.callout p:last-child { margin-bottom: 0; }

.todo {
  font-family: var(--mono);
  font-size: 0.85em;
  background: #fff4d6;
  color: #573b00;
  border: 1px dashed #c79a1e;
  border-radius: 5px;
  padding: 1px 6px;
}

@media (prefers-color-scheme: dark) {
  .todo { background: #33290c; color: #ffdf94; border-color: #7a621d; }
}

/* scope table -> stacks on narrow screens */
.scope-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: grid;
  gap: 14px;
}

.scope-list > li {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0;
  background: var(--surface);
}

.scope-list .scope { display: block; max-width: 100%; }
.scope-list p { margin: 10px 0 0; }
.scope-list p:first-of-type { margin-top: 10px; }

dl { margin: 0 0 16px; }
dt { font-weight: 650; margin-top: 14px; }
dd { margin: 4px 0 0; color: var(--text-muted); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding: 28px 0 44px;
  color: var(--text-muted);
  font-size: 15px;
}

.site-footer .wrap { display: grid; gap: 10px; }
.site-footer a { color: var(--text-muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }

.toc { margin-bottom: 8px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- capability sections ---------- */

/* A capability area: a short heading, one paragraph, and the providers it
   covers. Deliberately plain — this is a disclosure page, not a pitch. */
.area {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 18px 14px;
}

.area h3 { margin: 0 0 6px; }
.area > p { margin: 0 0 12px; }
.area p:last-child { margin-bottom: 0; }

/* 320px against an 880px column gives two per row, so the four areas read as a
   2x2 block rather than 3 + 1 orphan. Below ~700px it collapses to one. */
.areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin: 20px 0 8px;
}

.area-providers {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
}

.area-providers strong { color: var(--text); font-weight: 650; }

/* ---------- status ---------- */

/* Two states only, and they mean exactly what they say:
   "live"    = a customer can complete this connection today
   "pending" = the code is not finished, or no connection has ever been made
   Never add a third that blurs the two. */
.status {
  display: inline-block;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: 0.01em;
  padding: 1px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

/* Measured, not guessed. Text against its own pill background:
     #1c5b34 on #e6f4ec = 7.13:1     #5c4300 on #fdf3d6 = 8.40:1
   Border against the surface the pill sits on (#ffffff), >= 3:1 per 1.4.11:
     #4f9a70 = 3.39:1                #a78724 = 3.42:1 */
.status--live    { background: #e6f4ec; color: #1c5b34; border-color: #4f9a70; }
.status--pending { background: #fdf3d6; color: #5c4300; border-color: #a78724; }

@media (prefers-color-scheme: dark) {
  /*   #8fe0ad on #14261c = 10.15:1    #f0cf82 on #2a2210 = 10.45:1
     Border against the dark surface (#151a22):
       #4c8f66 = 4.51:1                #93792e = 4.17:1 */
  .status--live    { background: #14261c; color: #8fe0ad; border-color: #4c8f66; }
  .status--pending { background: #2a2210; color: #f0cf82; border-color: #93792e; }
}

/* ---------- provider status list ---------- */

.providers {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: grid;
  gap: 10px;
}

.providers > li {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 16px;
  margin: 0;
}

.providers .p-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

.providers .p-name { font-weight: 650; }
.providers p { margin: 8px 0 0; font-size: 15px; color: var(--text-muted); }

/* ---------- data table ---------- */

.table-scroll { overflow-x: auto; margin: 20px 0; }

table.data {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}

/* Wide enough to read as a table where there is room; below that the cells wrap
   and it fits the screen. .table-scroll stays as the safety net, but on a phone a
   table that has to be dragged sideways is worse than one that wraps. */
@media (min-width: 560px) {
  table.data { min-width: 460px; }
}

table.data th,
table.data td {
  border: 1px solid var(--border);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

table.data th {
  background: var(--bg-alt);
  font-weight: 650;
}
