/* Copyright (c) 2026 Ulifyi Group. All rights reserved. */
/* Plain black and white: a login should be simple and self-explanatory. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/auth/static/fonts/inter-latin.woff2") format("woff2");
}

:root {
  --ground: #000;
  --ink: #f5f5f7;
  --ink-soft: #c7c7cf;
  --muted: #8e8e98;
  --faint: #5f5f69;
  --line: rgba(255, 255, 255, 0.12);
  --fill: rgba(255, 255, 255, 0.06);
  --fill-hover: rgba(255, 255, 255, 0.09);
  --danger: #ff8a7d;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html, body { margin: 0; min-height: 100%; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

[hidden] { display: none !important; }

button, input { font: inherit; letter-spacing: inherit; color: inherit; }

a { color: inherit; }

/* ── Top bar ─────────────────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  height: 68px;
  padding: 0 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.wordmark-logo { display: block; width: auto; height: 17px; }

.brand-divider { width: 1px; height: 18px; background: var(--line); }

.brand-product { color: var(--ink-soft); font-size: 15px; font-weight: 500; }

/* ── Layout ──────────────────────────────────────────────────────────── */

.shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 48px;
}

.panel { width: 100%; max-width: 400px; }

.hero { margin-bottom: 30px; text-align: center; animation: rise 420ms var(--ease-out) both; }

h1 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.028em;
}

.lead { margin: 0; color: var(--muted); font-size: 15px; }

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

.publisher { color: var(--faint); }

.step { animation: rise 380ms var(--ease-out) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ── Account row: signed-in user and the step-2 identity ─────────────── */

.account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 10px;
  border-radius: 18px;
  background: var(--fill);
  animation: rise 320ms var(--ease-out) both;
}

#session-step .account { margin-bottom: 18px; padding: 12px; }

.avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

#session-step .avatar { width: 44px; height: 44px; }

.avatar.initial {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #000;
  font-size: 16px;
  font-weight: 650;
  text-transform: uppercase;
}

.account-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }

.account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
}

.account-sub { color: var(--muted); font-size: 13px; }

/* ── Identity pill (step 2): the account, tap to change it ─────────── */

.identity { display: flex; justify-content: center; margin: -8px 0 6px; animation: rise 320ms var(--ease-out) both; }

.identity-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.identity-pill:hover { background: var(--fill); border-color: rgba(255, 255, 255, 0.22); }

.identity-initial {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: #000;
  font-size: 12.5px;
  font-weight: 650;
  text-transform: uppercase;
}

.identity-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 550;
}

.identity-pill .chevron { width: 14px; height: 14px; color: var(--muted); }

.identity-pill:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.6); outline-offset: 3px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Form ────────────────────────────────────────────────────────────── */

form { display: flex; flex-direction: column; gap: 18px; }

.field { display: flex; flex-direction: column; gap: 7px; animation: rise 320ms var(--ease-out) both; }

.label { font-size: 13.5px; font-weight: 550; color: var(--ink-soft); }

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

.control { position: relative; }

.control input {
  width: 100%;
  height: 50px;
  padding: 0 15px 0 43px;
  border: 0;
  border-radius: 14px;
  background: var(--fill);
  font-size: 15px;
  outline: none;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.control input::placeholder { color: var(--faint); }

.control input:hover { background: var(--fill-hover); }

.control input:focus { background: var(--fill-hover); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28); }

.control input:-webkit-autofill,
.control input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 100px #141418 inset;
  caret-color: var(--ink);
}

.control-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  display: flex;
  color: var(--faint);
  transform: translateY(-50%);
  pointer-events: none;
  transition: color 160ms ease;
}

.control:focus-within .control-icon { color: var(--ink-soft); }

.icon { width: 16px; height: 16px; flex: none; }

#password { padding-right: 50px; }

.reveal {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--faint);
  transform: translateY(-50%);
  cursor: pointer;
}

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

.reveal-show { display: flex; }

.reveal .reveal-hide, .reveal[aria-pressed="true"] .reveal-show { display: none; }

.reveal[aria-pressed="true"] .reveal-hide { display: flex; }

.field.invalid .control input { box-shadow: 0 0 0 2px rgba(255, 138, 125, 0.6); }

