/* ===========================================================================
   MSI Lab — design system. Calm grey palette, light / dark / auto themes.
   =========================================================================== */

:root {
    --bg-page: #f2f3f5;
    --bg-surface: #ffffff;
    --bg-surface-2: #f7f8fa;
    --bg-nav: #2b2f33;
    --bg-code: #1e2227;

    --text-primary: #2c3035;
    --text-secondary: #555b61;
    --text-muted: #868d94;
    --text-nav: #c4c9ce;
    --text-nav-hover: #ffffff;
    --text-code: #e6e9ec;

    --border-color: #e1e4e8;
    --border-strong: #cdd2d8;
    --accent: #5b7083;
    --accent-hover: #44535f;
    --accent-soft: #eef1f4;
    --link: #3f6079;
    --link-hover: #27384a;

    --ok: #3a8a5f;
    --err: #b3473a;
    --warn: #b9810c;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.08);

    --radius: 6px;
    --gap: 18px;
    --maxw: 1180px;
}

[data-theme="dark"] {
    --bg-page: #15171a;
    --bg-surface: #1e2125;
    --bg-surface-2: #24282d;
    --bg-nav: #101214;
    --bg-code: #0c0e10;

    --text-primary: #e3e6e9;
    --text-secondary: #b3b9bf;
    --text-muted: #828a91;
    --text-nav: #c4c9ce;
    --text-nav-hover: #ffffff;
    --text-code: #e6e9ec;

    --border-color: #2e333a;
    --border-strong: #3a4048;
    --accent: #7e95a8;
    --accent-hover: #98abbb;
    --accent-soft: #262b31;
    --link: #8fb0c9;
    --link-hover: #b6cee0;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {
        --bg-page: #15171a;
        --bg-surface: #1e2125;
        --bg-surface-2: #24282d;
        --bg-nav: #101214;
        --bg-code: #0c0e10;
        --text-primary: #e3e6e9;
        --text-secondary: #b3b9bf;
        --text-muted: #828a91;
        --text-nav: #c4c9ce;
        --text-nav-hover: #ffffff;
        --text-code: #e6e9ec;
        --border-color: #2e333a;
        --border-strong: #3a4048;
        --accent: #7e95a8;
        --accent-hover: #98abbb;
        --accent-soft: #262b31;
        --link: #8fb0c9;
        --link-hover: #b6cee0;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.5);
    }
}

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

html, body { height: 100%; }

body {
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
    background: var(--bg-page);
    display: flex;
    flex-direction: column;
    transition: background-color .25s ease, color .25s ease;
}

a { color: var(--link); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--link-hover); }

h1, h2, h3, h4 { color: var(--text-primary); font-weight: 600; line-height: 1.25; }
h1 { font-size: 1.6rem; margin-bottom: .6em; }
h2 { font-size: 1.3rem; margin-bottom: .5em; }
h3 { font-size: 1.05rem; }
p { margin-bottom: .7em; }
img { max-width: 100%; height: auto; border: 0; }
hr { height: 1px; border: 0; background: var(--border-color); margin: 1em 0; }

code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    background: var(--accent-soft);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 12.5px;
}

pre {
    background: var(--bg-code);
    color: var(--text-code);
    border-radius: var(--radius);
    border-left: 4px solid var(--accent);
    padding: .8em 1.2em;
    overflow: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 12.5px;
    line-height: 1.6;
    margin-bottom: 1em;
}

/* ---- Top navigation ---- */
.top-nav {
    background: var(--bg-nav);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 18px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-brand a {
    color: #fff;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.2;
}
.nav-brand .brand-text { display: flex; flex-direction: column; }
.nav-brand .brand-title {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: 0.01em;
}
.brand-logo {
    display: block;
    height: 40px;
    width: auto;
    flex-shrink: 0;
}
.brand-sub { font-size: .62rem; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--text-nav); margin-top: 3px; }
.brand-tagline { font-size: .68rem; font-weight: 400; color: var(--text-nav); opacity: .85; margin-top: 2px; letter-spacing: .02em; }

