/* BryanCMS Default 1.1 — эталонная тема. Без внешних шрифтов и иконок. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1f2421;
  --muted: #6b716c;
  --border: #e7e4dc;
  --accent: #2f6b4f;
  --accent-soft: #e6f0ea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(0,0,0,.05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --container: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131614; --surface: #1b1f1c; --text: #e8ebe8; --muted: #9aa39c;
    --border: #2b312d; --accent: #7cc49e; --accent-soft: #1f2e26;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.button, .search-big button { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 11px 20px; font: 600 .95rem var(--font); cursor: pointer; }
.button:hover { text-decoration: none; filter: brightness(1.08); }
.kicker { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 700; }

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { font-weight: 800; font-size: 1.25rem; color: var(--text); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand img { max-height: 44px !important; width: auto; }
.site-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.site-nav a { color: var(--text); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.site-nav a:hover, .site-nav a.active { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.search-mini input { width: 180px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: .9rem; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; transition: .2s; }

/* Hero */
.hero { padding: 64px 0 40px; border-bottom: 1px solid var(--border); margin-bottom: 40px; }
.hero h1 { font-family: var(--font-serif); font-size: clamp(2rem, 4.5vw, 3.2rem); max-width: 820px; }
.hero p { font-size: 1.2rem; color: var(--muted); max-width: 680px; margin: 0; }

/* Раскладка */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; padding-top: 40px; padding-bottom: 64px; }
.hero + .layout { padding-top: 0; }

/* Ленты */
.listing-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.listing-title { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin: 4px 0 8px; }
.listing-desc { color: var(--muted); margin: 0 0 8px; }
.author-head { display: flex; gap: 16px; align-items: center; }
.cards { display: grid; gap: 22px; }
.card { display: grid; grid-template-columns: 240px 1fr; gap: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card:not(:has(.card-thumb)) { grid-template-columns: 1fr; padding: 22px; }
.card-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.card-cat { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.card-title { font-size: 1.3rem; margin: 6px 0 8px; }
.card-title a { color: var(--text); }
.card-excerpt { color: var(--muted); margin: 0 0 12px; font-size: .97rem; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--muted); }
.meta a { color: var(--text); font-weight: 600; }
.empty { padding: 40px; text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); }

