:root {
  --color-paper: #F4EFE6;
  --color-paper-deep: #E8E0D3;
  --color-ink: #2B2B2B;
  --color-navy: #1F2A3A;
  --color-navy-soft: #33415C;
  --color-faded-red: #B24A3F;
  --color-faded-red-soft: #D9A79F;
  --color-olive-grey: #6E6A5E;
  --color-muted-amber: #C98A3B;
  --color-charcoal: #1E1E1E;
  --color-white: #FFFFFF;

  --font-heading: Oswald, 'Arial Narrow', sans-serif;
  --font-body: 'Source Serif 4', Georgia, serif;

  --text-display-size: clamp(2.25rem, 5vw, 3rem);
  --text-h1-size: clamp(1.75rem, 4vw, 2.25rem);
  --text-h2-size: clamp(1.5rem, 3vw, 1.75rem);
  --text-h3-size: clamp(1.25rem, 2.5vw, 1.375rem);
  --text-h4-size: clamp(1.0625rem, 2vw, 1.125rem);
  --text-body-large-size: clamp(1.0625rem, 2vw, 1.1875rem);
  --text-body-size: clamp(1rem, 1.5vw, 1.0625rem);
  --text-body-small-size: clamp(0.9375rem, 1.5vw, 0.9375rem);
  --text-caption-size: 0.8125rem;
  --text-label-size: 0.75rem;
  --text-scene-number-size: 0.875rem;

  --text-display-line-height: 1.05;
  --text-h1-line-height: 1.1;
  --text-h2-line-height: 1.15;
  --text-h3-line-height: 1.2;
  --text-h4-line-height: 1.25;
  --text-body-large-line-height: 1.6;
  --text-body-line-height: 1.65;
  --text-body-small-line-height: 1.6;
  --text-caption-line-height: 1.5;
  --text-label-line-height: 1.4;
  --text-scene-number-line-height: 1.2;

  --text-display-weight: 600;
  --text-h1-weight: 600;
  --text-h2-weight: 500;
  --text-h3-weight: 500;
  --text-h4-weight: 500;
  --text-label-weight: 500;
  --text-scene-number-weight: 600;

  --text-display-tracking: 0.04em;
  --text-h1-tracking: 0.03em;
  --text-h2-tracking: 0.02em;
  --text-h3-tracking: 0.02em;
  --text-h4-tracking: 0.01em;
  --text-label-tracking: 0.08em;
  --text-scene-number-tracking: 0.1em;

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  --container-max: 75rem;
  --container-padding-mobile: 1.5rem;
  --container-padding-tablet: 2rem;
  --container-padding-desktop: 3rem;

  --surface-card-bg: var(--color-paper-deep);
  --surface-card-border: rgba(30, 30, 30, 0.2);
  --surface-dark-bg: var(--color-navy);
  --surface-dark-text: var(--color-paper);

  --border-card: 1px solid rgba(30, 30, 30, 0.2);
  --border-annotation: 1px solid var(--color-faded-red);
  --border-label-fact: 1px solid var(--color-olive-grey);
  --border-label-analysis: 1px solid var(--color-faded-red);

  --shadow-pinned: 0 2px 8px rgba(30, 30, 30, 0.08);
  --shadow-pinned-hover: 0 4px 12px rgba(30, 30, 30, 0.12);

  --radius-card: 2px;
  --radius-button: 2px;
  --radius-label: 2px;
  --radius-thumbnail: 2px;
  --radius-image: 0px;

  --focus-ring-color: var(--color-muted-amber);
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;

  --transition-button: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out;
  --transition-card: box-shadow 150ms ease-out, border-color 150ms ease-out, transform 150ms ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  color: var(--color-ink);
  background-color: var(--color-paper);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button {
  background: none;
  border: none;
  cursor: pointer;
  text-align: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  color: var(--color-navy);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

h1 {
  font-size: var(--text-h1-size);
  line-height: var(--text-h1-line-height);
  font-weight: var(--text-h1-weight);
  letter-spacing: var(--text-h1-tracking);
  margin-block-end: var(--space-lg);
}

h2 {
  font-size: var(--text-h2-size);
  line-height: var(--text-h2-line-height);
  font-weight: var(--text-h2-weight);
  letter-spacing: var(--text-h2-tracking);
  margin-block-end: var(--space-md);
}

h3 {
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line-height);
  font-weight: var(--text-h3-weight);
  letter-spacing: var(--text-h3-tracking);
  margin-block-end: var(--space-sm);
}

h4 {
  font-size: var(--text-h4-size);
  line-height: var(--text-h4-line-height);
  font-weight: var(--text-h4-weight);
  letter-spacing: var(--text-h4-tracking);
  margin-block-end: var(--space-xs);
}

h5,
h6 {
  font-size: var(--text-h4-size);
  line-height: var(--text-h4-line-height);
  font-weight: var(--text-h4-weight);
  letter-spacing: var(--text-h4-tracking);
  margin-block-end: var(--space-xs);
}

p {
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  margin-block-end: var(--space-md);
}

blockquote {
  margin-block-end: var(--space-lg);
  padding-inline-start: var(--space-lg);
  border-inline-start: 2px solid var(--color-faded-red);
  font-style: italic;
  font-size: var(--text-body-large-size);
  line-height: var(--text-body-large-line-height);
  color: var(--color-navy-soft);
}

blockquote p {
  font-size: inherit;
  line-height: inherit;
  margin-block-end: var(--space-sm);
}

blockquote p:last-child {
  margin-block-end: 0;
}

figure {
  margin-block-end: var(--space-lg);
}

figcaption {
  font-size: var(--text-caption-size);
  line-height: var(--text-caption-line-height);
  font-style: italic;
  color: var(--color-olive-grey);
  margin-block-start: var(--space-xs);
  padding-inline-start: var(--space-sm);
  border-inline-start: 1px solid var(--color-faded-red);
}

hr {
  border: none;
  border-block-start: 1px solid rgba(30, 30, 30, 0.2);
  margin-block: var(--space-xl);
}

code,
pre {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
}

pre {
  background-color: var(--color-paper-deep);
  border: var(--border-card);
  border-radius: var(--radius-card);
  padding: var(--space-md);
  overflow-x: auto;
  margin-block-end: var(--space-lg);
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

small {
  font-size: var(--text-body-small-size);
}

mark {
  background-color: var(--color-faded-red-soft);
  color: var(--color-charcoal);
  padding-inline: 0.125em;
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding-mobile);
}

@media (min-width: 48rem) {
  .container {
    padding-inline: var(--container-padding-tablet);
  }
}

@media (min-width: 75rem) {
  .container {
    padding-inline: var(--container-padding-desktop);
  }
}

.surface-card {
  background-color: var(--surface-card-bg);
  border: var(--border-card);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  box-shadow: var(--shadow-pinned);
}

.surface-dark {
  background-color: var(--surface-dark-bg);
  color: var(--surface-dark-text);
}

.surface-dark h1,
.surface-dark h2,
.surface-dark h3,
.surface-dark h4,
.surface-dark h5,
.surface-dark h6 {
  color: var(--color-paper);
}

.surface-dark p,
.surface-dark a,
.surface-dark li,
.surface-dark blockquote {
  color: var(--color-paper);
}

.surface-dark figcaption {
  color: var(--color-paper-deep);
}

.label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-label-size);
  line-height: var(--text-label-line-height);
  font-weight: var(--text-label-weight);
  letter-spacing: var(--text-label-tracking);
  text-transform: uppercase;
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-label);
  border: 1px solid transparent;
}

