:root {
  --color-canvas: #F4EBD9;
  --color-ink: #2B2B2B;
  --color-ink-muted: #5A5A5A;
  --color-turquoise: #3A9B9B;
  --color-turquoise-dark: #2F7F7F;
  --color-rust: #B85C38;
  --color-burgundy: #7A2E2E;
  --color-graphite: #3C3C3C;
  --color-cream-light: #FBF5E8;
  --color-paper-shadow: rgba(43, 43, 43, 0.12);
  --color-paper-shadow-deep: rgba(43, 43, 43, 0.16);
  --color-paper-shadow-hover: rgba(43, 43, 43, 0.2);
  --color-border-subtle: rgba(90, 90, 90, 0.2);
  --color-border-faint: rgba(90, 90, 90, 0.1);

  --font-heading: "Cormorant Garamond", serif;
  --font-body: "Inter", sans-serif;

  --text-display: 3.5rem;
  --text-h1: 2.5rem;
  --text-h2: 2rem;
  --text-h3: 1.5rem;
  --text-h4: 1.25rem;
  --text-body: 1rem;
  --text-small: 0.875rem;
  --text-caption: 0.75rem;

  --leading-display: 1.1;
  --leading-h1: 1.2;
  --leading-h2: 1.25;
  --leading-h3: 1.3;
  --leading-h4: 1.4;
  --leading-body: 1.6;
  --leading-small: 1.5;
  --leading-caption: 1.4;

  --weight-regular: 400;
  --weight-semibold: 600;

  --space-2xs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;
  --space-5xl: 96px;

  --container-max: 1200px;
  --container-padding-mobile: 24px;
  --container-padding-desktop: 48px;

  --radius-card: 4px;
  --radius-button: 2px;
  --radius-image: 2px;
  --radius-circle: 50%;

  --shadow-card: 0 2px 8px var(--color-paper-shadow);
  --shadow-pinned: 0 4px 16px var(--color-paper-shadow-deep);
  --shadow-image: 2px 2px 0 var(--color-paper-shadow);
  --shadow-image-hover: 0 6px 20px var(--color-paper-shadow-hover);

  --border-hairline: 1px solid var(--color-border-subtle);
  --border-image-frame: 1px solid var(--color-border-faint);

  --transition-fast: 0.1s ease-out;
  --transition-link: 0.15s ease-in-out;
  --transition-accordion: 0.2s ease-in-out;
  --transition-image: 0.2s ease-in-out;
  --transition-press: 0.1s ease-in-out;
  --transition-mobile-bar: 0.3s ease-out;

  --focus-ring: 2px solid var(--color-turquoise);
  --focus-ring-offset: 2px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  color: var(--color-ink);
  background-color: var(--color-canvas);
  min-height: 100vh;
  min-width: 320px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
  color: var(--color-ink);
  line-height: var(--leading-h1);
  margin-block-end: var(--space-lg);
}

h1 {
  font-size: var(--text-h1);
  line-height: var(--leading-h1);
}

h2 {
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
}

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

h4 {
  font-size: var(--text-h4);
  line-height: var(--leading-h4);
}

h5 {
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

h6 {
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

p {
  margin-block-end: var(--space-lg);
  line-height: var(--leading-body);
}

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

ul,
ol {
  margin-block-end: var(--space-lg);
  padding-inline-start: var(--space-xl);
}

ul:last-child,
ol:last-child {
  margin-block-end: 0;
}

li {
  line-height: var(--leading-body);
}

blockquote {
  margin-block-end: var(--space-lg);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  color: var(--color-ink);
  padding-inline-start: var(--space-xl);
  border-inline-start: 3px solid var(--color-burgundy);
}

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

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

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

figcaption {
  font-size: var(--text-small);
  line-height: var(--leading-small);
  color: var(--color-ink-muted);
  margin-block-start: var(--space-sm);
}

a {
  color: var(--color-turquoise);
  text-decoration: none;
  transition: color var(--transition-link);
}

a:hover {
  color: var(--color-rust);
}

a:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-button);
}

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

img {
  border-radius: var(--radius-image);
  border: var(--border-image-frame);
  box-shadow: var(--shadow-image);
  transition: box-shadow var(--transition-image), transform var(--transition-image);
}

img:hover {
  box-shadow: var(--shadow-image-hover);
}

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

button {
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-button);
  transition: transform var(--transition-press);
}

button:active {
  transform: scale(0.98);
}

button:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

input,
textarea,
select {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-button);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-cream-light);
  color: var(--color-ink);
  transition: border-color var(--transition-link);
}

input:focus,
textarea:focus,
select:focus {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-color: var(--color-turquoise);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-ink-muted);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-block-end: var(--space-lg);
}

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

th,
td {
  padding: var(--space-sm) var(--space-md);
  text-align: start;
  border-bottom: 1px solid var(--color-border-subtle);
}

th {
  font-weight: var(--weight-semibold);
  color: var(--color-ink);
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

caption {
  font-size: var(--text-caption);
  color: var(--color-ink-muted);
  margin-block-end: var(--space-sm);
  text-align: start;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border-subtle);
  margin-block: var(--space-2xl);
}

