/* Tokens */
:root {
  --bk-color-primary: #b8323a;
  --bk-color-secondary: #c99a4a;
  --bk-color-accent: #21759b;
  --bk-color-dark: #1f1f1f;
  --bk-color-text: #333333;
  --bk-color-muted: #666666;
  --bk-color-border: #eeeeee;
  --bk-color-bg: #ffffff;
  --bk-color-surface: #ffffff;
  --bk-color-surface-alt: #f7f7f7;
  --bk-font-family-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bk-font-size-sm: 14px;
  --bk-font-size-base: 16px;
  --bk-font-size-md: 18px;
  --bk-font-size-lg: 22px;
  --bk-font-size-xl: 30px;
  --bk-font-size-2xl: 42px;
  --bk-font-size-3xl: 56px;
  --bk-font-weight-semibold: 600;
  --bk-font-weight-bold: 700;
  --bk-line-height-heading: 1.25;
  --bk-line-height-base: 1.65;
  --bk-space-xs: 8px;
  --bk-space-sm: 12px;
  --bk-space-md: 16px;
  --bk-space-lg: 24px;
  --bk-space-xl: 32px;
  --bk-space-2xl: 48px;
  --bk-space-3xl: 72px;
  --bk-container: 1200px;
  --bk-container-narrow: 840px;
  --bk-radius-sm: 4px;
  --bk-radius: 8px;
  --bk-radius-pill: 999px;
  --bk-shadow-sm: 0 4px 16px rgba(0, 0, 0, .06);
  --bk-z-header: 20;
  --bk-z-modal: 80;
}

