/* Pricing, about, privacy and terms. Builds on home.css: its tokens, .box, .btn, .tabs and .explorer. */

.note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-400);
}

/* key-value rows */
.kv {
  margin: 0;
}
.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ink-800);
  font-size: 14px;
}
.kv > div:last-child {
  border-bottom: 0;
}
.kv dt {
  color: var(--ink-300);
}
.kv dd {
  margin: 0;
  color: var(--white);
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.yes::before {
  content: '✓';
  margin-right: 6px;
  color: var(--green-300);
}
.kv .no,
.kv .none {
  color: var(--ink-400);
  font-weight: 400;
}
.no::before {
  content: '×';
  margin-right: 6px;
}

/* ---------- pricing ---------- */
.p-hero {
  padding-bottom: 96px;
}
.plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: 24px;
}
.plan.is-rec {
  border-color: var(--blue-300);
}
.sq.grey {
  background: var(--ink-400);
}
.plan-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.plan-price {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-400);
}
.plan-price b {
  margin-right: 6px;
  font: 800 40px/1 var(--sans);
  letter-spacing: -0.04em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.plan-price .is-text {
  font-size: 26px;
  line-height: 40px;
  letter-spacing: -0.02em;
}
.plan-for {
  flex: 1;
  margin: 12px 0 16px;
  font-size: 14px;
  color: var(--ink-300);
}
.plan .kv {
  border-top: 1px solid var(--ink-800);
}
.plan .btn {
  justify-content: center;
  margin-top: 20px;
}

/* the comparison table */
/* clip, not hidden: the sticky head row must still stick to the page */
.cmp-box {
  overflow: clip;
}
.cmp-pick {
  display: none;
}
.cmp {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.cmp caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.cmp th,
.cmp td {
  padding: 11px 20px;
  border-bottom: 1px solid var(--ink-800);
  text-align: left;
  font-weight: 400;
}
.cmp thead th {
  position: sticky;
  top: 64px;
  z-index: 1;
  background: var(--ink-850);
  color: var(--white);
  font-weight: 600;
}
.cmp tbody th {
  width: 36%;
  color: var(--ink-300);
}
.cmp td {
  color: var(--white);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cmp td .no,
.cmp td .none {
  color: var(--ink-400);
}
.cmp [data-plan='promax'] {
  background: #011ef414;
}
.cmp thead [data-plan='promax'] {
  background: #0a1560;
}
.cmp .cmp-group th {
  padding: 0;
  background: var(--ink-800);
}
.cmp-group button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 20px;
  border: 0;
  background: none;
  font: 600 12px/1.4 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-200);
}
.js .cmp-group button::after {
  content: '';
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border-right: 2px solid var(--ink-300);
  border-bottom: 2px solid var(--ink-300);
  transform: rotate(225deg);
}
.js .cmp-group button[aria-expanded='false']::after {
  margin-top: -4px;
  transform: rotate(45deg);
}
.cmp tbody.is-closed tr:not(.cmp-group) {
  display: none;
}
.cmp tbody:last-child tr:last-child :is(th, td) {
  border-bottom: 0;
}

/* explorer: the parts home.css does not have */
.explorer .tabs .src {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 12px;
}
.eps li[hidden] {
  display: none;
}
.eps button span:first-child {
  overflow-wrap: anywhere;
}
.eps .tag.is-free {
  background: none;
  border: 1px solid var(--ink-700);
  color: var(--ink-400);
}
.eps .tag.verb {
  padding-inline: 0;
  background: none;
  color: var(--orange);
}
.ep-out pre .c {
  color: var(--ink-400);
}
.sdks {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 40px;
  align-items: start;
  margin-top: 48px;
}
.sdks p {
  margin-top: 8px;
  font-size: 15px;
}
.sdk-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
}
.copy-list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
}
.copy-list li {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--ink-800);
  font-size: 14px;
}
.copy-list li:last-child {
  border-bottom: 0;
}
.copy-list code {
  overflow: auto;
  white-space: nowrap;
  color: var(--white);
}

/* questions: an accordion beside its heading */
.qa-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 64px;
  align-items: start;
}
.qa-grid .lead {
  margin-top: 16px;
}
.qa details {
  border-top: 1px solid var(--ink-700);
}
.qa details:last-child {
  border-bottom: 1px solid var(--ink-700);
}
.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  list-style: none;
  cursor: pointer;
}
.qa summary::-webkit-details-marker {
  display: none;
}
.qa summary h3 {
  font-size: 18px;
  font-weight: 600;
}
.qa summary::after {
  content: '+';
  flex: none;
  font: 400 22px/1 var(--mono);
  color: var(--orange);
}
.qa details[open] summary::after {
  content: '−';
}
.qa-a {
  max-width: 62ch;
  padding-bottom: 20px;
  color: var(--ink-200);
}
.qa-a p + p {
  margin-top: 12px;
}
.qa-a code {
  color: var(--white);
}

