@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap");

:root {
  --color-midnight-navy: #0b1722;
  --color-abyss-blue: #102b3a;
  --color-storm-grey: #596873;
  --color-cold-sea-blue: #4e9bb2;
  --color-worn-parchment: #e7d7b4;
  --color-aged-paper: #f3e9d0;
  --color-weathered-timber: #765640;
  --color-dark-iron: #202a2d;
  --color-ember-red: #a94735;
  --color-mist-white: #f7f3e8;

  --color-page: var(--color-worn-parchment);
  --color-surface: var(--color-worn-parchment);
  --color-surface-muted: var(--color-aged-paper);
  --color-surface-dark: var(--color-midnight-navy);
  --color-surface-deep: var(--color-abyss-blue);
  --color-text: var(--color-midnight-navy);
  --color-text-muted: #44515a;
  --color-text-on-dark: var(--color-mist-white);
  --color-link: #1f7189;
  --color-border-dark: rgb(32 42 45 / 35%);
  --color-border-light: rgb(118 86 64 / 45%);
  --color-focus-light: var(--color-cold-sea-blue);
  --color-focus-dark: var(--color-dark-iron);

  --font-body: "IBM Plex Sans", system-ui, -apple-system, blinkmacsystemfont, "Segoe UI", sans-serif;
  --font-heading: "DM Serif Display", Georgia, serif;

  --text-display: clamp(2.75rem, 6vw, 5.5rem);
  --text-page-title: clamp(2.25rem, 4vw, 4rem);
  --text-section-title: clamp(1.75rem, 2.8vw, 2.75rem);
  --text-card-title: clamp(1.25rem, 1.8vw, 1.65rem);
  --text-lead: clamp(1.2rem, 1vw + 1rem, 1.35rem);
  --text-body: clamp(1rem, 0.2vw + 0.96rem, 1.0625rem);
  --text-meta: 0.75rem;
  --text-control: clamp(0.875rem, 0.3vw + 0.82rem, 0.95rem);

  --leading-display: 0.98;
  --leading-page-title: 1.02;
  --leading-section-title: 1.08;
  --leading-card-title: 1.15;
  --leading-lead: 1.45;
  --leading-body: 1.6;
  --leading-meta: 1.3;
  --leading-control: 1.2;

  --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;
  --space-9: 6rem;

  --container-max: 75rem;
  --container-editorial: 60rem;
  --container-reading: 45rem;
  --gutter: 1.5rem;
  --section-space: var(--space-8);

  --radius-none: 0;
  --radius-control: 0.125rem;
  --radius-card: 0.375rem;
  --radius-round: 999px;

  --shadow-elevated: 0 12px 30px rgb(3 10 15 / 22%);
  --shadow-none: none;

  --transition-fast: 160ms ease;
  --transition-standard: 220ms ease;
}

@media (max-width: 47.99rem) {
  :root {
    --gutter: 1.125rem;
    --section-space: var(--space-7);
  }
}

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

html {
  min-width: 20rem;
  overflow-x: clip;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background: var(--color-page);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--leading-body);
  text-rendering: optimizelegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main,
header,
footer,
section,
article,
aside,
nav,
figure,
form,
fieldset,
table {
  min-width: 0;
}

img,
picture,
svg,
canvas,
video,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

img[data-ratio],
.media-cover,
.media-cover img,
.media-cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

iframe {
  width: 100%;
  border: 0;
}

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

button,
select {
  text-transform: none;
}

button,
[type="button"],
[type="submit"],
[type="reset"],
label[for],
summary {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-control);
  background: var(--color-aged-paper);
  color: var(--color-midnight-navy);
  line-height: 1.35;
}

input,
select {
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem;
}

textarea {
  padding: 0.75rem;
}

input::placeholder,
textarea::placeholder {
  color: #637079;
  opacity: 1;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1rem;
  min-height: 1rem;
  padding: 0;
  accent-color: var(--color-cold-sea-blue);
}

input[type="file"] {
  padding: 0.4rem;
}

input[type="file"]::file-selector-button {
  margin-right: var(--space-3);
  border: 0;
  border-radius: var(--radius-control);
  background: var(--color-dark-iron);
  color: var(--color-mist-white);
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

fieldset {
  margin: 0;
  padding: var(--space-4);
  border: 1px solid var(--color-border-light);
}

legend {
  padding-inline: var(--space-2);
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--color-border-light);
  background: var(--color-surface);
}

caption {
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-muted);
  text-align: left;
}

th,
td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--color-aged-paper);
  font-size: var(--text-meta);
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: var(--leading-meta);
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-color: currentcolor;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