/* Reset and base typography */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; font-family: var(--bk-font-family-base); font-size: var(--bk-font-size-base); line-height: var(--bk-line-height-base); color: var(--bk-color-text); background: var(--bk-color-bg); }
img, svg, video, canvas { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; }
table { width: 100%; border-collapse: collapse; }
h1, h2, h3, h4 { margin: 0 0 var(--bk-space-md); color: var(--bk-color-dark); font-weight: var(--bk-font-weight-bold); line-height: var(--bk-line-height-heading); }
h1 { font-size: clamp(38px, 4vw, var(--bk-font-size-3xl)); }
h2 { font-size: clamp(30px, 3vw, var(--bk-font-size-2xl)); }
h3 { font-size: clamp(24px, 2vw, var(--bk-font-size-xl)); }
h4 { font-size: var(--bk-font-size-lg); }
p { margin: 0 0 var(--bk-space-md); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--bk-color-primary); }
ul, ol { margin: 0 0 var(--bk-space-md); padding-left: var(--bk-space-lg); }
blockquote { margin: var(--bk-space-xl) 0; padding-left: var(--bk-space-lg); border-left: 4px solid var(--bk-color-primary); color: var(--bk-color-muted); font-size: var(--bk-font-size-md); }
.screen-reader-text { position: absolute; 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 { position: static; width: auto; height: auto; margin: 0; padding: var(--bk-space-xs) var(--bk-space-sm); clip: auto; background: var(--bk-color-dark); color: #fff; z-index: var(--bk-z-modal); }

/* Layout */
.bk-container { width: min(100% - 32px, var(--bk-container)); margin-inline: auto; }
.bk-container--narrow { width: min(100% - 32px, var(--bk-container-narrow)); margin-inline: auto; }
.bk-section { padding-block: var(--bk-space-3xl); }
.bk-grid { display: grid; gap: var(--bk-space-lg); }
.bk-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bk-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bk-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bk-stack { display: flex; flex-direction: column; gap: var(--bk-space-md); }
.bk-cluster { display: flex; flex-wrap: wrap; gap: var(--bk-space-sm); align-items: center; }

/* Core components */
.bk-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: var(--bk-radius-pill); background: var(--bk-color-primary); color: #fff; font-weight: var(--bk-font-weight-bold); text-decoration: none; }
.bk-button:hover { color: #fff; filter: brightness(.96); }
.bk-button--secondary { background: var(--bk-color-secondary); color: var(--bk-color-dark); }
.bk-button--outline { background: transparent; border-color: var(--bk-color-border); color: var(--bk-color-dark); }
.bk-button[aria-disabled="true"] { cursor: default; opacity: .72; pointer-events: none; }
.bk-card { border: 1px solid var(--bk-color-border); border-radius: var(--bk-radius); background: var(--bk-color-surface); box-shadow: var(--bk-shadow-sm); overflow: hidden; }
.bk-card__body { padding: var(--bk-space-lg); }
.bk-section-header { max-width: var(--bk-container-narrow); margin-bottom: var(--bk-space-xl); }
.bk-section-header__eyebrow, .bk-badge { display: inline-flex; align-items: center; width: fit-content; min-height: 28px; padding: 4px 10px; border-radius: var(--bk-radius-pill); background: var(--bk-color-surface-alt); color: var(--bk-color-primary); font-size: var(--bk-font-size-sm); font-weight: var(--bk-font-weight-bold); }

/* Theme shell */
.bk-site-header { z-index: var(--bk-z-header); background: var(--bk-color-surface); box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.bk-site-header--sticky { position: sticky; top: 0; }
body.admin-bar .bk-site-header--sticky { top: 32px; }
.bk-site-header__top { background: var(--bk-color-surface); }
.bk-site-header__inner { min-height: 48px; display: grid; grid-template-columns: 240px minmax(260px, 420px) 220px; gap: var(--bk-space-xl); align-items: center; justify-content: space-between; }
.bk-site-header__branding { display: flex; flex-direction: column; justify-content: center; min-width: 0; font-weight: 800; color: var(--bk-color-primary); }
.bk-site-header__branding .custom-logo-link img { max-height: 36px; width: auto; }
.bk-site-header__logo { width: fit-content; color: var(--bk-color-dark); font-size: 22px; line-height: 1; font-weight: 900; text-transform: uppercase; }
.bk-site-header__description { display: block; margin-top: 4px; color: var(--bk-color-muted); font-size: var(--bk-font-size-sm); line-height: 1.2; }
.bk-site-header__search { display: grid; grid-template-columns: minmax(0, 1fr) 42px; min-height: 34px; border: 1px solid var(--bk-color-border); border-radius: var(--bk-radius-sm); background: var(--bk-color-surface); overflow: hidden; }
.bk-site-header__search input { width: 100%; min-width: 0; border: 0; padding: 7px 12px; color: var(--bk-color-text); outline: 0; }
.bk-site-header__search input::placeholder { color: #9b9b9b; font-style: italic; }
.bk-site-header__search button { border: 0; border-left: 1px solid var(--bk-color-border); background: #fff; color: var(--bk-color-primary); font-size: 16px; line-height: 1; }
.bk-site-header__hotline { justify-self: end; }
.bk-site-header__hotline a, .bk-site-header__hotline span { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 7px 18px; border-radius: var(--bk-radius-pill); font-weight: var(--bk-font-weight-bold); background: var(--bk-color-secondary); color: #fff; white-space: nowrap; }
.bk-site-header__hotline span { cursor: default; opacity: .78; }
.bk-site-header__nav { background: var(--bk-color-primary); }
.bk-site-header__toggle-control { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.bk-site-header__mobile-toggle { display: none; min-height: 44px; align-items: center; justify-content: space-between; color: #fff; font-weight: var(--bk-font-weight-bold); cursor: pointer; }
.bk-site-header__mobile-toggle::after { content: "+"; font-size: 20px; line-height: 1; }
.bk-site-header__toggle-control:focus-visible + .bk-site-header__mobile-toggle { outline: 2px solid rgba(255,255,255,.72); outline-offset: -2px; }
.bk-site-header__navigation { min-height: 32px; display: flex; justify-content: center; align-items: stretch; }
.bk-site-header__menu { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; align-items: stretch; }
.bk-site-header__menu-item, .bk-site-header__menu > li { display: flex; }
.bk-site-header__menu-link, .bk-site-header__menu a { display: inline-flex; align-items: center; padding: 0 18px; color: #fff; font-size: var(--bk-font-size-sm); font-weight: var(--bk-font-weight-bold); border-left: 1px solid rgba(255,255,255,.08); }
.bk-site-header__menu-item:last-child .bk-site-header__menu-link, .bk-site-header__menu > li:last-child > a { border-right: 1px solid rgba(255,255,255,.08); }
.bk-site-header__menu-link:hover, .bk-site-header__menu-link:focus, .bk-site-header__menu a:hover, .bk-site-header__menu a:focus { background: rgba(0,0,0,.08); color: #fff; outline: 2px solid rgba(255,255,255,.4); outline-offset: -2px; }
.layout-content-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--bk-space-2xl); padding-block: var(--bk-space-2xl); }
.entry-title, .archive-header h1 { margin: 0 0 16px; color: var(--bk-color-dark); line-height: 1.2; }
.entry-content { font-size: var(--bk-font-size-md); }
.entry-thumbnail { margin: 24px 0; overflow: hidden; border-radius: var(--bk-radius); }
.widget-area { display: flex; flex-direction: column; gap: 20px; }
.widget { padding: 22px; border: 1px solid var(--bk-color-border); border-radius: var(--bk-radius); background: var(--bk-color-surface); }
.sidebar-block { margin-bottom: var(--bk-space-xl); }
.sidebar-block__title { margin-bottom: var(--bk-space-md); font-size: 28px; }
.sidebar-link-list, .sidebar-post-list, .site-footer__list { list-style: none; margin: 0; padding: 0; }
.sidebar-link-list li { border-bottom: 1px solid var(--bk-color-border); }
.sidebar-link-list a, .sidebar-link-list span { display: block; padding: 12px 0; color: var(--bk-color-dark); font-weight: var(--bk-font-weight-semibold); }
.sidebar-link-list a:hover { color: var(--bk-color-primary); }
.sidebar-banner { min-height: 250px; display: flex; align-items: center; justify-content: center; padding: var(--bk-space-lg); border-radius: var(--bk-radius-sm); background: linear-gradient(135deg, #ffffff 0%, #e6e6e6 100%); color: var(--bk-color-muted); text-align: center; }
.sidebar-post-list { display: flex; flex-direction: column; gap: var(--bk-space-sm); }
.sidebar-post a { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: var(--bk-space-sm); align-items: center; color: var(--bk-color-dark); font-weight: var(--bk-font-weight-semibold); line-height: 1.35; }
.sidebar-post img { width: 70px; height: 54px; object-fit: cover; border-radius: var(--bk-radius-sm); background: var(--bk-color-surface-alt); }
.sidebar-placeholder { color: var(--bk-color-muted); }
.site-footer { margin-top: 60px; background: #171717; color: rgba(255,255,255,.82); }
.site-footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: var(--bk-space-2xl); padding-block: 56px; }
.site-footer__column h2 { margin-bottom: var(--bk-space-md); color: var(--bk-color-primary); font-size: 22px; }
.site-footer__column p { color: rgba(255,255,255,.78); }
.site-footer__list li { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-footer__bottom { background: var(--bk-color-primary); padding-block: 14px; color: #fff; }
.site-footer__bottom p { margin: 0; font-size: var(--bk-font-size-sm); }

/* Utilities */
.bk-text-muted { color: var(--bk-color-muted); }
.bk-text-center { text-align: center; }
.bk-mb-0 { margin-bottom: 0; }
.bk-mb-md { margin-bottom: var(--bk-space-md); }
.bk-mb-lg { margin-bottom: var(--bk-space-lg); }

@media (max-width: 1100px) {
  .bk-site-header__inner { grid-template-columns: 220px minmax(220px, 1fr) auto; gap: var(--bk-space-lg); }
  .bk-site-header__menu-link, .bk-site-header__menu a { padding-inline: 14px; }
  .bk-site-header__hotline a, .bk-site-header__hotline span { padding-inline: 14px; }
}

@media (max-width: 782px) {
  body.admin-bar .bk-site-header--sticky { top: 46px; }
}

@media (max-width: 900px) {
  .bk-site-header__inner { grid-template-columns: 1fr auto; padding-block: 12px; }
  .bk-site-header__search { grid-column: 1 / -1; order: 3; }
  .bk-site-header__navigation { justify-content: flex-start; overflow-x: auto; }
  .bk-site-header__menu { justify-content: flex-start; min-width: max-content; }
  .layout-content-sidebar, .bk-grid--3, .bk-grid--4 { grid-template-columns: 1fr 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; gap: var(--bk-space-xl); }
}

@media (max-width: 600px) {
  .bk-container, .bk-container--narrow { width: min(100% - 24px, var(--bk-container)); }
  .bk-section { padding-block: var(--bk-space-2xl); }
  .bk-site-header__inner { grid-template-columns: 1fr; }
  .bk-site-header__hotline { justify-self: stretch; }
  .bk-site-header__hotline a, .bk-site-header__hotline span { width: 100%; }
  .bk-site-header__logo { font-size: 21px; }
  .bk-site-header__mobile-toggle { display: flex; }
  .bk-site-header__navigation { display: none; min-height: 0; padding-block: var(--bk-space-xs); }
  .bk-site-header__toggle-control:checked + .bk-site-header__mobile-toggle + .bk-site-header__navigation { display: block; }
  .bk-site-header__toggle-control:checked + .bk-site-header__mobile-toggle::after { content: "–"; }
  .bk-site-header__menu { display: block; min-width: 0; }
  .bk-site-header__menu-item, .bk-site-header__menu > li { display: block; }
  .bk-site-header__menu-link, .bk-site-header__menu a { min-height: 44px; width: 100%; border: 0; border-top: 1px solid rgba(255,255,255,.1); }
  .bk-grid--2, .bk-grid--3, .bk-grid--4, .layout-content-sidebar { grid-template-columns: 1fr; }
  .sidebar-block__title { font-size: 24px; }
  .entry-content { font-size: var(--bk-font-size-base); }
}
