/**
 * Marketing and docs pages: layout, section headings, email sign-up, footer, prose.
 */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (max-width: 600px) { :root { --gutter: 16px; } }

/* ============ Section headings ============ */
.section { padding-block: var(--section-y) 0; }
.section__head { max-width: 680px; margin-bottom: var(--head-gap); }
.section__head--row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-24);
  flex-wrap: wrap;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 var(--s-16);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border: 1px solid currentColor;
  border-radius: 1px;
  transform: rotate(45deg);
}
.section__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.section__sub {
  margin: var(--s-16) 0 0;
  font-size: var(--fs-lede);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

/* ============ Pill ============ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
  height: 32px;
  padding: 0 var(--s-12) 0 var(--s-4);
  border-radius: 99px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: var(--fs-xs);
  color: var(--muted);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s, color 0.25s, transform 0.35s var(--ease-out);
}
.pill:hover { border-color: var(--line-strong); color: var(--ink); transform: translateY(-1px); }
.pill__tag {
  height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--s-8);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  color: var(--on-accent);
  background: var(--accent);
}
.pill svg { width: 16px; height: 16px; transition: transform 0.35s var(--ease-spring); }
.pill:hover svg { transform: translateX(3px); }
@media (max-width: 520px) { .pill__text { max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }

/* ============ Email sign-up ============ */
.subscribe {
  position: relative;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 460px;
}
.subscribe__input {
  flex: 1 1 200px;
  min-width: 0;
  height: 48px;
  padding: 0 var(--s-16);
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: var(--fs-body);
  outline: 0;
  transition: border-color 0.2s, box-shadow 0.3s var(--ease-out);
}
.subscribe__input::placeholder { color: var(--faint); }
.subscribe__input:hover { border-color: var(--line-strong); }
.subscribe__input:focus { border-color: var(--line-strong); box-shadow: 0 0 0 4px var(--accent-soft); }
.subscribe__input[aria-invalid='true'] { border-color: var(--danger); }
.subscribe__btn { height: 48px; padding: 0 var(--s-24); border-radius: 12px; font-size: var(--fs-body); }
.subscribe__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.subscribe__msg {
  flex-basis: 100%;
  min-height: 20px;
  margin: var(--s-4) 0 0;
  font-size: var(--fs-xs);
  color: var(--muted);
}
.subscribe__msg[data-kind='error'] { color: var(--danger); }
.subscribe__msg[data-kind='success'] { color: var(--ink); }
.subscribe__msg[data-kind='success']::before { content: '✓  '; font-weight: 600; }

.subscribe--compact .subscribe__input { height: 40px; font-size: var(--fs-sm); border-radius: 10px; }
.subscribe--compact .subscribe__btn { height: 40px; font-size: var(--fs-sm); padding: 0 var(--s-16); border-radius: 10px; }

/* on a dark (inverted) panel */
.subscribe--inverse .subscribe__input {
  color: var(--bg);
  background: color-mix(in srgb, var(--bg) 8%, transparent);
  border-color: color-mix(in srgb, var(--bg) 22%, transparent);
}
.subscribe--inverse .subscribe__input::placeholder { color: color-mix(in srgb, var(--bg) 45%, transparent); }
.subscribe--inverse .subscribe__input:focus { border-color: color-mix(in srgb, var(--bg) 50%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bg) 12%, transparent); }
.subscribe--inverse .subscribe__btn { color: var(--ink); background: var(--bg); box-shadow: none; }
.subscribe--inverse .subscribe__msg { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.subscribe--inverse .subscribe__msg[data-kind='success'] { color: var(--bg); }
.subscribe--inverse .subscribe__msg[data-kind='error'] { color: #fca5a5; }

/* ============ Footer ============ */
/* A framed grid: full-width rules, the container's edges as vertical rules, and a
   small cross wherever two rules meet. */
.footer { margin-top: var(--section-y); border-top: 1px solid var(--line); }
.footer__main { border-bottom: 1px solid var(--line); }
.footer__frame {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.3fr;
  grid-template-rows: auto auto;
  border-inline: 1px solid var(--line);
}
.footer__cell { position: relative; min-width: 0; }

.tick {
  position: absolute;
  z-index: 1;
  width: 11px; height: 11px;
  margin: -5px 0 0 -5px; /* the cross's 1px lines land on the pixel at left/top */
  background:
    linear-gradient(var(--faint), var(--faint)) center / 1px 100% no-repeat,
    linear-gradient(var(--faint), var(--faint)) center / 100% 1px no-repeat;
  pointer-events: none;
}
/* each rule is a 1px border; positions count from inside a cell's own border */
.tick--tl, .tick--tr { top: -1px; }
.tick--bl, .tick--br { top: 100%; }
.tick--tl, .tick--bl { left: -1px; }
.tick--tr, .tick--br { left: 100%; }

/* sign-up */
.footer__news { grid-column: 1; grid-row: 1; display: flex; align-items: center; padding: var(--s-64) var(--s-40); border-bottom: 1px solid var(--line); }
.fsub { position: relative; display: grid; gap: var(--s-16); width: 100%; max-width: 480px; }
.fsub__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.fsub__text { margin: calc(var(--s-8) - var(--s-16)) 0 var(--s-8); max-width: 40ch; font-size: var(--fs-sm); line-height: 20px; color: var(--muted); }
.fsub__field {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  height: 56px;
  padding: var(--s-4) var(--s-4) var(--s-4) var(--s-16);
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.3s var(--ease-out);
}
.fsub__field:hover { border-color: var(--faint); }
.fsub__field:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.fsub__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  font-size: var(--fs-sm);
  color: var(--ink);
}
.fsub__input::placeholder { color: var(--faint); }
.fsub__input[aria-invalid='true'] { color: var(--danger); }
.fsub__btn {
  flex: none;
  width: 48px; height: 48px;
  padding: 0;
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-3);
  transition: background 0.2s, color 0.2s;
}
.fsub__btn:hover { color: var(--on-accent); background: var(--accent); }
.fsub__btn svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease-out), opacity 0.2s; }
.fsub__btn:hover svg { transform: translateX(2px); }
.fsub .subscribe__msg { margin: 0; }