.error {
  margin: -6px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 550;
  animation: shake 260ms ease-in-out;
}

.error:empty { display: none; }

@keyframes shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ── Remember ────────────────────────────────────────────────────────── */

.remember {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
}

.remember input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.box {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--faint);
  border-radius: 6px;
  color: transparent;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.box .icon { width: 13px; height: 13px; stroke-width: 2.4; }

.remember input:checked + .box { border-color: var(--ink); background: var(--ink); color: #000; }

.remember input:focus-visible + .box { outline: 2px solid rgba(255, 255, 255, 0.5); outline-offset: 2px; }

/* ── Buttons & links ─────────────────────────────────────────────────── */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms var(--ease-out), background-color 160ms ease;
}

.btn:active { transform: scale(0.97); }

.btn.primary { border: 0; background: var(--ink); color: #0b0b0e; }

.btn.primary:hover { background: #fff; }

.btn.primary .icon { width: 15px; height: 15px; stroke-width: 2; transition: transform 160ms var(--ease-out); }

.btn.primary:hover .icon { transform: translateX(2px); }

.btn.ghost { margin-top: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); }

.btn.ghost:hover { background: var(--fill); }

.btn[disabled] { cursor: progress; }

.btn.loading .btn-label, .btn.loading .icon { opacity: 0; }

.btn.loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.link {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 550;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--faint);
}

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

.link.small { font-size: 12.5px; color: var(--muted); }

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

.signup { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: 13.5px; }

.btn:focus-visible, .link:focus-visible, .reveal:focus-visible, .brand:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

/* ── Notice ──────────────────────────────────────────────────────────── */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 138, 125, 0.28);
  border-radius: 16px;
  background: rgba(255, 138, 125, 0.08);
  color: #ffd9d4;
  font-size: 13.5px;
  animation: rise 260ms var(--ease-out) both;
}

.notice .icon { margin-top: 2px; color: var(--danger); }

/* ── Passkeys ──────────────────────────────────────────────────────── */

.passkey-signin { margin-top: 4px; }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 8px;
  color: var(--faint);
  font-size: 12.5px;
}

.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.passkey-signin .btn.ghost { margin-top: 0; }

.btn.ghost .icon { width: 18px; height: 18px; }

.offer { text-align: center; }

.offer-mark {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
}

.offer-mark .icon { width: 28px; height: 28px; stroke-width: 1.6; }

.offer.done .offer-mark { background: var(--ink); color: #000; border-color: var(--ink); }

.offer .lead { margin-bottom: 28px; }

.offer-actions { display: flex; flex-direction: column; gap: 0; }

.code-form { margin-top: 4px; text-align: left; }

.code-form #code { letter-spacing: 0.18em; font-variant-numeric: tabular-nums; }

.code-back {
  display: block;
  margin: 18px auto 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.offer-note { margin: 22px 0 0; color: var(--faint); font-size: 12.5px; line-height: 1.5; }

/* ── Services ──────────────────────────────────────────────────────── */

.services {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 40px 0 0;
  color: var(--faint);
  font-size: 12.5px;
}

.services img { border-radius: 6px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16); }

.services img + img { margin-right: 4px; }

/* ── Footer ──────────────────────────────────────────────────────────── */

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 24px 20px 28px;
  color: var(--faint);
  font-size: 12px;
}

.footer p { margin: 0; }

.env strong { color: var(--muted); }

/* Kept in the page for password managers while visually removed. */
.offscreen {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 480px) {
  .topbar { padding: 0 20px; }
  .shell { align-items: flex-start; padding-top: 28px; }
  h1 { font-size: 26px; }
}

/* ── Account page ──────────────────────────────────────────────────────── */

.shell.wide { align-items: flex-start; padding-top: 24px; }

.shell.wide .panel { max-width: 1040px; }

.manage {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.account-nav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 20px; }

.nav-user { display: flex; align-items: center; gap: 12px; padding: 4px 4px 0; }

.nav-user img { border-radius: 50%; object-fit: cover; flex: none; }

.nav-user-text { display: flex; flex-direction: column; min-width: 0; }

.nav-user-name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-user-sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }

.nav-list a, .nav-signout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.nav-list a:hover, .nav-signout:hover { background: var(--fill); color: var(--ink); }

.nav-list a.active { background: var(--fill-hover); color: var(--ink); }

