:root {
  color-scheme: light;
  --bg: #f2f2f4;
  --bg-soft: #eaeaed;
  --surface: #ffffff;
  --surface-soft: #f7f7f8;
  --surface-strong: #ececef;
  --text: #111114;
  --text-soft: #5e616b;
  --text-faint: #9296a1;
  --border: #e1e2e6;
  --border-strong: #cfd1d7;
  --shadow: 0 14px 36px rgba(18, 18, 24, 0.07);
  --shadow-soft: 0 8px 24px rgba(18, 18, 24, 0.045);
  --violet: #7c3aed;
  --violet-soft: #eee8ff;
  --orange: #f97316;
  --blue: #3b82f6;
  --green: #16a34a;
  --red: #ef4444;
  --header: rgba(255, 255, 255, 0.92);
  --sidebar: #f6f6f7;
  --focus: rgba(124, 58, 237, 0.24);
  --topbar-h: 70px;
  --sidebar-w: 254px;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d10;
  --bg-soft: #16161b;
  --surface: #151519;
  --surface-soft: #1b1b21;
  --surface-strong: #222229;
  --text: #f5f5f7;
  --text-soft: #adaeb7;
  --text-faint: #757780;
  --border: #292930;
  --border-strong: #3a3a43;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.18);
  --violet: #9b72ff;
  --violet-soft: #29213e;
  --header: rgba(13, 13, 16, 0.91);
  --sidebar: #111115;
  --focus: rgba(155, 114, 255, 0.32);
}

html.sidebar-collapsed {
  --sidebar-w: 82px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 72% -18%, rgba(124, 58, 237, .08), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

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

img {
  display: block;
  max-width: 100%;
}

svg {
  display: block;
}

::selection {
  background: var(--violet);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

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

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon.fill {
  fill: currentColor;
}

.icon-button {
  position: relative;
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: transform .22s var(--ease), color .22s ease, background .22s ease, border-color .22s ease;
}

.icon-button:hover {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--text);
  transform: translateY(-1px);
}

.icon-button:active {
  transform: scale(.96);
}

.topbar {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  height: var(--topbar-h);
  grid-template-columns: var(--sidebar-w) minmax(260px, 560px) 1fr;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--header);
  backdrop-filter: blur(18px) saturate(1.25);
  transition: grid-template-columns .38s var(--ease);
}

.topbar-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.brand-link {
  display: inline-flex;
  max-width: 142px;
  align-items: center;
  color: var(--text);
  overflow: hidden;
  transition: max-width .34s var(--ease), opacity .2s ease, transform .34s var(--ease);
}

.brand-link img {
  width: 142px;
  height: auto;
}

.search {
  position: relative;
  display: flex;
  height: 44px;
  align-items: center;
}

.search .icon {
  position: absolute;
  left: 15px;
  width: 18px;
  color: var(--text-faint);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: 0;
  background: var(--surface);
  padding: 0 44px;
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.search input::placeholder {
  color: var(--text-faint);
}

.search input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px var(--focus);
}

.search-shortcut {
  position: absolute;
  right: 11px;
  display: inline-grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--text-faint);
  font-size: 12px;
  pointer-events: none;
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.auth-button {
  display: inline-flex;
  height: 42px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  padding: 0 15px;
  color: var(--text);
  font-weight: 650;
  cursor: pointer;
  transition: transform .22s var(--ease), border-color .22s ease, box-shadow .22s ease;
}

.auth-button:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.auth-button .avatar {
  margin-left: -7px;
}

.sidebar {
  position: fixed;
  z-index: 60;
  top: var(--topbar-h);
  bottom: 0;
  left: 0;
  width: var(--sidebar-w);
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--sidebar);
  padding: 20px 14px 28px;
  scrollbar-width: thin;
  transition: width .38s var(--ease), padding .38s var(--ease), transform .34s var(--ease);
}

.nav-section {
  display: grid;
  gap: 4px;
}

.nav-section + .nav-section {
  margin-top: 19px;
  padding-top: 19px;
  border-top: 1px solid var(--border);
}

.nav-label {
  padding: 0 13px 7px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 13px;
  border-radius: 13px;
  padding: 0 13px;
  color: var(--text-soft);
  font-weight: 560;
  transition: color .2s ease, background .2s ease, transform .2s var(--ease);
}

.nav-link > span {
  overflow: hidden;
  max-width: 175px;
  opacity: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: max-width .34s var(--ease), opacity .18s ease;
}

.nav-link:hover {
  background: var(--surface);
  color: var(--text);
  transform: translateX(2px);
}

.nav-link.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 0 var(--border), var(--shadow-soft);
}

.nav-link.active::before {
  position: absolute;
  left: 0;
  width: 3px;
  height: 20px;
  border-radius: 0 4px 4px 0;
  background: var(--violet);
  content: "";
}

.nav-link.accent-orange .icon { color: var(--orange); }
.nav-link.accent-blue .icon { color: var(--blue); }
.nav-link.accent-violet .icon { color: var(--violet); }
.nav-link.accent-green .icon { color: var(--green); }

.sidebar-foot {
  margin-top: 23px;
  padding: 16px 13px 0;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 12px;
}

.page-shell {
  min-height: 100vh;
  margin-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
  transition: margin-left .38s var(--ease);
}

html.sidebar-collapsed .topbar-brand {
  gap: 0;
}

html.sidebar-collapsed .brand-link {
  max-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-12px);
}

html.sidebar-collapsed .menu-toggle .icon {
  transform: rotate(180deg);
}

.menu-toggle .icon {
  transition: transform .38s var(--ease);
}

.menu-toggle.is-open {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--violet);
}

.menu-toggle.is-open .icon {
  transform: rotate(90deg) scale(.88);
}

html.sidebar-collapsed .sidebar {
  padding-right: 12px;
  padding-left: 12px;
}

html.sidebar-collapsed .sidebar .nav-link {
  justify-content: center;
  gap: 0;
  padding-right: 0;
  padding-left: 0;
}

html.sidebar-collapsed .sidebar .nav-link:hover {
  transform: translateY(-1px);
}

html.sidebar-collapsed .sidebar .nav-link > span {
  max-width: 0;
  opacity: 0;
}

html.sidebar-collapsed .sidebar .nav-label,
html.sidebar-collapsed .sidebar-foot {
  height: 0;
  margin: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  opacity: 0;
}

.page-content {
  width: min(100%, 1360px);
  margin: 0 auto;
  padding: 24px 30px 72px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(520px, 760px) 320px;
  justify-content: center;
  gap: 28px;
}

.main-column,
.right-rail {
  min-width: 0;
}

.main-column {
  display: grid;
  align-content: start;
  gap: 18px;
}

.right-rail {
  display: grid;
  align-content: start;
  gap: 18px;
}

.panel,
.news-card,
.detail-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.panel-heading {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
}

.panel-heading h2,
.panel-heading h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -.01em;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--violet);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 2px;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.page-heading p {
  margin: 8px 0 0;
  color: var(--text-soft);
}

.daily-card {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(112deg, var(--surface) 0%, var(--surface) 58%, transparent 58%),
    url("/assets/images/violet-nexus.webp") 82% 47% / 52% auto no-repeat,
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.daily-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 50%, rgba(124, 58, 237, .13));
  content: "";
  pointer-events: none;
}

.daily-content {
  position: relative;
  z-index: 1;
  width: 63%;
  padding: 19px 20px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.eyebrow .dot,
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
}

.daily-content h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.18;
  letter-spacing: -.025em;
}

.daily-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  color: var(--violet);
  font-size: 13px;
  font-weight: 720;
}

.daily-link .icon {
  width: 15px;
  height: 15px;
  transition: transform .2s var(--ease);
}

.daily-link:hover .icon {
  transform: translateX(3px);
}

