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

:root {
    --primary: #2dd4bf;
    --primary-dim: #0d9488;
    --accent: #f59e0b;
    --bg-dark: #0b100e;
    --bg-1: #101714;
    --bg-card: #151f1a;
    --bg-card-2: #1c2922;
    --text: #edf5f0;
    --text-2: #b8c9c0;
    --text-3: #80948a;
    --border: #24352d;
    --border-hi: #3a5245;
    --green: #4ade80;
    --green-dim: rgba(74, 222, 128, 0.1);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.08);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.08);
    --info-bg: rgba(45, 212, 191, 0.08);
    --accent-glow: rgba(245, 158, 11, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', 'Courier New', monospace;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.75;
    font-size: 16px;
}

.container { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }
.container-wide { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== HEADER ===== */
.site-header {
    background: rgba(11, 16, 14, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 0;
}

.header-inner { display: flex; justify-content: space-between; align-items: center; }

.logo {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.logo-img {
    height: 50px;
    width: auto;
    border-radius: 4px;
}

.logo-icon {
    width: 30px; height: 30px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; color: #0b100e; font-weight: 900;
}

.logo em { color: var(--primary); font-style: normal; }

.nav-links { list-style: none; display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text-3); text-decoration: none; font-size: 0.875rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }

/* ===== HERO ===== */
.hero { padding: 4.5rem 0 3.5rem; }

.hero-label {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--info-bg);
    border: 1px solid rgba(45, 212, 191, 0.2);
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

.hero h1 em { color: var(--primary); font-style: normal; }

.hero-meta {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-3);
    margin-bottom: 1.25rem;
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.hero-lead {
    font-size: 1.1rem;
    color: var(--text-2);
    max-width: 60ch;
    margin-bottom: 2rem;
}

.hero-inner {
    display: block;
    max-width: 780px;
    margin: 0 auto;
}

/* Summary card (замена статус-панели) */
.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.summary-card-bar {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card-2);
}

.summary-card-title {
    font-family: var(--mono);
    font-size: 0.7rem; letter-spacing: 0.1em;
    color: var(--text-3); font-weight: 600;
}

.summary-rows { padding: 0.5rem 1.25rem 1rem; }

.summary-row {
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.summary-row:last-child { border-bottom: none; }
.summary-row .label { color: var(--text-3); flex-shrink: 0; }
.summary-row .value { font-family: var(--mono); font-size: 0.76rem; color: var(--text-2); font-weight: 600; text-align: right; }
.summary-row .value.accent { color: var(--accent); }
.summary-row .value.danger { color: var(--danger); }

/* ===== AUTHOR ===== */
.author-strip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.author-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.author-strip h2 { font-size: 1rem; font-weight: 800; margin-bottom: 0.1rem; }
.author-role { font-size: 0.78rem; color: var(--primary); font-weight: 600; margin-bottom: 0.25rem; }
.author-bio { font-size: 0.85rem; color: var(--text-3); line-height: 1.6; }

/* ===== FIGURES ===== */
.article-figure {
    margin: 2.25rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
}

.article-figure img, .article-figure svg { width: 100%; display: block; }

.article-figure figcaption {
    padding: 0.75rem 1.25rem;
    font-size: 0.78rem;
    color: var(--text-3);
    font-family: var(--mono);
    border-top: 1px solid var(--border);
}

/* ===== ARTICLE ===== */
.article { padding: 3.5rem 0 4rem; }

.toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    margin: 2rem 0 2.5rem;
}

.toc-title {
    font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.7px; color: var(--text-3); margin-bottom: 0.75rem;
}

.toc-list { margin-left: 1.25rem; }
.toc-list li { margin-bottom: 0.35rem; }
.toc-list a { color: var(--primary); text-decoration: none; font-size: 0.88rem; font-weight: 500; }
.toc-list a:hover { color: var(--accent); }

.article h2 {
    font-size: 1.55rem; font-weight: 800; color: var(--text);
    margin: 3rem 0 1rem; letter-spacing: -0.3px;
    scroll-margin-top: 5rem;
}

.article h3 { font-size: 1.15rem; font-weight: 700; color: var(--text); margin: 2rem 0 0.75rem; }

.article p { color: var(--text-2); margin-bottom: 1.25rem; font-size: 1rem; }
.article ul, .article ol { margin: 1rem 0 1.5rem 1.5rem; color: var(--text-2); }
.article li { margin-bottom: 0.5rem; }
.article strong { color: var(--text); }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; margin: 1.5rem 0 2rem; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.data-table th {
    font-family: var(--mono); font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.06em; color: var(--text-3); text-align: left;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card-2);
}

