/* Whisk's sign-in pages (CONTROL-PLANE.md §4.1), in the public site's Mustard design. */

@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Young Serif";
  src: url("/assets/young-serif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/jetbrains-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #faf8f3;
  --paper: #ffffff;
  --ink: #14213d;
  --mut: #4c5670;
  --line: #e6e1d3;
  --line-2: #d3ccb8;
  --focus: #14213d;
  --disabled: #f4efe3;
  --acc: #e3a92b;
  --soft: #f3e2b0;
  --bad: #a42323;
  --bad-soft: #fbe3e3;
  --good: #1b6b3a;
  --good-soft: #dff3e6;
  --btn: #14213d;
  --btn-fg: #faf8f3;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101728;
    --paper: #182137;
    --ink: #f3f5fa;
    --mut: #a6aec2;
    --line: #2b3550;
    --line-2: #3a4870;
    --focus: #e3a92b;
    --disabled: #1d2a47;
    --soft: #3a3220;
    --bad: #f39a9a;
    --bad-soft: #3a1b1b;
    --good: #7fd49a;
    --good-soft: #17301f;
    --btn: #e3a92b;
    --btn-fg: #14213d;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
}

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

.brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 72px);
  background: #14213d;
  color: #ffffff;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
  font: 400 26px/1 var(--serif);
  letter-spacing: -0.01em;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--acc);
  flex: none;
}

.kicker {
  font: 500 12px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acc);
}

.pitch {
  margin: 18px 0;
  max-width: 460px;
  font: 400 clamp(34px, 3.4vw, 52px)/1.08 var(--serif);
  letter-spacing: -0.02em;
}

.detail {
  max-width: 40ch;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.brand-foot {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px clamp(24px, 5vw, 70px);
}

.topline,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font: 500 11px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mut);
}

.footer a {
  color: var(--ink);
  text-decoration: none;
}

.mobile-wordmark {
  display: none;
}

.content {
  width: 100%;
  max-width: 440px;
  margin: auto;
  padding: 48px 0;
}

h1 {
  margin: 0 0 10px;
  font: 400 30px/1.15 var(--serif);
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 26px;
  color: var(--mut);
}

.lead strong {
  color: var(--ink);
  font-weight: 600;
}

form {
  margin: 0;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}

input + label {
  margin-top: 14px;
}

label .optional {
  color: var(--mut);
  font-weight: 400;
}

h2 {
  margin: 32px 0 8px;
  font-size: 18px;
}

/* Fields match the dashboard's (dashboard/src/app/globals.css, Forms). */
input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="email"]:hover,
input[type="password"]:hover,
input[type="text"]:hover {
  border-color: var(--mut);
}

input[type="email"]:focus-visible,
input[type="password"]:focus-visible,
input[type="text"]:focus-visible {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 35%, transparent);
}

input::placeholder {
  color: var(--mut);
  opacity: 0.75;
}

input:disabled {
  background: var(--disabled);
  color: var(--mut);
  cursor: not-allowed;
}

input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  display: inline-grid;
  place-content: center;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--mut);
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
}

input[type="radio"]::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #14213d;
  transform: scale(0);
  transition: transform 0.15s;
}

input[type="radio"]:checked {
  border-color: var(--acc);
  background: var(--acc);
}

input[type="radio"]:checked::before {
  transform: scale(1);
}

button:focus-visible,
a:focus-visible,
input[type="radio"]:focus-visible {
  outline: 3px solid var(--acc);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  input,
  input::before {
    transition: none;
  }
}

input.code {
  font: 500 28px/1 var(--mono);
  letter-spacing: 0.35em;
  text-align: center;
}

.button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 18px;
  border: 1px solid var(--btn);
  border-radius: 10px;
  background: var(--btn);
  color: var(--btn-fg);
  font: 600 16px var(--sans);
  cursor: pointer;
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.1);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.button.small {
  width: auto;
  min-height: 36px;
  margin: 0;
  padding: 6px 12px;
  font-size: 14px;
}

.button.danger {
  background: transparent;
  color: var(--bad);
  border-color: var(--line);
}

.button[disabled] {
  opacity: 0.55;
  cursor: progress;
}

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 8px;
  color: var(--mut);
  font: 500 11px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.or::before,
.or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
}

.notice.error {
  background: var(--bad-soft);
  color: var(--bad);
}

.notice.ok {
  background: var(--good-soft);
  color: var(--good);
}

.small-print {
  margin-top: 22px;
  color: var(--mut);
  font-size: 14px;
}

.small-print a,
.link {
  color: var(--ink);
  font-weight: 600;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 14px var(--sans);
  text-decoration: underline;
  cursor: pointer;
}

.keys {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.keys li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.keys .meta {
  color: var(--mut);
  font-size: 14px;
}

.keys .actions {
  display: flex;
  gap: 8px;
}

.keys form.rename {
  display: flex;
  gap: 8px;
  width: 100%;
}

.keys form.rename input {
  min-height: 36px;
}

/* Recovery codes, shown once: two columns that stay readable at phone width. */
.codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px 16px;
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  list-style: none;
  font: 500 16px var(--mono);
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .brand {
    display: none;
  }

  .mobile-wordmark {
    display: inline-flex;
    font-size: 22px;
    color: var(--ink);
  }

  .main {
    padding: 20px;
  }

  .content {
    padding: 32px 0;
  }
}

/* The consent page a chat assistant's sign-in shows: one org to choose, or a new business. */
.choices {
  border: 0;
  margin: 0 0 8px;
  padding: 0;
}
.choices legend {
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
}
label.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-weight: 500;
  cursor: pointer;
}
label.choice:has(input:checked) {
  border-color: var(--acc);
  box-shadow: 0 0 0 1px var(--acc);
}
label.choice .meta {
  margin-left: auto;
  color: var(--mut);
  font-family: var(--mono);
  font-size: 12px;
}
.content ul.small-print {
  margin: 0 0 16px;
  padding-left: 20px;
}
.content ul.small-print li {
  margin-bottom: 4px;
}
