/* eSlovari — дизайн-система.
   Светлая тема по референсам (сине-голубые карточки, чёрные плашки-«пилюли»),
   тёмно-синяя тема включается автоматически по настройке системы. */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin.756049f32875.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-cyrillic.03d41c3239e3.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  src: url("../fonts/unbounded-latin.8616dc355070.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Unbounded";
  src: url("../fonts/unbounded-cyrillic.3a5ed4d11365.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --bg: #e7ebf4;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --ink: #0b0d12;
  --ink-soft: #1a1e28;
  --text: #11141b;
  --muted: #5d6578;
  --line: rgba(17, 20, 27, 0.12);
  --blue: #2c5cf0;
  --blue-deep: #1638b8;
  --navy: #0f2a8a;
  --cyan: #5cc8db;
  --sky: #9fb8ff;
  --ok: #19a463;
  --bad: #e5484d;
  --warn: #f2a516;
  --on-blue: #ffffff;
  --grad: linear-gradient(155deg, #5a86ff 0%, #2c5cf0 42%, #1638b8 100%);
  --grad-soft: linear-gradient(155deg, #4f7dff 0%, #2f60f2 100%);
  --radius: 26px;
  --radius-sm: 16px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 18px 40px -24px rgba(16, 42, 138, 0.35);
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: "Unbounded", "Manrope", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070a14;
    --surface: #10162a;
    --surface-2: #161d36;
    --ink: #141b33;
    --ink-soft: #1b2342;
    --text: #e9edf8;
    --muted: #97a1bd;
    --line: rgba(233, 237, 248, 0.12);
    --sky: #7d9cff;
    --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 8px; }

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

.shell { width: min(1240px, 100%); margin: 0 auto; padding: 0 16px; }
.stack > * + * { margin-top: 16px; }
.section { margin-top: 18px; }
.muted { color: var(--muted); }
.mt { margin-top: 16px; }
.small { font-size: 13px; }
.center { text-align: center; }
.display {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

/* --- Шапка ------------------------------------------------------------------ */

.topbar {
  position: sticky; top: 10px; z-index: 50;
  margin-top: 12px;
  display: flex; align-items: center; gap: 16px;
  background: var(--ink); color: #fff;
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.6);
}
.logo {
  font-family: var(--font-display);
  font-weight: 700; font-size: 13px; line-height: 1;
  text-transform: uppercase; text-decoration: none; letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 10px;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff; color: var(--blue-deep);
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800;
}
.logo small { display: block; font-size: 9px; letter-spacing: 0.12em; opacity: 0.6; margin-top: 3px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 10px 14px; border-radius: 999px; opacity: 0.85;
}
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.1); opacity: 1; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav-toggle {
  display: none; margin-left: auto;
  background: rgba(255, 255, 255, 0.1); border: 0; color: #fff;
  border-radius: 999px; padding: 10px 16px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; cursor: pointer;
}
.avatar-mini {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  background: var(--grad); display: grid; place-items: center;
  font-weight: 800; font-size: 14px; color: #fff; text-decoration: none;
}

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; border-radius: 26px; padding: 8px 8px 8px 18px; }
  .nav-toggle { display: inline-block; }
  .nav, .nav-actions { display: none; width: 100%; }
  .topbar.open .nav { display: flex; flex-direction: column; align-items: stretch; margin: 6px 0 0; }
  .topbar.open .nav-actions { display: flex; justify-content: space-between; padding: 6px 0 4px; }
}

/* --- Кнопки и пилюли --------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 999px; cursor: pointer;
  padding: 13px 22px; text-decoration: none;
  font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 14px; height: 14px; flex: none; }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 10px 22px -12px rgba(44, 92, 240, 0.9); }
.btn-blue:hover { background: #3b6bff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-white { background: #fff; color: var(--blue-deep); }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-ghost-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.7); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: 9px 14px; font-size: 11px; }
.btn-block { width: 100%; }
.btn-yandex { background: #fc3f1d; color: #fff; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
  text-decoration: none; background: var(--surface);
}
.chip-dark { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4); }
.chip-level { background: var(--ink); color: #fff; box-shadow: none; }

.bar {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--ink); color: #fff; border-radius: 999px;
  padding: 16px 24px; text-align: center;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
}
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}

/* --- Карточки -------------------------------------------------------------- */

