/* Presentation components consume the canonical web palette; no second palette. */
:root {
  --presentation-action-bg: var(--green);
  --presentation-action-fg: var(--paper);
  --presentation-focus: var(--ink);
  --presentation-gap: clamp(24px, 4vw, 64px);
  --presentation-duration: 160ms;
  --presentation-ease: cubic-bezier(0.2, 0, 0, 1);
}

.presentation-kit {
  padding-bottom: var(--space-16);
}
.presentation-kit h1,
.presentation-kit h2,
.presentation-kit h3 {
  font-family: var(--font-serif);
  font-weight: 500;
}
.presentation-kit h1 {
  font-size: clamp(48px, 6.6vw, 94px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  max-width: 11ch;
}
.presentation-kit h2 {
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.07;
  letter-spacing: -0.025em;
}
.presentation-kit h3 {
  font-size: 28px;
  line-height: 1.15;
}
.presentation-kit p {
  max-width: 65ch;
}
.presentation-hero {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--presentation-gap);
  align-items: center;
  padding: 72px 0 48px;
}
.presentation-kicker {
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.presentation-deck {
  font-size: var(--text-lg);
  color: var(--text-deck);
  line-height: 1.65;
  margin-top: 24px;
}
.presentation-caption {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 12px;
}
.presentation-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.presentation-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  padding: 16px 0;
  border-block: 1px solid var(--border-strong);
}
.presentation-navigation a {
  padding: 12px 0;
  font-size: 14px;
  text-underline-offset: 5px;
}
.presentation-theme {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.presentation-theme select {
  min-height: 44px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  padding: 8px 30px 8px 12px;
  font: inherit;
}
.presentation-section {
  padding-block: 64px;
  border-bottom: 1px solid var(--border-strong);
}

/* Explicit theme previews include the bird's backing, not just token values. */
:root[data-presentation-theme="light"] .brand img {
  background: transparent;
  border-radius: 0;
}

:root[data-presentation-theme="dark"] .brand img {
  background: var(--on-accent);
  border-radius: 6px;
}
.presentation-section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--presentation-gap);
  align-items: end;
  margin-bottom: 32px;
}
.presentation-section-head p {
  color: var(--text-deck);
}
.presentation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.presentation-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}
.presentation-card > p + p {
  margin-top: 16px;
}
.presentation-wordmark {
  display: flex;
  gap: 24px;
  align-items: center;
  padding-block: 24px;
  font: 600 clamp(28px, 5vw, 56px)/1 var(--font-sans);
  letter-spacing: -0.05em;
}
.presentation-wordmark img {
  background: var(--on-accent);
  border-radius: var(--radius-sm);
}
.presentation-rule-list {
  padding-left: 20px;
  margin-top: 20px;
}
.presentation-rule-list li + li {
  margin-top: 12px;
}
.presentation-swatches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.presentation-swatch {
  min-width: 0;
}
.presentation-swatch i {
  display: block;
  height: 96px;
  background: var(--swatch);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.presentation-swatch strong {
  display: block;
  font-size: 14px;
}
.presentation-swatch code {
  display: block;
  color: var(--muted);
  font: 12px/1.6 var(--font-mono);
  overflow-wrap: anywhere;
  margin-top: 4px;
}
.presentation-type {
  border-bottom: 1px solid var(--border);
  padding-block: 22px;
}
.presentation-type:first-child {
  padding-top: 0;
}
.presentation-type:last-child {
  border: 0;
  padding-bottom: 0;
}
.presentation-type small {
  display: block;
  color: var(--muted);
  font: 12px/1.5 var(--font-sans);
  margin-bottom: 10px;
}
.presentation-type .display {
  font: 500 44px/1.05 var(--font-serif);
  letter-spacing: -0.025em;
}
.presentation-type .body {
  font: 18px/1.6 var(--font-sans);
}
.presentation-type .data {
  font: 15px/1.6 var(--font-mono);
}
.presentation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.presentation-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--presentation-action-bg);
  border-radius: var(--radius-sm);
  background: var(--presentation-action-bg);
  color: var(--presentation-action-fg) !important;
  font: 600 14px/1.4 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow var(--presentation-duration) var(--presentation-ease);
}
.presentation-button:hover {
  box-shadow:
    0 0 0 2px var(--paper),
    0 0 0 3px var(--green);
}
.presentation-button:focus-visible,
.presentation-kit :focus-visible {
  outline: 3px solid var(--presentation-focus);
  outline-offset: 4px;
}
.presentation-button.secondary {
  background: var(--paper);
  color: var(--ink) !important;
  border-color: var(--border-strong);
}
.presentation-button:disabled {
  background: var(--mint);
  color: var(--muted) !important;
  border-color: var(--border);
  cursor: not-allowed;
  box-shadow: none;
}
.presentation-status {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--border-valid);
  border-radius: var(--radius-pill);
  background: var(--surface-valid);
  color: var(--valid-text);
  padding: 7px 12px;
  font: 600 13px/1.4 var(--font-sans);
}
.presentation-status.blocked {
  background: var(--surface-invalid);
  color: var(--danger);
  border-color: var(--border-invalid);
}
.presentation-status.pending {
  background: var(--surface-warning);
  color: var(--warn-text);
  border-color: var(--border-warn);
}
.presentation-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 32px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.presentation-flow > div {
  padding: 24px;
  border-right: 1px solid var(--border-strong);
}
.presentation-flow > div:last-child {
  border: 0;
}
.presentation-flow b {
  display: block;
  color: var(--green);
  font: 14px/1.5 var(--font-mono);
  margin-bottom: 20px;
}
.presentation-flow p {
  margin-top: 12px;
  color: var(--text-body);
  font-size: 14px;
}
.presentation-downloads {
  list-style: none;
  margin-top: 24px;
  padding: 0;
}
.presentation-downloads li {
  border-top: 1px solid var(--border);
}
.presentation-downloads a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 0;
  text-underline-offset: 4px;
}
.presentation-downloads span {
  color: var(--muted);
  font-size: 13px;
  flex-shrink: 0;
}
.presentation-kit video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  border-radius: var(--radius);
  background: var(--code);
}
.presentation-kit [hidden] {
  display: none !important;
}
.presentation-dark-only {
  display: none;
}
@media (prefers-color-scheme: dark) {
  .presentation-light-only {
    display: none;
  }
  .presentation-dark-only {
    display: block;
  }
}
:root[data-presentation-theme="light"] .presentation-light-only {
  display: block;
}
:root[data-presentation-theme="light"] .presentation-dark-only {
  display: none;
}
:root[data-presentation-theme="dark"] .presentation-light-only {
  display: none;
}
:root[data-presentation-theme="dark"] .presentation-dark-only {
  display: block;
}

