:root {
  --color-paper-bg: #F5F0E6;
  --color-ink-text: #2E4A2E;
  --color-muted-terracotta: #C85A3A;
  --color-olive: #808000;
  --color-tan: #D2B48C;
  --color-white: #FFFFFF;

  --font-heading: Georgia, serif;
  --font-body: Arial, sans-serif;

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

  --leading-display: 1.2;
  --leading-h1: 1.3;
  --leading-h2: 1.4;
  --leading-h3: 1.5;
  --leading-body: 1.6;
  --leading-small: 1.5;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 4rem;

  --container-max: 1200px;
  --container-padding: 2rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --border-tan: 1px solid var(--color-tan);
  --border-ink: 1px solid var(--color-ink-text);
  --border-olive-focus: 2px solid var(--color-olive);

  --shadow-card: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-image: 0 2px 4px rgba(0, 0, 0, 0.05);

  --transition-fast: 0.2s ease;
}

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

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

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

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

img,
video {
  object-fit: cover;
}

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: var(--color-muted-terracotta);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-olive);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: var(--border-olive-focus);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-ink-text);
  font-weight: 700;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

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

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

h3 {
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  margin-block-end: var(--space-sm);
}

h4,
h5,
h6 {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  margin-block-end: var(--space-sm);
}

p {
  margin-block-end: var(--space-md);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

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

li {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

blockquote {
  margin-block-end: var(--space-md);
  padding-inline-start: var(--space-lg);
  border-inline-start: 3px solid var(--color-tan);
  color: var(--color-ink-text);
  font-style: italic;
}

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

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

hr {
  border: none;
  border-top: 1px solid var(--color-tan);
  margin-block: var(--space-lg);
}

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

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

th {
  font-family: var(--font-heading);
  font-weight: 700;
}

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

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

.surface-panel {
  background-color: var(--color-paper-bg);
  border: var(--border-tan);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.tag {
  display: inline-block;
  background-color: var(--color-tan);
  color: var(--color-ink-text);
  font-size: var(--text-small);
  line-height: var(--leading-small);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-weight: 600;
  border: 1px solid var(--color-ink-text);
  border-radius: var(--radius-sm);
  min-height: 44px;
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

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

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

.btn-secondary {
  background-color: transparent;
  color: var(--color-ink-text);
  border-color: var(--color-ink-text);
}

.btn-secondary:hover {
  background-color: var(--color-ink-text);
  color: var(--color-white);
}

.btn-tertiary {
  background-color: transparent;
  color: var(--color-muted-terracotta);
  border-color: var(--color-tan);
}

.btn-tertiary:hover {
  background-color: var(--color-tan);
  color: var(--color-ink-text);
  border-color: var(--color-tan);
}

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

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

.flex-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

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

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

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

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

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

.image-frame {
  border: var(--border-tan);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-image);
  overflow: hidden;
  background-color: var(--color-paper-bg);
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.ratio-1-1 {
  aspect-ratio: 1 / 1;
}

.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: 50%;
  transform: translateX(-50%);
  background-color: var(--color-ink-text);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-sm);
  z-index: 10000;
  transition: top var(--transition-fast);
}

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

.content-list {
  list-style: none;
  padding-inline-start: 0;
  margin-block-end: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.content-list li {
  padding-inline-start: var(--space-lg);
  position: relative;
}

.content-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-muted-terracotta);
  font-weight: 700;
}

.content-list-compact {
  gap: var(--space-xs);
}

.content-list-compact li {
  padding-inline-start: var(--space-md);
}

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

.surface-card > :last-child,
.surface-panel > :last-child,
.tag + .tag {
  margin-block-end: 0;
}

@media (max-width: 768px) {
  :root {
    --container-padding: 1rem;
    --text-display: 2rem;
    --text-h1: 1.75rem;
    --text-h2: 1.375rem;
    --text-h3: 1.125rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 2.5rem;
  }

  .container {
    padding-inline: var(--container-padding);
  }

  .flex-row,
  .flex-between {
    flex-direction: column;
    align-items: stretch;
  }

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