/*
Theme Name: Событариум
Theme URI: https://webgarry.ru/
Author: Редакция Событариума
Description: Современная медийная тема для статей, рубрик, полезных ссылок и аккуратной монетизации.
Version: 1.0.3
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.1
Text Domain: sobytarium
*/

/* Событариум — спокойное современное медиа */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f8fa;
  --surface-3: #eceef2;
  --text: #17181b;
  --muted: #6d7179;
  --muted-2: #9297a1;
  --line: #e4e6ea;
  --line-strong: #d5d8de;
  --accent: #ff5c4d;
  --accent-dark: #d94337;
  --accent-soft: #fff0ed;
  --cat-color: #6b66ff;
  --cat-soft: #9c8cff;
  --ink: #242832;
  --sidebar: #17191e;
  --sidebar-2: #202229;
  --sidebar-text: #f6f7f9;
  --sidebar-muted: #9da2ad;
  --green: #11845b;
  --blue: #3157d5;
  --shadow-sm: 0 1px 2px rgba(18, 23, 38, .05), 0 4px 12px rgba(18, 23, 38, .04);
  --shadow-md: 0 16px 40px rgba(18, 23, 38, .09);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --sidebar-width: 264px;
  --content-max: 1240px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

html[data-theme="dark"] {
  --bg: #101216;
  --surface: #17191e;
  --surface-2: #1d2026;
  --surface-3: #252932;
  --text: #f3f4f6;
  --muted: #a3a8b2;
  --muted-2: #777e8b;
  --line: #2b2f38;
  --line-strong: #3a3f49;
  --accent-soft: #3a211f;
  --ink: #f0f2f5;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .12);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.drawer-open, body.dialog-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { color: #111; background: #ffd0c9; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 42%, transparent); outline-offset: 2px; }

.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}

.icon { width: 19px; height: 19px; flex: 0 0 auto; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

/* Application shell */
.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}
.content-column { min-width: 0; }
.page-main { min-height: calc(100vh - 70px); }
.page-wrap {
  width: min(100% - 48px, var(--content-max));
  margin: 0 auto;
  padding: 34px 0 72px;
}

/* Sidebar */
.site-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 5%, rgba(255, 92, 77, .18), transparent 29%),
    linear-gradient(180deg, var(--sidebar), #13151a 100%);
  color: var(--sidebar-text);
  border-right: 1px solid rgba(255, 255, 255, .05);
}
.brand {
  height: 86px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 13px 13px 13px 4px;
  background: var(--accent);
  color: #fff;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.06em;
  box-shadow: 0 8px 24px rgba(255, 92, 77, .22);
}
.brand-name { display: block; font-size: 18px; line-height: 1.1; font-weight: 780; letter-spacing: -.02em; }
.brand-tagline { display: block; margin-top: 5px; color: var(--sidebar-muted); font-size: 10px; line-height: 1.15; letter-spacing: .055em; text-transform: uppercase; }
.side-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 18px;
  scrollbar-width: thin;
  scrollbar-color: #3b3e47 transparent;
}
.side-scroll::-webkit-scrollbar { width: 5px; }
.side-scroll::-webkit-scrollbar-thumb { border-radius: 5px; background: #3b3e47; }
.side-primary { display: grid; gap: 3px; }
.side-link, .category-link {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 11px;
  border-radius: 10px;
  color: #c8cbd2;
  font-size: 13.5px;
  font-weight: 580;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.side-link:hover, .category-link:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.side-link.active, .category-link.active {
  color: #fff;
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035);
}
.side-link.active .icon { color: var(--accent); }
.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 21px 10px 8px;
  color: #737985;
  font-size: 10px;
  line-height: 1;
  font-weight: 760;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.side-add {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 7px;
  color: #afb3bc;
  background: rgba(255, 255, 255, .06);
  transition: .2s ease;
}
.side-add:hover { color: #fff; background: var(--accent); }
.category-nav { display: grid; gap: 1px; }
.category-link { min-height: 32px; padding-block: 5px; font-size: 12.7px; font-weight: 520; }
.category-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--cat-color, #6b66ff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat-color) 17%, transparent); }
.category-count { margin-left: auto; color: #656b76; font-size: 10px; font-variant-numeric: tabular-nums; }
.side-bottom {
  padding: 13px 14px 15px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .08);
}
.side-bottom-row { display: flex; align-items: center; gap: 8px; }
.admin-shortcut {
  min-width: 0; flex: 1;
  display: flex; align-items: center; gap: 9px;
  padding: 8px 9px;
  border-radius: 9px;
  color: #aeb2bb;
  font-size: 11.5px;
  transition: .2s ease;
}
.admin-shortcut:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.side-icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 0; border-radius: 9px;
  color: #aeb2bb; background: rgba(255, 255, 255, .06);
  cursor: pointer;
}
.side-icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .12); }

/* Top bar */
.site-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.mobile-menu, .mobile-brand { display: none; }
.topbar-inner {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.today-line { min-width: 0; color: var(--muted); font-size: 12.5px; }
.today-line strong { margin-right: 7px; color: var(--text); font-weight: 700; }
.topbar-spacer { flex: 1; }
.top-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 640;
  cursor: pointer;
  transition: .18s ease;
}
.top-action:hover { color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.top-action kbd { margin-left: 6px; color: var(--muted-2); font: 10px var(--sans); }
.support-button, .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 15px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(255, 92, 77, .18);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.support-button:hover, .primary-button:hover { transform: translateY(-1px); background: var(--accent-dark); box-shadow: 0 10px 24px rgba(255, 92, 77, .24); }

/* Shared content */
.page-kicker, .card-kicker, .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.page-kicker::before, .eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 4px; background: currentColor; }
.page-title {
  margin: 8px 0 12px;
  max-width: 850px;
  font-size: clamp(36px, 4.7vw, 66px);
  line-height: .98;
  letter-spacing: -.052em;
  font-weight: 820;
}
.page-lead { max-width: 720px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.section-title { margin: 0; font-size: 23px; line-height: 1.15; letter-spacing: -.03em; font-weight: 790; }
.section-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; }
.section-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 670; }
.section-link:hover { color: var(--accent); }

