/*
Theme Name: Bài Toán V2
Theme URI: https://baitoan.com/
Author: Baitoan.com
Author URI: https://baitoan.com/
Description: Theme WordPress standalone thuần PHP dành cho thư viện bài toán, có SEO, WebP, ALT tự động, lượt xem và load-more.
Version: 2.3.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: baitoan
Tags: blog, education, one-column, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --bt-primary: #155eef;
  --bt-primary-dark: #0d3fba;
  --bt-accent: #ffb020;
  --bt-ink: #182230;
  --bt-muted: #5d6b7e;
  --bt-line: #dde4ee;
  --bt-surface: #ffffff;
  --bt-soft: #f4f7fb;
  --bt-success: #14804a;
  --bt-radius: 18px;
  --bt-shadow: 0 12px 36px rgba(31, 49, 77, .09);
  --bt-container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--bt-ink);
  background: var(--bt-surface);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--bt-primary); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--bt-primary-dark); }
button, input, select, textarea { font: inherit; }
button, input[type="submit"] { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(21, 94, 239, .35); outline-offset: 3px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  top: 8px; left: 8px; z-index: 100000; width: auto; height: auto;
  padding: 12px 18px; clip: auto; background: #fff; color: var(--bt-ink);
}
.bt-container { width: min(calc(100% - 32px), var(--bt-container)); margin-inline: auto; }
.bt-main { min-height: 55vh; }
.bt-section { padding: 64px 0; }
.bt-section--soft { background: var(--bt-soft); }
.bt-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.bt-section-heading h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1.2; letter-spacing: -.03em; }
.bt-section-heading p { max-width: 620px; margin: 8px 0 0; color: var(--bt-muted); }
.bt-link-arrow { font-weight: 700; text-decoration: none; white-space: nowrap; }
.bt-link-arrow::after { content: " →"; }

/* Header */
.bt-site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(221, 228, 238, .85); background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); }
.admin-bar .bt-site-header { top: 32px; }
.bt-header-inner { min-height: 76px; display: flex; align-items: center; gap: 28px; }
.bt-brand { display: flex; align-items: center; gap: 11px; color: var(--bt-ink); font-size: 1.28rem; font-weight: 850; letter-spacing: -.03em; text-decoration: none; white-space: nowrap; }
.bt-brand__mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #fff; background: linear-gradient(145deg, var(--bt-primary), #4a8aff); box-shadow: 0 8px 18px rgba(21, 94, 239, .25); }
.bt-brand__mark svg { width: 25px; height: 25px; }
.custom-logo-link { display: flex; align-items: center; }
.custom-logo { width: auto; max-height: 48px; }
.bt-nav { margin-left: auto; }
.bt-menu, .bt-menu ul { margin: 0; padding: 0; list-style: none; }
.bt-menu { display: flex; align-items: center; gap: 6px; }
.bt-menu a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--bt-ink); font-size: .94rem; font-weight: 650; text-decoration: none; }
.bt-menu a:hover, .bt-menu .current-menu-item > a, .bt-menu .current-menu-ancestor > a { color: var(--bt-primary); background: var(--bt-soft); }
.bt-menu li { position: relative; }
.bt-menu .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 210px; padding: 8px; border: 1px solid var(--bt-line); border-radius: 12px; background: #fff; box-shadow: var(--bt-shadow); }
.bt-menu li:hover > .sub-menu, .bt-menu li:focus-within > .sub-menu { display: block; }
.bt-header-search { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border: 1px solid var(--bt-line); border-radius: 12px; color: var(--bt-ink); text-decoration: none; }
.bt-menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--bt-line); border-radius: 11px; background: #fff; }
.bt-menu-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--bt-ink); }