/* the grid note */
.footer__note {
  grid-column: 1; grid-row: 2;
  display: flex;
  align-items: center;
  gap: var(--s-24);
  padding: var(--s-32) var(--s-40);
}
.footer__note b { display: block; font-size: var(--fs-sm); font-weight: 500; line-height: 20px; color: var(--ink); }
.footer__note small { display: block; margin-top: var(--s-4); font-family: var(--font-mono); font-size: var(--fs-micro); line-height: 16px; color: var(--muted); }
.footer__note-glyph { flex: none; width: 48px; height: 32px; color: var(--ink); }

/* Product Hunt call to action, in the note cell */
.footer__ph { color: inherit; text-decoration: none; transition: background 0.2s; }
.footer__ph:hover { background: var(--surface-2); }
.footer__ph .ph__copy { flex: 1; min-width: 0; }
.footer__ph b { font-size: var(--fs-body); font-weight: 600; letter-spacing: -0.01em; }
.footer__ph small { font-family: var(--font-body); font-size: var(--fs-xs); line-height: 18px; }
.ph__vote {
  flex: none;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  width: 56px; height: 56px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--brand);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.ph__vote svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease-spring); }
.ph__vote span { font-size: 11px; font-weight: 600; line-height: 12px; color: var(--ink-2); transition: color 0.2s; }
.footer__ph:hover .ph__vote { background: var(--brand); border-color: var(--brand); color: #fff; }
.footer__ph:hover .ph__vote span { color: #fff; }
.footer__ph:hover .ph__vote svg { transform: translateY(-2px); }
.ph__arrow { flex: none; width: 16px; height: 16px; color: var(--muted); transition: transform 0.3s var(--ease-out), color 0.2s; }
.footer__ph:hover .ph__arrow { color: var(--ink); transform: translate(2px, -2px); }
.footer__ph:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* the stone emblem */
.footer__emblem {
  grid-column: 2; grid-row: 1 / 3;
  display: grid;
  place-items: center;
  padding: var(--s-48) var(--s-32);
  border-inline: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  perspective: 800px;
}
/* the grid the glass sits on */
.footer__emblem::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent);
  mask-image: radial-gradient(closest-side, #000 30%, transparent);
}
.emblem {
  width: 224px;
  max-width: 100%;
  overflow: visible;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease-out);
}
.emblem__shadow { fill: #000; opacity: 0.6; transform: translate(14px, 28px); }
[data-theme='light'] .emblem__shadow { opacity: 0.22; }
.emblem__side { fill: #7a2608; transform: translate(8px, 12px); }
.emblem__face { fill: url(#fe-face); }
.emblem__cracks { fill: none; stroke: #3a1004; stroke-opacity: 0.6; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .emblem { transform: none; } }

/* links */
.footer__links {
  grid-column: 3; grid-row: 1 / 3;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  align-content: center;
  column-gap: var(--s-80);
  padding: var(--s-64);
}
.footer__links h2 { margin: 0 0 var(--s-16); font-size: var(--fs-xs); font-weight: 500; line-height: 20px; color: var(--muted); }
.footer__links ul { display: grid; gap: var(--s-12); align-content: start; margin: 0; padding: 0; list-style: none; }
.footer__links a {
  display: inline-block;
  font-size: var(--fs-h4);
  font-weight: 500;
  line-height: 28px;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s, transform 0.3s var(--ease-out);
}
.footer__links a:hover { color: var(--ink); transform: translateX(4px); }
.footer__contact { grid-column: 1 / -1; margin-top: var(--s-40); }
.footer__contact a { font-size: var(--fs-body); line-height: 24px; overflow-wrap: anywhere; }

/* bottom bar: the container's rules carry on down */
.footer__base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-16);
  flex-wrap: wrap;
  padding-block: var(--s-32);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.footer__base a { color: inherit; text-decoration: none; transition: color 0.2s; }
.footer__base a:hover { color: var(--ink); }
.footer__base { position: relative; }
.footer__base::before, .footer__base::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--line);
}
.footer__base::before { left: var(--gutter); }
.footer__base::after { right: var(--gutter); }
.footer__base > * { padding-inline: var(--s-40); }
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--s-8) var(--s-24); }

@media (max-width: 1080px) {
  .footer__frame { grid-template-columns: 1fr 1fr; }
  .footer__news { grid-column: 1; grid-row: 1; }
  .footer__note { grid-column: 1; grid-row: 2; }
  .footer__emblem { grid-column: 2; grid-row: 1 / 3; border-right: 0; }
  .footer__links { grid-column: 1 / -1; grid-row: 3; border-top: 1px solid var(--line); padding: var(--s-48) var(--s-40); }
  .tick { display: none; }
}
@media (max-width: 680px) {
  .footer__frame { grid-template-columns: 1fr; }
  .footer__emblem { grid-column: 1; grid-row: 1; border: 0; border-bottom: 1px solid var(--line); padding: var(--s-48) var(--s-24); }
  .emblem { width: 176px; }
  .footer__news { grid-row: 2; padding: var(--s-40) var(--s-24); }
  .footer__links { grid-row: 3; column-gap: var(--s-48); padding: var(--s-40) var(--s-24); border-top: 0; border-bottom: 1px solid var(--line); }
  .footer__note { grid-row: 4; padding: var(--s-24); gap: var(--s-16); }
  .footer__base > * { padding-inline: var(--s-24); }
}

/* ============ Page header (docs, pricing) ============ */
.page-head {
  position: relative;
  padding-block: clamp(64px, 8vw, 96px) var(--s-48);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-head::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center -1px;
  mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000 10%, transparent 75%);
  opacity: 0.7;
  pointer-events: none;
}
.page-head > * { position: relative; }
.page-head__title {
  margin: 0;
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-wrap: balance;
}
.page-head__sub { margin: var(--s-24) 0 0; max-width: 624px; font-size: var(--fs-lede); line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.page-head--center { text-align: center; }
.page-head--center .page-head__sub { margin-inline: auto; }

/* ============ Docs layout & prose ============ */
.docs {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--s-64);
  padding-top: var(--s-48);
}
.toc {
  position: sticky;
  top: calc(var(--nav-h) + var(--s-32));
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 0;
  margin: 0;
  list-style: none;
}
.toc p { margin: 0 0 var(--s-12); font-size: var(--fs-micro); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--faint); }
.toc a {
  display: block;
  padding: var(--s-4) 0 var(--s-4) var(--s-16);
  border-left: 1px solid var(--line);
  font-size: var(--fs-sm);
  line-height: 24px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-color: var(--ink); }
