/* Портал комплекса цифрового депозитария — стили страниц портала.
   Семейство «RWA Fin»: светлая тема, акцент #1f3f73, рамки 1 px вместо теней, сетка 8 px. */

@font-face {
  font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/inter-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/inter-ruble.woff2) format("woff2");
  unicode-range: U+20BD;
}

:root {
  --accent: #1f3f73; --accent-hover: #173159; --accent-soft: #eef2f8; --accent-line: #c9d5e6;
  --bg: #f6f7f9; --surface: #ffffff; --border: #e3e6eb; --border-strong: #cfd5dd;
  --text: #16202e; --muted: #5b6675;
  --ok: #1e7a4c; --ok-bg: #e8f5ee; --ok-line: #bfe3cf;
  --warn: #8a5a00; --warn-bg: #fff6e5; --warn-line: #f0dcb1;
  --err: #b42318; --err-bg: #fdecea; --err-line: #f3c5bf;
  --info: #1f5f99; --info-bg: #eaf2fb; --info-line: #c7dcf1;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --r-sm: 6px; --r: 8px; --r-lg: 10px;
  --focus-ring: 0 0 0 3px rgba(31, 63, 115, .25);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1 0 auto; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.nowrap, .nw { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 2147483600; padding: 8px 16px;
  background: var(--surface); color: var(--accent); border: 1px solid var(--accent); border-radius: var(--r);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 8px; }

.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; }
.ic-arrow { width: 14px; height: 14px; transition: transform .15s ease; }

/* --- знак и шапка публичных страниц --- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--text); }
.brand-hex { width: 20px; height: 20px; fill: var(--accent); flex: none; }
.brand-name { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
.brand-sep { width: 1px; height: 18px; background: var(--border-strong); flex: none; }
.brand-sub { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pub-head { background: var(--surface); border-bottom: 1px solid var(--border); }
.pub-head-in { max-width: 1160px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; }
.pub-main { width: 100%; max-width: 1160px; margin: 0 auto; padding: 56px 24px 64px; }
.pub-foot { border-top: 1px solid var(--border); background: var(--surface); }
.pub-foot-in {
  max-width: 1160px; margin: 0 auto; padding: 16px 24px; display: flex; flex-wrap: wrap; gap: 8px 24px;
  justify-content: space-between; color: var(--muted); font-size: 13px;
}
.pub-foot a { color: var(--muted); }
.pub-foot a:hover { color: var(--accent); }

/* --- вход и регистрация --- */
.auth {
  display: grid; grid-template-columns: minmax(0, 1fr) 440px; column-gap: 72px; row-gap: 32px;
  grid-template-areas: "intro card" "products card"; align-items: start;
}
.auth-register { grid-template-columns: minmax(0, 1fr) 560px; }
.auth-intro { grid-area: intro; padding-top: 8px; }
.auth-card { grid-area: card; }
.auth-products { grid-area: products; }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--accent); margin-bottom: 12px; }
.auth-intro h1 { font-size: 34px; line-height: 1.18; letter-spacing: -0.02em; max-width: 21ch; }
.lead { font-size: 16px; line-height: 1.6; color: var(--muted); margin-top: 16px; max-width: 62ch; }

.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 32px; }
.auth-card h2 { font-size: 22px; }
.auth-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.auth-alt { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; }
.auth-alt-title { color: var(--muted); }
.btn-block-soft { width: 100%; margin-top: 10px; height: 42px; font-weight: 500; }
.auth-alt .muted { font-size: 13px; margin-top: 14px; }

.list-title { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.plist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); max-width: 560px; }
.plist li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.plist-num { width: 16px; color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; flex: none; }
.plist-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.plist-title { font-weight: 600; font-size: 15px; }
.plist-role { color: var(--muted); font-size: 13.5px; }

