/* Integration pages: badges, download box, screenshots, steps, tool tables, code, sample call, flow diagrams.
   Loaded after /page.css and uses its palette. */
  .page { min-width: 0; }
  .page h2 { scroll-margin-top: 88px; }
  .page h3 { scroll-margin-top: 88px; }
  .page a:not(.btn) { color: var(--signal-soft); text-decoration: none; }
  .page a:not(.btn):hover { text-decoration: underline; }
  .page code, .page kbd {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.88em;
    background: rgba(255,255,255,0.07); border: 1px solid var(--line-soft); border-radius: 6px; padding: 1px 6px;
    color: var(--text); overflow-wrap: anywhere;
  }
  .path { color: var(--text); font-weight: 700; }

  /* Status badges */
  .badge {
    display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
  }
  .badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
  .badge-ready { background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.28); color: #9befb8; }
  .badge-soon { background: rgba(240,164,27,0.1); border: 1px solid rgba(240,164,27,0.32); color: var(--signal-soft); }
  .badge-api { background: rgba(120,140,220,0.12); border: 1px solid rgba(120,140,220,0.3); color: #c3cdf5; }
  .eyebrow.soon { background: rgba(240,164,27,0.1); border-color: rgba(240,164,27,0.32); color: var(--signal-soft); }
  .eyebrow.soon::before { background: var(--signal); box-shadow: 0 0 10px var(--signal); }

  /* Download box under the lead */
  .get { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: center; padding: 22px 24px; margin: 30px 0 8px; }
  .get-files { display: flex; flex-wrap: wrap; gap: 10px; }
  .btn-dl { background: var(--signal); color: #14100a; box-shadow: 0 10px 30px rgba(240,164,27,0.22); height: auto; min-height: 48px; padding: 10px 20px; text-align: left; }
  .btn-dl:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(240,164,27,0.32); }
  .btn-dl svg { flex: none; }
  .btn-dl small { display: block; font-weight: 600; font-size: 12px; opacity: 0.75; }
  .get-meta { font-size: 13.5px; color: var(--dim); display: grid; gap: 4px; }
  .get-meta b { color: var(--text); font-weight: 700; }
  .get .note { grid-column: 1 / -1; font-size: 13.5px; color: var(--dim); margin: 0; max-width: none; }

  /* On this page */
  /* .page ul in page.css is a grid; this needs to win over it. */
  .page ul.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
  .page .toc li { max-width: none; }
  .toc a {
    display: inline-block; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--dim) !important;
  }
  .toc a:hover { color: var(--text) !important; background: rgba(255,255,255,0.07); text-decoration: none !important; }

  /* Cards: what it does, the hub */
  .cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
  .cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 22px 22px 20px; min-width: 0; }
  .card h3 { margin: 0 0 8px; font-size: 17px; }
  .page .card p { margin: 0; font-size: 15px; }
  .card .ico { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(240,164,27,0.12); border: 1px solid rgba(240,164,27,0.25); margin-bottom: 14px; }

  .int-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; text-decoration: none !important; color: inherit !important; transition: transform 0.15s, border-color 0.15s; }
  .int-card:hover { transform: translateY(-2px); border-color: rgba(240,164,27,0.4); }
  .int-card .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
  .int-card .mono {
    width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: #12110f; border: 1px solid rgba(255,255,255,0.12); font-weight: 800; font-size: 15px; color: var(--signal-soft); letter-spacing: -0.02em;
  }
  .int-card h3 { margin: 4px 0 0; font-size: 19px; color: var(--text); }
  .page .int-card p { margin: 0; font-size: 15px; }
  .int-card .more { margin-top: auto; font-size: 14px; font-weight: 700; color: var(--signal-soft); }
  .int-card .what { font-size: 13px; color: var(--faint); }

  /* Screenshots */
  .shot { margin: 22px 0 26px; }
  .shot a { display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); background: var(--panel); cursor: zoom-in; }
  .shot img { display: block; width: 100%; height: auto; }
  .shot figcaption { font-size: 13.5px; color: var(--dim); margin-top: 10px; max-width: 72ch; }
  .shot figcaption b { color: var(--text); }
  .shot-narrow { max-width: 560px; }
  .shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
  .shots .shot { margin: 0; }

  /* Numbered steps */
  .steps { counter-reset: step; list-style: none; padding: 0 !important; margin: 20px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px !important; }
  .page .steps > li { counter-increment: step; position: relative; min-width: 0; padding: 20px 22px 18px 66px; max-width: none; }
  .steps > li::before {
    content: counter(step); position: absolute; left: 20px; top: 18px; width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
    background: var(--signal); color: #14100a;
  }
  .steps h3 { margin: 2px 0 6px; font-size: 17px; color: var(--text); }
  .page .steps p { margin: 8px 0; }
  .page .steps ul { margin: 8px 0; }
  .where { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 2px; }

  /* Tables: always scroll inside their own box */
  .tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl td code { white-space: nowrap; }
  .tbl td.wrap code { white-space: normal; }
  .tbl td:first-child code { color: var(--signal-soft); }

  /* Code */
  .code {
    position: relative; margin: 14px 0 18px; border-radius: 14px; border: 1px solid var(--line);
    background: rgba(5,7,12,0.72); overflow: hidden; max-width: 100%;
  }
  .code .lbl { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); padding: 10px 14px 0; }
  .code pre {
    margin: 0; padding: 10px 14px 14px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; color: #e9e4da;
    white-space: pre; tab-size: 2;
  }
  .code pre.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
  .code .k { color: var(--signal-soft); }
  .code .c { color: var(--faint); }

  /* Sample call transcript */
  .call { padding: 22px 22px 18px; margin: 20px 0 10px; }
  .call-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
  .call-head b { font-size: 14px; }
  .call-head .badge { background: rgba(255,255,255,0.06); border: 1px solid var(--line); color: var(--dim); }
  .call-head .badge::before { background: #ff6b6b; box-shadow: 0 0 8px #ff6b6b; }
  .turn { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 7px 0; }
  .turn .who { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding-top: 3px; }
  .turn.c .who { color: var(--caller); opacity: 0.75; }
  .turn.a .who { color: var(--signal); }
  .page .turn p { margin: 0; color: var(--text); max-width: 62ch; }
  .turn.a p { color: #f6e3c0; }
  .turn.t { padding: 2px 0; }
  .page .turn.t p { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; color: var(--faint); overflow-wrap: anywhere; }
  .turn.t .who { color: var(--faint); font-size: 11px; }
  .call-note { font-size: 13px; color: var(--faint) !important; margin-top: 10px !important; }

  /* Flow diagram (Zapier, Make) */
  .flow-wrap { padding: 22px; margin: 20px 0 8px; }
  .flow-wrap .lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); display: block; margin-bottom: 14px; }
  .flow { display: grid; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr); align-items: stretch; gap: 0; }
  .node { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: rgba(255,255,255,0.04); min-width: 0; }
  .node .app { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); display: block; }
  .node b { display: block; margin: 4px 0 4px; font-size: 15px; }
  .node span.d { display: block; font-size: 13px; color: var(--dim); }
  .node code { font-size: 11.5px; }
  .node.z { border-color: rgba(240,164,27,0.4); background: rgba(240,164,27,0.07); }
  .arrow { display: flex; align-items: center; justify-content: center; color: var(--signal); font-weight: 800; font-size: 18px; }
  .arrow::before { content: '→'; }
  .flow-cap { font-size: 13.5px; color: var(--dim); margin-top: 12px !important; }

  /* Facts list (requirements) */
  .facts { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 0; padding: 6px 22px; margin: 18px 0; }
  .facts > div { display: contents; }
  .facts dt, .facts dd { padding: 12px 0; border-top: 1px solid var(--line-soft); font-size: 15px; }
  .facts > div:first-child dt, .facts > div:first-child dd { border-top: 0; }
  .facts dt { color: var(--text); font-weight: 700; padding-right: 16px; }
  .facts dd { color: var(--dim); }

  .trouble { padding: 6px 24px; margin: 18px 0; }
  .trouble details { border-top: 1px solid var(--line-soft); padding: 15px 0; }
  .trouble details:first-child { border-top: 0; }
  .trouble summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-weight: 700; }
  .trouble summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
  .trouble summary::after { content: '+'; color: var(--signal-soft); font-weight: 800; }
  .trouble details[open] summary::after { content: '−'; }
  .page .trouble details p { font-size: 15px; margin: 10px 0 0; }

  .api-box { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }

  @media (max-width: 900px) {
    .cards, .api-box { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .flow { grid-template-columns: minmax(0, 1fr); }
    .arrow { height: 30px; }
    .arrow::before { content: '↓'; }
  }
  @media (max-width: 720px) {
    .wrap { padding: 0 16px; }
    .page { padding-top: 44px; }
    .cards, .cards-2, .api-box, .shots { grid-template-columns: minmax(0, 1fr); }
    .get { grid-template-columns: minmax(0, 1fr); padding: 18px; }
    .get-files .btn { width: 100%; justify-content: flex-start; }
    .page .steps > li { padding: 56px 16px 16px; }
    .steps > li::before { left: 16px; top: 16px; }
    .turn { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .facts { grid-template-columns: minmax(0, 1fr); padding: 6px 18px; }
    .facts dd { border-top: 0; padding-top: 0; }
    .trouble, .faq { padding: 4px 16px; }
    .call, .flow-wrap { padding: 18px 16px; }
    .tbl table { min-width: 560px; }
    .nav-in { gap: 12px; }
    .nav-right { gap: 8px; }
    .nav-right .btn-sm { padding: 0 12px; font-size: 13px; }
  }
  @media (max-width: 400px) {
    .langs button { padding: 0 8px; }
    .brand { font-size: 18px; gap: 8px; }
    .brand .mark { width: 34px; height: 34px; }
  }

  /* At every width: a paragraph or step holding a long URL or token must wrap, not widen the page past the screen. */
  main.page p, main.page li { overflow-wrap: anywhere; }
