:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #14b8a6;
  --warning: #f59e0b;
  --ink: #070b16;
  --hot: #f43f5e;
  --radius: 22px;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 5%, rgba(20, 184, 166, 0.18), transparent 28rem),
    radial-gradient(circle at 86% 0%, rgba(37, 99, 235, 0.18), transparent 34rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 34rem);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

.top-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.55rem 1rem;
  color: #cbd5e1;
  background: var(--ink);
  font-size: 0.83rem;
  font-weight: 800;
}

.top-strip span {
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.top-strip a {
  color: #cbd5e1;
}

.top-strip a:hover {
  color: #ffffff;
}

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

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

table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem clamp(1rem, 4vw, 4rem);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  color: #ffffff;
  font-weight: 900;
  place-items: center;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, var(--ink), var(--primary) 58%, var(--accent));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #334155;
  font-weight: 700;
}

.main-nav a {
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
}

.main-nav a:hover,
.main-nav a.active {
  color: #ffffff;
  background: var(--ink);
}

.menu-button {
  display: none;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--surface);
}

.app {
  width: min(1180px, calc(100% - 2rem));
  min-height: 72vh;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1.5rem;
  align-items: stretch;
  padding: 1.2rem 0 2rem;
}

.hero-card,
.panel,
.article-card,
.sidebar-card,
.admin-card,
.form-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 3rem);
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(7, 11, 22, 0.92), rgba(29, 78, 216, 0.86)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.14'%3E%3Cpath d='M0 130h260M130 0v260M36 36l188 188M224 36 36 224'/%3E%3Ccircle cx='130' cy='130' r='86'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover, 250px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--primary-dark);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-card .eyebrow {
  color: #a7f3d0;
}

.hero h1,
.article h1 {
  margin: 0.7rem 0 1rem;
  font-size: clamp(2.15rem, 6vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p,
.lead {
  color: #475569;
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-card p {
  color: #dbeafe;
  max-width: 46rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.7rem 1.05rem;
  color: #ffffff;
  font-weight: 800;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  cursor: pointer;
}

.button:hover {
  background: var(--primary-dark);
}

.button.secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--surface);
}

.hero-card .button.secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.button.danger {
  background: #dc2626;
}

.hero-side {
  display: grid;
  gap: 1rem;
}

.news-ticker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 0.3rem 0 0.4rem;
  padding: 0.8rem 1rem;
  color: #334155;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.news-ticker strong {
  color: #ffffff;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--hot);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.76rem;
}

.editor-card {
  display: grid;
  gap: 0.75rem;
  padding: 1.1rem;
  color: #ffffff;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #111827, #0f172a);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.editor-card .eyebrow {
  color: #67e8f9;
}

.editor-card a {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
}

.editor-card small {
  color: #94a3b8;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat {
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
}

.stat strong {
  display: block;
  font-size: 1.8rem;
}

.search-box {
  display: flex;
  gap: 0.7rem;
  padding: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.2rem 0 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid #0f172a;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  letter-spacing: -0.04em;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.category-card {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
}

.category-card::before {
  content: "";
  display: block;
  width: 2.4rem;
  height: 0.28rem;
  margin-bottom: 0.8rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.category-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 1.5rem;
  align-items: start;
}

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

.article-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 65px rgba(15, 23, 42, 0.12);
}

.article-cover {
  display: grid;
  min-height: 12rem;
  padding: 1rem;
  color: #ffffff;
  align-content: space-between;
  background:
    linear-gradient(135deg, rgba(7, 11, 22, 0.12), rgba(7, 11, 22, 0.56)),
    linear-gradient(135deg, #1d4ed8, #14b8a6);
}

.article-cover strong {
  max-width: 12rem;
  font-size: 1.35rem;
  line-height: 1.05;
}

.article-cover span {
  justify-self: start;
  padding: 0.28rem 0.55rem;
  color: #111827;
  font-size: 0.78rem;
  font-weight: 900;
  border-radius: 999px;
  background: #ffffff;
}

.article-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.1rem;
}

.article-card h3 {
  margin: 0.4rem 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

.meta,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.tag,
.pill {
  display: inline-flex;
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
  background: var(--surface-soft);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
}

.sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 5.5rem;
}

.sidebar-card,
.panel,
.admin-card,
.form-card {
  padding: 1.1rem;
}

