/* ==========================================================================
   coupler-io-alternative.com — article page styles
   Extends the design system used on the homepage. Shared by every article,
   so a new article only needs its own HTML file.
   ========================================================================== */

:root{
  --bg:#0b0d0f;
  --bg-2:#12161a;
  --bg-3:#171c21;
  --line:rgba(255,255,255,.09);
  --line-2:rgba(255,255,255,.17);
  --fg:#eef1f3;
  --fg-2:#a8b2ba;
  --fg-3:#717c85;
  --accent:#5aa9ff;
  --accent-soft:rgba(90,169,255,.11);
  --amber:#e8a33d;
  --sans:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  --mono:'IBM Plex Mono',ui-monospace,'SF Mono',Menlo,monospace;
  --wrap:1180px;
  --radius:14px;
}

*,*::before,*::after{box-sizing:border-box}

html{scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{animation-duration:.01ms !important;transition-duration:.01ms !important}
}

body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family:var(--sans);
  font-size:17px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  font-feature-settings:"tnum" 1,"cv05" 1;
}

a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:3px}

.skip{position:absolute;left:-9999px}
.skip:focus{left:12px;top:12px;z-index:100;padding:10px 16px;background:var(--accent);color:#04121f;border-radius:8px}

.wrap{max-width:var(--wrap);margin:0 auto;padding:0 24px}

/* ---------- masthead (shared with homepage) ---------- */
.masthead{
  position:sticky;top:0;z-index:50;
  background:rgba(11,13,15,.82);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.masthead__inner{
  max-width:var(--wrap);margin:0 auto;padding:14px 24px;
  display:flex;align-items:center;gap:28px;
}
.wordmark{
  font-family:var(--mono);font-size:.9rem;font-weight:600;
  color:var(--fg);letter-spacing:-.01em;white-space:nowrap;
}
.wordmark:hover{text-decoration:none}
.wordmark span{color:var(--accent)}
.masthead nav{display:flex;gap:22px;margin-left:auto;flex-wrap:wrap}
.masthead nav a{color:var(--fg-2);font-size:.86rem;font-weight:500}
.masthead nav a:hover{color:var(--fg);text-decoration:none}
@media (max-width:900px){.masthead nav{display:none}}

/* ---------- article header ---------- */
.article-head{padding:56px 0 40px}
.crumbs{
  font-family:var(--mono);font-size:.72rem;letter-spacing:.08em;
  text-transform:uppercase;color:var(--fg-3);margin:0 0 22px;
  display:flex;align-items:baseline;white-space:nowrap;
}
.crumbs .here{overflow:hidden;text-overflow:ellipsis;min-width:0}
.crumbs a{color:var(--fg-3)}
.crumbs a:hover{color:var(--accent);text-decoration:none}
.crumbs span{margin:0 8px;opacity:.5}
.article-head h1{
  font-size:clamp(2rem,4.6vw,3.2rem);line-height:1.08;
  letter-spacing:-.032em;font-weight:600;margin:0;max-width:20ch;
}
.article-head h1 strong{font-weight:600}

/* ---------- layout: sticky contents + body ---------- */
.article-layout{
  display:grid;grid-template-columns:236px minmax(0,1fr);
  gap:64px;align-items:start;padding-bottom:96px;
}
@media (max-width:1020px){
  .article-layout{grid-template-columns:1fr;gap:36px}
}

.toc{position:sticky;top:88px}
.toc > summary{
  font-family:var(--mono);font-size:.7rem;font-weight:500;
  text-transform:uppercase;letter-spacing:.13em;color:var(--fg-3);
  margin:0 0 16px;list-style:none;cursor:default;
}
.toc > summary::-webkit-details-marker{display:none}

@media (max-width:1020px){
  .toc{
    position:static;background:var(--bg-2);border:1px solid var(--line);
    border-radius:var(--radius);padding:18px 22px;
  }
  .toc > summary{
    cursor:pointer;margin:0;position:relative;padding-right:28px;color:var(--fg);
  }
  .toc[open] > summary{margin-bottom:16px;color:var(--fg-3)}
  .toc > summary::after{
    content:"+";position:absolute;right:2px;top:-4px;
    font-size:1.15rem;font-weight:400;color:var(--fg-3);
  }
  .toc[open] > summary::after{content:"\2013"}
}
.toc ol{margin-top:0;margin:0;padding:0;list-style:none;counter-reset:toc}
.toc li{margin-bottom:11px;line-height:1.4}
.toc a{
  color:var(--fg-2);font-size:.84rem;display:block;
  border-left:1px solid var(--line);padding-left:14px;
}
.toc a:hover{color:var(--fg);border-left-color:var(--accent);text-decoration:none}

/* ---------- article body ---------- */
.article-body{max-width:74ch;min-width:0}

.article-body > p{color:var(--fg-2);margin:0 0 20px;line-height:1.72}
.article-body > p:first-child{
  font-size:1.14rem;color:var(--fg);line-height:1.62;margin-bottom:28px;
}
.article-body strong{color:var(--fg);font-weight:600}
.article-body em{color:var(--fg-2)}

.article-body h2{
  font-size:clamp(1.5rem,2.9vw,2.05rem);line-height:1.16;
  letter-spacing:-.027em;font-weight:600;color:var(--fg);
  margin:68px 0 20px;padding-top:36px;border-top:1px solid var(--line);
  scroll-margin-top:92px;
}
.article-body h2 strong{font-weight:600}
.article-body h3{
  font-size:1.2rem;line-height:1.32;letter-spacing:-.019em;
  font-weight:600;color:var(--fg);margin:40px 0 14px;
  scroll-margin-top:92px;
}
.article-body h3 strong{font-weight:600}
.article-body h4{font-size:1.02rem;font-weight:600;margin:30px 0 10px}

/* lists */
.article-body ul{margin:0 0 22px;padding:0;list-style:none}
.article-body ul li{
  position:relative;padding-left:22px;margin-bottom:12px;
  color:var(--fg-2);line-height:1.6;
}
.article-body ul li::before{
  content:"";position:absolute;left:0;top:.68em;
  width:8px;height:1px;background:var(--fg-3);
}
.article-body ol{margin:0 0 22px;padding-left:22px;color:var(--fg-2)}
.article-body ol li{margin-bottom:12px;line-height:1.6;padding-left:4px}
.article-body li p{margin:0}
.article-body li strong{color:var(--fg)}

/* italic-only paragraph = source/verification note */
.article-body p.fineprint{
  font-family:var(--mono);font-size:.76rem;line-height:1.62;
  color:var(--fg-3);margin:-6px 0 26px;
}
.article-body p.fineprint em{color:var(--fg-3);font-style:normal}

/* question paragraph inside an FAQ run */
.article-body p.faq-q{
  color:var(--fg);font-weight:600;margin:28px 0 8px;
  letter-spacing:-.012em;
}
.article-body p.faq-q strong{font-weight:600}
.article-body p.faq-inline{margin-top:24px}
.article-body p.faq-inline strong{display:block;margin-bottom:6px}

/* ---------- tables ---------- */
.scroller{
  overflow-x:auto;border:1px solid var(--line);
  border-radius:var(--radius);background:var(--bg-2);
  margin:0 0 26px;-webkit-overflow-scrolling:touch;
}
.article-body table{border-collapse:collapse;width:100%;font-size:.88rem;min-width:560px}
.article-body colgroup{display:none}
.article-body th,.article-body td{
  padding:13px 16px;text-align:left;vertical-align:top;
  border-bottom:1px solid var(--line);line-height:1.5;
}
.article-body thead th{
  font-family:var(--mono);font-size:.72rem;font-weight:500;
  text-transform:uppercase;letter-spacing:.09em;color:var(--fg-3);
  background:var(--bg-3);white-space:nowrap;
}
.article-body thead th strong{font-weight:500;color:inherit}
.article-body tbody th{
  font-weight:600;color:var(--fg);font-size:.89rem;
  width:24%;min-width:150px;
}
.article-body tbody td{color:var(--fg-2)}
.article-body tbody tr:last-child th,
.article-body tbody tr:last-child td{border-bottom:0}
.article-body tbody tr:hover th,
.article-body tbody tr:hover td{background:rgba(255,255,255,.022)}

/* the Coupler.io column, detected at build time */
.article-body .col-us{color:var(--fg);background:rgba(90,169,255,.05)}
.article-body thead .col-us{color:var(--accent);background:var(--accent-soft)}

/* ---------- footer (shared with homepage) ---------- */
footer{border-top:1px solid var(--line);background:var(--bg-2);padding:56px 0 40px}
.foot-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:36px}
@media (max-width:860px){.foot-grid{grid-template-columns:1fr 1fr}}
@media (max-width:520px){.foot-grid{grid-template-columns:1fr}}
.foot-grid h2{
  font-family:var(--mono);font-size:.7rem;text-transform:uppercase;
  letter-spacing:.13em;color:var(--fg-3);margin:0 0 14px;font-weight:500;
}
.foot-grid ul{margin:0;padding:0;list-style:none}
.foot-grid li{margin-bottom:9px}
.foot-grid a{color:var(--fg-2);font-size:.89rem}
.foot-grid a:hover{color:var(--fg);text-decoration:none}
.foot-grid p{color:var(--fg-2);font-size:.89rem;margin:0 0 14px;max-width:34ch}
.legal{
  margin-top:44px;padding-top:24px;border-top:1px solid var(--line);
  font-family:var(--mono);font-size:.72rem;color:var(--fg-3);
  display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;
}
