/* Scoop Wire — original light magazine theme */
:root {
  --sw-bg: #f7f6fb;
  --sw-bg-soft: #efeef8;
  --sw-surface: #ffffff;
  --sw-ink: #1c1a2b;
  --sw-muted: #6b6680;
  --sw-line: #e4e1f0;
  --sw-accent: #6c5ce7;
  --sw-accent-2: #a29bfe;
  --sw-accent-soft: rgba(108, 92, 231, 0.12);
  --sw-accent-deep: #5649c0;
  --sw-radius: 18px;
  --sw-radius-sm: 12px;
  --sw-shadow: 0 18px 40px rgba(48, 36, 110, 0.08);
  --sw-shadow-sm: 0 8px 20px rgba(48, 36, 110, 0.06);
  --sw-font: "Manrope", system-ui, sans-serif;
  --sw-display: "Newsreader", Georgia, serif;
  --sw-max: 1180px;
  --sw-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.sw-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sw-font);
  color: var(--sw-ink);
  background:
    radial-gradient(1200px 500px at 8% -10%, rgba(162, 155, 254, 0.28), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(108, 92, 231, 0.12), transparent 50%),
    linear-gradient(180deg, #faf9fd 0%, var(--sw-bg) 40%, #f3f1fa 100%);
  line-height: 1.55;
}

body.sw-nav-open {
  overflow: hidden;
}

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

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

a:hover {
  color: var(--sw-accent);
}

.sw-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;
}

.sw-preview {
  background: var(--sw-accent);
  color: #fff;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

.sw-preview a {
  color: #fff;
  text-decoration: underline;
}

/* Header */
.sw-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(247, 246, 251, 0.84);
  border-bottom: 1px solid rgba(228, 225, 240, 0.9);
}

.sw-header-inner {
  max-width: var(--sw-max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.sw-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
}

.sw-brand-mark {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.55rem;
  background:
    linear-gradient(135deg, var(--sw-accent) 0%, var(--sw-accent-2) 100%);
  box-shadow: 0 0 0 4px var(--sw-accent-soft);
  position: relative;
}

.sw-brand-mark::after {
  content: "";
  position: absolute;
  inset: 28% 22% auto auto;
  width: 42%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 4px 0 #fff, 0 8px 0 #fff;
}

.sw-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.15rem;
  justify-content: center;
}

.sw-nav-link {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sw-muted);
  transition: background 0.2s var(--sw-ease), color 0.2s var(--sw-ease);
}

.sw-nav-link:hover,
.sw-nav-link.is-active {
  color: var(--sw-accent);
  background: var(--sw-accent-soft);
}

.sw-header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.sw-icon-btn {
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--sw-line);
  border-radius: 999px;
  background: var(--sw-surface);
  color: var(--sw-ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.sw-icon-btn:hover {
  border-color: var(--sw-accent-2);
  color: var(--sw-accent);
  box-shadow: var(--sw-shadow-sm);
}

.sw-admin-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sw-accent);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: var(--sw-accent-soft);
}

.sw-nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--sw-line);
  border-radius: 0.7rem;
  background: var(--sw-surface);
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.sw-nav-toggle span {
  display: block;
  width: 1rem;
  height: 2px;
  background: var(--sw-ink);
  border-radius: 2px;
}

.sw-search {
  max-width: var(--sw-max);
  margin: 0 auto;
  padding: 0 1.25rem 0.9rem;
  display: none;
  gap: 0.55rem;
}

.sw-search.is-open {
  display: flex;
}

.sw-search input {
  flex: 1;
  border: 1px solid var(--sw-line);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font: inherit;
  background: var(--sw-surface);
}

.sw-search input:focus {
  outline: 2px solid var(--sw-accent-soft);
  border-color: var(--sw-accent);
}

.sw-search button,
.sw-btn {
  border: 0;
  border-radius: 999px;
  background: var(--sw-accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.7rem 1.15rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s var(--sw-ease), background 0.2s;
}

.sw-search button:hover,
.sw-btn:hover {
  background: var(--sw-accent-deep);
  color: #fff;
  transform: translateY(-1px);
}

.sw-btn-ghost {
  background: transparent;
  color: var(--sw-accent);
  border: 1px solid var(--sw-accent-2);
}

.sw-btn-ghost:hover {
  background: var(--sw-accent-soft);
  color: var(--sw-accent-deep);
}

/* Main */
.sw-main {
  max-width: var(--sw-max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3.5rem;
}

[data-sw-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--sw-ease), transform 0.55s var(--sw-ease);
}

[data-sw-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Hero */
.sw-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.85fr);
  gap: 1.35rem;
  margin-bottom: 2.5rem;
}

