:root {
  color-scheme: light;
  --ink: #151226;
  --muted: #6d667f;
  --line: #e9e5f2;
  --surface: #ffffff;
  --soft: #f8f5ff;
  --purple: #6217c9;
  --purple-dark: #39127e;
  --gold: #ffb000;
  --green: #148b46;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(38, 20, 84, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  color: var(--ink);
}

body[data-page="admin"] {
  overflow: hidden;
  font-family: "Manrope", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 7px clamp(14px, 4vw, 46px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 900;
  color: var(--purple-dark);
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav a,
.nav-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 750;
  padding: 8px 10px;
  white-space: nowrap;
}

.feed-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(22px, 5vw, 46px) clamp(16px, 5vw, 64px) 14px;
  background:
    linear-gradient(135deg, rgba(98, 23, 201, 0.07), rgba(255, 176, 0, 0.08)),
    #fff;
}

.feed-intro h1 {
  font-size: clamp(2.15rem, 6vw, 4.4rem);
}

.feed-intro p:not(.eyebrow) {
  max-width: 640px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.top-nav a:hover,
.nav-button:hover {
  color: var(--purple);
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 140px);
  padding: clamp(32px, 7vw, 86px) clamp(16px, 5vw, 64px);
  background:
    linear-gradient(135deg, rgba(98, 23, 201, 0.09), rgba(255, 176, 0, 0.12) 52%, rgba(20, 139, 70, 0.07)),
    #fff;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--purple-dark);
  font-size: clamp(2.7rem, 8vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  line-height: 1.1;
}

.hero-text {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.75;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  padding: 12px 18px;
  text-align: center;
  overflow-wrap: anywhere;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: #fff;
  box-shadow: 0 14px 28px rgba(98, 23, 201, 0.24);
}

.btn-quiet {
  background: #fff;
  color: var(--purple-dark);
  border-color: var(--line);
}

.full-width {
  width: 100%;
}

.hero-visual {
  display: grid;
  place-items: center;
  min-height: 260px;
}

.hero-visual img {
  width: min(430px, 88vw);
  border-radius: 18px;
  filter: drop-shadow(0 28px 40px rgba(57, 18, 126, 0.18));
}

.ad-band {
  margin: 0;
  padding: 18px clamp(16px, 5vw, 64px);
  background: var(--soft);
  border-block: 1px solid var(--line);
}

.ad-band.slim {
  margin: 24px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ad-band span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 84px;
  border: 1px dashed #cfc6de;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.74);
  text-align: center;
  padding: 12px;
}

.content-grid,
.split-band,
.admin-shell,
.article-layout {
  padding: clamp(28px, 6vw, 72px) clamp(16px, 5vw, 64px);
}

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

.search-box {
  display: grid;
  gap: 6px;
  width: min(340px, 100%);
  color: var(--muted);
  font-weight: 800;
}

.search-box input,
.stack-form input,
.stack-form textarea,
.stack-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  outline: 0;
}

.search-box input:focus,
.stack-form input:focus,
.stack-form textarea:focus,
.stack-form select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(98, 23, 201, 0.1);
}

.category-row,
.admin-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.chip,
.tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
  padding: 10px 14px;
  white-space: nowrap;
}

.chip.is-active,
.tab.is-active {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.article-card,
.metric-card,
.login-panel,
.admin-panel,
.reward-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.article-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
}

.article-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(98, 23, 201, 0.14), rgba(255, 176, 0, 0.2));
  object-fit: cover;
}

.article-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.article-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.28;
}

.article-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.article-card .btn {
  margin-top: auto;
}

.split-band {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(20px, 4vw, 48px);
  background: #fbfafc;
}

.compact-list,
.admin-list {
  display: grid;
  gap: 10px;
}

.compact-item,
.admin-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.compact-item strong,
.admin-item strong {
  display: block;
  margin-bottom: 6px;
}

.compact-item span,
.admin-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(16px, 5vw, 64px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 6px 0 0;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--purple));
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.article-body {
  max-width: 860px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--purple);
  font-weight: 850;
}

.article-body h1 {
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1.02;
}

.article-meta {
  margin: 14px 0 22px;
  color: var(--muted);
  font-weight: 750;
}

.article-cover {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.rich-content {
  color: #2b263b;
  font-size: 1.06rem;
  line-height: 1.86;
}

.rich-content p {
  margin: 0 0 18px;
}

.article-aside {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
}

.reward-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(21, 18, 38, 0.5);
}

.reward-modal[hidden] {
  display: none;
}

.reward-panel {
  position: relative;
  width: min(430px, 100%);
  padding: 24px;
  animation: liftIn 0.22s ease both;
}

.reward-panel h2 {
  color: var(--purple-dark);
}

.reward-panel p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.icon-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  color: var(--muted);
  font-weight: 900;
}

.admin-shell {
  background: #fbfafc;
}

.admin-pro-shell {
  min-height: 100vh;
  background: #07111f;
  color: #eaf2ff;
}

.admin-overview-only {
  height: 100vh;
  overflow: hidden;
}

