:root {
  --bg: #0a1221;
  --bg-soft: #101a2d;
  --panel: rgba(12, 20, 36, 0.9);
  --panel-strong: #111d33;
  --line: rgba(141, 174, 229, 0.16);
  --line-strong: rgba(141, 174, 229, 0.28);
  --text: #edf4ff;
  --muted: #9db0cf;
  --blue: #4e84ff;
  --blue-strong: #285fda;
  --gold: #eab95b;
  --green: #48c989;
  --red: #ff7a86;
  --shadow: 0 24px 80px rgba(3, 7, 18, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(78, 132, 255, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(234, 185, 91, 0.14), transparent 28%),
    linear-gradient(180deg, #09111f 0%, #0c1424 45%, #09111e 100%);
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 15px/1.6 "Trebuchet MS", Tahoma, Verdana, sans-serif;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  opacity: 0.34;
  background:
    linear-gradient(180deg, rgba(5, 10, 20, 0.36), rgba(5, 10, 20, 0.86)),
    linear-gradient(90deg, rgba(7, 12, 22, 0.8) 0%, rgba(7, 12, 22, 0.3) 46%, rgba(7, 12, 22, 0.82) 100%),
    url("/assets/police-hero.jpg") center 18% / cover no-repeat;
  transform: scale(1.08);
  filter: blur(5px) saturate(0.9);
}

body::after {
  z-index: -1;
  background:
    radial-gradient(circle at 14% 20%, rgba(78, 132, 255, 0.2), transparent 26%),
    radial-gradient(circle at 86% 12%, rgba(234, 185, 91, 0.12), transparent 18%),
    radial-gradient(circle at 50% 100%, rgba(78, 132, 255, 0.11), transparent 28%),
    linear-gradient(180deg, rgba(7, 12, 22, 0.16), rgba(7, 12, 22, 0.08));
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.police-shell {
  position: relative;
  width: min(1440px, calc(100% - 32px));
  margin: 20px auto;
  padding-bottom: 32px;
}

.police-shell::before {
  content: "";
  position: absolute;
  top: 84px;
  left: -110px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78, 132, 255, 0.18), transparent 68%);
  filter: blur(18px);
  pointer-events: none;
}

.police-shell::after {
  content: "";
  position: absolute;
  top: 220px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(234, 185, 91, 0.11), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
}

.police-topbar,
.hero-card,
.section-card,
.page-hero,
.article-shell,
.auth-card,
.admin-hero {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    linear-gradient(135deg, rgba(78, 132, 255, 0.04), transparent 32%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.police-topbar {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  margin-bottom: 18px;
}

.brand-stack {
  display: grid;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-badge-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  padding: 4px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 20%, rgba(234, 185, 91, 0.18), transparent 52%),
    linear-gradient(135deg, rgba(78, 132, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(10, 18, 33, 0.78);
  border: 1px solid rgba(141, 174, 229, 0.16);
  box-shadow: 0 16px 34px rgba(2, 6, 16, 0.24);
}

.brand-badge {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.35));
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(78, 132, 255, 0.18), rgba(234, 185, 91, 0.1)),
    #13213b;
  border: 1px solid rgba(78, 132, 255, 0.35);
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.12em;
  position: relative;
  overflow: hidden;
}

.brand-mark em,
.category-mark em {
  position: absolute;
  right: 8px;
  bottom: 6px;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
}

.brand-icon,
.category-icon,
.tag-icon,
.button-icon,
.stat-icon,
.hero-mini-icon {
  flex: 0 0 auto;
}

.brand-icon {
  width: 26px;
  height: 26px;
}

.brand-copy {
  display: grid;
}

.brand-copy strong {
  font-size: 18px;
}

.brand-copy small,
.main-nav a,
.topic-meta span,
.category-meta,
.article-facts span,
.timeline-item span,
.timeline-item small,
.admin-row span,
.portal-footer,
.eyebrow,
.section-kicker,
.notice,
.empty-inline,
.format-help p {
  color: var(--muted);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.main-nav a {
  padding: 8px 10px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input,
.editor-form input[type="text"],
.editor-form input[type="number"],
.editor-form input[type="password"],
.editor-form select,
.editor-form textarea,
.admin-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(4, 10, 20, 0.56);
  color: var(--text);
}

.editor-form textarea {
  min-height: 120px;
  padding: 14px;
  resize: vertical;
}

.editor-textarea {
  min-height: 360px;
}

.button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.button:hover,
.button-link:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--blue) 0%, #315dd7 100%);
  color: #fff;
}

.button-primary,
.button-ghost {
  gap: 8px;
}

.button-icon {
  width: 18px;
  height: 18px;
}