/* ---------- about ---------- */
.a-head {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 64px;
  align-items: center;
}
.a-head .lead {
  margin-top: 24px;
}
.a-card {
  margin: 0;
  overflow: hidden;
}
.a-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 20px 20px 8px;
}
.a-card-top b {
  margin-right: 6px;
  font-size: 18px;
  color: var(--white);
}
.a-rows {
  margin: 0;
  padding: 8px 20px 16px;
  list-style: none;
}
.a-rows li {
  display: grid;
  grid-template-columns: 28px 92px 1fr 40px;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.a-rows b {
  color: var(--white);
  text-align: right;
}
.a-card .box-foot {
  font-family: var(--sans);
}
/* a single-colour brand icon, coloured by the text colour */
.bi {
  display: block;
  width: 58%;
  height: 58%;
  background: currentColor;
  -webkit-mask: var(--m) center / contain no-repeat;
  mask: var(--m) center / contain no-repeat;
}
.src-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 20px;
}
.src-head p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-300);
}
.kb-chip {
  display: inline-flex;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--ink-600);
  border-radius: var(--r-sm);
  background: var(--black);
  color: var(--white);
  font-size: 13px;
}
.kb-chip span {
  color: var(--orange);
}
.src-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.src-grid a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 20px;
  border-radius: var(--r-lg);
}
.src-grid a:hover {
  border-color: var(--ink-600);
}
.src-grid b {
  margin-top: 6px;
  font-size: 16px;
}
.src-grid small {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-300);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.why-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
  overflow: hidden;
}
.why-card:nth-child(n + 4) {
  grid-column: span 3;
}
.why-card:hover {
  border-color: var(--ink-600);
}
.why-art {
  display: grid;
  align-content: center;
  min-height: 150px;
  padding: 24px;
  border-top: 1px solid var(--ink-800);
  background: var(--ink-950);
  font-size: 14px;
}
.why-text {
  padding: 24px;
}
.why-text p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-300);
}
.why-term {
  display: grid;
  gap: 4px;
  font: 13px/1.6 var(--mono);
}
.why-term .u {
  color: var(--white);
}
.why-term .u::before {
  content: '› ';
  color: var(--orange);
}
.why-term .c {
  color: var(--blue-300);
}
.why-term .c::before {
  content: '→ ';
  color: var(--ink-400);
}
.why-term .o {
  color: var(--green-300);
}
.why-term .o::before {
  content: '✓ ';
}
.why-pair p:first-child {
  color: var(--white);
}
.why-pair p + p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.why-pair mark {
  padding: 0 2px;
  border-radius: 3px;
  background: #f9871540;
  color: var(--orange);
}
.why-pair em {
  margin-left: 6px;
  font-style: normal;
}
.why-scale {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 4px 10px;
}
.why-scale b {
  font: 800 32px/1 var(--sans);
  letter-spacing: -0.04em;
  color: var(--orange);
}
.why-bar {
  grid-column: 1 / -1;
  position: relative;
  height: 10px;
  margin: 8px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #e3000455, var(--ink-800) 40%, var(--ink-800) 60%, #f98715);
}
.why-bar i,
.why-bar u {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 18px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--orange);
}
.why-bar u {
  background: var(--ink-200);
}
.why-scale .q-lbl:last-child {
  grid-column: 1 / -1;
}
.why-db {
  display: grid;
  gap: 10px;
}
.why-q {
  padding: 9px 12px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-sm);
  color: var(--white);
  font: 13px var(--mono);
}
.why-res {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 8px;
}
.why-res b {
  color: var(--white);
}
.why-res em {
  font-style: normal;
  color: var(--ink-400);
}
.why-rank {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.why-rank li {
  display: grid;
  grid-template-columns: 12px 44px 1fr 36px;
  gap: 10px;
  align-items: center;
  font-variant-numeric: tabular-nums;
}
.why-rank b {
  color: var(--white);
}
.why-rank .meter i {
  background: linear-gradient(90deg, var(--orange), #f9871580);
}

/* the pipeline: four cards, lit one after the other */
.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.flow-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 24px;
}
.flow-step:not(:last-child)::after {
  content: '→';
  position: absolute;
  top: 22px;
  right: -14px;
  z-index: 1;
  width: 12px;
  text-align: center;
  color: var(--ink-400);
}
.flow-n {
  font: 500 12px/1 var(--mono);
  color: var(--orange);
}
.flow-step h3 {
  font-size: 20px;
}
.flow-step p {
  flex: 1;
  font-size: 14px;
  color: var(--ink-300);
}
.flow-eg {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--ink-800);
  font-size: 13px;
  color: var(--ink-200);
}
.flow-eg b {
  font-weight: 600;
  color: var(--white);
}
.flow-eg code {
  overflow-wrap: anywhere;
}
.flow-eg code b {
  font-weight: 500;
  color: var(--orange);
}
@media (prefers-reduced-motion: no-preference) {
  .flow-step {
    animation: flow-on 8s calc(var(--i) * 2s) infinite;
  }
}
@keyframes flow-on {
  0%,
  25%,
  100% {
    border-color: var(--ink-800);
  }
  4%,
  21% {
    border-color: var(--orange);
  }
}
.about-co {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 64px;
  align-items: start;
}
.about-letter .lead {
  color: var(--ink-200);
}
.about-letter p + p {
  margin-top: 20px;
}
.about-facts {
  padding: 28px;
}
.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
  font-size: 14px;
}

