/* sail.black design tokens, extracted from sailblack/sail.black
   (src/app/globals.css, src/app/layout.tsx, src/components/{Hero,Footer,DemoStart}.tsx).
   Fonts are self-hosted in /fonts — no Google Fonts CDN. */

:root {
  --background: #0a0a0a;
  --foreground: #f4f4f5;
  --muted: #a1a1aa;
  --surface: #121214;
  --surface-2: #18181b;
  --border: #27272a;
  --accent: #e4e4e7;
  --steel: #8b9cb3;
  --danger: #fca5a5;
  --font-sans: "Geist", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --font-display: "Syne", "Geist", sans-serif;
  --radius: 0.5rem;
  --max-width: 64rem;
  --pad-x: 1rem;
  --tap: 44px;
}

/* Geist variable, latin-ext then latin (same as next/font subsets) */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-mono-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-mono-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/syne-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/syne-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/syne-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/syne-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/syne-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/syne-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/syne-latin-ext-800.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/syne-latin-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@media (min-width: 640px) {
  :root { --pad-x: 1.5rem; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain::after { animation: none !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}

img, svg { max-width: 100%; height: auto; }

a {
  color: var(--foreground);
  text-decoration-color: color-mix(in srgb, var(--steel) 70%, transparent);
  text-underline-offset: 0.18em;
}

a:hover, a:active { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: var(--pad-x);
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  background: var(--foreground);
  color: var(--background);
  text-decoration: none;
  font-weight: 500;
}
.skip-link:focus { top: 0.5rem; }

.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.err { color: var(--danger); }

/* Subtle film grain, same idea as sail.black .grain */
.grain::after {
  content: "";
  position: fixed;
  inset: -200%;
  width: 400%;
  height: 400%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 9999;
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  20% { transform: translate(-15%, 5%); }
  30% { transform: translate(7%, -25%); }
  40% { transform: translate(-5%, 25%); }
  50% { transform: translate(-15%, 10%); }
  60% { transform: translate(15%, 0%); }
  70% { transform: translate(0%, 15%); }
  80% { transform: translate(3%, 35%); }
  90% { transform: translate(-10%, 10%); }
}
@media (max-width: 640px) {
  .grain::after { opacity: 0.02; animation: none; }
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding: max(0.75rem, env(safe-area-inset-top)) var(--pad-x) 0.75rem;
  background: color-mix(in srgb, var(--background) 88%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner, .footer-inner, .page-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  min-width: 0;
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--foreground);
  min-height: var(--tap);
}
.brand:hover { color: var(--foreground); }
.brand-logo {
  display: block;
  height: 28px;
  width: auto;
}
.brand-product {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--border);
  padding-left: 0.75rem;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 0.85rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
}
.site-nav a:hover, .site-nav a:active { color: var(--foreground); }
.site-nav a[aria-current="page"] { color: var(--foreground); }

main.page {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem var(--pad-x) 3rem;
  min-width: 0;
}
main.page.wide { max-width: 80rem; }

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 0.75rem;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 0.75rem;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; }
h2 { font-size: 1.35rem; }
.lede {
  color: var(--muted);
  max-width: 40rem;
  margin: 0 0 1rem;
  line-height: 1.65;
}
.price-line {
  font-size: 0.95rem;
  color: var(--foreground);
  margin: 0 0 0.75rem;
}

/* Buttons — square, min 44px, sail.black primary / ghost */
.btn, button.btn, a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.75rem 2rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
  touch-action: manipulation;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary {
  background: var(--foreground);
  color: var(--background);
}
.btn-primary:hover, .btn-primary:active {
  background: var(--accent);
  color: var(--background);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: color-mix(in srgb, var(--muted) 55%, var(--border));
}
.btn-ghost:hover, .btn-ghost:active {
  color: var(--foreground);
  border-color: var(--muted);
}

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1.5rem 0 1.25rem;
}
.tabs button {
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0.5rem 1.1rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background-color 0.3s;
}
.tabs button:hover { color: var(--foreground); border-color: var(--muted); }
.tabs button.active {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}