.card {
  background: var(--surface); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card-blue {
  background: var(--grad); color: var(--on-blue);
  border-radius: var(--radius); padding: 28px; position: relative; overflow: hidden;
}
.card-dark {
  background: var(--ink); color: #fff; border-radius: var(--radius); padding: 24px;
  position: relative; overflow: hidden;
}
.card-title {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  color: var(--blue); font-size: clamp(18px, 2vw, 24px); margin-bottom: 10px;
}
@media (prefers-color-scheme: dark) { .card-title { color: var(--sky); } }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* --- Герой ------------------------------------------------------------------- */

.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin-top: 16px; }
.hero-main { min-height: 440px; display: flex; flex-direction: column; padding: 34px; }
.hero-main h1 {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(30px, 4.6vw, 58px); line-height: 0.98; letter-spacing: -0.03em;
}
.hero-main h1 span { display: block; font-weight: 500; font-size: 0.56em; line-height: 1.1; margin-top: 10px; letter-spacing: -0.01em; }
.hero-main .lead { max-width: 440px; margin-top: 18px; opacity: 0.9; font-size: 15px; }
.hero-cta { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; padding-top: 24px; position: relative; z-index: 1; }
.hero-main .waves { position: absolute; right: -60px; bottom: -40px; width: 380px; opacity: 0.9; pointer-events: none; }
.hero-main > *:not(.waves) { position: relative; z-index: 1; }

.hero-side { display: grid; grid-template-rows: 1fr auto; gap: 12px; }
.hero-visual {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--ink); color: #fff; padding: 26px; min-height: 340px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-visual .waves { position: absolute; inset: -20px -40px auto auto; width: 115%; pointer-events: none; }
.hero-word { position: relative; z-index: 1; }
.hero-word .w { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 4.4vw, 54px); line-height: 1; }
.hero-word .t { opacity: 0.7; margin-top: 6px; }
.hero-word .tr { font-size: 18px; margin-top: 12px; font-weight: 700; }
.hero-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pill-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 10px 10px 18px; border-radius: 999px;
  background: var(--surface); text-decoration: none;
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
}
.pill-link .dot {
  width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff;
  display: grid; place-items: center; flex: none;
}
.pill-link .dot svg { width: 12px; height: 12px; }
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-main { min-height: 0; padding: 26px; }
  .hero-visual { min-height: 260px; }
}
@media (max-width: 420px) { .hero-pills { grid-template-columns: minmax(0, 1fr); } }

/* --- Режимы тренажёра -------------------------------------------------------- */

.mode-card { display: flex; flex-direction: column; gap: 6px; min-height: 190px; text-decoration: none; transition: transform 0.2s ease; }
.mode-card:hover { transform: translateY(-3px); }
.mode-card .num { font-family: var(--font-display); font-weight: 700; font-size: 44px; color: var(--blue); line-height: 1; margin-top: auto; }
@media (prefers-color-scheme: dark) { .mode-card .num { color: var(--sky); } }
.mode-card .go { align-self: flex-end; }
.round-arrow {
  width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff;
  display: grid; place-items: center; flex: none;
}
.round-arrow svg { width: 14px; height: 14px; }

/* --- Тёмная панель со статистикой ------------------------------------------- */

.stats-panel { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: center; }
.stats-panel .waves-box { position: relative; border-radius: 20px; overflow: hidden; min-height: 240px; background: var(--navy); }
.stats-panel .waves-box .waves { position: absolute; inset: 0; width: 100%; height: 100%; }
.stat-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-size: 14px; opacity: 0.95; }
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 4vw, 48px); color: #6f95ff; line-height: 1; }
@media (max-width: 860px) { .stats-panel { grid-template-columns: minmax(0, 1fr); } }

/* --- Словарь: поиск, табы, карточки слов ----------------------------------- */

