/* Components. Built from tokens.css; values that are not tokens are marked local. */

/* Layout ----------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--s-32); }
@media (max-width: 760px) { .section { padding-block: var(--s-20); } }

/* Hairline that runs edge to edge; sections carry the padding */
.rule { height: 1px; border: 0; background: var(--line); }

/* Icons: 24 grid, 1.5 stroke, currentColor. Sizes 16 / 20 / 24. */
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-16 { width: 16px; height: 16px; }
.icon-24 { width: 24px; height: 24px; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: var(--control-md); padding-inline: var(--s-5);
  border: 0; border-radius: var(--r-md);
  font-size: var(--body-size); letter-spacing: var(--body-track); font-weight: 500;
  line-height: 1; white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms var(--ease-out), color 120ms var(--ease-out);
}
.btn .icon { margin-top: -1px; } /* sit the icon on the capitals' centre */
.btn-lg { height: var(--control-lg); padding-inline: var(--s-8); font-size: var(--head-size); }
.btn-sm { height: var(--control-sm); padding-inline: var(--s-4); font-size: var(--callout-size); letter-spacing: var(--callout-track); }
.btn-primary { background: var(--button); color: var(--paper); }
.btn-primary:hover { background: var(--button-hover); }
.btn-secondary { background: var(--paper-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-secondary:hover { background: var(--paper-3); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Keycaps: one tight cap per key */
.keys { display: inline-flex; gap: 3px; vertical-align: middle; }
.key {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding-inline: 5px;
  border-radius: 5px; /* local: keycap */
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong);
  font-family: var(--font-sans); font-size: var(--caption-size); letter-spacing: var(--caption-track);
  font-weight: 500; line-height: 1; color: var(--ink-2);
}
.keys-lg .key {
  min-width: 44px; height: 44px; padding-inline: 12px; border-radius: 10px;
  font-size: var(--head-size); letter-spacing: var(--head-track);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 2px 0 var(--line-strong);
}

/* Chip: small single-line tag */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding-inline: 9px; border-radius: var(--r-full);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--caption-size); letter-spacing: var(--caption-track); font-weight: 500; line-height: 1;
  color: var(--ink-2); white-space: nowrap;
}

/* Waitlist form ---------------------------------------------------------- */
.waitlist { display: grid; gap: var(--s-3); width: 100%; max-width: 480px; }
.waitlist-row { display: flex; gap: var(--s-2); }
.waitlist input[type="email"] {
  flex: 1; min-width: 0;
  height: var(--control-md); padding-inline: 14px;
  border: 0; border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  outline: none;
  font-size: var(--body-size); letter-spacing: var(--body-track); line-height: 1;
  transition: box-shadow 120ms var(--ease-out);
}
.waitlist input[type="email"]:focus { box-shadow: inset 0 0 0 1px var(--ink-3), var(--focus-ring); }
.waitlist input::placeholder { color: var(--ink-3); opacity: 1; }
.waitlist-note {
  display: flex; align-items: center; gap: 6px; min-height: 18px;
  font-size: var(--small-size); letter-spacing: var(--small-track); line-height: var(--small-lh);
  color: var(--ink-3);
}
.waitlist-note .icon { width: 16px; height: 16px; }
.waitlist-note a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.waitlist[data-state="done"] .waitlist-note { color: var(--ok); }
.waitlist[data-state="error"] .waitlist-note { color: var(--error); }
.waitlist .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 460px) {
  .waitlist-row { flex-direction: column; }
  .waitlist input[type="email"] { flex: none; } /* flex: 1 in a column would collapse its height */
  .waitlist .btn { width: 100%; }
}

/* Nav -------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgb(250 249 245 / 0.88);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 22px; letter-spacing: var(--lead-track); /* local: wordmark at 22 px */
  font-weight: 650; line-height: 1;
}
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: var(--s-8); }
.nav-links a:not(.btn) {
  font-size: var(--callout-size); letter-spacing: var(--callout-track); line-height: 1;
  color: var(--ink-2);
}
.nav-links a:not(.btn):hover { color: var(--ink); }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } .nav-inner { height: 64px; } }

/* Card ------------------------------------------------------------------- */
.card {
  display: flex; flex-direction: column;
  border-radius: var(--r-xl);
  background: var(--paper-2);
  overflow: hidden;
}
.card-viz { position: relative; height: var(--card-viz-h, 232px); overflow: hidden; display: grid; place-items: center; }
.card-body { display: grid; gap: var(--s-2); padding: 0 var(--s-8) var(--s-8); }
.card-title {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--head-size); letter-spacing: var(--head-track); line-height: 1; font-weight: 600;
}
.card-title .icon { color: var(--ink); margin-top: -1px; }
.card-body p { color: var(--ink-2); }
@media (max-width: 760px) { .card { --card-viz-h: 196px; } .card-body { padding: 0 var(--s-6) var(--s-6); } }

