:root {
  --bg: #fcfcfc;
  --paper: #ffffff;
  --ink: #151515;
  --muted: #6d7178;
  --line: #e6e6e6;
  --accent: #b8101f;
  --accent-dark: #7f0d17;
  --soft: #f3f3f3;
  --max: 1160px;
  --content: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body.loading {
  cursor: progress;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 0 clamp(18px, 4vw, 54px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 0 1 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  height: 42px;
  object-fit: contain;
}

.brand-name {
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: 0;
}

.top-links {
  display: flex;
  flex: 0 0 auto;
  gap: 26px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.top-links a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, var(--content));
  width: 100%;
  max-width: calc(var(--content) + 36px);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 74px) 18px 88px;
}

.article-stream,
.stream-article {
  min-width: 0;
}

.stream-article-continuation {
  margin-top: 72px;
  padding-top: 54px;
  border-top: 8px solid var(--ink);
}

.article-header {
  margin: 0 0 24px;
  padding: 0 0 30px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 18ch;
  margin-bottom: 20px;
  font-size: clamp(1.95rem, 4.2vw, 3.45rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.article-description,
.intro-block,
.item-copy {
  color: #25282d;
  font-size: 1.12rem;
  line-height: 1.85;
  overflow-wrap: break-word;
}

.article-description {
  max-width: 680px;
  margin-bottom: 18px;
  color: var(--muted);
}

.intro-block {
  padding: 12px 0 34px;
}

.feed {
  display: grid;
  gap: 42px;
}

.page-chunk {
  display: grid;
  gap: 42px;
}

.page-chunk + .page-chunk {
  padding-top: 18px;
}

.page-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-item {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.gallery-item h2 {
  margin-bottom: 18px;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.24;
  letter-spacing: 0;
}

.item-copy {
  margin-bottom: 18px;
}

.media-frame {
  margin: 24px 0 4px;
  background: var(--soft);
  overflow: hidden;
}

.media-frame img {
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 220ms ease;
}

.media-frame img.loaded {
  opacity: 1;
}

.caption {
  display: flex;
  justify-content: flex-end;
  min-height: 22px;
  color: var(--muted);
  font-size: 0.78rem;
}

.caption a {
  border-bottom: 1px solid transparent;
}

.caption a:hover {
  border-color: currentColor;
}

.load-sentinel {
  width: 100%;
  height: 40px;
}

.loader {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 28px 0 14px;
}

.loader[hidden] {
  display: none;
}

.loader span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 700ms ease-in-out infinite alternate;
}

.loader span:nth-child(2) {
  animation-delay: 120ms;
}

.loader span:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes pulse {
  from {
    transform: translateY(0);
    opacity: 0.35;
  }

  to {
    transform: translateY(-7px);
    opacity: 1;
  }
}

.article-footer {
  padding: 44px 0 18px;
}

.article-footer h2 {
  max-width: 520px;
  font-size: clamp(1.55rem, 4vw, 2.6rem);
  line-height: 1.15;
}

.author-box {
  padding-top: 24px;
  border-top: 1px dashed #d5d5d5;
}

.author-box span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.author-box h3 {
  margin: 6px 0 10px;
  font-size: 1.25rem;
}

.author-box p {
  color: var(--muted);
  font-size: 0.92rem;
}

.stream-done {
  margin: 26px 0 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(32px, 5vw, 58px) clamp(18px, 4vw, 54px);
  background: #111;
  color: #fff;
}

.site-footer div {
  display: grid;
  gap: 6px;
}

.site-footer strong {
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1;
}

.site-footer span {
  color: #d7d7d7;
}

.site-footer form {
  display: flex;
  gap: 12px;
  width: min(440px, 100%);
}

.footer-links {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  max-width: 720px;
  color: #d7d7d7;
  font-size: 0.88rem;
  font-weight: 700;
}

.footer-links a:hover {
  color: #fff;
}

.content-page {
  width: min(860px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(34px, 5vw, 72px) 0 88px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 24px;
  color: var(--accent);
  font-weight: 800;
}

.content-card {
  padding: clamp(26px, 4vw, 48px) 0;
  border-top: 8px solid var(--ink);
}

.content-card h1 {
  max-width: none;
  margin-bottom: 20px;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.content-card h2 {
  margin: 32px 0 12px;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.2;
}

.content-card p {
  color: #25282d;
  font-size: 1.08rem;
  line-height: 1.85;
}

.site-footer input {
  min-width: 0;
  width: 100%;
  height: 46px;
  border: 0;
  border-bottom: 1px solid #fff;
  background: transparent;
  color: #fff;
  outline: none;
}

.site-footer input::placeholder {
  color: #fff;
  opacity: 0.8;
}

.site-footer button {
  display: grid;
  place-items: center;
  width: 52px;
  height: 46px;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  font-size: 1.35rem;
}

.site-footer button:hover {
  background: #fff;
  color: #111;
}

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

@media (max-width: 640px) {
  .site-header {
    flex-wrap: wrap;
    gap: 10px 14px;
    min-height: 68px;
    padding: 10px 16px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  .brand-logo {
    height: 34px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 1px solid rgba(21, 21, 21, 0.14);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%);
    box-shadow: 0 10px 24px rgba(21, 21, 21, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    color: var(--ink);
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  }

  .nav-toggle:active {
    transform: scale(0.96);
  }

  .nav-toggle[aria-expanded="true"] {
    border-color: rgba(184, 16, 31, 0.28);
    background: #fff6f7;
    box-shadow: 0 10px 22px rgba(184, 16, 31, 0.12);
    color: var(--accent);
  }

  .nav-toggle-icon {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    transition: transform 180ms ease;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-icon {
    transform: rotate(90deg);
  }

  .top-links {
    display: none;
    flex: 1 0 100%;
    flex-direction: column;
    gap: 0;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
  }

  .site-header.nav-open .top-links {
    display: flex;
  }

  .top-links a {
    padding: 9px 0;
  }

  .article-header {
    padding-top: 2px;
  }

  .stream-article-continuation {
    margin-top: 52px;
    padding-top: 38px;
    border-top-width: 6px;
  }

  .page-shell {
    width: 100%;
    padding: 28px 14px 88px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(1.75rem, 8vw, 2.45rem);
  }

  .article-description,
  .intro-block,
  .item-copy {
    font-size: 1rem;
    line-height: 1.75;
  }

  .feed,
  .page-chunk {
    gap: 34px;
  }

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

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