:root {
  --bg: #f5f5f5;
  --card: #ffffff;
  --text: #000000;
  --title: #161618;
  --muted: #979797;
  --blue: #062db9;
  --border: rgba(155, 155, 155, 0.15);
  --widget-title-bg: #eff0f4;
  --footer: #000000;
  --footer-bar: #111111;
  --accent: #1e40af;
  --radius: 2px;
}

[data-theme="dark"] {
  --bg: #0f1117;
  --card: #1a1d27;
  --text: #dde1ea;
  --title: #f0f1f3;
  --muted: #6b7280;
  --border: rgba(255, 255, 255, 0.09);
  --widget-title-bg: #252836;
  --footer-bar: #080a10;
  --accent: #5b80f5;
}
[data-theme="dark"] .des-topbar { background: #0d1030; }
[data-theme="dark"] .des-header { background: #13151f; border-color: rgba(255,255,255,0.07); }
[data-theme="dark"] .des-home-v2 .des-block { background: var(--card); border-color: var(--border); }
[data-theme="dark"] .des-home-v2 .des-block__head h3 { background: var(--widget-title-bg); }
[data-theme="dark"] .des-article__tags span { background: #252836; border-color: var(--border); color: var(--text); }
[data-theme="dark"] .author-card { background: var(--card); border-color: var(--border); }
[data-theme="dark"] .burger { background: #252836; border-color: var(--border); }
[data-theme="dark"] .mobile-drawer { background: #13151f; }
[data-theme="dark"] .drawer-close { background: #252836; border-color: var(--border); color: var(--text); }
[data-theme="dark"] .rubric-card { background: var(--card); border-color: var(--border); }
[data-theme="dark"] .rubric-widget { background: var(--card); border-color: var(--border); }
[data-theme="dark"] .rubric-widget h3 { background: var(--widget-title-bg); color: var(--title); }
[data-theme="dark"] .rubric-widget a { color: var(--text); }
[data-theme="dark"] .rubric-card-title { color: var(--title); }
[data-theme="dark"] .rubric-card-excerpt { color: var(--muted); }
[data-theme="dark"] .dal-excerpt { color: var(--muted); }
[data-theme="dark"] .des-header__logo img { filter: brightness(0) invert(1); }
#theme-toggle { border: 1px solid var(--border); background: transparent; border-radius: 7px; width: 32px; height: 32px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text); transition: background .15s; }
#theme-toggle:hover { background: var(--widget-title-bg); }
* { box-sizing: border-box; }
body.des-page {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }
.des-container { width: min(1200px, calc(100% - 24px)); margin: 0 auto; }

.des-topbar { background: var(--blue); color: #fff; font-size: 12px; }
.des-topbar__inner { height: 28px; display: flex; justify-content: space-between; align-items: center; }
.des-topbar__links, .des-topbar__social { display: flex; gap: 16px; }

.des-header {
  margin-top: 15px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
  border: 1px solid rgba(0,0,0,.03);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 72px;
  padding: 0 24px;
  position: relative;
}
.des-header__logo { display: inline-flex; align-items: center; height: 72px; }
.des-header__logo img { display: block; width: auto; height: auto; max-height: 52px; }
.des-header__nav { justify-self: center; display: flex; gap: 8px; font-weight: 700; }
.des-header__nav a { font-size: 14px; text-transform: uppercase; padding: 0 14px; height: 72px; display: inline-flex; align-items: center; }
.des-header__nav a.active { color: var(--accent); }
.des-header__actions { display: flex; gap: 8px; align-items: center; }
.des-subscribe { font-size: 12px; color: #fff; background: #229ed9; border-radius: 7px; padding: 8px 10px; }

.des-layout { margin-top: 30px; display: grid; grid-template-columns: calc(100% - 330px) 300px; gap: 30px; }

.des-article__breadcrumbs { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.des-article__breadcrumbs a { color: var(--accent); }
.des-article__breadcrumbs a:hover { text-decoration: underline; }
.des-article__title { margin: 0 0 12px; color: var(--title); font-size: 35px; line-height: 1.2; font-weight: 700; }
.des-article__meta { color: var(--muted); font-size: 15px; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.des-article__meta span { color: var(--accent); font-weight: 700; }
.des-article__meta-avatar { width: 32px; height: 32px; flex-shrink: 0; }
.des-article { max-width: none; }
.des-article__hero { width: 100%; display: block; margin: 0 0 24px; border-radius: 12px; object-fit: cover; aspect-ratio: 16/9; box-shadow: 0 4px 24px rgba(0,0,0,.10); }
.des-article__body p, .des-article__body div, .des-article__body li { font-size: 18px; line-height: 1.7; text-align: justify; }
.des-article__tags { color: #767c87; margin-top: 20px; font-size: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.des-article__tags span { background: #f3f4f6; border: 1px solid var(--border); border-radius: 3px; padding: 3px 8px; }

.des-share { margin: 12px 0 20px; }

.des-widget { background: var(--card); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.des-widget__title { margin: 0 0 10px; background: var(--widget-title-bg); border-radius: var(--radius); padding: 10px 12px; font-size: 12px; color: var(--title); }

.des-news-list, .des-plain-list { list-style: none; margin: 12px 0 0; padding: 0; }
.des-news-list li { display: grid; grid-template-columns: 72px 1fr; gap: 10px; margin-bottom: 20px; }
.des-news-list img { width: 72px; height: 48px; object-fit: cover; border-radius: 2px; }
.des-news-list strong { display: block; font-size: 14px; line-height: 1.25; }
.des-news-list span { display: block; margin-top: 4px; color: #8e939b; font-size: 11px; }
.des-plain-list li { font-size: 13px; margin: 10px 0; }

.des-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.des-tag-cloud a { border: 1px solid #d9dde4; background: #fff; border-radius: 3px; padding: 5px 8px; font-size: 12px; color: #525862; }

.des-footer { margin-top: 22px; background: var(--footer-bar); color: #ececec; }
.des-footer__bar-inner { min-height: 56px; display: flex; justify-content: center; align-items: center; color: #8f96a0; font-size: 13px; }

.des-home { margin-top: 22px; }
.des-home-v2 { padding-bottom: 24px; }
.des-home-v2 .des-hero {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
  align-items: stretch;
}
.des-home-v2 .des-hero__main { min-height: 490px; height: 490px; }
.des-home-v2 .des-hero .card { position: relative; overflow: hidden; border-radius: 10px; min-width: 0; }
.des-home-v2 .des-hero .card > a { display: block; width: 100%; height: 100%; }
.des-home-v2 .des-hero .card > a > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.des-home-v2 .des-hero__side { display: grid; grid-template-rows: 240px 240px; gap: 10px; }
.des-home-v2 .des-hero .mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.des-home-v2 .des-hero .mini-grid .card { height: 240px; }
.des-home-v2 .des-hero .overlay { position: absolute; inset: auto 0 0 0; padding: 15px; background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff; }
.des-home-v2 .des-hero__main .overlay { padding: 20px; }
.des-home-v2 .des-hero .overlay span { display: inline-block; background: #1e40af; padding: 2px 6px; font-size: 10px; margin-bottom: 8px; }
.des-home-v2 .des-hero h2 { font-size: 25px; line-height: 1.28; max-width: 92%; margin: 0; }
.des-home-v2 .des-hero h3 { font-size: 15px; line-height: 1.28; max-width: 95%; margin: 0; }
.des-home-v2 .des-hero h4 { font-size: 15px; line-height: 1.28; max-width: 95%; margin: 0; }
.des-home-v2 .des-hero .overlay p { font-size: 12px; margin: 6px 0 0; color: #d9d9d9; }

.des-home-v2 .des-block { padding: 14px; border-radius: 16px; margin-bottom: 16px; background: #ffffff; border: 1px solid var(--border); }
.des-home-v2 .des-block__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.des-home-v2 .des-block__head h3 { font-size: 13px; letter-spacing: .2px; background: var(--widget-title-bg); padding: 7px 12px; border-radius: 2px; margin: 0; }
.des-home-v2 .des-cards { display: grid; gap: 14px; }
.des-home-v2 .des-cards.three { grid-template-columns: repeat(3, 1fr); }
.des-home-v2 .des-cards.two { grid-template-columns: repeat(2, 1fr); }
.des-home-v2 .des-cards h4 { font-size: 18px; line-height: 1.25; margin: 8px 0 0; }
.des-home-v2 .des-cards p { margin: 6px 0 0; color: #8f939b; font-size: 12px; }
.des-home-v2 .des-cards article img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 0; }

.des-home-v2 .des-content-with-sidebar { display: grid; grid-template-columns: calc(100% - 330px) 300px; gap: 30px; margin-top: 6px; }
.des-home-v2 .des-more-list article { display: none; grid-template-columns: 40% 1fr; gap: 14px; margin-bottom: 16px; }
.des-home-v2 .des-more-list article img { width: 100%; height: 210px; object-fit: cover; }
.des-home-v2 .des-more-list h4 { margin: 0 0 8px; font-size: 23px; line-height: 1.2; }
.des-home-v2 .des-more-list p { margin: 0; font-size: 15px; color: #2f3238; }
.des-home-v2 .des-load-more { display: block; margin: 8px auto 0; background: #fff; border: 1px solid #ddd; font-size: 18px; padding: 10px 34px; color: #2f3238; cursor: pointer; }

.author-card { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.author-card-avatar { width: 42px; height: 42px; border-radius: 50%; background: #1e40af; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.author-card-name { font-size: 14px; font-weight: 700; }
.author-card-role { font-size: 12px; color: #8e939b; }

.share-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.sib { border: 0; color: #fff; padding: 7px 11px; border-radius: 2px; font-size: 12px; cursor: pointer; }
.sib.tg { background: #229ed9; }
.sib.tw { background: #111; }
.sib.fb { background: #3b5998; }
.sib.ln { background: #0a66c2; }
.sib.cp { background: #6b7280; }
.sib.nat { background: #cb2027; }

.share-toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  background: #111;
  color: #fff;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all .2s ease;
}
.share-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.burger { display: none; border: 1px solid var(--border); width: 32px; height: 32px; border-radius: 7px; background: #f5f5f5; cursor: pointer; }
.burger span { display: block; width: 16px; height: 2px; background: #111; margin: 3px auto; }
.mobile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.38); z-index: 900; opacity: 0; transition: opacity .2s; }
.mobile-overlay.visible { display: block; }
.mobile-overlay.open { opacity: 1; }
.mobile-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 300px; max-width: 100vw; background: #fff; z-index: 910; transform: translateX(110%); transition: transform .3s; box-shadow: -8px 0 40px rgba(0,0,0,.18); }
.mobile-drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.drawer-logo-img { max-width: 180px; max-height: 40px; }
.drawer-close { border: 1px solid var(--border); background: #fff; border-radius: 6px; width: 32px; height: 32px; font-size: 18px; }
.drawer-body { padding: 16px; }
.drawer-section-label { font-size: 12px; color: #8e939b; margin-bottom: 10px; text-transform: uppercase; }
.drawer-nav { display: flex; flex-direction: column; gap: 8px; }
.drawer-nav a { padding: 8px; border-radius: 6px; }
.drawer-nav a.active { background: #eff0f4; }

@media (max-width: 1200px) {
  .des-header { grid-template-columns: 1fr auto; gap: 12px; padding: 10px 16px; }
  .des-header__nav { display: none; }
  .des-subscribe { display: none; }
  .burger { display: block; }
  .des-layout,
  .des-home-v2 .des-content-with-sidebar,
  .des-home-v2 .des-hero,
  .des-home-v2 .des-cards.three,
  .des-home-v2 .des-cards.two { grid-template-columns: 1fr; }
  .des-home-v2 .des-hero__main,
  .des-home-v2 .des-hero__side,
  .des-home-v2 .des-hero .mini-grid .card { height: auto; min-height: 280px; }
  .des-home-v2 .des-more-list article { grid-template-columns: 1fr; }
}

/* Rubric pages */
.rubric-page{max-width:1240px;margin:24px auto;padding:0 16px}
.rubric-shell{background:#f6f6f7;border:1px solid #e4e6eb;border-radius:16px;padding:16px}
.rubric-head h1{margin:0;font-size:34px;line-height:1.15}
.rubric-head p{margin:8px 0 0;color:#7a7f88;font-size:14px}
.rubric-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:20px;margin-top:16px}
.rubric-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.rubric-card{background:#fff;border:1px solid #e4e6eb;border-radius:12px;overflow:hidden;display:flex;flex-direction:column}
.rubric-card-image-wrap{display:block;aspect-ratio:16/10;overflow:hidden}
.rubric-card-image{width:100%;height:100%;object-fit:cover;display:block}
.rubric-card-fallback{display:flex;align-items:center;justify-content:center;background:#f2f4f8;font-size:36px}
.rubric-card-body{padding:12px}
.rubric-card-cat{display:inline-flex;background:#1e40af;color:#fff;font-size:11px;padding:3px 8px;border-radius:2px;text-transform:uppercase;margin-bottom:8px}
.rubric-card-title{display:block;font-size:20px;line-height:1.25;font-weight:800;color:#121418}
.rubric-card-excerpt{margin:8px 0 0;color:#4d525b;font-size:14px;line-height:1.45}
.rubric-card-meta{margin-top:10px;color:#8d939c;font-size:12px}
.rubric-sidebar{display:flex;flex-direction:column;gap:12px}
.rubric-widget{background:#fff;border:1px solid #e4e6eb;border-radius:12px;padding:14px}
.rubric-widget h3{margin:0 0 10px;background:#eceff3;padding:8px 10px;border-radius:2px;font-size:13px;text-transform:uppercase}
.rubric-widget ul{margin:0;padding:0;list-style:none}
.rubric-widget li+li{margin-top:8px}
.rubric-widget a{color:#1b1f24}
@media (max-width:1100px){
  .rubric-layout{grid-template-columns:1fr}
  .rubric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:700px){
  .rubric-head h1{font-size:28px}
  .rubric-grid{grid-template-columns:1fr}
}
.des-article-list{list-style:none;margin:0;padding:0}
.des-article-list>li{display:grid;grid-template-columns:40% 1fr;gap:20px;padding:20px 0;border-bottom:1px solid var(--border)}
.des-article-list>li:last-child{border-bottom:none;padding-bottom:0}
.des-article-list .dal-img{position:relative;overflow:hidden;border-radius:6px;flex-shrink:0}
.des-article-list .dal-img img{width:100%;height:220px;object-fit:cover;display:block}
.des-article-list .dal-img-placeholder{width:100%;height:220px;background:#eff0f4;border-radius:6px}
.des-article-list .dal-badge{position:absolute;bottom:10px;left:10px;background:#1e40af;color:#fff;font-size:11px;font-weight:700;padding:3px 8px;text-transform:uppercase}
.des-article-list .dal-body{display:flex;flex-direction:column;justify-content:flex-start;min-width:0}
.des-article-list .dal-title{font-size:22px;font-weight:800;line-height:1.25;color:var(--title);text-decoration:none;display:block;margin-bottom:8px}
.des-article-list .dal-title:hover{color:var(--blue)}
.des-article-list .dal-meta{font-size:13px;color:var(--muted);margin-bottom:10px}
.des-article-list .dal-meta a{color:var(--blue);font-weight:600;text-decoration:none}
.des-article-list .dal-excerpt{font-size:15px;color:#4d525b;line-height:1.6;margin:0}
@media (max-width:900px){
  .des-article-list>li{grid-template-columns:1fr}
  .des-article-list .dal-img img,.des-article-list .dal-img-placeholder{height:180px}
}
