:root {
  --bg: #f1f0eb;
  --page: #f1f0eb;
  --paper: #faf9f5;
  --surface: #faf9f5;
  --surface-2: #ffffff;
  --surface-strong: #e9e9e3;
  --ink: #191916;
  --muted: #66665f;
  --line: #cdcdc5;
  --line-strong: #98988f;
  --accent: #d7462f;
  --accent-strong: #a72e1d;
  --accent-soft: #f8ddd5;
  --coral: #d7462f;
  --teal: #007c73;
  --blue: #315fa8;
  --indigo: #6756a4;
  --gold: #9a6d00;
  --danger: #b63d2d;
  --success: #007c73;
  --shadow: none;
  --radius: 3px;
  --plot-bg: #ffffff;
  --plot-grid: #e3e2dc;
  --plot-grid-soft: #ecebe6;
  --plot-text: #66665f;
  --plot-axis: #b8b8af;
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent), transparent 72%);
  --font-display: Georgia, "Times New Roman", serif;
  --font-ui: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f0eb;
  --page: #f1f0eb;
  --paper: #faf9f5;
  --surface: #faf9f5;
  --surface-2: #ffffff;
  --surface-strong: #e9e9e3;
  --ink: #191916;
  --muted: #66665f;
  --line: #cdcdc5;
  --line-strong: #98988f;
  --accent: #d7462f;
  --accent-strong: #a72e1d;
  --accent-soft: #f8ddd5;
  --coral: #d7462f;
  --teal: #007c73;
  --blue: #315fa8;
  --indigo: #6756a4;
  --gold: #9a6d00;
  --danger: #b63d2d;
  --success: #007c73;
  --shadow: none;
  --radius: 3px;
  --plot-bg: #ffffff;
  --plot-grid: #e3e2dc;
  --plot-grid-soft: #ecebe6;
  --plot-text: #66665f;
  --plot-axis: #b8b8af;
  --header-chip-bg: color-mix(in srgb, var(--paper), transparent 8%);
  --brand-mark-bg: var(--accent);
  --control-bg: color-mix(in srgb, var(--paper), transparent 8%);
  --dot-bg: color-mix(in srgb, var(--ink), transparent 72%);
  --slide-bg: var(--bg);
  --instrument-shadow: drop-shadow(0 20px 25px rgba(25, 25, 22, 0.12));
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131310;
  --page: #131310;
  --paper: #1b1b17;
  --surface: #1b1b17;
  --surface-2: #22221d;
  --surface-strong: #2a2a24;
  --ink: #f2f0e9;
  --muted: #afafa6;
  --line: #3c3c35;
  --line-strong: #696960;
  --accent: #ff765e;
  --accent-strong: #ff9a86;
  --accent-soft: #48251f;
  --coral: #ff765e;
  --teal: #57c7b5;
  --blue: #86aef2;
  --indigo: #b4a5ee;
  --gold: #dfb95d;
  --danger: #ff8a76;
  --success: #57c7b5;
  --plot-bg: #181814;
  --plot-grid: #303029;
  --plot-grid-soft: #282822;
  --plot-text: #b5b5ac;
  --plot-axis: #57574f;
  --header-chip-bg: color-mix(in srgb, var(--paper), transparent 8%);
  --brand-mark-bg: var(--accent);
  --control-bg: color-mix(in srgb, var(--paper), transparent 8%);
  --dot-bg: color-mix(in srgb, var(--ink), transparent 72%);
  --slide-bg: var(--bg);
  --instrument-shadow: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.26));
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.55;
  accent-color: var(--accent);
}

body::before {
  display: none !important;
  background: none !important;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

a {
  text-underline-offset: 0.2em;
}

button,
input,
select,
textarea {
  font-family: var(--font-ui);
}

button,
a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring) !important;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
  text-wrap: balance;
}

h3,
.brand strong {
  text-wrap: balance;
}

p,
li,
small {
  text-wrap: pretty;
}

/* Shared masthead */

.site-header,
.app-header,
.project-header,
.gallery-header {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.75rem max(1rem, calc((100vw - var(--max-width, 1240px)) / 2));
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in srgb, var(--paper), transparent 4%);
  box-shadow: none !important;
  backdrop-filter: blur(14px);
}

