/* ==========================================================================
   limitik — общий CSS публичного сайта (главная landing.html + research.html)
   База — значения главной; страница исследований помечается <body class="article">.
   ========================================================================== */

:root {
    --bg-page: #EFEAE0;
    --bg-card: #F7F3E9;
    --bg-elevated: #FCF9F1;
    --bg-dark: #2A2724;
    --text-primary: #2A2724;
    --text-secondary: #7A6F60;
    --text-muted: #A89C8A;
    --border: #D9D2C2;
    --border-light: #E5DFCF;

    --accent: #5B4FE0;
    --accent-hover: #4A3FCC;
    --accent-bg: #E6E3FA;

    --success: #3F8F4A;
    --success-bg: #DFEDDB;
    --warning: #B8842A;
    --warning-bg: #F2E4BC;
    --danger: #C53B3B;
    --danger-bg: #F4D5D0;
    --info: #4F84A8;
    --info-bg: #DCE9F1;

    --radius-card: 12px;
    --radius-lg: 16px;
    --radius-control: 8px;
    --radius-badge: 6px;
    --shadow-card: 0 1px 3px rgba(42,39,36,.04), 0 1px 2px rgba(42,39,36,.03);
    --shadow-lg: 0 18px 50px rgba(42,39,36,.12), 0 4px 12px rgba(42,39,36,.06);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

h1, h2, h3, h4 { color: var(--text-primary); margin: 0; }
h1 { font-size: 52px; font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
h2 { font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
h3 { font-size: 22px; font-weight: 600; line-height: 1.3; }
h4 { font-size: 18px; font-weight: 600; line-height: 1.35; }

p { margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
strong { font-weight: 700; }

.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.lead { font-size: 20px; line-height: 1.5; color: var(--text-secondary); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }
.term { color: var(--accent); font-style: italic; font-weight: 500; }

.t-success { color: var(--success); }
.t-warning { color: var(--warning); }
.t-danger  { color: var(--danger); }
.t-accent  { color: var(--accent); }

/* layout */
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; margin: 0 auto; }
.article-body { max-width: none; margin: 0 auto; }
section { padding: 80px 0; }
@media (max-width: 640px) { section { padding: 56px 0; } h1 { font-size: 38px; } h2 { font-size: 26px; } }
.content > p, .content > ul { font-size: 17px; }

/* header */
.site-header {
    position: sticky; top: 0; z-index: 980; height: 64px;
    background: var(--bg-card); border-bottom: 1px solid var(--border-light);
}
.site-header .inner { height: 64px; display: flex; align-items: center; justify-content: space-between; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.logo { font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.logo-tag { font-size: 11px; font-weight: 600; color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius-badge); padding: 1px 6px; margin-left: 8px; vertical-align: middle; text-transform: lowercase; }
.nav-link { color: var(--text-secondary); font-size: 15px; font-weight: 500; margin: 0 14px; }
.nav-link:hover { color: var(--text-primary); }
.nav-link.is-active { color: var(--text-primary); font-weight: 600; }

/* buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: inherit; font-size: 15px; font-weight: 600;
    border-radius: var(--radius-control); padding: 10px 18px;
    cursor: pointer; border: 1px solid transparent; line-height: 1.2;
    transition: background .15s, border-color .15s, color .15s; white-space: nowrap;
}
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border); }
.btn-outline:hover { background: var(--bg-card); border-color: var(--text-muted); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); }
.btn-on-dark { background: transparent; color: #EDE7DC; border-color: #55504A; }
.btn-on-dark:hover { background: rgba(255,255,255,.06); color: #fff; }

/* cards */
.card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.pad-20 { padding: 20px; } .pad-24 { padding: 24px; } .pad-28 { padding: 28px; } .pad-32 { padding: 32px; } .pad-40 { padding: 40px; }

/* breadcrumb */
.breadcrumb { font-size: 14px; color: var(--text-muted); padding: 20px 0 0; }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb span { margin: 0 8px; }

/* callouts */
.callout { border-radius: var(--radius-control); padding: 24px; margin: 24px 0; }
.callout-accent { background: var(--accent-bg); border-left: 4px solid var(--accent); }
.callout-warning { background: var(--warning-bg); border-left: 4px solid var(--warning); }
.callout-example { background: var(--bg-elevated); border: 1px solid var(--border-light); padding: 20px; }

/* source plaque */
.source { background: var(--info-bg); border-left: 4px solid var(--info); border-radius: var(--radius-control); padding: 18px 20px; margin: 20px 0; }
.source .slabel { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--info); }
.source .sref { font-weight: 600; margin: 6px 0 4px; font-size: 16px; line-height: 1.45; }
.source .snote { font-size: 14px; color: var(--text-secondary); }

/* TOC */
.toc { background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: var(--radius-card); padding: 24px; }
.toc-label { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 10px; font-size: 15px; line-height: 1.4; }
.toc a { color: var(--text-secondary); }
.toc a:hover { color: var(--accent); }
@media (min-width: 960px) { .toc-sticky { position: sticky; top: 88px; } }

/* progress preview / mini bars */
.bar { height: 8px; border-radius: 4px; background: var(--border-light); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 4px; }
.fill-success { background: var(--success); }
.fill-warning { background: var(--warning); }
.fill-danger  { background: var(--danger); }

.disc { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.disc-40 { width: 40px; height: 40px; }
.disc-44 { width: 44px; height: 44px; }

/* list with icons */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; gap: 12px; padding: 9px 0; font-size: 16px; line-height: 1.5; }
.check-list li .ic { flex: 0 0 auto; margin-top: 3px; }

/* section head */
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.sec-head .lead { margin-top: 12px; }

/* timeline */
.tl-item { display: flex; gap: 16px; padding-bottom: 22px; position: relative; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); margin-top: 6px; position: relative; }
.tl-item:not(:last-child) .tl-dot::after { content: ""; position: absolute; left: 50%; top: 18px; transform: translateX(-50%); width: 2px; height: calc(100% + 12px); background: var(--border); }
.tl-year { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }

/* steps */
.step-num { font-size: 56px; font-weight: 800; color: var(--accent); line-height: 1; letter-spacing: -.03em; }

/* science quote */
.quote-box { background: var(--accent-bg); border-radius: var(--radius-card); padding: 24px; }
.quote-box .qlabel { font-size: 12px; font-weight: 700; letter-spacing: .07em; color: var(--accent); text-transform: uppercase; }

/* study metric */
.study-metric { font-size: 34px; font-weight: 800; color: var(--accent); line-height: 1.1; letter-spacing: -.02em; }

/* pie placeholder */
.pie-mock { width: 150px; height: 150px; border-radius: 50%; margin: 8px auto 4px;
    background: conic-gradient(var(--info) 0 34%, var(--warning) 34% 56%, var(--success) 56% 78%, var(--text-muted) 78% 100%); position: relative; }
.pie-mock::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; background: var(--bg-card); }

/* sources list */
.ref-list { counter-reset: ref; list-style: none; margin: 0; padding: 0; }
.ref-list li { counter-increment: ref; position: relative; padding: 12px 0 12px 40px; border-bottom: 1px solid var(--border-light); font-size: 15px; line-height: 1.55; color: var(--text-secondary); }
.ref-list li:last-child { border-bottom: none; }
.ref-list li::before { content: counter(ref); position: absolute; left: 0; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-bg); color: var(--accent); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* dark block */
.dark { background: var(--bg-dark); color: #D9D2C5; border-radius: var(--radius-lg); }
.dark h2, .dark h3, .dark h4 { color: #FCF9F1; }
.dark .on-dark-card { background: rgba(252,249,241,.05); border: 1px solid rgba(252,249,241,.08); border-radius: var(--radius-card); padding: 22px; }
.dark .on-dark-muted { color: var(--text-muted); }

/* accordion / FAQ */
.uk-accordion-title { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.faq-item { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-card); padding: 6px 24px; margin-bottom: 12px; box-shadow: var(--shadow-card); }
.uk-open > .uk-accordion-title { color: var(--accent); }

/* footer */
.site-footer { background: var(--bg-dark); color: #C8BFB0; padding: 48px 0; }
.site-footer h4 { color: #FCF9F1; font-size: 15px; margin-bottom: 16px; }
.site-footer a { color: #C8BFB0; font-size: 14px; }
.site-footer a:hover { color: #FCF9F1; }
.site-footer .foot-links li { margin-bottom: 10px; }
.site-footer .foot-bottom { border-top: 1px solid #45413C; margin-top: 36px; padding-top: 24px; color: var(--text-muted); font-size: 13px; }

@media (max-width: 768px) { .hide-mobile { display: none !important; } }

/* ==========================================================================
   Переопределения для страницы исследований — <body class="article">
   (более узкие заголовки, плотнее секции, иной таймлайн)
   ========================================================================== */
body.article h1 { font-size: 40px; line-height: 1.12; }
body.article h2 { font-size: 30px; }
body.article section { padding: 48px 0; }
body.article .check-list { margin: 16px 0 0; }
body.article .tl-item { gap: 18px; padding-bottom: 24px; }
body.article .tl-item:not(:last-child) .tl-dot::after { height: calc(100% + 14px); }
body.article .tl-year { font-weight: 800; font-size: 20px; }
body.article .site-footer { margin-top: 32px; }
@media (max-width: 640px) {
    body.article h1 { font-size: 30px; }
    body.article h2 { font-size: 24px; }
}

/* Пагинация блога (pdoPage + uk-pagination) */
.blog-pagination { margin-top: 44px; }
.blog-pagination > * { font-size: 15px; }
.blog-pagination > * > a,
.blog-pagination > * > span { min-width: 20px; justify-content: center; color: var(--text-secondary); transition: color .15s; }
.blog-pagination > * > a:hover { color: var(--accent); }
.blog-pagination > .uk-active > span { color: var(--text-primary); font-weight: 700; }
.blog-pagination > .uk-disabled > span { color: var(--text-muted); }

/* ==========================================================================
   Auth pages (login.html / register.html)
   ========================================================================== */
.auth-wrap { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 430px; }
.auth-inner { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 36px 32px; }
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head h1 { font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.auth-head p { color: var(--text-secondary); font-size: 15px; margin: 8px 0 0; }
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.field input { width: 100%; font-family: inherit; font-size: 16px; color: var(--text-primary); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-control); padding: 11px 14px; outline: none; transition: border-color .15s; }
.field input:focus { border-color: var(--accent); }
.field .hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; margin: 4px 0 18px; flex-wrap: wrap; }
.auth-row label { display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); cursor: pointer; }
.auth-submit { width: 100%; justify-content: center; }
.auth-alt { text-align: center; font-size: 14px; color: var(--text-secondary); margin-top: 20px; }
.auth-consent { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.auth-consent label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.auth-consent input { appearance: none; -webkit-appearance: none; -moz-appearance: none; flex: 0 0 16px; margin-top: 2px; }
.auth-consent span { flex: 1; }
.auth-consent a { color: var(--accent); }
.auth-foot { text-align: center; color: var(--text-muted); font-size: 13px; padding: 20px 0 36px; }

/* ==========================================================================
   Mobile nav (public pages)
   ========================================================================== */
.show-mobile { display: none; }
.menu-btn { width: 42px; height: 42px; border-radius: var(--radius-control); display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--border); color: var(--text-primary); cursor: pointer; }
.menu-btn:hover { background: var(--bg-elevated); }
.nav-drop { min-width: 224px; background: var(--bg-card) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-control); box-shadow: var(--shadow-lg); padding: 8px; }
.nav-drop .uk-nav > li > a { color: var(--text-secondary); border-radius: var(--radius-badge); padding: 10px 12px; font-size: 15px; }
.nav-drop .uk-nav > li > a:hover { background: var(--bg-elevated); color: var(--text-primary); }
.nav-drop .uk-nav-divider { border-top: 1px solid var(--border-light); margin: 6px 4px; }
.nav-drop .nav-drop-primary > a { color: var(--accent); font-weight: 600; }
@media (max-width: 768px) { .show-mobile { display: inline-flex !important; } }

/* ==========================================================================
   404 — страница не найдена
   ========================================================================== */
.notfound { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 64px); padding: 48px 20px; text-align: center; }
.notfound-inner { max-width: 560px; margin: 0 auto; }
.notfound-code {
    font-size: clamp(120px, 26vw, 220px); font-weight: 800; line-height: .9; letter-spacing: -.04em;
    background: linear-gradient(135deg, var(--accent), #9D93F5);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: var(--accent);
}
.notfound .eyebrow { margin-top: 6px; }
.notfound-title { font-size: 32px; margin: 12px 0 0; }
.notfound-lead { margin: 14px auto 0; max-width: 460px; }
.notfound-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.notfound-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; align-items: center; margin-top: 28px; font-size: 14px; }
.notfound-links a { color: var(--text-secondary); }
.notfound-links a:hover { color: var(--accent); }
@media (max-width: 640px) { .notfound-title { font-size: 26px; } }
