:root {
  --report-heading: var(--ink);
  --report-subtle: #3f3b35;
  --report-rule: rgba(18, 18, 18, 0.18);
}

.report-page {
  background:
    repeating-linear-gradient(
      -10deg,
      rgba(18, 18, 18, 0.035) 0 2px,
      transparent 2px 24px
    ),
    linear-gradient(90deg, rgba(73, 255, 130, 0.1), transparent 30% 70%, rgba(255, 62, 165, 0.1)),
    #fbf7ef;
}

.report-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 2px solid var(--ink);
  background: rgba(255, 250, 240, 0.9);
  backdrop-filter: blur(18px);
}

.back-link {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  padding: 0 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 950;
}

.report-hero {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
}

.report-hero h1 {
  max-width: 15em;
  color: var(--report-heading);
  font-size: clamp(2.45rem, 5vw, 4.8rem);
  line-height: 1.08;
  text-shadow:
    0.028em 0.028em 0 rgba(73, 255, 130, 0.28),
    -0.016em 0.052em 0 rgba(255, 62, 165, 0.16);
}

.report-hero h1 span {
  display: block;
}

.report-hero p:not(.eyebrow) {
  max-width: 56rem;
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-weight: 760;
}

.report-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.report-tags span {
  padding: 0.35rem 0.6rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.82rem;
  font-weight: 950;
}

.report-shell {
  display: grid;
  width: min(1120px, calc(100% - 2rem));
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
  margin: 0 auto clamp(3rem, 7vw, 5rem);
}

.report-toc {
  position: sticky;
  top: 5.2rem;
  display: grid;
  gap: 0.5rem;
  max-height: calc(100svh - 6.2rem);
  overflow: auto;
  padding: 1rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.9);
  box-shadow: 5px 5px 0 var(--ink);
}

.report-toc strong {
  font-size: 1rem;
  text-transform: uppercase;
}

.report-toc a {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 850;
  line-height: 1.25;
}

.report-toc a:hover,
.report-toc a.active {
  color: var(--ink);
}

.report-toc .toc-level-3 {
  padding-left: 0.8rem;
}

.report-article {
  padding: clamp(1rem, 3vw, 2.3rem);
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.92);
  box-shadow: 8px 8px 0 var(--ink);
}

.report-article h2,
.report-article h3,
.report-article h4 {
  scroll-margin-top: 6rem;
}

.report-article h2 {
  position: relative;
  margin: 2.75rem 0 1rem;
  padding-bottom: 0.48rem;
  border-bottom: 2px solid var(--report-rule);
  color: var(--report-heading);
  font-size: clamp(1.65rem, 2.9vw, 2.55rem);
  line-height: 1.16;
}

.report-article h2::after {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: min(9rem, 42%);
  height: 2px;
  background: var(--accent);
  content: "";
}

.report-article h2:first-child {
  margin-top: 0;
}

.report-article h3 {
  margin: 2.2rem 0 0.9rem;
  color: var(--report-heading);
  font-size: clamp(1.28rem, 2.1vw, 1.72rem);
  line-height: 1.2;
}

.report-article h4 {
  margin: 1.6rem 0 0.65rem;
  color: var(--report-subtle);
  font-size: 1.15rem;
}

.report-article p,
.report-article li {
  color: #35332f;
  font-size: 1.02rem;
  font-weight: 650;
}

.report-article p {
  margin: 0.8rem 0;
  text-indent: 2em;
}

.report-article strong {
  color: var(--ink);
  font-family: var(--heading-sans);
  font-weight: 900;
}

.callout-title strong {
  color: inherit;
  font-family: inherit;
  font-weight: inherit;
}

.report-article ul,
.report-article ol {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.3rem;
}

.report-article hr {
  height: 2px;
  margin: 2rem 0;
  border: 0;
  background: var(--ink);
  opacity: 0.18;
}

.table-wrap {
  max-width: 100%;
  margin: 1rem 0 1.4rem;
  overflow-x: auto;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fffdf7;
}

.table-wrap table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
  padding: 0.75rem 0.85rem;
  border: 1.5px solid rgba(18, 18, 18, 0.2);
  vertical-align: top;
  color: #35332f;
  font-size: 0.95rem;
}

.table-wrap th {
  background: rgba(73, 255, 130, 0.2);
  font-weight: 950;
}

.report-figure {
  margin: 1rem 0 1.35rem;
  overflow-x: auto;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fffdf7;
  box-shadow: 5px 5px 0 rgba(18, 18, 18, 0.14);
}

.report-figure img {
  display: block;
  width: 100%;
  min-width: 42rem;
  height: auto;
}

.callout {
  margin: 1.2rem 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-left-width: 10px;
  border-radius: 8px;
  background: #f7f8f8;
  box-shadow: 5px 5px 0 rgba(18, 18, 18, 0.12);
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.95rem;
  background: #f8e8ee;
  color: #35332f;
  font-family: var(--heading-sans);
  font-size: 1.1rem;
  font-weight: 950;
}

.callout-title span {
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: #c45079;
  font-size: 0.9rem;
  line-height: 1;
}

.callout p {
  margin: 0;
  padding: 0.95rem;
  text-indent: 0;
}

.callout-insight {
  border-left-color: #c45079;
}