.button-ghost,
.button-link {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--text);
}

.button-link {
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

.notice-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.notice {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(9, 15, 28, 0.9);
}

.notice-success {
  border-color: rgba(72, 201, 137, 0.32);
  color: #c9f2dc;
}

.notice-error {
  border-color: rgba(255, 122, 134, 0.32);
  color: #ffd8dc;
}

.hero-card,
.page-hero,
.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 24px;
  padding: 28px;
  margin-bottom: 18px;
  overflow: hidden;
}

.page-hero {
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
}

.hero-card::after,
.admin-hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(78, 132, 255, 0.06) 100%);
  pointer-events: none;
}

.hero-card,
.page-hero,
.admin-hero,
.article-shell {
  position: relative;
}

.eyebrow,
.section-kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  margin-bottom: 10px;
}

.hero-card h1,
.page-hero h1,
.article-hero h1,
.auth-card h1,
.admin-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
}

.hero-card p,
.page-hero p,
.auth-card p,
.admin-hero p,
.article-hero p {
  margin: 0;
  max-width: 760px;
  color: #cdd9ef;
}

.hero-actions,
.admin-hero-actions,
.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-stats {
  display: grid;
  gap: 12px;
}

.hero-side {
  display: grid;
  gap: 12px;
}

.hero-visual {
  position: relative;
  min-height: 246px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(78, 132, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(6, 11, 20, 0.18), rgba(6, 11, 20, 0.76)),
    url("/assets/police-hero.jpg") center 34% / cover no-repeat;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mix-blend-mode: screen;
  opacity: 0.18;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(78, 132, 255, 0.12), transparent 42%),
    linear-gradient(0deg, rgba(7, 12, 22, 0.72), rgba(7, 12, 22, 0.06));
}

.hero-visual-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.hero-visual-copy span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(8, 15, 28, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #dbe7ff;
  font-size: 12px;
  font-weight: 700;
}

.hero-visual-copy strong {
  display: block;
  font-size: 24px;
  line-height: 1.15;
}

.hero-mini-icon {
  width: 16px;
  height: 16px;
}

.stat-tile {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(78, 132, 255, 0.2);
  background: rgba(12, 20, 36, 0.72);
  position: relative;
  overflow: hidden;
}

.stat-tile strong {
  display: block;
  font-size: 28px;
  margin-bottom: 6px;
}

.stat-icon-wrap {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(78, 132, 255, 0.12);
  border: 1px solid rgba(78, 132, 255, 0.22);
}

.stat-icon {
  width: 18px;
  height: 18px;
  color: #d8e5ff;
}

.content-grid,
.admin-grid,
.editor-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.section-card,
.article-shell,
.auth-card {
  padding: 24px;
}

.section-card,
.article-shell {
  position: relative;
  overflow: hidden;
}

.section-card::before,
.article-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(78, 132, 255, 0.05), transparent 24%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: auto, 28px 28px;
  pointer-events: none;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 26px;
}

.category-grid,
.topic-list,
.timeline-list,
.clean-list,
.admin-table,
.format-help,
.revision-list {
  display: grid;
  gap: 14px;
}

.category-card,
.topic-card,
.timeline-item,
.admin-row,
.revision-item {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(7, 13, 24, 0.72);
}

.category-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  gap: 12px;
  padding: 18px;
  min-height: 220px;
  border-color: color-mix(in srgb, var(--category-accent) 24%, rgba(141, 174, 229, 0.18));
}

.category-card::before,
.category-card::after,
.category-page-hero::before,
.category-page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.category-card::before,
.category-page-hero::before {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(6, 12, 24, 0.1), rgba(6, 12, 24, 0.2)),
    var(--cover-image, linear-gradient(180deg, transparent, transparent));
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.42;
  transform: scale(1.03);
  filter: saturate(0.95) contrast(1.04);
}

.category-card::after,
.category-page-hero::after {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5, 10, 18, 0.26) 0%, rgba(5, 10, 18, 0.84) 86%),
    linear-gradient(135deg, color-mix(in srgb, var(--category-accent, var(--blue)) 18%, transparent), transparent 58%);
}

.category-card:hover,
.topic-card:hover,
.timeline-item:hover {
  border-color: rgba(78, 132, 255, 0.34);
}

.category-mark {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--category-accent, var(--blue)) 30%, transparent), rgba(255, 255, 255, 0.06));
  border: 1px solid color-mix(in srgb, var(--category-accent, var(--blue)) 44%, rgba(141, 174, 229, 0.18));
  font-weight: 800;
  letter-spacing: 0.08em;
  position: relative;
  overflow: hidden;
}

.category-icon {
  width: 24px;
  height: 24px;
}