.news-card {
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s ease, border-color .3s ease;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.news-card[data-accent="orange"]:hover { border-color: rgba(249, 115, 22, .65); }
.news-card[data-accent="blue"]:hover { border-color: rgba(59, 130, 246, .65); }
.news-card[data-accent="violet"]:hover { border-color: rgba(124, 58, 237, .65); }
.news-card[data-accent="green"]:hover { border-color: rgba(22, 163, 74, .65); }
.news-card[data-accent="red"]:hover { border-color: rgba(239, 68, 68, .65); }

.news-meta {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 18px;
}

.author {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  background: linear-gradient(135deg, #1f2937, #8b5cf6);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.avatar.orange { background: linear-gradient(135deg, #7c2d12, #f97316); }
.avatar.blue { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.avatar.green { background: linear-gradient(135deg, #14532d, #22c55e); }
.avatar.red { background: linear-gradient(135deg, #7f1d1d, #ef4444); }
.avatar.lg { width: 58px; height: 58px; flex-basis: 58px; font-size: 18px; }
.avatar.xl { width: 84px; height: 84px; flex-basis: 84px; font-size: 25px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.author-copy {
  min-width: 0;
}

.author-name {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 730;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-time {
  color: var(--text-faint);
  font-size: 12px;
}

.category-pill {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface-soft);
  padding: 3px 9px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 720;
}

.category-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pill, var(--violet));
  content: "";
}

.news-title {
  margin: 0;
  padding: 0 18px 15px;
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.18;
  letter-spacing: -.035em;
}

.news-title a {
  transition: color .2s ease;
}

.news-title a:hover {
  color: var(--violet);
}

.news-image-link {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 8.7;
  background: #0b0b0f;
}

.news-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .65s var(--ease), filter .3s ease;
}

.news-card:hover .news-image {
  transform: scale(1.018);
}

.news-excerpt {
  margin: 0;
  padding: 17px 20px 4px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.68;
}

.news-footer {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 13px 10px;
}

.reaction-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.reaction-button {
  display: inline-flex;
  height: 38px;
  align-items: center;
  gap: 7px;
  border-radius: 11px;
  background: transparent;
  padding: 0 9px;
  color: var(--text-soft);
  cursor: pointer;
  transition: color .2s ease, background .2s ease, transform .2s var(--ease);
}

.reaction-button:hover {
  background: var(--surface-soft);
  color: var(--text);
  transform: translateY(-1px);
}

.reaction-button.active.like {
  background: rgba(22, 163, 74, .11);
  color: var(--green);
}

.reaction-button.active.dislike {
  background: rgba(239, 68, 68, .1);
  color: var(--red);
}

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

.reaction-count {
  min-width: 12px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  transition: color .2s ease, background .2s ease;
}

.read-link:hover {
  background: var(--surface-soft);
  color: var(--violet);
}

.read-link .icon {
  width: 16px;
  height: 16px;
}

.feature-tile {
  position: relative;
  display: flex;
  min-height: 258px;
  overflow: hidden;
  align-items: flex-end;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: #111;
}

.feature-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}

.feature-tile:hover img {
  transform: scale(1.04);
}

.feature-tile::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .02) 15%, rgba(0, 0, 0, .82) 100%);
  content: "";
}

.feature-content {
  position: relative;
  z-index: 1;
  padding: 19px;
  color: #fff;
}

.feature-content h3 {
  margin: 7px 0 0;
  font-size: 22px;
  line-height: 1.16;
  letter-spacing: -.03em;
}

.feature-content .category-pill {
  border-color: rgba(255, 255, 255, .22);
  background: rgba(10, 10, 12, .55);
  color: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
}

.compact-list {
  display: grid;
}

.compact-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--border);
  transition: background .2s ease;
}

.compact-item:last-child {
  border-bottom: 0;
}

.compact-item:hover {
  background: var(--surface-soft);
}

.compact-item h4 {
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.34;
}

.compact-item .meta-time {
  padding-top: 3px;
  white-space: nowrap;
}

.rail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  color: var(--text-faint);
  font-size: 11px;
}

.rail-stat {
  display: flex;
  align-items: center;
  gap: 5px;
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 30px;
  text-align: center;
}

.empty-state .icon {
  width: 34px;
  height: 34px;
  margin: 0 auto 12px;
  color: var(--text-faint);
}

.empty-state h3 {
  margin: 0 0 6px;
}

.empty-state p {
  max-width: 380px;
  margin: 0;
  color: var(--text-soft);
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 0 16px;
  color: var(--text);
  font-weight: 720;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.button:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.button:active {
  transform: scale(.98);
}

.button.primary {
  border-color: var(--violet);
  background: var(--violet);
  color: #fff;
}

.button.primary:hover {
  filter: brightness(1.08);
}

.button.danger {
  border-color: rgba(239, 68, 68, .3);
  background: rgba(239, 68, 68, .08);
  color: var(--red);
}

.button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-soft);
}

.button.small {
  min-height: 35px;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 12px;
}

.button .icon {
  width: 17px;
  height: 17px;
}

.button:disabled,
.reaction-button:disabled {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
}

.detail-card {
  overflow: hidden;
}

.detail-hero {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: #09090b;
}

.detail-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05) 10%, rgba(0, 0, 0, .9) 100%);
  content: "";
}

.detail-hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 30px;
  color: #fff;
}

.detail-hero-copy h1 {
  max-width: 720px;
  margin: 12px 0 13px;
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.03;
  letter-spacing: -.055em;
}

.detail-author {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, .76);
  font-size: 13px;
}

.article-body {
  padding: clamp(22px, 5vw, 42px);
}

.article-body p {
  max-width: 730px;
  margin: 0 auto 20px;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.82;
}

.article-body p:first-child {
  color: var(--text);
  font-size: 19px;
  font-weight: 560;
}

.article-source {
  display: grid;
  max-width: 730px;
  min-height: 72px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin: 28px auto 0;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-soft);
  padding: 12px 15px;
  transition: border-color .2s ease, transform .25s var(--ease), box-shadow .25s ease;
}

.article-source:hover {
  border-color: color-mix(in srgb, var(--violet) 55%, var(--border));
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.article-source-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--violet-soft);
  color: var(--violet);
}

.article-source small,
.article-source strong {
  display: block;
}

.article-source small {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.article-source strong {
  margin-top: 2px;
  font-size: 13px;
}

.article-source > .icon {
  width: 17px;
  height: 17px;
  color: var(--text-faint);
}

.article-tags {
  display: flex;
  max-width: 730px;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px auto 0;
}

.tag {
  border-radius: 99px;
  background: var(--surface-soft);
  padding: 6px 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.detail-reactions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.comments-card {
  padding-bottom: 8px;
}

.comments-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
}

.comment-composer {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.comment-composer textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: 0;
  background: var(--surface-soft);
  padding: 13px 14px;
  line-height: 1.55;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.comment-composer textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px var(--focus);
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
}

.composer-hint {
  color: var(--text-faint);
  font-size: 12px;
}

.comment-list {
  padding: 3px 16px 10px;
}

.comment {
  position: relative;
  margin-left: min(calc(var(--depth, 0) * 15px), 72px);
  padding: 15px 0 13px 15px;
  border-bottom: 1px solid var(--border);
}

.comment::before {
  position: absolute;
  top: 18px;
  bottom: 11px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--border);
  content: "";
}

.comment[data-depth="0"] {
  margin-left: 0;
  padding-left: 0;
}