.admin-lock {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 430px);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  min-height: 100vh;
  padding: clamp(18px, 5vw, 72px);
  background:
    radial-gradient(circle at top right, rgba(28, 104, 255, 0.28), transparent 34%),
    linear-gradient(135deg, #07111f, #0b1c34 48%, #f9fbff 48%, #f9fbff);
}

.admin-overview-only .admin-lock {
  animation: adminFadeIn 0.55s ease both;
}

.lock-brand {
  display: grid;
  gap: 18px;
  max-width: 640px;
}

.lock-brand > * {
  animation: liftIn 0.58s ease both;
}

.lock-brand img {
  width: min(170px, 44vw);
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.lock-brand h1,
.admin-topbar h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 4.5rem);
}

.lock-brand p:not(.eyebrow) {
  color: #b9c8dc;
  line-height: 1.7;
}

.admin-lock .stack-form,
.admin-workspace .stack-form {
  border: 1px solid rgba(112, 160, 255, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.97);
  color: var(--ink);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.admin-login-card {
  animation: loginCardIn 0.62s cubic-bezier(.2,.8,.2,1) both;
}

.btn.is-loading {
  opacity: 0.78;
  pointer-events: none;
}

.btn.is-loading span::after {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-left: 9px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}

.admin-dashboard.pro {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-dashboard.pro[hidden] {
  display: none;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  padding: 18px;
  background: #07111f;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-brand {
  color: #fff;
}

.admin-sidebar .admin-tabs {
  display: grid;
  gap: 8px;
  overflow: visible;
}

.admin-sidebar .tab {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  color: #c8d6ea;
  border-color: rgba(255, 255, 255, 0.08);
  text-align: left;
}

.admin-sidebar .tab.is-active {
  background: #1d67ff;
  color: #fff;
  border-color: #1d67ff;
}

.admin-sidebar .logout {
  margin-top: auto;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.admin-sidebar footer {
  color: #8fa6c2;
  font-size: 0.82rem;
  line-height: 1.5;
}

.admin-workspace {
  min-width: 0;
  padding: clamp(16px, 3vw, 34px);
  background: #f5f8fc;
  color: var(--ink);
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #081526, #123a78);
  color: #fff;
  box-shadow: 0 20px 50px rgba(9, 28, 58, 0.18);
}

.admin-topbar h1 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.5rem);
}

.admin-topbar span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 8px 12px;
  color: #cfe0ff;
  font-weight: 800;
}

.admin-workspace .admin-panel {
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(10, 33, 70, 0.09);
}

.admin-workspace .metric-card {
  background: #fff;
  box-shadow: 0 14px 36px rgba(14, 44, 92, 0.08);
}

.admin-workspace .metric-card strong {
  color: #0c56d9;
}

.analytics-dashboard {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100vh;
  padding: clamp(12px, 2vw, 22px);
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(33, 111, 255, 0.22), transparent 28%),
    linear-gradient(135deg, #07111f 0%, #0d2039 42%, #f5f8fc 42%, #f5f8fc 100%);
  animation: adminFadeIn 0.45s ease both;
}

.analytics-dashboard[hidden] {
  display: none;
}

.analytics-topbar {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(7, 17, 31, 0.88);
  color: #fff;
  box-shadow: 0 22px 70px rgba(5, 17, 39, 0.24);
  backdrop-filter: blur(18px);
}

.analytics-title h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.45rem, 3vw, 2.4rem);
}

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

.topbar-actions span {
  position: relative;
  border: 1px solid rgba(88, 255, 184, 0.22);
  border-radius: 999px;
  background: rgba(20, 139, 70, 0.14);
  color: #a8ffd4;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 8px 12px 8px 26px;
}

.topbar-actions span::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35f99c;
  transform: translateY(-50%);
  box-shadow: 0 0 0 5px rgba(53, 249, 156, 0.13);
}

.topbar-actions .logout {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  color: #e9f1ff;
  background: rgba(255, 255, 255, 0.08);
}

.analytics-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.analytics-metrics .metric-card {
  min-height: 132px;
  border: 1px solid rgba(21, 80, 160, 0.12);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(9, 34, 72, 0.1);
  animation: metricIn 0.5s ease both;
}

.analytics-metrics .metric-card:nth-child(2) { animation-delay: 0.04s; }
.analytics-metrics .metric-card:nth-child(3) { animation-delay: 0.08s; }
.analytics-metrics .metric-card:nth-child(4) { animation-delay: 0.12s; }
.analytics-metrics .metric-card:nth-child(5) { animation-delay: 0.16s; }
.analytics-metrics .metric-card:nth-child(6) { animation-delay: 0.2s; }

.analytics-metrics .metric-card span {
  color: #64748b;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.analytics-metrics .metric-card strong {
  margin-top: 8px;
  color: #0754d6;
  font-size: clamp(1.65rem, 3.4vw, 2.65rem);
  line-height: 1;
}

.analytics-metrics .metric-card small {
  display: block;
  margin-top: 10px;
  color: #7d8ca2;
  font-weight: 800;
}