/* Columns split by hairlines (steps, facts) ------------------------------ */
.columns { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); }
.columns > li { display: grid; align-content: start; gap: var(--s-3); padding: var(--s-2) var(--s-8); box-shadow: inset 1px 0 0 var(--line); }
.columns > li:first-child { padding-left: 0; box-shadow: none; }
@media (max-width: 900px) {
  .columns { grid-template-columns: 1fr 1fr; row-gap: var(--s-12); }
  .columns > li:nth-child(odd) { padding-left: 0; box-shadow: none; }
}
@media (max-width: 600px) {
  .columns { grid-template-columns: 1fr; row-gap: 0; }
  .columns > li, .columns > li:nth-child(odd) { padding: var(--s-8) 0; box-shadow: inset 0 1px 0 var(--line); }
  .columns > li:first-child { box-shadow: none; padding-top: 0; }
}

/* Footer ----------------------------------------------------------------- */
.footer { padding-block: var(--s-12) var(--s-16); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6) var(--s-10); flex-wrap: wrap; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3) var(--s-6); }
.footer-links a, .footer-meta a, .footer-meta span {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--callout-size); letter-spacing: var(--callout-track); line-height: 1.2; color: var(--ink-2);
}
.footer-links .icon, .footer-meta .icon { width: 16px; height: 16px; flex: none; color: var(--ink-3); stroke-width: 2; }
.footer-links a:hover, .footer-meta a:hover, .footer-links a:hover .icon, .footer-meta a:hover .icon { color: var(--ink); }
.footer-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3) var(--s-5); }
.footer-meta span { color: var(--ink-3); }
/* Phones: links in two columns with room to tap, then who made it. */
@media (max-width: 600px) {
  .footer-inner { display: grid; justify-content: stretch; gap: var(--s-8); }
  .footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-4); }
  .footer-links a { min-height: 44px; }
  .footer-meta { gap: var(--s-2) var(--s-5); }
  .footer-meta .footer-gh { width: 100%; min-height: 44px; }
}

/* Prose: legal pages and long text --------------------------------------- */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 {
  margin-top: var(--s-16);
  font-size: var(--title2-size); letter-spacing: var(--title2-track); line-height: var(--title2-lh); font-weight: 600;
}
.prose h2 + * { margin-top: var(--s-4); }
.prose p, .prose li { color: var(--ink-2); text-wrap: pretty; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: var(--s-2); }
.prose li::marker { color: var(--ink-3); }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { color: var(--ink); font-weight: 600; }
.flush-top { padding-top: 0; }

/* Forms with several fields (bug report) --------------------------------- */
.report { display: grid; gap: var(--s-6); max-width: var(--measure); }
.field { display: grid; gap: var(--s-2); }
.field label { font-size: var(--callout-size); line-height: 1.3; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--ink-3); margin-left: var(--s-1); }
.field textarea, .field input {
  width: 100%; padding: 12px 14px; border: 0; border-radius: var(--r-md);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: var(--body-size); line-height: var(--body-lh); color: var(--ink);
}
.field input { height: var(--control-md); padding-block: 0; }
.field textarea { resize: vertical; min-height: 96px; }
.field textarea:focus, .field input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--ink-3), var(--focus-ring); }
.field ::placeholder { color: var(--ink-3); opacity: 1; }
.attached { border: 0; margin: 0; padding: var(--s-4) var(--s-5); border-radius: var(--r-lg); background: var(--paper-2); display: grid; gap: var(--s-3); }
.attached legend { float: left; font-size: var(--callout-size); font-weight: 600; margin-bottom: var(--s-1); }
.attached-list { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-1) var(--s-5); margin: 0; font-size: var(--callout-size); clear: both; }
.attached-list dt { color: var(--ink-3); }
.attached-list dd { margin: 0; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: var(--s-2); font-size: var(--callout-size); }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }
.report-send { display: grid; gap: var(--s-3); justify-items: start; }
.report .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.report[data-state="done"] .waitlist-note { color: var(--ok); }
.report[data-state="error"] .waitlist-note { color: var(--error); }
.report .waitlist-note { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--small-size); line-height: var(--small-lh); color: var(--ink-3); }
.report .waitlist-note .icon { flex: none; margin-top: 1px; }

.drop {
  display: grid; justify-items: center; gap: var(--s-3); padding: var(--s-6);
  border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong);
  text-align: center;
}
.drop.over { box-shadow: inset 0 0 0 2px var(--blue-bright); }
.drop-hint { font-size: var(--callout-size); color: var(--ink-3); text-wrap: balance; }
.drop-preview { max-height: 280px; width: auto; border-radius: var(--r-sm); box-shadow: var(--shadow-float); }
.link-btn { padding: 0; border: 0; background: none; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; cursor: pointer; }