.checklist { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.checklist .ic { color: var(--ok); margin-top: 3px; }

.tile {
  display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .02em; line-height: 1;
}
.tile-sm { width: 24px; height: 24px; border-radius: 6px; font-size: 10.5px; }

/* --- формы --- */
.form { margin-top: 4px; }
.field { margin-top: 16px; min-width: 0; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field input, .field select, select {
  width: 100%; height: 42px; padding: 0 12px; font: inherit; font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
select { width: auto; min-width: 160px; padding-right: 32px; cursor: pointer; }
.field input:hover, select:hover { border-color: #b4bcc8; }
.field input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.field input[type="number"] { font-variant-numeric: tabular-nums; }
.has-error input { border-color: var(--err); }
.has-error input:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .18); border-color: var(--err); }
.field-hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.field-error { display: flex; gap: 6px; align-items: flex-start; color: var(--err); font-size: 13px; margin-top: 6px; }
.field-error .ic { width: 14px; height: 14px; margin-top: 2px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 14px; cursor: pointer; line-height: 1.45; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; cursor: pointer; }
.field label.check { display: flex; font-size: 14px; font-weight: 400; margin-bottom: 0; }
.field-check .check { margin-top: 0; }
.field-check { margin-top: 20px; }
.field-check.has-error .check input { outline: 2px solid var(--err); outline-offset: 1px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--r-sm); border: 1px solid transparent; font: inherit; font-size: 15px; font-weight: 600;
  line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg); color: var(--text); border-color: #b4bcc8; }
.btn-danger { background: var(--surface); color: var(--err); border-color: var(--err-line); }
.btn-danger:hover { background: var(--err-bg); color: var(--err); }
.btn-block { width: 100%; height: 44px; margin-top: 24px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13.5px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* --- сообщения --- */
.alert {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; padding: 12px 14px;
  border: 1px solid; border-radius: var(--r); font-size: 14px; line-height: 1.5;
}
.alert .ic { margin-top: 2px; }
.alert-body { min-width: 0; }
.alert-title { font-weight: 600; }
.alert-body ul { margin: 6px 0 0; padding-left: 18px; }
.alert-body li + li { margin-top: 2px; }
.alert-body a { color: inherit; }
.alert-error { background: var(--err-bg); border-color: var(--err-line); }
.alert-error .ic, .alert-error .alert-title { color: var(--err); }
.alert-warn { background: var(--warn-bg); border-color: var(--warn-line); }
.alert-warn .ic, .alert-warn .alert-title { color: var(--warn); }
.alert-info { background: var(--info-bg); border-color: var(--info-line); }
.alert-info .ic { color: var(--info); }
.alert-ok { background: var(--ok-bg); border-color: var(--ok-line); }
.alert-ok .ic { color: var(--ok); }
.error-summary:focus { outline: none; box-shadow: 0 0 0 3px rgba(180, 35, 24, .14); }
.error-summary ul { padding-left: 16px; }

/* --- документ (политика ПДн, служебные страницы) --- */
.doc { max-width: 760px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 40px 48px; margin: 0 auto; }
.doc h1 { font-size: 28px; line-height: 1.2; }
.doc .lead { margin-top: 12px; }
.doc-list { margin: 28px 0 0; }
.doc-list > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.doc-list dt { font-weight: 600; font-size: 14px; }
.doc-list dd { margin: 0; font-size: 15px; color: var(--text); }
.doc-note { margin: 24px 0; padding: 12px 14px; background: var(--bg); border-radius: var(--r); font-size: 14px; color: var(--muted); }
.doc-short { max-width: 560px; }
.doc-short .alert { margin-bottom: 24px; }
.doc .inline-form { margin-top: 24px; }

/* --- страницы после входа --- */
.page { width: 100%; max-width: 1312px; margin: 0 auto; padding: 32px 24px 56px; }
.page-head h1 { font-size: 28px; line-height: 1.2; letter-spacing: -0.015em; }
.page-head .lead { margin-top: 8px; font-size: 15.5px; }
.page-head-split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: end; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }

.access {
  margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 4px 16px;
}
.access > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14px; }
.access > div:first-child { border-top: 0; }
.access dt { color: var(--muted); }
.access dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.section { margin-top: 40px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; }
.section-head h2 { font-size: 20px; }
.section-head p { color: var(--muted); font-size: 14px; max-width: 78ch; }
#scenario .section-head { display: block; }
#scenario .section-head p { margin-top: 6px; }