.site-header,
.app-header,
.project-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand,
.site-header nav,
.app-header nav,
.project-header nav,
.gallery-header nav,
.header-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.68rem;
  color: var(--ink);
  text-decoration: none;
}

.brand > span:first-child,
.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 0;
  border-radius: 2px;
  background: var(--accent);
  color: #fffaf4;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 900;
}

.brand strong {
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 850;
}

.brand-copy {
  display: grid;
  gap: 0;
}

.brand-copy > span {
  color: var(--muted);
  font-size: 0.72rem;
}

.site-header nav,
.app-header nav,
.project-header nav,
.gallery-header nav,
.header-actions {
  gap: 1rem;
  flex-wrap: wrap;
}

.site-header nav a,
.app-header nav a,
.project-header nav a,
.gallery-header nav a,
.nav-link {
  min-height: 36px;
  padding: 0.5rem 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.site-header nav a:hover,
.app-header nav a:hover,
.project-header nav a:hover,
.gallery-header nav a:hover,
.nav-link:hover,
.nav-link.is-active {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.theme-toggle,
.icon-button,
.refresh-button,
.button--quiet {
  min-height: 36px;
  padding: 0.48rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  box-shadow: none !important;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 850;
  text-decoration: none;
}

.theme-toggle:hover,
.icon-button:hover,
.refresh-button:hover,
.button--quiet:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

/* Page titles and editorial hierarchy */

.app-shell,
body > main:not(#top) {
  width: min(var(--max-width, 1240px), calc(100% - 2rem));
  margin-inline: auto;
}

.app-shell {
  padding-top: 2.8rem;
  padding-bottom: 4rem;
}

.intro,
.hero,
.viewer-hero,
.project-hero {
  border: 0;
  border-top: 3px solid var(--ink);
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

.intro,
.viewer-hero,
.project-hero {
  padding-top: 1rem;
}

.intro h1,
.hero h1,
.viewer-hero h1,
.project-hero h1 {
  max-width: 16ch;
  margin-bottom: 1rem;
  color: var(--ink);
  font-size: 3.75rem;
  line-height: 0.98;
}

.intro > p:not(.eyebrow),
.hero > p:not(.eyebrow),
.hero-copy > p:not(.eyebrow),
.viewer-hero p,
.project-hero > p:not(.eyebrow) {
  max-width: 68ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.52rem;
  margin-bottom: 0.8rem;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  flex: 0 0 18px;
  background: currentColor;
}

.section-heading,
.panel-heading,
.table-heading,
.result-heading,
.subheading,
.optimization-heading {
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

.section-heading h2,
.panel-heading h2,
.table-heading h2,
.result-heading h2,
.subheading h2,
.optimization-heading h2 {
  color: var(--ink);
}

.section-heading h2 {
  font-size: 2.55rem;
  line-height: 1.08;
}

.panel-heading,
.table-heading,
.result-heading {
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2,
.table-heading h2,
.result-heading h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 400;
}

/* Flat research-workspace surfaces */

:where(
  .panel,
  .control-panel,
  .results-panel,
  .input-panel,
  .settings-panel,
  .spectrum-panel,
  .table-panel,
  .upload-panel,
  .merge-panel,
  .status-panel,
  .map-panel,
  .detail-panel,
  .dictionary-panel,
  .lineage-panel,
  .checklist-panel,
  .reference-panel,
  .query-panel,
  .insight-panel,
  .overview-card,
  .response-panel,
  .optimization-panel,
  .builder-panel,
  .reasoning-section,
  .diagnostic-section,
  .profile-panel,
  .focus-list,
  .skill-group,
  .education-card,
  .experience-card,
  .project-card,
  .hero-card,
  .data-workspace,
  .section-nav
) {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: none !important;
}

:where(
  .panel,
  .control-panel,
  .results-panel,
  .input-panel,
  .settings-panel,
  .spectrum-panel,
  .table-panel,
  .upload-panel,
  .merge-panel,
  .status-panel,
  .map-panel,
  .detail-panel,
  .dictionary-panel,
  .lineage-panel,
  .checklist-panel,
  .reference-panel,
  .query-panel,
  .insight-panel,
  .overview-card,
  .response-panel,
  .optimization-panel,
  .builder-panel,
  .project-card,
  .experience-card,
  .skill-group,
  .education-card
):hover {
  border-color: var(--line-strong);
}

.workspace,
.workspace-grid,
.dashboard-grid,
.profile-layout,
.scanner-layout,
.control-layout,
.layout {
  gap: 1rem;
}

.workspace-grid > *,
.data-grid > *,
.dashboard-grid > *,
.profile-layout > *,
.scanner-layout > *,
.control-layout > *,
.layout > * {
  min-width: 0;
}

.panel-copy,
.model-note,
.intro-note,
.optimization-note,
.status,
.empty-state,
.detail-summary,
.source-focus {
  color: var(--muted);
}

/* Metrics become ruled report cells rather than floating cards */

:where(
  .metric-grid,
  .summary-grid,
  .score-grid,
  .diagnostic-grid,
  .overview-grid,
  .geography-kpis,
  .opportunity-kpis,
  .hero-metrics
) {
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

:where(
  .metric-grid,
  .summary-grid,
  .score-grid,
  .diagnostic-grid,
  .overview-grid,
  .geography-kpis,
  .opportunity-kpis,
  .hero-metrics
) > :where(article, div) {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

:where(
  .metric-grid,
  .summary-grid,
  .score-grid,
  .diagnostic-grid,
  .overview-grid,
  .geography-kpis,
  .opportunity-kpis,
  .hero-metrics
) > :where(article, div):last-child {
  border-right: 0;
}

:where(.metric-grid, .summary-grid, .score-grid, .hero-metrics) strong,
.hero-metrics span {
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 400;
}

/* Commands and form controls */

:where(
  .button,
  .read-more,
  .close-card,
  .primary-action,
  .primary-button,
  .secondary-button,
  .quiet-action,
  .ghost-button,
  .action-button,
  .file-loader,
  .download-action,
  .optimize-button,
  .graph-view-button,
  .toolbar button,
  .pagination button,
  .map-tools button,
  .lesson-actions button,
  .builder-actions button,
  .file-actions button,
  .merge-actions button
) {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  box-shadow: none !important;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
  transform: none;
}

:where(
  .button:not(.button--ghost):not(.button--secondary):not(.button--quiet),
  .primary-action,
  .primary-button,
  .download-action:not(.is-disabled)
) {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

:where(
  .button,
  .read-more,
  .close-card,
  .primary-action,
  .primary-button,
  .secondary-button,
  .quiet-action,
  .ghost-button,
  .action-button,
  .file-loader,
  .download-action,
  .graph-view-button,
  .toolbar button,
  .pagination button,
  .map-tools button,
  .lesson-actions button,
  .builder-actions button,
  .file-actions button,
  .merge-actions button
):hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffaf4;
  box-shadow: none !important;
  transform: none;
}

.optimize-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffaf4;
}

.optimize-button:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

:where(
  input[type="text"],
  input[type="search"],
  input[type="number"],
  input[type="url"],
  input[type="email"],
  select,
  textarea
) {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface-2);
  box-shadow: none;
  color: var(--ink);
}

:where(
  input[type="text"],
  input[type="search"],
  input[type="number"],
  input[type="url"],
  input[type="email"],
  select,
  textarea
):hover {
  border-color: var(--line-strong);
}

:where(
  input[type="text"],
  input[type="search"],
  input[type="number"],
  input[type="url"],
  input[type="email"],
  select,
  textarea
):focus {
  border-color: var(--accent);
}

:where(.field, .field-row, .filter-field, .slider-label) > label,
:where(.field, .field-row, .filter-field, .slider-label) > span:first-child,
.control-panel label,
.input-panel label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

input[type="range"] {
  accent-color: var(--accent);
}

/* Tabs and segmented choices */

:where(
  .tabs,
  .lesson-tabs,
  .technique-switch,
  .filter-bar,
  .segmented-control,
  .ms-category-tabs,
  .preset-row,
  .example-row
) {
  gap: 1rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

:where(
  .tabs,
  .lesson-tabs,
  .technique-switch,
  .filter-bar,
  .segmented-control,
  .ms-category-tabs,
  .preset-row,
  .example-row
) button {
  min-height: 38px;
  padding: 0.5rem 0.1rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

:where(
  .tabs,
  .lesson-tabs,
  .technique-switch,
  .filter-bar,
  .segmented-control,
  .ms-category-tabs,
  .preset-row,
  .example-row
) button:hover,
:where(
  .tabs,
  .lesson-tabs,
  .technique-switch,
  .filter-bar,
  .segmented-control,
  .ms-category-tabs,
  .preset-row,
  .example-row
) button:is(.active, .is-active, [aria-selected="true"], [aria-pressed="true"]) {
  border-bottom-color: var(--accent);
  background: transparent;
  color: var(--ink);
}

:where(.choice-grid, .choice-stack, .control-list, .symptom-groups) label,
:where(.chip-list, .geography-tags) span {
  border-color: var(--line);
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
}

:where(.choice-grid, .choice-stack, .control-list, .symptom-groups) label:hover {
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

.status-pill,
.priority-badge,
.project-tag,
.app-meta,
.file-type,
.status-strip {
  border-radius: 999px;
  box-shadow: none;
}

/* Data tables and chart workspaces */

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  border-bottom: 2px solid var(--ink);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

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

tbody tr:hover {
  background: color-mix(in srgb, var(--accent-soft), transparent 45%);
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface-2);
  box-shadow: none;
}

:where(
  .plot-panel,
  .map-viewport,
  .instrument-diagram,
  .gradient-workbench,
  .graph-focus-body,
  .bubble-chart,
  .donut
) {
  border-color: var(--line);
  border-radius: 2px;
  background: var(--plot-bg);
  box-shadow: none !important;
}

canvas {
  max-width: 100%;
}

/* Resume and portfolio pages */

.section-pad {
  border-radius: 0;
}

.profile-band,
.skills-band,
.education-band {
  background: transparent;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.hero-visual {
  gap: 0.75rem;
}

.image-panel {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface-2);
  box-shadow: none !important;
}

.image-panel img {
  filter: none;
  transform: none;
  transition: opacity 180ms ease;
}

.image-panel:hover img {
  opacity: 0.86;
  transform: none;
}

.image-panel-caption {
  right: 0;
  bottom: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.72rem;
}

.profile-panel,
.focus-list {
  border-top: 2px solid var(--ink);
}

.focus-list span,
.skill-cloud span {
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}

.focus-list span {
  border-bottom: 1px solid var(--line);
}

.skill-cloud span {
  border: 1px solid var(--line);
}

.timeline::before {
  background: var(--line);
}

.experience-card {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.experience-card:hover {
  border-top-color: var(--accent);
}

.experience-date {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.role-kicker {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.experience-body h3,
.education-card h3,
.skill-group h3,
.project-card h3 {
  color: var(--ink);
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-card::before {
  display: none;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: none;
  transform: none;
}

.project-card--featured {
  border-top: 3px solid var(--accent);
  background: var(--ink);
  color: var(--paper);
}

.project-card--featured h2,
.project-card--featured p,
.project-card--featured .card-action {
  color: inherit;
}

.card-number {
  border-radius: 2px;
  color: var(--accent);
  font-family: var(--font-display);
}

.app-link-list {
  border-top: 1px solid var(--line);
}

.app-link {
  position: relative;
  gap: 1rem;
  padding: 1rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

.app-link::before {
  display: none;
}

.app-link:hover {
  padding-left: 0.55rem;
  border-bottom-color: var(--accent);
  background: transparent;
  transform: none;
}

.app-link em,
.card-action {
  color: var(--accent);
  font-style: normal;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.app-link em::after,
.card-action::after {
  content: "  \2197";
}

.site-footer {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 2rem max(1rem, calc((100vw - var(--max-width, 1180px)) / 2)) 3rem;
  border-top: 3px solid var(--accent);
  background: #191916;
  color: #f2f0e9;
}

.site-footer p,
.site-footer a {
  color: #f2f0e9;
}

.site-footer a:hover {
  color: #ff765e;
  text-decoration: underline;
}

/* Utilities and disclosures */

details,
.panel-disclosure {
  border-color: var(--line);
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
}

summary,
.disclosure-summary {
  cursor: pointer;
}

.drop-zone {
  border: 1px dashed var(--line-strong);
  border-radius: 2px;
  background: transparent;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.source-credit,
.scope-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* Full-screen instrumentation gallery */

.gallery-header {
  background: color-mix(in srgb, var(--paper), transparent 10%);
}

.slideshow,
.slide {
  background: var(--bg);
}

.slide {
  --slide-bg: var(--bg);
}

.slide img {
  filter: drop-shadow(0 20px 25px color-mix(in srgb, var(--ink), transparent 88%));
}

.slide-content {
  padding: 1.1rem 0 1.1rem 1.2rem;
  border-left: 3px solid var(--accent);
}

.slide-content h1 {
  max-width: 12ch;
  font-family: var(--font-display);
  font-size: 3.8rem;
  font-weight: 400;
  line-height: 0.98;
}

.slide-content p {
  color: var(--muted);
}

.read-more {
  color: #fffaf4;
}

.gallery-controls button,
.dots {
  border-color: var(--line);
  border-radius: 2px;
  background: color-mix(in srgb, var(--paper), transparent 8%);
  box-shadow: none !important;
}

.gallery-controls button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffaf4;
  transform: none;
}

.dots button {
  border-radius: 999px;
  box-shadow: none !important;
}

.detail-card {
  background: color-mix(in srgb, var(--ink), transparent 18%);
  backdrop-filter: blur(6px);
}

.detail-content {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: none !important;
}

.detail-content h2 {
  color: var(--ink);
}

.detail-content p {
  color: var(--muted);
}

/* Responsive rhythm */

@media (max-width: 980px) {
  .workspace-grid,
  .data-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .intro h1,
  .hero h1,
  .viewer-hero h1,
  .project-hero h1 {
    font-size: 3rem;
  }

  .section-heading h2 {
    font-size: 2.2rem;
  }

  :where(
    .metric-grid,
    .summary-grid,
    .score-grid,
    .diagnostic-grid,
    .overview-grid,
    .geography-kpis,
    .opportunity-kpis,
    .hero-metrics
  ) > :where(article, div) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .site-header,
  .app-header,
  .project-header,
  .gallery-header {
    padding: 0.65rem 0.85rem;
  }

  .brand strong {
    max-width: 112px;
    font-size: 0.74rem;
    line-height: 1.15;
  }

  .brand-copy > span {
    display: none;
  }

  .app-shell {
    width: min(100% - 1.25rem, var(--max-width, 1240px));
    padding-top: 2rem;
  }

  .intro h1,
  .hero h1,
  .viewer-hero h1,
  .project-hero h1 {
    font-size: 2.45rem;
    line-height: 1;
  }

  .section-heading h2 {
    font-size: 1.95rem;
  }

  .panel-heading h2,
  .table-heading h2,
  .result-heading h2 {
    font-size: 1.45rem;
  }

  .site-header nav,
  .app-header nav,
  .project-header nav,
  .gallery-header nav,
  .header-actions {
    gap: 0.5rem;
  }

  .site-header nav a,
  .app-header nav a,
  .project-header nav a,
  .gallery-header nav a,
  .nav-link {
    padding: 0.62rem;
    border: 1px solid var(--line);
  }

  .site-header nav a:hover,
  .app-header nav a:hover,
  .project-header nav a:hover,
  .gallery-header nav a:hover,
  .nav-link:hover,
  .nav-link.is-active {
    border-color: var(--accent);
  }

  :where(
    .metric-grid,
    .summary-grid,
    .score-grid,
    .diagnostic-grid,
    .overview-grid,
    .geography-kpis,
    .opportunity-kpis,
    .hero-metrics
  ) {
    border-bottom: 0;
  }

  :where(
    .metric-grid,
    .summary-grid,
    .score-grid,
    .diagnostic-grid,
    .overview-grid,
    .geography-kpis,
    .opportunity-kpis,
    .hero-metrics
  ) > :where(article, div) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .slide-content {
    padding: 0.9rem 0 0.9rem 0.9rem;
  }

  .slide img {
    object-position: center top;
    padding: 5.4rem 0.75rem 23rem;
  }

  .slide-content h1 {
    font-size: 2.45rem;
  }
}

@media (max-width: 480px) {
  .brand > span:first-child,
  .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .intro h1,
  .hero h1,
  .viewer-hero h1,
  .project-hero h1 {
    font-size: 2.15rem;
  }

  .eyebrow {
    font-size: 0.67rem;
  }
}

@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;
  }
}
