:root {
  color-scheme: light dark;
}

body[data-shareplane-next="artifact"] {
  --rebuild-ink: #16201d;
  --rebuild-muted: #58645f;
  --rebuild-paper: #f3f1e9;
  --rebuild-panel: rgba(255, 255, 255, .72);
  --rebuild-line: rgba(22, 32, 29, .16);
  --rebuild-accent: #bbff57;
  --rebuild-deep: #0e1714;
  --rebuild-reading: 760px;
  --rebuild-max: 1180px;
  --rebuild-radius: 24px;

  margin: 0;
  background: var(--rebuild-paper);
  color: var(--rebuild-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

body[data-shareplane-next="artifact"] .skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 10001;
  padding: .7rem 1rem;
  border-radius: 0 0 8px 8px;
  background: #ffffff;
  color: #000000;
}

body[data-shareplane-next="artifact"] .skip-link:focus {
  top: 0;
}

body[data-shareplane-next="artifact"] .article-shell,
body[data-shareplane-next="artifact"] .article-shell *,
body[data-shareplane-next="artifact"] .article-shell *::before,
body[data-shareplane-next="artifact"] .article-shell *::after {
  box-sizing: border-box;
}

body[data-shareplane-next="artifact"] .article-shell {
  width: min(calc(100% - 2rem), var(--rebuild-max));
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 5rem) 0 6rem;
}

body[data-shareplane-next="artifact"] .article-shell a {
  color: inherit;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

body[data-shareplane-next="artifact"] .article-shell a:focus-visible {
  outline: 3px solid #3b82f6;
  outline-offset: 4px;
  border-radius: 4px;
}

body[data-shareplane-next="artifact"] .article-shell h1,
body[data-shareplane-next="artifact"] .article-shell h2,
body[data-shareplane-next="artifact"] .article-shell h3 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: -.045em;
  text-wrap: balance;
}

body[data-shareplane-next="artifact"] .article-hero {
  min-height: min(680px, 75vh);
  padding: clamp(2rem, 7vw, 6rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 32px;
  background:
    radial-gradient(circle at 80% 15%, rgba(187, 255, 87, .16), transparent 34%),
    linear-gradient(140deg, var(--rebuild-deep), #16263a 70%, #1b3027);
  color: #f7f8f3;
}

body[data-shareplane-next="artifact"] .article-hero .kicker,
body[data-shareplane-next="artifact"] .receipt-card .kicker {
  margin: 0 0 1rem;
  color: var(--rebuild-accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

body[data-shareplane-next="artifact"] .article-hero h1 {
  max-width: 970px;
  font-size: clamp(3.4rem, 8vw, 7.2rem);
}

body[data-shareplane-next="artifact"] .article-hero .dek {
  max-width: 760px;
  margin: 2rem 0;
  color: #c4d0ca;
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
}

body[data-shareplane-next="artifact"] .signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  color: #dbe5df;
}

body[data-shareplane-next="artifact"] .signal-row span {
  padding: .25rem .65rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 750;
}

body[data-shareplane-next="artifact"] .prose {
  width: min(100%, var(--rebuild-reading));
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) 0;
}

body[data-shareplane-next="artifact"] .prose section + section {
  margin-top: 4rem;
}

body[data-shareplane-next="artifact"] .prose h2 {
  margin-bottom: 1.2rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

body[data-shareplane-next="artifact"] .prose p {
  color: #26322e;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: clamp(1.1rem, 1.6vw, 1.28rem);
}

body[data-shareplane-next="artifact"] .pull-section {
  margin-inline: clamp(-7rem, -8vw, -1rem);
}

body[data-shareplane-next="artifact"] .pullquote {
  padding-left: clamp(1rem, 3vw, 2rem);
  border-left: 10px solid var(--rebuild-accent);
  color: var(--rebuild-ink);
  font-family: inherit;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  font-weight: 850;
  line-height: 1.04;
  letter-spacing: -.045em;
}

body[data-shareplane-next="artifact"] .decision-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

body[data-shareplane-next="artifact"] .decision-grid > div {
  padding: 1.2rem;
  border: 1px solid var(--rebuild-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .5);
}

body[data-shareplane-next="artifact"] .decision-grid strong {
  font-size: 1.25rem;
}

body[data-shareplane-next="artifact"] .decision-grid p {
  margin-bottom: 0;
  font-family: inherit;
  font-size: .95rem;
}

body[data-shareplane-next="artifact"] .receipt-card {
  padding: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: 2rem;
  align-items: center;
  border-radius: var(--rebuild-radius);
  background: var(--rebuild-deep);
  color: #f4f6f1;
}

body[data-shareplane-next="artifact"] .receipt-card h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

body[data-shareplane-next="artifact"] .receipt-card dl {
  margin: 0;
}

body[data-shareplane-next="artifact"] .receipt-card dl > div {
  padding: .75rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

body[data-shareplane-next="artifact"] .receipt-card dl > div:last-child {
  border-bottom: 0;
}

body[data-shareplane-next="artifact"] .receipt-card dt {
  color: #91a098;
}

body[data-shareplane-next="artifact"] .receipt-card dd {
  margin: 0;
  text-align: right;
  font-weight: 750;
}

body[data-shareplane-next="artifact"] .receipt-card a {
  color: var(--rebuild-accent);
  font-weight: 800;
}

@media (max-width: 800px) {
  body[data-shareplane-next="artifact"] .article-hero {
    min-height: 560px;
    border-radius: 22px;
  }

  body[data-shareplane-next="artifact"] .decision-grid {
    grid-template-columns: 1fr 1fr;
  }

  body[data-shareplane-next="artifact"] .receipt-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  body[data-shareplane-next="artifact"] .decision-grid {
    grid-template-columns: 1fr;
  }

  body[data-shareplane-next="artifact"] .pull-section {
    margin-inline: 0;
  }
}

@media (prefers-color-scheme: dark) {
  body[data-shareplane-next="artifact"] {
    --rebuild-paper: #111815;
    --rebuild-ink: #edf2ed;
    --rebuild-muted: #a6b2ac;
    --rebuild-panel: rgba(255, 255, 255, .045);
    --rebuild-line: rgba(255, 255, 255, .14);
  }

  body[data-shareplane-next="artifact"] .prose p {
    color: #d1d9d4;
  }

  body[data-shareplane-next="artifact"] .decision-grid > div {
    background: rgba(255, 255, 255, .035);
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-shareplane-next="artifact"] .article-shell {
    scroll-behavior: auto;
  }
}