/* Hero */
.bt-hero { position: relative; overflow: hidden; padding: 78px 0 70px; background: radial-gradient(circle at 85% 15%, rgba(255,176,32,.24), transparent 23%), radial-gradient(circle at 8% 92%, rgba(21,94,239,.13), transparent 25%), linear-gradient(135deg, #f7faff 0%, #eef5ff 100%); }
.bt-hero::after { content: ""; position: absolute; right: -110px; bottom: -140px; width: 390px; height: 390px; border: 60px solid rgba(21,94,239,.055); border-radius: 50%; }
.bt-hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); align-items: center; gap: 56px; }
.bt-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--bt-primary-dark); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.bt-eyebrow::before { content: ""; width: 24px; height: 3px; border-radius: 3px; background: var(--bt-accent); }
.bt-hero h1 { max-width: 780px; margin: 0; font-size: clamp(2.5rem, 6vw, 4.7rem); line-height: 1.04; letter-spacing: -.055em; }
.bt-hero h1 span { color: var(--bt-primary); }
.bt-hero__lead { max-width: 700px; margin: 22px 0 28px; color: var(--bt-muted); font-size: 1.12rem; }
.bt-search-form { display: flex; max-width: 670px; padding: 7px; border: 1px solid rgba(21,94,239,.16); border-radius: 15px; background: #fff; box-shadow: var(--bt-shadow); }
.bt-search-form label { flex: 1; }
.bt-search-form input[type="search"] { width: 100%; min-height: 48px; padding: 0 15px; border: 0; outline: 0; color: var(--bt-ink); background: transparent; }
.bt-button, .bt-search-form button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 0; border-radius: 11px; color: #fff; background: var(--bt-primary); font-weight: 750; text-decoration: none; transition: transform .2s, background .2s; }
.bt-button:hover, .bt-search-form button:hover { color: #fff; background: var(--bt-primary-dark); transform: translateY(-1px); }
.bt-hero__stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 28px; }
.bt-stat strong { display: block; font-size: 1.35rem; line-height: 1.2; }
.bt-stat span { color: var(--bt-muted); font-size: .84rem; }
.bt-hero-card { align-self: center; padding: 28px; border: 1px solid rgba(255,255,255,.9); border-radius: 26px; background: rgba(255,255,255,.78); box-shadow: 0 24px 60px rgba(29, 68, 132, .14); transform: none; }
.bt-hero-card__icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 22px; border-radius: 19px; color: #8a5700; background: #fff1c7; font-size: 1.8rem; font-weight: 850; }
.bt-hero-card h2 { margin: 0 0 10px; font-size: 1.45rem; line-height: 1.25; }
.bt-hero-card p { margin: 0 0 20px; color: var(--bt-muted); }
.bt-mini-list { margin: 0; padding: 0; list-style: none; }
.bt-mini-list li { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--bt-line); font-size: .92rem; font-weight: 650; }
.bt-mini-list li::before { content: "✓"; color: var(--bt-success); font-weight: 900; }

