
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-1.8.1.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

.device-code { font: 600 32px var(--font-sans, sans-serif); letter-spacing: .15em; }
:root {
  color-scheme: light;
  --ink: #141518;
  --ink-2: #3c3f47;
  --muted: #676a72;
  --paper: #f4f3ee;
  --surface: #fff;
  --line: #e4e2da;
  --field: #93908a;
  --focus: #2f5bd3;
  --danger: #b42318;
  --danger-bg: #fef3f1;
  --danger-line: #f6cfc8;
  --radius: 10px;
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; }
h1, h2, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.15; font-weight: 650; letter-spacing: -.022em; }
a { color: var(--ink); font-weight: 550; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.lead { margin-top: 10px; color: var(--muted); }
.muted { color: var(--muted); font-weight: 400; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 18px; letter-spacing: -.01em; min-width: 0; }
.brand span { overflow-wrap: anywhere; }
a.brand { color: inherit; text-decoration: none; border-radius: 999px; }
/* Логотип пользователя как есть; круглая обрезка повторяет его кольцо. */
.mark { width: 32px; height: 32px; flex: none; border-radius: 50%; display: block; }

/* Вход и регистрация */
body.auth { display: grid; grid-template-columns: minmax(400px, 42%) 1fr; }
.showcase { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: 40px 48px 48px; background: var(--ink); color: var(--paper); overflow: hidden; }
.art { width: min(100%, 440px); align-self: center; }
.art-grid circle { fill: currentColor; }
.showcase .mark { box-shadow: 0 0 0 1px color-mix(in srgb, var(--paper) 22%, transparent); }
.pitch { max-width: 420px; }
.pitch p { color: color-mix(in srgb, var(--paper) 68%, transparent); }
.pitch .pitch-title { color: var(--paper); font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.022em; margin-bottom: 12px; }
.pane { display: grid; place-items: center; padding: 56px 48px; }
.pane-inner { width: min(100%, 400px); }
.pane-inner > .button { margin-top: 28px; }

form { margin-top: 28px; display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
input { font: inherit; width: 100%; height: 48px; padding: 0 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--field); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; }
input:hover { border-color: var(--ink-2); }
input:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 28%, transparent); }
input:user-invalid { border-color: var(--danger); }
input:user-invalid:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }
.hint { font-size: 13px; line-height: 1.45; color: var(--muted); }

button, .button { font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: var(--radius); cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s; }
.primary, .button { width: 100%; height: 48px; padding: 0 18px; margin-top: 4px; border: 0; background: var(--ink); color: var(--paper); }
.primary:hover, .button:hover { background: #2a2c32; color: var(--paper); }
.primary:active, .button:active { background: #000; }
.reveal { padding: 2px 4px; margin: -2px -4px; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 550; border-radius: 6px; }
.reveal:hover { color: var(--ink); }
.yandex { width: 100%; height: 48px; padding: 0 18px; background: var(--surface); color: #000; border: 1px solid var(--field); }
.yandex:hover { background: var(--paper); border-color: var(--ink-2); }
.yandex-logo { width: 22px; height: 22px; flex: none; }
.ghost { height: 38px; padding: 0 14px; font-size: 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.ghost:hover { border-color: var(--field); background: var(--paper); }
button:disabled { cursor: progress; }
button:disabled:not([data-loading]) { opacity: .55; }
button[data-loading]::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.yandex[data-loading] .yandex-logo { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button[data-loading]::before { animation-duration: 2s; } * { transition: none !important; } }

.divider { display: flex; align-items: center; gap: 14px; margin: 24px 0; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.status { margin-top: 24px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.status:empty { display: none; }
.status:focus { outline: none; }
.status:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.status[data-tone="error"] { display: flex; gap: 10px; padding: 12px 14px; color: #8f1d12; background: var(--danger-bg); border: 1px solid var(--danger-line); border-radius: var(--radius); }
.status[data-tone="error"]::before { content: "!"; flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
/* Прогресс уже виден на кнопке; текст остаётся для экранного диктора без сдвига формы. */
.status[data-tone="progress"] { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.notice { margin-top: 24px; padding: 12px 14px; font-size: 14px; border-radius: var(--radius); background: var(--paper); color: var(--ink-2); }

/* Аккаунт */
body.app { background: var(--paper); }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 880px; height: 64px; margin: 0 auto; padding: 0 32px; }
.page { max-width: 880px; margin: 0 auto; padding: 48px 32px 72px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 600; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-top: 16px; }
.lead + .status + .panel, .lead + .panel { margin-top: 32px; }
.panel h2 { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 18px 24px 4px; }
.rows { margin: 0; }
.rows > div { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 16px 24px; }
.rows > div + div { border-top: 1px solid var(--line); }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; min-width: 0; }
.page > .status { margin-top: 20px; }

@media (max-width: 880px) {
  body.auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .showcase { padding: 20px 20px 0; background: none; color: var(--ink); }
  .art, .pitch { display: none; }
  .pane { place-items: start center; padding: 40px 20px 48px; }
}
@media (max-width: 560px) {
  h1 { font-size: 26px; }
  .topbar-inner { padding: 0 20px; height: 60px; }
  .page { padding: 32px 20px 56px; }
  .rows > div { grid-template-columns: 1fr; gap: 4px; padding: 14px 20px; }
  .panel h2 { padding: 16px 20px 2px; }
}
