/* ----- Reset & base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: #1f2933;
    background: #fafaf7;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #c2185b; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }

/* ----- Layout ----- */
.container { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ----- Header ----- */
.site-header {
    background: #fff;
    border-bottom: 1px solid #ebe4d6;
    position: sticky; top: 0; z-index: 100;
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; max-width: 1100px; margin: 0 auto; gap: 12px;
}
.logo {
    font-weight: 800; font-size: 22px; color: #c2185b; text-decoration: none;
    letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; }
.nav { display: flex; gap: 18px; align-items: center; }
.nav a { color: #1f2933; font-weight: 500; font-size: 15px; }
.nav a.active { color: #c2185b; }
.nav-toggle {
    display: none; background: none; border: 0; padding: 8px; font-size: 20px;
}
.search-form { display: flex; gap: 6px; }
.search-form input {
    border: 1px solid #d6cfc0; border-radius: 6px; padding: 8px 12px;
    font-size: 15px; width: 180px; background: #fafaf7;
}
.search-form input:focus { outline: 2px solid #c2185b; outline-offset: -1px; }

@media (max-width: 720px) {
    .nav { display: none; flex-direction: column; position: absolute;
           top: 100%; left: 0; right: 0; background: #fff; padding: 16px;
           border-bottom: 1px solid #ebe4d6; gap: 16px; }
    .nav.open { display: flex; }
    .nav-toggle { display: block; }
    .search-form input { width: 130px; }
}

/* ----- Hero ----- */
.hero {
    padding: 48px 16px 32px;
    text-align: center;
}
.hero h1 {
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1.15;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}
.hero p { font-size: 18px; color: #5b6470; max-width: 580px; margin: 0 auto 20px; }
.hero-cta { display: inline-flex; gap: 8px; align-items: center;
    background: #c2185b; color: #fff; padding: 12px 22px; border-radius: 8px;
    font-weight: 600; font-size: 16px;
}
.hero-cta:hover { background: #a01548; text-decoration: none; }

/* ----- Sections ----- */
.section { padding: 36px 0; }
.section h2 {
    font-size: 24px; margin: 0 0 20px;
    letter-spacing: -0.01em;
}
.section-header {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 20px;
}
.section-header a { font-size: 14px; color: #5b6470; }

/* ----- Card grid (articles) ----- */
.card-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
    background: #fff; border: 1px solid #ebe4d6; border-radius: 10px;
    padding: 20px; transition: transform .12s, box-shadow .12s;
    display: flex; flex-direction: column; gap: 8px;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.06); text-decoration: none; }
.card .meta {
    font-size: 12px; color: #8b94a0; text-transform: uppercase; letter-spacing: 0.05em;
}
.card h3 {
    font-size: 17px; margin: 0; color: #1f2933;
    line-height: 1.35;
}
.card .tags { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
    font-size: 11px; padding: 3px 8px; background: #f4ecd8;
    color: #8c6c2c; border-radius: 4px;
}
.tag-age { background: #e7f3ee; color: #2e7d62; }

/* ----- Article page ----- */
.article-header { padding: 32px 0 24px; }
.article-header .meta {
    font-size: 13px; color: #8b94a0; margin-bottom: 8px;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.article-header h1 {
    font-size: clamp(26px, 4.5vw, 36px); line-height: 1.2;
    margin: 0 0 12px; letter-spacing: -0.02em;
}
.article-header .tags { margin-top: 12px; }

.article-body {
    font-size: 17px; line-height: 1.7;
}
.article-body h2 { font-size: 22px; margin: 32px 0 12px; letter-spacing: -0.01em; }
.article-body h3 { font-size: 18px; margin: 24px 0 8px; }
.article-body p { margin: 0 0 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 22px; }
.article-body li { margin: 6px 0; }
.article-body strong { font-weight: 600; color: #1f2933; }
.article-body blockquote {
    border-left: 3px solid #c2185b; padding: 4px 16px; margin: 16px 0;
    color: #5b6470; font-style: italic;
}

/* ----- CTA blocks ----- */
.cta-banner-top {
    background: linear-gradient(135deg, #fdf3eb, #f9e6dc);
    padding: 14px 20px; border-radius: 10px;
    display: flex; align-items: center; justify-content: space-between;
    margin: 0 0 28px; gap: 16px; flex-wrap: wrap;
}
.cta-banner-top .text { font-size: 15px; color: #6b3a14; }
.cta-banner-top .btn { background: #c2185b; color: #fff; padding: 8px 16px;
    border-radius: 6px; font-weight: 600; font-size: 14px; }

.cta-native {
    background: #fff7e6; border-left: 3px solid #d4a73a; padding: 14px 18px;
    margin: 24px 0; border-radius: 4px; font-size: 16px;
}
.cta-native a { font-weight: 600; }

.cta-bottom {
    background: #fff; border: 1px solid #ebe4d6; border-radius: 12px;
    padding: 28px 24px; margin: 40px 0 16px; text-align: center;
}
.cta-bottom h3 { margin: 0 0 8px; font-size: 22px; }
.cta-bottom p { color: #5b6470; margin: 0 0 18px; }
.cta-bottom .btn-primary {
    background: #c2185b; color: #fff; padding: 12px 24px; border-radius: 8px;
    font-weight: 600; font-size: 16px; display: inline-block;
}
.cta-bottom .btn-secondary {
    background: transparent; color: #c2185b; padding: 12px 24px; border-radius: 8px;
    font-weight: 600; font-size: 16px; display: inline-block;
    border: 1px solid #c2185b; margin-left: 8px;
}

/* ----- Filters ----- */
.filters {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 24px;
}
.filter-group { font-size: 13px; }
.filter-group .label { color: #8b94a0; margin-right: 6px; font-size: 12px; text-transform: uppercase; }
.chip {
    display: inline-block; padding: 6px 12px; border-radius: 16px;
    background: #fff; border: 1px solid #d6cfc0; color: #1f2933;
    font-size: 13px; margin: 0 4px 4px 0; cursor: pointer;
    text-decoration: none;
}
.chip:hover { border-color: #c2185b; text-decoration: none; }
.chip.active { background: #c2185b; color: #fff; border-color: #c2185b; }

/* ----- Footer ----- */
.site-footer {
    background: #1f2933; color: #c4cdd9;
    padding: 32px 16px; margin-top: 60px;
    font-size: 14px;
}
.footer-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between;
}
.site-footer a { color: #fdc4d6; }
.site-footer h4 { margin: 0 0 12px; font-size: 14px; color: #fff; text-transform: uppercase; letter-spacing: 0.05em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }

/* ----- Tests ----- */
.test-card {
    background: #fff; border: 1px solid #ebe4d6; border-radius: 12px;
    padding: 24px; margin-bottom: 16px;
}
.test-card h3 { margin: 0 0 8px; font-size: 20px; }
.test-card .badge {
    display: inline-block; padding: 3px 10px; background: #e7f3ee; color: #2e7d62;
    border-radius: 4px; font-size: 12px; font-weight: 600; margin-right: 8px;
}
.test-card .meta { color: #8b94a0; font-size: 13px; margin-bottom: 12px; }
.test-card .btn-start {
    display: inline-block; background: #c2185b; color: #fff;
    padding: 10px 20px; border-radius: 8px; font-weight: 600; margin-top: 12px;
}

.test-runner {
    background: #fff; border: 1px solid #ebe4d6; border-radius: 12px;
    padding: 28px; margin: 24px 0;
}
.test-runner .progress {
    height: 6px; background: #f4ecd8; border-radius: 3px; overflow: hidden;
    margin-bottom: 24px;
}
.test-runner .progress-bar {
    height: 100%; background: #c2185b; transition: width .3s;
}
.test-runner h2 { font-size: 20px; margin: 0 0 24px; }
.test-runner .options { display: flex; flex-direction: column; gap: 10px; }
.test-runner .option {
    background: #fafaf7; border: 1px solid #d6cfc0; border-radius: 8px;
    padding: 14px 18px; cursor: pointer; transition: all .12s;
    font-size: 16px; text-align: left; width: 100%;
}
.test-runner .option:hover { border-color: #c2185b; background: #fff7f0; }
.test-runner .option.selected { border-color: #c2185b; background: #ffeef4; }
.test-runner .controls {
    display: flex; justify-content: space-between; margin-top: 24px;
}
.test-runner .btn-back, .test-runner .btn-next {
    padding: 10px 20px; border-radius: 8px; border: 0;
    font-weight: 600; font-size: 15px;
}
.test-runner .btn-back { background: transparent; color: #5b6470; }
.test-runner .btn-next { background: #c2185b; color: #fff; }
.test-runner .btn-next:disabled { opacity: 0.4; cursor: not-allowed; }

.test-result {
    background: #fff; border: 1px solid #ebe4d6; border-radius: 12px;
    padding: 32px; margin: 24px 0;
}
.test-result h2 { margin: 0 0 8px; font-size: 26px; }
.test-result .score-block {
    display: flex; align-items: baseline; gap: 16px; margin: 24px 0;
    padding: 20px; background: #fafaf7; border-radius: 10px;
}
.test-result .score { font-size: 48px; font-weight: 800; color: #c2185b; }
.test-result .interpretation { font-size: 17px; line-height: 1.6; }
.test-result .interpretation.green { color: #2e7d62; }
.test-result .interpretation.amber { color: #b06800; }
.test-result .interpretation.red { color: #b03028; }
.test-result .recommendations {
    background: #fff7e6; border-left: 3px solid #d4a73a;
    padding: 14px 18px; margin: 20px 0; border-radius: 4px;
}

/* ----- About hero ----- */
.about-hero {
    display: flex;
    gap: 28px;
    align-items: center;
    margin: 24px 0 32px;
    padding: 0;
}
.about-photo {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 6px 24px rgba(194, 24, 91, 0.15);
}
.about-hero-text { flex: 1; min-width: 0; }
.about-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.about-greeting {
    font-size: 20px; color: #c2185b; font-weight: 600;
    margin: 0 0 12px;
}
.about-lead {
    font-size: 18px; color: #1f2933; line-height: 1.55;
    margin: 0;
}
@media (max-width: 640px) {
    .about-hero {
        flex-direction: column;
        text-align: center;
        gap: 18px;
    }
    .about-photo { width: 180px; height: 180px; }
    .about-lead { text-align: left; }
}

/* ----- Friday tasks ----- */
.task-card {
    background: linear-gradient(135deg, #fff, #fff7e6);
    border: 1px solid #f0d990; border-radius: 12px;
    padding: 24px; margin-bottom: 16px;
}
.task-card .badge { background: #d4a73a; color: #fff; padding: 3px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.task-card h3 { margin: 12px 0 8px; }

/* ----- Search results ----- */
.search-result-list { list-style: none; padding: 0; margin: 24px 0; }
.search-result-list li {
    background: #fff; border: 1px solid #ebe4d6; border-radius: 10px;
    padding: 16px 20px; margin-bottom: 8px;
}
.search-result-list li a { color: #1f2933; font-weight: 600; }
.search-result-list li mark { background: #fff0c0; color: #1f2933; padding: 0 2px; }

.no-results { padding: 32px; text-align: center; color: #5b6470; }

/* ----- Misc ----- */
.breadcrumb { font-size: 13px; color: #8b94a0; margin: 12px 0 0; }
.breadcrumb a { color: #5b6470; }
.text-muted { color: #5b6470; font-size: 14px; }
.center { text-align: center; }
.divider { border: 0; border-top: 1px solid #ebe4d6; margin: 24px 0; }
.toast-restore {
    background: #fff7e6; border: 1px solid #f0d990; padding: 12px 16px;
    border-radius: 8px; margin-bottom: 16px;
    display: flex; justify-content: space-between; align-items: center;
}
.toast-restore button { background: transparent; border: 0; color: #c2185b; font-weight: 600; }
