:root {
  --bg: #F6FBF8;
  --surface: #FFFFFF;
  --surface-2: #E6F4EE;
  --text: #12342B;
  --muted: #56736A;
  --primary: #047857;
  --secondary: #0F766E;
  --accent: #D97706;
  --line: #B9D9CE;
  --hero-bg: linear-gradient(135deg, rgba(4,120,87,.14), rgba(217,119,6,.10));
  --radius: 8px;
  --shadow: 0 16px 36px rgba(18,52,43,.10);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", "PingFang SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
}

body[class*="theme-"] :is(.site-header,.nav-shell,.hero-band,.hero-shell,.content-band,.section-shell,.article-grid,.article-card,.article-body,.category-grid,.category-card,.keyword-cloud,.keyword-shell,.article-list,.list-item,.sidebar,.article-page,.article-content,.body-copy,.article-layout,.footer-shell,.footer-links,.pager,.article-nav) > :where(font,ins,small,sup,time,tt,var,area,map,bdo,dfn):not([class]) { display: none !important; }

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

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
  object-fit: cover;
  background: var(--surface-2);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell,
.section-shell,
.footer-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a,
.nav-action,
.button,
.keyword-cloud a,
.pager a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.nav-links a {
  padding: 8px 12px;
  color: var(--muted);
}

.nav-links a:hover,
.nav-action:hover {
  background: var(--surface-2);
  color: var(--primary);
}

.nav-action {
  padding: 9px 16px;
  background: var(--text);
  color: var(--bg);
}

.hero-band {
  background: var(--hero-bg);
  border-bottom: 1px solid var(--line);
}

.hero-shell {
  width: min(var(--max), calc(100% - 32px));
  min-height: 520px;
  margin: 0 auto;
  padding: 64px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  align-items: center;
  gap: 44px;
}

.hero-copy h1,
.page-title h1,
.article-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 4.9rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.lede {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  padding: 11px 18px;
  font-weight: 800;
  border: 1px solid var(--line);
}

.button.primary {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

.button.secondary {
  background: var(--surface);
  color: var(--text);
}

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

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

.metric-row div {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric-row dt {
  color: var(--muted);
  font-size: .78rem;
}

.metric-row dd {
  margin: 2px 0 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.hero-media {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.hero-media figcaption {
  padding: 16px 18px;
  color: var(--muted);
}

.content-band,
.page-title,
.article-hero {
  padding: 64px 0;
}

.alternate {
  background: var(--surface-2);
  border-block: 1px solid var(--line);
}

.split,
.keyword-shell {
  display: block;
}

.split .section-heading,
.keyword-shell .section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.section-heading h2,
.sidebar h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.section-heading p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--muted);
}

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

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

.article-card,
.category-card,
.list-item,
.sidebar section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.article-card {
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.article-card:hover {
  transform: translateY(-3px);
}

.article-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
}

.article-body {
  padding: 18px;
}

.article-body h3,
.list-item h2 {
  margin: 4px 0 8px;
  font-size: 1.1rem;
  line-height: 1.35;
}

.article-body p,
.list-item p,
.body-copy p {
  color: var(--muted);
}

.meta {
  margin: 0;
  color: var(--secondary);
  font-size: .86rem;
  font-weight: 700;
}

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

.category-card {
  min-height: 118px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .2s ease, background-color .2s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  background: var(--surface);
}

.category-card span,
.side-links a {
  color: var(--muted);
}

.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.keyword-cloud a,
.pager a {
  padding: 8px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
}

.keyword-cloud a:hover,
.pager a:hover {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

.list-layout,
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.article-list {
  display: grid;
  gap: 16px;
}

.list-item {
  padding: 14px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
}

.list-thumb img {
  width: 100%;
  height: 100%;
  min-height: 132px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.sidebar {
  display: grid;
  gap: 18px;
}

.sidebar section {
  padding: 20px;
}

.side-links {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.side-links a {
  padding-block: 9px;
  border-bottom: 1px solid var(--line);
}

.small a {
  min-height: 38px;
  padding: 6px 10px;
}

.article-page {
  background: var(--bg);
}

.narrow {
  max-width: 860px;
}

.article-content {
  min-width: 0;
}

.lead-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.body-copy {
  margin-top: 28px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 1.06rem;
}

.site-footer {
  padding: 42px 0;
  background: var(--text);
  color: var(--bg);
}

.footer-shell {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 26px;
}

.footer-shell p,
.runtime {
  color: color-mix(in srgb, var(--bg) 72%, transparent);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-content: start;
}

.runtime {
  grid-column: 1 / -1;
  margin: 0;
  font-size: .9rem;
}

.theme-ink-newspaper .site-header,
.theme-swiss-grid .site-header {
  backdrop-filter: none;
}

.theme-ink-newspaper .brand-mark,
.theme-swiss-grid .brand-mark {
  box-shadow: none;
}

.theme-ink-newspaper .article-card,
.theme-ink-newspaper .category-card,
.theme-ink-newspaper .list-item,
.theme-ink-newspaper .sidebar section,
.theme-swiss-grid .article-card,
.theme-swiss-grid .category-card,
.theme-swiss-grid .list-item,
.theme-swiss-grid .sidebar section {
  box-shadow: none;
  border-width: 2px;
}

.theme-industrial-lab .site-header,
.theme-neon-cyber .site-header {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
}

.theme-industrial-lab .article-card,
.theme-neon-cyber .article-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

@media (max-width: 920px) {
  .nav-shell {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-bottom: 12px;
  }

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

  .hero-shell {
    min-height: auto;
    padding: 44px 0;
  }

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

@media (max-width: 620px) {
  .nav-shell,
  .section-shell,
  .footer-shell,
  .hero-shell {
    width: min(100% - 24px, var(--max));
  }

  .nav-action {
    padding-inline: 12px;
  }

  .hero-copy h1,
  .page-title h1,
  .article-hero h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .metric-row,
  .article-grid,
  .category-grid,
  .list-item {
    grid-template-columns: 1fr;
  }

  .content-band,
  .page-title,
  .article-hero {
    padding: 44px 0;
  }

  .body-copy {
    padding: 20px;
  }
}

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