.category-card h3,
.category-card p,
.category-card .category-meta {
  position: relative;
  z-index: 1;
}

.topic-card {
  padding: 18px;
}

.topic-card h3,
.revision-item strong,
.admin-row strong {
  margin: 0;
  font-size: 22px;
}

.topic-card p {
  margin: 10px 0 0;
  color: #c7d3ea;
}

.topic-card-top,
.topic-meta,
.admin-row-meta,
.article-meta-bar,
.article-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.topic-card-top {
  justify-content: space-between;
  margin-bottom: 10px;
}

.topic-meta {
  justify-content: space-between;
  margin-top: 14px;
}

.topic-meta a,
.timeline-item strong,
.admin-row-meta a,
.article-admin-bar a {
  color: #dbe7ff;
}

.topic-tag,
.topic-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.topic-tag {
  background: color-mix(in srgb, var(--topic-accent, var(--blue)) 18%, rgba(255, 255, 255, 0.02));
  border: 1px solid color-mix(in srgb, var(--topic-accent, var(--blue)) 36%, rgba(255, 255, 255, 0.12));
  gap: 8px;
}

.tag-icon {
  width: 14px;
  height: 14px;
}

.topic-pill {
  background: rgba(234, 185, 91, 0.12);
  border: 1px solid rgba(234, 185, 91, 0.24);
  color: #ffdd9d;
}

.badge-public {
  background: rgba(72, 201, 137, 0.12);
  border: 1px solid rgba(72, 201, 137, 0.28);
  color: #c8f6dd;
}

.badge-hidden {
  background: rgba(255, 122, 134, 0.12);
  border: 1px solid rgba(255, 122, 134, 0.24);
  color: #ffd3d8;
}

.badge-draft {
  background: rgba(141, 174, 229, 0.12);
  border: 1px solid rgba(141, 174, 229, 0.24);
  color: #dfe8fa;
}

.compact-card {
  align-self: start;
}

.timeline-item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
}

.timeline-item strong {
  font-size: 17px;
}

.clean-list {
  padding-left: 18px;
}

.clean-list li {
  color: #d4dded;
}

.empty-state,
.auth-wrap {
  display: grid;
  place-items: center;
  min-height: 60vh;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
}

.empty-state h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

.empty-inline {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: rgba(8, 13, 24, 0.55);
}

.auth-card {
  width: min(520px, 100%);
}

.admin-form,
.editor-form {
  display: grid;
  gap: 16px;
}

.admin-form label,
.editor-form label {
  display: grid;
  gap: 8px;
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.checkbox-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 10, 20, 0.56);
}

.check-row input {
  width: 18px;
  height: 18px;
}

.admin-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
}

.admin-row > div:first-child {
  display: grid;
  gap: 5px;
}

.admin-row-meta {
  justify-content: flex-end;
}

.article-shell {
  padding: 28px;
}

.category-page-hero {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  align-items: center;
}

.article-media {
  display: grid;
  gap: 16px;
  padding-top: 24px;
}

.gallery-card img,
.media-thumb img {
  display: block;
  width: 100%;
  height: 100%;
}

.topic-gallery,
.media-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.gallery-card,
.media-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(141, 174, 229, 0.18);
  background: rgba(7, 13, 24, 0.78);
  min-height: 160px;
  box-shadow: 0 10px 28px rgba(2, 6, 16, 0.22);
}

.gallery-card::after,
.media-thumb::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 64px;
  background: linear-gradient(180deg, rgba(5, 10, 18, 0), rgba(5, 10, 18, 0.74));
  pointer-events: none;
}

.gallery-card img,
.media-thumb img {
  object-fit: cover;
}

.gallery-card:hover {
  border-color: rgba(78, 132, 255, 0.34);
  transform: translateY(-1px);
}

.media-editor {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(141, 174, 229, 0.16);
  border-radius: 20px;
  background: rgba(6, 12, 24, 0.52);
}

.media-editor-head {
  display: grid;
  gap: 4px;
}

.media-editor-head strong {
  font-size: 18px;
}

.media-editor-head span,
.media-thumb-meta em {
  color: var(--muted);
  font-style: normal;
}

.media-thumb {
  min-height: 180px;
}

.media-thumb-wide {
  grid-column: 1 / -1;
  min-height: 240px;
}

.media-thumb-meta {
  position: absolute;
  inset: auto 12px 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(6, 12, 24, 0.82);
  border: 1px solid rgba(141, 174, 229, 0.18);
}

.media-thumb-meta input {
  width: 16px;
  height: 16px;
}

