/* Celetu auth — framed sheet
   Paper frame, white form sheet, Figtree, one rust action.
   Tokens from static/css/landing-editorial.css. */

:root {
  --auth-paper: #f1f1ee;
  --auth-sheet: #ffffff;
  --auth-ink: #0f0f0e;
  --auth-ink-2: #26251f;
  --auth-muted: #6f6d67;
  --auth-rule: #e5e3df;
  --auth-control: #d8d4cb;
  --auth-accent: #c7421a;
  --auth-accent-dark: #a8371a;
  --auth-error: #8e2a1b;
  --auth-error-bg: #fdf1ef;
  --auth-error-rule: #f0d2cb;
  --auth-radius-sheet: 16px;
  --auth-radius-control: 8px;
  --auth-font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --auth-control-h: 48px;
}

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

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

body.auth-page {
  margin: 0;
  min-height: 100svh;
  background: var(--auth-paper);
  color: var(--auth-ink);
  font-family: var(--auth-font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.auth-page a {
  color: inherit;
}

body.auth-page .auth-skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: var(--auth-radius-control);
  background: var(--auth-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.auth-skip:focus {
  top: 16px;
}

/* ── Frame and sheet ───────────────────────────────────────── */

.auth-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 620px);
  min-height: 100svh;
  padding: 16px;
}

.auth-aside {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 40px 48px 28px;
}

.auth-aside-main {
  width: 100%;
  max-width: 500px;
  margin: auto 0;
  padding: 48px 0;
}

.auth-sheet {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 48px;
  background: var(--auth-sheet);
  border: 1px solid var(--auth-rule);
  border-radius: var(--auth-radius-sheet);
}

.auth-sheet-inner {
  width: 100%;
  max-width: 420px;
}

/* ── Brand ─────────────────────────────────────────────────── */

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

.auth-brand img {
  display: block;
  width: 30px;
  height: 30px;
}

.auth-brand:hover span {
  color: var(--auth-ink-2);
}

.auth-brand-mobile {
  display: none;
  margin-bottom: 34px;
}

/* ── Aside copy ────────────────────────────────────────────── */

.auth-statement {
  max-width: 14em;
  margin: 0 0 22px;
  font-size: clamp(28px, 2.4vw, 34px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.auth-aside-note {
  max-width: 46ch;
  margin: 0 0 34px;
  font-size: 16px;
  color: var(--auth-muted);
  font-size: 16px;
  line-height: 1.55;
}

.auth-aside-note:empty {
  display: none;
}

.auth-aside-note:empty + .auth-probe {
  margin-top: 10px;
}

.auth-aside-note a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.auth-aside-note a:hover {
  color: var(--auth-ink);
}

/* ── Product fragment ──────────────────────────────────────── */

.auth-probe {
  width: 100%;
  max-width: 420px;
  padding: 18px 20px 16px;
  background: #fff;
  border: 1px solid var(--auth-rule);
  border-radius: 10px;
}

.auth-probe-block + .auth-probe-block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--auth-rule);
}

.auth-probe-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: var(--auth-muted);
  font-size: 12px;
  font-weight: 500;
}

.auth-probe-label img {
  display: block;
  width: 16px;
  height: 16px;
  flex: none;
}

.auth-probe-question {
  margin: 0 0 8px;
  color: var(--auth-ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.auth-probe-answer {
  margin: 0 0 10px;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.45;
}

.auth-probe-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--auth-ink);
  font-size: 13px;
  font-weight: 500;
}

.auth-probe-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--auth-accent);
  flex: none;
}

.auth-probe-thread {
  margin: 0 0 12px;
  color: var(--auth-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.auth-probe-draft-label {
  margin: 0 0 6px;
  color: var(--auth-muted);
  font-size: 11px;
  font-weight: 500;
}

.auth-probe-draft {
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--auth-paper);
  color: var(--auth-ink-2);
  font-size: 13px;
  line-height: 1.45;
}

.auth-probe-example {
  margin: 14px 0 0;
  color: var(--auth-muted);
  font-size: 11px;
}

/* ── Aside footer ──────────────────────────────────────────── */

.auth-aside-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  color: var(--auth-muted);
  font-size: 13px;
}

.auth-aside-footer nav {
  display: flex;
  gap: 16px;
}

.auth-aside-footer a {
  text-decoration: none;
}

.auth-aside-footer a:hover {
  color: var(--auth-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Headings ──────────────────────────────────────────────── */

.auth-head {
  margin-bottom: 28px;
}

.auth-head h1 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.auth-sub {
  margin: 0;
  color: var(--auth-muted);
  font-size: 15px;
  line-height: 1.5;
}

/* ── Forms ─────────────────────────────────────────────────── */

.auth-form {
  margin: 0;
}

.auth-field {
  margin-bottom: 18px;
}

.auth-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--auth-ink);
  font-size: 14px;
  font-weight: 500;
}

.auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.auth-label-row label {
  margin-bottom: 8px;
}

