/* Chrome shared by the public pages built on templates/public_base.html:
 * the docs, sign in and sign up. The landing has its own hero chrome
 * (static/landing/landing.css); both read static/public/tokens.css.
 *
 * A slim field band carries the wordmark and the nav, the page itself is
 * paper, and a field band closes it. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--hl); color: var(--ink); }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 400; }
code, pre, kbd { font-family: var(--mono); font-variant-ligatures: none; }
:focus-visible { outline: 2px solid var(--field); outline-offset: 3px; }
.site-head :focus-visible, .site-foot :focus-visible { outline-color: var(--on-field); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
main { flex: 1; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  font: 600 15.5px/1 var(--sans); letter-spacing: -0.005em;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  background: transparent; color: inherit;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-primary { background: var(--field); color: var(--on-field); }
.btn-primary:hover { background: var(--field-deep); }
.btn-line { color: var(--ink); border-color: var(--hair); }
.btn-line:hover { border-color: var(--ink); }
.site-head .btn-quiet { color: var(--on-field); border-color: var(--on-field-hair); }
.site-head .btn-quiet:hover { border-color: var(--on-field); }

/* ── Header band ─────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--edge);
  background: var(--field); color: var(--on-field);
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 650 21px/1 var(--display); letter-spacing: -0.035em; text-decoration: none; }
/* The mark beside the wordmark in the header: static/brand/mark-on-field.svg. */
.wordmark-mark { display: block; flex: none; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn), .site-nav button {
  font: 500 15px/1 var(--sans); text-decoration: none; color: var(--on-field-2);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.site-nav a:not(.btn):hover, .site-nav button:hover, .site-nav a.is-active { color: var(--on-field); }
.site-nav a.is-active { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.site-nav .btn { min-height: 36px; padding: 0 15px; font-size: 15px; color: var(--on-field); }
.site-nav form { display: contents; }

/* ── Footer band ─────────────────────────────────────────────── */
.site-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px;
  /* Clear of the widget's launcher in the bottom-right corner. */
  padding: 22px max(var(--edge), 120px) 26px var(--edge);
  background: var(--field); color: var(--on-field-2);
  font-size: 14px;
}
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--on-field); text-decoration: underline; text-underline-offset: 3px; }
.site-foot .wordmark { font-size: 17px; color: var(--on-field); }
.site-foot .llms { margin-left: auto; }

/* ── Sign in / sign up ───────────────────────────────────────── */
.auth {
  display: grid; place-items: center;
  padding: clamp(40px, 9vh, 96px) var(--gutter) clamp(56px, 10vh, 112px);
}
.auth-card {
  width: min(420px, 100%);
  padding: 34px 32px 28px;
  background: var(--sheet);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -36px rgba(15, 20, 64, 0.35);
}
/* The face watches you fill the form in, and looks away from the
 * password (auth.js adds .is-shy while that field has focus). */
.auth-card .auth-face {
  --face-eye: var(--eye); --face-glow: var(--glow); --face-hand: var(--eye);
  --k: 0.9;
  --disc: var(--field);
  width: 68px; height: 68px;
  margin-bottom: 22px;
}
.auth-card .auth-face.is-shy .face-eye { transform: scaleY(0.1); }
.auth h1 { font-size: 34px; line-height: 1.05; letter-spacing: -0.03em; }
.auth-sub { margin-top: 8px; color: var(--ink-2); font-size: 16px; }
.auth-form { margin-top: 26px; display: flex; flex-direction: column; gap: 18px; }
.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-field label { font: 600 14.5px/1.3 var(--sans); }
.auth-optional { font-weight: 400; color: var(--ink-3); }
.auth-field input {
  height: 46px; padding: 0 14px;
  font: 400 16px/1 var(--sans); color: var(--ink);
  background: #fff; border: 1px solid var(--hair); border-radius: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.auth-field input:hover { border-color: rgba(15, 20, 64, 0.3); }
.auth-field input:focus { outline: none; border-color: var(--field); box-shadow: 0 0 0 3px rgba(30, 43, 214, 0.14); }
.auth-field input::placeholder { color: var(--ink-3); }
.auth-hint { font-size: 13.5px; color: var(--ink-3); }
.auth-error-text { font-size: 13.5px; color: var(--erase); }
.auth-error {
  margin-top: 20px; padding: 11px 14px;
  border: 1px solid rgba(196, 40, 47, 0.35); background: rgba(196, 40, 47, 0.06);
  color: var(--erase); font-size: 14.5px;
}
.auth-submit { width: 100%; margin-top: 4px; min-height: 48px; }
.auth-alt { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hair); font-size: 15px; color: var(--ink-2); }
.auth-alt a { color: var(--field); font-weight: 600; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-nav { gap: 18px; }
  .site-nav .hide-sm { display: none; }
  .site-foot .llms { margin-left: 0; }
  .auth-card { padding: 28px 22px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ── Error pages (templates/error_base.html) ─────────────────── */
.oops {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  width: min(640px, 100%); margin: 0 auto;
  padding: clamp(56px, 12vh, 128px) var(--gutter) clamp(72px, 14vh, 144px);
}
.oops .oops-face {
  --face-eye: var(--eye); --face-glow: var(--glow); --face-hand: var(--eye);
  --disc: var(--field);
  --k: 1.26;
  width: 96px; height: 96px;
  margin-bottom: 30px;
}
.oops-code { font: 600 14px/1.3 var(--sans); color: var(--field); }
.oops h1 { margin-top: 8px; font-size: clamp(34px, 5vw, 52px); line-height: 1.04; letter-spacing: -0.03em; }
.oops-text { margin-top: 14px; font-size: 18px; color: var(--ink-2); max-width: 46ch; }
.oops-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