/* Controls / forms */
.panel {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 640px) {
  .panel { padding: 1.25rem 1.35rem; }
}
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.field label, .field-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
input, select, textarea {
  min-height: var(--tap);
  padding: 0.4rem 0.7rem;
  background: var(--surface-2);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
}
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
.controls .btn { margin-top: 0; }
.status { margin: 0.5rem 0 1rem; color: var(--muted); font-size: 0.95rem; }

/* Server-side compute time for the last request (measured in the handler, excludes network). */
.server-timing {
  margin: 1.25rem 0 0.25rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--steel);
}
.server-timing-headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: -0.01em;
}
.server-timing-headline .num { font-family: var(--font-mono); font-weight: 500; }
.server-timing-detail { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.9rem; font-family: var(--font-mono); }

/* Tables — desktop grid, stacked cards under 1024px (sail.black pattern) */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
table.data th, table.data td {
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0.75rem;
  vertical-align: top;
  text-align: left;
}
table.data th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  background: transparent;
}
table.data code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  word-break: break-all;
}
.depiction {
  background: #f4f4f5;
  padding: 0.35rem;
  display: inline-block;
  max-width: 180px;
}
.depiction svg { display: block; max-width: 180px; height: auto; }

@media (max-width: 1023px) {
  table.data { display: block; border: 0; }
  table.data thead { display: none; }
  table.data tbody {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  table.data tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    background: color-mix(in srgb, var(--surface) 40%, transparent);
  }
  table.data td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
    border: 0;
    text-align: right;
  }
  table.data td::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
    flex-shrink: 0;
  }
}

