/* Default Aloka palette. Auth and wait pages follow the system when no workspace iframe is present. */
:root {
  color-scheme: light;
  --canvas: #f5f7fa;
  --surface: #ffffff;
  --soft: #fafbfd;
  --ink: #18263b;
  --muted: #647187;
  --line: #e0e6ef;
  --blue: #315ed8;
  --on-blue: #ffffff;
  --hover: rgba(24, 38, 59, .055);
  --active: rgba(49, 94, 216, .1);
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(24, 38, 59, .08);
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
}
body[data-ds-dark-theme] {
  color-scheme: dark;
  --canvas: #10151d;
  --surface: #181f29;
  --soft: #121a25;
  --ink: #e6edf7;
  --muted: #a4b1c5;
  --line: #303c4d;
  --blue: #a1baff;
  --on-blue: #14244e;
  --hover: rgba(230, 237, 247, .08);
  --active: rgba(161, 186, 255, .16);
  --danger: #ff8a80;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
@media (prefers-color-scheme: dark) {
  body:not(.is-app) {
    color-scheme: dark;
    --canvas: #10151d;
    --surface: #181f29;
    --soft: #121a25;
    --ink: #e6edf7;
    --muted: #a4b1c5;
    --line: #303c4d;
    --blue: #a1baff;
    --on-blue: #14244e;
    --hover: rgba(230, 237, 247, .08);
    --active: rgba(161, 186, 255, .16);
    --danger: #ff8a80;
    --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 28%, transparent); outline-offset: 3px; }
body.is-auth {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}
body.is-app { overflow: hidden; }
.entry-card {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.entry-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px 32px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.entry-mark {
  display: block;
  flex: none;
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.card { padding: 24px 32px 32px; }
.wordmark { margin: 0 0 10px; font-size: 26px; font-weight: 650; line-height: 1.25; letter-spacing: -.025em; }
.lede { margin: 0 0 28px; color: var(--muted); font-size: 13px; line-height: 1.6; }
form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
label { color: var(--ink); font-size: 13px; font-weight: 550; }
input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--soft);
}
input:hover { border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
input:focus { border-color: var(--blue); background: var(--surface); }
input[aria-invalid="true"] { border-color: var(--danger); }
.hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.error { min-height: 1.4em; margin: 0; color: var(--danger); font-size: 12px; }
.actions { display: grid; gap: 18px; margin-top: 0; }
.primary {
  appearance: none;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 10px;
  color: var(--on-blue);
  background: var(--blue);
  font-weight: 550;
  cursor: pointer;
  transition: filter .15s ease;
}
.primary:hover { filter: brightness(.92); }
.primary:disabled, .ghost:disabled { opacity: .55; cursor: wait; }
.switch { justify-self: center; font-size: 12px; }
.wait { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 20px; }
.wait-copy { display: grid; gap: 10px; }
.wait-copy h1 { margin: 0; font-size: 24px; line-height: 1.3; font-weight: 650; letter-spacing: -.025em; }
.wait-copy .lede { margin: 0; }
.wait .actions { margin-top: 20px; }
.pulse { width: 10px; height: 10px; margin-bottom: 18px; border-radius: 50%; background: var(--blue); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.reason { margin: 0; color: var(--muted); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.shell { position: relative; display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.workspace-loading { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; background: var(--surface); }
.workspace-loading[hidden] { display: none; }
.workspace-loading h1 { margin-top: 0; font-size: 24px; }
.workspace-loading button { margin-top: 18px; }
.workspace { flex: 1 1 auto; width: 100%; min-height: 0; border: 0; background: var(--surface); }
@media (max-width: 480px) {
  body.is-auth { padding: 24px 16px; }
  .entry-kicker { padding: 24px 24px 0; }
  .card { padding: 24px; }
  .wordmark { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.kicker-label { flex: 1; min-width: 0; }
.language-select { max-width: 90px; min-height: 32px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--soft); font: inherit; font-size: 11px; cursor: pointer; }