.comment[data-depth="0"]::before {
  display: none;
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comment-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-user .avatar {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  font-size: 10px;
}

.comment-user strong {
  font-size: 13px;
}

.comment-body {
  margin: 9px 0 8px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.58;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.reply-button {
  border-radius: 8px;
  background: transparent;
  padding: 5px 7px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.reply-button:hover {
  background: var(--surface-soft);
  color: var(--violet);
}

.depth-badge {
  border-radius: 7px;
  background: var(--surface-soft);
  padding: 3px 6px;
  color: var(--text-faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.thread-warning {
  margin-top: 8px;
  border: 1px solid rgba(249, 115, 22, .25);
  border-radius: 10px;
  background: rgba(249, 115, 22, .07);
  padding: 8px 10px;
  color: var(--orange);
  font-size: 11px;
}

.form-card {
  padding: clamp(18px, 4vw, 28px);
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 720;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: 0;
  background: var(--surface-soft);
  padding: 0 13px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field textarea {
  height: auto;
  min-height: 88px;
  resize: vertical;
  padding-top: 11px;
  padding-bottom: 11px;
  line-height: 1.55;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px var(--focus);
}

.admin-page {
  display: grid;
  width: min(100%, 1180px);
  gap: 18px;
  margin: 0 auto;
}

.admin-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 92% 8%, rgba(124, 58, 237, .16), transparent 19rem),
    var(--surface);
}

.admin-hero::after {
  position: absolute;
  right: -42px;
  bottom: -78px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(124, 58, 237, .13);
  border-radius: 50%;
  content: "";
}

.admin-hero-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--violet), #a855f7);
  color: #fff;
  box-shadow: 0 12px 30px rgba(124, 58, 237, .24);
}

.admin-hero-mark .icon { width: 27px; height: 27px; }
.admin-role-chip { z-index: 1; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); padding: 8px 11px; color: var(--text-soft); font-size: 11px; font-weight: 750; text-transform: capitalize; }
.admin-role-chip .icon { width: 15px; height: 15px; color: var(--violet); }

.admin-tabs {
  position: sticky;
  z-index: 15;
  top: calc(var(--topbar-h) + 10px);
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 6px;
}

.admin-tabs button {
  min-height: 38px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: transparent;
  padding: 0 15px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, transform .2s var(--ease);
}

.admin-tabs button:hover { background: var(--surface-soft); color: var(--text); transform: translateY(-1px); }
.admin-tabs button.active { background: var(--violet-soft); color: var(--violet); }
.admin-overview-block { display: grid; gap: 14px; scroll-margin-top: calc(var(--topbar-h) + 72px); }
.admin-content-panel, .admin-audit { scroll-margin-top: calc(var(--topbar-h) + 72px); }

.account-grid.has-administration {
  grid-template-columns: minmax(0, 1180px);
}

.account-grid.has-administration .profile-core {
  margin: 0 auto;
}

.account-main {
  width: 100%;
}

.profile-core {
  display: grid;
  width: min(100%, 760px);
  gap: 18px;
}

.profile-administration {
  scroll-margin-top: calc(var(--topbar-h) + 18px);
  margin-top: 16px;
}

.admin-profile-loading {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-soft);
  font-size: 13px;
}

.admin-profile-loading .spinner {
  width: 19px;
  height: 19px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: admin-spin .7s linear infinite;
}

@keyframes admin-spin {
  to { transform: rotate(360deg); }
}

.admin-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.admin-heading h1,
.admin-heading h2 {
  margin: 0;
  font-size: clamp(29px, 4vw, 42px);
  line-height: 1.06;
  letter-spacing: -.045em;
}

.profile-admin-page .admin-heading h2 {
  font-size: clamp(25px, 3.2vw, 36px);
}

.admin-heading p:not(.section-kicker) {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--text-soft);
}

.admin-security-note {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 15px 18px;
  color: var(--violet);
  box-shadow: var(--shadow-soft);
}

.admin-security-note .icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}

.admin-security-note strong,
.admin-security-note span {
  display: block;
}

.admin-security-note strong {
  font-size: 13px;
}

.admin-security-note span {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 11px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.admin-stat {
  position: relative;
  overflow: hidden;
  padding: 17px;
}

.admin-stat::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--violet); content: ""; }
.admin-stat:nth-child(2)::before { background: var(--orange); }
.admin-stat:nth-child(3)::before { background: var(--blue); }
.admin-stat:nth-child(4)::before { background: var(--green); }
.admin-stat:nth-child(5)::before { background: var(--red); }

.admin-stat span,
.admin-stat strong {
  display: block;
}

.admin-stat span {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
}

.admin-stat strong {
  margin-top: 6px;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.04em;
}

.admin-content-panel {
  overflow: hidden;
  animation: route-in .35s var(--ease) both;
}

.admin-panel-head {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 18px 15px 20px;
  border-bottom: 1px solid var(--border);
}

.admin-panel-head h2,
.admin-panel-head p {
  margin: 0;
}

.admin-panel-head h2 {
  font-size: 18px;
}

.admin-panel-head .section-kicker { margin-bottom: 3px; }

.admin-panel-head p {
  margin-top: 2px;
  color: var(--text-faint);
  font-size: 11px;
}

.admin-filters {
  display: flex;
  align-items: center;
  gap: 9px;
}

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

.admin-search .icon {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--text-faint);
}

.admin-search input,
.admin-filters select {
  height: 39px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
}

.admin-search input {
  width: 220px;
  padding: 0 12px 0 35px;
}

.admin-filters select {
  padding: 0 10px;
}

.admin-search input:focus,
.admin-filters select:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--focus);
}

.admin-article-list {
  display: grid;
}

.admin-article-row {
  display: grid;
  min-height: 104px;
  grid-template-columns: auto 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .2s ease;
}

.admin-article-row:last-child {
  border-bottom: 0;
}

.admin-article-row:hover {
  background: var(--surface-soft);
}

.admin-article-row[hidden] {
  display: none;
}

.admin-article-row > img {
  width: 112px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-strong);
}

.admin-article-copy {
  min-width: 0;
}

.admin-article-copy > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-article-copy h3 {
  overflow: hidden;
  margin: 6px 0 3px;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-article-copy code {
  color: var(--text-faint);
  font-size: 10px;
}

.admin-status {
  border-radius: 99px;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.admin-status.published {
  background: rgba(22, 163, 74, .1);
  color: var(--green);
}

.admin-status.draft {
  background: rgba(249, 115, 22, .1);
  color: var(--orange);
}

.admin-row-actions {
  display: flex;
  gap: 3px;
}

.icon-button.danger-icon {
  color: var(--red);
}

.icon-button.danger-icon:hover {
  border-color: rgba(239, 68, 68, .24);
  background: rgba(239, 68, 68, .08);
}

.admin-audit {
  overflow: hidden;
}

.audit-list {
  display: grid;
}

.audit-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px 17px;
  border-bottom: 1px solid var(--border);
}

.audit-row:last-child {
  border-bottom: 0;
}

.audit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 4px var(--violet-soft);
}

.audit-row strong,
.audit-row span {
  display: block;
}

.audit-row strong {
  font-size: 12px;
}

.audit-row span,
.audit-row time,
.audit-empty {
  color: var(--text-faint);
  font-size: 10px;
}

.audit-empty {
  padding: 24px;
  text-align: center;
}

.modal.admin-editor-modal {
  width: min(100%, 980px);
}

.admin-editor-modal .modal-head {
  min-height: 76px;
}

.admin-editor-modal .modal-head .section-kicker {
  margin-bottom: 2px;
  font-size: 9px;
}

.admin-editor-body {
  max-height: min(76vh, 800px);
  overflow-y: auto;
}

.admin-checkbox-field {
  align-content: end;
  min-height: 44px;
}

.danger-text {
  color: var(--red);
}

.delete-warning {
  display: flex;
  gap: 13px;
  margin-bottom: 18px;
  border: 1px solid rgba(239, 68, 68, .22);
  border-radius: 14px;
  background: rgba(239, 68, 68, .065);
  padding: 14px;
}

.delete-warning > .icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  color: var(--red);
}

.delete-warning strong,
.delete-warning p {
  display: block;
  margin: 0;
}

.delete-warning p {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.field-note,
.field-error {
  color: var(--text-faint);
  font-size: 11px;
}

.field-error {
  color: var(--red);
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-soft);
  cursor: pointer;
}

.checkbox input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--violet);
}

.account-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 23px;
  background:
    radial-gradient(circle at 85% 10%, rgba(124, 58, 237, .19), transparent 20rem),
    var(--surface);
}

.account-hero h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -.035em;
}

.account-hero p {
  margin: 4px 0 0;
  color: var(--text-soft);
}

.account-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.avatar-editor { display: grid; justify-items: center; gap: 7px; }
.button.compact { min-height: 30px; padding: 5px 10px; font-size: 11px; }
.admin-bulk { display: flex; flex-wrap: wrap; gap: 9px; border-bottom: 1px solid var(--border); background: var(--surface-soft); padding: 11px 18px; }
.admin-bulk select { width: auto; min-width: 160px; }
.management-list { display: grid; gap: 8px; padding: 14px; }
.management-row { display: grid; grid-template-columns: auto auto minmax(160px, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); transition: border-color .2s ease, transform .2s var(--ease), box-shadow .2s ease; }
.management-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-soft); transform: translateY(-1px); }
.management-row > div:not(.admin-row-actions) { display: grid; gap: 3px; }
.management-row span { color: var(--text-faint); font-size: 11px; }
.management-row select { min-width: 120px; }
.role-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px; }
.role-presets > div { display: grid; gap: 3px; padding: 11px; border-radius: 12px; background: var(--surface-soft); }
.role-presets span { color: var(--text-faint); font-size: 11px; }