/* Home */
.home-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}
.home-intro-copy { max-width: 790px; }
.home-intro .page-title { font-size: clamp(40px, 5vw, 68px); }
.home-note {
  width: 190px;
  flex: 0 0 auto;
  padding: 13px 0 3px 16px;
  color: var(--muted);
  border-left: 1px solid var(--line-strong);
  font-size: 11px;
  line-height: 1.5;
}
.home-note strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 13px; }
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 294px;
  gap: 26px;
  align-items: start;
}
.featured-card {
  min-height: 480px;
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #fff;
  background: #272833;
  box-shadow: var(--shadow-md);
  isolation: isolate;
}
.featured-copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 4.2vw, 52px);
  background: linear-gradient(90deg, rgba(18, 19, 25, .96) 0%, rgba(18, 19, 25, .88) 68%, rgba(18, 19, 25, .05) 100%);
}
.featured-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; color: rgba(255,255,255,.65); font-size: 11px; }
.featured-meta .category-pill { color: #fff; background: var(--cat-color, var(--accent)); }
.featured-title { margin: 0 0 15px; font-size: clamp(30px, 3.2vw, 47px); line-height: 1.03; letter-spacing: -.045em; font-weight: 800; }
.featured-title a:hover { color: #fff2ef; }
.featured-summary { max-width: 590px; margin: 0 0 23px; color: rgba(255,255,255,.73); font-size: 14px; line-height: 1.63; }
.read-more { display: inline-flex; align-items: center; gap: 9px; color: #fff; font-size: 12px; font-weight: 750; }
.read-more .arrow-circle { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); transition: transform .2s ease; }
.read-more:hover .arrow-circle { transform: translateX(4px); }
.featured-visual { position: absolute; z-index: 1; inset: 0 0 0 44%; overflow: hidden; }
.featured-visual .cover { height: 100%; border-radius: 0; }
.featured-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #22232c 0, transparent 58%); }

.cover {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 160px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--cover-a, #5751d8), var(--cover-b, #a59cff));
  isolation: isolate;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-art { width: 100%; height: 100%; min-height: inherit; }
.cover-noise {
  position: absolute; inset: 0; z-index: 1; opacity: .15; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.home-side { display: grid; gap: 18px; }
.side-panel { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.side-panel-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 15px; font-size: 15px; letter-spacing: -.02em; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.popular-list { display: grid; }
.popular-item { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 11px; padding: 13px 0; border-top: 1px solid var(--line); }
.popular-item:first-child { padding-top: 0; border-top: 0; }
.popular-index { color: var(--accent); font-size: 17px; line-height: 1.35; font-weight: 780; font-variant-numeric: tabular-nums; }
.popular-title { margin: 0; font-size: 12.5px; line-height: 1.38; font-weight: 680; }
.popular-title a:hover { color: var(--accent); }
.popular-meta { margin-top: 6px; color: var(--muted-2); font-size: 9.5px; }
.digest-panel { color: #fff; border: 0; background: linear-gradient(150deg, #5c41c7 0%, #7b5de0 60%, #9e7af2 100%); }
.digest-icon { width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 11px; background: rgba(255,255,255,.15); }
.digest-panel h3 { margin: 0 0 7px; font-size: 18px; line-height: 1.12; letter-spacing: -.02em; }
.digest-panel p { margin: 0 0 17px; color: rgba(255,255,255,.74); font-size: 11px; }
.digest-form { display: flex; gap: 7px; }
.digest-form input { min-width: 0; flex: 1; height: 38px; padding: 0 11px; color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; background: rgba(255,255,255,.12); outline: none; font-size: 11px; }
.digest-form input::placeholder { color: rgba(255,255,255,.56); }
.digest-form button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; color: #694bc9; background: #fff; cursor: pointer; }
.digest-caption { margin-top: 8px; color: rgba(255,255,255,.55); font-size: 8px; }

.content-section { margin-top: 46px; }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.article-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.article-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.article-card .cover { min-height: 182px; border-radius: 0; }
.article-card-body { flex: 1; display: flex; flex-direction: column; padding: 17px 18px 16px; }
.card-topline { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; color: var(--muted-2); font-size: 9.5px; }
.category-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 4px 8px; border-radius: 7px; color: var(--cat-color, var(--accent)); background: color-mix(in srgb, var(--cat-color, var(--accent)) 11%, var(--surface)); font-size: 9px; font-weight: 760; letter-spacing: .035em; }
.label-sponsored, .label-link { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 8px; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
.card-title { margin: 0 0 10px; font-size: 18px; line-height: 1.19; letter-spacing: -.027em; font-weight: 760; }
.card-title a:hover { color: var(--accent); }
.card-summary { margin: 0 0 17px; color: var(--muted); font-size: 11.5px; line-height: 1.52; }
.card-footer { margin-top: auto; display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-size: 9.5px; }
.card-footer .views { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.card-arrow { width: 27px; height: 27px; margin-left: auto; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: var(--surface-2); }

.ad-slot {
  position: relative;
  overflow: hidden;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 23px 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background:
    linear-gradient(115deg, transparent 0 70%, color-mix(in srgb, var(--accent) 5%, transparent) 70%),
    var(--surface-2);
}
.ad-badge { position: absolute; top: 9px; right: 11px; color: var(--muted-2); font-size: 7px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.ad-copy h3 { margin: 0 0 5px; color: var(--text); font-size: 15px; letter-spacing: -.02em; }
.ad-copy p { margin: 0; font-size: 10px; }
.ad-shape { flex: 0 0 auto; width: 130px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 30% 35%, #ffc7bf, #ff7b6f 48%, #675be2 49%, #3f35a4); filter: saturate(.8); opacity: .68; transform: rotate(-8deg); }

.topic-strip { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.topic-chip { min-height: 78px; display: flex; flex-direction: column; justify-content: space-between; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); transition: .2s ease; }
.topic-chip:hover { transform: translateY(-2px); border-color: var(--cat-color); }
.topic-chip-top { display: flex; align-items: center; justify-content: space-between; }
.topic-chip-name { font-size: 12px; font-weight: 700; }
.topic-chip-count { color: var(--muted-2); font-size: 9px; }
.topic-chip-line { width: 28px; height: 3px; border-radius: 4px; background: var(--cat-color); }

.partner-note { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 24px 28px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.partner-note small { display: block; margin-bottom: 6px; color: rgba(255,255,255,.48); font-size: 8px; font-weight: 740; letter-spacing: .1em; text-transform: uppercase; }
.partner-note h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.02em; }
.partner-note p { margin: 0; color: rgba(255,255,255,.62); font-size: 11px; }
.partner-note a { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-size: 11px; font-weight: 680; }

/* Category and search */
.category-hero {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  padding: 38px;
  margin-bottom: 30px;
  border-radius: var(--radius-lg);
  color: #fff;
  background: linear-gradient(135deg, #5548b8, #303746);
  background: linear-gradient(135deg, color-mix(in srgb, var(--cat-color) 74%, #20222a), color-mix(in srgb, var(--cat-soft) 70%, #292d37));
  isolation: isolate;
}
.category-hero::before { content: ""; position: absolute; width: 280px; height: 280px; top: -150px; right: 5%; border: 55px solid rgba(255,255,255,.1); border-radius: 50%; }
.category-hero::after { content: ""; position: absolute; width: 230px; height: 110px; right: -30px; bottom: -38px; border-radius: 50%; background: rgba(255,255,255,.09); transform: rotate(-15deg); }
.category-hero-copy { position: relative; z-index: 2; }
.category-hero .page-kicker { color: rgba(255,255,255,.72); }
.category-hero .page-title { margin-bottom: 10px; font-size: clamp(40px, 5.5vw, 72px); }
.category-hero p { max-width: 620px; margin: 0; color: rgba(255,255,255,.73); font-size: 13px; }
.content-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.filter-button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface); font-size: 10px; font-weight: 680; cursor: pointer; }
.filter-button.active { color: var(--text); border-color: var(--text); }
.toolbar-count { margin-left: auto; color: var(--muted-2); font-size: 10px; }
.article-list { display: grid; gap: 14px; }
.list-card { display: grid; grid-template-columns: 235px minmax(0,1fr); min-height: 178px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: .2s ease; }
.list-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.list-card .cover { height: 100%; min-height: 178px; border-radius: 0; }
.list-card-body { min-width: 0; display: flex; flex-direction: column; padding: 19px 21px 17px; }
.list-card-title { margin: 8px 0 8px; font-size: 22px; line-height: 1.12; letter-spacing: -.034em; }
.list-card-title a:hover { color: var(--accent); }
.list-card-summary { max-width: 700px; margin: 0 0 12px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.empty-state { padding: 70px 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.empty-state-icon { width: 56px; height: 56px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 18px; color: var(--accent); background: var(--accent-soft); }
.empty-state h2 { margin: 0 0 7px; font-size: 20px; }
.empty-state p { margin: 0 auto 20px; max-width: 480px; color: var(--muted); font-size: 12px; }
.load-more { min-height: 42px; width: 100%; margin-top: 18px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: var(--surface); font-size: 11px; font-weight: 700; cursor: pointer; }
.load-more:hover { color: var(--text); border-color: var(--line-strong); }
.search-heading { margin-bottom: 28px; }
.search-heading .page-title { font-size: clamp(34px, 4vw, 56px); }
.search-page-form { max-width: 780px; display: flex; gap: 9px; margin-top: 20px; }
.search-page-form input { flex: 1; min-width: 0; height: 48px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); background: var(--surface); outline: none; }
.search-page-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* Article page */
.article-shell { width: min(100% - 48px, 1080px); margin: 0 auto; padding: 34px 0 80px; }
.breadcrumbs { margin-bottom: 26px; color: var(--muted-2); font-size: 11px; }
.breadcrumbs ol { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li { min-width: 0; display: inline-flex; align-items: center; gap: 7px; }
.breadcrumbs li + li::before { content: "›"; color: var(--line-strong); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current="page"] { max-width: min(58vw, 560px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.article-header { max-width: 920px; margin: 0 auto 28px; text-align: center; }
.article-header-labels { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 17px; }
.article-title { margin: 0 0 19px; font-size: clamp(38px, 5.3vw, 70px); line-height: 1.01; letter-spacing: -.052em; font-weight: 820; }
.article-deck { max-width: 780px; margin: 0 auto 23px; color: var(--muted); font-family: var(--serif); font-size: clamp(17px, 2vw, 21px); line-height: 1.48; }
.article-byline { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; color: var(--muted-2); font-size: 10.5px; }
.author-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--ink); font-size: 10px; font-weight: 760; }
.byline-author { color: var(--text); font-weight: 680; }
.article-hero { height: min(53vw, 550px); margin: 0 0 34px; border-radius: var(--radius-lg); }
.article-hero.cover { min-height: 330px; }
.article-layout { display: grid; grid-template-columns: 58px minmax(0, 700px) 230px; justify-content: center; gap: 28px; align-items: start; }
.share-rail { position: sticky; top: 94px; display: grid; gap: 8px; }
.rail-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: var(--surface); cursor: pointer; }
.rail-button:hover, .rail-button.saved { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); }
.article-content { min-width: 0; color: color-mix(in srgb, var(--text) 90%, var(--muted)); font-family: var(--serif); font-size: 18px; line-height: 1.82; }
.article-content p { margin: 0 0 1.35em; }
.article-content h2 { margin: 2.1em 0 .65em; color: var(--text); font-family: var(--sans); font-size: 29px; line-height: 1.16; letter-spacing: -.035em; }
.article-content h3 { margin: 1.7em 0 .55em; color: var(--text); font-family: var(--sans); font-size: 22px; }
.article-content ul { margin: 0 0 1.5em; padding-left: 1.2em; }
.article-content li { margin-bottom: .45em; padding-left: .28em; }
.article-content li::marker { color: var(--accent); }
.article-content blockquote { margin: 1.8em 0; padding: 22px 26px; border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text); background: var(--surface-2); font-size: 21px; line-height: 1.5; font-style: italic; }
.article-content a { color: var(--blue); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--blue) 35%, transparent); text-underline-offset: 3px; }
.article-content .inline-ad { margin: 2em 0; font-family: var(--sans); }
.article-aside { position: sticky; top: 94px; display: grid; gap: 14px; }
.aside-card { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.aside-card h3 { margin: 0 0 10px; font-size: 13px; }
.aside-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.aside-card-support { color: #fff; border: 0; background: linear-gradient(145deg, #272a34, #353946); }
.aside-card-support p { color: rgba(255,255,255,.62); }
.aside-card-support a { margin-top: 13px; display: inline-flex; align-items: center; gap: 6px; color: #fff; font-size: 10px; font-weight: 720; }
.mini-related { display: grid; }
.mini-related-item { padding: 11px 0; border-top: 1px solid var(--line); }
.mini-related-item:first-child { padding-top: 0; border-top: 0; }
.mini-related-item a { font-size: 10.5px; line-height: 1.4; font-weight: 670; }
.mini-related-item a:hover { color: var(--accent); }
.article-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); font-family: var(--sans); }
.tag { display: inline-flex; padding: 5px 9px; border-radius: 8px; color: var(--muted); background: var(--surface-2); font-size: 9px; }
.article-end { max-width: 700px; margin: 38px auto 0; }
.article-disclosure { margin-bottom: 17px; color: var(--muted-2); font-size: 9px; }

.article-toc { margin: 0 0 30px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); font-family: var(--sans); }
.article-toc[hidden] { display: none; }
.article-toc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; color: var(--text); font-size: 14px; font-weight: 760; cursor: pointer; list-style: none; }
.article-toc summary::-webkit-details-marker { display: none; }
.article-toc summary::after { content: "+"; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); background: var(--surface-2); font-size: 17px; }
.article-toc[open] summary::after { content: "−"; }
.article-toc nav { padding: 0 18px 17px; border-top: 1px solid var(--line); }
.article-toc ol { margin: 13px 0 0; padding: 0; list-style: none; }
.article-toc li { margin: 0; padding: 0; border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent); }
.article-toc li:first-child { border-top: 0; }
.article-toc li.toc-level-3 { padding-left: 18px; }
.article-toc a { display: block; padding: 9px 0; color: var(--muted); text-decoration: none; font-size: 12px; line-height: 1.4; }
.article-toc a:hover { color: var(--accent); }
.article-prose h2, .article-prose h3 { scroll-margin-top: 92px; }

.article-sources { margin-top: 42px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); font-family: var(--sans); }
.article-content .article-sources h2 { margin: 0 0 14px; font-size: 21px; }
.article-sources ol { margin: 0; padding-left: 20px; }
.article-sources li { margin-bottom: 10px; padding-left: 4px; }
.article-sources li a { font-size: 13px; font-weight: 680; }
.article-sources li span { display: block; margin-top: 2px; color: var(--muted-2); font-size: 10px; }
.article-sources > p { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.article-trust-note { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; margin-top: 26px; padding: 17px 18px; border-left: 3px solid var(--cat-color); border-radius: 0 12px 12px 0; background: var(--surface-2); font-family: var(--sans); }
.article-trust-note strong { color: var(--text); font-size: 11px; }
.article-trust-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.article-facts dl { margin: 0; }
.article-facts dl div { padding: 9px 0; border-top: 1px solid var(--line); }
.article-facts dl div:first-child { border-top: 0; }
.article-facts dt { color: var(--muted-2); font-size: 9px; }
.article-facts dd { margin: 2px 0 0; color: var(--text); font-size: 10.5px; line-height: 1.4; }
.article-related { margin-top: 64px; padding-top: 34px; border-top: 1px solid var(--line); }
.article-related .section-head { margin-bottom: 20px; }
.article-related-grid .article-card { height: 100%; }

.privacy-contact-form { position: relative; margin: 25px 0 10px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); font-family: var(--sans); }
.privacy-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.privacy-contact-form p { margin: 0 0 15px; }
.privacy-contact-form label { display: block; margin-bottom: 6px; color: var(--text); font-size: 12px; font-weight: 680; }
.privacy-contact-form input[type="text"], .privacy-contact-form input[type="email"], .privacy-contact-form textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 11px; padding: 11px 12px; color: var(--text); background: var(--surface); outline: none; }
.privacy-contact-form input:focus, .privacy-contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.privacy-contact-form textarea { min-height: 150px; resize: vertical; }
.privacy-contact-form .privacy-consent label { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.5; }
.privacy-consent input { margin-top: 3px; }
.privacy-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.form-notice { margin: 20px 0; padding: 13px 15px; border-radius: 11px; font-family: var(--sans); font-size: 12px; }
.form-notice.success { color: #075c3f; background: #e3f7ef; }
.form-notice.error { color: #8b2e26; background: #ffebe8; }

/* Links directory */
.links-hero { display: grid; grid-template-columns: 1fr 270px; align-items: end; gap: 30px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.links-hero .page-title { font-size: clamp(40px, 5vw, 66px); }
.links-note { padding: 17px; border-radius: 14px; color: var(--muted); background: var(--surface); font-size: 10.5px; }
.links-note strong { display: block; margin-bottom: 5px; color: var(--text); }
.links-filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 22px 0; }
.link-directory { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.link-card { min-height: 190px; display: flex; flex-direction: column; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: .2s ease; }
.link-card:hover { transform: translateY(-2px); border-color: var(--cat-color); box-shadow: var(--shadow-md); }
.link-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 23px; }
.link-card-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--cat-color); background: color-mix(in srgb, var(--cat-color) 10%, var(--surface)); }
.link-card h2 { margin: 0 0 8px; font-size: 16px; line-height: 1.23; letter-spacing: -.02em; }
.link-card p { margin: 0 0 15px; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.link-card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted-2); font-size: 9px; }
.external-arrow { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 42px; align-items: start; }
.about-prose { max-width: 760px; }
.about-prose .page-title { margin-bottom: 25px; }
.about-prose > p { color: var(--muted); font-family: var(--serif); font-size: 19px; line-height: 1.72; }
.principles { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 30px; }
.principle { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.principle-index { display: block; margin-bottom: 20px; color: var(--accent); font-size: 11px; font-weight: 800; }
.principle h3 { margin: 0 0 7px; font-size: 15px; }
.principle p { margin: 0; color: var(--muted); font-size: 10.5px; }
.about-aside { position: sticky; top: 100px; display: grid; gap: 14px; }
.transparency-card { padding: 23px; border-radius: var(--radius); color: #fff; background: var(--ink); }
.transparency-card h2 { margin: 0 0 10px; font-size: 19px; }
.transparency-card p { margin: 0 0 14px; color: rgba(255,255,255,.64); font-size: 10.5px; }
.transparency-card ul { margin: 0; padding: 0; list-style: none; }
.transparency-card li { display: flex; gap: 8px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.09); color: rgba(255,255,255,.78); font-size: 10px; }
.transparency-card li::before { content: "✓"; color: #6bd8a8; }
.contact-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.contact-card h3 { margin: 0 0 5px; font-size: 14px; }
.contact-card p { margin: 0 0 13px; color: var(--muted); font-size: 10px; }
.contact-card a { color: var(--accent); font-size: 10.5px; font-weight: 700; }

/* Footer */
.site-footer { padding: 35px 0 22px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { width: min(100% - 48px, var(--content-max)); margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.2fr repeat(3, .7fr); gap: 35px; padding-bottom: 30px; }
.footer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; font-size: 16px; font-weight: 760; }
.footer-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px 10px 10px 3px; font-size: 20px; }
.footer-copy { max-width: 300px; margin: 0; color: var(--muted); font-size: 10.5px; }
.footer-column h3 { margin: 0 0 11px; color: var(--muted-2); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; }
.footer-column a { display: block; margin: 7px 0; color: var(--muted); font-size: 10.5px; }
.footer-column a:hover { color: var(--accent); }
.footer-bottom { display: flex; align-items: center; gap: 16px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 8.5px; }
.footer-bottom span:last-child { margin-left: auto; }

/* Search dialog */
.dialog-backdrop, .drawer-backdrop { position: fixed; inset: 0; z-index: 100; opacity: 0; pointer-events: none; background: rgba(12, 14, 18, .58); backdrop-filter: blur(6px); transition: opacity .2s ease; }
.search-dialog {
  position: fixed;
  z-index: 101;
  top: 9vh;
  left: 50%;
  width: min(92vw, 680px);
  max-height: 78vh;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0,0,0,.25);
  transition: opacity .2s ease, transform .2s ease;
}
.dialog-open .dialog-backdrop { opacity: 1; pointer-events: auto; }
.dialog-open .search-dialog { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.search-dialog-form { display: flex; align-items: center; gap: 12px; height: 66px; padding: 0 17px; border-bottom: 1px solid var(--line); }
.search-dialog-form input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 17px; }
.dialog-close { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; color: var(--muted); background: var(--surface-2); cursor: pointer; }
.search-results { max-height: calc(78vh - 66px); overflow-y: auto; padding: 10px; }
.quick-result { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 10px; border-radius: 11px; }
.quick-result:hover { background: var(--surface-2); }
.quick-result-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--cat-color), var(--cat-soft)); font-size: 14px; font-weight: 760; }
.quick-result h3 { margin: 0 0 3px; font-size: 12px; line-height: 1.3; }
.quick-result p { margin: 0; color: var(--muted-2); font-size: 9px; }
.quick-result .icon { color: var(--muted-2); }
.search-hint { padding: 24px; color: var(--muted); text-align: center; font-size: 11px; }

