* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--scene), var(--bg); background-attachment: fixed;
  color: var(--text); font: 400 17px/1.6 var(--ui);
}
a { color: var(--primary); text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.brand { font-family: var(--brand, var(--ui)); display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
  font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.brand svg { width: 32px; height: 32px; flex: none; }
.top nav { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.top nav a:not(.btn) { color: var(--text-2); text-decoration: none; }
.top nav a:not(.btn):hover { color: var(--text); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 0 20px; border-radius: 999px; font: 500 15px/1 var(--ui); text-decoration: none;
  border: 1px solid var(--border); color: var(--text); background: var(--glass); }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--primary); border-color: transparent; color: var(--on-primary); }
.btn.primary:hover { filter: brightness(1.06); }

.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding: 56px 0 80px; }
.eyebrow { font: 500 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin: 0 0 18px; }
h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.05; letter-spacing: -.03em; font-weight: 600; margin: 0 0 20px; text-wrap: balance; }
.lede { font-size: 19px; color: var(--text-2); margin: 0 0 32px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.demo { background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 20px;
  box-shadow: var(--pop); }
.demo-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--primary-soft); color: var(--selected-text); font: 600 14px/1 var(--ui); }
.demo-head b { display: block; font-weight: 600; font-size: 15px; }
.demo-head span { font: 400 12px/1.3 var(--mono); color: var(--text-2); }
.bubbles { display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.4; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 18px; }
.bubble.in { align-self: flex-start; background: var(--bubble-in); color: var(--bubble-in-text); border-bottom-left-radius: 6px; }
.bubble.out { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 6px; }
.note { align-self: stretch; background: var(--note-bg); color: var(--note-text); border-radius: 12px; padding: 8px 12px; font-size: 13px; }
.meta { align-self: flex-end; font: 400 12px/1 var(--mono); color: var(--text-2); }

section { padding: 72px 0; border-top: 1px solid var(--border); }
h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; letter-spacing: -.02em; font-weight: 600; margin: 0 0 12px; text-wrap: balance; }
.sub { color: var(--text-2); margin: 0 0 40px; max-width: 40em; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.play-badge { display: inline-block; margin: 14px 0 0 -8px; line-height: 0; border-radius: 8px; }
.play-badge img { height: 64px; width: auto; display: block; }
.play-badge.small { margin-top: 14px; }
.play-badge.small img { height: 54px; }
.works-on { margin: 22px 0 0; font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.board { display: grid; gap: 10px; }
.board-band { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin-top: 6px; }
.board-rows { display: grid; gap: 8px; }
.board-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--glass); }
.board-row.ringing { background: var(--note-bg); }
.board-row .who { flex: 1; min-width: 0; font-size: 14px; }
.board-row .who b { display: block; font-weight: 600; }
.board-row .who span { font: 400 12px/1.3 var(--mono); color: var(--text-2); }
.board-row.ringing .who span { color: var(--note-text); }
.board-row .pill { font: 600 12px/1 var(--ui); padding: 8px 12px; border-radius: 999px; background: var(--primary); color: var(--on-primary); }
.board-row .lamp { width: 10px; height: 10px; border-radius: 50%; background: var(--missed); box-shadow: 0 0 0 4px color-mix(in srgb, var(--missed) 20%, transparent); }
.board-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { padding: 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--border); font-size: 14px; }
.tile b { display: block; font-weight: 600; }
.tile span { font: 400 12px/1.4 var(--mono); color: var(--text-2); }
.tile.on { background: var(--primary-soft); border-color: transparent; }
.tile.on span { color: var(--selected-text); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 24px; }
.card h3 { font-size: 18px; font-weight: 600; margin: 14px 0 8px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--text-2); font-size: 15px; }
.icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); }
.icon svg { width: 22px; height: 22px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.list li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--text-2); font-size: 16px; }
.list li::before { content: ""; width: 8px; height: 8px; margin: 9px 0 0 6px; border-radius: 50%; background: var(--primary); }
.list b { color: var(--text); font-weight: 600; }
h3.minor { font-size: 22px; line-height: 1.25; letter-spacing: -.01em; font-weight: 600; margin: 0 0 10px; text-wrap: balance; }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); gap: 20px; justify-content: center; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 32px; }
.plan.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--pop); }
.plan h3 { font-size: 24px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.plan-for { margin: 4px 0 20px; color: var(--text-2); font-size: 15px; }
.price { margin: 0 0 24px; display: flex; align-items: baseline; gap: 8px; }
.price .amount { font-size: 44px; font-weight: 600; letter-spacing: -.02em; }
.price .per { color: var(--text-2); font-size: 15px; }
.checks { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; flex: 1; }
.checks li { position: relative; padding-left: 28px; color: var(--text-2); font-size: 15px; line-height: 1.45; }
.checks li b { color: var(--text); font-weight: 600; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 14px; height: 8px; border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); }
.badge-pill { position: absolute; top: -13px; left: 32px; margin: 0; padding: 5px 12px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font: 600 12px/1 var(--ui); }
.fineprint { margin: 24px auto 0; max-width: 46em; text-align: center; color: var(--text-2); font-size: 13px; }
.cta { text-align: center; padding: 88px 0; }
.cta .sub { margin-inline: auto; }
.cta .actions { justify-content: center; }

footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--text-2); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--text-2); }

.doc { max-width: 720px; padding: 32px 0 72px; }
.doc h1 { font-size: clamp(34px, 5vw, 46px); }
.doc h2 { font-size: 24px; margin: 40px 0 10px; }
.doc p, .doc li { color: var(--text-2); }
.doc strong { color: var(--text); font-weight: 600; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .updated { font: 400 13px/1 var(--mono); color: var(--text-2); margin: 0 0 32px; }

/* Developer documentation (developers/): the privacy page's column, a
   little wider for tables and examples, with headings that can be linked
   to, code in the mono face that wraps rather than scroll, and tables
   that become cards in a narrow box rather than break the page. */
.doc.wide { max-width: 860px; }
.doc .lede { font-size: 18px; color: var(--text-2); margin: 0 0 28px; max-width: none; }
.doc h2 { scroll-margin-top: 24px; }
.doc h3 { font-size: 18px; font-weight: 600; margin: 28px 0 8px; letter-spacing: -.01em; scroll-margin-top: 24px; }
.doc code, .doc pre { font-family: var(--mono); font-size: 14px; }
.doc code { padding: 1px 5px; border-radius: 6px; background: var(--glass); color: var(--text); overflow-wrap: anywhere; }
.doc pre { margin: 12px 0 20px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); line-height: 1.5; tab-size: 2;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.doc pre code { padding: 0; background: none; font-size: 13.5px; }
.doc .toc { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 15px; }
.doc .toc li { margin: 0; }
.doc .toc a { text-decoration: none; }
.doc .toc a:hover { text-decoration: underline; }
.doc .table { margin: 12px 0 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--card);
  container: doc-table / inline-size; overflow-x: auto; scrollbar-width: none; }
.doc .table::-webkit-scrollbar { display: none; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.45; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.doc th { font-weight: 600; color: var(--text); background: var(--glass); white-space: nowrap; }
.doc td { color: var(--text-2); }
.doc tr:last-child td { border-bottom: 0; }
.doc td code, .doc th code { white-space: nowrap; }
/* A table in a box too narrow for its columns becomes a list of cards,
   one a row: the row's first cell as its title, the rest under it, each
   with its column's name (data-label) above it. Decided by the box's own
   width, so nothing in the docs scrolls sideways. */
@container doc-table (max-width: 600px) {
  .doc .table table, .doc .table tbody, .doc .table tr, .doc .table th, .doc .table td { display: block; width: 100%; }
  .doc .table thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .doc .table tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .doc .table tr:last-child { border-bottom: 0; }
  .doc .table th, .doc .table td { padding: 0; border: 0; background: none; white-space: normal; }
  .doc .table tr > :first-child { color: var(--text); font-weight: 600; margin-bottom: 4px; }
  .doc .table tr > :not(:first-child) { margin-top: 6px; }
  .doc .table td[data-label]:not(:first-child)::before { content: attr(data-label); display: block;
    font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin-bottom: 2px; }
  .doc .table td code, .doc .table th code { white-space: normal; }
}
.doc .callout { margin: 16px 0; padding: 12px 16px; border-radius: 14px; background: var(--note-bg); color: var(--note-text); font-size: 15px; }
.doc .callout p { margin: 0; color: inherit; }
.doc .callout strong { color: inherit; }
.doc dl { margin: 0 0 16px; }
.doc dt { font-weight: 600; color: var(--text); margin-top: 10px; }
.doc dd { margin: 2px 0 0; color: var(--text-2); }
.doc .steps { counter-reset: step; list-style: none; padding: 0; }
.doc .steps li { position: relative; padding-left: 40px; margin: 10px 0; }
.doc .steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 2px;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--selected-text); font: 600 13px/1 var(--ui); }