@media (max-width: 850px) {
  .management-row { grid-template-columns: auto auto minmax(0, 1fr); }
  .management-row > select, .management-row > .button, .management-row > .danger-icon { grid-column: 2 / -1; width: 100%; }
  .role-presets { grid-template-columns: 1fr; }
}

.settings-section + .settings-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.settings-section h2 {
  margin: 0 0 15px;
  font-size: 17px;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.server-list,
.download-list,
.user-grid {
  display: grid;
  gap: 13px;
}

.server-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 17px 19px;
}

.server-icon,
.download-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--violet-soft);
  color: var(--violet);
}

.server-icon .icon,
.download-icon .icon {
  width: 23px;
  height: 23px;
}

.server-copy h3,
.download-copy h3 {
  margin: 0;
  font-size: 15px;
}

.server-meta,
.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 12px;
}

.server-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}

.server-state.offline {
  color: var(--red);
}

.server-state.offline .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .11);
}

.server-state.maintenance { color: var(--orange); }
.server-state.maintenance .status-dot { background: var(--orange); box-shadow: 0 0 0 4px rgba(249, 115, 22, .11); }
.server-state.checking { color: var(--blue); }
.server-state.checking .status-dot { background: var(--blue); box-shadow: 0 0 0 4px rgba(59, 130, 246, .11); animation: status-pulse 1.4s ease infinite; }

.admin-route { width: min(1380px, 100%); margin: 0 auto; }
.admin-route-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.admin-route-nav > div { display: flex; align-items: center; gap: 8px; color: var(--green); font-size: 12px; font-weight: 750; }
.admin-entry-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 20px; background: radial-gradient(circle at 85% 0, var(--violet-soft), transparent 20rem), var(--surface); }
.admin-entry-card h2, .admin-entry-card p { margin: 0; }
.admin-entry-card h2 { margin: 3px 0 6px; font-size: 19px; }
.admin-entry-card > div:nth-child(2) > p:last-child { color: var(--text-soft); line-height: 1.5; }
.admin-entry-icon { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 16px; background: var(--violet-soft); color: var(--violet); }
.admin-entry-icon .icon { width: 27px; height: 27px; }

.admin-modal-backdrop {
  position: fixed;
  z-index: 80;
  inset: var(--topbar-h) 0 0 var(--sidebar-w);
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(13, 13, 16, .34);
  backdrop-filter: blur(8px);
  transition: left .38s var(--ease);
}

html.sidebar-collapsed .admin-modal-backdrop { left: 78px; }

.admin-workspace-modal {
  display: grid;
  width: min(1240px, 100%);
  height: min(850px, 100%);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--bg);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .3);
  animation: modal-in .34s var(--ease) both;
}

.admin-modal-top {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 0 13px 0 20px;
}

.admin-modal-top > div { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 800; }
.admin-modal-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 20px; }
.admin-workspace-modal .admin-page { width: 100%; }
.admin-workspace-modal .admin-tabs { top: 8px; }
.admin-page > [hidden] { display: none !important; }

.admin-pagination {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
  padding: 10px 18px;
}

.admin-pagination > span { color: var(--text-faint); font-size: 11px; }
.admin-pagination > div { display: flex; flex-wrap: wrap; gap: 5px; }
.admin-pagination button { min-width: 34px; min-height: 34px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); padding: 0 10px; color: var(--text-soft); font-size: 11px; font-weight: 750; cursor: pointer; }
.admin-pagination button:hover:not(:disabled), .admin-pagination button.active { border-color: var(--violet); background: var(--violet-soft); color: var(--violet); }
.admin-pagination button:disabled { cursor: not-allowed; opacity: .45; }

@media (max-width: 700px) {
  .admin-modal-backdrop { inset: var(--topbar-h) 0 68px; padding: 8px; }
  html.sidebar-collapsed .admin-modal-backdrop { left: 0; }
  .admin-workspace-modal { height: 100%; border-radius: 18px; }
  .admin-modal-scroll { padding: 10px; }
  .admin-route-nav { align-items: stretch; flex-direction: column; }
  .admin-hero { grid-template-columns: auto minmax(0, 1fr); padding: 18px; }
  .admin-hero .admin-role-chip { grid-column: 1 / -1; justify-self: start; }
  .admin-tabs { top: calc(var(--topbar-h) + 6px); }
  .admin-entry-card { grid-template-columns: auto minmax(0, 1fr); }
  .admin-entry-card > .button { grid-column: 1 / -1; }
  .admin-pagination { align-items: stretch; flex-direction: column; }
}

.capacity {
  height: 5px;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 9px;
  background: var(--surface-strong);
}

.capacity > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), #c084fc);
}

.status-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.status-summary strong {
  font-size: 22px;
}

.download-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 20px;
}

.download-icon.orange { background: rgba(249, 115, 22, .1); color: var(--orange); }
.download-icon.blue { background: rgba(59, 130, 246, .1); color: var(--blue); }
.download-icon.green { background: rgba(22, 163, 74, .1); color: var(--green); }

.download-description {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.verified-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-weight: 700;
}

.verified-label .icon {
  width: 13px;
  height: 13px;
}

.hash-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  color: var(--text-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.hash-line code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hash-line > span:first-child {
  min-width: 50px;
  white-space: nowrap;
}

.copy-button {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
}

.copy-button:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.copy-button .icon {
  width: 14px;
  height: 14px;
}

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

.user-card {
  display: grid;
  place-items: center;
  padding: 22px 15px;
  text-align: center;
}

.user-card h3 {
  margin: 10px 0 3px;
  font-size: 14px;
}

.user-card p {
  margin: 0;
  color: var(--text-faint);
  font-size: 11px;
}

.comment-feed-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--border);
}

.comment-feed-item:last-child {
  border-bottom: 0;
}

.comment-feed-item p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.comment-feed-link {
  color: var(--violet);
  font-size: 11px;
  font-weight: 700;
}

.segmented {
  display: inline-flex;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 3px;
}

.segment {
  min-height: 33px;
  border-radius: 9px;
  background: transparent;
  padding: 0 12px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.segment.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .07);
}

.modal-layer {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 22px;
  background: rgba(7, 7, 10, .68);
  backdrop-filter: blur(10px);
  animation: fade-in .2s ease both;
}

.modal {
  position: relative;
  width: min(100%, 450px);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .32);
  animation: modal-in .34s var(--ease) both;
}

.modal.wide {
  width: min(100%, 560px);
}

.modal-head {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 17px 0 22px;
  border-bottom: 1px solid var(--border);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.02em;
}

.modal-body {
  padding: 21px;
}

.modal-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 15px;
  place-items: center;
  border-radius: 16px;
  background: var(--violet-soft);
  color: var(--violet);
}

.modal-icon.warning {
  background: rgba(249, 115, 22, .1);
  color: var(--orange);
}

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

.modal-body > p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.62;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 4px;
}

.auth-tab {
  min-height: 38px;
  border-radius: 9px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.auth-form {
  display: grid;
  gap: 13px;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-message {
  min-height: 18px;
  color: var(--red);
  font-size: 12px;
}

.toast-stack {
  position: fixed;
  z-index: 260;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(390px, calc(100vw - 40px));
  gap: 9px;
}

.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  padding: 12px 13px;
  box-shadow: var(--shadow);
  animation: toast-in .35s var(--ease) both;
}

.toast::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(22, 163, 74, .1);
  content: "";
}

.toast.warning::before { background: var(--orange); box-shadow: 0 0 0 5px rgba(249, 115, 22, .1); }
.toast.error::before { background: var(--red); box-shadow: 0 0 0 5px rgba(239, 68, 68, .1); }

.toast-message {
  min-width: 0;
  font-size: 13px;
  font-weight: 620;
}

.toast-close {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
}

.toast-close .icon {
  width: 14px;
  height: 14px;
}

.sidebar-scrim {
  display: none;
}

.mobile-nav {
  display: none;
}

.loading-page {
  display: grid;
  gap: 18px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 48%, transparent 62%);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.45s infinite;
}

html[data-theme="dark"] .skeleton::after {
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .055) 48%, transparent 62%);
}