.toast-stack { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { min-width: 240px; max-width: 360px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: var(--surface); box-shadow: var(--shadow-md); font-size: 10.5px; animation: toast-in .25s ease both; }
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid #d93f4b; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Admin */
.admin-body { background: #f0f2f5; }
html[data-theme="dark"] .admin-body { background: var(--bg); }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0,1fr); }
.admin-nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 17px 13px; color: #f4f5f7; background: #17191e; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 4px 7px 18px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 15px; font-weight: 760; }
.admin-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px 10px 10px 3px; font-size: 20px; }
.admin-label { margin: 20px 9px 7px; color: #6f7480; font-size: 8px; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.admin-menu { display: grid; gap: 3px; }
.admin-menu-link { display: flex; align-items: center; gap: 10px; min-height: 39px; padding: 8px 10px; border-radius: 9px; color: #aeb2bc; font-size: 11.5px; font-weight: 590; cursor: pointer; }
.admin-menu-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.admin-menu-link.active { color: #fff; background: rgba(255,255,255,.11); }
.admin-menu-link.active .icon { color: var(--accent); }
.admin-nav-bottom { margin-top: auto; }
.admin-nav-bottom a { display: flex; align-items: center; gap: 8px; margin: 4px; padding: 9px; color: #969ba6; font-size: 10px; }
.admin-content { min-width: 0; }
.admin-topbar { height: 65px; display: flex; align-items: center; padding: 0 28px; border-bottom: 1px solid #e2e5e9; background: rgba(255,255,255,.88); backdrop-filter: blur(14px); }
html[data-theme="dark"] .admin-topbar { border-color: var(--line); background: color-mix(in srgb, var(--surface) 90%, transparent); }
.admin-mobile-menu { display: none; }
.admin-topbar-title { font-size: 13px; font-weight: 720; }
.admin-topbar-spacer { flex: 1; }
.admin-user { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; }
.admin-user-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: #2c3039; font-size: 9px; font-weight: 760; }
.admin-main { width: min(100% - 48px, 1280px); margin: 0 auto; padding: 28px 0 60px; }
.admin-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.admin-page-head h1 { margin: 0 0 5px; font-size: 26px; line-height: 1.1; letter-spacing: -.035em; }
.admin-page-head p { margin: 0; color: var(--muted); font-size: 10.5px; }
.admin-actions { display: flex; align-items: center; gap: 8px; }
.secondary-button, .danger-button, .ghost-button {
  min-height: 37px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--text); background: var(--surface); font-size: 10px; font-weight: 680; cursor: pointer;
}
.secondary-button:hover, .ghost-button:hover { border-color: var(--text); }
.danger-button { color: #c93742; border-color: #f0cdd0; background: #fff7f7; }
.ghost-button { color: var(--muted); background: transparent; }
.admin-notice { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; padding: 12px 14px; border: 1px solid #d9d1ff; border-radius: 11px; color: #5b5291; background: #f6f4ff; font-size: 9.5px; }
html[data-theme="dark"] .admin-notice { color: #c7bdff; border-color: #443c69; background: #242035; }
.admin-notice strong { color: inherit; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin-bottom: 22px; }
.stat-card { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.stat-card-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9.5px; }
.stat-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--stat-color, var(--accent)); background: color-mix(in srgb, var(--stat-color, var(--accent)) 10%, var(--surface)); }
.stat-value { display: block; margin: 16px 0 3px; font-size: 28px; line-height: 1; letter-spacing: -.04em; font-weight: 790; }
.stat-caption { color: var(--muted-2); font-size: 8.5px; }
.admin-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(280px,.75fr); gap: 17px; align-items: start; }
.admin-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.admin-panel-head { min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 17px; border-bottom: 1px solid var(--line); }
.admin-panel-head h2 { margin: 0; font-size: 13px; }
.admin-panel-head span { margin-left: auto; color: var(--muted-2); font-size: 9px; }
.admin-panel-body { padding: 17px; }
.recent-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.recent-row:first-child { padding-top: 0; border-top: 0; }
.recent-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--cat-color); background: color-mix(in srgb, var(--cat-color) 10%, var(--surface)); font-size: 10px; font-weight: 750; }
.recent-row h3 { margin: 0 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
.recent-row p { margin: 0; color: var(--muted-2); font-size: 8.5px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 7px; color: #167053; background: #eaf8f2; font-size: 8px; font-weight: 680; }
.status.draft { color: #87651a; background: #fff7df; }
.status::before { content:""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.quick-actions { display: grid; gap: 8px; }
.quick-action { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 10px; cursor: pointer; }
.quick-action:hover { color: var(--text); border-color: var(--line-strong); }
.quick-action .icon { color: var(--accent); }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th { padding: 10px 14px; text-align: left; color: var(--muted-2); background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 8px; font-weight: 730; letter-spacing: .04em; text-transform: uppercase; }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9.5px; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: color-mix(in srgb, var(--surface-2) 65%, transparent); }
.table-title { max-width: 390px; color: var(--text); font-size: 10.5px; font-weight: 670; }
.table-title small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 8px; font-weight: 400; }
.table-actions { display: flex; gap: 5px; justify-content: flex-end; }
.table-icon-button { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); cursor: pointer; }
.table-icon-button:hover { color: var(--text); border-color: var(--line-strong); }
.table-icon-button.delete:hover { color: #cf3844; border-color: #efc9cc; background: #fff8f8; }
.table-toolbar { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.table-search { position: relative; min-width: 220px; flex: 1; }
.table-search .icon { position: absolute; left: 10px; top: 50%; color: var(--muted-2); transform: translateY(-50%); }
.table-search input { width: 100%; height: 34px; padding: 0 11px 0 35px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface); outline: none; font-size: 9.5px; }
.table-search input:focus { border-color: var(--accent); }
.table-toolbar select { height: 34px; padding: 0 27px 0 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface); font-size: 9px; }

.editor-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 16px; align-items: start; }
.editor-main, .editor-side { display: grid; gap: 14px; }
.form-panel { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.form-panel h2 { margin: 0 0 14px; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-field { display: grid; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: var(--muted); font-size: 8.5px; font-weight: 690; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; min-width: 0;
  border: 1px solid var(--line-strong); border-radius: 9px;
  color: var(--text); background: var(--surface); outline: none; font-size: 10px;
}
.form-field input, .form-field select { height: 38px; padding: 0 10px; }
.form-field textarea { min-height: 90px; padding: 10px; resize: vertical; line-height: 1.55; }
.form-field textarea.article-editor { min-height: 420px; font-family: var(--serif); font-size: 13px; line-height: 1.7; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-help { color: var(--muted-2); font-size: 8px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 8px; padding: 9px 0; }
.checkbox-row input { accent-color: var(--accent); }
.checkbox-row label { color: var(--muted); font-size: 9.5px; }
.checkbox-row label strong { display: block; margin-bottom: 2px; color: var(--text); font-size: 10px; }
.editor-actions { position: sticky; bottom: 12px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px); box-shadow: var(--shadow-md); }
.category-manager { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(300px,.65fr); gap: 16px; align-items: start; }
.category-admin-list { padding: 5px 15px; }
.category-admin-row { display: grid; grid-template-columns: 28px 14px minmax(0,1fr) auto auto; gap: 10px; align-items: center; min-height: 49px; border-bottom: 1px solid var(--line); }
.category-admin-row:last-child { border-bottom: 0; }
.drag-handle { color: var(--muted-2); cursor: grab; }
.category-admin-name { font-size: 10.5px; font-weight: 670; }
.category-admin-slug { color: var(--muted-2); font-size: 8px; }
.category-visibility { color: var(--muted-2); font-size: 8px; }
.color-input { padding: 3px !important; cursor: pointer; }
.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border: 0; border-radius: 6px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; align-items: start; }
.monetization-map { display: grid; gap: 9px; }
.monetization-slot { display: grid; grid-template-columns: 50px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 10px; }
.slot-preview { height: 35px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 7px; color: var(--muted-2); background: var(--surface-2); font-size: 7px; }
.monetization-slot h3 { margin: 0 0 2px; font-size: 10px; }
.monetization-slot p { margin: 0; color: var(--muted-2); font-size: 8px; }
.toggle { width: 35px; height: 20px; position: relative; border: 0; border-radius: 20px; background: var(--line-strong); cursor: pointer; transition: .2s; }
.toggle::after { content:""; position:absolute; width: 14px; height: 14px; left:3px; top:3px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.2); transition:.2s; }
.toggle.on { background: var(--green); }
.toggle.on::after { transform: translateX(15px); }

/* Responsive */
@media (max-width: 1180px) {
  :root { --sidebar-width: 244px; }
  .article-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .topic-strip { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .article-layout { grid-template-columns: 48px minmax(0,680px); }
  .article-aside { display: none; }
}

@media (max-width: 960px) {
  .site-shell { display: block; }
  .site-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 110;
    width: min(280px, calc(100vw - 40px));
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    transform: translateX(-102%);
    transition: transform .22s ease;
    box-shadow: 25px 0 70px rgba(0,0,0,.25);
  }
  .side-scroll {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .drawer-backdrop { z-index: 90; }
  .drawer-open .site-sidebar { transform: translateX(0); }
  .drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
  .mobile-menu { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface); cursor: pointer; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 760; }
  .mobile-brand .brand-mark { width: 29px; height: 29px; border-radius: 9px 9px 9px 3px; font-size: 17px; }
  .today-line { display: none; }
  .home-grid { grid-template-columns: minmax(0,1fr); }
  .home-side { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-side .side-panel:first-child { grid-column: 1 / -1; }
  .popular-list { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 20px; }
  .popular-item:nth-child(2) { padding-top: 0; border-top: 0; }
  .featured-card { min-height: 440px; }
  .link-directory { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .about-grid { grid-template-columns: 1fr; }
  .about-aside { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-top { grid-template-columns: 1.4fr repeat(2,.8fr); }
  .footer-column:last-child { display: none; }

  .admin-shell { display: block; }
  .admin-nav { position: fixed; z-index: 100; width: 240px; left: 0; top: 0; transform: translateX(-103%); transition: transform .2s ease; box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  .admin-nav.open { transform: translateX(0); }
  .admin-mobile-menu { width: 36px; height: 36px; display: grid; place-items: center; margin-right: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .page-wrap { width: min(100% - 28px, var(--content-max)); padding: 24px 0 52px; }
  .site-topbar { height: 60px; padding: 0 14px; }
  .topbar-inner { gap: 9px; }
  .top-action span, .top-action kbd, .support-button span { display: none; }
  .top-action, .support-button { width: 38px; min-width: 38px; height: 38px; min-height: 38px; padding: 0; }
  .home-intro { display: block; }
  .home-note { width: auto; margin-top: 19px; padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .home-intro .page-title { font-size: 43px; }
  .featured-card { min-height: 520px; display: block; }
  .featured-copy { position: absolute; inset: 0; justify-content: flex-end; padding: 25px; background: linear-gradient(0deg, rgba(16,17,22,.97), rgba(16,17,22,.15) 82%); }
  .featured-visual { inset: 0; }
  .featured-visual::after { background: linear-gradient(0deg, #191a20, transparent 70%); }
  .featured-title { font-size: 31px; }
  .featured-summary { font-size: 12px; }
  .home-side { grid-template-columns: 1fr; }
  .home-side .side-panel:first-child { grid-column: auto; }
  .popular-list { grid-template-columns: 1fr; }
  .popular-item:nth-child(2) { padding-top: 13px; border-top: 1px solid var(--line); }
  .article-grid { grid-template-columns: 1fr; }
  .article-card { display: grid; grid-template-columns: 128px minmax(0,1fr); }
  .article-card .cover { height: 100%; min-height: 195px; }
  .article-card-body { padding: 14px; }
  .card-title { font-size: 16px; }
  .card-summary { display: none; }
  .topic-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ad-slot { min-height: 135px; padding: 24px 20px; }
  .ad-shape { display: none; }
  .partner-note { grid-template-columns: 1fr; }
  .category-hero { min-height: 220px; padding: 25px; }
  .category-hero .page-title { font-size: 44px; }
  .list-card { grid-template-columns: 120px minmax(0,1fr); min-height: 170px; }
  .list-card .cover { min-height: 170px; }
  .list-card-body { padding: 14px; }
  .list-card-title { font-size: 17px; }
  .list-card-summary { display: none; }
  .article-shell { width: min(100% - 28px, 1080px); padding-top: 24px; }
  .article-header { text-align: left; }
  .article-header-labels, .article-byline { justify-content: flex-start; }
  .article-title { font-size: 39px; }
  .article-deck { font-size: 17px; }
  .article-hero { height: 64vw; min-height: 250px !important; margin-bottom: 26px; }
  .article-layout { display: block; }
  .share-rail { position: static; display: flex; margin-bottom: 20px; }
  .article-content { font-size: 17px; line-height: 1.75; }
  .article-content h2 { font-size: 25px; }
  .article-toc { margin-bottom: 24px; }
  .article-toc summary { padding: 14px 15px; }
  .article-toc nav { padding-inline: 15px; }
  .article-sources { padding: 18px; }
  .article-trust-note { grid-template-columns: 1fr; gap: 4px; }
  .article-related { margin-top: 46px; padding-top: 28px; }
  .privacy-contact-form { padding: 18px; }
  .privacy-form-grid { grid-template-columns: 1fr; gap: 0; }
  .links-hero { grid-template-columns: 1fr; }
  .links-note { display: none; }
  .link-directory { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .about-aside { grid-template-columns: 1fr; }
  .footer-inner { width: min(100% - 28px, var(--content-max)); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-top > div:first-child { grid-column: 1 / -1; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .footer-bottom span:last-child { margin-left: 0; }

  .admin-main { width: min(100% - 28px, 1280px); padding-top: 20px; }
  .admin-topbar { height: 58px; padding: 0 14px; }
  .admin-page-head { align-items: stretch; flex-direction: column; }
  .admin-actions { flex-wrap: wrap; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-grid, .editor-layout, .category-manager, .settings-grid { grid-template-columns: 1fr; }
  .editor-actions { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .table-toolbar { flex-wrap: wrap; }
  .table-search { min-width: 100%; }
}

@media (max-width: 440px) {
  .mobile-brand span:last-child { display: none; }
  .home-intro .page-title { font-size: 38px; }
  .featured-card { min-height: 490px; }
  .featured-title { font-size: 28px; }
  .article-card { grid-template-columns: 105px minmax(0,1fr); }
  .article-card .cover { min-height: 180px; }
  .card-footer .views { display: none; }
  .list-card { grid-template-columns: 96px minmax(0,1fr); }
  .list-card-title { font-size: 15px; }
  .stats-grid { grid-template-columns: 1fr; }
  .category-admin-row { grid-template-columns: 20px 10px minmax(0,1fr) auto; }
  .category-visibility { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* WordPress integration */
.admin-bar .site-sidebar { top: 32px; height: calc(100vh - 32px); }
.admin-bar .site-topbar { top: 32px; }
.wp-site-blocks { min-height: 100vh; }
.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 { clip: auto !important; width: auto; height: auto; margin: 0; padding: 12px 16px; top: 8px; left: 8px; z-index: 10000; background: var(--surface); color: var(--text); border-radius: 8px; }
.current-menu-item > a, .current-cat > a { color: var(--text); }
.article-prose > *:first-child { margin-top: 0; }
.article-prose img { max-width: 100%; height: auto; border-radius: 18px; }
.article-prose .wp-caption { max-width: 100%; }
.article-prose blockquote { margin-inline: 0; }
.article-prose ul, .article-prose ol { padding-left: 1.4em; }
.article-prose a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 32px 0; }
.page-numbers { min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--text); }
.page-numbers.current { border-color: var(--accent); background: var(--accent); color: #fff; }
.wp-widget-group, .widget { color: var(--text); }
.widget-title { margin-top: 0; }
.widget-area:empty { display: none; }
.admin-shortcut { text-decoration: none; }
.brand-mark { flex: 0 0 auto; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.search-form-inline { display: flex; gap: 10px; width: min(720px, 100%); }
.search-form-inline input { flex: 1; min-width: 0; height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 15px; background: var(--surface); color: var(--text); }
.search-form-inline button { height: 48px; border: 0; border-radius: 12px; padding: 0 20px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.empty-state { padding: 44px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 20px; background: var(--surface); }
.empty-state h2 { margin: 0 0 10px; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.entry-tags a { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-muted); text-decoration: none; font-size: .85rem; }
.wp-admin-link { color: inherit; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column li + li { margin-top: 8px; }
.footer-column a { text-decoration: none; }
.ad-widget { overflow: hidden; }
.ad-widget .widget { margin: 0; }
.useful-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.useful-link-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.useful-link-card h2 { margin: 8px 0 10px; font-size: 1.2rem; }
.useful-link-card p { margin: 0 0 16px; color: var(--text-muted); line-height: 1.65; }
.useful-link-card .source { color: var(--text-soft); font-size: .82rem; }
.useful-link-card .external-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent-strong); text-decoration: none; }
.site-main { min-height: calc(100vh - 160px); }
.post-password-form input[type=password] { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.post-password-form input[type=submit] { border: 0; border-radius: 10px; padding: 11px 16px; background: var(--accent); color: #fff; }
@media (max-width: 782px) {
  .admin-bar .site-sidebar { top: 46px; height: calc(100vh - 46px); }
  .admin-bar .site-topbar { top: 46px; }
}
@media (max-width: 720px) {
  .useful-link-grid { grid-template-columns: 1fr; }
  .search-form-inline { flex-direction: column; }
  .search-form-inline button { width: 100%; }
}