.catalog { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: #b3bfcf; }
.card:hover .ic-arrow { transform: translateX(3px); }
.card:focus-within { border-color: var(--accent); box-shadow: var(--focus-ring); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.card-step { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card-title { font-size: 17px; line-height: 1.3; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:focus-visible { outline: none; }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-role { font-size: 13.5px; font-weight: 500; color: var(--accent); }
.card-text { font-size: 14px; color: var(--muted); line-height: 1.55; flex: 1 0 auto; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border);
}
.chip {
  display: inline-block; font-size: 12px; line-height: 1.4; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.card-open { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 14px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.card-howto { background: var(--accent-soft); border-color: var(--accent-line); }
.card-howto:hover { border-color: var(--accent-line); }
.card-howto .card-title { font-size: 16px; }
.howto { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 13.5px; line-height: 1.5; }
.howto li { position: relative; padding-left: 14px; }
.howto li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.deal {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1.5fr);
  margin: 16px 0 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
}
.deal > div { padding: 14px 20px; border-left: 1px solid var(--border); min-width: 0; }
.deal > div:first-child { border-left: 0; }
.deal dt { font-size: 12.5px; color: var(--muted); }
.deal dd { margin: 4px 0 0; font-size: 14px; font-weight: 500; line-height: 1.45; }
.steps { list-style: none; margin: 12px 0 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.step { display: grid; grid-template-columns: 32px minmax(0, 1fr) 320px; gap: 16px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--border); }
.step:first-child { border-top: 0; }
.step-num {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent);
  font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums;
}
.step-title { font-size: 15px; }
.step-text { margin-top: 2px; font-size: 14px; color: var(--muted); max-width: 92ch; }
.step-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px 6px 6px;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); color: var(--text); text-decoration: none;
  font-size: 14px; font-weight: 500; line-height: 1.3; background: var(--surface); width: 100%;
  transition: border-color .15s ease, color .15s ease;
}
.step-link-text { flex: 1 1 auto; min-width: 0; }
.step-link:hover { border-color: var(--accent); color: var(--accent); }
.step-link:hover .ic-arrow { transform: translateX(2px); }

.app-foot { border-top: 1px solid var(--border); background: var(--surface); margin-top: 24px; }
.app-foot-in {
  max-width: 1312px; margin: 0 auto; padding: 16px 24px; display: flex; flex-wrap: wrap; gap: 6px 24px;
  justify-content: space-between; color: var(--muted); font-size: 13px;
}
.app-foot a { color: var(--muted); }

/* --- администрирование --- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 20px; }
.stat-label { display: block; font-size: 13px; color: var(--muted); }
.stat-value { display: block; font-size: 28px; font-weight: 600; line-height: 1.2; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.tabs { display: flex; gap: 4px; margin-top: 32px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs a {
  padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.panel { margin-top: 24px; }
.panel + .panel { margin-top: 32px; }
.panel-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.panel-head h2 { font-size: 18px; }
.panel-head p { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 80ch; }
.panel-head .crumbs { margin-bottom: 6px; }

/* position: relative — блок прокрутки становится опорным для скрытых подписей (.visually-hidden):
   иначе они выпадают из прокрутки и расширяют страницу на телефоне. */
.table-wrap { position: relative; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 10px 16px;
  background: #fafbfc; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table th.num { text-align: right; }
.table th.col-name { width: 24%; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fbfcfd; }
.table code { font-size: 13px; background: var(--bg); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); }
.cell-title { font-weight: 600; color: var(--text); text-decoration: none; }
.cell-title:hover { color: var(--accent); text-decoration: underline; }
.cell-sub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; line-height: 1.5; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: #eef0f3; color: var(--muted); }
.empty { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); padding: 32px; text-align: center; }
.empty-title { font-weight: 600; margin-bottom: 4px; }