/* Privacy article */
.article {
  max-width: 45rem;
}
.article h1 { margin-bottom: 1.25rem; }
.article h2 {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}
.article p, .article li { color: var(--foreground); }
.article ul { padding-left: 1.2rem; }
.article code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem var(--pad-x) max(3rem, env(safe-area-inset-bottom));
  margin-top: auto;
}
.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
@media (min-width: 640px) {
  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
  }
}
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  color: var(--foreground);
  text-decoration: none;
  display: inline-block;
}
.footer-brand-name:hover { color: var(--foreground); }
.footer-tagline {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 20rem;
  line-height: 1.6;
  margin: 0;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-col a:hover { color: var(--foreground); }
.footer-meta {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* Swagger /docs — dark skin over swagger-ui, our chrome around it */
.docs-wrap { margin-top: 0.5rem; }
.swagger-ui { font-family: var(--font-sans) !important; color: var(--foreground); background: transparent; }
.swagger-ui .topbar { display: none; }
.swagger-ui .information-container.wrapper { padding: 0; }
.swagger-ui .info { margin: 0 0 1.5rem; }
.swagger-ui .info .title,
.swagger-ui .info p, .swagger-ui .info li, .swagger-ui .info h1, .swagger-ui .info h2, .swagger-ui .info h3,
.swagger-ui .scheme-container, .swagger-ui .opblock-tag, .swagger-ui .opblock-summary-path,
.swagger-ui .opblock-summary-description, .swagger-ui .tab li, .swagger-ui table thead tr td, .swagger-ui table thead tr th,
.swagger-ui .parameter__name, .swagger-ui .parameter__type, .swagger-ui .response-col_status,
.swagger-ui .response-col_description, .swagger-ui .model-title, .swagger-ui .model,
.swagger-ui label, .swagger-ui .opblock-description-wrapper p, .swagger-ui .renderedMarkdown p {
  color: var(--foreground) !important;
  font-family: var(--font-sans);
}
.swagger-ui .info .title { display: none; } /* page already has an h1 */
.swagger-ui .info { margin-top: 0 !important; }
.swagger-ui .info a { color: var(--steel) !important; }
.swagger-ui .scheme-container {
  background: var(--surface) !important;
  box-shadow: none !important;
  border: 1px solid var(--border);
  padding: 1rem !important;
}
.swagger-ui .opblock { border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 70%, transparent) !important; border-color: var(--border) !important; }
.swagger-ui .opblock .opblock-summary { border-color: var(--border) !important; }
.swagger-ui .opblock-section-header { background: var(--surface-2) !important; }
.swagger-ui input, .swagger-ui select, .swagger-ui textarea {
  background: var(--surface-2) !important;
  color: var(--foreground) !important;
  border: 1px solid var(--border) !important;
}
.swagger-ui .btn { border-radius: 0; }
.swagger-ui .btn.execute {
  background: var(--foreground) !important;
  color: var(--background) !important;
  border-color: var(--foreground) !important;
}
.swagger-ui section.models { border-color: var(--border) !important; }
.swagger-ui section.models h4 { color: var(--foreground) !important; }
.swagger-ui .model-box { background: var(--surface-2) !important; }
.swagger-ui .highlight-code, .swagger-ui .microlight, .swagger-ui pre {
  background: var(--surface-2) !important;
  color: var(--foreground) !important;
}
.swagger-ui svg { fill: var(--foreground); }

/* --- sign-in ------------------------------------------------------------- */
.small { font-size: 0.875rem; }
.signin-cta h2, .signin-option h2, .panel h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}
.signin-cta p { max-width: 44rem; }
.signin-cta .btn { margin: 0.5rem 0 0.75rem; }
.signin-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .signin-grid { grid-template-columns: 1fr 1fr; } }
.signin-option { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 0; }
.signin-option .btn { align-self: flex-start; }
.signin-form { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.signin-form .field { flex: 1 1 16rem; }
.signed-in-as { margin: 0 0 0.75rem; }
.site-nav a.nav-signin { color: var(--foreground); border: 1px solid var(--border); margin-left: 0.35rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.25rem; margin: 0 0 1rem; }
.kv dt { color: var(--muted); font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }
.kv dd { margin: 0; }
.new-key { border: 1px solid var(--steel); padding: 0.75rem 1rem; margin: 0.75rem 0; word-break: break-all; }
.key-list { list-style: none; padding: 0; }
.key-list li { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.5rem; }
form.inline { display: inline-flex; margin-right: 0.5rem; }
.btn-small { min-height: 32px; padding: 0.25rem 0.9rem; font-size: 0.875rem; }
.signin-cta.locked { border-color: var(--steel); }

/* --- control alignment: inputs, selects and buttons share one height and baseline ---------- */
:root { --control-h: 2.75rem; }
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select {
  box-sizing: border-box;
  height: var(--control-h);
  min-height: var(--control-h);
  line-height: 1.2;
}
.btn, button.btn, a.btn {
  box-sizing: border-box;
  height: var(--control-h);
  min-height: var(--control-h);
  padding: 0 1.5rem;
  line-height: 1;
  white-space: nowrap;
}
.btn.btn-small, button.btn.btn-small { height: 2rem; min-height: 2rem; padding: 0 0.9rem; }
/* button.btn sets a transparent border; keep the ghost outline visible */
.btn.btn-ghost, button.btn.btn-ghost {
  border-color: color-mix(in srgb, var(--muted) 55%, var(--border));
}
.btn.btn-ghost:hover, button.btn.btn-ghost:hover { border-color: var(--muted); }

/* label above, control below: rows align on the control's bottom edge */
.controls, .signin-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 0.75rem;
}
.controls .btn, .signin-form .btn { flex: 0 0 auto; margin: 0; align-self: auto; }
.signin-form .field { flex: 1 1 10rem; min-width: 10rem; }
.controls .field-wide { flex: 1 1 18rem; }
.controls .field-wide select { width: 100%; }
.key-list li { align-items: center; }
.key-list form.inline { margin: 0; }

@media (max-width: 640px) {
  .signin-form { flex-direction: column; align-items: stretch; }
  .signin-form .field { flex: 0 0 auto; min-width: 0; }
  .signin-form .btn { width: 100%; }
  .controls { display: grid; grid-template-columns: 1fr 1fr; align-items: end; }
  .controls .field { min-width: 0; }
  .controls .field input, .controls .field select { width: 100%; }
  .controls .field-wide { grid-column: 1 / -1; }
  .controls .btn { width: 100%; }
}