a:hover {
  color: var(--color-abyss-blue);
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-focus-dark);
  outline-offset: 3px;
}

:where(.surface-dark, .surface-deep, .theme-dark) a {
  color: var(--color-mist-white);
  text-decoration-color: var(--color-cold-sea-blue);
}

:where(.surface-dark, .surface-deep, .theme-dark) a:hover {
  color: var(--color-aged-paper);
  text-decoration-color: var(--color-aged-paper);
}

:where(.surface-dark, .surface-deep, .theme-dark) a:focus-visible,
:where(.surface-dark, .surface-deep, .theme-dark) button:focus-visible,
:where(.surface-dark, .surface-deep, .theme-dark) input:focus-visible,
:where(.surface-dark, .surface-deep, .theme-dark) select:focus-visible,
:where(.surface-dark, .surface-deep, .theme-dark) textarea:focus-visible,
:where(.surface-dark, .surface-deep, .theme-dark) summary:focus-visible,
:where(.surface-dark, .surface-deep, .theme-dark) [tabindex]:focus-visible {
  outline-color: var(--color-focus-light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-block: 0 var(--space-4);
  color: inherit;
  font-family: var(--font-heading);
  font-weight: 400;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-page-title);
  line-height: var(--leading-page-title);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-section-title);
  line-height: var(--leading-section-title);
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--text-card-title);
  line-height: var(--leading-card-title);
}

h4 {
  font-size: 1.125rem;
  line-height: 1.25;
}

h5,
h6 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

p {
  margin-block: 0 var(--space-4);
}

ul,
ol {
  margin-block: 0 var(--space-4);
  padding-inline-start: 1.25rem;
}

ul {
  list-style: none !important;
  padding-inline-start: 0;
}

ol {
  list-style: decimal;
}

.content-list,
.rich-text ul,
.article-content ul {
  display: grid;
  gap: var(--space-2);
}

.content-list > li,
.rich-text ul > li,
.article-content ul > li {
  position: relative;
  padding-inline-start: var(--space-4);
}

.content-list > li::before,
.rich-text ul > li::before,
.article-content ul > li::before {
  position: absolute;
  inset-inline-start: 0;
  top: 0.68em;
  width: 0.38rem;
  height: 1px;
  background: var(--color-weathered-timber);
  content: "";
}

blockquote {
  margin: 0 0 var(--space-5);
  border-inline-start: 3px solid var(--color-weathered-timber);
  padding: var(--space-3) 0 var(--space-3) var(--space-4);
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 1vw + 1rem, 1.65rem);
  line-height: 1.35;
}

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

hr {
  height: 3px;
  margin-block: var(--space-6);
  border: 0;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

figure {
  margin: 0 0 var(--space-5);
}

figcaption {
  margin-block-start: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-meta);
  line-height: 1.45;
}

dl {
  margin: 0 0 var(--space-4);
}

dt {
  font-weight: 700;
}

dd {
  margin: 0 0 var(--space-3);
}

small {
  font-size: 0.875em;
}

strong,
b {
  font-weight: 700;
}

em,
i {
  font-style: italic;
}

mark {
  background: #d2c298;
  color: inherit;
  padding-inline: 0.12em;
}

code,
kbd,
samp,
pre {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

code,
kbd {
  border: 1px solid var(--color-border-light);
  background: var(--color-aged-paper);
  padding: 0.08em 0.28em;
}

pre {
  margin: 0 0 var(--space-5);
  overflow-x: auto;
  border: 1px solid var(--color-border-light);
  background: var(--color-aged-paper);
  padding: var(--space-4);
  white-space: pre-wrap;
}

pre code {
  border: 0;
  background: transparent;
  padding: 0;
}

::selection {
  background: var(--color-cold-sea-blue);
  color: var(--color-midnight-navy);
}

.container,
.container-editorial,
.container-reading {
  width: min(100% - (var(--gutter) * 2), var(--container-max));
  margin-inline: auto;
}

.container-editorial {
  max-width: var(--container-editorial);
}

.container-reading {
  max-width: var(--container-reading);
}

.section {
  padding-block: var(--section-space);
}

.section-compact {
  padding-block: var(--space-7);
}

.section-cinematic {
  padding-block: var(--space-9);
}

.surface-light {
  background: var(--color-worn-parchment);
  color: var(--color-midnight-navy);
}

.surface-muted {
  background: var(--color-aged-paper);
  color: var(--color-midnight-navy);
}

.surface-storm {
  background: var(--color-storm-grey);
  color: var(--color-midnight-navy);
}

.surface-dark,
.theme-dark {
  background: var(--color-midnight-navy);
  color: var(--color-mist-white);
}

.surface-deep {
  background: var(--color-abyss-blue);
  color: var(--color-mist-white);
}

.surface-dark :is(input, select, textarea),
.surface-deep :is(input, select, textarea),
.theme-dark :is(input, select, textarea) {
  border-color: rgb(243 233 208 / 38%);
  background: rgb(247 243 232 / 96%);
  color: var(--color-midnight-navy);
}

.eyebrow,
.meta {
  margin: 0 0 var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-meta);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: var(--leading-meta);
  text-transform: uppercase;
}

