/* The sign-in at the app host, from the approved board (version 12), frames 1 to 4. No external font or resource. */
:root {
  --navy: #184470;
  --navy-deep: #0f2d4a;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --page: #f8fafc;
  --danger: #b91c1c;
  --danger-line: #dc2626;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
}

a, .link { color: var(--navy); }
a:hover, .link:hover { color: var(--navy-deep); }

.shell { display: grid; grid-template-columns: minmax(320px, 40%) 1fr; min-height: 100vh; }

.panel {
  background: linear-gradient(168deg, #184470 0%, #1a4f80 100%);
  color: #e7effa;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}
.brand { display: flex; flex-direction: column; gap: 12px; }
/* The wordmark white on the navy panel, as the live theme draws it */
.wordmark { display: block; height: 36px; width: auto; align-self: flex-start; filter: brightness(0) invert(1); opacity: 0.95; }
.platform { margin: 0; font-size: 12px; letter-spacing: 0.06em; color: #b7c9e1; font-weight: 600; }
.pitch { display: flex; flex-direction: column; gap: 16px; }
.pitch-title { margin: 0; font-size: 36px; line-height: 1.2; font-weight: 700; color: #f8fbff; max-width: 16ch; }
.pitch-text { margin: 0; color: #d2def0; max-width: 40ch; line-height: 1.55; }
.app-host { margin: 0; font-size: 13px; color: #b7c9e1; }

.main {
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.topbar { width: 100%; max-width: 520px; margin: 0 auto; display: flex; justify-content: flex-end; }
.lang { font: inherit; font-size: 14px; color: var(--navy); background: none; border: 0; padding: 0; cursor: pointer; }

.card {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 40px;
}
.heading { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.heading h1 { margin: 0; font-size: 30px; line-height: 1.2; outline: none; }
.heading p { margin: 0; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input[type="email"] {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #ffffff;
}
input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(24, 68, 112, 0.25); }
.field input[aria-invalid="true"] { border-color: var(--danger-line); }

.addr { display: flex; align-items: center; height: 44px; border: 1px solid var(--line); border-radius: 6px; background: #ffffff; overflow: hidden; }
.addr:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(24, 68, 112, 0.25); }
.addr.invalid { border-color: var(--danger-line); }
.addr input { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0 4px 0 14px; font: inherit; font-size: 15px; color: var(--ink); background: transparent; }
.addr input:focus { box-shadow: none; }
.suffix { padding: 0 14px; color: var(--muted); font-size: 15px; height: 100%; display: flex; align-items: center; background: var(--page); border-left: 1px solid var(--line); }
.hint { margin: 0; font-size: 13px; color: var(--muted); }

.error { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--danger); line-height: 1.45; overflow-wrap: anywhere; }
.error-icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b91c1c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5'/%3E%3Cpath d='M12 16h.01'/%3E%3C/svg%3E");
}

.primary, .secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 100%;
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
}
.primary { background: var(--navy); color: #ffffff; font-weight: 600; border: 0; }
/* white on hover too: a primary link would otherwise take a:hover's navy text on its navy ground */
.primary:hover { background: var(--navy-deep); color: #ffffff; }
.secondary { border: 1px solid var(--line); color: var(--ink); font-weight: 500; background: #ffffff; }
.primary:focus-visible, .secondary:focus-visible, .link:focus-visible, .lang:focus-visible, .workspace-card:focus-visible, .picker a:focus-visible {
  outline: 3px solid rgba(24, 68, 112, 0.45);
  outline-offset: 2px;
}
.spaced { margin-top: 16px; }

.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--muted); font-size: 13px; }
.divider span:first-child, .divider span:last-child { flex: 1; height: 1px; background: var(--line); }

.links { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 20px; font-size: 14px; }
.link { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.link.muted { color: var(--muted); }

.remembered-list { display: flex; flex-direction: column; gap: 12px; }
.remembered-row { display: flex; align-items: center; gap: 12px; }
.remembered-row .workspace-card { flex: 1; min-width: 0; }
.remembered-row .forget { flex: none; font-size: 14px; }
.workspace-card { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); background: #ffffff; }
.picker { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.picker a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.picker a:last-child { border-bottom: 0; }
.picker a:hover, .workspace-card:hover { background: var(--page); }

.logo-box { display: flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #ffffff; overflow: hidden; }
.picker .logo-box { width: 36px; height: 36px; border-radius: 9px; }
.logo-box img { width: 22px; height: 22px; object-fit: contain; }
.logo-box.initials { border: 0; background: #fdf1e7; color: #9a3412; font-weight: 700; font-size: 13px; }
.names { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.names .name { font-weight: 600; overflow-wrap: anywhere; }
.names .host { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.chevron {
  flex: none;
  width: 20px;
  height: 20px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
}

.signup-aside { margin: 20px 0 0; font-size: 14px; color: var(--muted); text-align: center; }

.footer { width: 100%; max-width: 520px; margin: 0 auto; font-size: 13px; color: var(--muted); text-align: center; }

/* Phone width: the panel above the card, the card without its frame's padding */
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .panel { padding: 24px 16px; gap: 20px; }
  .pitch-title { font-size: 26px; }
  .main { padding: 20px 16px 32px; justify-content: flex-start; }
  .card { padding: 24px 20px; }
  .heading h1 { font-size: 24px; }
}

/* ---------- The sign-in page in the sign-up's frame (board b7be4cbf "KPilot Sign-up Flow", round 8a; the owner,
   2026-11-04) ----------
   No navy panel: the sign-up's 64 px top bar (the mark, the progress line's place hidden as the board draws sign-in, the
   language with its globe), then one column on white. The sign-up's stylesheet answers 404 while the sign-up is off, so
   this page cannot load it: the frame's values are copied here from signup/signup.css, each token naming its rule, and
   kpilot-ops/sso/themes/kpilot-cell/tests/test_look.py fails when the two disagree. The components below the frame (the
   cards, the picker, the address field) keep this file's own look. */
body.signin-flow {
  --flow-bar-height: 64px; /* U .flowbar height */
  --flow-bar-columns: minmax(120px, 1fr) minmax(0, 640px) minmax(120px, 1fr); /* U .flowbar grid-template-columns */
  --flow-bar-gap: 24px; /* U .flowbar gap */
  --flow-bar-padding: 0 24px; /* U .flowbar padding */
  --flow-bar-border: 1px solid #f0f0f2; /* U .flowbar border-bottom */
  --flow-mark-height: 20px; /* U .flow-wordmark height */
  --flow-lang-height: 32px; /* U .signup .lang height */
  --flow-lang-padding: 0 10px; /* U .signup .lang padding */
  --flow-lang-radius: 7px; /* U .signup .lang border-radius */
  --flow-lang-size: 13px; /* U .signup .lang font-size */
  --flow-lang-weight: 600; /* U .signup .lang font-weight */
  --flow-lang-color: #52525b; /* U .signup .lang color */
  --flow-lang-hover: #f4f4f5; /* U .signup .lang:hover background */
  --flow-lang-hover-ink: #18181b; /* U .signup .lang:hover color */
  --flow-globe: 14px; /* U .signup .globe width */
  --flow-main-padding: 0 0 56px; /* U .signup .main padding */
  --flow-column: 456px; /* U .signup .card max-width */
  --flow-card-padding: 72px 28px 0; /* U .signup .card padding */
  --flow-heading-gap: 8px; /* U .signup .heading gap */
  --flow-heading-space: 28px; /* U .signup .heading margin-bottom */
  --flow-title-size: 30px; /* U .signup .heading h1 font-size */
  --flow-title-line: 1.15; /* U .signup .heading h1 line-height */
  --flow-title-weight: 700; /* U .signup .heading h1 font-weight */
  --flow-title-spacing: -0.03em; /* U .signup .heading h1 letter-spacing */
  --flow-title-color: #09090b; /* U .signup .heading h1 color */
  --flow-lede-size: 15px; /* U .signup .heading p font-size */
  --flow-lede-line: 1.6; /* U .signup .heading p line-height */
  --flow-lede-color: #3f3f46; /* U .signup .heading p color */
  --flow-form-width: 400px; /* U #email-form max-width */
  --flow-small-height: 34px; /* U #email-form .primary height */
  --flow-small-padding: 0 14px; /* U #email-form .primary padding */
  --flow-small-radius: 7px; /* U #email-form .primary border-radius */
  --flow-small-size: 13.5px; /* U #email-form .primary font-size */
  --flow-back-height: 30px; /* U .signup .back height */
  --flow-back-margin: 0 0 20px -6px; /* U .signup .back margin */
  --flow-back-padding: 0 10px 0 6px; /* U .signup .back padding */
  --flow-notes-size: 13px; /* U .email-notes font-size */
  --flow-notes-color: #71717a; /* U .email-notes color */
  --flow-footer-space: 40px; /* U .signup .footer margin-top */
  --flow-secondary-border: 1px solid #d4d4d8; /* U .signup .secondary.passkey border */
  --flow-secondary-ink: #18181b; /* U .signup .secondary.passkey color */
  --flow-secondary-hover: #fafafa; /* U .signup .secondary.passkey:hover background */
}
.signin-flow { background: #ffffff; }
.signin-flow .shell { display: block; min-height: 0; }
.signin-flow .flowbar { height: var(--flow-bar-height); display: grid; grid-template-columns: var(--flow-bar-columns); align-items: center; gap: var(--flow-bar-gap); padding: var(--flow-bar-padding); border-bottom: var(--flow-bar-border); background: #ffffff; }
.signin-flow .flow-logo { display: flex; align-items: center; }
.signin-flow .flow-wordmark { height: var(--flow-mark-height); width: auto; display: block; }
.signin-flow .flow-progress { min-width: 0; visibility: hidden; }
.signin-flow .flow-right { display: flex; justify-content: flex-end; align-items: center; }
.signin-flow .lang { display: inline-flex; align-items: center; gap: 6px; height: var(--flow-lang-height); padding: var(--flow-lang-padding); border-radius: var(--flow-lang-radius); font-size: var(--flow-lang-size); font-weight: var(--flow-lang-weight); color: var(--flow-lang-color); }
.signin-flow .lang:hover { background: var(--flow-lang-hover); color: var(--flow-lang-hover-ink); }
.signin-flow .globe { width: var(--flow-globe); height: var(--flow-globe); background: center / contain no-repeat url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='24%2024%20208%20208'%3E%3Cpath%20fill='%23184470'%20d='M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z'/%3E%3C/svg%3E"); }
.signin-flow .main { padding: var(--flow-main-padding); justify-content: flex-start; gap: 0; background: #ffffff; }
.signin-flow .card { display: flex; flex-direction: column; max-width: var(--flow-column); border: 0; border-radius: 0; background: transparent; padding: var(--flow-card-padding); }
.signin-flow .card[hidden] { display: none !important; }
.signin-flow .heading { gap: var(--flow-heading-gap); margin-bottom: var(--flow-heading-space); }
.signin-flow .heading h1 { font-size: var(--flow-title-size); line-height: var(--flow-title-line); font-weight: var(--flow-title-weight); letter-spacing: var(--flow-title-spacing); color: var(--flow-title-color); }
.signin-flow .heading p { font-size: var(--flow-lede-size); line-height: var(--flow-lede-line); color: var(--flow-lede-color); }
.signin-flow .form { max-width: var(--flow-form-width); }
/* the board's buttons: as wide as their words, 34 px, as the sign-up's "Continue" */
.signin-flow .card .primary, .signin-flow .card .secondary { align-self: flex-start; width: auto; height: var(--flow-small-height); padding: var(--flow-small-padding); border-radius: var(--flow-small-radius); font-size: var(--flow-small-size); font-weight: 600; }
.signin-flow .card .secondary { border: var(--flow-secondary-border); color: var(--flow-secondary-ink); }
.signin-flow .card .secondary:hover { background: var(--flow-secondary-hover); color: var(--flow-secondary-ink); }
.signin-flow .remembered-row .primary, .signin-flow .card .primary.spaced { align-self: flex-start; }
.signin-flow .divider { max-width: var(--flow-form-width); }
/* "Back", the sign-up's quiet button with its arrow */
.signin-flow .back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: var(--flow-back-height); margin: var(--flow-back-margin); padding: var(--flow-back-padding); border: 0; border-radius: 7px; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: #52525b; text-decoration: none; cursor: pointer; }
.signin-flow .back::before { content: ""; width: 15px; height: 15px; background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2352525b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M12 19l-7-7 7-7'/%3E%3C/svg%3E"); }
.signin-flow .back:hover { background: #f4f4f5; color: #18181b; }
.signin-flow .back:focus-visible { outline: 3px solid rgba(24, 68, 112, 0.45); outline-offset: 2px; }
/* the lines under the page: "New to KPilot?" with the sign-up's notes, the footer as the sign-up's */
.signin-flow .signup-aside { margin: 28px 0 0; font-size: var(--flow-notes-size); color: var(--flow-notes-color); text-align: left; }
.signin-flow .signup-aside .strong { font-weight: 600; }
.signin-flow .links { max-width: var(--flow-form-width); font-size: 13.5px; font-weight: 600; }
.signin-flow .footer { max-width: var(--flow-column); margin-top: var(--flow-footer-space); padding: 0 28px; }
.signin-flow .footer + .footer { margin-top: 8px; }
@media (max-width: 760px) {
  .signin-flow .flowbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 0 16px; }
  .signin-flow .card { padding: 32px 16px 0; }
  .signin-flow .main { padding: 0 0 32px; }
  .signin-flow .heading h1 { font-size: var(--flow-title-size); }
  .signin-flow .footer { padding: 0 16px; }
}
