/* ─────────────────────────────────────────────────────────────────────
   Kosha auth — /login and /signup
   Implements "Kosha Login.dc.html" and "Kosha Signup.dc.html" from
   Claude Design (project 813985c9).

   Both artboards are the same frame: form on the left, an argument for the
   product on the right, one hairline between them. They share this file
   rather than each carrying a copy, since only the right-hand content and
   a few strings differ.

   Palette and type follow /dashboard — the monochrome console identity,
   not the landing page's violet. Tokens are scoped to .auth so nothing
   reaches styles.css.
   ───────────────────────────────────────────────────────────────────── */

.auth {
  --ink:   #1A1A1A;
  --text:  #4D4D4D;
  --muted: #8C8C8C;
  --faint: #BFBFBF;
  --line:  #E6E6E6;
  --tint:  #F7F7F7;
  --paper: #FFFFFF;

  --sans: "Public Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  display: flex;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

.auth *, .auth *::before, .auth *::after { box-sizing: border-box; }
.auth h1, .auth h2, .auth p, .auth pre { margin: 0; }
.auth :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.auth .mono { font-family: var(--mono); }

/* No styles.css on these pages, so anchors need their own baseline. Text
   links stay underlined; anything shaped like a button must not be. */
.auth a { color: var(--ink); text-underline-offset: 2px; }
.auth a:hover { color: var(--text); }
.auth-brand,
.provider,
.auth-links a { text-decoration: none; }

.auth-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── Left column ─────────────────────────────────────────────────── */

.auth-form-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 40px 48px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  align-self: flex-start;
}
.auth-brand span {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 0;
}
.auth-panel { width: 100%; max-width: 384px; }

.auth-title {
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.auth-blurb {
  margin-top: 12px;
  font-size: 14px;
  line-height: 21px;
  color: var(--text);
}

/* ─── Preview strip ───────────────────────────────────────────────── */
/* These pages carry an email field and a "we sent you a link" state. On a
   public domain that has to say plainly that nothing is submitted and no
   mail is sent, or the interaction is a lie. */

.auth-preview {
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  background: var(--tint);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 17px;
  color: var(--text);
}
.auth-preview strong { color: var(--ink); font-weight: 700; }

/* ─── Providers ───────────────────────────────────────────────────── */

.auth-providers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 36px;
}

.provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--faint);
  border-radius: 0;
  background: var(--paper);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.provider:hover { border-color: var(--ink); background: var(--tint); }
.provider svg { flex: 0 0 auto; }

.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
}
.auth-or span:first-child,
.auth-or span:last-child { flex: 1; height: 1px; background: var(--line); }
.auth-or-word {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── Fields ──────────────────────────────────────────────────────── */

.auth-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-field { display: block; }
.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.auth-input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--faint);
  border-radius: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  background: var(--paper);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.auth-input:focus { border-color: var(--ink); }
.auth-hint {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 17px;
  color: var(--muted);
  margin-top: 6px;
}
.auth-error {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 17px;
  color: var(--ink);
  margin-top: 6px;
}
.auth-error[hidden] { display: none; }

.auth-submit {
  width: 100%;
  margin-top: 24px;
  padding: 12px 16px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--paper);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.auth-submit:hover { background: var(--text); border-color: var(--text); }

.auth-fine {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 17px;
  color: var(--muted);
}
.auth-terms {
  margin-top: 24px;
  font-size: 12px;
  line-height: 18px;
  color: var(--muted);
}
.auth-switch {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 20px;
  color: var(--text);
}
.auth-switch a { color: var(--ink); font-weight: 700; }

.auth-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.auth-links a, .auth-links span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
}
.auth-links a:hover { color: var(--ink); }
.auth-links span { color: var(--faint); }

/* ─── Sent view ───────────────────────────────────────────────────── */

.auth-view[hidden] { display: none; }

.auth-mail-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.auth-summary {
  margin-top: 24px;
  border: 1px solid var(--line);
}
.auth-summary-row {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.auth-summary-row:last-child { border-bottom: 0; }
.auth-summary-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.auth-summary-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.auth-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.auth-action {
  flex: 1;
  padding: 11px 16px;
  border: 1px solid var(--faint);
  border-radius: 0;
  background: var(--paper);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 120ms ease;
}
.auth-action:hover { border-color: var(--ink); }

/* ─── Right column ────────────────────────────────────────────────── */

.auth-pitch {
  flex: 1 1 0;
  min-width: 0;
  border-left: 1px solid var(--line);
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-pitch-inner { max-width: 460px; }
.auth-pitch .auth-eyebrow { display: block; margin-bottom: 20px; }

.auth-diagram {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 28px;
}

.auth-principles {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-principle { display: flex; gap: 14px; }
.auth-principle-n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  flex: 0 0 auto;
  padding-top: 2px;
}
.auth-principle p {
  font-size: 14px;
  line-height: 21px;
  color: var(--text);
}
.auth-principle strong { color: var(--ink); }

/* Signup's right column: a spec table, then the self-host escape hatch. */
.auth-spec {
  border: 1px solid var(--line);
  margin-bottom: 28px;
}
.auth-spec-row {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.auth-spec-row:last-child { border-bottom: 0; }
.auth-spec-key {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  flex: 0 0 92px;
}
.auth-spec-val { font-size: 14px; line-height: 21px; color: var(--ink); }

.auth-code {
  padding: 16px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 20px;
  color: var(--text);
  overflow-x: auto;
}
.auth-note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 20px;
  color: var(--muted);
}

/* ─── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .auth { display: block; min-height: 100vh; }
  .auth-form-col { min-height: 100vh; padding: 28px 20px; }
  .auth-center { padding: 36px 0; }
  .auth-pitch { display: none; }
}