.nav-menu { margin-left: auto; }
.nav-menu ul { display: flex; list-style: none; gap: 4px; }
.nav-menu a {
    color: var(--text-nav);
    padding: 8px 12px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background .2s, color .2s;
}
.nav-menu a:hover { color: var(--text-nav-hover); background: rgba(255,255,255,.08); }

/* theme toggle */
.theme-toggle-container { display: flex; align-items: center; gap: .4rem; margin-left: 10px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.15); }
.theme-options { display: flex; align-items: center; }
.theme-toggle { position: relative; display: inline-block; width: 3.2rem; height: 1.6rem; }
.theme-toggle input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #595f66; border-radius: 34px; transition: .3s; }
.slider::before { position: absolute; content: ""; height: 1.15rem; width: 1.15rem; left: .22rem; bottom: .22rem; background: #fff; border-radius: 50%; transition: .3s; }
input:checked + .slider { background: var(--accent); }
input:checked + .slider::before { transform: translateX(1.6rem); }
.theme-icon { margin: 0 .4rem; cursor: pointer; opacity: .5; transition: .25s; width: 1.15rem; height: 1.15rem; color: var(--text-nav); }
.theme-icon.active { opacity: 1; transform: scale(1.12); color: #fff; }
.theme-icon svg { width: 100%; height: 100%; }
.auto-icon { margin-left: .6rem; }

/* burger */
.mobile-menu-toggle { display: none; background: none; border: 0; cursor: pointer; width: 26px; height: 20px; position: relative; }
.mobile-menu-toggle span { position: absolute; left: 0; width: 100%; height: 2px; background: var(--text-nav); border-radius: 1px; transition: .3s; }
.mobile-menu-toggle span:nth-child(1) { top: 0; }
.mobile-menu-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.mobile-menu-toggle span:nth-child(3) { bottom: 0; }
.mobile-menu-toggle.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* ---- Layout grid ---- */
.layout {
    flex: 1 0 auto;
    max-width: var(--maxw);
    width: 100%;
    margin: var(--gap) auto;
    padding: 0 18px;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr) 250px;
    gap: var(--gap);
    align-items: start;
}
.content {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px 26px;
}

/* ---- Widgets ---- */
.widget {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--gap);
    overflow: hidden;
}
.widget-title {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface-2);
}
.widget-title i { margin-right: 6px; color: var(--accent); }
.content-blocks--top:not(:empty) { margin-bottom: var(--gap); }
.content-blocks--top .widget-block { margin-bottom: var(--gap); }
.content-blocks--top .widget-block:last-child { margin-bottom: 0; }
.content-blocks--bottom:not(:empty) { margin-top: var(--gap); }
.content-blocks--bottom .widget-block { margin-bottom: var(--gap); }
.content-blocks--bottom .widget-block:last-child { margin-bottom: 0; }
.widget-block--plain {
    background: transparent;
    border: none;
    box-shadow: none;
}
.widget-block--plain .block-body { padding: 0; }
.widget-menu { list-style: none; padding: 6px 0; }
.widget-menu li a { display: block; padding: 7px 14px; color: var(--text-secondary); border-left: 3px solid transparent; }
.widget-menu li a:hover { background: var(--accent-soft); color: var(--text-primary); border-left-color: var(--accent); }
.widget-menu li a i { width: 18px; text-align: center; color: var(--text-muted); margin-right: 4px; }
.block-body { padding: 12px 14px; }
.block-body a { color: var(--link); }