.sponsor-panel {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.sidebar-card h3,
.panel h3 {
  margin-top: 0;
}

.compact-list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-list a {
  display: block;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #ffffff;
}

.ad-slot {
  padding: 1rem;
  border: 1px dashed #93c5fd;
  border-radius: 1.2rem;
  background:
    repeating-linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0 8px, transparent 8px 16px),
    linear-gradient(135deg, #eff6ff, #f0fdfa);
}

.ad-label {
  display: inline-block;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 760px) 330px;
  gap: 1.5rem;
  align-items: start;
}

.article {
  padding: clamp(1.2rem, 4vw, 2.6rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.article::before,
.admin-card::before {
  content: "";
  display: block;
  height: 0.35rem;
  margin: -1.1rem -1.1rem 1.1rem;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--hot));
}

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

.article-content {
  color: #263244;
  font-size: 1.06rem;
}

.article-content h2,
.article-content h3 {
  margin-top: 2rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.article-content p {
  margin: 1.05rem 0;
}

.article-content ul,
.article-content ol {
  padding-left: 1.35rem;
}

.affiliate-box {
  margin: 1.4rem 0;
  padding: 1.1rem;
  border: 1px solid #bfdbfe;
  border-radius: 1.2rem;
  background: #eff6ff;
}

.affiliate-box small {
  display: block;
  margin-top: 0.6rem;
  color: var(--muted);
}

.notice {
  padding: 1rem;
  color: #713f12;
  border: 1px solid #fde68a;
  border-radius: 1rem;
  background: #fffbeb;
}

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

.field {
  display: grid;
  gap: 0.35rem;
}

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

.field label {
  color: #334155;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.78rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #ffffff;
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1rem 0;
}

.admin-card h1 {
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1rem, 4vw, 4rem);
  color: #475569;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.site-footer > div:first-child {
  max-width: 560px;
}

