:root {
    --ink: #12151c;
    --ink-2: #2c3340;
    --muted: #5d6573;
    --paper: #f3efe6;
    --white: #fffcf7;
    --line: #e4ddd0;
    --accent: #0f766e;
    --accent-2: #115e59;
    --accent-soft: #ccfbf1;
    --hero: #0c1220;
    --gold: #d4a017;
    --danger: #b45309;
    --shadow: 0 12px 40px rgba(18, 21, 28, 0.08);
    --radius: 22px;
    --font: "Manrope", system-ui, sans-serif;
    --display: "Unbounded", "Manrope", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.wrap { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255,252,247,.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex; align-items: center; gap: 20px; min-height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-text { font-family: var(--display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.03em; }
.logo-text span { color: var(--accent); }
.logo-mark { display: flex; }
.nav-desktop { display: flex; align-items: center; gap: 8px; }
.nav-desktop > a, .nav-drop-btn {
    padding: 8px 12px; border-radius: 999px; color: var(--ink-2);
    background: none; border: 0; font: inherit; cursor: pointer;
}
.nav-desktop > a.is-on, .nav-drop-btn.is-on, .nav-desktop > a:hover, .nav-drop-btn:hover {
    background: #ece6d8;
}
.nav-drop { position: relative; }
.nav-drop-btn { display: flex; align-items: center; gap: 6px; }
.nav-mega {
    position: absolute; top: calc(100% + 10px); left: 0;
    width: min(920px, 80vw); background: var(--white);
    border: 1px solid var(--line); border-radius: 20px;
    box-shadow: var(--shadow); padding: 20px; display: grid;
    grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.nav-mega[hidden] { display: none !important; }
.mega-title { margin: 0 0 8px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mega-col a { display: block; padding: 4px 0; color: var(--ink-2); font-size: .92rem; }
.mega-all { grid-column: 1 / -1; font-weight: 700; }
.header-search { margin-left: auto; display: flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.header-search input { border: 0; padding: 9px 14px; width: 220px; font: inherit; background: transparent; }
.header-search button, .hero-search button, .mobile-search button {
    border: 0; background: var(--accent); color: #fff; font: inherit; font-weight: 700;
    padding: 9px 16px; cursor: pointer;
}
.header-tools { display: none; }
.icon-btn { border: 0; background: #ece6d8; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; }
.mobile-panel { padding: 8px 16px 20px; display: grid; gap: 8px; border-top: 1px solid var(--line); background: var(--white); }
.mobile-panel[hidden] { display: none !important; }
.mobile-panel a { padding: 10px 4px; color: var(--ink); font-weight: 600; }
.mobile-search { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mobile-search input { flex: 1; border: 0; padding: 10px 12px; font: inherit; }
.mobile-note { color: var(--muted); font-size: .85rem; }

.hero {
    padding: 28px 0 8px;
}
.hero-inner {
    background: radial-gradient(1200px 400px at 10% -10%, #1c3d48, transparent),
                linear-gradient(160deg, var(--hero), #12202b 60%, #0f3d38);
    color: #edf4f2; border-radius: 32px; padding: 48px 48px 36px;
    position: relative; overflow: hidden;
}
.hero-inner::after {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(94,234,212,.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(94,234,212,.05) 1px, transparent 1px);
    background-size: 42px 42px; pointer-events: none;
}
.hero-inner > * { position: relative; z-index: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: #5eead4; margin: 0 0 12px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.03em; line-height: 1.2; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); margin: 0 0 14px; font-weight: 600; max-width: 20ch; }
.hero h1 em { font-style: normal; color: #5eead4; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }
.hero .lead { color: #c5d5d1; }
.hero-search { display: flex; max-width: 640px; background: #fff; border-radius: 16px; overflow: hidden; margin: 22px 0 16px; }
.hero-search input { flex: 1; border: 0; padding: 16px 18px; font: inherit; font-size: 1rem; }
.hero-search button { padding: 0 22px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.hero-chips a {
    color: #d7ebe7; border: 1px solid rgba(94,234,212,.3);
    padding: 8px 12px; border-radius: 999px; font-size: .9rem;
}
.hero-chips a:hover { background: rgba(94,234,212,.12); color: #fff; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; }
.hero-stats div { margin: 0; }
.hero-stats dt { font-family: var(--display); font-size: 1.8rem; font-weight: 600; }
.hero-stats dd { margin: 4px 0 0; color: #9db5b0; font-size: .9rem; }

.section { padding: 56px 0; }
.section-alt { background: #ebe4d6; }
.section-alt .wrap { position: relative; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.section-head h2, .section h2 { margin: 0 0 8px; font-size: 1.6rem; }
.section-head p { margin: 0; color: var(--muted); }
.text-link { font-weight: 700; color: var(--accent-2); }
.section-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cat-card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px 22px 8px;
}
.cat-card header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.cat-card h3 { margin: 0; font-size: 1.05rem; }
.cat-card header span { color: var(--muted); font-size: .85rem; }
.cat-card ul { list-style: none; padding: 12px 0 8px; margin: 0; }
.cat-card li { border-top: 1px solid var(--line); }
.cat-card li a { display: block; padding: 10px 0; color: var(--ink-2); }
.cat-card li a:hover { color: var(--accent); }

.popular-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pop-card {
    display: flex; flex-direction: column; gap: 12px;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; color: inherit;
}
.pop-card:hover { border-color: #99f6e4; color: inherit; box-shadow: var(--shadow); }
.pop-meta { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.pop-meta span:first-child { font-weight: 700; color: var(--ink); font-size: 1rem; }
.pop-leader { display: flex; align-items: center; gap: 10px; background: #f0fdfa; border-radius: 14px; padding: 10px; }
.pop-leader strong { flex: 1; }
.pop-card p { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
.pop-go { font-weight: 700; color: var(--accent-2); }

.avatar {
    width: 40px; height: 40px; border-radius: 12px; color: #fff;
    display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex: none;
}
.score { white-space: nowrap; color: var(--ink); }
.score b { font-family: var(--display); font-size: 1.15rem; }
.score small { color: var(--muted); }
.score-lg b { font-size: 1.35rem; }
.score-xl b { font-size: 2rem; }
.rank-n { font-family: var(--display); font-weight: 700; color: var(--accent-2); min-width: 1.6ch; }

.how-grid { display: grid; grid-template-columns: 1.6fr .9fr; gap: 32px; align-items: start; }
.how-list { padding-left: 18px; }
.how-list li { margin-bottom: 12px; }
.how-aside {
    background: var(--hero); color: #e7f3f0; border-radius: var(--radius); padding: 24px;
}
.how-aside-k { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: #5eead4; font-weight: 700; }
.how-aside p { color: #c5d5d1; }
.btn-primary, .btn-secondary, .btn-ghost {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 14px; padding: 12px 18px; font-weight: 700; border: 0; cursor: pointer; font: inherit; font-weight: 700;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); color: #fff; }
.btn-secondary { background: #ece6d8; color: var(--ink); }
.btn-secondary:hover { color: var(--ink); }
.btn-ghost { background: transparent; color: var(--accent-2); border: 1px solid var(--line); padding: 8px 12px; font-size: .9rem; }
.note { color: var(--muted); font-size: .92rem; }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.article-grid-3 { grid-template-columns: repeat(3, 1fr); }
.article-card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; color: inherit; display: flex; flex-direction: column; gap: 8px;
}
.article-card:hover { color: inherit; border-color: #99f6e4; }
.article-card h3 { margin: 0; font-size: 1.05rem; }
.article-card p, .article-card time { margin: 0; color: var(--muted); font-size: .92rem; }
.tag { display: inline-flex; width: fit-content; padding: 4px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.tag-obzor { background: #dbeafe; color: #1e3a8a; }
.tag-manual { background: #ccfbf1; color: #115e59; }
.tag-podborka { background: #fef3c7; color: #92400e; }

.cta-band { padding: 24px 0 64px; }
.cta-inner {
    display: flex; justify-content: space-between; gap: 24px; align-items: center;
    background: var(--white); border: 1px solid var(--line); border-radius: 28px; padding: 28px;
}
.cta-inner h2 { margin: 0 0 8px; font-size: 1.35rem; }
.cta-inner p { margin: 0; color: var(--muted); max-width: 62ch; }

.page-head { padding: 28px 0 8px; }
.page-head h1 { margin: 8px 0; font-size: clamp(1.6rem, 3vw, 2.4rem); max-width: 22ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--muted); }
.crumbs a::after { content: " /"; color: #c4bba8; }
.crumbs-now { color: var(--ink-2); }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 16px 0 0; list-style: none; color: var(--muted); }

.rank-list { list-style: none; padding: 0; margin: 24px 0 40px; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--white); }
.rank-row {
    display: grid; grid-template-columns: 48px 1fr auto auto auto; gap: 12px;
    align-items: center; padding: 16px 18px; border-top: 1px solid var(--line);
}
.rank-row:first-child { border-top: 0; }
.rank-row.is-first { background: #f0fdfa; }
.rank-main { display: flex; gap: 12px; align-items: center; color: inherit; min-width: 0; }
.rank-main:hover { color: inherit; }
.rank-main strong { display: inline; margin-right: 8px; }
.rank-main small { display: block; color: var(--muted); font-size: .88rem; }
.rank-price { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.badge { font-style: normal; font-size: .72rem; font-weight: 700; padding: 3px 7px; border-radius: 999px; background: #ccfbf1; color: #115e59; vertical-align: middle; }
.badge-choice { background: #0f766e; color: #fff; }
.badge-price { background: #fef3c7; color: #92400e; }
.badge-start { background: #dbeafe; color: #1e3a8a; }
.badge-people { background: #fce7f3; color: #9d174d; }

.compare, .related { margin: 40px 0; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #f6f1e6; font-weight: 700; }
.th-w { font-weight: 500; color: var(--muted); font-size: .75rem; }

.service-hero { display: flex; gap: 18px; align-items: flex-start; }
.service-hero .avatar { width: 64px; height: 64px; font-size: 1.1rem; border-radius: 18px; }
.service-hero-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 12px 0; }
.service-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.service-layout { display: grid; grid-template-columns: 1.4fr .8fr; gap: 28px; padding: 24px 0 40px; }
.prose h2 { font-size: 1.3rem; }
.procon { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.procon div { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.score-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 20px; height: fit-content; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin: 10px 0; font-size: .9rem; }
.bar { grid-column: 1 / -1; height: 8px; background: #ece6d8; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #0f766e, #5eead4); }
.score-total { margin-top: 16px; font-size: 1.05rem; }
.neighbors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.neighbors a { display: flex; gap: 10px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 10px; color: inherit; }
.neighbors a:hover { color: inherit; border-color: #99f6e4; }
.neighbors strong { flex: 1; font-size: .92rem; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.filters a { padding: 8px 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; }
.filters a.is-on { background: var(--hero); color: #fff; border-color: var(--hero); }
.feed { display: grid; gap: 12px; }
.feed-item { display: block; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 22px; color: inherit; }
.feed-item:hover { color: inherit; border-color: #99f6e4; }
.feed-item h2 { margin: 8px 0; font-size: 1.25rem; }
.feed-item p { margin: 0; color: var(--muted); }
.feed-meta { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: .88rem; }
.article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 32px; padding-bottom: 40px; }
.article-body { background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: 28px 32px; }
.article-body h2 { margin-top: 1.4em; }
.article-body a { text-decoration: underline; }
.side-box { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: grid; gap: 8px; }
.side-link { font-weight: 600; color: var(--ink-2); }
.prose-page { padding-bottom: 48px; max-width: 760px; }
.prose-page .prose { background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: 28px; }

.search-list { display: grid; gap: 8px; margin: 12px 0 28px; }
.search-list a { display: grid; gap: 4px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; color: inherit; }
.search-list a:hover { color: inherit; border-color: #99f6e4; }
.search-list span { color: var(--muted); font-size: .9rem; }
.companies { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.company-row { display: flex; gap: 12px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 12px; color: inherit; }
.company-row:hover { color: inherit; border-color: #99f6e4; }
.company-row span { flex: 1; display: grid; }
.company-row small { color: var(--muted); }

.catalog-block { margin-bottom: 36px; }
.catalog-block header { display: flex; justify-content: space-between; align-items: baseline; }
.catalog-block header span { color: var(--muted); }
.catalog-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.catalog-links a { display: grid; gap: 4px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; color: inherit; }
.catalog-links a:hover { color: inherit; border-color: #99f6e4; }
.catalog-links span { color: var(--muted); font-size: .85rem; }

.contacts-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 24px; padding-bottom: 48px; }
.contact-form { display: grid; gap: 10px; margin-top: 16px; }
.contact-form label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
.contact-form input, .contact-form select, .contact-form textarea {
    font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--white);
}
.form-ok { color: var(--accent-2); font-weight: 600; }
.authors-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 8px 0 48px; }
.author-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.empty-page { padding: 80px 0; text-align: center; }
.empty-page h1 { margin: 8px auto 12px; }

.site-footer { background: var(--hero); color: #d5e3df; padding: 48px 0 24px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, .8fr); gap: 28px; }
.footer-brand p { color: #9db5b0; }
.footer-h { font-weight: 700; color: #fff; margin: 0 0 10px; }
.site-footer a { display: block; color: #c5d5d1; padding: 3px 0; }
.site-footer a:hover { color: #5eead4; }
.site-footer .logo { margin-bottom: 10px; }
.site-footer .logo-text { color: #fff; }
.footer-bottom { margin-top: 28px; border-top: 1px solid #24313a; padding-top: 16px; font-size: .85rem; color: #8aa09b; }

@media (max-width: 980px) {
    .nav-desktop, .header-search { display: none; }
    .header-tools { display: flex; gap: 8px; margin-left: auto; }
    .section-grid, .popular-grid, .article-grid, .article-grid-3, .companies, .catalog-links, .authors-grid, .neighbors { grid-template-columns: 1fr; }
    .hero-inner { padding: 28px 20px; border-radius: 24px; }
    .hero-stats { grid-template-columns: 1fr 1fr; }
    .how-grid, .service-layout, .article-layout, .contacts-grid, .footer-grid, .procon { grid-template-columns: 1fr; }
    .rank-row { grid-template-columns: 32px 1fr auto; }
    .rank-price, .rank-row .btn-ghost { display: none; }
    .cta-inner { flex-direction: column; align-items: flex-start; }
    .nav-mega { position: static; width: auto; }
}