/* ---------- privacy and terms ---------- */
.doc {
  padding: 40px 0 112px;
  background: var(--dots);
}
.crumbs {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-400);
}
.crumbs a {
  color: var(--ink-300);
}
.crumbs a:hover {
  color: var(--white);
}
.doc-head {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ink-600);
}
.doc-head h1 {
  margin-top: 20px;
  font-size: clamp(32px, 5vw, 52px);
}
.doc-head .lead {
  margin-top: 16px;
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-400);
}
.doc-body {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  margin-top: 56px;
}
.doc-toc {
  position: sticky;
  top: 88px;
}
.toc summary {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink-700);
  list-style: none;
  font: 600 12px/1.4 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-200);
}
.toc summary::-webkit-details-marker {
  display: none;
}
.toc ol {
  margin: 0;
  padding: 8px 0 0;
  list-style: none;
}
.toc a {
  position: relative;
  display: block;
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-300);
  transition:
    color var(--dur),
    padding var(--dur) var(--ease);
}
.toc a:hover,
.toc a[aria-current] {
  color: var(--white);
}
.toc a[aria-current] {
  padding-left: 14px;
}
.toc a[aria-current]::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--orange);
}
.prose {
  max-width: 68ch;
  color: var(--ink-200);
}
.prose section + section {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--ink-800);
}
.prose h2 {
  margin-bottom: 16px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.prose h3 {
  margin: 32px 0 8px;
  font-size: 18px;
}
.prose .n {
  margin-right: 0.4em;
  color: var(--ink-400);
  font-variant-numeric: tabular-nums;
}
.prose :is(p, ul, ol, .table-scroll) + :is(p, ul, ol, .table-scroll) {
  margin-top: 16px;
}
.prose .table-scroll {
  overflow-x: auto;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.prose :is(th, td) {
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--ink-800);
  text-align: left;
  vertical-align: top;
}
.prose th {
  color: var(--white);
  font-weight: 600;
}
.prose ul,
.prose ol {
  margin: 0;
  padding-left: 20px;
}
.prose li + li {
  margin-top: 4px;
}
.prose strong {
  color: var(--white);
}
.prose a {
  text-decoration: underline;
  text-decoration-color: var(--ink-600);
  text-underline-offset: 3px;
}
.prose a:hover {
  text-decoration-color: currentColor;
}
.notice {
  padding: 20px 24px;
  border: 1px solid var(--orange);
  border-radius: var(--r-md);
  background: #f9871514;
}
.notice strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

/* ---------- small screens ---------- */
@media (max-width: 1024px) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .src-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flow-step::after {
    display: none;
  }
  .doc-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    margin-top: 40px;
  }
  .doc-toc {
    position: static;
  }
  .toc {
    border: 1px solid var(--ink-700);
    border-radius: var(--r-md);
    background: var(--ink-900);
  }
  .toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 0;
    cursor: pointer;
  }
  .toc summary::after {
    content: '';
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border-right: 2px solid var(--ink-300);
    border-bottom: 2px solid var(--ink-300);
    transform: rotate(45deg);
  }
  .toc[open] summary {
    border-bottom: 1px solid var(--ink-700);
  }
  .toc[open] summary::after {
    margin-top: 4px;
    transform: rotate(225deg);
  }
  .toc ol {
    padding: 8px 16px 12px;
  }
}
@media (max-width: 900px) {
  .sdks,
  .qa-grid,
  .a-head,
  .about-co {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .copy-list li {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .copy-list li span {
    grid-column: 1 / -1;
    color: var(--ink-300);
  }
  .why-card,
  .why-card:nth-child(n + 4) {
    grid-column: span 6;
  }
}
@media (max-width: 760px) {
  .plans,
  .src-grid,
  .flow {
    grid-template-columns: minmax(0, 1fr);
  }
  .cmp th,
  .cmp td {
    padding: 11px 16px;
  }
  .cmp thead th {
    position: static;
  }
  .cmp tbody th {
    width: auto;
  }
  /* With the script, a phone shows one plan at a time; without it the table scrolls sideways. */
  .cmp-box {
    overflow-x: auto;
  }
  .js .cmp-pick {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ink-800);
  }
  .js .cmp :is(td, thead th)[data-plan] {
    display: none;
  }
  .js .cmp[data-show='free'] [data-plan='free'],
  .js .cmp[data-show='hobby'] [data-plan='hobby'],
  .js .cmp[data-show='pro'] [data-plan='pro'],
  .js .cmp[data-show='promax'] [data-plan='promax'] {
    display: table-cell;
  }
}