.nav-list .icon, .nav-signout .icon { width: 18px; height: 18px; }

.nav-signout { color: var(--muted); }

.account-view { min-width: 0; outline: none; animation: rise 300ms var(--ease-out) both; }

.view-head { margin-bottom: 28px; text-align: center; }

.view-head.left { text-align: left; }

.view-head .view-avatar { display: block; margin: 0 auto 16px; border-radius: 50%; object-fit: cover; }

.view-head h1 { font-size: 28px; }

.signout-mobile { display: none; justify-content: center; gap: 8px; margin: 8px auto 0; width: auto; }

.view-head .meta { margin: 8px 0 0; color: var(--faint); font-size: 13px; }

.card {
  margin-bottom: 20px;
  padding: 22px 24px 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }

.card h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

.card-lead { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }

.card-foot { padding: 14px 0 16px; border-top: 1px solid var(--line); }

.rows { margin: 0; padding: 0; list-style: none; }

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.rows > li:first-child > .row, .rows > .row:first-child { border-top: 0; }

.rows > li { list-style: none; }

.link-row { color: inherit; text-decoration: none; }

.link-row:hover .row-main { color: var(--ink); }

.link-row > .icon:last-child { color: var(--faint); }

.row-main { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }

.row-label { color: var(--muted); font-size: 12.5px; font-weight: 550; }

.row-value { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; }

.row-value.empty { color: var(--faint); font-weight: 400; }

.row-note { color: var(--muted); font-size: 12.5px; }

.row-actions { display: flex; gap: 14px; flex: none; }

.status {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--fill);
  color: var(--ink-soft);
}

.status .icon { width: 17px; height: 17px; }

.status.ok { background: var(--ink); color: #000; }

.status.todo { color: var(--danger); }

.tag {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 550;
}

.tag.strong { border-color: var(--ink); color: var(--ink); }

.btn-text {
  flex: none;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
}

.btn-text:hover { text-decoration: underline; text-underline-offset: 3px; }

.btn-text.danger, .danger-text { color: var(--danger) !important; }

.btn.small { white-space: nowrap; flex: none; width: auto; height: 38px; padding: 0 16px; margin: 0; font-size: 13.5px; }

.btn.danger { border: 0; background: var(--danger); color: #1a0705; }

.edit-form { display: flex; flex: 1; flex-direction: column; gap: 8px; }

.edit-form input, .edit-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--fill);
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  outline: none;
  resize: vertical;
}

.edit-form input:focus, .edit-form textarea:focus { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28); }

.field-hint { margin: 0; color: var(--muted); font-size: 12.5px; }

.field-hint:empty { display: none; }

.field-error { margin: 0; color: var(--danger); font-size: 13px; font-weight: 550; }

.field-error:empty { display: none; }

.edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.empty-note { margin: 4px 0 18px; color: var(--muted); font-size: 14px; }

dialog.confirm {
  width: min(420px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0d0d10;
  color: var(--ink);
}

dialog.confirm::backdrop { background: rgba(0, 0, 0, 0.7); }

dialog.confirm p { margin: 0 0 20px; font-size: 15px; line-height: 1.5; }

.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }

.confirm-actions .btn { width: auto; height: 40px; padding: 0 18px; margin: 0; }

.tag.todo { border-color: var(--danger); color: var(--danger); }

.input-with-action { position: relative; }

.input-with-action input { padding-right: 84px; }

.reveal-text { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: var(--muted); font-size: 12.5px; }

.label-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

.row-label.spaced { margin-top: 8px; }

.field-hint.strong { color: var(--ink-soft); font-size: 13.5px; }

.edit-actions.spread { justify-content: space-between; align-items: center; }

.edit-form .code-input { max-width: 200px; letter-spacing: 0.24em; font-variant-numeric: tabular-nums; font-size: 18px; }

.dialog-form h2 { margin: 0 0 8px; font-size: 19px; font-weight: 650; letter-spacing: -0.015em; }

dialog.confirm .dialog-lead { margin: 0 0 20px; color: var(--muted); font-size: 14px; }

.dialog-form .input-with-action input {
  width: 100%;
  margin-top: 6px;
  padding: 12px 84px 12px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--fill);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
}