.skeleton.top {
  height: 128px;
}

.skeleton.card {
  height: 520px;
}

.route-enter {
  animation: route-in .4s var(--ease) both;
}

.error-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(239, 68, 68, .23);
  border-radius: 13px;
  background: rgba(239, 68, 68, .07);
  padding: 12px 14px;
  color: var(--red);
  font-size: 13px;
}

.error-banner .icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes route-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

@media (max-width: 1180px) {
  .content-grid {
    grid-template-columns: minmax(0, 780px);
  }

  .right-rail {
    display: none;
  }
}

@media (max-width: 920px) {
  :root {
    --sidebar-w: 232px;
  }

  .topbar {
    grid-template-columns: var(--sidebar-w) minmax(180px, 1fr) auto;
    gap: 16px;
  }

  .auth-button span:not(.avatar) {
    display: none;
  }
}

@media (max-width: 760px) {
  :root {
    --topbar-h: 64px;
  }

  html.sidebar-collapsed {
    --sidebar-w: 232px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 0 12px;
  }

  .topbar-brand {
    gap: 8px;
  }

  .brand-link img {
    width: 122px;
  }

  .search {
    position: fixed;
    z-index: 70;
    top: 72px;
    right: 12px;
    left: 12px;
    display: none;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, .16));
  }

  .search.open {
    display: flex;
    animation: route-in .25s var(--ease) both;
  }

  .topbar-actions {
    gap: 1px;
  }

  .sidebar {
    z-index: 120;
    top: 0;
    width: min(86vw, 290px);
    padding-top: 82px;
    transform: translateX(-104%);
    transition: transform .34s var(--ease);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 110;
    inset: 0;
    display: block;
    background: rgba(5, 5, 7, .56);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }

  .sidebar-scrim.open {
    opacity: 1;
    pointer-events: auto;
  }

  .page-shell {
    margin-left: 0;
  }

  .page-content {
    padding: 16px 12px 90px;
  }

  .admin-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-heading .button {
    align-self: flex-start;
  }

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

  .admin-panel-head,
  .admin-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-search input {
    width: 100%;
  }

  .admin-article-row {
    grid-template-columns: auto 92px minmax(0, 1fr);
  }

  .admin-article-row > img {
    width: 92px;
  }

  .admin-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .modal.admin-editor-modal {
    width: 100%;
  }

  .mobile-nav {
    position: fixed;
    z-index: 75;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 60px;
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 91%, transparent);
    padding: 5px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, .18);
    backdrop-filter: blur(18px);
  }

  .mobile-nav a {
    display: grid;
    place-items: center;
    gap: 2px;
    border-radius: 13px;
    color: var(--text-faint);
    font-size: 9px;
  }

  .mobile-nav a.active {
    background: var(--surface-soft);
    color: var(--violet);
  }

  .mobile-nav .icon {
    width: 20px;
    height: 20px;
  }

  .daily-card {
    min-height: 140px;
    background-position: 94% 50%;
    background-size: 76% auto;
  }

  .daily-content {
    width: 72%;
  }

  .daily-content h2 {
    font-size: 18px;
  }

  .news-meta {
    min-height: 58px;
    padding: 11px 14px;
  }

  .news-title {
    padding: 0 14px 13px;
  }

  .news-excerpt {
    padding: 14px 15px 2px;
    font-size: 14px;
  }

  .detail-hero {
    min-height: 370px;
  }

  .detail-hero-copy {
    padding: 22px;
  }

  .detail-hero-copy h1 {
    font-size: clamp(29px, 10vw, 41px);
  }
}

@media (max-width: 560px) {
  .icon-button.optional,
  .topbar-actions .auth-button .icon {
    display: none;
  }

  .auth-button {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
  }

  .auth-button .avatar {
    margin: 0;
  }

  .panel,
  .news-card,
  .detail-card {
    border-radius: 15px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .news-image-link {
    aspect-ratio: 16 / 9.5;
  }

  .news-footer {
    padding-right: 8px;
    padding-left: 8px;
  }

  .reaction-button {
    padding: 0 7px;
  }

  .read-link span {
    display: none;
  }

  .detail-reactions,
  .composer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-security-note {
    align-items: flex-start;
  }

  .admin-article-row {
    grid-template-columns: auto 1fr;
  }

  .admin-article-row > img {
    grid-column: 1 / -1;
    width: 100%;
  }

  .audit-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .audit-row time {
    grid-column: 2;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }

  .server-card,
  .download-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .server-state,
  .download-card > .button {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

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

  .account-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-layer {
    align-items: end;
    padding: 10px;
  }

  .modal {
    width: 100%;
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    border-radius: 21px;
  }

  .toast-stack {
    right: 12px;
    bottom: 84px;
    width: calc(100vw - 24px);
  }
}

.top-download-link { display: inline-flex; min-height: 42px; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); padding: 0 13px; color: var(--text); font-size: 12px; font-weight: 750; transition: transform .2s var(--ease), border-color .2s ease; }
.top-download-link:hover { border-color: var(--violet); color: var(--violet); transform: translateY(-1px); }
.top-download-link .icon { width: 17px; height: 17px; }
.feed-search-mobile { display: none; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px; }
.feed-search-mobile .icon { width: 18px; height: 18px; margin-left: 5px; color: var(--text-faint); }
.feed-search-mobile input, .user-search input { min-width: 0; height: 40px; border: 0; outline: 0; background: transparent; color: var(--text); }

.auth-standalone { display: grid; min-height: calc(100vh - var(--topbar-h) - 100px); place-items: center; padding: 24px; }
html.auth-route .topbar, html.auth-route .sidebar, html.auth-route .mobile-nav,
html.maintenance-route .topbar, html.maintenance-route .sidebar, html.maintenance-route .mobile-nav { display: none; }
html.auth-route .page-shell, html.maintenance-route .page-shell { margin-left: 0; padding-top: 0; }
html.auth-route .auth-standalone { min-height: 100vh; }
.auth-page-card { width: min(100%, 470px); border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); padding: clamp(24px, 5vw, 42px); box-shadow: var(--shadow); }
.auth-brand { display: inline-flex; margin-bottom: 32px; }
.auth-brand img { width: 174px; height: auto; }
.auth-page-heading { margin-bottom: 24px; }
.auth-page-heading h1 { margin: 4px 0 8px; font-size: clamp(28px, 5vw, 40px); letter-spacing: -.045em; }
.auth-page-heading > p:last-child { margin: 0; color: var(--text-soft); line-height: 1.55; }
.auth-page-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 18px; }
.auth-page-links a { color: var(--text-soft); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.auth-message.success { color: var(--green); }

.maintenance-page { position: fixed; z-index: 75; inset: 0; display: grid; place-items: center; background: var(--bg); padding: 30px; }
html.sidebar-collapsed .maintenance-page { left: 78px; }
.maintenance-page > section { display: grid; width: min(860px, 100%); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow); }
.maintenance-page img { width: 100%; max-height: 330px; object-fit: cover; }
.maintenance-page section > div { padding: clamp(24px, 5vw, 48px); }
.maintenance-page h1 { margin: 4px 0 12px; font-size: clamp(30px, 6vw, 54px); letter-spacing: -.05em; }
.maintenance-page section p:last-child { max-width: 680px; color: var(--text-soft); line-height: 1.7; }
.maintenance-admin-link { position: absolute; right: 24px; bottom: 20px; color: var(--text-faint); font-size: 11px; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 5px; }