@media (max-width: 860px) {
  .docs { grid-template-columns: 1fr; gap: 0; padding-top: var(--s-32); }
  .toc { display: none; }
}

.prose { max-width: 720px; font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.prose h2 {
  margin: var(--s-64) 0 var(--s-16);
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.2;
  color: var(--ink);
  scroll-margin-top: calc(var(--nav-h) + var(--s-32));
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: var(--s-32) 0 var(--s-8); font-size: var(--fs-h4); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.prose p { margin: 0 0 var(--s-16); }
.prose ul, .prose ol { margin: 0 0 var(--s-16); padding-left: var(--s-24); }
.prose li { margin-bottom: var(--s-8); }
.prose li::marker { color: var(--faint); }
.prose a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code, .code-inline {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 2px 4px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.prose pre {
  margin: 0 0 var(--s-24);
  padding: var(--s-16);
  overflow-x: auto;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
}
.prose pre code { padding: 0; border: 0; background: none; font-size: inherit; }
.prose table { width: 100%; margin: 0 0 var(--s-24); border-collapse: collapse; font-size: var(--fs-sm); }
.prose th, .prose td { padding: var(--s-12); text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 500; color: var(--muted); font-size: var(--fs-xs); }
.callout {
  display: flex;
  gap: var(--s-12);
  margin: 0 0 var(--s-24);
  padding: var(--s-16);
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: var(--fs-sm);
}
.callout svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.callout p { margin: 0; }

/* ============ Updates (email) ============ */
.updates {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: var(--s-48);
  padding: clamp(32px, 5vw, 64px);
  border-radius: 24px;
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
  isolation: isolate;
}
.updates__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(color-mix(in srgb, var(--bg) 9%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 9%, transparent) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 60% 90% at 100% 0%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 90% at 100% 0%, #000, transparent 70%);
}
.eyebrow--inverse { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.updates__title {
  margin: 0;
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.updates__sub { margin: var(--s-16) 0 var(--s-32); max-width: 480px; font-size: var(--fs-lede); line-height: 1.6; color: color-mix(in srgb, var(--bg) 65%, transparent); }
.updates__list {
  align-self: center;
  display: grid;
  gap: var(--s-12);
  margin: 0;
  padding: 0;
  list-style: none;
}
.updates__list li {
  display: flex;
  gap: var(--s-16);
  align-items: center;
  padding: var(--s-16);
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--bg) 14%, transparent);
  background: color-mix(in srgb, var(--bg) 4%, transparent);
}
.updates__list b { display: block; font-size: var(--fs-body); font-weight: 500; }
.updates__list span { font-size: var(--fs-xs); color: color-mix(in srgb, var(--bg) 60%, transparent); }
.updates__ico {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: grid !important;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 10%, transparent);
  color: var(--bg) !important;
}
.updates__ico svg { width: 20px; height: 20px; }
.updates.is-pulse { animation: pulse 1s var(--ease-out); }
@keyframes pulse { 30% { box-shadow: 0 0 0 6px var(--accent-soft); } }
@media (max-width: 860px) { .updates { grid-template-columns: 1fr; gap: var(--s-32); } }


/* ============ Docs extras ============ */
.docs-cta {
  display: grid;
  gap: var(--s-16);
  margin-top: var(--s-64);
  padding: var(--s-24);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.docs-cta h3 { margin: 0; }
.docs-cta p { margin: var(--s-4) 0 0; color: var(--muted); font-size: var(--fs-sm); }

.license-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-16); margin-bottom: var(--s-24); }
.license-card { padding: var(--s-24); border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.license-card h3 { margin: 0 0 var(--s-16); font-size: var(--fs-body); }
.license-card { display: grid; gap: var(--s-12); align-content: start; }
.license-card h3 { margin: 0 0 var(--s-4); }
.license-card--featured { border-color: var(--ink); }
.license-card ul { margin: 0; }
.license-card__plan { display: flex; align-items: center; gap: var(--s-8); margin: 0; font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.license-card__plan span { padding: 0 var(--s-8); border-radius: 99px; line-height: 20px; letter-spacing: 0; text-transform: none; border: 1px solid var(--line); }
.license-note { margin-top: 0; font-size: var(--fs-sm); color: var(--muted); }
@media (max-width: 640px) { .license-grid { grid-template-columns: 1fr; } }

.checks, .crosses { margin: 0; padding: 0 !important; list-style: none; display: grid; gap: var(--s-12); font-size: var(--fs-sm); }
.checks li, .crosses li { position: relative; padding-left: 28px; margin: 0; color: var(--ink-2); }
.checks li::before, .crosses li::before {
  content: '';
  position: absolute;
  left: 0; top: 2px;
  width: 18px; height: 18px;
  border-radius: 6px;
  background: var(--accent-soft) var(--m) center / 12px no-repeat;
}
.checks li::before { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.crosses li::before { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E"); }
.plan--featured .checks li::before { background-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
[data-theme='dark'] .plan--featured .checks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

/* ============ Pricing ============ */
.billing {
  display: inline-grid;
  grid-auto-columns: auto;
  margin-top: var(--s-32);
}
.billing .seg { display: inline-flex; align-items: center; gap: var(--s-8); height: 36px; padding: 0 var(--s-16); font-size: var(--fs-sm); }
.billing__save {
  padding: 2px var(--s-8);
  border-radius: 99px;
  font-size: var(--fs-micro);
  line-height: 16px;
  color: var(--success);
  background: var(--success-soft);
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-16);
  padding-top: var(--s-48);
}
/* header, button and feature list share rows across the cards, so the buttons line up */
.plan {
  position: relative;
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  align-content: start;
  gap: var(--s-24);
  padding: var(--s-32);
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.plan--featured { border-color: var(--ink); box-shadow: var(--shadow-lg); }
.plan h2 { margin: 0; font-size: var(--fs-h4); font-weight: 600; letter-spacing: -0.02em; }
.plan__desc { margin: var(--s-8) 0 0; font-size: var(--fs-sm); color: var(--muted); text-wrap: pretty; }
.plan__price { display: flex; align-items: baseline; gap: var(--s-8); margin: var(--s-24) 0 0; }
.plan__price b { font-size: 40px; font-weight: 600; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan__price span { font-size: var(--fs-sm); color: var(--muted); }
.plan__bill { margin: var(--s-8) 0 0; font-size: var(--fs-xs); line-height: 20px; color: var(--muted); }
.plan__cta { display: grid; gap: var(--s-12); align-content: start; }
.plan__fine { margin: 0; font-size: var(--fs-xs); line-height: 20px; text-align: center; color: var(--muted); }
.plan__list { display: grid; gap: var(--s-16); align-content: start; padding-top: var(--s-24); border-top: 1px solid var(--line); }
.plan__includes { margin: 0; font-size: var(--fs-xs); font-weight: 500; color: var(--ink); }
.plan__badge {
  position: absolute;
  top: var(--s-32); right: var(--s-32);
  padding: var(--s-4) var(--s-8);
  border-radius: 99px;
  font-size: var(--fs-micro);
  line-height: 16px;
  font-weight: 500;
  color: var(--on-accent);
  background: var(--accent);
}
.plan__badge--muted { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 520px; } }

/* reassurance row under the plans */
.assure {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-24);
  padding-top: var(--s-48);
}
.assure__item { display: flex; gap: var(--s-12); align-items: flex-start; }
.assure__item svg {
  flex: none;
  width: 40px; height: 40px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
}
.assure__item b { display: block; font-size: var(--fs-sm); font-weight: 500; line-height: 20px; }
.assure__item span { display: block; margin-top: var(--s-4); font-size: var(--fs-xs); line-height: 20px; color: var(--muted); text-wrap: pretty; }
@media (max-width: 900px) { .assure { grid-template-columns: 1fr 1fr; max-width: 520px; } }
@media (max-width: 600px) { .assure { grid-template-columns: 1fr; gap: var(--s-16); } }

/* comparison table */
.compare { padding-top: var(--s-96); }
.compare__head { margin-bottom: var(--s-40); text-align: center; }
.compare__head p { margin: var(--s-16) 0 0; font-size: var(--fs-lede); color: var(--muted); }
.compare__table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); table-layout: fixed; }
.compare__table thead th, .compare__table thead td {
  position: sticky;
  top: var(--nav-h);
  z-index: 1;
  padding: var(--s-16);
  background: var(--bg);
  border-bottom: 1px solid var(--line-strong);
}
.compare__table thead td { width: 40%; }
.compare__table thead th { font-size: var(--fs-body); font-weight: 600; text-align: center; }
.compare__table thead th span { display: block; margin-top: var(--s-4); font-size: var(--fs-xs); font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.compare__table thead th.is-featured { border-radius: 12px 12px 0 0; }
.compare__table .is-featured { background: var(--surface-2); }
.compare__table tbody th, .compare__table tbody td { padding: var(--s-12) var(--s-16); line-height: 24px; border-bottom: 1px solid var(--line); }
.compare__table tbody th { font-weight: 400; text-align: left; color: var(--ink-2); }
.compare__table tbody th small { display: block; font-size: var(--fs-micro); line-height: 16px; color: var(--muted); }
.compare__table tbody td { text-align: center; color: var(--ink-2); }
.compare__table .compare__group th, .compare__table .compare__group td { padding: var(--s-32) var(--s-16) var(--s-12); }
.compare__table .compare__group th {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.compare__table tbody:last-child tr:last-child td.is-featured { border-radius: 0 0 12px 12px; border-bottom-color: transparent; }
/* check and dash marks: the words stay for screen readers */
.compare__table i {
  display: inline-block;
  width: 20px; height: 20px;
  vertical-align: middle;
  overflow: hidden;
  text-indent: 100%;
  white-space: nowrap;
  -webkit-mask: var(--m) center / contain no-repeat;
  mask: var(--m) center / contain no-repeat;
}
.compare__table i.yes { background: var(--ink); --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.compare__table i.no { background: var(--faint); --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E"); }
@media (max-width: 860px) { .compare { padding-top: var(--s-80); } }
@media (max-width: 600px) {
  /* all four columns fit a 375px screen; sideways scroll is only a fallback */
  .compare__scroll { overflow-x: auto; }
  .compare__table { font-size: var(--fs-xs); }
  .compare__table thead td { width: 34%; }
  /* a scrolling wrapper can't hold a sticky header */
  .compare__table thead th, .compare__table thead td { position: static; padding: var(--s-12) var(--s-4); }
  .compare__table thead th { font-size: var(--fs-sm); }
  .compare__table thead th span { font-size: var(--fs-micro); white-space: nowrap; }
  .compare__table tbody th, .compare__table tbody td { padding: var(--s-12) var(--s-4); line-height: 20px; }
  .compare__table tbody th { padding-left: 0; }
  .compare__table .compare__group th, .compare__table .compare__group td { padding: var(--s-24) var(--s-4) var(--s-8) 0; }
  .compare__table tbody th small { display: none; }
}

/* Platform: the fourth plan, full width under the other three */
.platform-wrap { padding-top: var(--s-16); }
.platform {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--s-48);
  padding: var(--s-40);
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
}
.platform::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 60% 100% at 100% 0%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 100% at 100% 0%, #000, transparent 70%);
  opacity: 0.8;
}
.platform .eyebrow { margin-bottom: var(--s-12); }
.platform h2 { margin: 0; font-size: var(--fs-h4); font-weight: 600; letter-spacing: -0.02em; }
.platform__intro { display: flex; flex-direction: column; }
.platform__cta { display: flex; flex-wrap: wrap; gap: var(--s-12); margin-top: var(--s-32); }
.platform__list { display: grid; gap: var(--s-16); align-content: start; padding-left: var(--s-48); border-left: 1px solid var(--line); }
.platform__list b { font-weight: 500; color: var(--ink); }
.platform .checks { gap: var(--s-16); }
@media (max-width: 900px) {
  .platform { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; padding: var(--s-32); gap: var(--s-32); }
  .platform__list { padding: var(--s-32) 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* API */
.api { padding-top: var(--s-96); }
.api__head { max-width: 640px; margin: 0 auto var(--s-48); text-align: center; }
.api__head .section__sub { margin-inline: auto; }
.api__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: var(--s-48); align-items: start; }
.api__features { display: grid; gap: var(--s-32); margin: 0; padding: 0; list-style: none; }
.api__features li { display: flex; gap: var(--s-16); align-items: flex-start; }
.api__features svg {
  flex: none;
  width: 40px; height: 40px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.api__features b { display: block; font-size: var(--fs-body); font-weight: 500; line-height: 24px; }
.api__features span { display: block; margin-top: var(--s-4); font-size: var(--fs-sm); line-height: 22px; color: var(--muted); }

.api__code {
  margin: 0;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  overflow: hidden;
}
.api__bar {
  display: flex;
  justify-content: space-between;
  padding: var(--s-12) var(--s-24);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.api__bar:not(:first-child) { border-top: 1px solid var(--line); }
.api__code pre {
  margin: 0;
  padding: var(--s-16) var(--s-24);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  line-height: 22px;
  color: var(--ink-2);
}
.api__code .k { color: var(--ink); font-weight: 600; }
.api__code .a { color: #7c3aed; }
.api__code .s { color: #15803d; }
[data-theme='dark'] .api__code .a { color: #c4b5fd; }
[data-theme='dark'] .api__code .s { color: #86efac; }

.api__access { margin-top: var(--s-80); }
.api__access-head { margin-bottom: var(--s-24); }
.api__access-head h3 { margin: 0; font-size: var(--fs-h3); font-weight: 600; line-height: 1.25; letter-spacing: -0.03em; text-wrap: balance; }
.api__access-head p { margin: var(--s-8) 0 0; color: var(--muted); }
.api__table tbody td { color: var(--ink-2); }
.api__table thead td { width: 34%; }
.compare__table th small a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-strong); }

.api__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-16);
  margin: var(--s-48) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.api__steps li {
  counter-increment: step;
  padding: var(--s-24);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.api__steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: var(--s-16);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--muted);
}
.api__steps b { display: block; font-size: var(--fs-body); font-weight: 500; line-height: 24px; }
.api__steps span { display: block; margin-top: var(--s-4); font-size: var(--fs-sm); line-height: 22px; color: var(--muted); }
@media (max-width: 900px) {
  .api__grid { grid-template-columns: 1fr; }
  .api__steps { grid-template-columns: 1fr; }
}
@media (max-width: 860px) { .api { padding-top: var(--s-80); } .api__access { margin-top: var(--s-64); } }
@media (max-width: 600px) {
  .platform { padding: var(--s-24); }
  .platform__cta { display: grid; }
  .api__table tbody td { font-size: var(--fs-micro); line-height: 18px; }
  .api__code pre { padding-inline: var(--s-16); }
  .api__bar { padding-inline: var(--s-16); }
}

.waitlist { padding-top: var(--s-96); }
.waitlist .updates { grid-template-columns: 1fr; }
@media (max-width: 860px) { .waitlist { padding-top: var(--s-80); } }

.faq { padding-top: var(--s-96); display: grid; grid-template-columns: 1fr 1.6fr; gap: var(--s-48); }
.faq__sub { margin: var(--s-16) 0 0; color: var(--muted); }
.faq__sub a, .faq details a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: var(--s-16);
  padding: var(--s-24) 0;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 300; font-size: 22px; line-height: 1; color: var(--muted); transition: transform 0.35s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: calc(var(--s-8) * -1) 0 var(--s-24); color: var(--muted); max-width: 600px; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; gap: var(--s-24); padding-top: var(--s-80); } }

/* ============ Shared reveal on scroll ============ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ============ Sign in ============ */
.signin {
  position: relative;
  min-height: calc(100dvh - var(--nav-h));
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--s-24);
  padding: var(--s-64) var(--gutter);
  isolation: isolate;
}
.signin::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 20%, transparent 75%);
}
.signin__card {
  width: min(440px, 100%);
  padding: var(--s-40) var(--s-32) var(--s-32);
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: fadeUp 0.5s var(--ease-out) backwards;
}
.signin__mark { display: block; width: 40px; height: 40px; margin: 0 auto; fill: var(--brand); }
.signin__title { margin: var(--s-16) 0 0; font-size: var(--fs-h3); line-height: 32px; letter-spacing: -0.02em; font-weight: 600; }
.signin__lede { margin: var(--s-8) 0 0; color: var(--muted); text-wrap: balance; }
.signin__lede b { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.signin__providers { display: grid; gap: var(--s-8); margin-top: var(--s-24); }
/* Google's own button, drawn in an iframe; this keeps its row the same height as ours */
.signin__google { display: flex; justify-content: center; min-height: 44px; }
.signin__google[hidden] { display: none; }
.signin__error {
  margin: var(--s-16) 0 0;
  padding: var(--s-8) var(--s-12);
  border-radius: 10px;
  font-size: var(--fs-sm);
  text-align: left;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
}
.signin__none { margin: var(--s-16) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.signin__switch { margin: var(--s-16) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.signin__switch a { color: var(--ink); font-weight: 500; text-underline-offset: 3px; }
.signin__perks {
  margin-top: var(--s-32);
  padding-top: var(--s-24);
  border-top: 1px solid var(--line);
  text-align: left;
}
.signin__perks-title { margin: 0 0 var(--s-12); font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.signin__perks ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-12); font-size: var(--fs-sm); color: var(--ink-2); }
.signin__perks li { display: grid; grid-template-columns: 20px 1fr; gap: var(--s-8); align-items: start; }
.signin__perks li > svg { width: 16px; height: 16px; margin-top: 3px; color: var(--success); }
.signin__perks b { color: var(--ink); font-weight: 600; }
.signin__guest { margin: var(--s-16) 0 0; font-size: var(--fs-xs); color: var(--muted); }
.signin__guest b { color: var(--ink-2); font-weight: 600; }
.signin__fine { max-width: 400px; margin: 0; font-size: var(--fs-xs); color: var(--muted); text-align: center; text-wrap: balance; }
.signin__fine a { color: var(--ink-2); }
@media (max-width: 600px) {
  .signin { place-content: start center; padding-top: var(--s-32); }
  .signin__card { padding: var(--s-32) var(--s-24) var(--s-24); }
}

/* ============ Contact ============ */
.contact { display: grid; gap: var(--s-48); padding-block: var(--s-48) var(--s-80); }
.contact__mail {
  display: grid; justify-items: start; gap: var(--s-8);
  padding: var(--s-40);
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface);
}
.contact__label { margin: 0; font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.contact__address {
  font-family: var(--font-display); font-size: clamp(22px, 3.4vw, 36px); font-weight: 600; line-height: 1.2;
  letter-spacing: -0.03em; color: var(--ink); text-decoration: none; overflow-wrap: anywhere;
}
.contact__address:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.contact__actions { display: flex; flex-wrap: wrap; gap: var(--s-8); margin-top: var(--s-16); }
.contact__tip { margin: var(--s-8) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.contact__title { margin: 0 0 var(--s-24); font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-16); }
.contact-card {
  display: grid; align-content: start; gap: var(--s-8);
  padding: var(--s-24);
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--muted); text-decoration: none;
  font-size: var(--fs-sm); line-height: 20px;
  transition: border-color 0.2s, transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.contact-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 8px 24px -12px rgb(0 0 0 / 0.18); }
.contact-card b { margin-top: var(--s-8); font-size: var(--fs-body); font-weight: 600; color: var(--ink); }
.contact-card__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); color: var(--ink); }
.contact-card__icon svg { width: 20px; height: 20px; }
.contact-card__go { margin-top: var(--s-8); font-weight: 500; color: var(--ink-2); }
.contact-card__go span { display: inline-block; transition: transform 0.3s var(--ease-out); }
.contact-card:hover .contact-card__go span { transform: translateX(4px); }
.contact__more { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.contact__more a { color: var(--ink-2); text-underline-offset: 3px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact__mail { padding: var(--s-24); }
  .contact__actions .btn { flex: 1 1 auto; }
}

/* ============ Account page ============ */
.acct { padding-bottom: var(--s-80); }
.acct[aria-busy='true'] .acct__main { visibility: hidden; }
.acct__main { display: grid; gap: var(--s-24); min-width: 0; }
.acct-card {
  scroll-margin-top: calc(var(--nav-h) + var(--s-32));
  padding: var(--s-32);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.acct-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-16); margin-bottom: var(--s-24); }
.acct-card__title { margin: 0; font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 600; letter-spacing: -0.02em; }
.acct-label { margin: var(--s-24) 0 var(--s-12); font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.acct-card__head + .acct-label { margin-top: 0; }
.acct-note { margin: var(--s-24) 0 0; font-size: var(--fs-sm); line-height: 1.6; color: var(--muted); }
.acct-note a { color: var(--ink-2); text-underline-offset: 3px; }

.acct-me { display: flex; align-items: center; gap: var(--s-16); margin-bottom: var(--s-24); min-width: 0; }
.acct-me__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  overflow: hidden;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--line);
}
.acct-me__avatar img { width: 100%; height: 100%; object-fit: cover; }
.acct-me__text { display: grid; gap: 2px; min-width: 0; }
.acct-me__text b { font-size: var(--fs-body); font-weight: 600; }
.acct-me__text span { font-size: var(--fs-sm); color: var(--muted); }
.acct-me__text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.acct-rows { margin: 0; border-top: 1px solid var(--line); }
.acct-rows > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--s-16); padding: var(--s-12) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.acct-rows dt { color: var(--muted); }
.acct-rows dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