.label-fact {
  background-color: var(--color-paper);
  border-color: var(--color-olive-grey);
  color: var(--color-olive-grey);
}

.label-analysis {
  background-color: var(--color-paper-deep);
  border-color: var(--color-faded-red);
  color: var(--color-faded-red);
}

.scene-number {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-scene-number-size);
  line-height: var(--text-scene-number-line-height);
  font-weight: var(--text-scene-number-weight);
  letter-spacing: var(--text-scene-number-tracking);
  text-transform: uppercase;
  color: var(--color-navy);
  background-color: var(--color-paper);
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-label);
  border: 1px solid rgba(30, 30, 30, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-family: var(--font-heading);
  font-size: var(--text-label-size);
  line-height: var(--text-label-line-height);
  font-weight: var(--text-label-weight);
  letter-spacing: var(--text-label-tracking);
  text-transform: uppercase;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-button);
  border: 1px solid rgba(30, 30, 30, 0.2);
  cursor: pointer;
  transition: var(--transition-button);
  min-height: 2.75rem;
  text-align: center;
}

.btn:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.btn-primary {
  background-color: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}

.btn-primary:hover {
  background-color: var(--color-navy-soft);
  border-color: var(--color-navy-soft);
}

.btn-secondary {
  background-color: var(--color-paper);
  color: var(--color-charcoal);
  border-color: rgba(30, 30, 30, 0.2);
}

.btn-secondary:hover {
  background-color: var(--color-paper-deep);
  border-color: rgba(30, 30, 30, 0.4);
}

.btn-tertiary {
  background-color: transparent;
  color: var(--color-navy);
  border-color: transparent;
  padding-inline: var(--space-xs);
}

.btn-tertiary:hover {
  color: var(--color-faded-red);
  text-decoration: underline;
  text-decoration-color: var(--color-faded-red);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

a {
  transition: color 150ms ease-out, text-decoration-color 150ms ease-out;
}

a:hover {
  color: var(--color-faded-red);
}

.flex {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.flex > * {
  min-width: 0;
}

.flex-nowrap {
  flex-wrap: nowrap;
}

.flex-col {
  flex-direction: column;
}

.flex-row {
  flex-direction: row;
}

.flex-center {
  align-items: center;
  justify-content: center;
}

.flex-between {
  align-items: center;
  justify-content: space-between;
}

.flex-start {
  align-items: flex-start;
  justify-content: flex-start;
}

.flex-end {
  align-items: flex-end;
  justify-content: flex-end;
}

.flex-1 {
  flex: 1 1 0%;
  min-width: 0;
}

.flex-auto {
  flex: 0 0 auto;
}

.flex-grow {
  flex: 1 1 auto;
  min-width: 0;
}

.grid {
  display: grid;
  gap: var(--space-lg);
}

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

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

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

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

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

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

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

@media (max-width: 47.9375rem) {
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-6,
  .grid-12 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 48rem) and (max-width: 74.9375rem) {
  .grid-4,
  .grid-6,
  .grid-12 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: 1000;
  background-color: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-button);
  font-family: var(--font-heading);
  font-size: var(--text-label-size);
  letter-spacing: var(--text-label-tracking);
  text-transform: uppercase;
  transition: top 150ms ease-out;
}

.skip-link:focus {
  top: var(--space-md);
}

:last-child {
  margin-block-end: 0;
}

p:last-child,
h1:last-child,
h2:last-child,
h3:last-child,
h4:last-child,
h5:last-child,
h6:last-child,
blockquote:last-child,
figure:last-child,
ul:last-child,
ol:last-child {
  margin-block-end: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}