.analytics-metrics .hero-metric {
  background: linear-gradient(135deg, #0a58ff, #082553);
}

.analytics-metrics .hero-metric span,
.analytics-metrics .hero-metric small,
.analytics-metrics .hero-metric strong {
  color: #fff;
}

.analytics-panels {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1fr 1fr;
  gap: 12px;
  min-height: 0;
}

.analytics-card {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(20, 62, 120, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  padding: 14px;
  box-shadow: 0 18px 44px rgba(9, 34, 72, 0.1);
}

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

.panel-head h2 {
  color: #13243a;
  font-size: 1.08rem;
}

.panel-head > span {
  color: #64748b;
  font-weight: 900;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(24, minmax(3px, 1fr));
  align-items: end;
  gap: 4px;
  height: min(30vh, 245px);
  padding-top: 18px;
}

.bar-chart span {
  position: relative;
  display: block;
  min-height: 8px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #0a66ff, #5ed6ff);
  animation: barRise 0.55s ease both;
}

.bar-chart i {
  position: absolute;
  top: -17px;
  left: 50%;
  color: #7d8ca2;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 900;
  transform: translateX(-50%);
}

.device-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.device-split div {
  min-height: 130px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-radius: 14px;
  background: #f1f6ff;
}

.device-split strong {
  color: #0754d6;
  font-size: 2.4rem;
  line-height: 1;
}

.device-split span {
  color: #64748b;
  font-weight: 900;
}

.compact-scroll {
  max-height: min(33vh, 270px);
  overflow: auto;
  padding-right: 4px;
}

.overview-credit {
  padding-top: 10px;
  color: #6d7d93;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.admin-loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  background: rgba(7, 17, 31, 0.72);
  color: #fff;
  backdrop-filter: blur(10px);
}

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

.loader-ring {
  width: 58px;
  height: 58px;
  border: 5px solid rgba(255, 255, 255, 0.16);
  border-top-color: #5ed6ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes adminFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes loginCardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes metricIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes barRise {
  from {
    height: 8px;
    opacity: 0.45;
  }
}

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

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1fr);
  gap: 28px;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 34px);
}

.stack-form {
  display: grid;
  gap: 14px;
}

.stack-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 850;
}

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

.check-row {
  display: flex !important;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 10px !important;
}

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

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--green);
}

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

.metric-card {
  padding: 16px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  color: var(--purple-dark);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.admin-panel {
  display: none;
  margin-top: 16px;
  padding: clamp(16px, 3vw, 24px);
}

.admin-panel.is-active {
  display: block;
}

.admin-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.editor-form textarea {
  min-height: 130px;
  resize: vertical;
}

.admin-item {
  display: grid;
  gap: 8px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tiny-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  padding: 8px 10px;
  color: var(--purple-dark);
  font-weight: 850;
}

.tiny-btn.danger {
  color: var(--danger);
}

.admin-credit {
  margin-top: 24px;
  color: var(--muted);
  text-align: center;
  font-weight: 850;
}

.skeleton-card {
  min-height: 260px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f4f0fb, #fff, #f4f0fb);
  background-size: 220% 100%;
  animation: shimmer 1.3s infinite linear;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

@keyframes liftIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1050px) {
  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .article-layout,
  .admin-two-col {
    grid-template-columns: 1fr;
  }

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

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

  .article-aside {
    position: static;
  }
}

@media (max-width: 760px) {
  body[data-page="admin"] {
    overflow: auto;
  }

  .site-header {
    align-items: stretch;
    flex-direction: column;
    min-height: auto;
    padding: 10px 14px;
  }

  .brand {
    width: 100%;
  }

  .top-nav {
    width: 100%;
  }

  .hero-shell,
  .split-band,
  .login-panel,
  .feed-intro,
  .admin-lock,
  .admin-dashboard.pro {
    grid-template-columns: 1fr;
  }

  .feed-intro {
    align-items: stretch;
  }

  .admin-dashboard.pro {
    display: block;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-sidebar .admin-tabs {
    display: flex;
    overflow-x: auto;
  }

  .admin-sidebar .tab {
    width: auto;
    text-align: center;
  }

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

  .admin-overview-only,
  .analytics-dashboard {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .analytics-topbar,
  .analytics-metrics,
  .analytics-panels {
    grid-template-columns: 1fr;
  }

  .analytics-metrics .metric-card {
    min-height: 112px;
  }

  .compact-scroll {
    max-height: 320px;
  }

  .hero-shell {
    min-height: auto;
    padding-top: 28px;
  }

  .hero-visual {
    min-height: 180px;
  }

  .hero-visual img {
    width: min(260px, 80vw);
  }

  .section-head,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .articles-grid,
  .metric-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .article-card-body {
    padding: 15px;
  }

  .content-grid,
  .split-band,
  .admin-shell,
  .article-layout {
    padding-inline: 14px;
  }

  .reward-modal {
    align-items: end;
    padding: 12px;
  }
}

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