/* Services retains the common shell; this composition replaces its legacy 600px blank hero. */
body.backpage .services-hero.presentation-services {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--presentation-gap);
  min-height: 0 !important;
  padding: 64px 0 48px !important;
}
.presentation-services .hero-deck {
  max-width: 54ch;
}
.presentation-services .button {
  margin-top: 24px;
}
.presentation-services figure {
  margin: 0;
}
.presentation-services figcaption {
  max-width: 55ch;
}
@media (max-width: 900px) {
  .presentation-hero {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }
  .presentation-hero h1 {
    max-width: 15ch;
  }
  .presentation-hero figure {
    max-width: 640px;
  }
  .presentation-section-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  body.backpage .services-hero.presentation-services {
    grid-template-columns: 1fr;
  }
  .presentation-services figure {
    max-width: 620px;
  }
}
@media (max-width: 600px) {
  .presentation-grid {
    grid-template-columns: 1fr;
  }
  .presentation-swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .presentation-card {
    padding: 20px;
  }
  .presentation-section {
    padding-block: 40px;
  }
  .presentation-flow {
    grid-template-columns: 1fr;
  }
  .presentation-flow > div {
    border-right: 0;
    border-bottom: 1px solid var(--border-strong);
  }
  .presentation-flow b {
    margin-bottom: 8px;
  }
  .presentation-theme {
    width: 100%;
    margin-left: 0;
  }
  .presentation-downloads a {
    gap: 12px;
  }
  .presentation-downloads span {
    max-width: 95px;
    text-align: right;
  }
  .presentation-actions {
    align-items: stretch;
  }
  .presentation-button {
    max-width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .presentation-kit *,
  .presentation-services * {
    transition: none !important;
    animation: none !important;
  }
}
@media print {
  .presentation-navigation,
  .presentation-kit video,
  .presentation-kit button,
  .presentation-theme {
    display: none;
  }
  .presentation-section {
    break-inside: avoid;
    padding-block: 24px;
  }
}

/* Keep inherited backpage components on semantic pairs on these two surfaces. */
body.presentation-surface .site-header {
  background: var(--header-bg);
  border-color: var(--header-border);
}

body.presentation-surface .site-header nav a,
body.presentation-surface footer nav a {
  color: var(--text-nav);
}

body.presentation-surface .site-header nav a:hover,
body.presentation-surface .site-header nav a[aria-current="page"],
body.presentation-surface footer nav a:hover {
  color: var(--green);
}

body.presentation-surface .nav-toggle {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--border-strong);
}

body.presentation-surface :focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

body.presentation-surface .services-lede,
body.presentation-surface .service-includes,
body.presentation-surface .services-cta p {
  color: var(--text-body);
}

body.presentation-surface .service-header h3,
body.presentation-surface .approach-steps strong,
body.presentation-surface .boundary-list dt {
  color: var(--text-strong);
}

body.presentation-surface .service-blurb a,
body.presentation-surface .service-cta {
  color: var(--green);
}

body.presentation-surface .button-primary,
body.presentation-surface .button-primary:hover {
  background: var(--presentation-action-bg);
  color: var(--presentation-action-fg) !important;
}

body.presentation-surface .button-primary:hover {
  box-shadow:
    0 0 0 2px var(--paper),
    0 0 0 3px var(--green);
}

@media (max-width: 760px) {
  body.presentation-surface .site-header {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding-block: 12px;
  }

  body.presentation-surface .nav-toggle {
    min-height: 44px;
  }
}

/* When scripting is unavailable, expose links instead of an inert disclosure. */
@media (max-width: 760px) and (scripting: none) {
  body.presentation-surface .site-header {
    flex-wrap: wrap;
    gap: 12px;
    padding-block: 16px;
  }

  body.presentation-surface .nav-toggle {
    display: none;
  }

  body.presentation-surface .site-header #primary-nav {
    display: flex;
    position: static;
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 4px 20px;
    padding: 0;
    border: 0;
    background: var(--paper);
    box-shadow: none;
  }

  body.presentation-surface .site-header #primary-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* Swatch values belong in the stylesheet, matching the production CSP. */
body.presentation-surface .presentation-swatch-paper {
  --swatch: var(--paper);
}
body.presentation-surface .presentation-swatch-ink {
  --swatch: var(--ink);
}
body.presentation-surface .presentation-swatch-green {
  --swatch: var(--green);
}
body.presentation-surface .presentation-swatch-mint-soft {
  --swatch: var(--mint-soft);
}
body.presentation-surface .presentation-swatch-muted {
  --swatch: var(--muted);
}
body.presentation-surface .presentation-swatch-border-strong {
  --swatch: var(--border-strong);
}
body.presentation-surface .presentation-motion-block {
  margin-top: 40px;
}
