/* Стили сайта поверх app.css KeeBooks (accounting-ai-vow, D-0008): публичный сайт, выписка, ссылки с копированием, шаги выплаты.
   Перенесены из прототипа docs/prototypes/assets/css/proto.css; app.css — как у KeeBooks, его не правим (правки — здесь). */

/* hidden сильнее display у окон, панелей и вкладок (в KeeBooks их прячет Alpine — x-show / x-if) */
[hidden] { display: none !important; }

.badge.st-danger { background: #fee2e2; color: #991b1b; }
html.dark .badge.st-danger { background: rgba(127, 29, 29, .25); color: #fca5a5; }
.amount-neg { color: var(--danger); }
.amount-pos { color: var(--ok); }
.num, .list-table th.num, .list-table td.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* итоги по валютам в плитке */
.cur-lines { display: flex; flex-direction: column; gap: .15rem; margin-top: .35rem; font-size: .8rem; }
.cur-lines span { display: flex; justify-content: space-between; color: var(--muted); }
.cur-lines b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.rep-stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .rep-stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .rep-stats-4 { grid-template-columns: 1fr; } }

/* правила и подсказки */
.rule-strip { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; padding: .75rem 1rem; margin-bottom: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: .875rem; color: var(--text); }
.rule-strip .icon { width: 1.1rem; height: 1.1rem; color: var(--primary-dark); vertical-align: -3px; margin-inline-end: .35rem; }
.rule-strip strong { color: var(--fg); }

/* поле «только чтение» с кнопкой копирования: реферальная ссылка, ключ интеграции */
.copy-box { display: flex; align-items: stretch; border: 1px solid var(--field-line); border-radius: .375rem; overflow: hidden; background: var(--canvas); }
.copy-box code { flex: 1; min-width: 0; padding: .5rem .75rem; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.copy-box button { border: 0; border-inline-start: 1px solid var(--field-line); border-radius: 0; background: var(--surface); }
.copy-box button.done { color: var(--ok); }

/* реферальные ссылки — карточки продуктов */
.link-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: 1rem; }
.link-card .db-body { display: flex; flex-direction: column; gap: .75rem; }
.link-card .stat-row { display: flex; gap: 1.5rem; font-size: .8rem; color: var(--muted); }
.link-card .stat-row b { display: block; font-size: 1rem; color: var(--fg); }

/* пары «название — значение» в карточках */
.kv { display: grid; grid-template-columns: minmax(9rem, max-content) 1fr; gap: .45rem 1.25rem; margin: 0; font-size: .875rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--fg); word-break: break-word; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.db-row.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-col.wide-left { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 900px) { .db-row.cols-2, .two-col.wide-left { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 1rem; }

/* шаги мастера выплаты */
.steps { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1rem; counter-reset: st; flex-wrap: wrap; }
.steps li { counter-increment: st; display: flex; align-items: center; gap: .5rem; padding: .45rem .85rem; border-radius: 2rem;
  border: 1px solid var(--line); background: var(--surface); font-size: .85rem; color: var(--muted); }
.steps li::before { content: counter(st); display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%;
  background: var(--panel); color: var(--muted); font-size: .75rem; font-weight: 600; }
.steps li.done::before { content: '✓'; background: var(--primary); color: #fff; }
.steps li.current { border-color: var(--primary); color: var(--fg); font-weight: 600; }
.steps li.current::before { background: var(--primary); color: #fff; }

.check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; font-size: .875rem; }
.check-list li { display: flex; gap: .5rem; align-items: center; }
.check-list .icon { width: 1.1rem; height: 1.1rem; flex: none; }
.check-list .ok .icon { color: var(--ok); }
.check-list .bad .icon { color: var(--danger); }
.check-list .warn .icon { color: var(--warn); }

.pay-total { display: flex; justify-content: space-between; align-items: baseline; padding: .75rem 1rem; border-radius: var(--radius);
  background: var(--canvas); border: 1px solid var(--line); }
.pay-total strong { font-size: 1.35rem; color: var(--fg); }

/* итог выписки под таблицей */
.statement-sum { display: flex; justify-content: flex-end; gap: 2rem; padding: .75rem 1rem; font-size: .9rem; color: var(--muted); }
.statement-sum b { color: var(--fg); font-size: 1rem; }

/* экраны статуса заявки (ожидание, отказ, приостановка) */
.status-card { text-align: center; }
.status-card .big-icon { width: 3rem; height: 3rem; margin: 0 auto .75rem; display: block; }
.status-card .big-icon.wait { color: var(--warn); }
.status-card .big-icon.bad { color: var(--danger); }
.status-card .big-icon.ok { color: var(--ok); }
.status-card p { color: var(--muted); }

/* ===== Публичный сайт ===== */
.pub-body { background: var(--surface); }
.pub-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 2rem; padding: .85rem max(1.5rem, calc((100vw - 72rem) / 2));
  background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
html.dark .pub-header { background: rgba(17,24,39,.9); }
.pub-header .brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--fg); text-decoration: none; }
.pub-header nav { display: flex; gap: 1.25rem; flex: 1; }
.pub-header nav a { color: var(--text); text-decoration: none; font-size: .9rem; }
.pub-header nav a:hover, .pub-header nav a[aria-current] { color: var(--accent); }
.pub-header .pub-actions { display: flex; gap: .5rem; }
.pub-main { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; padding: 4.5rem 0 3.5rem; }
.hero h1 { font-size: 2.75rem; line-height: 1.1; margin: 0 0 1rem; color: var(--fg); letter-spacing: -.02em; }
.hero p.lead { font-size: 1.15rem; color: var(--text); margin: 0 0 1.75rem; max-width: 36rem; }
.hero .cta { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-card { border: 1px solid var(--line); border-radius: 1rem; padding: 1.5rem; background: var(--canvas); box-shadow: 0 10px 30px rgba(17,24,39,.06); }
.hero-card .big { font-size: 2.25rem; font-weight: 700; color: var(--fg); }
.pub-section { padding: 3rem 0; border-top: 1px solid var(--line); }
.pub-section h2 { font-size: 1.75rem; margin: 0 0 .5rem; color: var(--fg); }
.pub-section > p.muted { margin: 0 0 2rem; max-width: 44rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.feature { border: 1px solid var(--line); border-radius: .75rem; padding: 1.25rem; background: var(--surface); }
.feature .icon { width: 1.5rem; height: 1.5rem; color: var(--primary-dark); }
.feature h3 { margin: .75rem 0 .35rem; font-size: 1rem; color: var(--fg); }
.feature p { margin: 0; color: var(--muted); font-size: .9rem; }
.terms-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.terms-grid div { border-radius: .75rem; padding: 1.25rem; background: var(--canvas); border: 1px solid var(--line); }
.terms-grid dt { color: var(--muted); font-size: .8rem; }
.terms-grid dd { margin: .25rem 0 0; font-size: 1.5rem; font-weight: 700; color: var(--fg); }
.faq details { border-bottom: 1px solid var(--line); padding: .9rem 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--fg); }
.faq p { color: var(--text); margin: .5rem 0 0; }
.pub-footer { margin-top: 3rem; padding: 2rem max(1.5rem, calc((100vw - 72rem) / 2)); border-top: 1px solid var(--line); background: var(--canvas);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.pub-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.pub-footer a { color: var(--muted); text-decoration: none; }
.doc { display: grid; grid-template-columns: 15rem 1fr; gap: 3rem; padding: 3rem 0; }
.doc aside { position: sticky; top: 5rem; align-self: start; font-size: .85rem; }
.doc aside a { display: block; padding: .3rem 0; color: var(--text); text-decoration: none; }
.doc aside a:hover { color: var(--accent); }
.doc article { max-width: 46rem; color: var(--text); line-height: 1.65; }
.doc article h1 { font-size: 2rem; color: var(--fg); margin: 0 0 .25rem; }
.doc article h2 { font-size: 1.2rem; color: var(--fg); margin: 2rem 0 .5rem; }
.doc article pre { background: #0f172a; color: #e2e8f0; border-radius: .5rem; padding: 1rem; overflow-x: auto; font-size: .8rem; line-height: 1.5; }
.doc article code { font-size: .85em; }
.doc article table { width: 100%; border-collapse: collapse; font-size: .85rem; margin: .75rem 0; }
.doc article th, .doc article td { border-bottom: 1px solid var(--line); padding: .45rem .5rem; text-align: start; vertical-align: top; }
.endpoint { display: inline-flex; gap: .5rem; align-items: center; font-family: ui-monospace, monospace; font-size: .85rem; }
.endpoint .verb { padding: .1rem .45rem; border-radius: .25rem; background: #dcfce7; color: #166534; font-weight: 700; }
.kit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.kit-item { border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; background: var(--surface); }
.kit-item .preview { height: 9rem; display: grid; place-items: center; background: linear-gradient(135deg, #2ed38a, #059669); color: #fff; font-weight: 700; font-size: 1.1rem; }
.kit-item .preview.dark { background: linear-gradient(135deg, #111827, #314158); }
.kit-item .preview.banner { background: repeating-linear-gradient(45deg, #ecfdf5, #ecfdf5 10px, #d1fae5 10px, #d1fae5 20px); color: #065f46; }
.kit-item .meta { padding: .85rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .85rem; }
@media (max-width: 900px) {
  .hero, .doc { grid-template-columns: 1fr; }
  .feature-grid, .terms-grid, .kit-grid { grid-template-columns: 1fr; }
  .pub-header nav { display: none; }
  .doc aside { position: static; }
}

/* ===== Правки после проверки (владелец 2026-11-28) ===== */
/* ссылка-кнопка во всю ширину карточки входа: у <a> нет border-box — с padding она вылезала за край */
a.button.wide-button { display: flex; box-sizing: border-box; justify-content: center; text-align: center; }
a.button.secondary { background: var(--surface); border-color: var(--field-line); color: var(--text-default); }
a.button.secondary:hover { background: var(--hover); }
/* экраны статуса: без лишних полей у абзацев (у .login свой gap) */
.status-card h1 { margin-bottom: 0 !important; }
.status-card p { margin: 0; }
.status-card .kv { text-align: start; margin: .25rem 0; }
.status-card .big-icon { margin-bottom: 0; }

/* подсказка «?» у заголовка в шапке — раскрывается вниз, иначе уходит за верх окна */
.title-row .help-tip { width: 1.1rem; height: 1.1rem; font-size: .7rem; }
.title-row .help-tip:hover::after, .title-row .help-tip:focus::after { bottom: auto; top: calc(100% + .5rem); }

/* страница-список: прокрутка только внутри таблицы, как у списков KeeBooks; всё, что выше списка (вкладки статусов), занимает своё место */
@media (min-width: 768px) {
  html.in-tenant main.wide-page:has(> .list-view) { height: calc(100vh - 3.5rem); display: flex; flex-direction: column; padding-bottom: .75rem; }
  html.in-tenant main.wide-page:has(> .list-view) > .list-view { flex: 1; min-height: 0; }
  html.in-tenant main.wide-page > .list-view > .list-table-wrap { height: auto; flex: 1; min-height: 12rem; }
}

/* формы в несколько колонок — классами, а не style: на телефоне всё в одну колонку (span у поля не создаёт лишнюю колонку) */
.party-form.f1 { grid-template-columns: 1fr; }
.party-form.f2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.party-form.f3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.party-form [data-span="2"] { grid-column: span 2; }
.two-col > *, .db-row > *, .doc > * { min-width: 0; }
@media (max-width: 767px) {
  .party-form.f2, .party-form.f3 { grid-template-columns: 1fr; }
  .party-form [data-span] { grid-column: auto; }
  .party-tabs { flex-wrap: wrap; gap: .5rem; }
  .party-tabs .tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .party-tabs .tab-side { margin-inline-start: auto; }
  .doc article pre, .doc article table { max-width: 100%; overflow-x: auto; display: block; }
}
.party-form .field { min-width: 0; }
.party-form .field > input, .party-form .field > select, .party-form .field > textarea { min-width: 0; width: 100%; box-sizing: border-box; }
.statement-sum { flex-wrap: wrap; gap: .5rem 2rem; }
.rate-line { display: flex; gap: 1rem; margin: .75rem 0 .5rem !important; font-size: .85rem; color: var(--muted); }
.rate-line b { color: var(--fg); font-size: 1.05rem; }
.feature .plain-link { font-size: .85rem; color: var(--accent); text-decoration: none; }
.title-row .pending-pill { text-decoration: none; white-space: nowrap; }
.party-form.f2, .party-form.f3 { align-items: start; }
/* публичная шапка на телефоне: в одну строку, вход и регистрация — компактно; оглавление документа — не первым экраном */
.pub-header .brand, .pub-header .button { white-space: nowrap; }
@media (max-width: 640px) {
  .pub-header { gap: .75rem; padding: .6rem 1rem; }
  .pub-header .brand { font-size: .95rem; }
  .pub-header .pub-actions { margin-inline-start: auto; }
  .pub-header .button { padding: .4rem .65rem; font-size: .8rem; }
  .pub-header .join-long { display: none; }
  .doc aside { display: none; }
  .hero h1 { font-size: 2.1rem; }
}
@media (min-width: 641px) { .pub-header .join-short { display: none; } }
.link-card .stat-row { flex-wrap: wrap; gap: .5rem 1.25rem; }

/* кнопки формы — в строку справа (кабинет, профиль) */
.form-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.party-form .form-actions { grid-column: 1 / -1; }
.rate-line { flex-wrap: wrap; gap: .25rem 1rem; }
.rate-line span { white-space: nowrap; }

/* перенос строк текста из данных (адрес в превью инвойса) */
.pre-line { white-space: pre-line; }
/* textarea копирования ссылки — вне экрана */
.offscreen { position: fixed; top: -1000px; left: -1000px; opacity: 0; }

/* ---- Отступы между карточками страницы (владелец 2026-11-29: «слиплись») ---- */
html.in-tenant main.wide-page > :is(.db-card, .db-row, .rep-stats, .two-col, .party-card, section, form, .aff-reason, .aff-pending)
  + :is(.db-card, .db-row, .rep-stats, .two-col, .party-card, section, form, .aff-reason, .aff-pending) { margin-top: 1rem; }
html.in-tenant main.wide-page > .rep-stats { margin-bottom: 0; }

/* ---- Карточка аффилиейта: шапка, плитки, профиль разделами ---- */
.aff-hero { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; }
.aff-who { display: flex; align-items: center; gap: .875rem; min-width: 0; }
.aff-avatar { flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--primary); color: #fff;
  font-weight: 700; font-size: 1.05rem; letter-spacing: .02em; }
.aff-who-text { min-width: 0; }
.aff-who-name { font-size: 1.125rem; font-weight: 600; color: var(--fg); }
.aff-who-sub { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.aff-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.aff-actions:empty { display: none; }
.aff-reason, .aff-pending { display: flex; align-items: flex-start; gap: .6rem; padding: .75rem 1rem; border-radius: .5rem; font-size: .875rem; }
.aff-reason { background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; }
.aff-pending { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; }
.aff-reason .icon, .aff-pending .icon { flex: none; width: 1.25rem; height: 1.25rem; }
html.dark .aff-reason { background: rgba(127, 29, 29, .2); border-color: rgba(252, 165, 165, .3); color: #fecaca; }
html.dark .aff-pending { background: rgba(120, 53, 15, .2); border-color: rgba(253, 230, 138, .3); color: #fde68a; }
.aff-stat-line { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; min-height: 1.75rem; }
.party-card.aff-card { min-height: 0; }
.aff-card .party-body { padding: 1.25rem; }
.aff-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 900px) { .aff-panels { grid-template-columns: 1fr; } }
.aff-panel { padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--canvas); }
.aff-panel h3 { margin: 0 0 .75rem; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.aff-panel .kv { align-items: baseline; gap: .7rem 1.25rem; grid-template-columns: minmax(6.5rem, max-content) 1fr; }
.aff-panel select { max-width: 16rem; }
.aff-hint { display: block; margin-top: .3rem; font-size: .8rem; }
.aff-id { font-size: .85rem; overflow-wrap: anywhere; }

/* ---- Карточка продукта: форма разделами, карточка по содержимому ---- */
.prod-page { align-items: start; }
.prod-form .db-head { flex-wrap: wrap; }
.prod-active { margin: 0; white-space: normal; }
.prod-section { display: grid; gap: 1rem; flex: none; }
.prod-section + .prod-section { border-top: 1px solid var(--soft-line, #f3f4f6); }
.prod-section .field { display: flex; flex-direction: column; gap: .3rem; }
.prod-section .field label { font-weight: 500; color: var(--fg); }
.prod-section .field small { font-size: .8rem; }
.prod-h { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .9375rem; font-weight: 600; color: var(--fg); }
.prod-h .icon { width: 1.1rem; height: 1.1rem; color: var(--primary); }
.prod-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 700px) { .prod-grid-3 { grid-template-columns: 1fr; } }
.prod-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .875rem 1.25rem; border-top: 1px solid var(--soft-line, #f3f4f6);
  background: var(--canvas); border-radius: 0 0 .5rem .5rem; }

/* кнопка-контур с красным текстом (Decline, Suspend, Turn off): у button.outline свой цвет, он сильнее .danger-text */
button.outline.danger-text, html.dark button.outline.danger-text { color: #dc2626; }
button.outline.danger-text:hover { background: #fef2f2; border-color: #fecaca; }

/* ---- Профиль и безопасность (владелец 2026-11-29: «получше на 100%») ---- */
html.in-tenant main.wide-page.sec-page { max-width: 72rem; }
.sec-page > .db-card { margin-bottom: 0; }
.sec-hero { padding: 0; overflow: hidden; }
.sec-hero-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.25rem 1.5rem; }
.sec-hero-who { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.sec-avatar { flex: none; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 1.2rem; font-weight: 700; }
.sec-hero-text { min-width: 0; }
.sec-hero-name { font-size: 1.25rem; font-weight: 600; color: var(--fg); }
.sec-hero-sub { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.sec-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 9999px; font-size: .875rem; font-weight: 600; }
.sec-pill .icon { width: 1.1rem; height: 1.1rem; }
.sec-pill.strong { background: #dcfce7; color: #166534; }
.sec-pill.basic { background: #fef3c7; color: #92400e; }
html.dark .sec-pill.strong { background: rgba(20, 83, 45, .4); color: #86efac; }
html.dark .sec-pill.basic { background: rgba(120, 53, 15, .4); color: #fcd34d; }
.sec-hero-steps { display: grid; gap: .6rem; padding: 1rem 1.5rem 1.1rem; border-top: 1px solid var(--soft-line); background: var(--canvas); }
html.dark .sec-hero-steps { border-color: #314158; background: rgba(15, 23, 42, .35); }
.sec-steps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-size: .875rem; }
.sec-steps-title { font-weight: 600; color: var(--fg); }
.sec-meter { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.sec-meter span { height: .4rem; border-radius: 9999px; background: var(--line); }
.sec-hero-steps.basic .sec-meter span.on { background: #f59e0b; }
.sec-hero-steps.strong .sec-meter span.on { background: #16a34a; }
.sec-steps-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.5rem; }
.sec-checks { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: 0; padding: 0; list-style: none; font-size: .875rem; }
.sec-checks li { display: flex; align-items: center; gap: .4rem; }
.sec-checks .icon { width: 1rem; height: 1rem; }
.sec-checks li.done { color: var(--fg); }
.sec-checks li.done .icon { color: #16a34a; }
.sec-checks li.todo { color: var(--muted); }
.sec-checks li.todo .icon { color: #d97706; }
.sec-steps-cta { flex: none; }

.sec-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1rem; align-items: start; margin-top: 1rem; }
@media (max-width: 960px) { .sec-cols { grid-template-columns: 1fr; } }
.sec-stack { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.sec-form { display: grid; gap: 1rem; }
.sec-form .field { display: flex; flex-direction: column; gap: .3rem; }
.sec-form .field label { font-weight: 500; color: var(--fg); }
.sec-form .form-actions { justify-content: flex-start; }
.sec-lead { margin: 0; color: var(--muted); }
.sec-inline { display: flex; gap: .5rem; align-items: center; }
.sec-inline select { flex: 1; min-width: 0; }
.sec-inline button { flex: none; white-space: nowrap; }

.sec-rows .sec-row { justify-content: flex-start; }
.sec-row > button { margin-inline-start: auto; }
.sec-row-icon { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .5rem; background: var(--canvas); border: 1px solid var(--line); }
.sec-row-icon .icon { width: 1.1rem; height: 1.1rem; color: var(--primary); }
.sec-row-text { flex: 1; }
.sec-pw-rules { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin: .4rem 0 0; padding: 0; list-style: none; font-size: .8rem; color: var(--muted); }
.sec-pw-rules li::before { content: '○'; margin-inline-end: .3rem; }
.sec-pw-rules li.ok { color: #16a34a; }
.sec-pw-rules li.ok::before { content: '✓'; }

.sec-intro { display: flex; gap: 1rem; align-items: flex-start; }
.sec-intro-icon { flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .75rem; background: rgba(46, 211, 138, .12); }
.sec-intro-icon .icon { width: 1.5rem; height: 1.5rem; color: var(--primary); }
.sec-intro-text { display: grid; gap: .5rem; }
.sec-intro-text p { margin: 0; }
.sec-on { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: .75rem; padding: .75rem 1rem; border-radius: .5rem; background: #f0fdf4; border: 1px solid #bbf7d0; }
html.dark .sec-on { background: rgba(20, 83, 45, .2); border-color: rgba(134, 239, 172, .3); }
.sec-on .icon { flex: none; width: 1.5rem; height: 1.5rem; color: #16a34a; }
.sec-on p { margin: 0; }
@media (max-width: 640px) { .sec-intro { flex-direction: column; } }
.sec-intro .form-actions, .sec-page #mfa .form-actions { justify-content: flex-start; }