.article-hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(141, 174, 229, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
    rgba(8, 14, 26, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.article-hero > * {
  position: relative;
  z-index: 1;
}

.article-hero-cover::before,
.article-hero-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.article-hero-cover::before {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(6, 12, 24, 0.08), rgba(6, 12, 24, 0.18)),
    var(--cover-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.48;
  transform: scale(1.04);
  filter: saturate(0.92) contrast(1.06) blur(1px);
}

.article-hero-cover::after {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(5, 10, 18, 0.16) 0%, rgba(5, 10, 18, 0.62) 52%, rgba(5, 10, 18, 0.92) 100%),
    linear-gradient(135deg, color-mix(in srgb, var(--topic-accent, var(--blue)) 18%, transparent), transparent 48%);
}

.article-hero-cover h1,
.article-hero-cover p {
  max-width: 860px;
}

.article-hero-cover .article-facts span {
  color: #d7e3f8;
}

.article-body {
  padding-top: 24px;
  color: #dce5f7;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  margin: 28px 0 10px;
  line-height: 1.2;
  scroll-margin-top: 104px;
}

.article-body h2 {
  font-size: 28px;
}

.article-body h3 {
  font-size: 20px;
}

.article-body h4 {
  font-size: 17px;
  color: #dbe6fb;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote {
  margin: 0 0 16px;
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
}

.article-body blockquote {
  padding: 14px 16px;
  border-left: 4px solid var(--blue);
  border-radius: 0 14px 14px 0;
  background: rgba(78, 132, 255, 0.08);
}

.article-body code,
.format-help code {
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(78, 132, 255, 0.12);
  color: #dce7ff;
}

.article-content-grid {
  display: block;
}

.article-content-grid-docs {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.docs-sidebar {
  position: relative;
  padding-top: 24px;
  order: -1;
}

.docs-sidebar-box {
  position: sticky;
  top: 110px;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(141, 174, 229, 0.16);
  border-radius: 20px;
  background: rgba(7, 13, 24, 0.72);
  box-shadow: 0 14px 36px rgba(2, 6, 16, 0.16);
}

.docs-sidebar-box h3 {
  margin: 0;
  font-size: 20px;
}

.docs-nav {
  display: grid;
  gap: 6px;
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 144, 255, 0.72) rgba(255, 255, 255, 0.04);
}

.docs-nav::-webkit-scrollbar {
  width: 10px;
}

.docs-nav::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.docs-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid rgba(7, 13, 24, 0.72);
  background: linear-gradient(180deg, rgba(124, 144, 255, 0.95), rgba(78, 132, 255, 0.7));
}

.docs-nav::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(140, 160, 255, 1), rgba(90, 146, 255, 0.82));
}

.docs-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #dbe7ff;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.docs-link:hover {
  transform: translateX(1px);
  border-color: rgba(78, 132, 255, 0.22);
  background: rgba(78, 132, 255, 0.08);
}

.docs-link.level-3 {
  margin-left: 10px;
  font-size: 14px;
  color: #c7d4eb;
}

.docs-link.level-4 {
  margin-left: 20px;
  font-size: 13px;
  color: #b8c8e2;
}

.article-admin-bar {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.format-help p {
  margin: 0;
}

.revision-list h3 {
  margin: 20px 0 12px;
  font-size: 20px;
}

.revision-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.portal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 8px 0;
}

@media (max-width: 1100px) {
  .police-topbar,
  .hero-card,
  .page-hero,
  .admin-hero,
  .content-grid,
  .admin-grid,
  .editor-shell {
    grid-template-columns: 1fr;
  }

  .police-topbar {
    position: static;
  }

  .topbar-actions,
  .search-form {
    width: 100%;
    flex-wrap: wrap;
  }

  body::before {
    opacity: 0.26;
    background-position: center 24%;
  }
}

@media (max-width: 760px) {
  .police-shell {
    width: min(100% - 18px, 100%);
    margin: 10px auto;
  }

  .police-topbar,
  .hero-card,
  .page-hero,
  .section-card,
  .article-shell,
  .auth-card,
  .admin-hero {
    border-radius: 20px;
  }

  .editor-grid,
  .checkbox-grid,
  .admin-row {
    grid-template-columns: 1fr;
  }

  .admin-row {
    flex-direction: column;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .hero-card h1,
  .page-hero h1,
  .article-hero h1,
  .auth-card h1,
  .admin-hero h1 {
    font-size: 30px;
  }

  .section-head h2 {
    font-size: 23px;
  }

  .topic-card h3 {
    font-size: 19px;
  }

  .topic-gallery,
  .media-preview-grid {
    grid-template-columns: 1fr;
  }

  .article-content-grid-docs {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    padding-top: 0;
  }

  .docs-sidebar-box {
    position: static;
  }

  .media-thumb-wide {
    min-height: 0;
  }
}