.data-table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
.data-table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(45, 212, 191, 0.03); }

/* ===== COMPONENT CARDS ===== */
.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.component-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.2s;
}

.component-card:hover { border-color: var(--primary-dim); }
.component-card h4 { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.component-card p { font-size: 0.85rem; color: var(--text-3); margin-bottom: 0; line-height: 1.65; }

.component-num {
    font-family: var(--mono);
    font-size: 0.72rem; font-weight: 700;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-sm);
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 0.75rem;
}

/* ===== FAQ ===== */
.faq details {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq summary {
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: "+";
    font-family: var(--mono);
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }

.faq details p {
    padding: 1rem 1.25rem;
    margin-bottom: 0;
    font-size: 0.92rem;
}

/* ===== DISCLAIMER BOXES ===== */
.disclaimer {
    border-radius: var(--radius);
    padding: 1.4rem 1.6rem;
    margin: 2rem 0;
    border-left: 4px solid;
    font-size: 0.92rem;
}

.disclaimer-danger { background: var(--danger-bg); border-color: var(--danger); }
.disclaimer-warning { background: var(--warning-bg); border-color: var(--warning); }
.disclaimer-info { background: var(--info-bg); border-color: var(--primary); }

.disclaimer strong { display: block; margin-bottom: 0.4rem; font-size: 0.95rem; color: var(--text); }
.disclaimer p { color: var(--text-2); margin-bottom: 0; font-size: 0.9rem; }
.disclaimer p + p { margin-top: 0.75rem; }

.closing-line {
    margin-top: 2.5rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-3);
    text-align: center;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--bg-1);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
}

.footer-inner {
    display: flex; justify-content: space-between; align-items: start;
    gap: 2rem; flex-wrap: wrap; margin-bottom: 2rem;
}

.footer-col { max-width: 320px; }
.footer-col h4 {
    font-size: 0.82rem; font-weight: 700; color: var(--text);
    margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px;
}

.footer-col p { color: var(--text-3); font-size: 0.82rem; line-height: 1.7; }
.footer-bottom { text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.78rem; color: var(--text-3); }

/* ===== ONION ADDRESS BLOCK ===== */
.onion-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
}

.onion-block-bar {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card-2);
}

.onion-block-logo {
    height: 67px;
    width: auto;
    border-radius: 3px;
    opacity: 0.85;
}

.onion-block-title {
    font-family: var(--mono);
    font-size: 0.7rem; letter-spacing: 0.1em;
    color: var(--primary); font-weight: 600;
}

.onion-block-status {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--green);
    display: flex; align-items: center; gap: 0.4rem;
}

.onion-block-status::before {
    content: "";
    width: 6px; height: 6px;
    background: var(--green);
    border-radius: 50%;
    display: inline-block;
}

.onion-block-input-row {
    display: flex;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
    align-items: center;
}

.onion-block-input {
    flex: 1;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.onion-block-input:focus { border-color: var(--primary); }

.onion-block-copy {
    background: var(--primary);
    color: var(--bg-dark);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.7rem 1.25rem;
    font-family: var(--sans);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.onion-block-copy:hover { background: var(--accent); }

.onion-block-note {
    padding: 0 1.25rem 1rem;
    font-size: 0.78rem;
    color: var(--text-3);
    font-family: var(--mono);
}

/* Author strip in footer area */
.author-strip-footer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin: 2rem 0;
}

.author-strip-footer .author-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.author-strip-footer h3 { font-size: 1rem; font-weight: 800; margin-bottom: 0.1rem; }
.author-strip-footer .author-role { font-size: 0.78rem; color: var(--primary); font-weight: 600; margin-bottom: 0.25rem; }
.author-strip-footer .author-bio { font-size: 0.85rem; color: var(--text-3); line-height: 1.6; margin-bottom: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 820px) {
    .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
    .header-inner { flex-direction: column; gap: 0.75rem; }
    .nav-links { gap: 1rem; flex-wrap: wrap; justify-content: center; }
    .author-strip { flex-direction: column; text-align: center; }
    .author-strip-footer { flex-direction: column; text-align: center; }
    .footer-inner { flex-direction: column; }
    .components-grid { grid-template-columns: 1fr; }
    .onion-block-input-row { flex-direction: column; }
    .onion-block-copy { width: 100%; }
}