/* auth + search forms */
.auth-box > p { margin: 0; padding: 12px 14px 8px; }
.auth-form, .search-form { padding: 12px 14px; }
.auth-form input, .search-form input,
.form input[type=text], .form input[type=password], .form input[type=email],
.form input[type=url], .form input[type=number], .form input[type=search],
.form textarea, .form select {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 8px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg-surface-2);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
}
.form textarea.textarea-tall,
.form-rus-edit textarea {
    min-height: 200px;
    resize: vertical;
}
.auth-form input:focus, .search-form input:focus,
.form input:focus, .form textarea:focus, .form select:focus {
    outline: none; border-color: var(--accent); background: var(--bg-surface);
}
.auth-links { padding: 0 14px 14px; font-size: 12.5px; color: var(--text-muted); }
.search-form { display: flex; gap: 6px; align-items: stretch; }
.search-form input { flex: 1; min-width: 0; width: auto; margin-bottom: 0; }
.search-form .btn { flex-shrink: 0; }
.search-page-form { max-width: 520px; margin-bottom: 18px; }
.search-page-form .search-form { padding: 12px 14px; }

.admin-search { margin-bottom: 14px; max-width: 360px; }
.admin-search-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg-surface-2);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
}
.admin-search-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-surface);
}

/* buttons */
.btn {
    display: inline-block;
    border: 1px solid var(--border-strong);
    background: var(--bg-surface-2);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px 12px; }
.btn-danger { color: var(--err); border-color: var(--err); background: transparent; }
.btn-danger:hover { background: var(--err); color: #fff; }

/* flash messages */
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; }
.flash-ok { background: rgba(58,138,95,.12); color: var(--ok); border: 1px solid rgba(58,138,95,.4); }
.flash-err { background: rgba(179,71,58,.12); color: var(--err); border: 1px solid rgba(179,71,58,.4); }

/* ---- Catalog / lists ---- */
.letters { margin: 4px 0 18px; line-height: 2; }
.letters a, .letters span { display: inline-block; min-width: 22px; text-align: center; padding: 2px 4px; border-radius: 3px; }
.letters a { background: var(--accent-soft); color: var(--link); font-weight: 600; }
.letters a:hover { background: var(--accent); color: #fff; }
.letters span { color: var(--text-muted); }
.letters .sep { color: var(--border-strong); }

.catalog-actions { margin-bottom: 16px; font-size: 13px; }
.catalog-actions a { font-weight: 600; }

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 4px 6px;
    row-gap: 6px;
    margin-bottom: 20px;
    padding: 0 2px 10px;
    border-bottom: 2px solid var(--border-color);
    background: transparent;
    box-shadow: none;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.admin-nav-link {
    display: inline-block;
    padding: 8px 14px 6px;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: var(--radius) var(--radius) 0 0;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    transition: color .2s, border-color .2s, background .2s;
}
.admin-nav-link:hover {
    color: var(--text-primary);
    background: var(--accent-soft);
}
.admin-nav-link.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
    background: transparent;
    box-shadow: none;
}
.admin-nav-link.is-active:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-hover);
    background: transparent;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 0;
}

.file-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
}
.file-picker-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}
.file-picker-name {
    font-size: 13px;
    color: var(--text-muted);
}
.block-hide-on {
    margin: 12px 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-surface-2);
}
.block-hide-on legend {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0 6px;
}

.rus-list { list-style: none; }
.rus-day { margin-bottom: 16px; }
.rus-day-date { font-weight: 700; color: var(--text-primary); border-bottom: 1px solid var(--border-color); padding-bottom: 4px; margin-bottom: 6px; }
.rus-day-label { color: var(--text-muted); }
.rus-item { padding: 4px 0; }
.rus-item .hidden-mark { color: var(--err); font-weight: 700; }
.rus-item .admin-actions a { font-size: 12px; color: var(--text-muted); margin-left: 4px; }

/* rusifikator detail */
.rus-detail-title { margin-bottom: 18px; line-height: 1.35; }
.rus-detail-author { font-weight: 400; color: var(--text-secondary); font-size: .92em; }
.rus-desc-block {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--gap);
    overflow: hidden;
}
.rus-desc-title {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface-2);
    margin: 0;
}
.rus-desc-body {
    padding: 14px 16px;
    text-align: justify;
    line-height: 1.6;
    color: var(--text-primary);
}
.rus-desc-body blockquote {
    margin: 10px 0;
    padding: 8px 12px;
    border-left: 3px solid var(--accent);
    background: var(--bg-surface-2);
    color: var(--text-secondary);
}
.rus-meta { background: var(--bg-surface-2); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 var(--gap); }
.rus-meta strong { color: var(--text-primary); }
.download-box {
    margin: 18px 0;
    padding: 16px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.download-box p { margin: 0; }
.rus-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: var(--gap);
}
.rus-actions .btn i { margin-right: 6px; }

