@font-face { font-family: "Geist"; src: url("assets/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("assets/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Beatrice Standard"; src: url("assets/BeatriceStandard-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* Fleet Command palette; each direction maps these onto its own roles below */
:root {
  --navy: #13213c;
  --navy-2: #1a2d4a;
  --indigo: #223a66;
  --sky: #84c3ff;
  --teal: #49ceba;
  --teal-ink: #0f7d76;
  --page: #f7f8fa;
  --n-100: #d8e0e9;
  --n-300: #9caabb;
  --n-500: #546478;
  --n-700: #2b4160;
  --red: #dc2626;

  --font: "Geist", -apple-system, "SF Pro Text", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-display: "Beatrice Standard", "Geist", "PingFang SC", sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1 { margin: 0; font-size: var(--h1-size, 28px); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; color: var(--fg); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- the form column ---------- */
.panel { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 372px; animation: panel-in 320ms var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.head { display: flex; flex-direction: column; gap: 6px; }
.lede { color: var(--fg2); }
.lede b { color: var(--fg); font-weight: 600; }

form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-size: 13px; font-weight: 500; color: var(--fg2); }
.input {
  height: 50px; padding: 0 16px; width: 100%;
  border-radius: var(--radius); border: 1px solid var(--field-line);
  background: var(--field-bg); color: var(--fg); outline: none;
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease), background 120ms var(--ease);
}
.input::placeholder { color: var(--placeholder); }
.input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); background: var(--field-bg-focus, var(--field-bg)); }
.input.bad { border-color: var(--err); }
.code-input { font-family: var(--font-mono); font-size: 24px; letter-spacing: 0.5em; text-align: center; padding-left: calc(16px + 0.5em); }

.err { font-size: 13px; color: var(--err); display: flex; gap: 6px; align-items: baseline; }

.btn {
  height: 50px; width: 100%; border-radius: var(--radius); border: 1px solid transparent;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; cursor: pointer;
  transition: background 120ms var(--ease), transform 120ms var(--ease), border-color 120ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .link:focus-visible, .back:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn.primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn.primary:hover { background: var(--btn-bg-hover); }
.btn.primary[disabled] { opacity: 0.55; cursor: default; }
.btn.secondary { background: var(--btn2-bg); color: var(--fg); border-color: var(--btn2-line); }
.btn.secondary:hover { background: var(--btn2-bg-hover); }
.btn.quiet { background: transparent; color: var(--fg2); height: 44px; font-weight: 500; }
.btn.quiet:hover { color: var(--fg); }

.lark-badge {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--teal-ink);
}

.or { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.note { font-size: 13px; color: var(--muted); }
.link { background: none; border: 0; padding: 0; color: var(--link); font-weight: 500; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link[disabled] { color: var(--muted); cursor: default; text-decoration: none; }
.back { align-self: flex-start; background: none; border: 0; padding: 4px 0; color: var(--fg2); cursor: pointer; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.back:hover { color: var(--fg); }

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }

.who { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--field-line); background: var(--field-bg); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; background: var(--avatar-bg); color: var(--avatar-fg); flex: none; }
.who-text { display: flex; flex-direction: column; line-height: 1.4; }
.who-text b { font-weight: 600; color: var(--fg); }
.who-text span { font-size: 13px; color: var(--fg2); font-family: var(--font-mono); }

.done { align-items: flex-start; }
.check { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); }
.check svg { width: 24px; height: 24px; }
.bar { width: 100%; height: 3px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.bar i { display: block; height: 100%; width: 40%; background: var(--ok); animation: bar 1.2s var(--ease) infinite; }
@keyframes bar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

.foot { font-size: 13px; color: var(--muted); display: flex; gap: 20px; }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--fg); }

/* ---------- demo state switcher (not part of the design) ---------- */
.demo { position: fixed; left: 16px; bottom: 16px; z-index: 50; display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(19, 33, 60, 0.92); font: 12px/1 var(--font); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2); }
.demo button { border: 0; background: transparent; color: #c9d4e2; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.demo button[aria-pressed="true"] { background: var(--sky); color: var(--navy); }
.embed .demo { display: none; }

@media (prefers-reduced-motion: reduce) {
  .panel, .bar i { animation: none; }
}