/* Cards and archives */
.bt-term-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.bt-term-card { position: relative; min-height: 150px; padding: 22px; overflow: hidden; border: 1px solid var(--bt-line); border-radius: var(--bt-radius); color: var(--bt-ink); background: #fff; text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
.bt-term-card:hover { transform: translateY(-4px); border-color: rgba(21,94,239,.35); box-shadow: var(--bt-shadow); }
.bt-term-card__number { display: block; margin-bottom: 24px; color: var(--bt-primary); font-size: 1.55rem; font-weight: 850; }
.bt-term-card strong { display: block; font-size: 1.02rem; }
.bt-term-card small { color: var(--bt-muted); }
.bt-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.bt-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--bt-line); border-radius: var(--bt-radius); background: #fff; transition: transform .2s, box-shadow .2s; }
.bt-card:hover { transform: translateY(-4px); box-shadow: var(--bt-shadow); }
.bt-card__image { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(145deg, #e8f0ff, #f4f7fb); }
.bt-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.bt-card:hover .bt-card__image img { transform: scale(1.035); }
.bt-card__placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--bt-primary); font-size: 2rem; font-weight: 850; }
.bt-card__body { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.bt-card__meta, .bt-entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--bt-muted); font-size: .8rem; }
.bt-card__meta a, .bt-entry-meta a { color: inherit; text-decoration: none; }
.bt-card__meta a:hover, .bt-entry-meta a:hover { color: var(--bt-primary); }
.bt-card__title { margin: 11px 0 10px; font-size: 1.22rem; line-height: 1.35; letter-spacing: -.018em; }
.bt-card__title a { color: var(--bt-ink); text-decoration: none; }
.bt-card__title a:hover { color: var(--bt-primary); }
.bt-card__excerpt { margin: 0 0 18px; color: var(--bt-muted); font-size: .94rem; }
.bt-card__footer { margin-top: auto; }
.bt-chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; padding: 0; list-style: none; }
.bt-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border-radius: 999px; color: var(--bt-primary-dark); background: #eaf1ff; font-size: .74rem; font-weight: 750; text-decoration: none; }
.bt-archive-header { padding: 58px 0; border-bottom: 1px solid var(--bt-line); background: var(--bt-soft); }
.bt-archive-header h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.12; letter-spacing: -.045em; }
.bt-archive-description { max-width: 720px; margin-top: 12px; color: var(--bt-muted); }
.bt-content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 42px; padding: 52px 0 72px; }
.bt-sidebar { min-width: 0; }
.bt-widget { margin-bottom: 24px; padding: 22px; border: 1px solid var(--bt-line); border-radius: 16px; }
.bt-widget-title { margin: 0 0 14px; font-size: 1.05rem; }
.bt-widget ul { margin: 0; padding-left: 18px; }
.bt-pagination { margin-top: 38px; }
.bt-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.bt-pagination .page-numbers { display: grid; place-items: center; min-width: 42px; min-height: 42px; padding: 4px 10px; border: 1px solid var(--bt-line); border-radius: 10px; color: var(--bt-ink); text-decoration: none; }
.bt-pagination .current, .bt-pagination a:hover { color: #fff; border-color: var(--bt-primary); background: var(--bt-primary); }
.bt-load-more-wrap { margin-top: 38px; text-align: center; }
.bt-load-more { min-height: 48px; padding: 0 24px; border: 1px solid var(--bt-primary); border-radius: 12px; color: #fff; background: var(--bt-primary); font-weight: 750; }
.bt-load-more:hover { background: var(--bt-primary-dark); }
.bt-load-more[aria-busy="true"] { cursor: wait; opacity: .65; }
.bt-load-more-status { margin: 12px 0 0; color: var(--bt-muted); font-size: .9rem; }

/* Article */
.bt-breadcrumbs { padding: 18px 0; color: var(--bt-muted); font-size: .82rem; }
.bt-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.bt-breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 7px; color: #a5afbd; }
.bt-breadcrumbs a { color: inherit; text-decoration: none; }
.bt-breadcrumbs a:hover { color: var(--bt-primary); }
.bt-single { padding-bottom: 72px; }
.bt-entry-header { max-width: 880px; margin: 24px auto 34px; text-align: center; }
.bt-entry-header h1 { margin: 14px 0 18px; font-size: clamp(2.2rem, 5.3vw, 4.25rem); line-height: 1.1; letter-spacing: -.05em; }
.bt-entry-header .bt-entry-meta { justify-content: center; }
.bt-entry-kicker { color: var(--bt-primary); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.bt-featured-image { max-width: 1080px; margin: 0 auto 42px; overflow: hidden; border-radius: 24px; background: var(--bt-soft); }
.bt-featured-image img { display: block; width: 100%; }
.bt-article-layout { display: grid; grid-template-columns: minmax(0, 760px) 260px; justify-content: center; gap: 48px; }
.bt-entry-content { min-width: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; line-height: 1.83; }
.bt-entry-content > * { max-width: 100%; }
.bt-entry-content h2, .bt-entry-content h3, .bt-entry-content h4 { color: var(--bt-ink); font-family: Inter, ui-sans-serif, sans-serif; line-height: 1.28; letter-spacing: -.025em; scroll-margin-top: 100px; }
.bt-entry-content h2 { margin: 2.15em 0 .7em; font-size: 1.8rem; }
.bt-entry-content h3 { margin: 1.8em 0 .55em; font-size: 1.4rem; }
.bt-entry-content p { margin: 0 0 1.35em; }
.bt-entry-content ul, .bt-entry-content ol { padding-left: 1.35em; }
.bt-entry-content blockquote { margin: 1.7em 0; padding: 18px 24px; border-left: 4px solid var(--bt-primary); border-radius: 0 12px 12px 0; background: var(--bt-soft); font-size: 1.05em; }
.bt-entry-content code, .bt-entry-content pre, .bt-math { font-family: "Cascadia Code", Consolas, monospace; }
.bt-entry-content pre { max-width: 100%; padding: 20px; overflow-x: auto; border-radius: 12px; background: #172033; color: #f4f7fb; }
.bt-entry-content table { width: 100%; margin: 1.5em 0; border-collapse: collapse; font-family: Inter, sans-serif; font-size: .92rem; }
.bt-entry-content th, .bt-entry-content td { padding: 12px 14px; border: 1px solid var(--bt-line); text-align: left; }
.bt-entry-content th { background: var(--bt-soft); }
.bt-entry-content .wp-block-image img { border-radius: 14px; }
.bt-entry-content mjx-container { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.bt-entry-content mjx-container[display="true"] { margin: 1.35em 0 !important; padding: 4px 0; }
.bt-entry-content .alignwide { width: min(980px, calc(100vw - 32px)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.bt-entry-content .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.bt-solution, .bt-entry-content .is-style-baitoan-solution { margin: 1.8em 0; padding: 24px; border: 1px solid #bcd0f8; border-radius: 16px; background: #f3f7ff; }
.bt-solution::before, .bt-entry-content .is-style-baitoan-solution::before { content: "Gợi ý lời giải"; display: block; margin-bottom: 10px; color: var(--bt-primary-dark); font-family: Inter, sans-serif; font-size: .8rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.bt-article-aside { min-width: 0; }
.bt-sticky-box { position: sticky; top: 102px; padding: 20px; border: 1px solid var(--bt-line); border-radius: 16px; }
.bt-sticky-box h2 { margin: 0 0 12px; font-size: 1rem; }
.bt-sticky-box ul { margin: 0; padding: 0; list-style: none; }
.bt-sticky-box li { padding: 8px 0; border-top: 1px solid var(--bt-line); font-size: .84rem; }
.bt-sticky-box a { color: var(--bt-muted); text-decoration: none; }
.bt-sticky-box a:hover { color: var(--bt-primary); }
.bt-post-taxonomies { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--bt-line); }
.bt-download-box { display: grid; grid-template-columns: 58px minmax(0, 1fr) 82px; align-items: center; gap: 18px; margin: 38px 0 8px; padding: 24px; border: 1px solid #bdd0f8; border-radius: 18px; background: linear-gradient(135deg, #f2f6ff 0%, #fff 70%); font-family: Inter, ui-sans-serif, sans-serif; }
.bt-download-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 15px; color: #fff; background: var(--bt-primary); }
.bt-download-icon svg { width: 30px; height: 30px; }
.bt-download-copy h2 { margin: 0 0 5px; font-size: 1.22rem; }
.bt-download-copy > p { margin: 0; color: var(--bt-muted); font-size: .92rem; line-height: 1.55; }
.bt-download-status { margin-top: 8px !important; color: var(--bt-ink) !important; font-weight: 700; }
.bt-download-countdown { display: grid; place-items: center; width: 76px; height: 76px; border: 3px solid #c7d6f5; border-radius: 50%; color: var(--bt-primary-dark); background: #fff; line-height: 1; }
.bt-download-countdown strong { font-size: 1.55rem; }
.bt-download-countdown span { margin-top: -8px; color: var(--bt-muted); font-size: .7rem; font-weight: 700; }
.bt-download-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 14px; padding: 0 18px; border-radius: 10px; color: #fff !important; background: var(--bt-primary); font-size: .9rem; font-weight: 800; text-decoration: none; }
.bt-download-link:hover { background: var(--bt-primary-dark); }
.bt-download-link[hidden] { display: none; }
.bt-download-box.is-ready { border-color: #86c69b; background: linear-gradient(135deg, #f1fbf4 0%, #fff 70%); }
.bt-download-box.is-ready .bt-download-countdown { border-color: #86c69b; color: #087b37; }
.bt-download-box.is-error { border-color: #e6a7a7; background: #fff7f7; }
.bt-author-box { display: grid; grid-template-columns: 72px 1fr; gap: 18px; margin-top: 40px; padding: 24px; border-radius: 16px; background: var(--bt-soft); }
.bt-author-box img { border-radius: 50%; }
.bt-author-box h2 { margin: 0 0 6px; font-size: 1.05rem; }
.bt-author-box p { margin: 0; color: var(--bt-muted); font-size: .9rem; }
.bt-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.bt-post-nav a { display: block; height: 100%; padding: 18px; border: 1px solid var(--bt-line); border-radius: 14px; color: var(--bt-ink); font-weight: 700; line-height: 1.35; text-decoration: none; }
.bt-post-nav a:hover { border-color: var(--bt-primary); color: var(--bt-primary); }
.bt-related { padding-top: 56px; }

/* Comments and forms */
.bt-comments { max-width: 760px; margin: 54px auto 0; }
.bt-comments-title { margin-bottom: 24px; font-size: 1.5rem; }
.comment-list { margin: 0; padding: 0; list-style: none; }
.comment-list .children { list-style: none; }
.comment-body { margin-bottom: 18px; padding: 20px; border: 1px solid var(--bt-line); border-radius: 14px; }
.comment-author img { border-radius: 50%; vertical-align: middle; }
.comment-meta { font-size: .78rem; }
.comment-content { margin-top: 12px; }
.comment-respond { margin-top: 32px; }
.comment-form label { display: block; margin-bottom: 5px; font-size: .86rem; font-weight: 700; }
.comment-form input:not([type="checkbox"]), .comment-form textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--bt-line); border-radius: 10px; }
.comment-form input[type="submit"] { min-height: 46px; padding: 0 20px; border: 0; border-radius: 10px; color: #fff; background: var(--bt-primary); font-weight: 750; }
.bt-empty { padding: 52px 28px; border: 1px dashed #b9c5d5; border-radius: var(--bt-radius); text-align: center; background: var(--bt-soft); }
.bt-empty h2 { margin-top: 0; }
.bt-static-page { padding-bottom: 76px; }
.bt-static-header { padding: 62px 0; border-bottom: 1px solid var(--bt-line); background: radial-gradient(circle at 88% 10%, rgba(255,176,32,.16), transparent 24%), var(--bt-soft); }
.bt-static-header h1 { max-width: 840px; margin: 0; font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.1; letter-spacing: -.045em; }
.bt-static-header p { max-width: 760px; margin: 18px 0 0; color: var(--bt-muted); font-size: 1.08rem; }
.bt-static-layout { display: grid; grid-template-columns: minmax(0, 760px) 280px; justify-content: center; gap: 52px; padding-top: 52px; }
.bt-static-content { font-family: Inter, ui-sans-serif, sans-serif; font-size: 1rem; line-height: 1.75; }
.bt-static-content > h2:first-child { margin-top: 0; }
.bt-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0 34px; }
.bt-info-card { padding: 22px; border: 1px solid var(--bt-line); border-radius: 16px; background: #fff; }
.bt-info-card h2, .bt-info-card h3 { margin: 0 0 8px; }
.bt-info-card p:last-child { margin-bottom: 0; }
.bt-info-card--primary { margin-bottom: 34px; border-color: #b9cdf7; background: linear-gradient(145deg, #f2f6ff, #fff); }
.bt-contact-email { margin-top: 18px !important; font-size: clamp(1.1rem, 3vw, 1.4rem); font-weight: 800; }
.bt-legal-note { margin: 28px 0; padding: 20px 22px; border-left: 4px solid var(--bt-primary); border-radius: 0 14px 14px 0; background: var(--bt-soft); }
.bt-legal-note strong { display: block; margin-bottom: 5px; }
.bt-legal-note p:last-child { margin-bottom: 0; }
.bt-policy-date { margin-top: 0; color: var(--bt-muted); font-size: .88rem; }
.bt-static-aside { min-width: 0; }
.bt-static-nav, .bt-static-help { padding: 20px; border: 1px solid var(--bt-line); border-radius: 16px; background: #fff; }
.bt-static-nav { position: sticky; top: 102px; }
.bt-static-nav h2 { margin: 0 0 12px; font-size: 1rem; }
.bt-static-nav ul { margin: 0; padding: 0; list-style: none; }
.bt-static-nav li { border-top: 1px solid var(--bt-line); }
.bt-static-nav a { display: block; padding: 10px 0; color: var(--bt-muted); font-size: .88rem; font-weight: 650; text-decoration: none; }
.bt-static-nav a:hover, .bt-static-nav a[aria-current="page"] { color: var(--bt-primary); }
.bt-static-help { margin-top: 18px; background: var(--bt-soft); }
.bt-static-help strong { display: block; }
.bt-static-help p { margin: 7px 0; color: var(--bt-muted); font-size: .85rem; }
.bt-static-help a { overflow-wrap: anywhere; font-size: .84rem; font-weight: 700; }
.bt-404 { max-width: 720px; margin: 0 auto; padding: 90px 16px; text-align: center; }
.bt-404__number { color: var(--bt-primary); font-size: clamp(5rem, 18vw, 10rem); font-weight: 900; line-height: .9; letter-spacing: -.08em; }

/* Footer */
.bt-site-footer { color: #cad4e4; background: #111a2b; }
.bt-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 52px; padding: 58px 0 44px; }
.bt-footer-brand { color: #fff; }
.bt-footer-about { max-width: 420px; margin-top: 15px; color: #aebbd0; }
.bt-footer-title { margin: 0 0 14px; color: #fff; font-size: .95rem; }
.bt-footer-menu, .bt-site-footer .widget ul { margin: 0; padding: 0; list-style: none; }
.bt-footer-menu li { margin: 8px 0; }
.bt-footer-menu a, .bt-site-footer .widget a { color: #cad4e4; text-decoration: none; }
.bt-footer-menu a:hover, .bt-site-footer .widget a:hover { color: #fff; }
.bt-footer-categories .children { margin: 7px 0 0 15px; padding: 0; list-style: none; }
.bt-footer-categories .children li { margin: 6px 0; }
.bt-footer-widgets { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); }
.bt-footer-widgets .widget + .widget { margin-top: 20px; }
.bt-footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.1); color: #96a6bd; font-size: .82rem; }
.bt-footer-bottom p { margin: 0; }

@media (max-width: 1024px) {
  .bt-term-grid { grid-template-columns: repeat(3, 1fr); }
  .bt-content-layout { grid-template-columns: 1fr; }
  .bt-sidebar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .bt-widget { margin: 0; }
  .bt-article-layout { grid-template-columns: minmax(0, 760px); }
  .bt-article-aside { display: none; }
  .bt-static-layout { grid-template-columns: minmax(0, 760px); }
  .bt-static-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .bt-static-nav { position: static; }
  .bt-static-help { margin-top: 0; }
}
@media (max-width: 820px) {
  .admin-bar .bt-site-header { top: 46px; }
  .bt-header-inner { min-height: 66px; }
  .bt-menu-toggle { display: block; margin-left: auto; }
  .bt-nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; max-height: calc(100vh - 66px); padding: 10px 16px 18px; overflow-y: auto; border-bottom: 1px solid var(--bt-line); background: #fff; }
  .bt-nav.is-open { display: block; }
  .bt-menu { display: block; }
  .bt-menu a { padding: 11px 8px; }
  .bt-menu .sub-menu { display: block; position: static; padding: 0 0 0 16px; border: 0; box-shadow: none; }
  .bt-header-search { display: none; }
  .bt-hero { padding: 58px 0; }
  .bt-hero__grid { grid-template-columns: 1fr; gap: 34px; }
  .bt-hero-card { max-width: 560px; transform: none; }
  .bt-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bt-footer-grid { grid-template-columns: 1fr 1fr; }
  .bt-footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .bt-section { padding: 48px 0; }
  .bt-section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .bt-hero h1 { font-size: 2.55rem; }
  .bt-search-form { display: block; padding: 8px; }
  .bt-search-form button { width: 100%; }
  .bt-hero__stats { gap: 20px; }
  .bt-term-grid, .bt-post-grid, .bt-sidebar { grid-template-columns: 1fr; }
  .bt-term-card { min-height: 130px; }
  .bt-entry-header { text-align: left; }
  .bt-entry-header .bt-entry-meta { justify-content: flex-start; }
  .bt-entry-header h1 { font-size: 2.3rem; }
  .bt-featured-image { margin-inline: -16px; border-radius: 0; }
  .bt-entry-content { font-size: 1.03rem; }
  .bt-download-box { grid-template-columns: 48px minmax(0, 1fr); align-items: start; padding: 20px; }
  .bt-download-icon { width: 48px; height: 48px; }
  .bt-download-countdown { grid-column: 1 / -1; width: 100%; height: auto; min-height: 54px; border-radius: 12px; }
  .bt-download-countdown span { margin-top: 2px; }
  .bt-post-nav, .bt-footer-grid { grid-template-columns: 1fr; }
  .bt-static-header { padding: 48px 0; }
  .bt-static-layout { padding-top: 38px; }
  .bt-info-grid, .bt-static-aside { grid-template-columns: 1fr; }
  .bt-static-help { margin-top: 0; }
  .bt-footer-grid > :first-child { grid-column: auto; }
  .bt-footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