code,
pre,
kbd,
samp {
  font-family: "SF Mono", "Cascadia Code", "Consolas", monospace;
  font-size: 0.9em;
}

code {
  background-color: var(--color-cream-light);
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-button);
  border: 1px solid var(--color-border-faint);
}

pre {
  background-color: var(--color-cream-light);
  border: var(--border-hairline);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  overflow-x: auto;
  margin-block-end: var(--space-lg);
}

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

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

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

.surface-raised {
  background-color: var(--color-cream-light);
  border: var(--border-hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.surface-dark {
  background-color: var(--color-graphite);
  color: var(--color-canvas);
}

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

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

.surface-dark a {
  color: var(--color-turquoise);
}

.surface-dark a:hover {
  color: var(--color-rust);
}

.surface-dark input,
.surface-dark textarea,
.surface-dark select {
  background-color: rgba(244, 235, 217, 0.08);
  border-color: rgba(244, 235, 217, 0.2);
  color: var(--color-canvas);
}

.surface-dark input::placeholder,
.surface-dark textarea::placeholder {
  color: rgba(244, 235, 217, 0.5);
}

.surface-dark th,
.surface-dark td {
  border-bottom-color: rgba(244, 235, 217, 0.2);
}

.surface-dark hr {
  border-top-color: rgba(244, 235, 217, 0.2);
}

.surface-dark code {
  background-color: rgba(244, 235, 217, 0.08);
  border-color: rgba(244, 235, 217, 0.2);
  color: var(--color-canvas);
}

.surface-dark pre {
  background-color: rgba(244, 235, 217, 0.08);
  border-color: rgba(244, 235, 217, 0.2);
}

.surface-dark pre code {
  color: var(--color-canvas);
}

.text-small {
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

.text-caption {
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
}

.text-muted {
  color: var(--color-ink-muted);
}

.text-uppercase-label {
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: var(--weight-semibold);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-button);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-body);
  text-align: center;
  cursor: pointer;
  transition: background-color var(--transition-link), color var(--transition-link), border-color var(--transition-link), transform var(--transition-press);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-primary {
  background-color: var(--color-turquoise);
  color: var(--color-cream-light);
  border: 1px solid var(--color-turquoise);
}

.btn-primary:hover {
  background-color: var(--color-turquoise-dark);
  border-color: var(--color-turquoise-dark);
  color: var(--color-cream-light);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-rust);
  border: 1px solid var(--color-rust);
}

.btn-secondary:hover {
  background-color: rgba(184, 92, 56, 0.1);
  color: var(--color-rust);
  border-color: var(--color-rust);
}

.link-string {
  color: var(--color-ink);
  text-decoration: none;
  border-bottom: 1px dashed var(--color-rust);
  padding-block-end: var(--space-2xs);
  transition: color var(--transition-link), border-bottom-color var(--transition-link);
}

.link-string:hover {
  color: var(--color-rust);
  border-bottom-style: solid;
}

.link-string:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-button);
}

.card {
  background-color: var(--color-cream-light);
  border: var(--border-hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-xl);
}

.card > :last-child {
  margin-block-end: 0;
}

.panel {
  background-color: var(--color-cream-light);
  border: var(--border-hairline);
  border-radius: var(--radius-card);
  padding: var(--space-xl);
}

.panel > :last-child {
  margin-block-end: 0;
}

.pinned-note {
  background-color: var(--color-cream-light);
  border: var(--border-hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-pinned);
  padding: var(--space-xl);
  transform: rotate(-1deg);
  position: relative;
}

.pinned-note > :last-child {
  margin-block-end: 0;
}

.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-lg);
  z-index: 9999;
  background-color: var(--color-turquoise);
  color: var(--color-cream-light);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-button);
  font-weight: var(--weight-semibold);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-lg);
  color: var(--color-cream-light);
}

.flex {
  display: flex;
}

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

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

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

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.flex-start {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-lg);
}

.flex-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-lg);
}

.flex-col-start {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--space-lg);
}

.flex-col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
}

.flex-col-between {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--space-lg);
}

.flex > *,
.flex-col > *,
.flex-wrap > *,
.flex-center > *,
.flex-between > *,
.flex-start > *,
.flex-end > *,
.flex-col-start > *,
.flex-col-center > *,
.flex-col-between > * {
  min-width: 0;
  flex-shrink: 0;
}

.flex-wrap > * {
  flex-shrink: 1;
}

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

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

.flex-no-shrink {
  flex-shrink: 0;
}

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

@media (max-width: 767px) {
  :root {
    --text-display: 2.5rem;
    --text-h1: 2rem;
    --text-h2: 1.75rem;
    --text-h3: 1.375rem;
    --text-h4: 1.125rem;
  }

  h1 {
    font-size: var(--text-h1);
    line-height: var(--leading-h1);
  }

  h2 {
    font-size: var(--text-h2);
    line-height: var(--leading-h2);
  }

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

  h4 {
    font-size: var(--text-h4);
    line-height: var(--leading-h4);
  }

  blockquote {
    font-size: var(--text-h4);
    line-height: var(--leading-h4);
  }
}

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

  html {
    scroll-behavior: auto;
  }
}