.auth-text-link {
  color: var(--auth-muted);
  font-size: 13px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.auth-text-link:hover {
  color: var(--auth-ink);
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
  display: block;
  width: 100%;
  height: var(--auth-control-h);
  padding: 0 14px;
  border: 1px solid var(--auth-control);
  border-radius: var(--auth-radius-control);
  background: #fff;
  color: var(--auth-ink);
  font-family: var(--auth-font);
  font-size: 15px;
  line-height: normal;
  transition: border-color 120ms ease;
}

.auth-field input::placeholder {
  color: var(--auth-muted);
  opacity: 1;
}

.auth-field input:hover {
  border-color: #c4bfb5;
}

.auth-field input:focus {
  border-color: var(--auth-ink);
  outline: 2px solid var(--auth-ink);
  outline-offset: 1px;
}

.auth-field input[aria-invalid="true"] {
  border-color: var(--auth-error);
}

.auth-field-error {
  margin: 7px 0 0;
  color: var(--auth-error);
  font-size: 13px;
  line-height: 1.4;
}

.auth-help {
  margin: 7px 0 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.4;
}

.auth-password {
  position: relative;
}

.auth-password input {
  padding-right: 68px;
}

.auth-reveal {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 50%;
  right: 5px;
  height: 36px;
  margin-top: -18px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--auth-muted);
  font-family: var(--auth-font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.auth-reveal:hover {
  background: var(--auth-paper);
  color: var(--auth-ink);
}

.auth-reveal:focus-visible {
  outline: 2px solid var(--auth-ink);
  outline-offset: 1px;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 24px;
  color: var(--auth-ink-2);
  font-size: 14px;
  cursor: pointer;
}

.auth-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--auth-ink);
  flex: none;
}

.auth-submit {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--auth-control-h);
  margin-top: 24px;
  padding: 0 20px;
  border: 1px solid var(--auth-accent);
  border-radius: var(--auth-radius-control);
  background: var(--auth-accent);
  color: #fff;
  font-family: var(--auth-font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.auth-submit:hover {
  background: var(--auth-accent-dark);
  border-color: var(--auth-accent-dark);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-submit:focus-visible {
  outline: 2px solid var(--auth-ink);
  outline-offset: 2px;
}

body.auth-page a.auth-submit {
  color: #fff;
  text-decoration: none;
}

/* ── Alternate sign-in ─────────────────────────────────────── */

.auth-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 16px;
  color: var(--auth-muted);
  font-size: 13px;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-rule);
}

.auth-providers {
  display: grid;
  gap: 10px;
}

.auth-google {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: var(--auth-control-h);
  padding: 0 18px;
  border: 1px solid var(--auth-control);
  border-radius: var(--auth-radius-control);
  background: #fff;
  color: var(--auth-ink);
  font-family: var(--auth-font);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.auth-google:hover {
  background: var(--auth-paper);
  border-color: #c4bfb5;
}

.auth-google:active {
  transform: translateY(1px);
}

.auth-google:focus-visible {
  outline: 2px solid var(--auth-ink);
  outline-offset: 2px;
}

.auth-google svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ── Links and notes under the form ────────────────────────── */

.auth-switch {
  margin: 26px 0 0;
  color: var(--auth-muted);
  font-size: 14px;
}

.auth-switch a {
  color: var(--auth-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.auth-switch a:hover {
  text-decoration-thickness: 2px;
}

.auth-legal {
  max-width: 44ch;
  margin: 32px 0 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-legal a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.auth-legal a:hover {
  color: var(--auth-ink);
}

.auth-mobile-note {
  display: none;
  margin: 26px 0 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-note {
  margin: 0 0 22px;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-note a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.auth-note-spaced {
  margin-top: 22px;
}

/* ── Messages ──────────────────────────────────────────────── */

.auth-messages {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.auth-message {
  margin: 0;
  padding: 11px 14px;
  border: 1px solid var(--auth-rule);
  border-radius: var(--auth-radius-control);
  background: var(--auth-paper);
  color: var(--auth-ink);
  font-size: 14px;
  line-height: 1.45;
}

.auth-message-error {
  border-color: var(--auth-error-rule);
  background: var(--auth-error-bg);
  color: var(--auth-error);
}

/* ── Phone and tablet ──────────────────────────────────────── */

@media (max-width: 960px) {
  .auth-frame {
    display: block;
    padding: 8px;
  }

  .auth-aside {
    display: none;
  }

  .auth-sheet {
    align-items: flex-start;
    min-height: calc(100svh - 16px);
    padding: 30px 24px 28px;
    border-radius: 12px;
  }

  .auth-sheet-inner {
    max-width: 440px;
    margin: 0 auto;
  }

  .auth-brand-mobile {
    display: inline-flex;
  }

  .auth-mobile-note {
    display: block;
  }
}

@media (max-width: 600px) {
  .auth-sheet {
    padding: 24px 20px;
  }

  .auth-brand-mobile {
    margin-bottom: 30px;
  }

  .auth-head h1 {
    font-size: 26px;
  }

  .auth-field input[type="text"],
  .auth-field input[type="email"],
  .auth-field input[type="password"] {
    font-size: 16px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .auth-submit,
  .auth-google,
  .auth-field input,
  .auth-reveal {
    transition: none;
  }

  .auth-submit:active,
  .auth-google:active {
    transform: none;
  }
}