.acct-badge {
  padding: 2px var(--s-12);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.acct-plan__price { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.acct-plan__price b { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.acct-list { display: grid; gap: var(--s-8); margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--ink-2); }
.acct-list li { position: relative; padding-left: var(--s-24); }
.acct-list li::before {
  content: '';
  position: absolute;
  left: 2px; top: 5px;
  width: 10px; height: 5px;
  border-left: 1.75px solid var(--ink);
  border-bottom: 1.75px solid var(--ink);
  transform: rotate(-45deg);
}
.acct-actions { display: flex; flex-wrap: wrap; gap: var(--s-8); margin-top: var(--s-24); }

.acct-method { display: flex; align-items: flex-start; gap: var(--s-16); padding: var(--s-16); border-radius: 12px; border: 1px solid var(--line); }
.acct-method > div { display: grid; gap: 2px; font-size: var(--fs-sm); }
.acct-method span:not(.acct-method__icon) { color: var(--muted); line-height: 1.5; }
.acct-method__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); color: var(--ink); }
.acct-method__icon svg { width: 20px; height: 20px; }

.acct-empty {
  display: grid;
  justify-items: center;
  gap: var(--s-8);
  padding: var(--s-48) var(--s-24);
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.acct-empty b { font-size: var(--fs-body); font-weight: 600; color: var(--ink); }
.acct-empty .btn { margin-top: var(--s-8); }
.acct-empty--inline { padding: var(--s-32) var(--s-24); border-radius: 12px; }
.acct-out { padding-block: var(--s-48) var(--s-80); }

.acct-links { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.acct-links li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-16); padding: var(--s-16) 0; border-bottom: 1px solid var(--line); }
.acct-links li > div { display: grid; gap: 2px; font-size: var(--fs-sm); min-width: 0; }
.acct-links li span { color: var(--muted); }
.acct-links .btn { flex: none; }
/* delete account: the last card on the page */
.acct-delete { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.acct-delete .acct-card__title { color: var(--danger); }
.acct-delete__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-24); }
.acct-delete__row p { margin: 0; max-width: 60ch; font-size: var(--fs-sm); line-height: 1.6; color: var(--ink-2); }
.acct-delete__row .btn { flex: none; }