.sw-hero-main {
  background: var(--sw-surface);
  border: 1px solid var(--sw-line);
  border-radius: calc(var(--sw-radius) + 4px);
  overflow: hidden;
  box-shadow: var(--sw-shadow);
  display: grid;
  grid-template-rows: minmax(220px, 320px) auto;
}

.sw-hero-media {
  display: block;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #d9d4ff, #f2efff);
}

.sw-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--sw-ease);
}

.sw-hero-media:hover img {
  transform: scale(1.04);
}

.sw-hero-copy {
  padding: 1.4rem 1.5rem 1.6rem;
}

.sw-hero-copy h1 {
  font-family: var(--sw-display);
  font-size: clamp(1.7rem, 3.2vw, 2.55rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0.45rem 0 0.75rem;
  font-weight: 700;
}

.sw-hero-copy h1 a:hover {
  color: var(--sw-accent);
}

.sw-hero-empty {
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 280px;
  background:
    linear-gradient(160deg, rgba(108, 92, 231, 0.08), transparent 55%),
    var(--sw-surface);
}

.sw-hero-rail {
  background: var(--sw-surface);
  border: 1px solid var(--sw-line);
  border-radius: calc(var(--sw-radius) + 4px);
  padding: 1.2rem 1.15rem 1.3rem;
  box-shadow: var(--sw-shadow-sm);
}

.sw-rail-head h2 {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sw-accent);
}

.sw-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.95rem;
}

.sw-rail-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--sw-line);
}

.sw-rail-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sw-rail-num {
  font-weight: 800;
  color: var(--sw-accent-2);
  font-size: 0.95rem;
  line-height: 1.4;
}

.sw-rail-title {
  display: block;
  font-weight: 700;
  line-height: 1.35;
  margin: 0.15rem 0 0.25rem;
}

.sw-rail-list time {
  color: var(--sw-muted);
  font-size: 0.8rem;
}

/* Shared UI */
.sw-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--sw-accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sw-kicker-sm {
  font-size: 0.7rem;
}

.sw-lede {
  color: var(--sw-muted);
  font-size: 1.02rem;
  margin: 0;
  max-width: 46rem;
}

.sw-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 1rem;
  color: var(--sw-muted);
  font-size: 0.88rem;
  align-items: center;
}

.sw-read-link {
  color: var(--sw-accent);
  font-weight: 700;
}

.sw-badge {
  display: inline-block;
  background: #fff3cd;
  color: #7a5b00;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.sw-section {
  margin-bottom: 2.6rem;
}

.sw-section-head,
.sw-page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.sw-page-head {
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 1.6rem;
}

.sw-section-head h2,
.sw-page-head h1 {
  margin: 0;
  font-family: var(--sw-display);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.sw-section-head h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
}

.sw-page-head h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
}

.sw-section-head h2 a:hover {
  color: var(--sw-accent);
}

.sw-more,
.sw-count {
  color: var(--sw-muted);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.sw-more:hover {
  color: var(--sw-accent);
}

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

.sw-grid-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sw-card {
  background: var(--sw-surface);
  border: 1px solid var(--sw-line);
  border-radius: var(--sw-radius);
  overflow: hidden;
  box-shadow: var(--sw-shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.25s var(--sw-ease), box-shadow 0.25s var(--sw-ease);
}

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

.sw-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(145deg, #ddd8ff, #f4f2ff);
}

.sw-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--sw-ease);
}

.sw-card:hover .sw-card-media img {
  transform: scale(1.05);
}

.sw-card-body {
  padding: 1rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.sw-card-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sw-card-excerpt {
  margin: 0;
  color: var(--sw-muted);
  font-size: 0.9rem;
  flex: 1;
}

.sw-card-date {
  color: var(--sw-muted);
  font-size: 0.8rem;
}

.sw-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--sw-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--sw-accent);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.7), transparent 45%),
    linear-gradient(145deg, #d8d2ff, #f0edff);
}

.sw-fallback-lg {
  font-size: 4rem;
  min-height: 220px;
}

.sw-empty,
.sw-empty-page {
  text-align: center;
  color: var(--sw-muted);
  padding: 2rem 1rem;
}