.dialog-form .input-with-action input:focus { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28); }

.dialog-form .reveal-text { top: calc(50% + 3px); }

.dialog-form .field-error { margin: 8px 0 0; min-height: 0; }

.dialog-form .confirm-actions { margin-top: 20px; flex-wrap: wrap; }

.passkey-confirm { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin: 0; }

.passkey-confirm .icon { width: 18px; height: 18px; }

.dialog-or { margin: 14px 0 10px !important; color: var(--faint); font-size: 12.5px !important; text-align: center; }

dialog.confirm.wide { width: min(480px, calc(100vw - 32px)); }

.backup-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin: 0;
  padding: 18px 20px 18px 40px;
  border-radius: 14px;
  background: var(--fill);
  color: var(--muted);
  font-size: 13px;
}

.backup-codes code { color: var(--ink); font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: 0.04em; }

.setup { padding: 6px 0 18px; }

.setup-step { margin: 0 0 14px; color: var(--ink); font-size: 14px; font-weight: 550; }

.setup-qr { display: flex; align-items: center; gap: 22px; margin-bottom: 20px; }

.setup-qr .qr { flex: none; border-radius: 12px; background: #fff; }

.setup-key { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }

.secret { font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 14px; letter-spacing: 0.06em; overflow-wrap: anywhere; }

@media (max-width: 520px) {
  .setup-qr { flex-direction: column; align-items: flex-start; }
  .backup-codes { grid-template-columns: 1fr; }
}

.toggle-row { cursor: pointer; }

.switch { position: relative; flex: none; width: 44px; height: 26px; }

.switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--fill-hover);
  transition: background 160ms var(--ease-out);
  pointer-events: none;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink-soft);
  transition: transform 160ms var(--ease-out), background 160ms var(--ease-out);
}

.switch input:checked + .switch-track { background: var(--ink); }

.switch input:checked + .switch-track::after { transform: translateX(18px); background: #000; }

.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4); }

.switch input:disabled + .switch-track { opacity: 0.5; }

.row-avatar { flex: none; border-radius: 50%; object-fit: cover; background: var(--fill); }

.row-avatar.square { border-radius: 9px; }

.select {
  flex: none;
  max-width: 50%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--fill);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
}

/* ── Creating an account ── */

.register { position: relative; }

.register-progress { height: 3px; margin: -8px 0 26px; border-radius: 999px; background: var(--fill); overflow: hidden; }

.register-progress span { display: block; width: 0; height: 100%; background: var(--ink); transition: width 320ms var(--ease-out); }

.register-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: -12px 0 10px -4px;
  padding: 6px 8px 6px 4px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
}

.register-back:hover { color: var(--ink); }

.register-back .icon { width: 16px; height: 16px; transform: rotate(90deg); }

.register .field { margin-bottom: 16px; }

.register .field .error { margin: 8px 0 0; }

.register-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }

.register-links .link { padding: 0; border: 0; background: none; font: inherit; font-size: 13px; cursor: pointer; }

.register-links .link:disabled { opacity: 0.6; cursor: default; text-decoration: none; }

.control .code-field { letter-spacing: 0.3em; font-variant-numeric: tabular-nums; font-size: 18px; }

.control-icon.at { font-size: 16px; font-weight: 600; color: var(--muted); }

.google-mark {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  color: #000;
  font-size: 12px;
  font-weight: 700;
}

a.btn { text-decoration: none; }

.identity-google {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.identity-google img { border-radius: 50%; background: var(--fill); object-fit: cover; }

.identity-google > span { display: flex; flex-direction: column; min-width: 0; font-size: 13px; color: var(--muted); }

.identity-google strong { color: var(--ink); font-size: 14.5px; }

.birthday-row { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 10px; }

.birthday-part { display: flex; flex-direction: column; gap: 6px; }

.birthday-part input, .birthday-part select {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: var(--fill);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
}

.birthday-part input:focus, .birthday-part select:focus { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28); }

.field.invalid .birthday-part input, .field.invalid .birthday-part select { box-shadow: 0 0 0 1.5px var(--danger); }

.suggestions { margin: -4px 0 20px; }

