@font-face {
  font-family: "Instrument Sans";
  src: url("/static/fonts/instrument-sans-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/static/fonts/instrument-sans-medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/static/fonts/instrument-sans-semibold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/static/fonts/instrument-sans-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Hepta Slab";
  src: url("/static/fonts/hepta-slab-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --red: oklch(0.4351 0.1585 22.35);
  --red-dark: oklch(0.3500 0.1350 22.35);
  --red-soft: oklch(0.9590 0.0200 22.35);
  --ink: oklch(0.0847 0 0);
  --night: oklch(0.2164 0.0469 255.95);
  --slate: oklch(0.4159 0.0398 248.81);
  --muted: oklch(0.5000 0.0280 248.81);
  --mist: oklch(0.9300 0.0035 247.86);
  --line: oklch(0.8436 0.0082 253.86);
  --off-white: oklch(0.9421 0.0069 67.74);
  --canvas: oklch(1 0 0);
  --green: oklch(0.5050 0.1250 143.54);
  --green-soft: oklch(0.9650 0.0250 143.54);
  --orange: oklch(0.6200 0.1450 58.75);
  --orange-soft: oklch(0.9600 0.0300 58.75);
  --error: oklch(0.5200 0.1850 27.56);
  --font-ui: "Instrument Sans", Arial, sans-serif;
  --font-display: "Hepta Slab", Georgia, serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --z-sticky: 20;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  background: var(--canvas);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
input,
textarea {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--night);
  outline-offset: 3px;
}

a {
  color: inherit;
}

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

p,
h1,
h2,
h3,
dl,
dd {
  margin: 0;
}

code {
  font: 500 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.section-label,
.sample-label {
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr auto;
  min-height: 72px;
  align-items: stretch;
  background: var(--red);
}

.brand-lockup {
  display: flex;
  align-items: center;
  padding: 12px 24px;
}

.brand-lockup img {
  width: 222px;
  height: auto;
}

.primary-nav {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}

.primary-nav a {
  display: flex;
  align-items: center;
  padding: 0 22px;
  color: var(--canvas);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  background: color-mix(in oklch, var(--ink) 18%, transparent);
}

.app-header form {
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.sign-out {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid color-mix(in oklch, var(--canvas) 65%, transparent);
  background: transparent;
  color: var(--canvas);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.sign-out:hover {
  border-bottom-color: var(--canvas);
}

.dashboard-shell,
.design-shell {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 0 32px 64px;
}

.report-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: end;
  padding: 50px 0 34px;
  border-bottom: 1px solid var(--ink);
}

.report-intro h1 {
  max-width: 800px;
  margin-top: 9px;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.report-lede {
  max-width: 70ch;
  margin-top: 14px;
  color: var(--slate);
  font-size: 16px;
  text-wrap: pretty;
}

.report-meta {
  min-width: 220px;
  padding-bottom: 4px;
  text-align: right;
}

.report-meta p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.status-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge.sample {
  background: var(--red-soft);
  color: var(--red-dark);
}

.status-badge.preliminary {
  background: var(--orange-soft);
  color: oklch(0.3800 0.1000 58.75);
}

.status-badge.reconciled {
  background: var(--green-soft);
  color: oklch(0.3500 0.1050 143.54);
}

.status-badge.unavailable {
  background: var(--mist);
  color: var(--slate);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.metric {
  min-width: 0;
  padding: 24px 22px 22px;
  border-right: 1px solid var(--line);
}

.metric:first-child {
  padding-left: 0;
}

.metric:last-child {
  border-right: 0;
}

.metric > p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.metric-value {
  margin-top: 7px;
  color: var(--night);
  font-size: 30px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
}

.metric-foot {
  display: flex;
  gap: 7px;
  align-items: baseline;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.delta {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.delta.positive {
  color: var(--green);
}

.delta.negative {
  color: var(--error);
}

.delta.neutral {
  color: var(--red);
}

.section-summary {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.section-summary > div {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 20px;
  align-items: baseline;
}

.section-summary > div > span,
.inline-summary strong {
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-summary p {
  max-width: 90ch;
  color: var(--slate);
  font-size: 13px;
}

.summary-state {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
  gap: 24px;
  margin-top: 24px;
}

.business-grid,
.acquisition-section {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.acquisition-section {
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.75fr);
}

.report-module {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--canvas);
}

.module-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.module-header h2 {
  color: var(--night);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.module-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.unit-note {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.driver-list {
  display: grid;
  gap: 15px;
}

.driver-row {
  display: grid;
  grid-template-columns: 150px minmax(100px, 1fr) 38px 52px;
  gap: 12px;
  align-items: center;
}

.driver-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.driver-row strong,
.driver-row span {
  font-size: 12px;
}

.driver-row > div:first-child span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.driver-bar,
.audience-bar,
.acquisition-track,
.bar-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: var(--mist);
}

.driver-bar i,
.audience-bar i,
.acquisition-track i,
.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
}

.driver-row > span {
  color: var(--muted);
  text-align: right;
}

.inline-summary {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 16px;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.inline-summary p {
  color: var(--slate);
  font-size: 12px;
}

.audience-funnel {
  display: grid;
  gap: 13px;
}

.audience-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 10px 18px;
  align-items: center;
}

.audience-row > div:first-child {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.audience-row strong {
  color: var(--night);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.audience-row span {
  color: var(--muted);
  font-size: 11px;
}

.audience-row .delta {
  color: var(--green);
}

.audience-bar {
  grid-column: 1 / -1;
}

.audience-bar i {
  min-width: 5px;
  background: var(--night);
}

.acquisition-list {
  display: grid;
  gap: 13px;
}

.acquisition-row {
  display: grid;
  grid-template-columns: 132px minmax(100px, 1fr) 50px 36px 50px;
  gap: 12px;
  align-items: center;
  font-size: 11px;
}

.acquisition-row strong {
  font-size: 12px;
}

.acquisition-row > span {
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.acquisition-row .delta {
  color: var(--green);
}

.acquisition-row .delta.negative {
  color: var(--error);
}

.analyst-module {
  background: var(--night);
  color: var(--canvas);
  border: 0;
}

.analyst-module .module-header h2,
.analyst-answer strong {
  color: var(--canvas);
}

.analyst-module .module-header p,
.analyst-module label,
.analyst-prompts,
.analyst-answer p {
  color: color-mix(in oklch, var(--canvas) 76%, var(--night));
}

.analyst-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid color-mix(in oklch, var(--canvas) 35%, transparent);
  border-radius: 50%;
  color: var(--canvas);
  font-size: 10px;
  font-weight: 700;
}

.analyst-form {
  display: grid;
  gap: 10px;
}

.analyst-form label {
  font-size: 12px;
}

.analyst-form textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  padding: 12px;
  border: 1px solid color-mix(in oklch, var(--canvas) 30%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in oklch, var(--canvas) 7%, transparent);
  color: var(--canvas);
  line-height: 1.4;
}

.analyst-form textarea::placeholder {
  color: color-mix(in oklch, var(--canvas) 62%, var(--night));
}

.analyst-form button {
  justify-self: start;
  padding: 10px 13px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--red);
  color: var(--canvas);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.analyst-form button:hover {
  background: oklch(0.4900 0.1700 22.35);
}

.analyst-answer,
.analyst-prompts {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid color-mix(in oklch, var(--canvas) 20%, transparent);
  font-size: 12px;
}

.analyst-answer p {
  margin-top: 6px;
}

.analyst-prompts span {
  font-weight: 700;
}

.analyst-prompts p {
  margin-top: 5px;
}

.trend-chart {
  width: 100%;
}

.trend-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-grid {
  stroke: var(--mist);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.chart-line.downloads,
.legend-line.downloads {
  stroke: var(--red);
  background: var(--red);
}

.chart-line.revenue,
.legend-line.revenue {
  stroke: var(--night);
  background: var(--night);
}

.chart-label {
  fill: var(--muted);
  font: 11px var(--font-ui);
}

.chart-legend {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 11px;
}

.chart-legend span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.legend-line {
  display: inline-block;
  width: 22px;
  height: 3px;
  border-radius: 2px;
}

.question-module {
  background: var(--red-soft);
  border: 0;
}

.question-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.question-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid color-mix(in oklch, var(--red) 22%, var(--canvas));
}

.question-list span {
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
}

.question-list p {
  color: var(--night);
  font-size: 13px;
  font-weight: 550;
}

.portfolio-module,
.sources-module,
.media-module {
  margin-top: 24px;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.data-table th,
.data-table td {
  padding: 13px 12px;
  border-top: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.data-table thead th {
  padding-top: 0;
  border-top: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.data-table th:first-child,
.data-table td:first-child {
  padding-left: 0;
  text-align: left;
}

.data-table th:last-child,
.data-table td:last-child {
  padding-right: 0;
}

.data-table tbody th {
  color: var(--night);
  font-weight: 600;
}

.bar-cell {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 30px;
  gap: 9px;
  align-items: center;
}

.bar-track i {
  background: var(--red);
}

.compact-table {
  min-width: 560px;
}

.knowledge-module {
  display: flex;
  flex-direction: column;
  background: var(--off-white);
  border: 0;
}

.knowledge-copy {
  color: var(--night);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.35;
}

.knowledge-stats {
  display: grid;
  gap: 0;
  margin-top: 24px;
}

.knowledge-stats div {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.knowledge-stats dt,
.knowledge-stats dd {
  font-size: 11px;
}

.knowledge-stats dt {
  color: var(--muted);
}

.knowledge-stats dd {
  color: var(--night);
  font-weight: 600;
}

.module-note {
  margin-top: auto;
  padding-top: 22px;
  color: var(--muted);
  font-size: 10px;
}

.media-summary {
  margin-top: -5px;
  margin-bottom: 5px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.media-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.media-row {
  display: flex;
  min-height: 175px;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.media-row:first-child {
  padding-left: 0;
}

.media-row:last-child {
  padding-right: 0;
  border-right: 0;
}

.media-kind {
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.media-row h3 {
  margin-top: 9px;
  color: var(--night);
  font-size: 14px;
  line-height: 1.3;
}

.media-row p,
.media-row > div:last-child span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.media-row > div:last-child strong {
  display: block;
  color: var(--night);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.source-list {
  display: grid;
}

.source-row {
  display: grid;
  grid-template-columns:
    minmax(170px, 1.2fr)
    minmax(130px, 1fr)
    minmax(120px, 0.8fr)
    minmax(130px, 0.9fr)
    minmax(220px, 1.5fr);
  gap: 16px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.source-row strong {
  color: var(--night);
  font-size: 12px;
}

.source-row > span {
  color: var(--slate);
}

.source-row > span:nth-child(4) {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.source-head {
  padding-top: 0;
  border-top: 0;
}

.source-head span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
}

.status-dot.pending {
  background: var(--orange);
}

.status-dot.progress {
  background: var(--green);
}

.status-dot.neutral {
  background: var(--slate);
}

.dashboard-footer,
.design-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-top: 42px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-size: 10px;
}

/* Login */

.login-body {
  min-height: 100vh;
  background: var(--red);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.6fr) minmax(360px, 0.75fr);
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 60px clamp(36px, 6vw, 96px);
}

.login-brand > img {
  width: min(100%, 860px);
  margin: auto 0;
}

.login-copy {
  max-width: 720px;
  color: var(--canvas);
}

.login-copy > p {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
}

.login-copy h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px clamp(30px, 5vw, 72px);
  background: var(--canvas);
}

.login-panel h2 {
  margin-top: 9px;
  color: var(--night);
  font-size: 24px;
  letter-spacing: -0.025em;
}

.login-explainer {
  max-width: 42ch;
  margin-top: 10px;
  color: var(--slate);
  font-size: 13px;
}

.login-form {
  display: grid;
  gap: 9px;
  margin-top: 34px;
}

.login-form label {
  color: var(--night);
  font-size: 12px;
  font-weight: 600;
}

.login-form input {
  width: 100%;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  color: var(--ink);
}

.login-form input:hover {
  border-color: var(--slate);
}

.login-form button {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
  padding: 9px 13px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--red);
  color: var(--canvas);
  cursor: pointer;
  font-weight: 700;
}

.login-form button:hover {
  background: var(--red-dark);
}

.form-error {
  color: var(--error);
  font-size: 12px;
  font-weight: 600;
}

.analyst-module .form-error {
  margin-top: 12px;
  color: oklch(0.8600 0.0850 27.56);
}

.login-footnote {
  margin-top: 26px;
  color: var(--muted);
  font-size: 11px;
}

/* Design system */

.design-shell {
  padding-bottom: 80px;
}

.design-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 360px);
  gap: 60px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--ink);
}

.design-intro h1 {
  max-width: 800px;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.design-intro p:last-child {
  max-width: 68ch;
  margin-top: 13px;
  color: var(--slate);
}

.design-intro img {
  width: 250px;
  justify-self: end;
}

.design-section {
  padding-top: 48px;
}

.design-section > header {
  display: flex;
  gap: 32px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.design-section > header h2 {
  color: var(--night);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.design-section > header p {
  max-width: 54ch;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.swatch-grid article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.swatch-grid article:last-child {
  border-right: 0;
}

.swatch {
  height: 78px;
  margin: -12px -12px 8px;
  border-bottom: 1px solid var(--line);
}

.swatch.red {
  background: var(--red);
}

.swatch.ink {
  background: var(--ink);
}

.swatch.night {
  background: var(--night);
}

.swatch.slate {
  background: var(--slate);
}

.swatch.mist {
  background: var(--mist);
}

.swatch.canvas {
  background: var(--canvas);
}

.swatch-grid strong {
  color: var(--night);
  font-size: 12px;
}

.swatch-grid code,
.swatch-grid small {
  color: var(--muted);
  font-size: 10px;
}

.type-grid,
.logo-grid,
.grammar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.type-grid article {
  min-height: 250px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.type-display > p:nth-child(2) {
  margin-top: 28px;
  font-family: var(--font-display);
  font-size: 40px;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.type-display small {
  display: block;
  max-width: 58ch;
  margin-top: 35px;
  color: var(--muted);
  font-size: 11px;
}

.type-ui h3 {
  margin-top: 30px;
  color: var(--night);
  font-size: 20px;
}

.type-ui > p:nth-child(3) {
  max-width: 54ch;
  margin-top: 10px;
  color: var(--slate);
}

.type-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}

.type-scale span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
}

.logo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.logo-grid article {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border-radius: var(--radius-md);
}

.logo-grid img {
  width: 100%;
  height: 190px;
  object-fit: contain;
}

.logo-grid span {
  font-size: 10px;
  font-weight: 700;
}

.logo-red {
  background: var(--red);
  color: var(--canvas);
}

.logo-white {
  border: 1px solid var(--line);
  background: var(--canvas);
}

.logo-dark {
  background: var(--night);
  color: var(--canvas);
}

.grammar-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grammar-sample {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.grammar-sample.wide {
  grid-column: 1 / -1;
}

.demo-metric {
  margin-top: 16px;
  padding: 0;
  border: 0;
}

.badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.demo-source {
  margin-top: 18px;
}

.behavior-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.behavior-grid article {
  padding: 20px;
  border-right: 1px solid var(--line);
}

.behavior-grid article:last-child {
  border-right: 0;
}

.behavior-grid strong {
  color: var(--night);
  font-size: 13px;
}

.behavior-grid p {
  margin-top: 8px;
  color: var(--slate);
  font-size: 11px;
}

.design-footer a {
  color: var(--red);
  font-weight: 700;
}

@media (max-width: 1120px) {
  .metric-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric {
    border-bottom: 1px solid var(--line);
  }

  .metric:nth-child(3) {
    border-right: 0;
  }

  .metric:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .metric:nth-child(4) {
    padding-left: 0;
  }

  .media-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .media-row:nth-child(2) {
    border-right: 0;
  }

  .media-row:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .media-row:nth-child(3) {
    padding-left: 0;
  }

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

  .source-row > :nth-child(4) {
    grid-column: 1;
  }

  .source-row > :nth-child(5) {
    grid-column: 2 / -1;
  }

  .source-head {
    display: none;
  }

  .swatch-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .swatch-grid article:nth-child(3) {
    border-right: 0;
  }

  .swatch-grid article:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 880px) {
  .app-header {
    position: static;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .brand-lockup {
    grid-column: 1;
    min-width: 0;
    padding-right: 12px;
  }

  .brand-lockup img {
    width: min(222px, 100%);
  }

  .primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    border-top: 1px solid color-mix(in oklch, var(--canvas) 20%, transparent);
  }

  .primary-nav a {
    min-height: 42px;
    padding: 0 18px;
  }

  .app-header form {
    grid-column: 2;
    grid-row: 1;
    padding-left: 8px;
  }

  .dashboard-shell,
  .design-shell {
    padding-inline: 20px;
  }

  .report-grid,
  .business-grid,
  .acquisition-section {
    grid-template-columns: 1fr;
  }

  .report-intro {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .report-meta {
    text-align: left;
  }

  .section-summary,
  .section-summary > div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 45vh;
    padding: 36px;
  }

  .login-brand > img {
    max-width: 680px;
  }

  .login-panel {
    min-height: 55vh;
  }

  .design-intro {
    grid-template-columns: 1fr;
  }

  .design-intro img {
    width: 180px;
    justify-self: start;
  }

  .logo-grid {
    grid-template-columns: 1fr 1fr;
  }

  .behavior-grid {
    grid-template-columns: 1fr 1fr;
  }

  .behavior-grid article:nth-child(2) {
    border-right: 0;
  }

  .behavior-grid article:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .report-intro {
    padding-top: 34px;
  }

  .report-intro h1,
  .design-intro h1 {
    font-size: 34px;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric,
  .metric:first-child,
  .metric:nth-child(4) {
    padding: 18px 14px;
  }

  .metric:nth-child(2n) {
    border-right: 0;
  }

  .metric:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .metric:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .metric-foot {
    flex-wrap: wrap;
  }

  .driver-row {
    grid-template-columns: 1fr 48px;
  }

  .driver-row > div:first-child {
    grid-column: 1 / -1;
  }

  .driver-bar {
    grid-column: 1;
  }

  .acquisition-row {
    grid-template-columns: 1fr 50px 40px 50px;
  }

  .acquisition-row strong,
  .acquisition-track {
    grid-column: 1 / -1;
  }

  .inline-summary {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .report-module {
    padding: 18px;
  }

  .media-list {
    grid-template-columns: 1fr;
  }

  .media-row,
  .media-row:first-child,
  .media-row:nth-child(3) {
    min-height: 0;
    padding: 18px 0;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .source-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
  }

  .source-row > :nth-child(3),
  .source-row > :nth-child(4),
  .source-row > :nth-child(5) {
    grid-column: auto;
  }

  .source-row > :nth-child(5) {
    grid-column: 1 / -1;
  }

  .dashboard-footer,
  .design-footer,
  .design-section > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .design-section > header p {
    text-align: left;
  }

  .swatch-grid,
  .type-grid,
  .logo-grid,
  .grammar-grid,
  .behavior-grid {
    grid-template-columns: 1fr;
  }

  .swatch-grid article,
  .swatch-grid article:nth-child(3) {
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .swatch-grid article:first-child {
    border-top: 0;
  }

  .grammar-sample.wide {
    grid-column: auto;
  }

  .behavior-grid article,
  .behavior-grid article:nth-child(2) {
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .behavior-grid article:first-child {
    border-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