.sw-empty-page {
  background: var(--sw-surface);
  border: 1px solid var(--sw-line);
  border-radius: var(--sw-radius);
  box-shadow: var(--sw-shadow-sm);
  max-width: 520px;
  margin: 2rem auto;
}

.sw-empty-page h1 {
  font-family: var(--sw-display);
  color: var(--sw-ink);
  margin: 0.4rem 0 0.7rem;
}

.sw-empty-page .sw-btn {
  margin-top: 1rem;
}

.sw-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.sw-topic {
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--sw-surface);
  border: 1px solid var(--sw-line);
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.sw-topic:hover {
  background: var(--sw-accent-soft);
  border-color: var(--sw-accent-2);
  color: var(--sw-accent-deep);
}

/* Article */
.sw-article {
  max-width: 760px;
  margin: 0 auto 2.5rem;
}

.sw-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--sw-muted);
  font-size: 0.88rem;
  margin-bottom: 1.1rem;
}

.sw-breadcrumb a:hover {
  color: var(--sw-accent);
}

.sw-article h1 {
  font-family: var(--sw-display);
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0.5rem 0 0.85rem;
}

.sw-article-cover {
  margin: 1.5rem 0;
  border-radius: var(--sw-radius);
  overflow: hidden;
  border: 1px solid var(--sw-line);
  box-shadow: var(--sw-shadow-sm);
}

.sw-article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.sw-prose {
  font-size: 1.05rem;
  line-height: 1.75;
}

.sw-prose p,
.sw-prose ul,
.sw-prose ol,
.sw-prose blockquote {
  margin: 0 0 1.1rem;
}

.sw-prose h2,
.sw-prose h3 {
  font-family: var(--sw-display);
  letter-spacing: -0.02em;
  margin: 1.8rem 0 0.7rem;
}

.sw-prose a {
  color: var(--sw-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sw-prose img {
  border-radius: var(--sw-radius-sm);
  margin: 1rem 0;
}

.sw-prose blockquote {
  border-left: 3px solid var(--sw-accent);
  padding: 0.2rem 0 0.2rem 1rem;
  color: var(--sw-muted);
  font-style: italic;
}

.sw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.5rem;
}

.sw-tags span {
  background: var(--sw-bg-soft);
  color: var(--sw-accent-deep);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.sw-source {
  margin-top: 1.5rem;
}

/* Footer */
.sw-footer {
  border-top: 1px solid var(--sw-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(239, 238, 248, 0.95));
  margin-top: auto;
}

.sw-footer-inner {
  max-width: var(--sw-max);
  margin: 0 auto;
  padding: 2.4rem 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
}

.sw-footer-brand p {
  color: var(--sw-muted);
  max-width: 28rem;
  margin: 0.8rem 0 0;
}

.sw-footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.sw-footer-cols h3 {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sw-accent);
}

.sw-footer-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.sw-footer-cols a {
  color: var(--sw-muted);
  font-weight: 600;
}

.sw-footer-cols a:hover {
  color: var(--sw-accent);
}

.sw-footer-bar {
  max-width: var(--sw-max);
  margin: 0 auto;
  padding: 0.95rem 1.25rem 1.4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--sw-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--sw-line);
}

.sw-footer-theme {
  font-weight: 700;
  color: var(--sw-accent);
}

/* Responsive */
@media (max-width: 980px) {
  .sw-hero {
    grid-template-columns: 1fr;
  }

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

  .sw-footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .sw-header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .sw-nav-toggle {
    display: inline-flex;
  }

  .sw-nav {
    position: fixed;
    inset: 3.7rem 0.85rem auto;
    background: var(--sw-surface);
    border: 1px solid var(--sw-line);
    border-radius: var(--sw-radius);
    box-shadow: var(--sw-shadow);
    padding: 0.75rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    z-index: 50;
  }

  .sw-nav.is-open {
    display: flex;
  }

  .sw-nav-link {
    border-radius: var(--sw-radius-sm);
  }

  .sw-grid,
  .sw-grid-row {
    grid-template-columns: 1fr;
  }

  .sw-hero-main {
    grid-template-rows: minmax(180px, 240px) auto;
  }

  .sw-footer-cols {
    grid-template-columns: 1fr;
  }

  .sw-footer-bar {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  [data-sw-reveal] {
    opacity: 1;
    transform: none;
  }
}