.search {
  display: flex; gap: 8px; background: var(--surface); border-radius: 999px; padding: 6px;
  box-shadow: var(--shadow);
}
.search input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 16px; outline: none;
  font-weight: 600;
}
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 0; }
.tab {
  padding: 10px 18px; border-radius: 16px 16px 0 0; text-decoration: none;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted);
}
.tab[aria-current="true"] { background: var(--blue); color: #fff; }
.tab-panel { background: var(--grad-soft); border-radius: 0 var(--radius) var(--radius) var(--radius); padding: 16px; }
.tab-panel.first-active { border-top-left-radius: 0; }
.tab-panel:not(.first-active) { border-top-left-radius: var(--radius); }

.words { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.word {
  position: relative; background: var(--surface); color: var(--text); border-radius: 20px; padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 4px; min-height: 150px;
}
.word h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; padding-right: 36px; }
.word h3 a { text-decoration: none; }
.word h3 a:hover { color: var(--blue); }
.word .tr { color: var(--muted); font-size: 13px; }
.word .ru { font-weight: 700; }
.word .desc { font-size: 13px; color: var(--muted); margin-top: auto; padding-top: 8px; }
.word .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag-mini {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); text-decoration: none;
}
.fav-form { position: absolute; top: 12px; right: 12px; margin: 0; }
.fav-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--surface-2); color: var(--muted); display: grid; place-items: center;
}
.fav-btn svg { width: 16px; height: 16px; }
.fav-btn[aria-pressed="true"] { background: #ffe7a3; color: #c98a00; }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }
.fav-inline { position: static; }

.empty {
  text-align: center; padding: 40px 20px; color: #fff; font-weight: 700;
}
.card .empty, .empty-muted { color: var(--muted); }

.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pager .chip { background: var(--surface); }
.on-blue .pager .chip { color: var(--text); }

/* --- Наборы и статьи --------------------------------------------------------- */

.set-card { display: flex; flex-direction: column; gap: 10px; min-height: 200px; position: relative; }
.set-card h3 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 20px; padding-right: 40px; }
.set-card .meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.set-card .fav-btn { background: rgba(255, 255, 255, 0.18); color: #fff; }

.article-card { display: flex; flex-direction: column; gap: 10px; min-height: 230px; text-decoration: none; }
.article-card h3 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: clamp(17px, 1.8vw, 22px); line-height: 1.1; }
.article-card .rows { margin-top: auto; }
.article-card .row {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  font-size: 13px; padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, 0.25);
}
.article-card .row svg { width: 12px; height: 12px; flex: none; }

.article { max-width: 760px; margin: 0 auto; }
.article-body { font-size: 18px; line-height: 1.75; }
.article-body p { margin-bottom: 1.1em; }

/* --- Тренажёр -------------------------------------------------------------- */

.trainer { max-width: 760px; margin: 0 auto; }
.mode-switch { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 14px 0; }
.mode-switch a { text-decoration: none; }
.mode-switch a[aria-current="page"] { background: var(--blue); color: #fff; box-shadow: none; }
.progress { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.25); overflow: hidden; margin: 14px 0 6px; }
.progress span { display: block; height: 100%; width: 0; background: #fff; border-radius: inherit; transition: width 0.3s ease; }
.trainer-stage { min-height: 360px; display: flex; flex-direction: column; }

.flip { perspective: 1400px; flex: 1; display: flex; cursor: pointer; margin: 10px 0 14px; min-height: 260px; }
.flip-inner {
  position: relative; flex: 1; transition: transform 0.55s cubic-bezier(.2,.7,.2,1);
  transform-style: preserve-3d;
}
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 22px; padding: 26px; display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; background: var(--surface); color: var(--text);
}
.flip-face.back { transform: rotateY(180deg); background: var(--ink); color: #fff; }
.big-word { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 6vw, 52px); line-height: 1.05; word-break: break-word; }
.flip-face .hint { margin-top: auto; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.5; font-weight: 800; }

.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
@media (max-width: 560px) { .quiz-options { grid-template-columns: minmax(0, 1fr); } }
.option {
  border: 0; border-radius: 18px; padding: 16px 18px; text-align: left; cursor: pointer;
  background: var(--surface); color: var(--text); font-weight: 700; min-height: 64px;
  transition: transform 0.12s ease, background 0.12s ease;
}
.option:hover:not(:disabled) { transform: translateY(-2px); }
.option.right { background: var(--ok); color: #fff; }
.option.wrong { background: var(--bad); color: #fff; }
.option kbd { opacity: 0.5; font-family: inherit; margin-right: 8px; }

.prompt-box { background: var(--surface); color: var(--text); border-radius: 22px; padding: 26px; text-align: center; margin-top: 10px; }
.write-row { display: flex; gap: 8px; margin-top: 14px; }
.write-row input {
  flex: 1; min-width: 0; border: 0; border-radius: 999px; padding: 14px 20px; font-size: 18px; font-weight: 700;
  background: var(--surface); color: var(--text);
}
.feedback { min-height: 28px; margin-top: 12px; font-weight: 700; text-align: center; }
.feedback.ok { color: #b9ffd9; }
.feedback.bad { color: #ffd1d3; }
.trainer-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.result-big { margin-top: 12px; font-family: var(--font-display); font-size: clamp(48px, 10vw, 88px); font-weight: 700; line-height: 1; }

/* --- Формы ----------------------------------------------------------------- */

.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.auth-wrap .card-blue { min-height: 520px; display: flex; flex-direction: column; }
.auth-wrap .card-blue .waves { position: absolute; left: -40px; bottom: -60px; width: 120%; opacity: 0.85; pointer-events: none; }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-wrap .card-blue { min-height: 0; }
  .auth-wrap .card-blue .waves { display: none; }
}

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="url"], .field input[type="number"], .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text);
  border-radius: 14px; padding: 13px 16px; font-weight: 600; outline: none;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); background: var(--surface); }