.suggestions .label { display: block; margin-bottom: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

.chip:hover { border-color: var(--ink); color: var(--ink); }

.summary { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding: 16px; border-radius: 16px; background: var(--fill); }

.summary-initial {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: #000;
  font-size: 19px;
  font-weight: 700;
}

.summary-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }

.summary-text strong { color: var(--ink); font-size: 15.5px; }

.consent {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
  cursor: pointer;
}

.consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.consent .box { flex: none; margin-top: 1px; }

.consent input:checked + .box { border-color: var(--ink); background: var(--ink); color: #000; }

.consent input:focus-visible + .box { outline: 2px solid rgba(255, 255, 255, 0.5); outline-offset: 2px; }

.field.invalid .consent .box { border-color: var(--danger); }

/* ── Start page ── */

.hero-card {
  display: flex;
  gap: 18px;
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.hero-card h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -0.015em; }

.hero-card-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--fill);
  color: var(--danger);
}

.hero-card.ok .hero-card-mark { background: var(--ink); color: #000; }

.hero-card:not(.ok) .hero-card-mark .eye { color: var(--ink); }

.hero-card-mark .icon { width: 24px; height: 24px; }

.hero-card-main { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }

.hero-card-main .card-lead { margin: 0; }

.progress { width: 100%; height: 6px; margin-top: 6px; border-radius: 999px; background: var(--fill); overflow: hidden; }

.progress span { display: block; height: 100%; border-radius: inherit; background: var(--ink); transition: width 300ms var(--ease-out); }

.progress-label { margin: 0; color: var(--muted); font-size: 12.5px; font-weight: 550; }

.checklist { display: flex; flex-direction: column; gap: 8px; width: 100%; margin: 4px 0 6px; padding: 0; list-style: none; }

.checklist li { display: flex; align-items: center; gap: 10px; font-size: 14px; }

.checklist .icon { flex: none; width: 17px; height: 17px; color: var(--danger); }

.checklist li.done { color: var(--muted); }

.checklist li.done .icon { color: var(--ink); }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }

.tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms var(--ease-out), background 160ms var(--ease-out);
}

.tile:hover { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.02); }

.tile-mark { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 6px; border-radius: 50%; background: var(--fill); }

.tile-mark .icon { width: 19px; height: 19px; }

.tile-title { font-size: 15.5px; font-weight: 600; }

.tile-text { flex: 1; color: var(--muted); font-size: 13.5px; line-height: 1.45; }

.tile-status { color: var(--ink-soft); font-size: 12.5px; }

.tile-link { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 13px; font-weight: 600; }

.tile-link .icon { width: 15px; height: 15px; }

/* ── Explanations, banners, sections ── */

.learn-more { margin: 4px 0 16px; }

.learn-more summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  list-style: none;
}

.learn-more summary::-webkit-details-marker { display: none; }

.learn-more summary:hover { color: var(--ink); }

.learn-more summary .icon { width: 16px; height: 16px; }

.learn-more p { margin: 10px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--fill); color: var(--ink-soft); font-size: 13.5px; line-height: 1.55; }

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.banner > .icon { flex: none; width: 19px; height: 19px; color: var(--danger); }

.banner-text { flex: 1; font-size: 14px; }

.section-title { margin: 36px 0 14px; font-size: 13px; font-weight: 650; letter-spacing: 0.02em; color: var(--muted); }

.card-note { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.card-foot .btn .icon, .wizard-box .btn .icon { width: 17px; height: 17px; }

.card-foot .btn { display: inline-flex; align-items: center; gap: 8px; }

.btn.danger:disabled { opacity: 0.4; cursor: not-allowed; }

.included { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 0 0 14px; padding: 0; list-style: none; }

.included li { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.4; }

.included .icon { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--ink-soft); }

@media (max-width: 600px) { .included { grid-template-columns: minmax(0, 1fr); } }

.danger-card { border-color: rgba(255, 99, 71, 0.28); }

/* ── Guided flows ── */

dialog.wizard {
  display: flex;
  flex-direction: column;
  width: min(560px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #0d0d10;
  color: var(--ink);
  overflow: hidden;
}

dialog.wizard:not([open]) { display: none; }

dialog.wizard::backdrop { background: rgba(0, 0, 0, 0.72); }

.wizard-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; }

.wizard-title { flex: 1; font-size: 14px; font-weight: 600; }

