/* Auth chrome — split panel. Ink brand rail, sheet form. Scoped so the portal keeps its own tokens. */
@font-face { font-family: "Libre Caslon Display"; src: url("/fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

.auth-shell {
  --ink: #141312;
  --ink-2: #1D1C1A;
  --paper: #EBEBE8;
  --sheet: #F6F6F3;
  --paper-2: #E1E1DC;
  --field: #FBFBF9;
  --text-2: #3C3934;
  --text-3: #57534C;
  --text-disabled: #6F6A62;
  --rule: #CFCDC6;
  --rule-strong: #8F897F;
  --action: #A63A2B;
  --action-hover: #8C2F22;
  --action-press: #74261B;
  --on-action: #F6F5F2;
  --on-ink: #F6F6F3;
  --focus: #141312;
  --f-display: "Libre Caslon Display", "Times New Roman", serif;
  --f-ui: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Plex Mono", ui-monospace, monospace;
  --t-12: 12px;
  --t-13: 13px;
  --t-14: 14px;
  --t-15: 15px;
  --t-16: 16px;
  --r-sm: 4px;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(280px, 42%) 1fr;
  background: var(--sheet);
  color: var(--ink);
  font: 400 var(--t-15)/1.5 var(--f-ui);
  caret-color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.auth-shell ::selection { background: var(--ink); color: var(--on-ink); }
.auth-shell .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.auth-shell .auth-brand {
  background: var(--ink);
  color: var(--on-ink);
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100dvh;
}
.auth-shell .auth-brand ::selection { background: var(--on-ink); color: var(--ink); }
.auth-shell .auth-brand .wordmark {
  font: 400 28px/1 var(--f-display);
  letter-spacing: -0.01em;
  color: var(--on-ink);
  text-decoration: none;
}
.auth-shell .auth-brand .thesis {
  max-width: 28ch;
  margin: 0;
  font: 400 28px/1.25 var(--f-display);
  letter-spacing: -0.015em;
  color: var(--on-ink);
}
.auth-shell .auth-brand .thesis span {
  display: block;
  margin-top: 16px;
  font: 400 14px/1.55 var(--f-ui);
  color: rgb(235 235 232 / .72);
  letter-spacing: 0;
}
.auth-shell .auth-brand .meta {
  margin: 0;
  font: 400 12px/1.4 var(--f-ui);
  color: rgb(235 235 232 / .5);
}
.auth-shell .auth-form-pane {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--sheet);
}
.auth-shell .auth-mobile-mark {
  display: none;
  font: 400 22px/1 var(--f-display);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.auth-shell .auth-form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px 32px;
}
.auth-shell .auth-main {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 0;
  padding: 0;
  overflow: visible;
}
.auth-shell .auth-card { width: 100%; max-width: 360px; }
.auth-shell .auth-card .t-title {
  margin: 0 0 8px;
  font: 600 24px/1.2 var(--f-ui);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.auth-shell .lead {
  margin: 0 0 28px;
  color: var(--text-3);
  font-size: var(--t-14);
  line-height: 1.5;
}
.auth-shell .lead b { font-weight: 600; color: var(--ink); word-break: break-word; }
.auth-shell form { display: grid; gap: 20px; }
.auth-shell .field { display: grid; gap: 8px; margin: 0; }
.auth-shell .field > label { font: 500 13px/1.2 var(--f-ui); color: var(--ink); }
.auth-shell .helper { margin: 0; font-size: var(--t-12); color: var(--text-3); line-height: 1.45; }
.auth-shell .input {
  height: 44px;
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  background: #fff;
  font: 400 var(--t-15)/1 var(--f-ui);
  color: var(--ink);
}
.auth-shell .input:hover { border-color: var(--text-3); }
.auth-shell .input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}
.auth-shell .input.is-error { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.auth-shell .input::placeholder { color: var(--text-3); }
.auth-shell .input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px #fff inset;
  caret-color: var(--ink);
}
.auth-shell .code-in {
  height: 52px;
  min-height: 52px;
  font: 500 22px/1 var(--f-mono);
  letter-spacing: 0.32em;
  text-align: center;
  padding-left: 0.32em;
  padding-right: 0;
  font-variant-numeric: tabular-nums;
}
.auth-shell .code-in::placeholder { letter-spacing: 0.32em; color: var(--text-3); }
.auth-shell .field-error { margin: 0; font-size: var(--t-13); color: var(--ink); font-weight: 500; line-height: 1.4; }
.auth-shell .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-sm);
  font: 500 var(--t-14)/1 var(--f-ui);
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
}
.auth-shell .btn.wide { width: 100%; }
.auth-shell .btn.btn-lg { height: 44px; padding: 0 16px; font-size: var(--t-14); }
.auth-shell .btn.btn-primary { background: var(--action); color: var(--on-action); }
.auth-shell .btn.btn-primary:hover { background: var(--action-hover); }
.auth-shell .btn.btn-primary:active { background: var(--action-press); }
.auth-shell .btn:disabled,
.auth-shell .btn[aria-disabled="true"] { background: var(--paper-2); color: var(--text-disabled); cursor: not-allowed; }
.auth-shell a:focus-visible,
.auth-shell button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.auth-shell .auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 20px;
  font-size: var(--t-13);
  color: var(--text-3);
}
.auth-shell .auth-links a,
.auth-shell .auth-links .textlink {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.auth-shell .auth-links button:disabled,
.auth-shell .auth-links .textlink:disabled { color: var(--text-disabled); cursor: not-allowed; text-decoration: none; }
.auth-shell .trust {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: var(--t-12);
  color: var(--text-3);
  line-height: 1.45;
}
.auth-shell .cross {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 8px;
  font-size: var(--t-13);
  color: var(--text-3);
}
.auth-shell .cross p { margin: 0; }
.auth-shell .cross a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 3px;
}
.auth-shell .invite-meta {
  margin: 0 0 28px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  display: grid;
  gap: 4px;
  font-size: var(--t-14);
}
.auth-shell .invite-meta .k { color: var(--text-3); font-size: var(--t-13); }
.auth-shell .invite-meta .v { font-weight: 600; color: var(--ink); word-break: break-word; }
.auth-shell .status-banner {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  background: var(--paper-2);
  font-size: var(--t-14);
  line-height: 1.45;
  color: var(--ink);
}
.auth-shell .status-banner strong { display: block; margin-bottom: 4px; font-weight: 600; }
.auth-shell .auth-foot {
  flex: none;
  padding: 0 40px 28px;
  border: 0;
  font-size: var(--t-12);
  color: var(--text-3);
  text-align: center;
}
.auth-shell .auth-foot p { margin: 0; }
.auth-shell .auth-foot a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 3px;
}
.auth-shell .toast {
  position: static;
  opacity: 1;
  pointer-events: auto;
  margin: 0 0 16px;
  padding: 10px 12px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--r-sm);
  font-size: var(--t-14);
  font-weight: 500;
}
body.auth-body {
  margin: 0;
  min-height: 100vh;
  background: #F6F6F3;
  color: #141312;
  font-family: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
}
.auth-shell .btn.is-busy { gap: 0; cursor: wait; }
.auth-shell .btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 10px;
  border: 2px solid color-mix(in srgb, var(--on-action) 35%, transparent);
  border-top-color: var(--on-action);
  border-radius: 50%;
  animation: ck-spin 0.7s linear infinite;
  vertical-align: -3px;
  flex-shrink: 0;
}
.auth-shell .btn-spinner.on-ink,
.auth-shell .textlink .btn-spinner {
  border-color: color-mix(in srgb, var(--ink) 25%, transparent);
  border-top-color: var(--ink);
}
.auth-shell .btn.btn-primary.is-busy:disabled,
.auth-shell .btn.btn-primary.is-busy[aria-disabled="true"] {
  background: var(--action);
  color: var(--on-action);
  opacity: 0.92;
  cursor: wait;
}
.auth-shell .auth-links .textlink.is-busy:disabled { color: var(--ink); cursor: wait; text-decoration: none; }
@keyframes ck-spin { to { transform: rotate(360deg); } }
.auth-shell .mail-off h2 { margin: 0 0 8px; font: 600 24px/1.2 var(--f-ui); letter-spacing: -0.02em; }
.auth-shell .mail-off p { margin: 0; color: var(--text-3); font-size: var(--t-14); line-height: 1.5; }
@media (max-width: 840px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-shell .auth-brand { display: none; }
  .auth-shell .auth-mobile-mark {
    display: block;
    padding: max(20px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
  }
  .auth-shell .auth-form-wrap { align-items: flex-start; padding: 24px 20px 24px; }
  .auth-shell .auth-foot { padding: 0 20px max(24px, env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-shell .btn-spinner { animation: none; }
}