.account-cover-card, .profile-cover-card { position: relative; isolation: isolate; overflow: hidden; }
.account-cover, .profile-cover { min-height: 210px; background: linear-gradient(135deg, #dbeafe, #ede9fe 48%, #fed7aa); background-position: center; background-size: cover; }
.account-cover { position: relative; z-index: 0; }
.cover-upload { position: absolute; right: 14px; bottom: 14px; backdrop-filter: blur(10px); }
.account-cover-info, .profile-cover-info { position: relative; z-index: 2; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; background: var(--surface); padding: 0 22px 22px; }
.account-cover-info .avatar-editor, .profile-cover-info > .avatar { position: relative; z-index: 3; align-self: start; margin-top: 0; margin-bottom: -42px; transform: translateY(-42px); }
.profile-avatar { position: relative; z-index: 4; border: 4px solid var(--surface); background-clip: padding-box; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.account-cover-info h1, .profile-cover-info h1 { margin: 14px 0 2px; }
.account-settings-card { overflow: hidden; }
.account-category-nav { display: flex; gap: 7px; overflow-x: auto; border-bottom: 1px solid var(--border); background: var(--surface-soft); padding: 10px; scrollbar-width: thin; }
.account-category-nav button { display: inline-flex; min-height: 42px; flex: 0 0 auto; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; background: transparent; padding: 0 13px; color: var(--text-soft); font: inherit; font-size: 12px; font-weight: 760; cursor: pointer; transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s var(--ease); }
.account-category-nav button:hover { transform: translateY(-1px); border-color: var(--border); background: var(--surface); color: var(--text); }
.account-category-nav button.active { border-color: color-mix(in srgb, var(--violet) 28%, var(--border)); background: var(--violet-soft); color: var(--violet); }
.account-category-nav button.staff-category { margin-left: auto; }
.account-category-nav .icon { width: 17px; height: 17px; }
.account-category-stage { min-height: 330px; }
.account-category-form { padding: clamp(20px, 4vw, 30px); }
.account-category-panel h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.account-category-lead { max-width: 620px; margin: 7px 0 24px; color: var(--text-soft); font-size: 13px; line-height: 1.6; }
.account-switch-list { display: grid; gap: 9px; }
.account-save-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 28px clamp(-30px, -4vw, -20px) clamp(-30px, -4vw, -20px); border-top: 1px solid var(--border); background: var(--surface-soft); padding: 16px clamp(20px, 4vw, 30px); }
.account-save-bar span { color: var(--text-faint); font-size: 11px; }
.account-logout { justify-self: start; }
.account-admin-category { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 18px; padding: clamp(22px, 5vw, 38px); }
.account-admin-category:not([hidden]) { display: grid; }
.account-admin-category h2, .account-admin-category p { margin: 0; }
.account-admin-category h2 { margin-bottom: 7px; font-size: 23px; }
.account-admin-category > div:nth-child(2) > p:last-child { max-width: 590px; color: var(--text-soft); line-height: 1.6; }
.account-admin-actions { display: flex; grid-column: 1 / -1; flex-wrap: wrap; gap: 10px; padding-top: 8px; }
.public-profile { display: grid; width: min(900px, 100%); gap: 18px; margin: 0 auto; }
.profile-public-details { display: grid; gap: 12px; padding: 22px; }
.profile-public-details h2, .profile-public-details p { margin: 0; }
.profile-public-details > div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding-top: 12px; }

.presence { display: inline-flex; align-items: center; gap: 6px; color: var(--text-faint); font-size: 11px; font-weight: 700; }
.presence i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.presence.online { color: var(--green); } .presence.online i { background: var(--green); box-shadow: 0 0 0 4px rgba(22,163,74,.1); }
.presence.away { color: var(--orange); } .presence.away i { background: var(--orange); box-shadow: 0 0 0 4px rgba(249,115,22,.1); }
.user-card { color: var(--text); transition: transform .2s var(--ease), border-color .2s ease; }
.user-card:hover { border-color: var(--violet); transform: translateY(-2px); }
.user-search { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; }
.user-search .icon { color: var(--text-faint); }
.simple-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; }
.simple-pagination .disabled { pointer-events: none; opacity: .45; }

.setting-toggle { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.setting-toggle input { margin-top: 3px; accent-color: var(--violet); }
.setting-toggle span { display: grid; gap: 3px; }
.setting-toggle small { color: var(--text-faint); line-height: 1.45; }
.site-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.admin-site-form { padding: 18px; }
.upload-progress { display: grid; gap: 10px; margin-top: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); padding: 14px; }
.upload-progress > div { display: flex; justify-content: space-between; gap: 12px; }
.upload-progress progress { width: 100%; height: 10px; accent-color: var(--violet); }
.modal.download-wizard-modal {
  display: grid;
  width: min(760px, calc(100vw - 44px));
  height: min(680px, calc(100dvh - 44px));
  grid-template-rows: auto minmax(0, 1fr);
}
.download-wizard-head [data-download-step-label] { color: var(--violet); }
.download-wizard-body { min-height: 0; padding: 0; }
.download-wizard-form { display: grid; height: 100%; min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto auto; }
.download-wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
  padding: 9px 14px;
}
.download-wizard-steps button {
  display: flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-faint);
  font: inherit;
  cursor: pointer;
}
.download-wizard-steps button span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  font-size: 10px;
  font-weight: 850;
}
.download-wizard-steps button b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.download-wizard-steps button.active { border-color: color-mix(in srgb, var(--violet) 25%, var(--border)); background: var(--surface); color: var(--violet); box-shadow: var(--shadow-soft); }
.download-wizard-steps button.active span { border-color: var(--violet); background: var(--violet); color: #fff; }
.download-wizard-steps button.complete:not(.active) { color: var(--text-soft); }
.download-wizard-steps button.complete:not(.active) span { border-color: color-mix(in srgb, var(--green) 34%, var(--border)); background: rgba(22,163,74,.09); color: var(--green); }
.download-wizard-steps button:disabled { cursor: not-allowed; opacity: .55; }
.download-wizard-stage { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 22px; }
.download-wizard-step { animation: route-enter .24s var(--ease) both; }
.download-wizard-intro { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 13px; margin-bottom: 18px; }
.download-wizard-intro h3, .download-wizard-intro p { margin: 0; }
.download-wizard-intro h3 { font-size: 17px; }
.download-wizard-intro p { margin-top: 4px; color: var(--text-soft); font-size: 11px; line-height: 1.5; }
.download-wizard-step-icon, .download-source-panel-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--violet-soft);
  color: var(--violet);
}
.download-wizard-step-icon .icon, .download-source-panel-icon .icon { width: 20px; height: 20px; }
.download-source-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-soft);
  padding: 14px;
}
.download-source-panel .field { min-width: 0; }
.download-source-panel input[type="file"] { padding: 8px; }
.download-wizard-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  border: 1px solid color-mix(in srgb, var(--blue) 25%, var(--border));
  border-radius: 14px;
  background: rgba(59,130,246,.07);
  padding: 13px;
}
.download-wizard-notice.success { border-color: color-mix(in srgb, var(--green) 28%, var(--border)); background: rgba(22,163,74,.07); }
.download-wizard-notice > .icon { width: 20px; height: 20px; color: var(--blue); }
.download-wizard-notice.success > .icon { color: var(--green); }
.download-wizard-notice strong, .download-wizard-notice p { margin: 0; }
.download-wizard-notice strong { font-size: 12px; }
.download-wizard-notice p { margin-top: 3px; color: var(--text-soft); font-size: 11px; line-height: 1.5; }
.download-appearance {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(140px, .42fr);
  align-items: end;
  gap: 14px;
  margin-top: 17px;
  border-top: 1px solid var(--border);
  padding-top: 17px;
}
.field-label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 750; }
.download-wizard-icon-preview, .download-wizard-summary-icon {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 18px;
  background: var(--violet-soft);
  color: var(--violet);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 18%, transparent);
}
.download-wizard-icon-preview .icon { width: 29px; height: 29px; }
.download-wizard-icon-preview.orange, .download-wizard-summary-icon.orange { background: rgba(249,115,22,.1); color: var(--orange); }
.download-wizard-icon-preview.blue, .download-wizard-summary-icon.blue { background: rgba(59,130,246,.1); color: var(--blue); }
.download-wizard-icon-preview.green, .download-wizard-summary-icon.green { background: rgba(22,163,74,.1); color: var(--green); }
.download-wizard-icon-preview.red, .download-wizard-summary-icon.red { background: rgba(239,68,68,.1); color: var(--red); }
.download-icon-choices { display: grid; grid-template-columns: repeat(5, minmax(52px, 1fr)); gap: 6px; }
.download-icon-choice { position: relative; display: grid; min-width: 0; justify-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); padding: 7px 4px; color: var(--text-soft); cursor: pointer; }
.download-icon-choice:hover { border-color: var(--border-strong); color: var(--text); }
.download-icon-choice:has(input:checked) { border-color: var(--violet); background: var(--violet-soft); color: var(--violet); }
.download-icon-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.download-icon-choice span { display: grid; place-items: center; }
.download-icon-choice .icon { width: 18px; height: 18px; }
.download-icon-choice b { max-width: 100%; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.download-icon-choice input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 4px; border-radius: 4px; }
.download-wizard-summary {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 13px;
  margin-top: 17px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-soft);
  padding: 14px;
}
.download-wizard-summary-icon { width: 48px; height: 48px; border-radius: 14px; }
.download-wizard-summary > div:not(.download-wizard-summary-icon) { display: grid; min-width: 0; gap: 2px; }
.download-wizard-summary span, .download-wizard-summary small { color: var(--text-faint); font-size: 9px; }
.download-wizard-summary strong, .download-wizard-summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.download-wizard-summary strong { font-size: 11px; }
.download-wizard-upload { margin: 0 18px 10px; }
.download-wizard-message { min-height: 0; margin: 0 20px; }
.download-wizard-message:not(:empty) { margin-bottom: 10px; border: 1px solid rgba(239,68,68,.18); border-radius: 10px; background: rgba(239,68,68,.06); padding: 9px 11px; color: var(--red); font-size: 11px; }
.download-wizard-actions {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 10px 18px;
}
.download-wizard-actions > div { display: flex; gap: 8px; }
.download-wizard-actions .button .icon { width: 15px; height: 15px; }
.image-editor-modal { width: min(820px, calc(100vw - 30px)); }
.image-crop-editor { display: grid; gap: 18px; }
.image-crop-description { max-width: 720px; margin: 0; color: var(--text-soft); line-height: 1.65; }
.image-crop-stage {
  position: relative;
  width: min(100%, 720px);
  justify-self: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--violet) 45%, var(--border));
  border-radius: 18px;
  background: #0b0b0f;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 16px 45px rgba(0,0,0,.16);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.image-crop-stage.dragging { cursor: grabbing; }