:where(.surface-dark, .surface-deep, .theme-dark) .eyebrow,
:where(.surface-dark, .surface-deep, .theme-dark) .meta {
  color: var(--color-aged-paper);
}

.display {
  margin-block-end: var(--space-5);
  font-family: var(--font-heading);
  font-size: var(--text-display);
  font-weight: 400;
  line-height: var(--leading-display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  margin-block-end: var(--space-5);
  font-size: var(--text-lead);
  line-height: var(--leading-lead);
}

.button,
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1px solid var(--color-dark-iron);
  border-radius: var(--radius-control);
  background: var(--color-dark-iron);
  color: var(--color-mist-white);
  padding: 0.7rem 1rem;
  font-family: var(--font-body);
  font-size: var(--text-control);
  font-weight: 600;
  line-height: var(--leading-control);
  text-align: center;
  text-decoration: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
  border-color: var(--color-weathered-timber);
  background: var(--color-weathered-timber);
  color: var(--color-mist-white);
  text-decoration: none;
}

.button:active,
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
  transform: translateY(1px);
}

.button-secondary {
  border-color: var(--color-weathered-timber);
  background: transparent;
  color: var(--color-midnight-navy);
}

.button-secondary:hover {
  background: var(--color-weathered-timber);
  color: var(--color-mist-white);
}

.button-danger {
  border-color: var(--color-ember-red);
  background: var(--color-ember-red);
  color: var(--color-aged-paper);
}

.button-danger:hover {
  border-color: #87372a;
  background: #87372a;
  color: var(--color-mist-white);
}

:where(.surface-dark, .surface-deep, .theme-dark) .button-secondary {
  border-color: var(--color-aged-paper);
  color: var(--color-aged-paper);
}

:where(.surface-dark, .surface-deep, .theme-dark) .button-secondary:hover {
  border-color: var(--color-weathered-timber);
  background: var(--color-weathered-timber);
  color: var(--color-mist-white);
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  min-width: 0;
}

.button-group > * {
  min-width: 0;
}

.panel,
.card {
  min-width: 0;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-none);
  background: var(--color-surface);
  color: var(--color-text);
  padding: var(--space-5);
}

.card {
  border-radius: var(--radius-card);
}

.card > :last-child,
.panel > :last-child,
.compact-content > :last-child,
.content-stack > :last-child {
  margin-block-end: 0;
}

.media-frame {
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-none);
  background: var(--color-abyss-blue);
}

.media-card {
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  background: var(--color-abyss-blue);
}

.media-frame img,
.media-frame video,
.media-card img,
.media-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: var(--space-4);
}

.stack-compact {
  gap: var(--space-2);
}

.stack-loose {
  gap: var(--space-6);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  gap: var(--space-3);
}

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

.rule-rune {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-block: var(--space-6);
  color: var(--color-weathered-timber);
}

.rule-rune::before,
.rule-rune::after {
  flex: 1 1 2rem;
  min-width: 0;
  height: 1px;
  background: currentcolor;
  content: "";
}

.rule-rune > * {
  flex: 0 0 auto;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  gap: 0.28rem;
  padding: 0.5rem;
}

.nav-toggle > span {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentcolor;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  inset-block-start: var(--space-3);
  inset-inline-start: var(--space-3);
  transform: translateY(-200%);
  border: 1px solid var(--color-aged-paper);
  background: var(--color-dark-iron);
  color: var(--color-mist-white);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

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

@media (max-width: 47.99rem) {
  .section {
    padding-block: var(--space-7);
  }

  .section-compact {
    padding-block: var(--space-6);
  }

  .section-cinematic {
    padding-block: var(--space-8);
  }

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

  th,
  td {
    padding: var(--space-3);
  }

  .button,
  button,
  input[type="submit"],
  input[type="button"],
  input[type="reset"] {
    min-height: 2.75rem;
  }
}

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

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