.acct-rows dd a, .acct-msg a { color: var(--ink-2); text-underline-offset: 3px; }
.acct-msg { margin: var(--s-12) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.acct-msg:empty { display: none; }
.acct-links__pair { display: flex; gap: var(--s-8); flex: none; }

/* overview */
.acct-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-8); }
.acct-stat { display: grid; gap: var(--s-4); padding: var(--s-16); border-radius: 12px; background: var(--surface-2); }
.acct-stat span { font-size: var(--fs-xs); color: var(--muted); }
.acct-stat b { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* style chips */
.acct-chips { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.acct-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  height: 24px;
  padding: 0 var(--s-8);
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: var(--fs-micro);
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.acct-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.acct-chip.is-locked { color: var(--faint); border-style: dashed; }
.acct-chip svg { width: 12px; height: 12px; }

/* recently copied */
.acct-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: var(--s-8); margin: 0; padding: 0; list-style: none; }
.acct-icon {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: var(--s-16) var(--s-8) var(--s-12);
  border-radius: 12px;
  border: 1px solid var(--line);
  text-align: center;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.3s var(--ease-out);
}
.acct-icon:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.acct-icon__glyph { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: var(--s-8); color: var(--ink); }
.acct-icon__glyph svg { width: 100%; height: 100%; }
.acct-icon b, .acct-icon span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-icon b { font-size: var(--fs-xs); font-weight: 500; color: var(--ink); }
.acct-icon span { font-size: var(--fs-micro); color: var(--muted); }

/* preferences */
.acct-prefs { border-top: 1px solid var(--line); }
.acct-prefs .acct-pref { padding: var(--s-16) 0; border-bottom: 1px solid var(--line); }
.acct-pref { display: flex; align-items: center; justify-content: space-between; gap: var(--s-24); }
.acct-pref > div:first-child { display: grid; gap: 2px; min-width: 0; font-size: var(--fs-sm); }
.acct-pref > div:first-child span { color: var(--muted); }
.acct-pref label { cursor: pointer; }
.acct-seg { display: inline-flex; flex: none; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.acct-seg button { height: 30px; padding: 0 var(--s-12); border-radius: 7px; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); transition: color 0.2s, background 0.2s; }
.acct-seg button:hover { color: var(--ink); }
.acct-seg button[aria-checked='true'] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.acct-select { flex: none; width: 180px; height: 38px; font-size: var(--fs-sm); }
.acct-stroke { display: flex; align-items: center; gap: var(--s-12); flex: none; }
.acct-stroke output { width: 56px; font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--ink-2); text-align: right; }
.acct-check { display: inline-flex; align-items: center; gap: var(--s-4); font-size: var(--fs-xs); color: var(--ink-2); }
.acct-check input { accent-color: var(--accent); }
.acct-range { --pct: 50%; width: 120px; height: 24px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.acct-range:disabled { opacity: 0.4; cursor: default; }
.acct-range::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--pct), var(--line-strong) var(--pct)); }
.acct-range::-moz-range-track { height: 4px; border-radius: 99px; background: var(--line-strong); }
.acct-range::-moz-range-progress { height: 4px; border-radius: 99px; background: var(--accent); }
.acct-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--accent); box-shadow: var(--shadow-md); }
.acct-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--accent); }
.acct-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-8); flex: none; }
.acct-swatch { position: relative; width: 24px; height: 24px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12); transition: transform 0.3s var(--ease-spring); }
.acct-swatch:not(:disabled):hover { transform: scale(1.12); }
.acct-swatch:disabled { opacity: 0.3; cursor: not-allowed; }
.acct-swatch::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; transform: scale(0.7); transition: opacity 0.2s, transform 0.3s var(--ease-spring); }
.acct-swatch[aria-checked='true']::after { opacity: 1; transform: scale(1); }
.acct-swatch--inherit { background: conic-gradient(var(--ink) 0 50%, var(--surface) 0 100%); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* switch */
.acct-switch { position: relative; flex: none; display: inline-flex; cursor: pointer; }
.acct-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.acct-switch__track { width: 40px; height: 24px; border-radius: 999px; background: var(--line-strong); transition: background 0.2s; }
.acct-switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); transition: transform 0.3s var(--ease-out); }
.acct-switch input:checked + .acct-switch__track { background: var(--accent); }
.acct-switch input:checked + .acct-switch__track::after { transform: translateX(16px); background: var(--on-accent); }
.acct-switch input:focus-visible + .acct-switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }
.acct-switch input:disabled + .acct-switch__track { opacity: 0.5; }