.site-footer p {
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.site-footer small {
  align-self: end;
  color: var(--muted);
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-weight: 800;
  justify-content: flex-end;
  max-width: 760px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.page-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 1.5rem auto;
  max-width: 920px;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.page-card h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  margin: 0.2rem 0 1rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.info-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
}

.empty {
  padding: 2rem;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

@media (max-width: 920px) {
  .top-strip {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .menu-button {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    right: 1rem;
    left: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .hero,
  .layout,
  .article-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

@media (max-width: 620px) {
  .app {
    width: min(100% - 1rem, 1180px);
    padding-top: 1rem;
  }

  .site-header {
    padding: 0.8rem;
  }

  .news-ticker {
    border-radius: 1.1rem;
  }

  .brand small {
    display: none;
  }

  .article-grid,
  .form-grid,
  .admin-grid,
  .stat-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .search-box {
    border-radius: 1.1rem;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .site-footer small {
    align-self: flex-start;
  }
}

/* Compact editorial refresh */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #7c3aed;
  --radius: 18px;
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

body {
  line-height: 1.45;
}

.top-strip {
  padding: 0.42rem 1rem;
  font-size: 0.78rem;
}

.site-header {
  padding: 0.72rem clamp(1rem, 4vw, 4rem);
}

.brand-mark {
  width: 2.35rem;
  height: 2.35rem;
}

.brand small {
  font-size: 0.72rem;
}

.main-nav a {
  padding: 0.5rem 0.7rem;
}

.app {
  padding: 1.25rem 0 3rem;
}

.hero {
  gap: 1rem;
  padding: 0.8rem 0 1.45rem;
}

.hero-card {
  padding: clamp(1.25rem, 3vw, 2.2rem);
}

.eyebrow {
  font-size: 0.74rem;
}

.hero h1,
.article h1 {
  margin: 0.55rem 0 0.75rem;
  font-size: clamp(1.9rem, 4.8vw, 3.55rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero p,
.lead {
  font-size: clamp(0.96rem, 1.6vw, 1.08rem);
}

.actions {
  margin-top: 1rem;
}

.button {
  min-height: 2.35rem;
  padding: 0.56rem 0.9rem;
}

.news-ticker {
  margin: 0.15rem 0 0.35rem;
  padding: 0.58rem 0.8rem;
}

.editor-card {
  gap: 0.6rem;
  padding: 0.9rem;
}

.editor-card a {
  padding: 0.68rem;
}

.stat-grid {
  gap: 0.75rem;
}

.stat {
  padding: 0.9rem;
}

.stat strong {
  font-size: 1.45rem;
}

.search-box {
  gap: 0.55rem;
  padding: 0.52rem;
}

.section-head {
  margin: 1.55rem 0 0.8rem;
  padding-bottom: 0.55rem;
}

.section-head h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
}

.category-grid,
.article-grid,
.form-grid,
.admin-grid {
  gap: 0.75rem;
}

.category-card {
  padding: 0.82rem;
}

.category-card::before {
  margin-bottom: 0.55rem;
}

.layout,
.article-shell {
  gap: 1rem;
}

.article-cover {
  min-height: 9.5rem;
  padding: 0.82rem;
}

.article-cover strong {
  font-size: 1.08rem;
}

.article-card-body {
  padding: 0.88rem;
}

.article-card h3 {
  margin: 0.32rem 0;
  font-size: 1.04rem;
  line-height: 1.22;
}

.article-card p,
.sidebar-card p,
.panel p,
.category-card p {
  margin: 0.45rem 0 0.65rem;
}

.meta,
.tags {
  font-size: 0.78rem;
}

.tag,
.pill {
  padding: 0.24rem 0.48rem;
}

.sidebar {
  gap: 0.8rem;
  top: 4.7rem;
}

.sidebar-card,
.panel,
.admin-card,
.form-card {
  padding: 0.95rem;
}

.compact-list {
  gap: 0.55rem;
}

.compact-list a {
  padding: 0.62rem;
}

.ad-slot {
  padding: 0.82rem;
}

.article {
  padding: clamp(1rem, 3vw, 2rem);
}

.article h1 {
  font-size: clamp(1.8rem, 4vw, 2.9rem);
}

.article-content {
  font-size: 1rem;
}

.article-content h2,
.article-content h3 {
  margin-top: 1.45rem;
}

.article-content p {
  margin: 0.78rem 0;
}

.article-image {
  margin: 1rem 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface-soft);
}

.article-image img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.article-image figcaption {
  padding: 0.58rem 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.affiliate-box {
  margin: 1rem 0;
  padding: 0.9rem;
}

.notice {
  padding: 0.82rem;
}

.field input,
.field textarea,
.field select {
  padding: 0.62rem 0.75rem;
}

.admin-toolbar {
  margin: 0.75rem 0;
}

.admin-card h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.7rem);
  line-height: 1.04;
}

th,
td {
  padding: 0.58rem;
}

.site-footer {
  padding: 1.4rem clamp(1rem, 4vw, 4rem);
}

/* UI/UX v2: mobile-first SaaS media polish */
html {
  color-scheme: light;
  scroll-behavior: smooth;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a;
  --surface: #111827;
  --surface-soft: #172033;
  --text: #f9fafb;
  --muted: #94a3b8;
  --line: #1f2937;
  --primary: #38bdf8;
  --primary-dark: #7dd3fc;
  --accent: #a78bfa;
  --ink: #020617;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.header-search {
  min-width: 150px;
}

.header-search input {
  width: 100%;
  min-height: 2.2rem;
  padding: 0.45rem 0.75rem;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  outline: 0;
}

.header-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.hero-media {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

.hero-preview,
.category-hero,
.seo-block,
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-preview {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding: 1rem;
}

.hero-preview img,
.article-thumb img,
.article-hero-image img {
  width: 100%;
  object-fit: cover;
}

.hero-preview img {
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
}

.hero-preview h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.category-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0.75rem 0 1.5rem;
}

.home-section {
  margin: 1.8rem 0;
}

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

.article-card {
  min-height: 100%;
}

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

.article-thumb {
  margin: 0;
  overflow: hidden;
  background: var(--surface-soft);
}

.article-thumb img {
  aspect-ratio: 16 / 9;
  transition: transform 220ms ease;
}

.article-card:hover .article-thumb img {
  transform: scale(1.035);
}

.article-card-body {
  min-height: 260px;
}

.read-more {
  display: inline-flex;
  margin-top: auto;
  color: var(--primary-dark);
  font-weight: 900;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.service-card {
  padding: 1rem;
}

.category-hero,
.seo-block {
  margin: 1rem 0 1.4rem;
  padding: clamp(1rem, 3vw, 2rem);
}

.category-hero h1,
.seo-block h2 {
  margin: 0.4rem 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.4rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--primary-dark);
  font-weight: 800;
}

.article-hero-image {
  margin: 1rem 0;
  overflow: hidden;
  border-radius: 1.1rem;
  background: var(--surface-soft);
}

.article-hero-image img {
  aspect-ratio: 16 / 9;
}

.editorial-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 1.25rem;
}

.info-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(124, 58, 237, 0.05)),
    var(--surface);
}

.info-card h2 {
  margin: 0.35rem 0 0.55rem;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.info-card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.info-card li + li {
  margin-top: 0.35rem;
}

.article-content {
  font-size: clamp(1.06rem, 1.5vw, 1.125rem);
}

.affiliate-box ul {
  margin: 0.7rem 0;
  padding-left: 1.2rem;
}

.affiliate-box .button,
.sticky-affiliate .button {
  width: 100%;
}

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

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

@media (max-width: 920px) {
  .main-nav.open .header-search {
    min-width: 100%;
  }

  .hero-media {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .article-grid,
  .service-grid,
  .category-rail {
    grid-template-columns: 1fr;
  }

  .article-card-body {
    min-height: auto;
  }

  .editorial-blocks {
    grid-template-columns: 1fr;
  }

  .button,
  .hero-card .button.secondary {
    width: 100%;
  }

  .header-search {
    min-width: 100%;
  }
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.14), transparent 26rem),
    radial-gradient(circle at 90% 0%, rgba(96, 165, 250, 0.14), transparent 32rem),
    linear-gradient(180deg, #050816 0%, var(--bg) 36rem);
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .compact-list a,
html[data-theme="dark"] .button.secondary,
html[data-theme="dark"] .page-card,
html[data-theme="dark"] .info-card {
  background: rgba(15, 23, 42, 0.88);
}

html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .editor-card {
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.94), rgba(30, 64, 175, 0.72)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.10'%3E%3Cpath d='M0 130h260M130 0v260M36 36l188 188M224 36 36 224'/%3E%3Ccircle cx='130' cy='130' r='86'/%3E%3C/g%3E%3C/svg%3E");
}

html[data-theme="dark"] .article,
html[data-theme="dark"] .article-card,
html[data-theme="dark"] .sidebar-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .news-ticker {
  background: rgba(15, 23, 42, 0.86);
  border-color: var(--line);
}

html[data-theme="dark"] .hero p,
html[data-theme="dark"] .lead,
html[data-theme="dark"] .article-content {
  color: #cbd5e1;
}

:focus-visible {
  outline: 3px solid rgba(34, 211, 238, 0.75);
  outline-offset: 3px;
}

.theme-toggle {
  display: inline-grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
}

.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  padding: 0.25rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.filter-bar button {
  flex: 0 0 auto;
  padding: 0.52rem 0.75rem;
  color: var(--muted);
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
}

.filter-bar button:hover,
.filter-bar button.active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

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

.article-card {
  content-visibility: auto;
  contain-intrinsic-size: 360px;
}

.article-card h3 a:hover,
.compact-list a:hover,
.category-card:hover {
  color: var(--primary-dark);
}

.article {
  max-width: 780px;
  margin-inline: auto;
}

.article-content {
  max-width: 68ch;
  color: #253044;
  line-height: 1.72;
}

.article-content h2 {
  margin-top: 2rem;
  padding-top: 0.5rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.article-content h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
}

.article-content a {
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.toc {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0;
  padding: 0.85rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface-soft);
}

.toc strong {
  color: var(--text);
}

.toc span {
  font-size: 0.9rem;
}

.sticky-affiliate {
  padding: 1rem;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 12rem),
    linear-gradient(135deg, rgba(37, 99, 235, 0.09), rgba(20, 184, 166, 0.08)),
    var(--surface);
  box-shadow: var(--shadow);
}

.sticky-affiliate h3,
.affiliate-box h3 {
  margin: 0.35rem 0;
}

.sticky-affiliate small,
.affiliate-box small {
  line-height: 1.45;
}

.faq-block {
  margin-top: 1.4rem;
}

.faq-block details {
  margin: 0.6rem 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface-soft);
}

.faq-block summary {
  font-weight: 900;
  cursor: pointer;
}

.faq-block p {
  margin-bottom: 0;
  color: var(--muted);
}

@media (min-width: 921px) {
  .article-shell {
    grid-template-columns: minmax(0, 820px) 320px;
  }

  .sticky-affiliate {
    position: sticky;
    top: 5.25rem;
  }
}

@media (max-width: 620px) {
  .top-strip {
    gap: 0.8rem;
    white-space: nowrap;
  }

  .hero-card {
    border-radius: 1.15rem;
  }

  .hero h1,
  .article h1 {
    font-size: clamp(1.75rem, 10vw, 2.45rem);
  }

  .article {
    padding: 1rem;
  }

  .article-content {
    font-size: 1rem;
    line-height: 1.68;
  }

  .article-image img {
    max-height: 280px;
  }

  .filter-bar {
    margin-inline: -0.25rem;
  }

  .theme-toggle {
    width: 100%;
  }
}
