/*
 * Design tokens — canonical values for the two page families.
 * Article templates (body.article-page) and source browsers (body.source-page)
 * inherit these and only override what is genuinely page-specific.
 */

/* Light article theme */
body.article-page {
  --ink: #182126;
  --muted: #5b6770;
  --line: #d9e0e2;
  --panel: #f7faf9;
  --paper: #ffffff;
  --accent: #0d6b63;
  --accent-soft: #e4f2ef;
  --rust: #b25335;
  --warn: #9a5b13;
  --gold: #9a6b18;
  --code-bg: #101820;
  --code-ink: #ecf3f5;
  --code: #24313d;
  --night: #101820;
}

/* Dark source-browser theme */
body.source-page {
  --bg: #0f1518;
  --panel: #141d21;
  --ink: #e8f0f2;
  --muted: #90a1a8;
  --line: #26343a;
  --accent: #69d3c6;
  --accent-2: #f19a7a;
  --highlight: #263f3d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.article-hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 30px;
  align-items: end;
}

.article-hero-grid > * {
  min-width: 0;
}

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

.article-hero-visual {
  width: 100%;
  max-width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line, #d8e3e0);
  border-radius: 8px;
  background: #101820;
  box-shadow: 0 22px 64px rgba(20, 32, 36, 0.16);
  overflow: hidden;
}

.article-hero-visual img,
.source-header-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.source-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.source-title-copy {
  min-width: 0;
}

.source-header-visual {
  flex: 0 0 min(230px, 24vw);
  margin: 0;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line, #26343a);
  border-radius: 8px;
  background: #101820;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

@media (max-width: 820px) {
  .article-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .article-hero-visual {
    order: -1;
  }
}

@media (max-width: 760px) {
  .source-title-row {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .source-header-visual {
    flex-basis: auto;
    width: min(100%, 360px);
  }
}