.wizard-counter { color: var(--muted); font-size: 12.5px; }

.wizard-close { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--fill); color: var(--ink); cursor: pointer; }

.wizard-close .icon { width: 16px; height: 16px; }

.wizard-progress { height: 3px; background: var(--fill); }

.wizard-progress span { display: block; width: 0; height: 100%; background: var(--ink); transition: width 300ms var(--ease-out); }

.wizard-body { flex: 1; padding: 28px 28px 8px; overflow-y: auto; animation: rise 260ms var(--ease-out) both; }

.wizard-body h2 { margin: 0 0 10px; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }

.wizard-mark { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px; border-radius: 50%; background: var(--fill); }

.wizard-mark .icon { width: 26px; height: 26px; }

.wizard-mark.ok { background: var(--ink); color: #000; }

.wizard-mark.danger { color: var(--danger); }

.wizard-text { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

.wizard-detail { margin: 0; font-size: 14.5px; font-weight: 550; }

.wizard-box { margin: 4px 0 16px; }

.wizard-box > .edit-form { max-width: 260px; margin-top: 8px; }

.wizard-ok { display: flex; align-items: center; gap: 12px; margin: 10px 0; font-size: 14.5px; font-weight: 550; }

.wizard-list { margin-bottom: 12px; }

.wizard-aside { margin: 4px 0 12px; }

.wizard-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 20px; border-top: 1px solid var(--line); }

.wizard-actions { display: flex; align-items: center; gap: 14px; }

.wizard-points { display: flex; flex-direction: column; gap: 16px; margin: 4px 0 18px; padding: 0; list-style: none; }

.wizard-points li { display: flex; gap: 14px; font-size: 14.5px; line-height: 1.5; }

.wizard-points .icon { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--ink-soft); }

.wizard-check { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; font-size: 14px; line-height: 1.5; cursor: pointer; }

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

.choices { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 16px; }

.choices.saving { opacity: 0.6; pointer-events: none; }

.choice { position: relative; display: block; cursor: pointer; }

.choice-input { position: absolute; opacity: 0; pointer-events: none; }

.choice-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 18px 16px 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 160ms var(--ease-out), background 160ms var(--ease-out);
}

.choice-body::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 18px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--faint);
  border-radius: 50%;
  box-sizing: border-box;
}

.choice-input:checked + .choice-body { border-color: var(--ink); background: rgba(255, 255, 255, 0.03); }

.choice-input:checked + .choice-body::before { border: 6px solid var(--ink); }

.choice-input:focus-visible + .choice-body { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }

.choice-title { font-size: 14.5px; font-weight: 600; }

.choice-text { color: var(--muted); font-size: 13px; }

