/* Справка «Описание прошивок» — компактная карточка в стиле личного кабинета */

.descr-page {
    --ink: #16203a;
    --muted: #7b869c;
    --line: #e7ebf3;
    --soft: #f7f9fd;
    --accent: #667eea;
    --accent-2: #764ba2;
    --danger: #c2410c;
    --amber: #b45309;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    padding: 8px 0 32px;
}

.descr-page h1,
.descr-page h2,
.descr-page h3 { color: var(--ink) !important; margin: 0; }
.descr-page p { margin: 0; }
/* в main.2.css заголовки и <b> покрашены в белый через !important */
.descr-page b,
.descr-page strong { color: inherit !important; }

.descr-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(20, 30, 60, .10);
    padding: 22px 24px 20px;
}

/* ---------- шапка ---------- */

.descr-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.descr-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 8px;
}

.descr-hero h1 {
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -.01em;
    line-height: 1.15;
}

.descr-lead {
    margin-top: 7px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
    max-width: 52ch;
}

.descr-hero-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.descr-stat {
    min-width: 92px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--soft);
}

.descr-stat-v {
    font-size: 15px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.descr-stat-k {
    font-size: 10.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 2px;
}

/* ---------- навигация по разделам ---------- */

.descr-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 12px 0 0;
}

.descr-nav a {
    font-size: 12.5px;
    font-weight: 600;
    color: #4a5670;
    text-decoration: none;
    padding: 7px 13px;
    border-radius: 9px;
    background: #f1f4f9;
    transition: background .15s ease, color .15s ease;
}

.descr-nav a:hover {
    background: #e6ebf6;
    color: var(--ink);
    text-decoration: none;
}

/* ---------- разделы ---------- */

.descr-section { margin-top: 20px; }

.descr-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.descr-section-head h2 {
    font-size: 16.5px;
    font-weight: 700;
    letter-spacing: .01em;
}

.descr-count {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    background: #eef2f9;
    border-radius: 20px;
    padding: 2px 9px;
}

/* ---------- сокращения ---------- */

.descr-abbr-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.descr-abbr {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.descr-abbr:hover {
    border-color: #d5ddf0;
    box-shadow: 0 8px 20px rgba(20, 30, 60, .07);
    transform: translateY(-1px);
}

.descr-abbr.is-alert {
    border-color: #f3d6c7;
    background: #fffaf7;
}

.descr-code {
    flex: 0 0 auto;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #4338ca;
    background: #eef0fe;
    border-radius: 8px;
    padding: 6px 9px;
    min-width: 44px;
    text-align: center;
    text-transform: lowercase;
}

.descr-abbr.is-alert .descr-code {
    color: var(--danger);
    background: #fdeee7;
}

.descr-abbr-body h3 {
    font-size: 14.5px;
    font-weight: 650;
    line-height: 1.3;
}

.descr-abbr-body p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
    margin-top: 3px;
}

.descr-abbr.is-alert .descr-abbr-body b { color: var(--danger) !important; }

/* ---------- модификации ---------- */

.descr-feat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.descr-feat {
    display: flex;
    gap: 11px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.descr-feat:hover {
    border-color: #d5ddf0;
    box-shadow: 0 8px 20px rgba(20, 30, 60, .07);
    transform: translateY(-1px);
}

.descr-feat-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--accent);
    background: #eef0fe;
}

.descr-feat-body { min-width: 0; }

.descr-feat-body h3 {
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
}

.descr-feat-body p {
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--muted);
    margin-top: 2px;
}

.descr-tag {
    display: inline-block;
    margin-top: 7px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 10.5px;
    font-weight: 600;
    color: #4a5670;
    background: #f1f4f9;
    border-radius: 6px;
    padding: 2px 7px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.descr-tag.is-alert {
    color: var(--danger);
    background: #fdeee7;
}

/* ---------- предупреждение ---------- */

.descr-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid #f6e2c8;
    border-radius: 12px;
    background: #fffbf4;
}

.descr-notice-icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--amber);
    background: #fdf1de;
    font-size: 14px;
}

.descr-notice h3 {
    font-size: 14px;
    font-weight: 700;
    color: #8a4b09 !important;
}

.descr-notice p {
    font-size: 12.5px;
    line-height: 1.55;
    color: #7c5a34;
    margin-top: 3px;
    max-width: 78ch;
}

/* ---------- действия ---------- */

.descr-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.descr-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

.descr-btn:hover { transform: translateY(-1px); text-decoration: none; }

.descr-btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(102, 126, 234, .32);
}

.descr-btn-primary:hover { color: #fff; }

.descr-btn-ghost {
    background: #fff;
    color: #3b4a63;
    border: 1px solid #dbe3ef;
}

.descr-hint {
    font-size: 12px;
    color: var(--muted);
}

/* ---------- адаптив ---------- */

@media (max-width: 1400px) {
    .descr-feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    .descr-hero h1 { font-size: 23px; }
}

@media (max-width: 900px) {
    .descr-abbr-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .descr-feat-grid { grid-template-columns: 1fr; }
    .descr-hero-stats { width: 100%; }
    .descr-stat { flex: 1 1 0; min-width: 0; }
}

@media (max-width: 576px) {
    .descr-page { padding: 0 0 24px; }
    .descr-card { padding: 16px 14px; border-radius: 14px; }
    .descr-hero { gap: 14px; }
    .descr-hero h1 { font-size: 21px; }
    .descr-lead { font-size: 13px; }
    .descr-abbr { padding: 11px 12px; gap: 10px; }
    .descr-feat { padding: 11px 12px; }
    .descr-actions { gap: 8px; }
    .descr-btn { flex: 1 1 100%; justify-content: center; }
    .descr-hint { font-size: 11.5px; }
}
