/* ==========================================================================
   rd2026 — дизайн-система Renault-Drive (Claude Design «Финал»)
   Токены + компоненты. Светлая/тёмная тема через body[data-theme].
   ========================================================================== */

body{
  --accent-base:#3B4A6B; --r:7px;
  --bg:#FBFBFC; --surface:#FFFFFF; --ink:#1B1E22; --body:#33383E; --muted:#6B7178;
  --line:#EAECEF; --line2:#DFE2E6;
  --accent:var(--accent-base);
  --accent-hover:color-mix(in oklab, var(--accent-base) 85%, #0e1420);
  --accent-soft:color-mix(in oklab, var(--accent-base) 8%, #ffffff);
  --ok:#2E7D4F; --warn:#8F6A1E; --err:#B4453C;
  --ok-soft:color-mix(in oklab,#2E7D4F 9%,#ffffff);
  --warn-soft:color-mix(in oklab,#8F6A1E 9%,#ffffff);
  --ph:repeating-linear-gradient(45deg, rgba(27,30,34,.055) 0 1px, transparent 1px 11px);
  --ph-bg:color-mix(in oklab, var(--line) 40%, var(--surface));
  --shadow:0 1px 2px rgba(27,30,34,.04), 0 4px 14px rgba(27,30,34,.04);
}
body[data-theme="dark"]{
  --bg:#14171A; --surface:#1C2025; --ink:#EAECEF; --body:#C4C9CF; --muted:#949BA5;
  --line:#2A2F36; --line2:#343A42;
  --accent:color-mix(in oklab, var(--accent-base) 55%, #C3CFE6);
  --accent-hover:color-mix(in oklab, var(--accent-base) 40%, #D9E2F1);
  --accent-soft:color-mix(in oklab, var(--accent-base) 26%, #1C2025);
  --ok:#5CAE82; --warn:#C7A45B; --err:#D8837B;
  --ok-soft:color-mix(in oklab,#2E7D4F 24%,#1C2025);
  --warn-soft:color-mix(in oklab,#8F6A1E 24%,#1C2025);
  --ph:repeating-linear-gradient(45deg, rgba(234,236,239,.06) 0 1px, transparent 1px 11px);
  --ph-bg:color-mix(in oklab, var(--line) 55%, var(--surface));
  --shadow:0 1px 2px rgba(0,0,0,.2), 0 4px 14px rgba(0,0,0,.18);
}

/* ---- база ---- */
body.rd-body{
  background:var(--bg); color:var(--body);
  font-family:'IBM Plex Sans','Segoe UI',system-ui,-apple-system,sans-serif;
  -webkit-font-smoothing:antialiased; margin:0;
}
body.rd-body a{ color:var(--accent); text-decoration:none; }
body.rd-body a:hover{ color:var(--accent-hover); text-decoration:underline; }
.rd-shell{ min-height:100vh; display:flex; flex-direction:column; }
.rd-container{ max-width:1140px; margin:0 auto; width:100%; box-sizing:border-box; padding:0 24px; }
.rd-mono{ font-family:'IBM Plex Mono',ui-monospace,Menlo,monospace; }
.rd-h{ font-family:'Onest','IBM Plex Sans',sans-serif; }

/* ---- header ---- */
.rd-header{ position:sticky; top:0; z-index:40; background:color-mix(in oklab, var(--surface) 92%, transparent); backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
.rd-header__inner{ display:flex; align-items:center; gap:26px; height:62px; }
.rd-logo{ display:flex; align-items:center; gap:9px; text-decoration:none; }
.rd-logo:hover{ text-decoration:none; }
.rd-logo__mark{ width:16px; height:16px; border:2px solid var(--accent); transform:rotate(45deg); border-radius:2px; flex:none; }
.rd-logo__text{ font:700 17px 'Onest',sans-serif; letter-spacing:-.01em; color:var(--ink); }
.rd-nav{ display:flex; gap:22px; font:500 14px 'IBM Plex Sans',sans-serif; white-space:nowrap; }
.rd-nav a{ color:var(--body); }
.rd-nav a:hover{ color:var(--accent); text-decoration:none; }
.rd-nav a.is-active{ color:var(--accent); }
.rd-spacer{ flex:1; }
.rd-search-pill{ display:flex; align-items:center; gap:9px; background:var(--bg); border:1px solid var(--line2); border-radius:999px; padding:7px 14px; width:170px; color:var(--muted); font-size:13.5px; text-decoration:none; }
.rd-search-pill:hover{ text-decoration:none; color:var(--muted); border-color:var(--line2); }
.rd-theme-toggle{ width:32px; height:32px; display:flex; align-items:center; justify-content:center; background:transparent; border:1px solid var(--line2); border-radius:50%; cursor:pointer; color:var(--muted); flex:none; }
.rd-theme-toggle:hover{ border-color:var(--accent); color:var(--accent); }
.rd-theme-toggle__dot{ width:13px; height:13px; border-radius:50%; border:1.5px solid currentColor; background:linear-gradient(90deg, currentColor 50%, transparent 50%); }

/* ---- buttons / chips ---- */
.rd-btn{ font:500 15px 'IBM Plex Sans',sans-serif; color:#fff; background:var(--accent); border:1px solid var(--accent); border-radius:var(--r); padding:13px 26px; cursor:pointer; display:inline-block; text-decoration:none; }
.rd-btn:hover{ background:var(--accent-hover); color:#fff; text-decoration:none; }
.rd-btn--block{ width:100%; box-sizing:border-box; text-align:center; padding:14px; font-size:16px; }
.rd-btn-ghost{ font:500 14px 'IBM Plex Sans',sans-serif; color:var(--ink); border:1px solid var(--line2); border-radius:var(--r); padding:8px 16px; display:inline-block; text-decoration:none; background:transparent; cursor:pointer; }
.rd-btn-ghost:hover{ border-color:var(--accent); color:var(--accent); text-decoration:none; }
.rd-btn-soft{ font:500 13.5px 'IBM Plex Sans',sans-serif; color:var(--accent); background:var(--surface); border:1px solid color-mix(in oklab, var(--accent) 30%, transparent); border-radius:var(--r); padding:9px 18px; cursor:pointer; }
.rd-btn-soft:hover{ border-color:var(--accent); }
.rd-chip{ font:500 13px 'IBM Plex Sans',sans-serif; color:var(--body); border:1px solid var(--line2); border-radius:999px; padding:6px 14px; text-decoration:none; display:inline-block; }
.rd-chip:hover{ border-color:var(--accent); color:var(--accent); text-decoration:none; }
.rd-chip--sm{ font-size:12.5px; padding:4px 11px; }

/* ---- inputs ---- */
.rd-input{ font:400 15.5px 'IBM Plex Sans',sans-serif; color:var(--ink); background:var(--bg); border:1px solid var(--line2); border-radius:var(--r); padding:13px 17px; outline:none; box-sizing:border-box; }
.rd-input:focus{ border-color:var(--accent); outline:2px solid color-mix(in oklab, var(--accent) 22%, transparent); }
.rd-textarea{ font:400 14.5px/1.5 'IBM Plex Sans',sans-serif; color:var(--ink); background:var(--surface); border:1px solid var(--line2); border-radius:var(--r); padding:10px 13px; outline:none; resize:vertical; box-sizing:border-box; width:100%; }
.rd-textarea:focus{ border-color:var(--accent); }

/* ---- generic surfaces ---- */
.rd-card{ display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--line); border-radius:var(--r); text-decoration:none; }
a.rd-card:hover{ border-color:var(--line2); box-shadow:var(--shadow); text-decoration:none; }
.rd-panel{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:18px 20px; display:flex; flex-direction:column; gap:12px; }
.rd-panel__title{ font:600 12.5px 'Onest',sans-serif; letter-spacing:.02em; color:var(--ink); text-transform:uppercase; }
.rd-soft{ background:var(--accent-soft); border:1px solid color-mix(in oklab, var(--accent) 18%, transparent); border-radius:var(--r); padding:18px 20px; display:flex; flex-direction:column; gap:8px; }
.rd-ph{ background:var(--ph-bg) var(--ph); }
.rd-icon-badge{ width:40px; height:40px; border-radius:10px; background:var(--accent-soft); display:flex; align-items:center; justify-content:center; flex:none; }

/* ---- page wrapper (обычные страницы) ---- */
.rd-page{ max-width:1140px; margin:0 auto; width:100%; box-sizing:border-box; padding:24px; }
.rd-breadcrumbs{ font-size:13px; margin-bottom:14px; color:var(--muted); }
.rd-breadcrumbs a{ color:var(--muted); }
.rd-breadcrumbs a:hover{ color:var(--accent); }

/* ==== HERO (главная) ==== */
.rd-hero{ background:var(--surface); border-bottom:1px solid var(--line); padding:48px 0; }
.rd-hero__grid{ display:grid; grid-template-columns:1fr 400px; gap:48px; align-items:center; }
.rd-hero__title{ margin:0; font:600 38px/1.15 'Onest',sans-serif; letter-spacing:-.02em; color:var(--ink); text-wrap:balance; }
.rd-hero__col{ display:flex; flex-direction:column; gap:18px; }
.rd-hero__search{ display:flex; gap:10px; max-width:560px; }
.rd-hero__search .rd-input{ flex:1; }
.rd-oftensearch{ display:flex; flex-wrap:wrap; gap:8px; font-size:13px; color:var(--muted); align-items:baseline; }
.rd-dot{ color:var(--line2); }
.rd-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.rd-stats{ display:flex; gap:12px; margin-top:10px; }
.rd-stat{ flex:1; display:flex; align-items:center; gap:13px; background:var(--bg); border:1px solid var(--line); border-radius:var(--r); padding:13px 16px; }
.rd-stat__num{ font:600 18px/1 'Onest',sans-serif; color:var(--ink); }
.rd-stat__label{ font-size:12.5px; color:var(--muted); white-space:nowrap; }
.rd-services{ display:flex; flex-direction:column; gap:12px; }
.rd-service-hero{ display:flex; flex-direction:column; gap:10px; background:var(--accent-soft); border:1px solid color-mix(in oklab, var(--accent) 20%, transparent); border-radius:calc(var(--r) + 3px); padding:20px 22px; text-decoration:none; }
.rd-service-hero:hover{ border-color:var(--accent); text-decoration:none; }
.rd-service-row{ display:flex; align-items:center; gap:11px; background:var(--surface); border:1px solid var(--line); border-radius:calc(var(--r) + 3px); padding:14px 18px; text-decoration:none; }
.rd-service-row:hover{ border-color:var(--line2); box-shadow:var(--shadow); text-decoration:none; }
.rd-adcard{ display:grid; grid-template-columns:96px 1fr; background:var(--surface); border:1px solid var(--line); border-radius:calc(var(--r) + 3px); overflow:hidden; text-decoration:none; }
.rd-adcard:hover{ border-color:var(--line2); box-shadow:var(--shadow); text-decoration:none; }

/* ==== HOME grid ==== */
.rd-home{ max-width:1140px; margin:0 auto; width:100%; box-sizing:border-box; padding:28px 24px; display:grid; grid-template-columns:1fr 340px; gap:24px; align-items:start; }
.rd-section-head{ display:flex; align-items:baseline; justify-content:space-between; }
.rd-section-head__title{ font:600 20px 'Onest',sans-serif; color:var(--ink); }
.rd-cardgrid{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.rd-artcard__thumb{ height:104px; display:flex; align-items:center; justify-content:center; border-bottom:1px solid var(--line); overflow:hidden; }
.rd-artcard__thumb img{ width:100%; height:100%; object-fit:cover; }
.rd-artcard__body{ padding:13px 15px; display:flex; flex-direction:column; gap:6px; }
.rd-artcard__cat{ font:500 11.5px 'IBM Plex Sans',sans-serif; color:var(--accent); }
.rd-artcard__title{ font:600 14.5px/1.35 'Onest',sans-serif; color:var(--ink); }
.rd-artcard__meta{ font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rd-forum-item{ display:flex; gap:10px; padding-bottom:10px; border-bottom:1px solid var(--line); text-decoration:none; }
.rd-forum-item:hover{ text-decoration:none; }
.rd-online{ display:flex; align-items:center; gap:10px; font-size:13.5px; }
.rd-online__dot{ width:8px; height:8px; border-radius:50%; background:var(--ok); }

/* ==== ARTICLE ==== */
.rd-artgrid{ display:grid; grid-template-columns:1fr 300px; gap:36px; align-items:start; }
.rd-artwrap{ max-width:1140px; margin:0 auto; width:100%; box-sizing:border-box; padding:24px 24px 48px; display:grid; grid-template-columns:1fr 300px; gap:36px; align-items:start; }
.rd-article{ max-width:720px; display:flex; flex-direction:column; min-width:0; }
.rd-crumb{ display:flex; flex-wrap:wrap; gap:7px; align-items:center; font-size:13px; margin-bottom:18px; }
.rd-crumb a{ color:var(--muted); } .rd-crumb a:hover{ color:var(--accent); }
.rd-crumb__sep{ color:var(--line2); }
.rd-article__title{ margin:0 0 14px; font:600 34px/1.2 'Onest',sans-serif; letter-spacing:-.02em; color:var(--ink); text-wrap:balance; }
.rd-article__meta{ display:flex; flex-wrap:wrap; gap:14px; font-size:13.5px; color:var(--muted); padding-bottom:20px; border-bottom:1px solid var(--line); margin-bottom:24px; align-items:center; }
.rd-metaitem{ display:inline-flex; align-items:center; gap:6px; }
.rd-avatar{ width:22px; height:22px; border-radius:50%; background:var(--accent-soft); color:var(--accent); display:inline-flex; align-items:center; justify-content:center; font:600 10px 'Onest',sans-serif; overflow:hidden; }
.rd-avatar img{ width:100%; height:100%; object-fit:cover; }
.rd-body-content{ display:flex; flex-direction:column; gap:20px; font-size:17px; line-height:1.65; color:var(--body); }
.rd-body-content p{ margin:0; }
.rd-body-content h2{ margin:0; font:600 24px/1.3 'Onest',sans-serif; letter-spacing:-.01em; color:var(--ink); }
.rd-body-content h3{ margin:0; font:600 19px/1.35 'Onest',sans-serif; color:var(--ink); }
.rd-body-content img{ max-width:100%; height:auto; border:1px solid var(--line); border-radius:var(--r); }
.rd-body-content a{ color:var(--accent); }
.rd-body-content ul,.rd-body-content ol{ margin:0; padding-left:22px; display:flex; flex-direction:column; gap:8px; }
.rd-body-content table{ border-collapse:collapse; width:100%; font-size:14.5px; }
.rd-body-content table th{ text-align:left; padding:9px 14px; border-bottom:2px solid var(--line2); font:600 12.5px 'IBM Plex Sans',sans-serif; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.rd-body-content table td{ padding:9px 14px; border-bottom:1px solid var(--line); }
.rd-body-content figure{ margin:0; display:flex; flex-direction:column; gap:8px; }
.rd-body-content blockquote{ margin:0; display:flex; gap:10px; align-items:flex-start; background:var(--warn-soft); border:1px solid color-mix(in oklab, var(--warn) 30%, transparent); border-radius:var(--r); padding:13px 16px; font-size:14.5px; line-height:1.5; }
.rd-table-wrap{ overflow-x:auto; }
.rd-cta{ margin-top:32px; background:var(--accent-soft); border:1px solid color-mix(in oklab, var(--accent) 16%, transparent); border-radius:var(--r); padding:18px 22px; display:flex; align-items:center; gap:18px; }

/* comments */
.rd-comments{ margin-top:36px; display:flex; flex-direction:column; }
.rd-comments__title{ font:600 21px 'Onest',sans-serif; color:var(--ink); padding-bottom:14px; border-bottom:1px solid var(--line); }
.rd-comment{ display:flex; gap:14px; padding:18px 0; border-bottom:1px solid var(--line); }
.rd-comment__av{ width:40px; height:40px; border-radius:50%; background:var(--accent-soft); color:var(--accent); display:flex; align-items:center; justify-content:center; font:600 15px 'Onest',sans-serif; flex:none; overflow:hidden; }
.rd-comment__av img{ width:100%; height:100%; object-fit:cover; }
.rd-comment__body{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.rd-comment__head{ display:flex; flex-wrap:wrap; gap:9px; align-items:baseline; }
.rd-comment__nick{ font:600 14.5px 'IBM Plex Sans',sans-serif; color:var(--ink); }
.rd-comment__date{ font-size:12.5px; color:var(--muted); }
.rd-comment__text{ margin:0; font-size:14.5px; line-height:1.55; }

/* article sidebar */
.rd-aside{ display:flex; flex-direction:column; gap:16px; position:sticky; top:80px; }
.rd-navlist{ display:flex; flex-direction:column; gap:8px; }
.rd-navlist a{ font-size:13.5px; line-height:1.45; color:var(--body); text-decoration:none; padding:3px 0 3px 12px; border-left:2px solid transparent; }
.rd-navlist a:hover{ color:var(--accent); text-decoration:none; }
.rd-navlist a.is-active{ color:var(--accent); font-weight:500; border-left-color:var(--accent); }
.rd-poplist a{ display:flex; flex-direction:column; gap:2px; padding-bottom:10px; border-bottom:1px solid var(--line); text-decoration:none; }
.rd-poplist a:hover{ text-decoration:none; }

/* ==== GENERATOR ==== */
.rd-gen{ padding:48px 24px 56px; display:flex; flex-direction:column; align-items:center; gap:36px; }
.rd-gen__head{ display:flex; flex-direction:column; gap:10px; align-items:center; text-align:center; max-width:640px; }
.rd-gen__title{ margin:0; font:600 36px/1.18 'Onest',sans-serif; letter-spacing:-.02em; color:var(--ink); text-wrap:balance; }
.rd-gen__card{ width:520px; max-width:100%; box-sizing:border-box; background:var(--surface); border:1px solid var(--line); border-radius:calc(var(--r) + 4px); box-shadow:var(--shadow); padding:34px; display:flex; flex-direction:column; gap:20px; }
.rd-gen__input{ width:100%; box-sizing:border-box; font:600 30px 'IBM Plex Mono',monospace; letter-spacing:.3em; text-indent:.3em; text-align:center; color:var(--ink); background:var(--bg); border:1px solid var(--line2); border-radius:var(--r); padding:14px 0; outline:none; text-transform:uppercase; }
.rd-gen__input:focus{ border-color:var(--accent); outline:2px solid color-mix(in oklab, var(--accent) 22%, transparent); }
.rd-gen__input.is-err{ border-color:var(--err); }
.rd-gen__result{ display:flex; flex-direction:column; gap:4px; background:var(--bg); border:1px dashed var(--line2); border-radius:var(--r); padding:20px; align-items:center; transition:background .2s; }
.rd-gen__result.is-ok{ background:var(--accent-soft); border-color:color-mix(in oklab, var(--accent) 35%, transparent); }
.rd-gen__out{ font:600 44px 'IBM Plex Mono',monospace; letter-spacing:.24em; text-indent:.24em; color:var(--line2); }
.rd-gen__result.is-ok .rd-gen__out{ color:var(--accent); }
.rd-gen__steps{ width:860px; max-width:100%; display:flex; flex-direction:column; gap:16px; }
.rd-step{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:18px 20px; display:flex; flex-direction:column; gap:10px; }
.rd-step__n{ width:32px; height:32px; border-radius:8px; background:var(--accent-soft); display:flex; align-items:center; justify-content:center; font:600 13px 'IBM Plex Mono',monospace; color:var(--accent); }
.rd-note{ display:flex; gap:10px; align-items:flex-start; border-radius:var(--r); padding:13px 16px; font-size:14px; line-height:1.5; }
.rd-note--ok{ background:var(--ok-soft); border:1px solid color-mix(in oklab, var(--ok) 28%, transparent); }

/* ==== FOOTER ==== */
.rd-footer{ margin-top:auto; background:var(--surface); border-top:1px solid var(--line); }
.rd-footer__inner{ padding:32px 24px 24px; display:flex; flex-direction:column; gap:24px; }
.rd-footer__cols{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:28px; }
.rd-footer__col{ display:flex; flex-direction:column; gap:8px; font-size:13.5px; }
.rd-footer__col a{ color:var(--body); }
.rd-footer__col a:hover{ color:var(--accent); text-decoration:none; }
.rd-footer__h{ font:600 12px 'IBM Plex Mono',monospace; letter-spacing:.08em; color:var(--muted); }
.rd-footer__bottom{ display:flex; gap:16px; align-items:center; border-top:1px solid var(--line); padding-top:16px; font-size:12.5px; color:var(--muted); flex-wrap:wrap; }
.rd-vk{ font:600 11px 'IBM Plex Sans',sans-serif; border:1.5px solid currentColor; border-radius:4px; padding:1px 5px; }

/* session messages */
.rd-messages{ margin-bottom:16px; display:flex; flex-direction:column; gap:8px; }
.rd-messages .message_error,.rd-messages .message_success,.rd-messages .message_info{ border-radius:var(--r); padding:11px 15px; font-size:14px; }
.rd-messages .message_error{ background:color-mix(in oklab,var(--err) 10%,var(--surface)); border:1px solid color-mix(in oklab,var(--err) 30%,transparent); color:var(--err); }
.rd-messages .message_success{ background:var(--ok-soft); border:1px solid color-mix(in oklab,var(--ok) 30%,transparent); color:var(--ok); }
.rd-messages .message_info{ background:var(--accent-soft); border:1px solid color-mix(in oklab,var(--accent) 22%,transparent); color:var(--accent); }

/* ==== АВАТАРЫ: у мигрированных нет пресетов (src=оригинал), а base theme.css
       душит .icms-user-avatar>img через max-width:1.25rem — перебиваем max-width:none ==== */
.icms-user-avatar > img,
.icms-user-avatar img{ width:36px !important; height:36px !important; max-width:none !important; min-width:0 !important; min-height:0 !important; object-fit:cover; border-radius:50%; }
.icms-user-avatar.small > img, .icms-user-avatar.small img{ width:30px !important; height:30px !important; }
.rd-profile-head__ava.icms-user-avatar > img,
.rd-profile-head__ava img{ width:72px !important; height:72px !important; max-width:none !important; object-fit:cover; border-radius:50%; }
#avatar img{ width:100% !important; height:auto !important; max-width:100% !important; border-radius:var(--r); }
/* точка онлайн-статуса не должна раздувать контейнер */
.icms-user-avatar{ line-height:0; }

/* ==== FORUM index (rd-forum, редизайн) ==== */
.rd-forum{ display:flex; flex-direction:column; gap:18px; margin-top:16px; }
.rd-forum__block{ background:var(--surface); border:1px solid var(--line); border-radius:calc(var(--r) + 2px); overflow:hidden; }
.rd-forum__head{ display:flex; align-items:center; justify-content:space-between; gap:14px; background:var(--accent-soft); border-bottom:1px solid var(--line); padding:12px 18px; }
.rd-forum__head a{ font:600 14.5px 'Onest',sans-serif; letter-spacing:.01em; color:var(--ink); text-decoration:none; }
.rd-forum__head a:hover{ color:var(--accent); text-decoration:none; }
.rd-forum__head-cols{ display:flex; gap:0; font-size:11.5px; color:var(--muted); }
.rd-forum__head-cols span:first-child{ width:130px; margin-right:14px; }
.rd-forum__head-cols span:last-child{ width:240px; }
@media (max-width:900px){ .rd-forum__head-cols{ display:none; } }
.rd-forum__row{ display:grid; grid-template-columns:44px 1fr 130px 240px; gap:14px; align-items:center; padding:15px 18px; border-top:1px solid var(--line); }
.rd-forum__row:first-child{ border-top:none; }
.rd-forum__icon{ width:38px; height:38px; border-radius:10px; background:var(--accent-soft); display:flex; align-items:center; justify-content:center; flex:none; }
.rd-forum__info{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.rd-forum__title{ font:600 15px 'Onest',sans-serif; color:var(--ink); text-decoration:none; }
.rd-forum__title:hover{ color:var(--accent); text-decoration:none; }
.rd-forum__desc{ font-size:12.5px; color:var(--muted); line-height:1.4; }
.rd-forum__subs{ display:flex; flex-wrap:wrap; gap:6px; margin-top:5px; }
.rd-forum__counts{ display:flex; flex-direction:column; gap:2px; font-size:12px; color:var(--muted); white-space:nowrap; }
.rd-forum__last{ display:flex; flex-direction:column; gap:2px; min-width:0; font-size:13px; }
.rd-forum__last > a{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--ink); font-weight:500; }
.rd-forum__last > a:hover{ color:var(--accent); text-decoration:none; }
.rd-forum__last-meta{ font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rd-forum__last-meta a{ color:var(--muted); }
@media (max-width:900px){
  .rd-forum__row{ grid-template-columns:44px 1fr; }
  .rd-forum__counts{ display:none; }
  .rd-forum__last{ display:none; }
}

/* ==== PROFILE head (rd-profile, редизайн) ==== */
.rd-profile-head{ display:flex; align-items:center; gap:18px; background:var(--surface); border:1px solid var(--line); border-radius:calc(var(--r) + 3px); padding:22px 24px; margin-top:8px; flex-wrap:wrap; }
.rd-profile-head__ava{ width:72px; height:72px; border-radius:50%; overflow:hidden; flex:none; background:var(--accent-soft); }
.rd-profile-head__ava img{ width:100%; height:100%; object-fit:cover; }
.rd-profile-head__main{ flex:1; min-width:200px; }
.rd-profile-head__name{ margin:0; font:600 26px/1.2 'Onest',sans-serif; letter-spacing:-.01em; color:var(--ink); }
.rd-profile-head__sub{ font-size:13px; color:var(--muted); margin-top:3px; }
.rd-profile-head__rates{ display:flex; gap:10px; }
.rd-pill{ background:var(--bg); border:1px solid var(--line2); border-radius:var(--r); padding:8px 12px; text-align:center; color:var(--body); min-width:70px; }
.rd-pill .value{ font:600 17px 'Onest',sans-serif; color:var(--ink); }
.rd-pill small{ font-size:11px; color:var(--muted); }
.rd-pill--ok{ background:var(--ok-soft); border-color:color-mix(in oklab, var(--ok) 30%, transparent); }
.rd-pill--ok .value{ color:var(--ok); }
.rd-pill--accent{ background:var(--accent-soft); border-color:color-mix(in oklab, var(--accent) 25%, transparent); }
.rd-pill--accent .value{ color:var(--accent); }
.rd-pill .thumb{ color:var(--muted); } .rd-pill .thumb:hover{ color:var(--accent); }
.rd-profile-grid{ display:grid; grid-template-columns:300px 1fr; gap:20px; align-items:start; }
@media (max-width:900px){ .rd-profile-grid{ grid-template-columns:1fr; } }
.rd-profile-side, .rd-profile-main{ display:flex; flex-direction:column; gap:16px; min-width:0; }
.rd-def{ display:flex; flex-direction:column; }
.rd-def__row{ display:grid; grid-template-columns:180px 1fr; gap:12px; padding:9px 0; border-bottom:1px solid var(--line); font-size:14px; }
.rd-def__row:last-child{ border-bottom:none; }
.rd-def__k{ color:var(--muted); }
.rd-def__v{ color:var(--body); min-width:0; overflow-wrap:break-word; }
.rd-def__group{ font:600 12.5px 'Onest',sans-serif; letter-spacing:.02em; text-transform:uppercase; color:var(--ink); padding:16px 0 6px; }
@media (max-width:560px){ .rd-def__row{ grid-template-columns:1fr; gap:2px; } }

/* ==== FORUM (рестайл .icms-forum*) ==== */
.icms-forum{ background:var(--surface); border:1px solid var(--line) !important; border-radius:var(--r); overflow:hidden; }
.icms-forum__cat.bg-primary{ background:var(--accent-soft) !important; }
.icms-forum__cat.bg-primary, .icms-forum__cat.bg-primary a{ color:var(--ink) !important; font-family:'Onest',sans-serif; font-weight:600; }
.icms-forum__cat.bg-light{ background:color-mix(in oklab, var(--line) 30%, var(--surface)) !important; color:var(--muted) !important; font-size:12.5px; text-transform:uppercase; letter-spacing:.03em; font-weight:600 !important; }
.icms-forum__section, .icms-forum__threads_list{ border-top:1px solid var(--line); }
.icms-forum__section h3 a, .icms-forum__threads_list a{ color:var(--ink); }
.icms-forum__section h3 a:hover, .icms-forum__threads_list a:hover{ color:var(--accent); text-decoration:none; }
.icms-forum__section .text-primary{ color:var(--accent) !important; }
.icms-forum__threads{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r); overflow:hidden; }
.icms-forum__threads_list-preview a{ font:600 15px 'Onest',sans-serif; }
.icms-forum__post-header{ background:var(--accent-soft) !important; }
.icms-forum__post-data{ background:var(--surface); border:1px solid var(--line); box-shadow:none !important; }
.icms-forum__post-content{ font-size:15.5px; line-height:1.6; }
.icms-forum__post-content img{ max-width:100%; height:auto; border:1px solid var(--line); border-radius:var(--r); }
.icms-forum__post-content iframe{ max-width:100%; }
.icms-forum__post-footer_signature img{ max-width:100%; height:auto; }
.icms-forum__post-footer{ border-top:1px solid var(--line); background:color-mix(in oklab, var(--line) 20%, var(--surface)); }

/* ==== COMMENTS (рестайл ядра) ==== */
.icms-comments-list .icms-comment, .comments_list .comment{ border-bottom:1px solid var(--line); }
.icms-comment-controls a{ color:var(--muted); font-size:13px; }
.icms-comment-controls a:hover{ color:var(--accent); }
#comments_list .nickname a, .icms-comment .nickname a{ font:600 14.5px 'IBM Plex Sans',sans-serif; color:var(--ink); }
#comments_title, .comments_title{ font:600 21px 'Onest',sans-serif; color:var(--ink); }
.comments_form textarea, #comments_add_form textarea{ font:400 14.5px/1.5 'IBM Plex Sans',sans-serif; background:var(--surface); border:1px solid var(--line2); border-radius:var(--r); color:var(--ink); }
.comments_form textarea:focus, #comments_add_form textarea:focus{ border-color:var(--accent); box-shadow:0 0 0 2px color-mix(in oklab, var(--accent) 22%, transparent); }

/* ==== FORMS / AUTH (bootstrap-формы под дизайн) ==== */
.rd-page .form-control{ font:400 14.5px 'IBM Plex Sans',sans-serif; color:var(--ink); background:var(--surface); border:1px solid var(--line2); border-radius:var(--r); padding:11px 14px; height:auto; }
.rd-page .form-control:focus{ background:var(--surface); color:var(--ink); border-color:var(--accent); box-shadow:0 0 0 2px color-mix(in oklab, var(--accent) 22%, transparent); }
.rd-page label{ font:500 13.5px 'IBM Plex Sans',sans-serif; color:var(--ink); }
.rd-page .form-text, .rd-page small{ color:var(--muted); }
.rd-page .btn-primary{ background:var(--accent); border-color:var(--accent); border-radius:var(--r); font-weight:500; }
.rd-page .btn-primary:hover{ background:var(--accent-hover); border-color:var(--accent-hover); }
.rd-page .card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r); }
.rd-auth{ max-width:480px; margin:12px auto 40px; background:var(--surface); border:1px solid var(--line); border-radius:calc(var(--r) + 4px); box-shadow:var(--shadow); padding:34px; }
.rd-auth h1{ font:600 26px 'Onest',sans-serif; color:var(--ink); margin:0 0 18px; letter-spacing:-.01em; }
.rd-auth .left_cell{ width:100%; }
.rd-auth .center_cell{ text-align:center; color:var(--muted); margin:14px 0; font-size:13px; }

/* ==== PILLS (датасеты/фильтры) ==== */
.rd-page .nav-pills .nav-link{ color:var(--body); font:500 13.5px 'IBM Plex Sans',sans-serif; border:1px solid var(--line2); border-radius:999px; padding:6px 14px; margin-right:8px; }
.rd-page .nav-pills .nav-link:hover{ color:var(--accent); border-color:var(--accent); }
.rd-page .nav-pills .nav-link.active{ background:var(--accent); border-color:var(--accent); color:#fff; }

/* ==== PAGINATION ==== */
.rd-page .pagination .page-link{ color:var(--body); background:var(--surface); border:1px solid var(--line2); }
.rd-page .pagination .page-item.active .page-link{ background:var(--accent); border-color:var(--accent); color:#fff; }
.rd-page .pagination .page-link:hover{ color:var(--accent); }

/* ==== WIDGETS wrapper ==== */
.rd-page .widget, .widget-panel{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:18px 20px; margin-bottom:16px; }
.rd-page .widget .widget_title, .widget-panel .widget_title{ font:600 12.5px 'Onest',sans-serif; letter-spacing:.02em; color:var(--ink); text-transform:uppercase; margin-bottom:10px; }

/* ==== PROFILE / nav-tabs ==== */
.rd-page .nav-tabs{ border-bottom:1px solid var(--line2); }
.rd-page .nav-tabs .nav-link{ color:var(--muted); border:none; border-bottom:2px solid transparent; font:500 14px 'IBM Plex Sans',sans-serif; padding:10px 14px; }
.rd-page .nav-tabs .nav-link:hover{ color:var(--accent); border-color:transparent; }
.rd-page .nav-tabs .nav-link.active{ color:var(--accent); background:transparent; border:none; border-bottom:2px solid var(--accent); }
.rd-page .icms-user-avatar img{ border-radius:50%; }
.rd-page .list-group-item{ background:var(--surface); border-color:var(--line); color:var(--body); }
.rd-page .badge-primary{ background:var(--accent); }
.rd-page .dropdown-menu{ background:var(--surface); border:1px solid var(--line2); border-radius:var(--r); box-shadow:var(--shadow); }
.rd-page .dropdown-item{ color:var(--body); }
.rd-page .dropdown-item:hover{ background:var(--accent-soft); color:var(--accent); }

/* таблицы bootstrap в контенте */
.rd-page .table{ color:var(--body); }
.rd-page .table td, .rd-page .table th{ border-color:var(--line); }
.rd-page h1{ font:600 30px/1.2 'Onest',sans-serif; letter-spacing:-.02em; color:var(--ink); }
.rd-page h2{ font:600 22px/1.3 'Onest',sans-serif; color:var(--ink); }
.rd-page .breadcrumb{ background:transparent; padding:0; font-size:13px; margin-bottom:6px; }
.rd-page .breadcrumb a{ color:var(--muted); }
.rd-page .breadcrumb a:hover{ color:var(--accent); }

/* ---- адаптив ---- */
@media (max-width:900px){
  .rd-hero__grid{ grid-template-columns:1fr; gap:28px; }
  .rd-home{ grid-template-columns:1fr; }
  .rd-artwrap,.rd-artgrid{ grid-template-columns:1fr; gap:24px; }
  .rd-aside{ position:static; }
  .rd-cardgrid{ grid-template-columns:repeat(2,1fr); }
  .rd-gen__steps > div{ grid-template-columns:1fr !important; }
  .rd-nav{ display:none; }
}
@media (max-width:560px){
  .rd-stats{ flex-direction:column; }
  .rd-cardgrid{ grid-template-columns:1fr; }
  .rd-hero__title{ font-size:30px; }
  .rd-footer__cols{ grid-template-columns:1fr 1fr; }
}
