/* Root entry — the Sign In dialog, chooser and demo CTA on the landing page.
 * Speaks the v20 vocabulary: same tokens, same radii, same weight scale.
 *
 * EVERY TOKEN HERE MUST EXIST ON THE HOMEPAGE, WHICH LINKS FOUR SHEETS:
 * fonts, ks-tokens, ks-home-v20 and this file. The tenant bundles — where
 * `--navy` and `--blue` live — are NOT among them. This file leaned on both
 * anyway, and on the one control nothing else styled it was fatal: the Sign
 * In dialog's submit button painted `background: var(--navy)` with white
 * text, the invalid var made the background transparent, and the button
 * rendered as white-on-white — present, focusable, and invisible. The owner
 * found it on production on 2026-09-01: a sign-in form with no way to sign
 * in. (The nav chip survived only because ks-home-v20 overrides it.)
 *
 * So: platform tokens with literal fallbacks, matching this file's own idiom
 * everywhere else. The submit wears `--primary` — ks-tokens' own doctrine
 * says the filled brand red IS the Enter-class action, and signing in is
 * exactly that. */

.ks-signin-btn {
  background: transparent;
  border: 1.5px solid var(--ks-navy, #0C1730);
  color: var(--ks-navy, #0C1730);
  padding: .48rem 1.05rem;
  border-radius: var(--ks-r-control);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.ks-signin-btn:hover { background: var(--ks-navy, #0C1730); color: #fff; }

/* ── The demo card: the page's one clickable proof ──────────────────────────
 * A compact card, not a text link — a visitor should recognise at a glance
 * that this opens a working dojo. It wears the demo tenant's own configured
 * badge (the same file its branding points at), and the DEMO DOJO tag keeps
 * it from ever reading as a customer. */
.ks-demo-card {
  display: block;
  width: 100%;
  max-width: 33rem;
  margin: 1.5rem auto 0;
  text-align: left;
  text-decoration: none;
  color: var(--ink, #10192B);
  background: #fff;
  border-radius: 14px;
  padding: .95rem 1.15rem 1rem;
  box-shadow: var(--ks-e2), 0 0 0 1px rgba(12, 23, 48, .08);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ks-demo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ks-e3), 0 0 0 1px rgba(21, 82, 216, .38);
}
.ks-demo-eyebrow {
  display: block;
  margin-bottom: .55rem;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ks-red-deep, #B10E28);
}
.ks-demo-ident { display: flex; align-items: center; gap: .7rem; }
.ks-demo-ident img { flex: none; width: auto; height: 46px; }
.ks-demo-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  min-width: 0;
}
.ks-demo-name b { font-family: var(--display, inherit); font-size: 1.04rem; font-weight: 700; }
.ks-demo-line {
  display: block;
  margin-top: .5rem;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--ink-2, #374151);
}
.ks-demo-go {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .55rem;
  font-size: .9rem;
  font-weight: 700;
  color: var(--blue, #1552D8);
}
.ks-demo-card:hover .ks-demo-go { text-decoration: underline; }
.ks-demo-cta-tag {
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3, #6b7280);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 999px;
  padding: .1rem .5rem;
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  .ks-demo-card { transition: none; }
  .ks-demo-card:hover { transform: none; }
}

/* ── The dialog ─────────────────────────────────────────────────────────── */
.ks-entry-open { overflow: hidden; }
.ks-entry-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, .55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1rem, 6vh, 4rem) 1rem 1rem;
  overflow-y: auto;
}
.ks-entry-dialog {
  background: #fff;
  border-radius: 14px;
  width: min(420px, 100%);
  box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
  padding: 1.1rem 1.25rem 1.3rem;
}
.ks-entry-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.ks-entry-title { margin: 0; font-size: 1.15rem; }
.ks-entry-close {
  background: none;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-3, #6b7280);
  padding: .2rem .45rem;
  border-radius: 8px;
}
.ks-entry-close:hover { background: var(--bg-2, #f3f4f6); }

.ks-entry-form { display: flex; flex-direction: column; gap: .7rem; }
.ks-entry-field { display: flex; flex-direction: column; gap: .3rem; }
.ks-entry-label { font-size: .74rem; font-weight: 700; color: var(--ink-2, #374151); }
.ks-entry-field input {
  padding: 10px 12px;
  border: 1px solid var(--line, #d1d5db);
  border-radius: var(--ks-r-control);
  font: inherit;
}
.ks-entry-field input:focus-visible { outline: 2px solid var(--ks-blue, #1552D8); outline-offset: 1px; }
.ks-entry-primary {
  background: var(--primary, #E11133);
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: .6rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.ks-entry-primary:hover { background: var(--primary-deep, #B00C27); }
.ks-entry-primary:disabled { opacity: .6; cursor: default; }
.ks-entry-secondary,
.ks-entry-signout {
  background: transparent;
  border: 1.5px solid var(--line, #d1d5db);
  border-radius: 9px;
  padding: .5rem .9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  margin-top: .6rem;
}
.ks-entry-linklike {
  background: none;
  border: 0;
  color: var(--ks-blue, #1552D8);
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
  align-self: flex-start;
  padding: 0;
}
.ks-entry-linklike:hover { text-decoration: underline; }
.ks-entry-status { min-height: 1.1em; margin: .1rem 0 0; font-size: .8rem; color: var(--ink-3, #6b7280); }
.ks-entry-note { margin: .2rem 0 .7rem; font-size: .92rem; line-height: 1.5; }
.ks-entry-error { margin: .2rem 0 .7rem; font-size: .88rem; color: #b91c1c; }

.ks-entry-choices { display: flex; flex-direction: column; gap: .5rem; }
.ks-entry-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  width: 100%;
  padding: .7rem .9rem;
  background: var(--bg-2, #f8fafc);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.ks-entry-choice:hover { border-color: var(--ks-blue, #1552D8); }
.ks-entry-choice-name { font-weight: 700; }
.ks-entry-choice-via {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-3, #6b7280);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .ks-entry-overlay { padding-top: .75rem; }
  .ks-entry-dialog { padding: .9rem .9rem 1.1rem; }
}