@media (max-width: 600px) {
  .tiles { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tile { display: grid; grid-template-columns: 38px minmax(0, 1fr) 16px; column-gap: 14px; row-gap: 2px; padding: 16px; }
  .tile-mark { grid-row: 1 / 4; margin: 0; }
  .tile-title, .tile-text, .tile-status { grid-column: 2; }
  .tile-link { grid-column: 3; grid-row: 1 / 4; align-self: center; margin: 0; }
  .tile-link span { display: none; }
  .hero-card { flex-direction: column; padding: 20px; }
  dialog.wizard { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .wizard-body { padding: 22px 20px 8px; }
}

.newsletter-list { margin: 0 0 8px; }

.newsletter-required { margin: 14px 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.newsletter-status { min-height: 20px; margin: 0 0 12px; color: var(--ink-soft); font-size: 13.5px; font-weight: 550; text-align: center; }

.newsletter-status.error { color: var(--danger); }

.newsletter-account { display: block; margin-top: 18px; text-align: center; }

#sent-step .offer-note { margin: 0 0 22px; }

.field .hint { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #000;
  font-size: 14px;
  font-weight: 600;
  transform: translateX(-50%);
  animation: rise 200ms var(--ease-out) both;
}

@media (max-width: 820px) {
  .manage { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .account-nav { min-width: 0; }
  .account-nav { position: static; }
  .nav-list { position: relative; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .nav-list a { white-space: nowrap; border: 1px solid var(--line); }
  .nav-signout { display: none; }
  .signout-mobile { display: flex; }
  .card { padding: 18px 16px 6px; }
  .row { align-items: flex-start; }
  .row-actions { flex-direction: column; gap: 4px; align-items: flex-end; }
}

/* Consent screen */
.app-icon { display: block; margin: 0 auto 16px; border-radius: 12px; }
.hero .app-name { font-weight: 650; }
.account .link.small { flex: none; font-size: 13px; }
.consent-intro { margin: 22px 0 10px; color: var(--muted); font-size: 14px; }
.grants { margin: 0 0 18px; padding: 0; list-style: none; }
.grants li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.grants li:last-child { border-bottom: 0; }
.grants .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--ink); }
.consent.opt-in { margin: 6px 0 18px; }
.consent-note { margin: 0 0 20px; }
.opt-in .hint, .consent-note { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.app-privacy { margin: -4px 0 18px; font-size: 13px; }

/* Subscriptions & payments */
.billing-row .row-avatar.square { border-radius: 10px; }
.billing-row.warn .row-note { color: var(--danger); }
.billing-row .row-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 640px) {
  .billing-row { flex-wrap: wrap; }
  .billing-row .row-actions { width: 100%; justify-content: flex-start; }
}
.invite-note { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: 12.5px; }

/* ── Subscriptions & payments: the way to Ulifyi Pay ── */
.state-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 550; color: var(--muted); }
.state-chip::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state-chip.info { color: #8ab4ff; }
.state-chip.good { color: #6fd49a; }
.state-chip.warn { color: #f5c26b; }
.state-chip.bad { color: #ff8a7d; }
.link-row .row-avatar.square { width: 34px; height: 34px; }

/* ── Consent: publisher with a hover card, companies as cards ── */
.publisher-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 14.5px; }
.publisher-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  cursor: default;
  outline: none;
}
.publisher-chip:hover, .publisher-chip:focus-visible { background: var(--fill); }
.publisher-chip:focus-visible { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }
.publisher-icon { display: block; flex: none; border-radius: 50%; object-fit: cover; background: var(--fill); }
.publisher-icon.square { border-radius: 6px; }
.gold-check {
  display: grid;
  place-items: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #e8b84a;
  color: #1a1203;
}
.gold-check .icon { width: 11px; height: 11px; stroke-width: 3; }
.publisher-card {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 280px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111114;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 450;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms;
}
.publisher-chip:hover .publisher-card, .publisher-chip:focus-within .publisher-card { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.publisher-card-head { display: flex; align-items: center; gap: 10px; }
.publisher-card-head strong { display: block; color: var(--ink); font-size: 14px; font-weight: 650; }
.publisher-card-head .muted { display: block; color: var(--muted); font-size: 12.5px; }
.publisher-fact { display: flex; align-items: flex-start; gap: 8px; overflow-wrap: anywhere; }
.publisher-fact .icon { flex: none; width: 15px; height: 15px; margin-top: 1px; color: var(--muted); }
.publisher-fact.gold { color: #f0cd7a; }
.publisher-fact.gold .icon { color: #e8b84a; }

.org-picker { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.org-picker legend { margin-bottom: 8px; padding: 0; }
.org-options { display: grid; gap: 8px; margin-bottom: 8px; }
.org-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.org-option:hover { background: var(--fill); }
.org-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.org-option img { flex: none; border-radius: 9px; object-fit: cover; background: var(--fill); }
.org-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.org-name { overflow: hidden; font-size: 14.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.org-role { color: var(--muted); font-size: 12.5px; }
.org-dot { flex: none; width: 18px; height: 18px; border: 1.5px solid var(--faint); border-radius: 50%; transition: border-color 140ms ease, box-shadow 140ms ease; }
.org-option:has(input:checked) { border-color: var(--ink); background: var(--fill); }
.org-option:has(input:checked) .org-dot { border-color: var(--ink); box-shadow: inset 0 0 0 4px #000, inset 0 0 0 9px var(--ink); }
.org-option:has(input:focus-visible) { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }
.notice.soft { border-color: var(--line); background: var(--fill); color: var(--ink-soft); }
.notice.soft .icon { color: var(--muted); }
.consent-screen .btn[disabled]:not(.loading) { opacity: 0.4; cursor: not-allowed; }
.consent-screen .account { margin: 4px 0 20px; }
.consent-screen .hero { position: relative; z-index: 3; }