.field .help { font-size: 12px; color: var(--muted); }
.field .help ul { margin: 4px 0 0; padding-left: 18px; }
.field input[type="file"] { font-size: 14px; max-width: 100%; }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--bad); font-size: 13px; font-weight: 700; }
.form-errors { background: rgba(229, 72, 77, 0.1); border-radius: 14px; padding: 12px 16px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.strength { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; transition: width 0.25s ease, background 0.25s ease; }
.strength-label { font-size: 12px; font-weight: 700; color: var(--muted); }

.code-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.code-grid code {
  background: var(--surface-2); border-radius: 12px; padding: 12px; text-align: center;
  font: 700 18px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: 0.08em;
}
.qr { background: #fff; border-radius: 20px; padding: 12px; width: 220px; max-width: 100%; }
.secret { font: 700 15px/1.4 ui-monospace, Consolas, monospace; word-break: break-all; background: var(--surface-2); padding: 10px 14px; border-radius: 12px; }

/* --- Сообщения ------------------------------------------------------------- */

.messages { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.messages li {
  border-radius: 18px; padding: 14px 18px; font-weight: 700; font-size: 14px;
  background: var(--surface); box-shadow: var(--shadow); border-left: 6px solid var(--blue);
}
.messages .success { border-left-color: var(--ok); }
.messages .error { border-left-color: var(--bad); }
.messages .warning { border-left-color: var(--warn); }

/* --- Профиль --------------------------------------------------------------- */

.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.avatar-big {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: rgba(255, 255, 255, 0.2);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 36px; font-weight: 700;
}
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.inline-form { display: inline; margin: 0; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
details.card summary { cursor: pointer; font-weight: 800; }

/* --- Подвал ---------------------------------------------------------------- */

.footer {
  margin-top: 40px; background: var(--ink); color: #fff;
  border-radius: var(--radius) var(--radius) 0 0; padding: 36px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
.footer .logo { font-size: 22px; }
.footer-about { margin-top: 14px; max-width: 320px; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; opacity: 0.75; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 28px; font-size: 12px; opacity: 0.55; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* --- Ошибки ---------------------------------------------------------------- */

.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.error-code { font-family: var(--font-display); font-size: clamp(80px, 20vw, 180px); font-weight: 700; line-height: 1; }

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

.set-card h3 a { text-decoration: none; }
.set-card .round-arrow { background: #fff; color: var(--blue-deep); }

.page-title { font-size: clamp(28px, 4.4vw, 52px); line-height: 1; position: relative; }
.card-blue .lead { max-width: 620px; opacity: 0.9; position: relative; }
.card-blue > .waves { position: absolute; right: -80px; top: -60px; width: 420px; opacity: 0.55; pointer-events: none; }
.card-blue > *:not(.waves) { position: relative; z-index: 1; }
.mode-card .fav-form { top: 16px; right: 16px; }
.mode-card { position: relative; }
svg.waves { overflow: visible; }
.card-blue > .chip, .card-blue > .row-actions, .card-blue > a.chip { align-self: flex-start; }
.card-blue.hero-main > .waves { right: -60px; bottom: -40px; top: auto; width: 380px; opacity: 0.9; }
.auth-wrap .card-blue > .waves { left: -40px; right: auto; top: auto; bottom: -60px; width: 120%; opacity: 0.85; }
.strength { background: var(--line); }
@media (max-width: 860px) {
  .card-blue.hero-main > .waves { opacity: 0.35; width: 300px; }
}
.auth-wrap .page-title { font-size: clamp(26px, 3.4vw, 44px); overflow-wrap: anywhere; }