/* help */
.acct-help { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-12); }

@media (max-width: 760px) {
  .acct-stats { grid-template-columns: 1fr 1fr; }
  .acct-help { grid-template-columns: 1fr; }
  .acct-pref { flex-direction: column; align-items: flex-start; gap: var(--s-12); }
}

@media (max-width: 560px) {
  .acct-card { padding: var(--s-24); }
  .acct-rows > div { grid-template-columns: 1fr; gap: 2px; }
  .acct-links li { flex-direction: column; align-items: flex-start; }
  .acct-delete__row { flex-direction: column; align-items: stretch; }
}

/* ============ Payments and invoices ============ */
.crumb { color: inherit; text-decoration: none; }
.crumb:hover { color: var(--ink); }
.bill { display: grid; gap: var(--s-24); padding-bottom: var(--s-80); }
.bill[aria-busy='true'] > * { visibility: hidden; }
.bill-plan .acct-card__head { align-items: flex-start; }
.bill-plan .acct-label { margin: 0 0 var(--s-4, 4px); }
.bill-plan__name { font-size: var(--fs-h3); }

/* Active / Ends Jan 5 / Free plan */
.bill-status, .bill-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px var(--s-12);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.bill-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bill-status[data-tone='ok'], .bill-pill[data-tone='paid'] { color: var(--success); background: var(--success-soft); border-color: transparent; }
.bill-status[data-tone='warn'], .bill-pill[data-tone='pending'] { color: #b45309; background: rgba(245, 158, 11, 0.12); border-color: transparent; }
:root[data-theme='dark'] .bill-status[data-tone='warn'], :root[data-theme='dark'] .bill-pill[data-tone='pending'] { color: #fbbf24; }
.bill-pill[data-tone='failed'] { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: transparent; }
.bill-pill[data-tone='refunded'] { color: var(--muted); }

.bill-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-12); margin: 0; }
.bill-summary > div { display: grid; gap: var(--s-8); align-content: start; padding: var(--s-16); border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.bill-summary dt { font-size: var(--fs-xs); color: var(--muted); }
.bill-summary dd { display: grid; gap: 2px; margin: 0; }
.bill-summary b { font-size: var(--fs-body); font-weight: 600; color: var(--ink); }
.bill-summary span { font-size: var(--fs-xs); line-height: 1.5; color: var(--muted); }
.bill-total { font-size: var(--fs-sm); color: var(--muted); }

.bill-table-wrap { overflow-x: auto; margin: 0 calc(var(--s-8) * -1); }
.bill-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.bill-table th { padding: 0 var(--s-8) var(--s-12); text-align: left; font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 400; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.bill-table td { padding: var(--s-16) var(--s-8); border-bottom: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.bill-table td:nth-child(2) { white-space: normal; color: var(--ink-2); }
.bill-table tbody tr:last-child td { border-bottom: 0; }
.bill-table__num { font-variant-numeric: tabular-nums; }
.bill-invoice { display: inline-flex; gap: 4px; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-2); text-underline-offset: 3px; }
.bill-invoice:hover { color: var(--ink); }
.bill-invoice span { color: var(--muted); }

/* Manage plan dialog (built on the gate dialog) */
.manage { width: min(520px, calc(100vw - var(--s-32))); padding: var(--s-32); text-align: left; }
.manage__head { display: flex; align-items: flex-start; gap: var(--s-16); padding-right: var(--s-32); }
.manage__head .gate__icon { flex: none; }
.manage__icon--danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.manage__title { margin: 0; font-size: var(--fs-h4); line-height: 1.3; letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }
.manage__sub { margin: var(--s-4, 4px) 0 0; font-size: var(--fs-sm); line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.manage__plan { display: flex; align-items: center; justify-content: space-between; gap: var(--s-16); margin-top: var(--s-24); padding: var(--s-16); border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.manage__plan > div { display: grid; gap: 2px; }
.manage__label { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.manage__name { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; }
.manage__rows { margin: var(--s-16) 0 0; }
.manage__rows > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: var(--s-12); padding: var(--s-12) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.manage__rows dt { color: var(--muted); }
.manage__rows dd { display: grid; gap: 2px; margin: 0; }
.manage__rows dd b { font-weight: 600; }
.manage__rows dd span { font-size: var(--fs-xs); color: var(--muted); }
.manage__features { margin-top: var(--s-16); font-size: var(--fs-sm); }
.manage__features summary { cursor: pointer; color: var(--ink-2); font-weight: 500; }
.manage__features .acct-list { margin-top: var(--s-12); }
.manage__notice { display: flex; gap: var(--s-8); margin: var(--s-16) 0 0; padding: var(--s-12); border-radius: 10px; font-size: var(--fs-sm); line-height: 1.5; color: #92400e; background: rgba(245, 158, 11, 0.12); }
:root[data-theme='dark'] .manage__notice { color: #fcd34d; }
.manage__notice svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.manage__lose { display: grid; gap: var(--s-8); margin: var(--s-24) 0 0; padding: var(--s-16) var(--s-16) var(--s-16) var(--s-32); border-radius: 12px; border: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-2); }
.manage__msg { margin: var(--s-12) 0 0; font-size: var(--fs-sm); color: var(--ink-2); }
.manage__msg:empty { display: none; }
.manage__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); margin-top: var(--s-24); }
.manage__fine { text-align: center; }
.manage__actions--one { grid-template-columns: 1fr; }
.manage__notice a { color: inherit; text-underline-offset: 3px; }
.manage__sub b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.manage__confirm { display: grid; gap: var(--s-8); margin-top: var(--s-24); font-size: var(--fs-sm); }
.manage__confirm label { color: var(--ink-2); }
.manage__confirm label b { font-family: var(--font-mono); letter-spacing: 0.04em; color: var(--danger); }
.manage__confirm .input { width: 100%; font-family: var(--font-mono); letter-spacing: 0.04em; }
.manage__confirm .manage__actions { margin-top: var(--s-16); }

/* Invoice */
.invoice-page { max-width: 760px; padding-top: var(--s-40); padding-bottom: var(--s-80); }
.invoice-page[aria-busy='true'] .invoice-bar { visibility: hidden; }
.invoice-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-12); margin-bottom: var(--s-24); }
.invoice-bar svg { width: 14px; height: 14px; }
.invoice { padding: var(--s-48, 48px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.invoice__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-16); padding-bottom: var(--s-24); border-bottom: 1px solid var(--line); }
.invoice__brand { display: flex; align-items: center; gap: var(--s-8); font-weight: 600; }
.invoice__brand .brand__mark { width: 24px; height: 24px; fill: var(--brand); }
.invoice__title { display: grid; justify-items: end; gap: var(--s-8); }
.invoice__title h1 { margin: 0; font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; }
.invoice__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-16) var(--s-24); margin: var(--s-24) 0 0; font-size: var(--fs-sm); }
.invoice__meta dt { color: var(--muted); font-size: var(--fs-xs); }
.invoice__meta dd { margin: 2px 0 0; color: var(--ink); }
.invoice__parties { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-24); margin-top: var(--s-32); font-size: var(--fs-sm); }
.invoice__parties > div { display: grid; gap: 2px; }
.invoice__parties .acct-label { margin: 0 0 var(--s-8); }
.invoice__parties span { color: var(--muted); }
.invoice__lines { width: 100%; margin-top: var(--s-32); border-collapse: collapse; font-size: var(--fs-sm); }
.invoice__lines th, .invoice__lines td { padding: var(--s-12) 0; text-align: left; border-bottom: 1px solid var(--line); }
.invoice__lines thead th { font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 400; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.invoice__lines td:last-child, .invoice__lines th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.invoice__lines tfoot th, .invoice__lines tfoot td { border-bottom: 0; font-weight: 600; color: var(--ink); }
.invoice__note { margin: var(--s-32) 0 0; font-size: var(--fs-xs); color: var(--muted); }

@media (max-width: 760px) {
  .bill-summary { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .manage { padding: var(--s-24); }
  .manage__actions { grid-template-columns: 1fr; }
  .manage__rows > div { grid-template-columns: 1fr; gap: 2px; }
  .invoice { padding: var(--s-24); }
  .invoice__meta, .invoice__parties { grid-template-columns: 1fr; }
  /* the payment table becomes a stack of labeled rows */
  .bill-table thead { display: none; }
  .bill-table tr { display: grid; padding: var(--s-12) 0; border-bottom: 1px solid var(--line); }
  .bill-table tbody tr:last-child { border-bottom: 0; }
  .bill-table td { display: flex; justify-content: space-between; gap: var(--s-16); padding: 4px var(--s-8); border: 0; }
  .bill-table td::before { content: attr(data-label); color: var(--muted); }
}
@media print {
  .nav, .nav__sheet, .footer, .invoice-bar { display: none !important; }
  .invoice-page { padding: 0; max-width: none; }
  .invoice { border: 0; padding: 0; }
}