.user-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.facts { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 4px 20px; }
.facts > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); font-size: 14px; }
.facts > div:first-child { border-top: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: grid; gap: 16px; }
.action { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
.action h3 { font-size: 16px; }
.action > p, .action form > p { margin-top: 6px; font-size: 14px; }
.action .btn { margin-top: 14px; }
.action-danger { border-color: var(--err-line); }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 14px; }
.inline-form .btn { margin-top: 0; }
.inline-form select { height: 40px; }

.invite-form {
  display: grid; grid-template-columns: minmax(0, 1fr) 180px 120px auto; gap: 0 16px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 4px 20px 20px;
}
.invite-submit { padding-top: 43px; }
.reveal { margin-bottom: 16px; padding: 16px 20px; background: var(--ok-bg); border: 1px solid var(--ok-line); border-radius: var(--r-lg); }
.reveal-head { display: flex; gap: 10px; align-items: flex-start; }
.reveal-head .ic { color: var(--ok); margin-top: 3px; }
.reveal-title { font-weight: 600; }
.reveal-head .muted { font-size: 14px; margin-top: 2px; }
.reveal-grid { display: grid; gap: 10px; margin-top: 14px; }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.copy-label { width: 64px; font-size: 13px; color: var(--muted); }
.code-big { font-size: 18px; font-weight: 600; letter-spacing: .06em; background: var(--surface); padding: 6px 12px; border-radius: var(--r-sm); border: 1px solid var(--ok-line); }
.code-link { font-size: 13px; background: var(--surface); padding: 6px 10px; border-radius: var(--r-sm); border: 1px solid var(--ok-line); overflow-wrap: anywhere; }

/* --- место под полосу комплекса до загрузки bar.js (без сдвига страницы) --- */
#rwf-portal-bar:empty { display: block; height: 40px; background: #16202e; }

/* --- адаптивность --- */
@media (max-width: 1180px) {
  .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth { column-gap: 48px; grid-template-columns: minmax(0, 1fr) 420px; }
  .auth-register { grid-template-columns: minmax(0, 1fr) 520px; }
}
@media (max-width: 960px) {
  .auth, .auth-register { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "card" "products"; }
  .auth-intro h1 { max-width: none; }
  .auth-card { max-width: 560px; }
  .page-head-split { grid-template-columns: minmax(0, 1fr); }
  .deal { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .deal > div:nth-child(3) { border-left: 0; }
  .deal > div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .step { grid-template-columns: 32px minmax(0, 1fr) 260px; }
  .access { max-width: 520px; }
  .user-grid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invite-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .invite-form .field:first-of-type { grid-column: 1 / -1; }
  .invite-submit { grid-column: 1 / -1; padding-top: 20px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .pub-head-in, .pub-foot-in { padding-left: 16px; padding-right: 16px; }
  .pub-main { padding: 24px 16px 40px; }
  .auth { row-gap: 24px; }
  .auth-intro { padding-top: 0; }
  .auth-intro h1 { font-size: 26px; }
  .auth-intro .lead { font-size: 15px; margin-top: 10px; }
  .auth-intro .lead-wide { display: none; }
  .eyebrow { margin-bottom: 8px; font-size: 12.5px; }
  .auth-card { padding: 24px 20px; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .brand-sub { font-size: 13px; }
  .page { padding: 24px 16px 40px; }
  .page-head h1 { font-size: 23px; }
  .catalog { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .card { padding: 18px; }
  .section { margin-top: 32px; }
  .step { grid-template-columns: 32px minmax(0, 1fr); padding: 16px; gap: 12px; align-items: start; }
  .step-num { margin-top: -4px; }
  .step-link { grid-column: 2; justify-self: stretch; min-height: 40px; }
  .deal { grid-template-columns: minmax(0, 1fr); }
  .deal > div { border-left: 0; padding: 12px 16px; }
  .deal > div + div { border-top: 1px solid var(--border); }
  .stats { gap: 12px; }
  .stat { padding: 14px 16px; }
  .stat-value { font-size: 24px; }
  .doc { padding: 28px 20px; }
  .doc h1 { font-size: 23px; }
  .doc-list > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .invite-form { grid-template-columns: minmax(0, 1fr); padding: 4px 16px 16px; }
  .app-foot-in { padding: 16px; }
  .copy-label { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