/* Пагинация (HTML генерирует CMS: .pagination .page-numbers .current .dots .prev .next) */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 32px; }
.pagination .page-numbers { min-width: 40px; text-align: center; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: .95rem; }
.pagination a.page-numbers:hover { border-color: var(--accent); text-decoration: none; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination .dots { border: 0; background: none; }

/* Сайдбар */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.widget-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.widget-list, .widget-posts { list-style: none; margin: 0; padding: 0; }
.widget-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .95rem; }
.widget-list li:last-child, .widget-posts li:last-child { border-bottom: 0; }
.widget-list a { color: var(--text); }
.widget-list a.active { color: var(--accent); font-weight: 700; }
.count { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.widget-posts li { padding: 9px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.widget-posts a { color: var(--text); font-weight: 600; font-size: .95rem; line-height: 1.35; }
.widget-posts time { color: var(--muted); font-size: .8rem; }
.widget-posts.numbered { counter-reset: n; }
.widget-posts.numbered li { padding-left: 34px; position: relative; }
.widget-posts.numbered li::before { counter-increment: n; content: counter(n); position: absolute; left: 0; top: 8px; font: 700 1.3rem var(--font-serif); color: var(--accent); }
.tag-cloud, .article-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-item { background: var(--accent-soft); color: var(--accent); padding: 4px 10px; border-radius: 999px; font-size: .85rem; }
.tag-item:hover { text-decoration: none; filter: brightness(.95); }

/* Статья */
.article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(20px, 4vw, 48px); box-shadow: var(--shadow); }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.article-title { font-family: var(--font-serif); font-size: clamp(1.9rem, 4vw, 2.8rem); }
.article-lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 16px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; color: var(--muted); font-size: .9rem; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.author-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.author-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.author-avatar.lg { width: 72px; height: 72px; }
.article-cover { margin: 0 0 28px; }
.article-cover img { width: 100%; border-radius: 12px; }
.toc-box { background: var(--accent-soft); border-radius: 12px; padding: 18px 22px; margin: 0 0 28px; }
.toc-title { font-weight: 700; margin-bottom: 8px; }
.toc-list { margin: 0; padding-left: 20px; }
.toc-list li { margin: 4px 0; }
.toc-subitem { margin-left: 18px !important; list-style: circle; font-size: .95rem; }
.prose { font-size: 1.08rem; line-height: 1.75; overflow-wrap: break-word; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose img { border-radius: 10px; margin: 1.4em auto; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { text-align: center; color: var(--muted); font-size: .9rem; }
.prose blockquote { margin: 1.6em 0; padding: 4px 22px; border-left: 4px solid var(--accent); color: var(--muted); font-style: italic; }
.prose pre { background: #1d211e; color: #e8ebe8; padding: 16px; border-radius: 10px; overflow-x: auto; font-size: .9rem; }
.prose code { background: var(--accent-soft); padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.prose iframe { max-width: 100%; border: 0; }
.article-tags { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.author-box { display: flex; gap: 18px; align-items: flex-start; margin-top: 32px; padding: 22px; background: var(--bg); border-radius: 12px; }
.author-box .author-avatar { width: 64px; height: 64px; }
.author-box-name { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.author-box p { margin: 6px 0 0; color: var(--muted); }
.section-title { font-family: var(--font-serif); font-size: 1.5rem; margin: 40px 0 16px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-item { color: var(--text); font-weight: 600; line-height: 1.35; }
.related-item img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; border-radius: 10px; margin-bottom: 8px; background: var(--accent-soft); }

/* Контакты, поиск, 404 */
.contact-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 28px; }
.contact-mail { font-size: 1.2rem; font-weight: 700; }
.search-big { display: flex; gap: 8px; margin: 16px 0; max-width: 560px; }
.search-big input { flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; font: inherit; background: var(--surface); color: var(--text); }
.notfound { text-align: center; padding: 72px 20px; max-width: 720px; }
.notfound-code { font: 800 7rem/1 var(--font-serif); color: var(--accent); }
.notfound .search-big { margin: 24px auto; }
.notfound-list { text-align: left; max-width: 520px; margin: 0 auto; }

/* Подвал */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-bottom: 32px; }
.footer-brand { font-weight: 800; font-size: 1.15rem; margin-bottom: 8px; }
.site-footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer ul a { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; padding: 18px 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }

/* 1.4: выпадающее меню (подрубрики) */
.site-nav li { position: relative; }
.site-nav .menu-item.has-children > a { padding-right: 6px; }
.sub-toggle { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 34px; margin-left: -2px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; vertical-align: middle; }
.sub-toggle::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.sub-toggle:hover { color: var(--accent); }
.site-nav ul.sub-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 50; min-width: 220px; flex-direction: column; gap: 0; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.site-nav ul.sub-menu .sub-menu { top: -7px; left: 100%; margin-left: 4px; }
.site-nav .sub-menu li { display: flex; align-items: center; }
.site-nav .sub-menu a { display: block; flex: 1; padding: 8px 12px; white-space: nowrap; font-weight: 400; }
.site-nav .sub-menu .sub-toggle::before { transform: rotate(-45deg); }
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu, .site-nav li.open > .sub-menu { display: flex; }
.site-nav li.open > .sub-toggle::before { transform: translateY(2px) rotate(225deg); }
.site-nav a.active-parent { color: var(--accent); }
.site-nav ul.sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; } /* мостик для мыши */
.widget-list li.cat-level-1 { padding-left: 16px; }
.widget-list li.cat-level-2 { padding-left: 32px; }
.widget-list li.cat-level-3, .widget-list li.cat-level-4 { padding-left: 48px; }
.widget-list li.cat-level-1 a, .widget-list li.cat-level-2 a { font-size: .9rem; }
.widget-list li.cat-level-1 a::before, .widget-list li.cat-level-2 a::before { content: "└ "; color: var(--muted); }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.subcat { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: .9rem; }
.subcat span { color: var(--muted); font-size: .8rem; }
.subcat:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.kicker a { color: inherit; }

/* Адаптив */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 68px; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav li { display: flex; flex-wrap: wrap; align-items: center; }
  .site-nav li > a { flex: 1; }
  .sub-toggle { width: 40px; height: 40px; }
  .site-nav ul.sub-menu, .site-nav ul.sub-menu .sub-menu { position: static; display: none; width: 100%; min-width: 0; margin: 0 0 4px 12px; padding: 0 0 0 10px; border: 0; border-left: 2px solid var(--border); border-radius: 0; box-shadow: none; background: none; }
  .site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { display: none; }
  .site-nav li.open > .sub-menu { display: flex; }
  .site-nav .sub-menu .sub-toggle::before { transform: translateY(-2px) rotate(45deg); }
  .site-nav .sub-menu li.open > .sub-toggle::before { transform: translateY(2px) rotate(225deg); }
  .site-nav .sub-menu a { white-space: normal; }
  .search-mini input { width: 100%; }
  .card { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 28px; }
}
.author-avatar-empty { display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .9rem; }

/* 1.2: хлебные крошки */
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li + li::before { content: "/"; margin-right: 4px; opacity: .6; }
.breadcrumbs a { color: var(--muted); }
/* комментарии — под цвета темы */
.bc-comments { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); box-shadow: var(--shadow); margin-top: 28px; }
.bc-comments .bc-thread { border-color: var(--border); }
.bc-comments .bc-avatar { background: var(--accent-soft); color: var(--accent); }
.bc-comments .bc-admin .bc-avatar, .bc-comments .bc-badge, .bc-comments .bc-submit { background: var(--accent); color: #fff; }
.bc-comments .bc-form { border-color: var(--border); }
.bc-comments .bc-field input, .bc-comments .bc-field textarea { background: var(--bg); color: var(--text); border-color: var(--border); }


    :root {
      --bg: #F6F2EA;
      --surface-linen: #EFE9DD;
      --surface-sand: #E6DEC8;
      --surface-dark: #23211E;
      --surface-terracotta: #B85D43;
      --surface-sage: #5E6E5D;
      --text-main: #23211E;
      --text-muted: #6A645B;
      --text-light: #F6F2EA;
      --border: rgba(35, 33, 30, 0.14);
      --border-strong: rgba(35, 33, 30, 0.28);
      --radius-lg: 24px;
      --radius-md: 16px;
      --radius-sm: 10px;
      --font-serif: 'Cormorant Garamond', Georgia, serif;
      --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    body {
      background-color: var(--bg);
      color: var(--text-main);
      font-family: var(--font-sans);
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
    }

    a { color: inherit; text-decoration: none; }
    button, input, select, textarea { font-family: inherit; }

    .container {
      max-width: 1440px;
      margin: 0 auto;
      padding: 0 28px;
    }

    /* HEADER */
    .site-header {
      border-bottom: 1px solid var(--border);
      padding: 20px 0;
      position: sticky;
      top: 0;
      z-index: 40;
      background: rgba(246, 242, 234, 0.94);
      backdrop-filter: blur(10px);
    }

    .header-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      flex-wrap: wrap;
    }

    .brand {
      display: flex;
      align-items: baseline;
      gap: 14px;
      cursor: pointer;
    }

    .brand-title {
      font-family: var(--font-serif);
      font-size: 34px;
      font-weight: 700;
      letter-spacing: -0.02em;
      line-height: 1;
    }

    .brand-sub {
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: var(--text-muted);
      border-left: 1px solid var(--border-strong);
      padding-left: 14px;
    }

    .header-nav {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .nav-btn {
      padding: 10px 18px;
      border-radius: 999px;
      border: 1px solid var(--border-strong);
      background: transparent;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .nav-btn:hover, .nav-btn.active {
      background: var(--text-main);
      color: var(--text-light);
      border-color: var(--text-main);
    }

    .search-box {
      position: relative;
      display: flex;
      align-items: center;
    }

    .search-box input {
      padding: 10px 16px 10px 38px;
      border-radius: 999px;
      border: 1px solid var(--border-strong);
      background: var(--surface-linen);
      font-size: 14px;
      width: 240px;
      outline: none;
      transition: border-color 0.2s, width 0.2s;
    }

    .search-box input:focus {
      border-color: var(--surface-terracotta);
      width: 280px;
    }

    .search-box svg {
      position: absolute;
      left: 14px;
      width: 16px;
      height: 16px;
      color: var(--text-muted);
      pointer-events: none;
    }

    /* EDITORIAL BANNER & FILTER BAR */
    .hero-strip {
      padding: 44px 0 28px;
      border-bottom: 1px solid var(--border);
    }

    .hero-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 24px;
      flex-wrap: wrap;
      margin-bottom: 28px;
    }

    .hero-kicker {
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--surface-terracotta);
      margin-bottom: 10px;
    }

    .hero-heading {
      font-family: var(--font-serif);
      font-size: clamp(38px, 4.8vw, 64px);
      font-weight: 600;
      line-height: 1.04;
      max-width: 840px;
    }

    .hero-desc {
      max-width: 380px;
      font-size: 15px;
      color: var(--text-muted);
    }

    .filter-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }

    .category-pills {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .pill {
      padding: 9px 18px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: var(--surface-linen);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }

    .pill:hover {
      border-color: var(--text-main);
    }

    .pill.active {
      background: var(--surface-terracotta);
      color: #fff;
      border-color: var(--surface-terracotta);
    }

    .active-filter-banner {
      display: none;
      align-items: center;
      gap: 12px;
      background: var(--surface-sand);
      padding: 10px 18px;
      border-radius: 999px;
      font-size: 13px;
      font-weight: 600;
    }

    .active-filter-banner.visible {
      display: inline-flex;
    }

    .reset-filter-btn {
      background: var(--text-main);
      color: #fff;
      border: none;
      border-radius: 999px;
      padding: 4px 10px;
      font-size: 12px;
      cursor: pointer;
    }

    /* 3-COLUMN LARGE TILE GRID */
    .tiles-section {
      padding: 36px 0 72px;
    }

    .tiles-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 28px;
      align-items: stretch;
    }

    .tile-card {
      border-radius: var(--radius-lg);
      border: 1px solid var(--border);
      padding: 28px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      min-height: 520px;
      transition: transform 0.25s ease, box-shadow 0.25s ease;
      position: relative;
      overflow: hidden;
    }

    .tile-card.clickable {
      cursor: pointer;
    }

    .tile-card.clickable:hover {
      transform: translateY(-4px);
      box-shadow: 0 20px 40px rgba(35, 33, 30, 0.08);
    }

    .tile-linen { background: var(--surface-linen); }
    .tile-sand { background: var(--surface-sand); }
    .tile-dark { background: var(--surface-dark); color: var(--text-light); }
    .tile-terracotta { background: var(--surface-terracotta); color: #fff; }
    .tile-sage { background: var(--surface-sage); color: #fff; }

    .tile-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 18px;
    }

    .tile-num {
      font-family: var(--font-serif);
      font-size: 46px;
      font-weight: 700;
      line-height: 0.9;
      opacity: 0.85;
    }

    .tile-cat {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      padding: 6px 12px;
      border-radius: 999px;
      border: 1px solid currentColor;
      opacity: 0.88;
    }

    .tile-illustration {
      width: 100%;
      height: 185px;
      border-radius: var(--radius-md);
      margin-bottom: 20px;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(255, 255, 255, 0.22);
      border: 1px solid rgba(35, 33, 30, 0.08);
    }

    .tile-dark .tile-illustration,
    .tile-terracotta .tile-illustration,
    .tile-sage .tile-illustration {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.15);
    }

    .tile-title {
      font-family: var(--font-serif);
      font-size: 31px;
      font-weight: 700;
      line-height: 1.12;
      margin-bottom: 12px;
    }

    .tile-excerpt {
      font-size: 15px;
      opacity: 0.84;
      margin-bottom: 22px;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .tile-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 16px;
      border-top: 1px solid currentColor;
      border-top-color: rgba(128, 128, 128, 0.25);
      font-size: 13px;
      font-weight: 600;
    }

    .read-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-weight: 700;
    }

    /* CALCULATOR & PASSPORT UTILITY TILES */
    .calc-form {
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin: 10px 0 18px;
    }

    .calc-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .calc-field label {
      display: block;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 4px;
      opacity: 0.8;
    }

    .calc-field select, .calc-field input {
      width: 100%;
      padding: 10px 12px;
      border-radius: var(--radius-sm);
      border: 1px solid rgba(255, 255, 255, 0.24);
      background: rgba(255, 255, 255, 0.12);
      color: inherit;
      font-size: 14px;
      font-weight: 600;
      outline: none;
    }

    .calc-field select option {
      color: var(--text-main);
      background: var(--bg);
    }

    .calc-result-box {
      background: rgba(255, 255, 255, 0.12);
      border-radius: var(--radius-md);
      padding: 14px 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }

    .calc-grams {
      font-family: var(--font-serif);
      font-size: 36px;
      font-weight: 700;
      line-height: 1;
    }

    .passport-specs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin: 14px 0 18px;
    }

    .spec-item {
      background: rgba(35, 33, 30, 0.06);
      padding: 10px 12px;
      border-radius: var(--radius-sm);
    }

    .spec-label {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-muted);
    }

    .spec-val {
      font-weight: 700;
      font-size: 14px;
      margin-top: 2px;
    }

    /* SINGLE POST PAGE VIEW (SEPARATE PAGE, NOT MODAL) */
    .single-page {
      display: none;
      padding: 36px 0 80px;
    }

    .single-page.active {
      display: block;
    }

    .home-page.hidden {
      display: none;
    }

    .breadcrumbs {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      font-size: 13px;
      color: var(--text-muted);
      margin-bottom: 24px;
    }

    .breadcrumbs a {
      color: var(--text-main);
      font-weight: 600;
      border-bottom: 1px solid transparent;
    }

    .breadcrumbs a:hover {
      border-bottom-color: var(--surface-terracotta);
    }

    .single-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 390px;
      gap: 36px;
      align-items: start;
    }

    /* MAIN ARTICLE COLUMN */
    .article-main {
      background: var(--surface-linen);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 44px;
    }

    .article-meta-top {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 18px;
    }

    .article-badge {
      background: var(--surface-terracotta);
      color: #fff;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      padding: 6px 14px;
      border-radius: 999px;
    }

    .article-date, .article-stats-inline {
      font-size: 13px;
      color: var(--text-muted);
      font-weight: 500;
    }

    .article-title {
      font-family: var(--font-serif);
      font-size: clamp(36px, 4vw, 54px);
      font-weight: 700;
      line-height: 1.08;
      margin-bottom: 22px;
    }

    .author-strip {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
      padding: 16px 0;
      border-top: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
      margin-bottom: 28px;
    }

    .author-info {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .author-avatar {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: var(--surface-dark);
      color: var(--text-light);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: var(--font-serif);
      font-size: 22px;
      font-weight: 700;
    }

    .article-hero-visual {
      width: 100%;
      height: 300px;
      border-radius: var(--radius-md);
      background: var(--surface-sand);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 28px;
      overflow: hidden;
    }

    .tech-passport-bar {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      background: var(--surface-dark);
      color: var(--text-light);
      padding: 20px;
      border-radius: var(--radius-md);
      margin-bottom: 32px;
    }

    .tp-cell span {
      display: block;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      opacity: 0.68;
      margin-bottom: 4px;
    }

    .tp-cell strong {
      font-size: 15px;
      font-weight: 600;
    }

    .article-body {
      font-size: 17px;
      line-height: 1.75;
      color: var(--text-main);
    }

    .article-body .lead {
      font-family: var(--font-serif);
      font-size: 25px;
      line-height: 1.45;
      font-weight: 600;
      margin-bottom: 24px;
      color: var(--text-main);
    }

    .article-body h2 {
      font-family: var(--font-serif);
      font-size: 32px;
      font-weight: 700;
      margin: 32px 0 14px;
      line-height: 1.15;
    }

    .article-body p {
      margin-bottom: 18px;
    }

    .article-callout {
      background: var(--surface-sand);
      border-left: 4px solid var(--surface-terracotta);
      padding: 20px 24px;
      border-radius: 0 var(--radius-md) var(--radius-md) 0;
      margin: 26px 0;
    }

    .article-callout strong {
      display: block;
      font-size: 13px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--surface-terracotta);
      margin-bottom: 6px;
    }

    .article-body ul {
      padding-left: 22px;
      margin-bottom: 22px;
    }

    .article-body li {
      margin-bottom: 8px;
    }

    .article-tags-footer {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      padding-top: 24px;
      margin-top: 32px;
      border-top: 1px solid var(--border);
    }

    .post-nav-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin-top: 28px;
    }

    .post-nav-card {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 18px;
      cursor: pointer;
      transition: border-color 0.2s;
    }

    .post-nav-card:hover {
      border-color: var(--surface-terracotta);
    }

    .post-nav-card small {
      display: block;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--text-muted);
      margin-bottom: 6px;
    }

    .post-nav-card strong {
      font-family: var(--font-serif);
      font-size: 21px;
      line-height: 1.2;
      display: block;
    }

    /* COMMENTS */
    .comments-block {
      margin-top: 40px;
      padding-top: 32px;
      border-top: 1px solid var(--border);
    }

    .comments-block h3 {
      font-family: var(--font-serif);
      font-size: 30px;
      margin-bottom: 20px;
    }

    .comment-item {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 18px 20px;
      margin-bottom: 14px;
    }

    .comment-head {
      display: flex;
      justify-content: space-between;
      font-size: 13px;
      margin-bottom: 8px;
    }

    .comment-form {
      display: grid;
      gap: 12px;
      margin-top: 20px;
    }

    .comment-form input, .comment-form textarea {
      width: 100%;
      padding: 12px 16px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border-strong);
      background: var(--bg);
      font-size: 14px;
    }

    .btn-primary {
      background: var(--surface-terracotta);
      color: #fff;
      border: none;
      border-radius: 999px;
      padding: 12px 24px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      justify-self: start;
      transition: opacity 0.2s;
    }

    .btn-primary:hover { opacity: 0.9; }

    /* RIGHT SIDEBAR */
    .single-sidebar {
      display: flex;
      flex-direction: column;
      gap: 24px;
      position: sticky;
      top: 96px;
    }

    .sidebar-widget {
      background: var(--surface-linen);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 26px;
    }

    .sidebar-widget.dark-widget {
      background: var(--surface-dark);
      color: var(--text-light);
    }

    .widget-title {
      font-family: var(--font-serif);
      font-size: 26px;
      font-weight: 700;
      line-height: 1.1;
      margin-bottom: 18px;
      padding-bottom: 12px;
      border-bottom: 1px solid rgba(128, 128, 128, 0.25);
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      margin-bottom: 16px;
    }

    .stat-box {
      background: rgba(255, 255, 255, 0.08);
      padding: 12px 10px;
      border-radius: var(--radius-sm);
      text-align: center;
    }

    .stat-box strong {
      display: block;
      font-family: var(--font-serif);
      font-size: 28px;
      line-height: 1;
      margin-bottom: 4px;
    }

    .stat-box span {
      font-size: 11px;
      opacity: 0.75;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .stat-bar-row {
      margin-top: 10px;
      font-size: 12px;
    }

    .stat-bar-label {
      display: flex;
      justify-content: space-between;
      margin-bottom: 4px;
      opacity: 0.85;
    }

    .stat-bar-track {
      height: 6px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.14);
      overflow: hidden;
    }

    .stat-bar-fill {
      height: 100%;
      background: var(--surface-terracotta);
      border-radius: 999px;
    }

    .widget-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .widget-list-btn {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 14px;
      border-radius: var(--radius-sm);
      border: 1px solid transparent;
      background: var(--bg);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      text-align: left;
      transition: all 0.2s;
    }

    .widget-list-btn:hover {
      border-color: var(--surface-terracotta);
      color: var(--surface-terracotta);
    }

    .count-badge {
      background: var(--surface-sand);
      color: var(--text-main);
      font-size: 12px;
      font-weight: 700;
      padding: 2px 9px;
      border-radius: 999px;
    }

    .recent-post-item {
      display: flex;
      gap: 12px;
      align-items: flex-start;
      padding: 12px;
      border-radius: var(--radius-sm);
      background: var(--bg);
      border: 1px solid transparent;
      cursor: pointer;
      transition: all 0.2s;
    }

    .recent-post-item:hover, .recent-post-item.current {
      border-color: var(--surface-terracotta);
    }

    .recent-num {
      font-family: var(--font-serif);
      font-size: 24px;
      font-weight: 700;
      line-height: 1;
      color: var(--surface-terracotta);
      min-width: 28px;
    }

    .recent-info strong {
      display: block;
      font-size: 14px;
      line-height: 1.3;
      margin-bottom: 4px;
    }

    .recent-info span {
      font-size: 12px;
      color: var(--text-muted);
    }

    .tags-cloud {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .tag-chip {
      padding: 7px 13px;
      border-radius: 999px;
      background: var(--bg);
      border: 1px solid var(--border-strong);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }

    .tag-chip:hover {
      background: var(--surface-terracotta);
      color: #fff;
      border-color: var(--surface-terracotta);
    }

    /* FOOTER */
    .site-footer {
      border-top: 1px solid var(--border);
      padding: 36px 0;
      background: var(--surface-linen);
      font-size: 14px;
      color: var(--text-muted);
    }

    .footer-inner {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 16px;
    }

    /* RESPONSIVE */
    @media (max-width: 1180px) {
      .tiles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .single-layout {
        grid-template-columns: 1fr;
      }
      .single-sidebar {
        position: static;
      }
    }

    @media (max-width: 760px) {
      .tiles-grid {
        grid-template-columns: 1fr;
      }
      .article-main {
        padding: 24px;
      }
      .tech-passport-bar {
        grid-template-columns: 1fr 1fr;
      }
      .post-nav-grid {
        grid-template-columns: 1fr;
      }
    }
  
:root{--surface:var(--surface-linen);--text:var(--text-main);--muted:var(--text-muted);--accent:var(--surface-terracotta);--accent-soft:var(--surface-sand);--radius:var(--radius-md);--shadow:none} body{background:var(--bg);color:var(--text-main)} .site-header{height:auto} .brand{max-width:100%;flex-wrap:wrap} .brand-title img{max-width:180px;max-height:60px;object-fit:contain} .site-nav>ul>li>a{border:1px solid var(--border-strong);border-radius:999px;padding:9px 15px} .site-nav a.active{background:var(--surface-dark);color:var(--text-light)} .single-layout{padding-top:36px;padding-bottom:72px} .tile-card{background:var(--surface-linen)} .tile-card:nth-child(5n+2){background:var(--surface-sand)} .tile-card:nth-child(5n+3){background:var(--surface-terracotta);color:white} .tile-card:nth-child(5n+4){background:var(--surface-sage);color:white} .tile-card:nth-child(5n+5),.tile-card.tile-dark{background:var(--surface-dark);color:var(--text-light)} .tile-illustration img,.article-hero-visual img{width:100%;height:100%;object-fit:cover} .tile-title a:hover,.read-link:hover{text-decoration:underline} .tile-cat{max-width:75%;overflow-wrap:anywhere} .article-body img{max-width:100%;height:auto} .category-content{margin-top:32px;padding:28px;background:var(--surface-linen);border-radius:var(--radius-lg)} .listing-title{font-family:var(--font-serif);font-size:clamp(36px,4vw,54px)} .category-pills{margin-top:16px} .empty{grid-column:1/-1} .footer-inner nav{display:flex;gap:12px;flex-wrap:wrap} .article-main,.content{min-width:0} .author-avatar{object-fit:cover} .article-body a{color:var(--surface-terracotta);text-decoration:underline} .article-body table{display:block;overflow-x:auto} .tile-dark select{color:white} .tile-dark select option{color:#23211e;background:#f6f2ea} @media(max-width:760px){.container{padding-left:16px;padding-right:16px}.tile-card{min-height:420px;padding:20px}.brand-sub{display:none}.site-header{position:relative}.single-layout{padding-top:20px}.article-hero-visual{height:220px}}