.image-crop-stage canvas { display: block; width: 100%; height: 100%; pointer-events: none; }
.image-crop-mask { position: absolute; inset: 0; z-index: 2; border: 2px solid rgba(255,255,255,.86); pointer-events: none; }
.image-crop-stage.is-avatar { width: min(100%, 420px); aspect-ratio: 1 / 1; border-radius: 20px; }
.image-crop-stage.is-avatar .image-crop-mask {
  border: 3px solid rgba(255,255,255,.92);
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(3,3,7,.48), inset 0 0 0 1px rgba(0,0,0,.18);
}
.image-crop-stage.is-background { aspect-ratio: 3 / 1; }
.image-crop-stage.is-background .image-crop-mask { box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.image-crop-toolbar { display: grid; gap: 8px; }
.image-crop-toolbar label { display: grid; grid-template-columns: auto minmax(120px, 1fr) 48px; align-items: center; gap: 12px; font-size: 12px; font-weight: 750; }
.image-crop-toolbar input[type="range"] { width: 100%; accent-color: var(--violet); cursor: pointer; }
.image-crop-toolbar output { color: var(--violet); text-align: right; font-variant-numeric: tabular-nums; }
[data-download-upload][hidden], [data-download-url][hidden] { display: none !important; }
.download-management-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.management-note { display: block; max-width: 360px; overflow: hidden; margin-top: 3px; color: var(--red); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.profile-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.profile-actions .button { white-space: nowrap; }
.blocked-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  border: 1px solid rgba(239,68,68,.23);
  border-radius: 999px;
  background: rgba(239,68,68,.08);
  padding: 4px 9px;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  vertical-align: middle;
}
.blocked-badge .icon { width: 12px; height: 12px; }
.suspension-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  border: 1px solid rgba(239,68,68,.22);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(239,68,68,.075), transparent 62%), var(--surface);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}
.suspension-notice-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; background: rgba(239,68,68,.11); color: var(--red); }
.suspension-notice-icon .icon { width: 21px; height: 21px; }
.suspension-notice h2 { margin: 1px 0 12px; font-size: 18px; }
.suspension-notice dl { display: grid; gap: 8px; margin: 0; }
.suspension-notice dl > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; }
.suspension-notice dt { color: var(--text-faint); font-size: 10px; font-weight: 750; }
.suspension-notice dd { margin: 0; overflow-wrap: anywhere; color: var(--text); font-size: 11px; line-height: 1.5; }
.suspension-notice.compact { border-radius: 14px; box-shadow: none; padding: 14px; }
.suspension-notice.compact .suspension-notice-icon { width: 36px; height: 36px; }
.suspension-notice.compact h2 { font-size: 14px; }
.suspension-notice.compact dl { grid-template-columns: 1fr; }
.account-save-bar.suspended { justify-content: flex-start; color: var(--red); }
.account-save-bar.suspended span { display: flex; align-items: center; gap: 7px; color: var(--red); font-weight: 750; }
.account-save-bar.suspended .icon { width: 15px; height: 15px; }
.comment-composer.locked { display: flex; align-items: center; gap: 9px; color: var(--red); font-size: 11px; }
.comment-composer.locked .icon { width: 17px; height: 17px; }
.access-change-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.access-change-summary > div { display: grid; gap: 2px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); padding: 11px 13px; }
.access-change-summary span { color: var(--text-faint); font-size: 9px; }
.access-change-summary strong { font-size: 12px; }
.suspension-fields { display: grid; gap: 13px; }
.suspension-fields[hidden] { display: none; }
.messages-page { width: min(1180px, 100%); margin: 0 auto; }
.messages-shell { display: grid; min-height: min(720px, calc(100dvh - 126px)); grid-template-columns: 330px minmax(0, 1fr); overflow: hidden; }
.conversation-list { min-width: 0; border-right: 1px solid var(--border); background: var(--surface-soft); }
.conversation-list > header { padding: 22px 20px 15px; }
.conversation-list h1 { margin: 2px 0 0; font-size: 25px; }
.conversation-list > div { display: grid; gap: 4px; max-height: calc(100dvh - 220px); overflow-y: auto; padding: 5px 8px 14px; }
.conversation-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; border-radius: 13px; padding: 10px; color: var(--text); transition: background .18s ease, transform .18s ease; }
.conversation-row:hover { background: var(--surface); transform: translateX(2px); }
.conversation-row.active { background: var(--violet-soft); color: var(--violet); }
.conversation-row > div { min-width: 0; }
.conversation-row > div > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.conversation-row strong, .conversation-row time, .conversation-row p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-row strong { color: var(--text); font-size: 11px; }
.conversation-row time { color: var(--text-faint); font-size: 8px; }
.conversation-row p { margin: 3px 0 0; color: var(--text-soft); font-size: 10px; }
.conversation-unread { display: grid; min-width: 20px; height: 20px; place-items: center; border-radius: 99px; background: var(--violet); padding: 0 5px; color: #fff; font-size: 9px; font-weight: 850; }
.message-thread { display: grid; min-width: 0; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--surface); }
.message-thread-head { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--border); padding: 12px 18px; }
.message-thread-user { display: flex; min-width: 0; align-items: center; gap: 10px; color: var(--text); }
.message-thread-user div { display: grid; min-width: 0; gap: 2px; }
.message-thread-user strong, .message-thread-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-thread-user strong { font-size: 12px; }
.message-thread-user span { color: var(--text-faint); font-size: 10px; }
.message-encryption { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 99px; padding: 6px 9px; color: var(--green); font-size: 9px; font-weight: 800; white-space: nowrap; }
.message-encryption .icon { width: 12px; height: 12px; }
.message-thread-body { display: flex; min-height: 0; flex-direction: column; gap: 9px; overflow-y: auto; padding: 20px; overscroll-behavior: contain; }
.message-bubble { width: fit-content; max-width: min(72%, 620px); border: 1px solid var(--border); border-radius: 15px 15px 15px 5px; background: var(--surface-soft); padding: 10px 12px 7px; }
.message-bubble.mine { align-self: flex-end; border-color: rgba(124,58,237,.22); border-radius: 15px 15px 5px 15px; background: var(--violet-soft); }
.message-bubble p { margin: 0; overflow-wrap: anywhere; color: var(--text); font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.message-bubble > div { display: flex; justify-content: flex-end; gap: 7px; margin-top: 5px; color: var(--text-faint); font-size: 8px; }
.message-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; border-top: 1px solid var(--border); padding: 12px; }
.message-composer textarea { min-height: 44px; max-height: 140px; resize: vertical; border: 1px solid var(--border); border-radius: 13px; outline: 0; background: var(--surface-soft); padding: 11px 13px; color: var(--text); }
.message-composer textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 4px var(--focus); }
.message-composer-disabled { display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--border); background: rgba(239,68,68,.05); padding: 16px; color: var(--red); font-size: 11px; }
.message-composer-disabled .icon { width: 16px; height: 16px; }
.message-thread > .suspension-notice { margin: 12px; }
.messages-empty { display: grid; height: 100%; min-height: 260px; place-items: center; gap: 13px; padding: 30px; color: var(--text-faint); text-align: center; }
.messages-empty > .icon { width: 35px; height: 35px; color: var(--violet); }
.messages-empty h2, .messages-empty h3, .messages-empty p { margin: 0; }
.messages-empty p { margin-top: 6px; font-size: 11px; line-height: 1.6; }
.messages-empty .button { margin-top: 13px; }
.messages-empty.compact { min-height: 120px; padding: 18px; font-size: 11px; }
.messages-empty.compact a { color: var(--violet); font-weight: 750; }
.messages-empty.thread-empty { flex: 1; min-height: 180px; }
.notification-list { display: grid; gap: 8px; }
.notification-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; border: 1px solid var(--border); border-radius: 13px; padding: 11px; color: var(--text); }
.notification-item.unread { border-color: rgba(124,58,237,.3); background: var(--violet-soft); }
.notification-item p, .notification-item time { margin: 2px 0 0; color: var(--text-soft); font-size: 11px; }