/* download captcha page */
.download-page {
    display: flex;
    justify-content: center;
    padding: 8px 0 24px;
}
.download-card {
    width: 100%;
    max-width: 520px;
    padding: 24px 26px 26px;
    background: var(--bg-surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
}
.download-card-label {
    margin: 0 0 8px;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
}
.download-card-title {
    margin: 0 0 16px;
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
}
.download-card-lead {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}
.download-card-form {
    text-align: left;
    max-width: 280px;
    margin: 0 auto;
}
.download-math-row {
    margin-bottom: 16px;
}
.download-math-label {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-align: center;
}
.download-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.download-card-actions .btn i { margin-right: 6px; }

/* error pages */
.error-page {
    display: flex;
    justify-content: center;
    padding: 12px 0 28px;
}
.error-card {
    width: 100%;
    max-width: 520px;
    text-align: center;
    padding: 32px 28px 28px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.error-card--server {
    border-color: rgba(179,71,58,.35);
}
.error-code {
    margin: 0 0 8px;
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.04em;
    color: var(--accent);
    opacity: .85;
}
.error-card--server .error-code {
    color: var(--err);
}
.error-title {
    margin: 0 0 12px;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
}
.error-hint {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
}
.error-path {
    margin: 0 0 20px;
    font-size: 12.5px;
    color: var(--text-muted);
    word-break: break-all;
}
.error-path span { margin-right: 4px; }
.error-path code {
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    font-size: 12px;
}
.error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.error-actions .btn i { margin-right: 6px; }

/* pagination */
.pagination { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 5px; }
.pagination .page { min-width: 32px; text-align: center; padding: 6px 9px; border: 1px solid var(--border-color); border-radius: var(--radius); background: var(--bg-surface-2); }
.pagination a.page:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }

/* tables (admin) */
.table-wrap { overflow-x: auto; margin-bottom: 16px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--border-color); text-align: left; }
.table th { background: var(--bg-surface-2); color: var(--text-muted); text-transform: uppercase; font-size: 11px; letter-spacing: .05em; }
.table tr:hover td { background: var(--bg-surface-2); }
.section-edit-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: 100%; }
.section-edit-form input[type=text] { margin: 0; width: 120px; max-width: 100%; }
.section-edit-form input[type=number] { margin: 0; width: 56px; }
.section-edit-form label { font-weight: 400; white-space: nowrap; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-admin { background: rgba(91,112,131,.18); color: var(--accent); }
.badge-active { background: rgba(58,138,95,.16); color: var(--ok); }
.badge-blocked { background: rgba(179,71,58,.16); color: var(--err); }
.badge-pending { background: rgba(185,129,12,.16); color: var(--warn); }

/* wizard */
.wizard-steps { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.wizard-step { flex: 1; min-width: 120px; text-align: center; padding: 8px; border-radius: var(--radius); background: var(--bg-surface-2); border: 1px solid var(--border-color); font-size: 12px; color: var(--text-muted); }
.wizard-step.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.wizard-step.done { border-color: var(--ok); color: var(--ok); }
.hint { color: var(--text-muted); font-size: 12.5px; margin: 6px 0 12px; }
.autocomplete-list { border: 1px solid var(--border-color); border-radius: var(--radius); margin-top: -4px; max-height: 240px; overflow-y: auto; background: var(--bg-surface); }
.autocomplete-list div { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--border-color); }
.autocomplete-list div:hover, .autocomplete-list div.sel { background: var(--accent-soft); }
.file-list { list-style: none; margin: 10px 0; }
.file-list li { display: flex; justify-content: space-between; padding: 6px 10px; border: 1px solid var(--border-color); border-radius: var(--radius); margin-bottom: 4px; background: var(--bg-surface-2); }

.form .row { margin-bottom: 14px; }
.form label { display: block; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; font-size: 13px; }
.form textarea { min-height: 120px; resize: vertical; }

/* Serpzilla rental links (legacy .show_links from PHP site) */
.show_links * {
    background: transparent none repeat scroll 0 0 !important;
    border: medium none !important;
    clear: none !important;
    clip: rect(auto, auto, auto, auto) !important;
    font-size: 100% !important;
    font-style: normal !important;
    font-variant: normal !important;
    font-weight: normal !important;
    height: auto !important;
    letter-spacing: normal !important;
    line-height: normal !important;
    margin: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    position: static !important;
    text-align: left !important;
    text-decoration: none !important;
    text-indent: 0 !important;
    text-transform: none !important;
    vertical-align: baseline !important;
    visibility: visible !important;
    white-space: normal !important;
    width: auto;
    word-spacing: normal !important;
    z-index: auto !important;
    cursor: pointer !important;
    word-wrap: break-word !important;
}
.show_links li {
    display: list-item !important;
    list-style-image: none !important;
    list-style-position: outside !important;
    list-style-type: none !important;
    display: inline;
}
.show_links li DIV {
    padding: 0.5em !important;
}
.show_links > table {
    padding: 0 !important;
    border-collapse: collapse !important;
}
.show_links DIV,
.show_links TABLE {
    padding: 0 !important;
}
.show_links {
    width: auto !important;
    font-family: Verdana, sans-serif !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    border: 1px solid var(--border-color, #DDDDDD) !important;
    background-color: transparent !important;
    padding: 5px 6px !important;
    position: relative !important;
    display: block !important;
    border-radius: var(--radius, 5px) !important;
}
.show_links_icnt,
.show_links_icnt * {
    text-align: left !important;
}
.show_links td.show_links_icnt {
    padding: 4px 5px !important;
    vertical-align: top !important;
}
.show_links p {
    line-height: 1.35 !important;
    margin: 0 0 0.2em !important;
}
.show_links p:last-child {
    margin-bottom: 0 !important;
}
.show_links_text,
.show_links_text A,
.show_links_text A:hover {
    color: #000000 !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
}
.show_links_url {
    color: #3f6079 !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
}
.show_links_header,
.show_links_header A {
    color: #3f6079 !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    font-weight: bold !important;
    text-decoration: underline !important;
}
.show_links_sign {
    color: #999999 !important;
    font-size: 10px !important;
    text-align: left !important;
    text-decoration: none !important;
}
.show_links_clear {
    clear: both !important;
}
.show_links TABLE {
    width: 100% !important;
    border: 0 !important;
}

/* footer */
.site-footer { flex-shrink: 0; background: var(--bg-nav); color: var(--text-nav); text-align: center; padding: 18px; margin-top: var(--gap); font-size: 12.5px; }
.footer-meta { color: var(--text-muted); margin: 0; }

/* ---- Responsive ---- */
@media (max-width: 1000px) {
    .layout { grid-template-columns: minmax(0,1fr) 250px; }
    .sidebar-left { grid-row: 2; grid-column: 1 / -1; }
    .sidebar-left .widget { display: inline-block; vertical-align: top; width: calc(50% - 10px); margin-right: 12px; }
}
@media (max-width: 760px) {
    .nav-menu { display: none; }
    .mobile-menu-toggle { display: block; }
    .brand-tagline { display: none; }
    .brand-title-suffix { display: none; }
    .layout { grid-template-columns: 1fr; }
    .sidebar { grid-column: 1 / -1 !important; }
    .sidebar-left { grid-row: auto; display: none; }
    .sidebar-left.open { display: block; }
    .sidebar-left .widget { display: block; width: 100%; margin-right: 0; }
    .content { padding: 18px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
