/* Selvage Labs */
:root {
  color-scheme: dark;
  --ground: #07090f; --surface: #0d1220; --hair: rgba(255,255,255,0.07); --hair-2: rgba(255,255,255,0.12);
  --ink: #eef2fb; --ink-2: #9aa6bf; --ink-3: #7f8ba5;
  --teal: #37d6c6; --violet: #9a8bf5; --navy: #0b1020;
  --warn: #f2b84b; --crit: #ff7a7a; --none: rgba(255,255,255,0.10);
  --grad: linear-gradient(120deg, var(--teal), var(--violet));
  --display: "Sora", "Manrope", system-ui, sans-serif; --text: "Manrope", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); }
body { font-family: var(--text); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
p { margin: 0; }
code, pre { font-family: var(--mono); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--ground); padding: 8px 14px; border-radius: 8px; z-index: 30; }
.skip:focus { left: 16px; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }

/* header */
.site-head { border-bottom: 1px solid var(--hair); position: relative; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: calc(16px + env(safe-area-inset-top, 0px)) 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
.nav { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.nav a, .menu-nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover, .nav a[aria-current="page"], .menu-nav a[aria-current="page"] { color: var(--ink); }
.nav .btn, .menu-nav .btn { color: var(--ink); }
.ext::after { content: " ↗"; font-size: 12px; color: var(--ink-3); }
.menu { display: none; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; position: absolute; left: 0; right: 0; top: 100%; background: var(--ground); border-bottom: 1px solid var(--hair); padding: 18px 20px 22px; z-index: 10; font-size: 16px; }

/* buttons and small parts */
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 14px; border-radius: 999px; padding: 10px 18px; border: 1px solid var(--hair-2); color: var(--ink); background: transparent; cursor: pointer; font-family: var(--text); }
.btn:hover { border-color: rgba(255,255,255,0.24); }
.btn.primary { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.btn.primary:hover { background: #fff; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex-shrink: 0; }
.dot.up { background: var(--teal); box-shadow: 0 0 0 4px rgba(55,214,198,0.15); }
.dot.down { background: var(--crit); box-shadow: 0 0 0 4px rgba(255,122,122,0.15); }
.dot.unknown { background: var(--warn); box-shadow: 0 0 0 4px rgba(242,184,75,0.15); }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); border: 1px solid var(--hair); border-radius: 999px; padding: 5px 12px 5px 10px; background: rgba(255,255,255,0.02); }
.pill.plain { padding-left: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* hero */
.hero { position: relative; padding-block: 88px 56px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 520px; background: radial-gradient(closest-side at 30% 60%, rgba(55,214,198,0.10), transparent 70%), radial-gradient(closest-side at 70% 40%, rgba(154,139,245,0.10), transparent 70%); pointer-events: none; }
.hero .wrap { position: relative; display: flex; flex-direction: column; gap: 26px; }
.hero .pill { align-self: flex-start; }
.hero h1 { font-weight: 300; font-size: clamp(38px, 6.2vw, 68px); line-height: 1.04; letter-spacing: -0.035em; max-width: 14ch; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(17px, 2vw, 19px); color: var(--ink-2); max-width: 56ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* live strip */
.live { background: var(--surface); border: 1px solid var(--hair); border-radius: 22px; padding: 22px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px 32px; align-items: center; }
.live > div { min-width: 0; }
.live .label { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.endpoint { display: flex; align-items: center; gap: 10px; background: var(--ground); border: 1px solid var(--hair); border-radius: 12px; padding: 10px 10px 10px 14px; min-width: 0; }
.endpoint code { font-size: 14.5px; color: var(--ink); overflow-x: auto; white-space: nowrap; flex: 1; min-width: 0; }
.endpoint .kind { font-size: 12px; color: var(--ink-3); width: 76px; flex-shrink: 0; }
.copy { font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-2); background: rgba(255,255,255,0.05); border: 1px solid var(--hair); border-radius: 8px; padding: 6px 10px; cursor: pointer; flex-shrink: 0; }
.copy:hover { color: var(--ink); }
.livestat { display: flex; flex-direction: column; gap: 10px; }
.livestat .row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.state { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 18px; }
.figure { font-family: var(--display); font-weight: 300; font-size: 26px; font-variant-numeric: tabular-nums; }
.figure small { font-family: var(--text); font-size: 12px; color: var(--ink-3); margin-left: 6px; }
.bars { display: grid; grid-template-columns: repeat(90, 1fr); gap: 2px; height: 26px; }
.bars span { border-radius: 2px; background: var(--none); }
.bars .ok { background: var(--teal); } .bars .warn { background: var(--warn); } .bars .crit { background: var(--crit); }
.fine { font-size: 12px; color: var(--ink-3); }
.fine a { color: var(--ink-2); }

/* sections */
section.block { padding-block: 64px; border-top: 1px solid var(--hair); }
.sec-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; max-width: 60ch; }
.sec-head h2 { font-weight: 400; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.02em; line-height: 1.15; }
.sec-head p { color: var(--ink-2); }
.sec-head h1 { font-weight: 300; font-size: clamp(32px, 4.6vw, 46px); letter-spacing: -0.03em; line-height: 1.08; }
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: 22px; overflow: hidden; }
.point { background: var(--ground); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.point h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.point p { color: var(--ink-2); font-size: 15px; }
.point .proof { font-size: 13px; color: var(--ink-3); margin-top: auto; padding-top: 8px; }
.point .proof a { color: var(--teal); text-decoration: none; }

.network { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 24px; align-items: center; background: var(--surface); border: 1px solid var(--hair); border-radius: 18px; padding: 20px 22px; text-decoration: none; }
.network:hover { border-color: var(--hair-2); }
.chainmark { width: 42px; height: 42px; border-radius: 12px; background: var(--navy); border: 1px solid var(--hair); display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.network h3 { font-size: 17px; font-weight: 600; }
.network .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.network .go { color: var(--ink-2); font-size: 14px; }
.later { margin-top: 14px; font-size: 14px; color: var(--ink-3); }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plan { background: var(--surface); border: 1px solid var(--hair); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.plan .tag { font-size: 12px; color: var(--ink-3); }
.plan h2, .plan h3 { font-size: 19px; font-weight: 600; }
.plan .price { font-family: var(--display); font-weight: 300; font-size: 22px; }
.plan p { color: var(--ink-2); font-size: 14.5px; }
.plan ul { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }
.plan li::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); margin-right: 10px; vertical-align: middle; }
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan.free { border-color: rgba(55,214,198,0.28); }
.plan.free .tag { color: var(--teal); }
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.notes div { border-top: 1px solid var(--hair); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.notes h2 { font-size: 15px; font-weight: 600; }
.notes p { color: var(--ink-2); font-size: 14.5px; }

/* footer */
.foot { border-top: 1px solid var(--hair); padding-block: 40px calc(56px + env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--ink-3); margin-top: 32px; }
.foot .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 28px; }
.foot-brand p { margin-top: 12px; max-width: 34ch; }
.foot h2 { margin: 0 0 10px; font-family: var(--text); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.foot a { text-decoration: none; color: var(--ink-2); overflow-wrap: anywhere; }
.foot a:hover { color: var(--ink); }
.foot .legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; border-top: 1px solid var(--hair); padding-top: 20px; }

/* text pages: docs, about, contact, legal */
.page { padding-block: 56px 40px; }
.docs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; padding-block: 48px 40px; }
.toc { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.toc .eyebrow { margin-bottom: 8px; }
.toc a { text-decoration: none; color: var(--ink-3); padding: 4px 0 4px 12px; border-left: 1px solid var(--hair); }
.toc a:hover { color: var(--ink); border-left-color: var(--teal); }
.article { max-width: 720px; min-width: 0; display: flex; flex-direction: column; gap: 44px; }
.article > section { min-width: 0; scroll-margin-top: 24px; }
.crumbs { font-size: 13px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.title-row { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.title-row h1 { font-weight: 300; font-size: clamp(32px, 4.6vw, 46px); letter-spacing: -0.03em; line-height: 1.08; }
.title-row .sub { color: var(--ink-2); font-size: 17px; max-width: 58ch; }
.article h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 14px; }
.article h3 { font-size: 16px; font-weight: 600; margin: 18px 0 8px; }
.article p, .article li { color: var(--ink-2); max-width: 65ch; }
.article p + p { margin-top: 10px; }
.article section > :not(h2) + :not(p), .article section > :not(p) + p { margin-top: 14px; }
.article ul, .article ol { margin: 10px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.article strong { color: var(--ink); font-weight: 600; }
.article a { color: var(--ink); text-decoration-color: rgba(55,214,198,0.6); text-underline-offset: 3px; }
.article p code, .article li code, .article td code { font-size: 13.5px; color: var(--ink); background: rgba(255,255,255,0.05); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.urls { display: flex; flex-direction: column; gap: 10px; }
.tabs { background: var(--surface); border: 1px solid var(--hair); border-radius: 16px; overflow: hidden; }
.tablist { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--hair); overflow-x: auto; }
.tablist button { font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-3); background: transparent; border: 0; border-radius: 8px; padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.tablist button[aria-selected="true"] { color: var(--ink); background: rgba(255,255,255,0.06); }
.panel { position: relative; }
.panel + .panel { border-top: 1px solid var(--hair); }
.panel-title { font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 14px 20px 0; }
.tabs.ready .panel-title { display: none; }
.tabs.ready .panel + .panel { border-top: 0; }
.panel pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: 13.5px; line-height: 1.65; color: #d7deee; }
.panel .copy { position: absolute; top: 10px; right: 10px; }
.c-k { color: var(--violet); } .c-s { color: var(--teal); } .c-c { color: var(--ink-3); }
.out { border-top: 1px solid var(--hair); padding: 12px 20px; font-size: 13px; color: var(--ink-3); font-family: var(--mono); overflow-x: auto; white-space: nowrap; }
.out b { color: var(--teal); font-weight: 400; }
.tablewrap { overflow-x: auto; border: 1px solid var(--hair); border-radius: 14px; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 12px 16px; border-top: 1px solid var(--hair); vertical-align: top; }
thead th { border-top: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); background: rgba(255,255,255,0.02); }
td { color: var(--ink-2); }
td.v { color: var(--ink); }
.callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); border: 1px solid var(--hair); border-radius: 18px; padding: 22px; }
.callout h2, .callout h3 { font-size: 17px; font-weight: 600; margin: 0; }
.callout p { font-size: 14.5px; margin-top: 4px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; }
.facts div { background: var(--ground); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facts span { font-size: 12px; color: var(--ink-3); }
.facts b { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.mail { font-family: var(--display); font-size: clamp(20px, 3vw, 26px); font-weight: 400; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.legal-doc { max-width: 720px; display: flex; flex-direction: column; gap: 28px; }
.legal-doc section { display: flex; flex-direction: column; gap: 6px; }
.legal-doc h2 { font-size: 17px; margin-bottom: 0; }
.updated { font-size: 13px; color: var(--ink-3); }
.notfound { padding-block: 96px 64px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.notfound h1 { font-weight: 300; font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.03em; }
.notfound p { color: var(--ink-2); }

/* narrow */
@media (max-width: 860px) {
  .live, .plans, .notes { grid-template-columns: minmax(0, 1fr); }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 32px; }
  .toc { display: none; }
  .foot .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot .wrap > .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .menu { display: block; }
  .wrap { padding-inline: 16px; }
  .hero { padding-block: 56px 40px; }
  .points, .facts { grid-template-columns: minmax(0, 1fr); }
  .point { padding: 22px; }
  .network { grid-template-columns: auto minmax(0, 1fr); }
  .network .go { grid-column: 1 / -1; }
  .bars { gap: 1px; }
  .live { padding: 18px; border-radius: 18px; }
  .endpoint code { font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
  .endpoint .kind { width: auto; }
  .figure { font-size: 22px; }
  .panel pre { padding-top: 48px; }
  section.block { padding-block: 48px; }
  .page { padding-top: 36px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