@media (max-width: 1040px) and (min-width: 861px) {
  .grid.four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero, .split { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 24px; }
  .grid, .grid.four, .plans { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
}
@media (max-width: 480px) {
  .top nav a.hide-sm { display: none; }
  .actions .btn { flex: 1 1 auto; }
}
.doc img.shot { display: block; max-width: 100%; height: auto; margin: 12px 0 8px;
  border-radius: 12px; border: 1px solid var(--line, rgba(127,127,127,.3)); }
.doc blockquote { margin: 12px 0; padding: 12px 16px; border-left: 3px solid var(--accent, #1f8a5b);
  background: rgba(127,127,127,.08); border-radius: 8px; }

/* Code blocks on the developer pages: a Copy button in the corner
   (copy.js adds it; without script the code is plain text to select),
   and a small label naming the language above a block that has one. */
.doc pre { position: relative; }
.doc pre.has-copy { padding-right: 56px; }
.doc .copy { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 12px; cursor: pointer;
  background: transparent; color: var(--text-2); transition: background-color .15s, color .15s; }
.doc .copy:hover { background: var(--hover); color: var(--text); }
.doc .copy:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.doc .copy.done { color: var(--primary); }
.doc .copy svg { width: 20px; height: 20px; fill: currentColor; }
.doc .code-label { margin: 16px 0 -6px; font: 500 12px/1.4 var(--mono); letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-2); }
.doc .eyebrow a { color: inherit; text-decoration: none; }
.doc .eyebrow a:hover { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The developers index: one card a guide. */
.doc .guides { list-style: none; padding: 0; margin: 16px 0 8px; display: grid; gap: 12px; }
.doc .guides li { margin: 0; }
.doc .guides a { display: block; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--border);
  background: var(--card); text-decoration: none; color: var(--text); transition: border-color .15s; }
.doc .guides a:hover { border-color: var(--primary); }
.doc .guides b { display: block; font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.doc .guides span { display: block; margin-top: 4px; color: var(--text-2); font-size: 15px; }
/* The Messaging API page's tables hold long URLs and paths: their code
   wraps rather than run past the box. */
.doc .table.urls td code { white-space: normal; }
.doc .table.urls td:first-child code { white-space: nowrap; overflow-wrap: normal; }

/* The opt-in form at the top of /sms: a code texted, entered here (optin.js). */
.doc .optin-form { margin: 0 0 32px; padding: 20px; border: 1px solid var(--border); border-radius: 18px;
  background: var(--card); min-width: 0; }
.doc .optin-form h2 { margin: 0 0 14px; }
.doc .optin-form .field { display: grid; gap: 6px; margin: 0 0 6px; }
.doc .optin-form .field span { font-weight: 500; font-size: 14px; color: var(--text); }
.doc .optin-form input[type=tel] { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: 400 16px var(--ui); width: 100%; }
.doc .optin-form .check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0;
  cursor: pointer; color: var(--text); font-size: 15px; line-height: 1.45; }
.doc .optin-form .check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.doc .optin-form .check span { min-width: 0; overflow-wrap: anywhere; }
.doc .optin-form input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.doc .optin-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.doc .optin-links a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.doc .optin-note { font-size: 14px; margin: 4px 0 14px; }
.doc .optin-note a { display: inline-flex; align-items: center; min-height: 44px; }
.doc .optin-form .btn { width: 100%; }
.doc .optin-form > .optin-note:last-child { margin-bottom: 0; }
/* Its code step and its answers (optin.js). */
.doc .optin-form input[type=text] { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: 500 18px var(--mono); letter-spacing: .2em; width: 100%; }
.doc .optin-form #sms-optin-code .btn + .btn { margin-top: 10px; }
.doc .optin-form .btn:disabled { opacity: .6; cursor: default; }
.doc .optin-done, .doc .optin-error { margin: 4px 0 14px; padding: 12px 16px; border-radius: 12px; font-size: 15px; color: var(--text); }
.doc .optin-done { background: var(--primary-soft); color: var(--selected-text); }
.doc .optin-error { background: rgba(127,127,127,.08); border-left: 3px solid var(--missed, #d64545); }
.doc .optin-form [hidden] { display: none; }
