/* IPX auth (sign in / sign up) — landing's cream/serif aesthetic, scoped
   under .authp so it never touches the amber console theme. */

.authp {
  --bg: #faf9f7;
  --fg: #18130d;
  --ink: 24, 19, 13;
  --mut: #6d685f;
  --line: rgba(24, 19, 13, 0.12);
  --accent: #b4661f;
  --sans: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.authp *, .authp *::before, .authp *::after { box-sizing: border-box; }
.authp a { color: inherit; text-decoration: none; }
.authp .serif { font-family: var(--serif); font-weight: 400; }

.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100dvh; }

/* ---------- brand panel (dark, ascii sphere) — sits on the right ---------- */
.auth-aside { order: 2; position: relative; overflow: hidden; background: var(--fg); color: var(--bg); display: flex; flex-direction: column; }
.auth-aside canvas { position: absolute; left: -12%; top: 50%; transform: translateY(-50%); width: 760px; height: 760px; opacity: 0.5; pointer-events: none; }
.auth-aside .grid-lines {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image:
    repeating-linear-gradient(to right, rgba(250, 249, 247, 0.06) 0 1px, transparent 1px 25%),
    repeating-linear-gradient(to bottom, rgba(250, 249, 247, 0.06) 0 1px, transparent 1px 16.66%);
}
.auth-aside-inner { position: relative; z-index: 2; display: flex; flex-direction: column; height: 100%; padding: clamp(40px, 6vw, 80px); }
.auth-home { font-size: 14px; color: rgba(250, 249, 247, 0.6); transition: color .2s; }
.auth-home:hover { color: var(--bg); }
.auth-mark { margin-top: auto; }
.auth-mark .nm { font-family: var(--serif); font-size: 40px; letter-spacing: -0.02em; }
.auth-mark .tm { font-family: var(--mono); font-size: 13px; color: rgba(250, 249, 247, 0.5); margin-left: 4px; }
.auth-aside h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.04; letter-spacing: -0.02em; margin: 20px 0 28px; max-width: 14ch; }
.auth-points { list-style: none; margin: 0 0 auto; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-points li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: rgba(250, 249, 247, 0.75); }
.auth-points li svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: rgba(250, 249, 247, 0.55); }
.auth-aside-foot { font-family: var(--mono); font-size: 12px; color: rgba(250, 249, 247, 0.4); padding-top: 28px; }

/* ---------- form panel ---------- */
.auth-main { order: 1; display: flex; align-items: center; justify-content: center; padding: clamp(40px, 6vw, 72px) 24px; }
.auth-form { width: 100%; max-width: 380px; }
.auth-top-logo { display: none; align-items: baseline; gap: 6px; margin-bottom: 36px; }
.auth-top-logo .nm { font-family: var(--serif); font-size: 26px; }
.auth-top-logo .tm { font-family: var(--mono); font-size: 11px; color: var(--mut); }

.auth-form h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 44px); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 10px; }
.auth-form .sub { font-size: 16px; color: var(--mut); margin: 0 0 32px; }

/* oauth buttons (shared partial: .oauth-buttons > form > button.btn.btn-oauth) */
.authp .oauth-buttons { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.authp .oauth-buttons form { margin: 0; }
.authp .btn-oauth {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 18px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--fg);
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  transition: border-color .2s, background .2s;
}
.authp .btn-oauth:hover { border-color: rgba(var(--ink), 0.3); background: rgba(var(--ink), 0.02); }
.authp .oauth-ico { width: 18px; height: 18px; }
.authp .auth-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--mut); font-size: 13px; }
.authp .auth-divider::before, .authp .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* fields */
.auth-fields { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 500; color: var(--fg); }
.field input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--fg);
  font-family: var(--sans); font-size: 15px; transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: rgba(var(--ink), 0.32); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(180, 102, 31, 0.12); }

.auth-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; margin: 2px 0; font-size: 13.5px; line-height: 1.5; color: var(--mut); }
.auth-check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  flex: none; width: 18px; height: 18px; margin-top: 1px;
  border: 1px solid var(--line); border-radius: 5px; background: #fff; cursor: pointer;
  display: grid; place-content: center; transition: background .15s, border-color .15s;
}
.auth-check input[type="checkbox"]:checked { background: var(--fg); border-color: var(--fg); }
.auth-check input[type="checkbox"]:checked::after {
  content: ""; width: 11px; height: 11px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23faf9f7' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
.auth-check input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(180, 102, 31, 0.15); }

.auth-submit {
  width: 100%; height: 50px; margin-top: 4px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--fg); color: var(--bg); font-family: var(--sans); font-size: 15.5px; font-weight: 500;
  transition: background .2s, transform .15s;
}
.auth-submit:hover { background: rgba(var(--ink), 0.88); }
.auth-submit:active { transform: translateY(1px); }

/* flash + footers */
.auth-flash { margin-bottom: 22px; padding: 12px 14px; border-radius: 10px; font-size: 14px; border: 1px solid rgba(220, 38, 38, 0.3); background: rgba(220, 38, 38, 0.06); color: #b91c1c; }
.auth-alt { margin-top: 28px; font-size: 15px; color: var(--mut); }
.auth-alt a { color: var(--accent); font-weight: 500; }
.auth-alt a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-legal { margin-top: 20px; font-size: 13px; line-height: 1.55; color: var(--mut); }
.auth-legal a { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-top-logo { display: inline-flex; }
}