blockquote {
  margin: 1.1rem 0;
  padding: 0.9rem 1rem;
  border-left: 8px solid var(--accent);
  background: rgba(60, 139, 117, 0.12);
}

.rule-flow {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 1.35rem;
}

.flow-row {
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fffdf7;
  box-shadow: 4px 4px 0 var(--ink);
}

.flow-row strong {
  color: var(--ink);
}

.flow-row span {
  color: #35332f;
  font-weight: 900;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #121212;
  color: var(--paper);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 900px) {
  .report-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-toc {
    position: static;
    max-height: none;
  }
}

@media (max-width: 620px) {
  .report-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-hero h1 {
    font-size: clamp(2.2rem, 11vw, 3.6rem);
  }

  .flow-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .report-topbar {
    align-items: center;
    flex-direction: row;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
  }

  .report-topbar .brand small {
    display: none;
  }

  .back-link {
    min-height: 2.25rem;
    padding: 0 0.72rem;
    box-shadow: 3px 3px 0 var(--ink);
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .report-hero,
  .report-shell {
    width: min(100% - 1.25rem, 1120px);
  }

  .report-hero {
    padding: 2rem 0 1.25rem;
  }

  .report-hero h1 {
    max-width: none;
    font-size: clamp(2rem, 10.5vw, 3.05rem);
    line-height: 1.1;
    text-shadow:
      0.022em 0.022em 0 rgba(73, 255, 130, 0.22),
      -0.012em 0.036em 0 rgba(255, 62, 165, 0.14);
  }

  .report-hero p:not(.eyebrow) {
    margin-top: 0.9rem;
    font-size: 0.96rem;
    line-height: 1.65;
  }

  .report-tags {
    gap: 0.42rem;
    margin-top: 0.85rem;
  }

  .report-tags span {
    padding: 0.28rem 0.5rem;
    font-size: 0.72rem;
  }

  .report-shell {
    gap: 0.85rem;
    margin-bottom: 2.25rem;
    min-width: 0;
  }

  .report-toc {
    display: flex;
    gap: 0.45rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    max-height: none;
    padding: 0.7rem;
    box-shadow: 4px 4px 0 var(--ink);
    scrollbar-width: none;
  }

  .report-toc::-webkit-scrollbar {
    display: none;
  }

  .report-toc strong,
  .report-toc a {
    flex: 0 0 auto;
  }

  .report-toc strong {
    display: inline-flex;
    min-height: 2rem;
    align-items: center;
    padding: 0 0.55rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    color: var(--paper);
    background: var(--ink);
    font-size: 0.82rem;
  }

  .report-toc a {
    display: inline-flex;
    max-width: 14rem;
    min-height: 2rem;
    align-items: center;
    overflow: hidden;
    padding: 0 0.58rem;
    border: 1.5px solid rgba(23, 21, 18, 0.22);
    border-radius: 999px;
    background: rgba(255, 250, 240, 0.82);
    font-size: 0.78rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .report-toc .toc-level-3 {
    padding-left: 0.58rem;
  }

  .report-article {
    padding: 1rem 0.9rem;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .report-article h2,
  .report-article h3,
  .report-article h4 {
    scroll-margin-top: 7rem;
  }

  .report-article h2 {
    margin: 2rem 0 0.8rem;
    font-size: clamp(1.38rem, 7vw, 1.82rem);
    line-height: 1.2;
  }

  .report-article h3 {
    margin: 1.65rem 0 0.7rem;
    font-size: clamp(1.12rem, 5.2vw, 1.35rem);
  }

  .report-article h4 {
    margin: 1.25rem 0 0.5rem;
    font-size: 1rem;
  }

  .report-article p,
  .report-article li {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.78;
  }

  .report-article p {
    margin: 0.68rem 0;
  }

  .report-article ul,
  .report-article ol {
    gap: 0.35rem;
    padding-left: 1.15rem;
  }

  .table-wrap,
  .report-figure {
    margin: 0.85rem 0 1.1rem;
    border-radius: 6px;
  }

  .table-wrap table,
  .report-figure img {
    min-width: 36rem;
  }

  .table-wrap th,
  .table-wrap td {
    padding: 0.58rem 0.62rem;
    font-size: 0.84rem;
    line-height: 1.55;
  }

  .callout {
    margin: 1rem 0;
    border-left-width: 7px;
    box-shadow: 4px 4px 0 rgba(18, 18, 18, 0.12);
  }

  .callout-title {
    padding: 0.65rem 0.75rem;
    font-size: 0.98rem;
  }

  .callout p {
    padding: 0.75rem;
  }

  blockquote {
    padding: 0.75rem 0.85rem;
    border-left-width: 6px;
  }

  .flow-row {
    grid-template-columns: 1fr;
    padding: 0.7rem;
    box-shadow: 3px 3px 0 var(--ink);
  }
}

@media (max-width: 420px) {
  .report-hero h1 {
    font-size: clamp(1.82rem, 9.6vw, 2.45rem);
  }

  .report-article {
    padding: 0.85rem 0.78rem;
  }

  .report-article p,
  .report-article li {
    font-size: 0.92rem;
  }

  .table-wrap table,
  .report-figure img {
    min-width: 32rem;
  }
}