@media (max-width: 760px) {
  .top-download-link span { display: none; }
  .top-download-link { width: 42px; justify-content: center; padding: 0; }
  .feed-search-mobile { display: grid; }
  .auth-standalone { min-height: calc(100vh - var(--topbar-h) - 70px); padding: 10px; }
  .auth-page-card { padding: 24px 18px; }
  .maintenance-page { inset: var(--topbar-h) 0 68px; padding: 10px; }
  html.sidebar-collapsed .maintenance-page { left: 0; }
  .maintenance-page img { max-height: 220px; }
  .maintenance-admin-link { right: 14px; bottom: 80px; }
  .account-cover, .profile-cover { min-height: 150px; }
  .account-cover-info, .profile-cover-info { grid-template-columns: auto minmax(0, 1fr); padding: 0 15px 18px; }
  .account-cover-info .avatar-editor, .profile-cover-info > .avatar { margin-bottom: -34px; transform: translateY(-34px); }
  .account-cover-info > div:last-child, .profile-cover-info > div { min-width: 0; }
  .profile-cover-info > .button { grid-column: 1 / -1; width: 100%; }
  .profile-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .profile-actions .button { width: 100%; }
  .blocked-badge { display: flex; width: fit-content; margin: 7px 0 0; }
  .suspension-notice { grid-template-columns: 1fr; padding: 16px; }
  .suspension-notice dl > div { grid-template-columns: 1fr; gap: 3px; }
  .suspension-notice.compact .suspension-notice-icon { display: none; }
  .access-change-summary { grid-template-columns: 1fr; }
  .messages-shell { min-height: auto; grid-template-columns: 1fr; }
  .conversation-list { border-right: 0; border-bottom: 1px solid var(--border); }
  .conversation-list > header { padding: 16px 14px 8px; }
  .conversation-list h1 { font-size: 21px; }
  .conversation-list > div { display: flex; max-height: none; overflow-x: auto; overflow-y: hidden; padding: 4px 8px 10px; scroll-snap-type: x proximity; }
  .conversation-row { min-width: min(270px, 82vw); flex: 0 0 min(270px, 82vw); background: var(--surface); scroll-snap-align: start; }
  .message-thread { min-height: min(620px, calc(100dvh - 110px)); }
  .message-thread-head { min-height: 64px; padding: 10px 12px; }
  .message-encryption { padding: 5px 7px; font-size: 8px; }
  .message-thread-body { padding: 14px 10px; }
  .message-bubble { max-width: 88%; }
  .message-composer { grid-template-columns: minmax(0, 1fr) 44px; gap: 7px; padding: 9px; }
  .message-composer .button { width: 44px; padding: 0; }
  .message-composer .button span { display: none; }
  .account-category-nav { padding: 8px; }
  .account-category-nav button.staff-category { margin-left: 0; }
  .account-category-nav button { min-height: 40px; padding: 0 11px; }
  .account-save-bar { align-items: stretch; flex-direction: column; }
  .account-save-bar .button { width: 100%; }
  .account-admin-category { grid-template-columns: 1fr; }
  .account-admin-actions { grid-column: 1; flex-direction: column; }
  .account-admin-actions .button { width: 100%; }
  .site-switches { grid-template-columns: 1fr; }
  .download-management-row { grid-template-columns: auto minmax(0, 1fr); }
  .download-management-row > .tag, .download-management-row > .admin-row-actions { grid-column: 2; }
  .admin-workspace-modal .admin-tabs { scrollbar-width: none; }
  .admin-workspace-modal .admin-panel-head { align-items: stretch; flex-direction: column; }
  .admin-workspace-modal .admin-panel-head > .button { width: 100%; }
  .admin-workspace-modal .admin-bulk { position: sticky; z-index: 8; bottom: 0; box-shadow: 0 -8px 24px rgba(0,0,0,.08); }
  .admin-workspace-modal .admin-bulk > * { flex: 1 1 100%; width: 100%; }
  .admin-editor-modal { height: calc(100dvh - 20px); }
  .admin-editor-modal .modal-body { overflow-y: auto; }
  .modal.download-wizard-modal {
    width: 100%;
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
    overflow: hidden;
    border-radius: 17px;
  }
  .download-wizard-modal .modal-head { min-height: 64px; padding: 12px 14px; }
  .download-wizard-modal .modal-body { overflow: hidden; }
  .download-wizard-form { grid-template-rows: auto minmax(0, 1fr) auto auto; }
  .download-wizard-steps { gap: 4px; padding: 7px; }
  .download-wizard-steps button { min-height: 38px; gap: 5px; border-radius: 10px; }
  .download-wizard-steps button span { width: 21px; height: 21px; flex-basis: 21px; font-size: 9px; }
  .download-wizard-steps button b { font-size: 9px; }
  .download-wizard-stage { padding: 14px; }
  .download-wizard-intro { align-items: start; gap: 10px; margin-bottom: 14px; }
  .download-wizard-intro h3 { font-size: 15px; }
  .download-wizard-step-icon { width: 36px; height: 36px; border-radius: 11px; }
  .download-source-panel { grid-template-columns: 1fr; margin-top: 12px; padding: 12px; }
  .download-source-panel-icon { display: none; }
  .download-appearance { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 11px; }
  .download-appearance > .field { grid-column: 1 / -1; width: 100%; }
  .download-wizard-icon-preview { width: 58px; height: 58px; border-radius: 16px; }
  .download-icon-choices { grid-template-columns: repeat(5, minmax(43px, 1fr)); }
  .download-icon-choice { min-height: 42px; align-content: center; }
  .download-icon-choice b { display: none; }
  .download-wizard-summary { grid-template-columns: auto minmax(0, 1fr); gap: 10px; margin-top: 13px; padding: 11px; }
  .download-wizard-summary > div:not(.download-wizard-summary-icon) { grid-column: 2; }
  .download-wizard-upload { margin: 0 10px 8px; padding: 10px; }
  .download-wizard-message { margin-inline: 10px; }
  .download-wizard-actions { min-height: 58px; gap: 8px; padding: 8px 10px; }
  .download-wizard-actions > div { flex: 1; justify-content: flex-end; }
  .download-wizard-actions .button { min-width: 0; padding-inline: 11px; }
  .image-editor-modal { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .image-editor-modal .modal-body { overflow-y: auto; }
  .image-crop-editor { gap: 14px; }
  .image-crop-stage { border-radius: 14px; }
  .image-crop-toolbar label { grid-template-columns: 1fr 48px; }
  .image-crop-toolbar label > span { grid-column: 1 / -1; }
  .image-crop-editor .modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .image-crop-editor .modal-actions .button { width: 100%; }
  .image-crop-editor .modal-actions .button.primary { grid-column: 1 / -1; grid-row: 1; }
}

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