:root {
color-scheme: light;
--head: #14232B;
--callout: #E5F7FA;
--zebra: #F6F9FB;
--ok: #0A7A3E;
--bad: #B3261E;
--warn: #8A6100;
--bg: #EEF3F6;
--surface: #ffffff;
--ink: #1E2B33;
--muted: #5A6B75;
--side: #14232B;
--side-2: #1D3340;
--side-text: #C9D6DD;
--accent: #27C4D8;
--accent-dark: #0B7C8C;
--border: #D2DEE5;
--sidebar-w: 264px;
--font-main: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-main); color: var(--ink); background: var(--bg); line-height: 1.65; }
a { color: var(--accent-dark); }
a:hover { color: var(--ink); }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; color: var(--head); }
.skip-link { position: absolute; top: -40px; left: 0; background: var(--accent); color: var(--side); padding: 8px 12px; z-index: 100; transition: top 0.3s; }
.skip-link:focus { top: 0; }

.layout { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar { background: var(--side); color: var(--side-text); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 22px 16px 18px; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.logo:hover { color: #fff; }
.logo-mark { display: block; width: 38px; height: 38px; border-radius: 10px; }
.logo-text { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 10px; }
.bar { display: block; width: 24px; height: 3px; background: #fff; margin: 5px 0; border-radius: 2px; }
.sidebar nav { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.nav-menu { list-style: none; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-group { margin: 16px 12px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: #7F95A1; }
.nav-link { display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--side-text); font-size: 15px; font-weight: 500; border-left: 3px solid transparent; }
.nav-link:hover, .nav-link:focus { background: var(--side-2); color: #fff; }
.nav-link.active { background: var(--side-2); color: #fff; border-left-color: var(--accent); }
.sidebar-18 { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px; border-radius: 10px; background: var(--side-2); font-size: 13px; color: var(--side-text); }
.sidebar-18 p { margin: 0; line-height: 1.4; }
.age-badge-lg { width: 48px; height: 48px; }
.age-badge { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 2px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: 14px; font-weight: 800; line-height: 1; flex-shrink: 0; }

.content { display: flex; flex-direction: column; min-width: 0; }
main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 36px 28px; }

.hero { background: var(--side); color: #fff; padding: 52px 36px; border-radius: 14px; margin-bottom: 40px; border-bottom: 5px solid var(--accent); }
.hero h1 { color: #fff; font-size: 2.4rem; margin-bottom: 14px; }
.hero p { font-size: 1.1rem; max-width: 620px; color: #C9D6DD; }
.btn { display: inline-block; margin-top: 22px; padding: 11px 22px; background: var(--accent); color: var(--side); font-weight: 700; border-radius: 8px; text-decoration: none; }
.btn:hover { background: #fff; color: var(--side); }

.section-title { font-size: 1.7rem; margin-bottom: 22px; }
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; margin-bottom: 44px; }
.article-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s; }
.article-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(20, 35, 43, 0.12); }
.card-img { display: block; width: 100%; height: 170px; object-fit: cover; background: var(--side-2); }
.card-content { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.card-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-dark); font-weight: 700; margin-bottom: 8px; }
.card-title { font-size: 1.1rem; margin-bottom: 8px; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--accent-dark); }
.card-excerpt { font-size: 0.92rem; color: var(--muted); margin-bottom: 16px; flex: 1; }
.card-meta { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 12px; font-size: 0.82rem; color: var(--muted); }
.read-more { font-weight: 700; text-decoration: none; }

.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 44px; }
.topic-tile { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: 12px; padding: 18px; }
.topic-tile h3 { font-size: 1.05rem; margin-bottom: 6px; }
.topic-tile h3 a { color: inherit; text-decoration: none; }
.topic-tile p { font-size: 0.9rem; color: var(--muted); margin: 0; }
.editorial-block { background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: 12px; padding: 28px 30px; margin-bottom: 30px; }
.editorial-block h2 { font-size: 1.4rem; margin-bottom: 12px; }
.responsible-strip { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 26px; margin-bottom: 30px; }
.responsible-strip p { margin: 0; }

.breadcrumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-dark); }
.article-container { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 38px 40px; }
.article-header { margin-bottom: 26px; }
.article-title { font-size: 2.1rem; margin-bottom: 12px; }
.article-meta { color: var(--muted); font-size: 0.9rem; }
.article-featured-img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; max-height: 460px; object-fit: cover; border-radius: 10px; margin-bottom: 28px; }
.article-body { font-size: 1.08rem; max-width: 780px; }
.article-body h2 { font-size: 1.55rem; margin: 34px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.article-body h3 { font-size: 1.2rem; margin: 22px 0 10px; color: var(--accent-dark); }
.article-body p { margin-bottom: 15px; }
.article-body ul, .article-body ol { margin: 0 0 20px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body li::marker { color: var(--accent-dark); }
.callout { background: var(--callout); border-left: 4px solid var(--accent); border-radius: 8px; padding: 14px 18px; margin: 0 0 20px; }
.faq-item { background: var(--bg); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; padding: 14px 18px; margin-bottom: 14px; }
.faq-item h3 { margin: 0 0 8px; font-size: 1.08rem; color: var(--head); }
.faq-item p { margin: 0; font-size: 1rem; }
.table-wrapper { overflow-x: auto; margin: 20px 0; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg); font-weight: 700; }
.note-box { background: var(--bg); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 6px; padding: 18px; margin-top: 28px; }

.related-section { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.related-title { font-size: 1.4rem; margin-bottom: 18px; }
.related-section .articles-grid { margin-bottom: 0; }

footer { background: var(--side); color: var(--side-text); padding: 38px 28px 22px; }
.footer-content { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.footer-col h3 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-col p { font-size: 0.92rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--side-text); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-18 { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.footer-18 p { margin: 0; font-size: 0.88rem; }
.footer-help a { color: var(--side-text); font-size: 0.9rem; }
.footer-help a:hover { color: var(--accent); }
.copyright { max-width: 1040px; margin: 28px auto 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.88rem; text-align: center; }

@media (max-width: 900px) {
.layout { grid-template-columns: minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: 50; height: auto; overflow: visible; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px 16px; }
.sidebar-top { margin-bottom: 0; width: 100%; }
.mobile-menu-btn { display: block; }
.sidebar .nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--side); padding: 8px 16px 16px; max-height: calc(100vh - 64px); overflow-y: auto; box-shadow: 0 10px 18px rgba(0, 0, 0, 0.3); }
.sidebar .nav-menu.active { display: flex; }
.sidebar nav { width: 100%; }
.sidebar-18 { display: none; }
main { padding: 22px 16px; }
.hero { padding: 34px 20px; }
.hero h1 { font-size: 1.8rem; }
.article-container { padding: 22px 16px; }
.article-title { font-size: 1.65rem; }
.editorial-block { padding: 22px 18px; }
.responsible-strip { padding: 16px; }
.articles-grid { grid-template-columns: 1fr; }
footer { padding: 30px 16px 18px; }
}
.nav-group a { color: inherit; text-decoration: none; }
.nav-group a:hover, .nav-group a.active { color: #27C4D8; }

/* 18+ badge: fixed in the bottom-right corner of the viewport */
.sidebar-18 { position: fixed; right: 20px; bottom: 20px; z-index: 45; margin: 0; max-width: 250px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28); }
@media (max-width: 900px) {
.sidebar-18 { display: flex; right: 12px; bottom: 12px; padding: 6px; border-radius: 999px; }
.sidebar-18 p { display: none; }
}

/* topics: five tiles in one row on wide screens */
@media (min-width: 1280px) {
.topics { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.topic-tile { padding: 16px; }
.topic-tile h3 { font-size: 1rem; }
.topic-tile p { font-size: 0.86rem; }
}

/* home hero with photo */
.hero { position: relative; overflow: hidden; min-height: 340px; display: flex; align-items: center; }
.hero-text { position: relative; z-index: 1; }
.hero-img { position: absolute; top: 0; right: 0; height: 100%; width: auto; max-width: none; pointer-events: none; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%); mask-image: linear-gradient(to right, transparent 0, #000 30%); }
@media (max-width: 1280px) {
.hero-img { opacity: 0.55; }
}
@media (max-width: 900px) {
.hero { min-height: 260px; }
.hero-img { opacity: 0.4; }
}

/* hero text keeps clear of the player */
.hero-text { max-width: 58%; }
@media (max-width: 900px) {
.hero-text { max-width: 100%; }
}

/* ===== Dark theme ===== */
html[data-theme="dark"] {
color-scheme: dark;
--bg: #0E181E;
--surface: #15252E;
--ink: #E1EAEE;
--muted: #9FB2BC;
--side: #0A1216;
--side-2: #16303C;
--side-text: #C9D6DD;
--accent-dark: #4FD3E5;
--border: #25404C;
--head: #F1F6F8;
--callout: #12323A;
--zebra: #1A2D37;
--ok: #4ADE80;
--bad: #FF7B72;
--warn: #F2C14E;
}
html[data-theme="dark"] .sidebar { border-right: 1px solid var(--border); }
html[data-theme="dark"] .card-img,
html[data-theme="dark"] .article-featured-img { filter: brightness(0.92); }
html[data-theme="dark"] .hero { border-bottom-color: var(--accent); }
html[data-theme="dark"] .article-card:hover { box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45); }

/* ===== Theme toggle ===== */
.theme-toggle { margin-left: auto; margin-right: 4px; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06); color: #fff; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.theme-toggle:hover { background: rgba(39, 196, 216, 0.2); border-color: var(--accent); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-sun { display: block; }
html[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ===== Search in the menu ===== */
.site-search-item { list-style: none; margin: 0 0 6px; }
.site-search input { width: 100%; padding: 9px 12px 9px 34px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.07) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239FB2BC' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center; color: #fff; font: inherit; font-size: 14px; }
.site-search input::placeholder { color: #8FA3AE; }
.site-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; background-color: rgba(255, 255, 255, 0.1); }
.search-results { list-style: none; margin: 6px 0 0; padding: 4px; background: var(--side-2); border-radius: 9px; }
.search-results[hidden] { display: none; }
.search-results a { display: block; padding: 8px 10px; border-radius: 7px; text-decoration: none; color: var(--side-text); }
.search-results a:hover, .search-results a:focus { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sr-title { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.sr-sec { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #7F95A1; margin-top: 2px; }
.sr-empty { padding: 8px 10px; font-size: 13px; color: #8FA3AE; }

/* ===== Reading progress ===== */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #8BE9F3); border-radius: 0 3px 3px 0; }

/* ===== Table of contents ===== */
.toc { margin: 0 0 26px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.toc summary { cursor: pointer; padding: 12px 16px; font-weight: 700; color: var(--head); }
.toc ol { margin: 0; padding: 0 18px 14px 40px; columns: 2; column-gap: 28px; }
.toc li { margin-bottom: 6px; font-size: 0.95rem; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.article-body h2 { scroll-margin-top: 80px; }

/* ===== Home: stats ===== */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: -14px 0 36px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; text-align: center; }
.stat-num { display: block; font-size: 2rem; font-weight: 800; line-height: 1.1; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.88rem; color: var(--muted); }

/* ===== Home: tools ===== */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 44px; }
.tool-tile { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; color: var(--ink); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.tool-tile:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 20px rgba(20, 35, 43, 0.12); color: var(--ink); }
.tool-ico { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #1B8FA0); color: #fff; font-weight: 800; font-size: 1.05rem; margin-bottom: 10px; }
.tool-tile h3 { font-size: 1rem; margin-bottom: 4px; }
.tool-tile p { font-size: 0.86rem; color: var(--muted); margin: 0; }

/* ===== Bento grid on the home page ===== */
.articles-grid.bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bento > .article-card:first-child { grid-column: span 2; grid-row: span 2; }
.bento > .article-card:first-child > a { display: block; position: relative; flex: 1 1 auto; min-height: 300px; overflow: hidden; }
.bento > .article-card:first-child .card-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.bento > .article-card:first-child .card-title { font-size: 1.5rem; }
.bento > .article-card:first-child .card-excerpt { font-size: 1.02rem; }
.card-img { transition: transform 0.5s ease; }
.article-card:hover .card-img { transform: scale(1.04); }

/* ===== Hero extras ===== */
.hero::before { content: ""; position: absolute; left: -80px; top: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(39, 196, 216, 0.18), transparent 70%); pointer-events: none; }

/* ===== Glass 18+ badge ===== */
.sidebar-18 { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); background: rgba(22, 48, 60, 0.92); border: 1px solid rgba(255, 255, 255, 0.1); }

/* ===== Tables ===== */
.article-body tbody tr:nth-child(even) td { background: var(--zebra); }
.cell-win { color: var(--ok); font-weight: 700; }
.cell-lose { color: var(--bad); font-weight: 700; }
.cell-push { color: var(--warn); font-weight: 700; }

/* ===== Calculators ===== */
.calc { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin: 18px 0 8px; min-height: 180px; }
.calc-grid { align-items: end; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.calc-field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.calc input[type="text"], .calc select { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; }
.calc input[type="text"]:focus, .calc select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.calc-out { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.calc-stat { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 14px; }
.calc-stat b { display: block; font-size: 1.2rem; color: var(--head); font-variant-numeric: tabular-nums; }
.calc-stat b.pos { color: var(--ok); }
.calc-stat b.neg { color: var(--bad); }
.calc-stat span { font-size: 0.8rem; color: var(--muted); }
.calc-note { margin: 12px 0 0 !important; font-size: 0.88rem; color: var(--muted); }
.calc-verdict { margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: var(--callout); border-left: 4px solid var(--accent); }
.calc-btn { margin-top: 16px; padding: 10px 22px; border: 0; border-radius: 8px; background: var(--accent); color: #0A1216; font: inherit; font-weight: 700; cursor: pointer; transition: background 0.2s; }
.calc-btn:hover { background: #7BE0EC; }
.calc-btn:focus-visible { outline: 2px solid var(--head); outline-offset: 2px; }
.calc-chart canvas { display: block; width: 100%; height: auto; margin-top: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.calc .table-wrapper { margin: 14px 0 0; }
.calc-more { font-size: 0.95rem; }
.quiz-q { border: 0; margin: 0 0 14px; padding: 0; }
.quiz-q legend { font-weight: 600; margin-bottom: 6px; color: var(--head); }
.quiz-opt { display: inline-block; margin-right: 18px; cursor: pointer; }
.tool-section { scroll-margin-top: 80px; }

/* ===== Glossary tools ===== */
.gloss-tools { margin: 18px 0 8px; }
.gloss-tools input { width: 100%; max-width: 420px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.gloss-tools input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.gloss-letters { margin: 12px 0 0 !important; line-height: 2.2; }
.gloss-letters a { display: inline-block; min-width: 32px; padding: 0 8px; margin: 0 4px 4px 0; border: 1px solid var(--border); border-radius: 6px; text-align: center; font-weight: 700; text-decoration: none; background: var(--surface); }
.gloss-letters a:hover { border-color: var(--accent); }
.article-body [hidden] { display: none; }

/* ===== Reveal animation ===== */
.js .reveal { opacity: 0; translate: 0 14px; transition: opacity 0.55s ease, translate 0.55s ease; }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
.articles-grid.bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.toc ol { columns: 1; }
.sidebar { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); background: rgba(20, 35, 43, 0.94); }
html[data-theme="dark"] .sidebar { background: rgba(10, 18, 22, 0.94); border-right: 0; border-bottom: 1px solid var(--border); }
.sidebar-top { align-items: center; }
.theme-toggle { margin-right: 6px; }
}
@media (max-width: 700px) {
.articles-grid.bento { grid-template-columns: minmax(0, 1fr); }
.bento > .article-card:first-child { grid-column: auto; grid-row: auto; }
.bento > .article-card:first-child > a { flex: none; min-height: 0; height: 200px; }
.bento > .article-card:first-child .card-title { font-size: 1.25rem; }
.tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
.js .reveal { opacity: 1; translate: 0 0; transition: none; }
.card-img, .article-card, .tool-tile { transition: none; }
.article-card:hover .card-img { transform: none; }
}

/* featured card extras */
.bento > .article-card:first-child .card-excerpt { flex: none; }
.card-lead { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--accent-dark); margin: 0 0 8px; }
.card-points { list-style: none; margin: 0 0 18px; padding: 0; flex: 1; font-size: 0.95rem; color: var(--muted); }
.card-points li { position: relative; padding-left: 22px; margin-bottom: 7px; }
.card-points li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

/* ===== Sidebar v2: collapsible groups ===== */
.nav-menu { gap: 2px; }
.nav-menu > li { list-style: none; }
.nav-tools { display: flex; justify-content: flex-end; margin: 2px 4px 4px; }
.nav-all { background: none; border: 0; padding: 2px 6px; font: inherit; font-size: 12px; color: #8FA3AE; cursor: pointer; border-radius: 6px; }
.nav-all:hover, .nav-all:focus-visible { color: var(--accent); background: rgba(255, 255, 255, 0.06); }
.nav-link { font-size: 15.5px; padding: 10px 12px; transition: background 0.2s, padding-left 0.2s, color 0.2s; }
.nav-link:hover { padding-left: 15px; }
.nav-link.active { background: linear-gradient(90deg, rgba(39, 196, 216, 0.24), rgba(39, 196, 216, 0.04)); font-weight: 700; }
.nav-home { display: flex; align-items: center; gap: 10px; }
.nav-ico { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-section { margin-top: 6px; }
.nav-group { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 12.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #A9BBC5; user-select: none; transition: background 0.2s, color 0.2s; }
.nav-group:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-group a, .nav-group-label { flex: 1; color: inherit; text-decoration: none; }
.nav-group a:hover, .nav-group a.active { color: var(--accent); }
.nav-count { font-size: 11px; font-weight: 700; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.09); color: #C9D6DD; text-align: center; letter-spacing: 0; }
.nav-toggle { position: relative; width: 24px; height: 24px; flex-shrink: 0; border: 0; border-radius: 6px; background: none; color: inherit; cursor: pointer; }
.nav-toggle::after { content: ""; position: absolute; left: 8px; top: 6px; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.25s ease; }
.nav-section.collapsed .nav-toggle::after { transform: rotate(-45deg); top: 8px; }
.nav-toggle:focus-visible { outline: 2px solid var(--accent); }
.nav-sub-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.25s ease; }
.nav-section.collapsed .nav-sub-wrap { grid-template-rows: 0fr; }
.nav-sub { list-style: none; overflow: hidden; min-height: 0; margin: 2px 0 2px 19px; padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, 0.12); transition: visibility 0.25s; }
.nav-sub li { list-style: none; }
.nav-section.collapsed .nav-sub { visibility: hidden; margin-top: 0; margin-bottom: 0; }
.nav-section[data-current] > .nav-group { color: #fff; }
.sidebar { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
@media (max-width: 900px) {
.nav-link { padding: 12px; font-size: 16px; }
.nav-group { padding: 11px 10px; }
}
@media (prefers-reduced-motion: reduce) {
.nav-sub-wrap, .nav-toggle::after, .nav-link { transition: none; }
}
