@font-face {
  font-family: "Haas Grotesk Text Web";
  src: url("../fonts/NeueHaasGroteskText-55Roman-Web.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Haas Grotesk Text Web";
  src: url("../fonts/NeueHaasGroteskText-65Medium-Web.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Domaine Display";
  src: url("../fonts/domaine-display-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --clay-100: oklch(0.9095 0.0393 74.779);
  --clay-300: oklch(0.7886 0.0779 57.277);
  --clay-500: oklch(0.6006 0.1138 43.755);
  --clay-700: oklch(0.4261 0.1542 33.762);
  --clay-800: oklch(0.3524 0.119 30.115);
  --clay-900: oklch(0.2897 0.0737 35.667);
  --canopy-100: oklch(0.98 0.024 119);
  --canopy-300: oklch(0.79 0.086 146);
  --canopy-600: oklch(0.68 0.096 147);
  --canopy-800: oklch(0.48 0.1 148);
  --canopy-900: oklch(0.38 0.103 141);
  --inkstone-100: oklch(0.9607 0.0188 279.532);
  --inkstone-300: oklch(0.7885 0.0699 279.213);
  --inkstone-600: oklch(0.6736 0.1096 278.303);
  --inkstone-800: oklch(0.4801 0.0996 277.079);
  --grain-100: oklch(0.9683 0.0264 87.852);
  --grain-300: oklch(0.9426 0.0418 87.365);
  --grain-600: oklch(0.7285 0.1015 86.698);
  --grain-800: oklch(0.5166 0.1014 81.654);
  --background: oklch(0.9868 0.0079 73.746);
  --surface: oklch(0.9976 0.0031 99.782);
  --surface-muted: oklch(0.9562 0.0176 73.076);
  --surface-strong: oklch(0.9144 0.027 69.278);
  --foreground: oklch(0.268 0.011 36.5);
  --foreground-strong: oklch(0.214 0.009 43.1);
  --foreground-muted: oklch(0.438 0.017 39.3);
  --border: oklch(0.9144 0.027 69.278);
  --accent: var(--clay-700);
  --accent-hover: var(--clay-800);
  --success: var(--canopy-800);
  --danger: oklch(0.52 0.17 30);
  --warning: oklch(0.68 0.14 78);
  --info: var(--inkstone-600);
  --info-muted: var(--inkstone-100);
  --traffic-paid: oklch(0.9 0.051 36);
  --traffic-direct: oklch(0.7885 0.0699 279.213);
  --traffic-organic: oklch(0.79 0.086 146);
  --traffic-lifecycle: oklch(0.92 0.071 78);
  --traffic-other: oklch(0.868 0.007 39.5);
  --feature-search: oklch(0.8 0.138 190);
  --feature-recommendations: oklch(0.82 0.122 310);
  --feature-ai-chat: oklch(0.8 0.095 0);
  --feature-mcp: oklch(0.8 0.12 78);
  --feature-notes: oklch(0.73 0.12 40);
  --font-body: "Haas Grotesk Text Web", ui-sans-serif, system-ui, sans-serif;
  --font-heading: "Domaine Display", Georgia, serif;
  --radius-xs: 0.25rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --z-dropdown: 20;
  --z-drawer-backdrop: 30;
  --z-drawer: 40;
  --z-drawer-tab: 41;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 100%;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

body {
  min-width: 20rem;
  margin: 0;
  background: var(--background);
}

a {
  color: inherit;
}

button,
select,
input,
textarea {
  font: inherit;
}

::selection {
  background: var(--traffic-direct);
  color: var(--foreground-strong);
}

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

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.site-header__inner,
.page-shell {
  width: min(100% - 2rem, 80rem);
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  gap: var(--space-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.brand img {
  width: 8.6875rem;
  height: auto;
}

.report-label {
  color: var(--foreground-muted);
  font-size: 0.875rem;
}

.date-badge {
  margin-left: auto;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: var(--surface-muted);
  color: var(--foreground-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.page-shell {
  padding-block: var(--space-7) var(--space-5);
}

.page-heading,
.section-heading,
.panel-heading,
.page-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
}

/* Local design-system reference */

.ds-back {
  margin-left: auto;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
}

.ds-back:hover {
  color: var(--accent-hover);
}

.ds-page {
  max-width: 72rem;
}

.ds-intro {
  max-width: 48rem;
  padding-block: var(--space-4) var(--space-7);
}

.ds-intro > p:first-child {
  margin: 0 0 var(--space-2);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
}

.ds-intro h1 {
  max-width: 12ch;
  margin: 0;
  color: var(--foreground-strong);
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.ds-intro > p:last-child {
  max-width: 65ch;
  margin: var(--space-4) 0 0;
  color: var(--foreground-muted);
  line-height: 1.55;
}

.ds-section {
  border-top: 1px solid var(--border);
  padding-block: var(--space-7);
}

.ds-section__heading {
  display: grid;
  grid-template-columns: minmax(10rem, 0.35fr) minmax(0, 0.65fr);
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.ds-section__heading h2,
.ds-palette-group h3 {
  margin: 0;
  color: var(--foreground-strong);
  font-weight: 400;
}

.ds-section__heading h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
}

.ds-section__heading p,
.ds-palette-group p {
  margin: 0;
  color: var(--foreground-muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.ds-marks {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-4);
}

.ds-mark {
  display: flex;
  min-height: 11rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-5);
  margin: 0;
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.ds-mark--light {
  background: var(--surface);
}

.ds-mark--dark {
  background: var(--clay-900);
}

.ds-mark:first-child img {
  width: min(100%, 17rem);
}

.ds-mark:not(:first-child) img {
  width: 4.5rem;
}

.ds-mark figcaption {
  color: var(--foreground-muted);
  font-size: 0.75rem;
}

.ds-mark--dark figcaption {
  color: var(--clay-100);
}

.ds-palette-group {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: var(--space-6);
  padding-block: var(--space-4);
}

.ds-palette-group + .ds-palette-group {
  border-top: 1px solid var(--border);
}

.ds-palette-group h3 {
  font-size: 0.875rem;
  font-weight: 500;
}

.ds-palette-group p {
  margin-top: var(--space-1);
  font-size: 0.75rem;
}

.ds-palette {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
}

.ds-palette--five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ds-swatch {
  min-width: 0;
}

.ds-swatch > span {
  display: block;
  height: 4.5rem;
  border-radius: var(--radius-sm);
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--foreground-strong) 8%, transparent);
}

.ds-swatch b,
.ds-swatch code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ds-swatch b {
  margin-top: var(--space-2);
  font-size: 0.6875rem;
  font-weight: 500;
}

.ds-swatch code,
.ds-spacing code {
  margin-top: 0.15rem;
  color: var(--foreground-muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.625rem;
}

.ds-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.ds-type-sample {
  min-height: 10rem;
  border-radius: var(--radius-md);
  padding: var(--space-5);
  background: var(--surface);
}

.ds-type-sample span {
  color: var(--foreground-muted);
  font-size: 0.6875rem;
}

.ds-type-sample p {
  margin: var(--space-5) 0 0;
}

.ds-type-sample--display p,
.ds-type-sample--heading p {
  color: var(--foreground-strong);
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: -0.025em;
}

.ds-type-sample--display p {
  font-size: 3rem;
  line-height: 1;
}

.ds-type-sample--heading p {
  font-size: 2rem;
  line-height: 1.1;
}

.ds-type-sample--body p {
  max-width: 58ch;
  color: var(--foreground);
  font-size: 0.875rem;
  line-height: 1.55;
}

.ds-type-sample--label p {
  color: var(--foreground-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.ds-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.ds-form-sample {
  margin-top: var(--space-6);
}

.ds-spacing {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-5);
}

.ds-spacing div {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: var(--space-2);
}

.ds-spacing span {
  display: block;
  width: var(--size);
  height: var(--size);
  min-width: 0.25rem;
  min-height: 0.25rem;
  background: var(--clay-300);
}

.ds-radii {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.ds-radius {
  display: grid;
  width: 7rem;
  height: 4.5rem;
  place-items: center;
  background: var(--surface-muted);
  color: var(--foreground-muted);
  font-size: 0.75rem;
}

.ds-radius--sm { border-radius: var(--radius-xs); }
.ds-radius--md { border-radius: var(--radius-sm); }
.ds-radius--lg { border-radius: var(--radius-md); }
.ds-radius--pill { border-radius: 999px; }

.page-heading p,
.section-heading p,
.panel-heading p,
.metric p,
.feature-mix__copy p,
.page-footer {
  margin: 0;
  color: var(--foreground-muted);
}

.page-heading h1,
.summary h2,
.section-heading h2,
.panel h3,
.error-page h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--foreground-strong);
  text-wrap: balance;
}

.page-heading h1 {
  margin-top: var(--space-1);
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.035em;
}

.page-heading__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.ai-drawer-tab {
  position: fixed;
  z-index: var(--z-drawer-tab);
  top: 50%;
  right: 0;
  display: flex;
  width: 4.5rem;
  min-height: 6.75rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-2);
  border: 1px solid var(--clay-300);
  border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: var(--space-3) var(--space-2);
  background: var(--clay-100);
  color: var(--accent);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  transform: translateY(-50%);
  transition: right 180ms ease, border-color 180ms ease, background 180ms ease;
}

.ai-drawer-tab:hover,
.ai-drawer-tab[aria-expanded="true"] {
  border-color: var(--clay-500);
  background: color-mix(in oklch, var(--clay-100) 58%, var(--surface));
  color: var(--accent-hover);
}

.ai-drawer-tab__mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: var(--radius-xs);
  background: var(--accent);
  color: var(--background);
}

.ai-drawer-tab__mark svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.ai-drawer-tab__label {
  max-width: 3ch;
  line-height: 1.05;
  text-align: center;
  white-space: normal;
}

body.ai-drawer-open .ai-drawer-tab {
  right: min(29rem, 100vw);
}

@media (min-width: 48rem) {
  body.dashboard-page {
    padding-right: 4.5rem;
  }
}

.ai-drawer-tab:disabled {
  border-color: var(--border);
  background: var(--surface-muted);
  color: color-mix(in oklch, var(--foreground-muted) 65%, transparent);
  cursor: not-allowed;
}

.ai-empty-state__mark svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.status,
.page-footer span:first-child {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.status {
  color: var(--foreground-muted);
  font-size: 0.75rem;
}

.status i,
.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--success);
}

.status--partial i,
.status-dot--partial {
  background: var(--warning);
}

.week-nav {
  display: flex;
  gap: var(--space-1);
}

.week-picker {
  position: relative;
}

.week-picker__trigger {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: var(--space-2);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0 var(--space-3) 0 var(--space-4);
  background: var(--surface-muted);
  color: var(--foreground);
  cursor: pointer;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.week-picker__trigger:hover,
.week-picker__trigger[aria-expanded="true"] {
  background: var(--surface-strong);
}

.week-picker__trigger svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.week-picker__popover {
  position: absolute;
  z-index: var(--z-dropdown);
  top: calc(100% + var(--space-2));
  right: 0;
  width: min(22rem, calc(100vw - 1.5rem));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  background: var(--surface);
  box-shadow: 0 4px 8px color-mix(in oklch, var(--foreground-strong) 12%, transparent);
}

.week-picker__popover[hidden] {
  display: none;
}

.week-picker__month-nav {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
  align-items: center;
  gap: var(--space-2);
}

.week-picker__month-nav strong {
  color: var(--foreground-strong);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

.week-picker__month-nav button {
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}

.week-picker__month-nav button:hover:not(:disabled) {
  background: var(--surface-muted);
}

.week-picker__month-nav button:disabled {
  color: color-mix(in oklch, var(--foreground-muted) 35%, transparent);
  cursor: default;
}

.week-picker__weekdays,
.week-picker__week {
  display: grid;
  grid-template-columns: 2rem repeat(7, minmax(0, 1fr));
  align-items: center;
  text-align: center;
}

.week-picker__weekdays {
  margin-top: var(--space-2);
  color: var(--foreground-muted);
  font-size: 0.625rem;
}

.week-picker__week {
  min-height: 2.75rem;
  border-radius: var(--radius-sm);
  color: var(--foreground);
  font-size: 0.6875rem;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.week-picker__week[href]:hover {
  background: var(--surface-muted);
}

.week-picker__week[aria-current="date"] {
  background: var(--clay-100);
  color: var(--clay-800);
  font-weight: 500;
}

.week-picker__week:not([href]) {
  color: color-mix(in oklch, var(--foreground-muted) 42%, transparent);
}

.week-picker__week-number {
  color: var(--foreground-muted);
  font-weight: 500;
}

.week-picker__day--outside {
  color: color-mix(in oklch, var(--foreground-muted) 55%, transparent);
}

.week-picker__fallback {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.week-nav a,
.week-nav span {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.week-nav a {
  background: var(--surface-muted);
}

.week-nav a:hover {
  background: var(--surface-strong);
}

.week-nav span {
  color: color-mix(in oklch, var(--foreground-muted) 35%, transparent);
}

.summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--space-7);
  margin-top: var(--space-5);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  background: var(--surface-muted);
}

.section-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
}

.summary h2 {
  max-width: 25rem;
  margin-top: var(--space-2);
  font-size: 2rem;
  line-height: 1.14;
  letter-spacing: -0.025em;
}

.summary__copy {
  max-width: 65ch;
  color: var(--foreground-muted);
  font-size: 0.925rem;
  line-height: 1.6;
}

.summary__copy > p {
  margin: 0;
  white-space: pre-line;
}

.editorial-trigger {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--clay-300);
  border-radius: var(--radius-sm);
  padding: 0.35rem var(--space-3);
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.editorial-trigger:hover {
  border-color: var(--clay-500);
  background: var(--clay-100);
  color: var(--accent-hover);
}

.editorial-trigger--empty {
  background: var(--clay-100);
}

.editorial-trigger--empty::before {
  content: "+";
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
}

.editorial-trigger--summary {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
}

.section-heading__aside {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: var(--space-2);
}

.section-editorial__copy {
  max-width: 72ch;
  margin: var(--space-4) 0 0;
  color: var(--foreground);
  font-size: 0.875rem;
  line-height: 1.55;
  white-space: pre-line;
}

.editorial-form {
  max-width: 52rem;
  margin-top: var(--space-4);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: var(--surface-muted);
}

.editorial-form--summary {
  grid-column: 1 / -1;
  max-width: none;
  margin-top: 0;
  background: color-mix(in oklch, var(--surface) 55%, transparent);
}

.editorial-form label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--foreground-strong);
  font-size: 0.75rem;
  font-weight: 500;
}

.editorial-form textarea {
  display: block;
  width: 100%;
  min-height: 6.5rem;
  resize: vertical;
  border: 1px solid var(--surface-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  background: var(--surface);
  color: var(--foreground-strong);
  font-size: 0.875rem;
  line-height: 1.55;
}

.editorial-form textarea::placeholder {
  color: var(--foreground-muted);
}

.editorial-form__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.editorial-form__actions > span {
  margin-right: auto;
  color: var(--foreground-muted);
  font-size: 0.6875rem;
}

.button {
  min-height: 2.25rem;
  border: 0;
  border-radius: 999px;
  padding: 0 var(--space-4);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
}

.button--primary {
  background: var(--accent);
  color: var(--background);
}

.button--primary:hover {
  background: var(--accent-hover);
}

.button--ghost {
  background: transparent;
  color: var(--accent);
}

.button--ghost:hover {
  background: var(--clay-100);
}

.summary__copy ul {
  margin: var(--space-3) 0 0;
  padding-left: 1.1rem;
}

.summary__copy li + li {
  margin-top: var(--space-1);
}

.summary__copy b {
  color: var(--foreground);
  font-weight: 500;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: var(--space-4);
  border-block: 1px solid var(--border);
}

.metric {
  padding: 1.25rem 1.5rem;
}

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

.metric + .metric {
  border-left: 1px solid var(--border);
}

.metric p,
.metric span {
  font-size: 0.75rem;
}

.metric strong {
  display: block;
  margin-top: var(--space-1);
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.1;
  color: var(--foreground-strong);
  font-variant-numeric: tabular-nums;
}

.metric span {
  display: block;
  margin-top: var(--space-2);
  font-weight: 500;
}

.metric--up span,
.delta--up {
  color: var(--success);
}

.metric--down span,
.delta--down {
  color: var(--danger);
}

.metric--flat span,
.metric--unavailable span,
.delta--flat,
.delta--unavailable {
  color: var(--foreground-muted);
}

.report-section {
  margin-top: var(--space-8);
}

.section-heading h2 {
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.section-heading > div > p {
  margin-top: var(--space-1);
  font-size: 0.875rem;
}

.section-readout {
  font-size: 0.75rem;
  text-align: right;
}

.section-readout b {
  color: var(--foreground);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.panel {
  border-radius: var(--radius-md);
  padding: var(--space-5);
  background: var(--surface);
}

.traffic-panel {
  margin-top: var(--space-5);
}

.panel-heading {
  align-items: flex-start;
}

.panel-heading h3,
.feature-mix__copy h3 {
  font-size: 1.125rem;
  line-height: 1.3;
}

.panel-heading p,
.panel-heading > span,
.feature-mix__copy p {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  line-height: 1.5;
}

.panel-heading > span {
  color: var(--foreground-muted);
  white-space: nowrap;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-3);
  color: var(--foreground-muted);
  font-size: 0.6875rem;
}

.legend span,
.feature-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.swatch {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-xs);
}

.swatch--traffic-paid,
.traffic-bar__segment--paid {
  background: var(--traffic-paid);
}

.swatch--traffic-direct,
.traffic-bar__segment--direct {
  background: var(--traffic-direct);
}

.swatch--traffic-organic,
.traffic-bar__segment--organic {
  background: var(--traffic-organic);
}

.swatch--traffic-lifecycle,
.traffic-bar__segment--lifecycle {
  background: var(--traffic-lifecycle);
}

.swatch--traffic-other,
.traffic-bar__segment--other {
  background: var(--traffic-other);
}

.chart-scroll {
  margin-top: var(--space-5);
  overflow-x: auto;
  scrollbar-color: var(--surface-strong) transparent;
  scrollbar-width: thin;
}

.traffic-chart,
.volume-chart {
  display: grid;
  grid-template-columns: 2.25rem minmax(38rem, 1fr);
  gap: var(--space-2);
  min-width: 41rem;
}

.volume-chart {
  grid-template-columns: 2.25rem minmax(32rem, 1fr);
  min-width: 34.75rem;
}

.chart-axis {
  display: flex;
  height: 16rem;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  color: var(--foreground-muted);
  font-size: 0.625rem;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.volume-chart .chart-axis {
  height: 16.75rem;
  padding-top: 2.75rem;
}

.traffic-chart .chart-axis {
  height: 18.75rem;
  padding-top: 2.75rem;
}

.traffic-chart__plot,
.volume-chart__plot {
  position: relative;
  display: grid;
  height: 16rem;
  grid-template-columns: repeat(8, minmax(2.5rem, 1fr));
  align-items: end;
  gap: var(--space-4);
  border-bottom: 1px solid var(--border);
  padding-inline: var(--space-2);
}

.volume-chart__plot {
  height: 16.75rem;
  grid-template-columns: repeat(8, minmax(2.75rem, 1fr));
  gap: var(--space-3);
  padding-top: 2.75rem;
}

.traffic-chart__plot {
  height: 18.75rem;
  padding-top: 2.75rem;
}

.traffic-chart__plot .chart-gridline,
.volume-chart__plot .chart-gridline {
  top: calc(50% + 0.625rem);
}

.chart-gridline {
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid var(--border);
}

.traffic-column,
.volume-column {
  position: relative;
  z-index: 1;
  display: grid;
  height: 100%;
  min-width: 0;
  grid-template-rows: minmax(0, 1fr) 1.5rem;
  justify-items: center;
  gap: var(--space-1);
}

.volume-column {
  grid-template-rows: minmax(0, 1fr) 1.5rem;
}

.volume-column__measure {
  position: relative;
  width: 100%;
  height: 100%;
}

.traffic-column__measure {
  position: relative;
  width: 100%;
  height: 100%;
}

.traffic-bar,
.volume-bar {
  display: flex;
  width: min(100%, 2.5rem);
  height: var(--bar-height);
  align-self: end;
  flex-direction: column-reverse;
  overflow: hidden;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
}

.traffic-bar__segment {
  display: block;
  flex-basis: var(--segment-share);
  min-height: 1px;
}

.traffic-bar {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.traffic-lead-label {
  position: absolute;
  bottom: calc(var(--bar-height) + var(--space-2));
  left: 50%;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.125rem;
  transform: translateX(-50%);
  white-space: nowrap;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.traffic-lead-label b {
  color: var(--foreground-strong);
  font-size: 0.8125rem;
  font-weight: 500;
}

.traffic-lead-label small {
  color: var(--foreground-muted);
  font-size: 0.5625rem;
  line-height: 1.2;
}

.chart-label {
  color: var(--foreground-muted);
  font-size: 0.625rem;
  white-space: nowrap;
}

.cohort-grid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.cohort-grid > *,
.product-grid > * {
  min-width: 0;
}

.rate-label {
  position: absolute;
  bottom: calc(var(--bar-height) + var(--space-2));
  left: 50%;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.125rem;
  transform: translateX(-50%);
  white-space: nowrap;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.rate-label b {
  display: inline-flex;
  align-items: baseline;
  gap: 0.1875rem;
  color: var(--foreground-strong);
  font-size: 0.75rem;
  font-weight: 500;
}

.rate-label em {
  color: var(--foreground-muted);
  font-size: 0.5625rem;
  font-style: normal;
  letter-spacing: 0.02em;
}

.rate-label small {
  color: var(--foreground-muted);
  font-size: 0.6875rem;
  line-height: 1.2;
}

.rate-label sup {
  color: var(--warning);
  font-size: 0.65em;
}

.volume-bar {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--info-muted);
}

.volume-bar--trial {
  background: var(--surface-muted);
}

.volume-bar--provisional {
  box-shadow: inset 0 0 0 1px var(--warning);
}

.volume-bar__converted {
  display: block;
  height: var(--converted-share);
  min-height: 2px;
  background: var(--info);
}

.volume-bar--trial .volume-bar__converted {
  background: var(--success);
}

.provisional-note {
  margin: var(--space-3) 0 0;
  color: var(--foreground-muted);
  font-size: 0.6875rem;
}

.product-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  margin-top: var(--space-5);
}

.feature-mix {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  align-items: center;
  gap: var(--space-5);
}

.feature-pie {
  position: relative;
  width: 11rem;
  aspect-ratio: 1;
}

.feature-pie svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.feature-pie circle {
  fill: none;
  stroke-width: 7.5;
}

.feature-pie__track {
  stroke: var(--surface-muted);
}

.feature-pie__segment--search {
  stroke: var(--feature-search);
}

.feature-pie__segment--recommendations {
  stroke: var(--feature-recommendations);
}

.feature-pie__segment--ai-chat {
  stroke: var(--feature-ai-chat);
}

.feature-pie__segment--mcp {
  stroke: var(--feature-mcp);
}

.feature-pie__segment--notes {
  stroke: var(--feature-notes);
}

.feature-pie > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.feature-pie > span b {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
}

.feature-pie > span small {
  margin-top: 0.1rem;
  color: var(--foreground-muted);
  font-size: 0.625rem;
}

.feature-mix__copy p {
  max-width: 35ch;
  margin-top: var(--space-1);
}

.feature-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-4);
  color: var(--foreground-muted);
  font-size: 0.75rem;
}

.feature-legend span {
  display: grid;
  grid-template-columns: 0.5rem minmax(0, 1fr) auto;
}

.feature-legend b {
  color: var(--foreground);
  font-weight: 500;
}

.swatch--feature-search,
.feature-meter__fill--search {
  background: var(--feature-search);
}

.swatch--feature-recommendations,
.feature-meter__fill--recommendations {
  background: var(--feature-recommendations);
}

.swatch--feature-ai-chat,
.feature-meter__fill--ai-chat {
  background: var(--feature-ai-chat);
}

.swatch--feature-mcp,
.feature-meter__fill--mcp {
  background: var(--feature-mcp);
}

.swatch--feature-notes,
.feature-meter__fill--notes {
  background: var(--feature-notes);
}

.feature-list__rows {
  margin-top: var(--space-3);
}

.feature-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(4rem, 1fr) 2rem 4rem;
  align-items: center;
  gap: var(--space-3);
  min-height: 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
}

.feature-row:first-child {
  border-top: 0;
}

.feature-row > b {
  font-weight: 500;
}

.feature-row > span:nth-last-child(-n + 2) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.feature-meter {
  height: 0.5rem;
  overflow: hidden;
  border-radius: var(--radius-xs);
  background: var(--surface-muted);
}

.feature-meter__fill {
  display: block;
  width: var(--meter-width);
  height: 100%;
  border-radius: inherit;
}

.delta {
  font-weight: 500;
}

.page-footer {
  margin-top: var(--space-8);
  border-top: 1px solid var(--border);
  padding-block: 1.25rem;
  font-size: 0.6875rem;
}

.error-page {
  display: grid;
  min-height: 100vh;
  place-content: center;
  justify-items: start;
  padding: var(--space-6);
}

.error-page__label {
  margin: var(--space-5) 0 var(--space-2);
  color: var(--accent);
  font-size: 0.875rem;
}

.error-page h1 {
  max-width: 18ch;
  font-size: 2.25rem;
  line-height: 1.1;
}

.error-page > p:not(.error-page__label) {
  max-width: 50ch;
  color: var(--foreground-muted);
  line-height: 1.6;
}

.text-link {
  min-height: 2.75rem;
  margin-top: var(--space-3);
  color: var(--accent);
  font-weight: 500;
  line-height: 2.75rem;
}

/* Ask AI — ephemeral, week-scoped analyst drawer */

body.ai-drawer-open {
  overflow: hidden;
}

.ai-backdrop {
  position: fixed;
  z-index: var(--z-drawer-backdrop);
  inset: 0;
  background: color-mix(in oklch, var(--foreground-strong) 28%, transparent);
  opacity: 0;
  transition: opacity 180ms ease;
}

.ai-backdrop.is-open {
  opacity: 1;
}

.ai-drawer {
  position: fixed;
  z-index: var(--z-drawer);
  top: 0;
  right: 0;
  display: flex;
  width: min(29rem, 100vw);
  height: 100dvh;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--surface);
  box-shadow: -8px 0 28px color-mix(in oklch, var(--foreground-strong) 14%, transparent);
  opacity: 0;
  transform: translateX(1.5rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.ai-drawer[hidden],
.ai-backdrop[hidden] {
  display: none;
}

.ai-drawer.is-open {
  opacity: 1;
  transform: translateX(0);
}

.ai-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: 1px solid var(--border);
  padding: var(--space-5);
  background: var(--background);
}

.ai-drawer__header p,
.ai-drawer__header h2,
.ai-drawer__header span,
.ai-conversation p,
.ai-composer p {
  margin: 0;
}

.ai-drawer__header p {
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ai-drawer__header h2 {
  margin-top: var(--space-1);
  color: var(--foreground-strong);
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.05;
}

.ai-drawer__header span {
  display: block;
  margin-top: var(--space-2);
  color: var(--foreground-muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.ai-icon-button {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--foreground-muted);
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}

.ai-icon-button:hover {
  background: var(--surface-strong);
  color: var(--foreground-strong);
}

.ai-drawer__toolbar {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  border-bottom: 1px solid var(--border);
  padding-inline: var(--space-5);
  color: var(--foreground-muted);
  font-size: 0.6875rem;
}

.ai-drawer__toolbar b {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.ai-drawer__toolbar button,
.ai-message__copy {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.6875rem;
  font-weight: 500;
}

.ai-drawer__toolbar button:disabled {
  color: color-mix(in oklch, var(--foreground-muted) 42%, transparent);
  cursor: default;
}

.ai-conversation {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-5);
  scrollbar-color: var(--surface-strong) transparent;
  scrollbar-width: thin;
}

.ai-empty-state {
  display: flex;
  min-height: 100%;
  justify-content: center;
  flex-direction: column;
  padding-block: var(--space-6);
}

.ai-empty-state[hidden] {
  display: none;
}

.ai-empty-state__mark {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--clay-300);
  border-radius: var(--radius-sm);
  background: var(--clay-100);
  color: var(--accent);
}

.ai-empty-state h3 {
  margin: var(--space-4) 0 0;
  color: var(--foreground-strong);
  font-size: 1rem;
  font-weight: 500;
}

.ai-empty-state > p {
  max-width: 38ch;
  margin-top: var(--space-2);
  color: var(--foreground-muted);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.ai-suggestions {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.ai-suggestions button {
  min-height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 var(--space-3);
  background: var(--surface);
  color: var(--foreground);
  cursor: pointer;
  font-size: 0.8125rem;
  text-align: left;
}

.ai-suggestions button:first-child {
  border-color: var(--clay-300);
  background: var(--clay-100);
  color: var(--accent);
  font-weight: 500;
}

.ai-suggestions button:hover {
  border-color: var(--clay-500);
}

.ai-message + .ai-message {
  margin-top: var(--space-5);
}

.ai-message__role {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--foreground-muted);
  font-size: 0.6875rem;
  font-weight: 500;
}

.ai-message--user {
  width: fit-content;
  max-width: 88%;
  margin-left: auto;
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-muted);
}

.ai-message--user .ai-message__role {
  margin-bottom: var(--space-1);
}

.ai-message__body {
  color: var(--foreground);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.ai-message__body > p + p {
  margin-top: var(--space-3);
}

.ai-message__body b {
  color: var(--foreground-strong);
  font-weight: 500;
}

.ai-message__copy {
  margin-top: var(--space-3);
}

.ai-error {
  margin-top: var(--space-5);
  border: 1px solid color-mix(in oklch, var(--danger) 30%, var(--border));
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  background: color-mix(in oklch, var(--danger) 6%, var(--surface));
}

.ai-error h4,
.ai-error p {
  margin: 0;
}

.ai-error h4 {
  color: var(--foreground-strong);
  font-size: 0.8125rem;
  font-weight: 500;
}

.ai-error p {
  margin-top: var(--space-1);
  color: var(--foreground-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.ai-error button {
  min-height: 2rem;
  margin-top: var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  padding-inline: var(--space-3);
  background: var(--accent);
  color: var(--background);
  cursor: pointer;
  font-size: 0.6875rem;
  font-weight: 500;
}

.ai-error button:hover {
  background: var(--accent-hover);
}

.ai-analysis__summary {
  margin-top: var(--space-3) !important;
  color: var(--foreground-strong);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.ai-analysis__findings {
  margin-top: var(--space-5);
  border-block: 1px solid var(--border);
}

.ai-finding {
  display: grid;
  grid-template-columns: 0.5rem minmax(0, 1fr);
  gap: var(--space-3);
  padding-block: var(--space-3);
}

.ai-finding + .ai-finding {
  border-top: 1px solid var(--border);
}

.ai-finding > span {
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: var(--foreground-muted);
}

.ai-finding--positive > span { background: var(--success); }
.ai-finding--negative > span { background: var(--danger); }

.ai-finding h4 {
  margin: 0;
  color: var(--foreground-strong);
  font-size: 0.75rem;
  font-weight: 500;
}

.ai-finding b {
  display: block;
  margin-top: 0.15rem;
  color: var(--foreground-strong);
  font-size: 0.875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.ai-finding p {
  margin-top: 0.1rem;
  color: var(--foreground-muted);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}

.ai-analysis__note {
  margin-top: var(--space-4) !important;
  border-left: 2px solid var(--warning);
  padding-left: var(--space-3);
  color: var(--foreground-muted);
  font-size: 0.75rem;
}

.ai-analysis__note b {
  display: block;
  color: var(--foreground);
  font-weight: 500;
}

.ai-thinking {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-height: 2rem;
}

.ai-thinking i {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: var(--clay-500);
  animation: ai-thinking 900ms ease-in-out infinite alternate;
}

.ai-thinking i:nth-child(2) { animation-delay: 150ms; }
.ai-thinking i:nth-child(3) { animation-delay: 300ms; }

@keyframes ai-thinking {
  to { opacity: 0.25; transform: translateY(-0.15rem); }
}

.ai-composer {
  border-top: 1px solid var(--border);
  padding: var(--space-4) var(--space-5) max(var(--space-4), env(safe-area-inset-bottom));
  background: var(--background);
}

.ai-composer label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--foreground-muted);
  font-size: 0.6875rem;
}

.ai-composer > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--space-2);
  border: 1px solid var(--surface-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  background: var(--surface);
}

.ai-composer > div:focus-within {
  border-color: var(--clay-500);
  box-shadow: 0 0 0 2px var(--clay-100);
}

.ai-composer textarea {
  min-height: 2.75rem;
  max-height: 8rem;
  resize: vertical;
  border: 0;
  padding: 0.55rem;
  outline: 0;
  background: transparent;
  color: var(--foreground-strong);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.ai-composer textarea::placeholder {
  color: var(--foreground-muted);
}

.ai-composer button {
  min-height: 2.5rem;
  border: 0;
  border-radius: var(--radius-sm);
  padding-inline: var(--space-4);
  background: var(--accent);
  color: var(--background);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
}

.ai-composer button:hover:not(:disabled) {
  background: var(--accent-hover);
}

.ai-composer button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ai-composer[aria-busy="true"] button:disabled {
  cursor: wait;
}

.ai-composer > p {
  margin-top: var(--space-2);
  color: var(--foreground-muted);
  font-size: 0.625rem;
}

@media (max-width: 63.99rem) {
  .cohort-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .feature-mix {
    grid-template-columns: 11rem minmax(0, 1fr);
  }

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

@media (max-width: 47.99rem) {
  .site-header__inner,
  .page-shell {
    width: min(100% - 1.5rem, 80rem);
  }

  .site-header__inner {
    min-height: 4rem;
  }

  .report-label {
    display: none;
  }

  .page-shell {
    padding-top: var(--space-6);
  }

  .page-heading {
    align-items: flex-start;
  }

  .page-heading h1 {
    font-size: 2.25rem;
  }

  .page-heading__actions {
    align-items: flex-end;
    flex-direction: column-reverse;
    gap: var(--space-2);
  }

  .ai-drawer {
    width: 100vw;
    border-left: 0;
  }

  .ai-drawer-tab {
    top: auto;
    right: var(--space-4);
    bottom: var(--space-4);
    width: auto;
    min-height: 3rem;
    justify-content: flex-start;
    flex-direction: row;
    gap: 0.4rem;
    border-right: 1px solid var(--clay-300);
    border-radius: var(--radius-sm);
    padding: 0.35rem var(--space-3) 0.35rem 0.4rem;
    box-shadow: 0 3px 8px color-mix(in oklch, var(--foreground-strong) 12%, transparent);
    transform: none;
  }

  .ai-drawer-tab__mark {
    width: 1.75rem;
    height: 1.75rem;
  }

  .ai-drawer-tab__label {
    max-width: none;
    white-space: nowrap;
  }

  body.ai-drawer-open .ai-drawer-tab {
    right: 100vw;
  }

  .ai-drawer__header,
  .ai-conversation {
    padding-inline: var(--space-4);
  }

  .ai-drawer__toolbar,
  .ai-composer {
    padding-inline: var(--space-4);
  }

  .summary {
    grid-template-columns: 1fr;
    gap: var(--space-5);
    padding: var(--space-5);
  }

  .summary h2 {
    font-size: 1.6rem;
  }

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

  .metric {
    padding: var(--space-4);
  }

  .metric:first-child,
  .metric:nth-child(3) {
    padding-left: 0;
  }

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

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

  .metric strong {
    font-size: 1.75rem;
  }

  .report-section {
    margin-top: var(--space-7);
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading__aside {
    width: 100%;
    align-items: flex-start;
  }

  .section-readout {
    text-align: left;
  }

  .panel {
    padding: var(--space-4);
  }

  .panel-heading {
    gap: var(--space-3);
  }

  .legend {
    justify-content: flex-start;
  }

  .feature-mix {
    grid-template-columns: 1fr;
  }

  .feature-pie {
    margin-inline: auto;
  }

  .feature-mix__copy {
    text-align: center;
  }

  .feature-mix__copy p {
    margin-inline: auto;
  }

  .feature-legend {
    text-align: left;
  }

  .feature-row {
    grid-template-columns: 6.5rem minmax(2rem, 1fr) 1.75rem 3.75rem;
    gap: var(--space-2);
  }

  .page-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .editorial-form__actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .editorial-form__actions > span {
    width: 100%;
  }

  .ds-intro h1 {
    font-size: 2.25rem;
  }

  .ds-section__heading,
  .ds-palette-group {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .ds-marks,
  .ds-type-grid {
    grid-template-columns: 1fr;
  }

  .ds-back {
    font-size: 0;
  }

  .ds-back::after {
    content: "Dashboard →";
    font-size: 0.75rem;
  }
}

@media (max-width: 24rem) {
  .date-badge {
    display: none;
  }

  .feature-row {
    grid-template-columns: 5.75rem minmax(1.5rem, 1fr) 1.5rem 3.5rem;
    font-size: 0.6875rem;
  }
}

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

@media print {
  .week-nav,
  .ai-drawer-tab,
  .ai-backdrop,
  .ai-drawer {
    display: none;
  }

  .panel {
    break-inside: avoid;
  }
}
