:root {
  color-scheme: light;
  --ink: #102033;
  --muted: #617284;
  --paper: #eef3f6;
  --panel: #ffffff;
  --field: #f8fafc;
  --line: #d9e3ea;
  --accent: #b7791f;
  --accent-dark: #8b5e16;
  --support: #0e7490;
  --button-ink: #ffffff;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f4ead7;
  --muted: #bac7c2;
  --paper: #071225;
  --panel: #10213f;
  --field: #0b1a31;
  --line: #304563;
  --accent: #f0b92d;
  --accent-dark: #d8a21b;
  --support: #56d0c8;
  --button-ink: #071225;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.site-name,
.site-header a {
  color: var(--ink);
  text-decoration: none;
}

.site-name {
  font: 700 18px/1 system-ui, sans-serif;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font: 600 14px/1 system-ui, sans-serif;
}

.site-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.theme-toggle {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: transparent;
  color: var(--accent);
  font: 700 13px/1 system-ui, sans-serif;
  cursor: pointer;
}

main {
  width: min(760px, calc(100% - 32px));
  margin: 64px auto;
  min-height: 50vh;
}

.content h1 {
  margin: 0 0 24px;
  font-size: 64px;
  line-height: 0.98;
  letter-spacing: 0;
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font: 700 12px/1 system-ui, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.body {
  font-size: 20px;
  line-height: 1.65;
}

.taxonomy {
  display: grid;
  gap: 8px;
  margin: -10px 0 28px;
  font: 600 14px/1.4 system-ui, sans-serif;
}

.taxonomy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.taxonomy-row span,
.post-card span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.taxonomy-row a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--accent);
  text-decoration: none;
}

.body p {
  margin: 0 0 22px;
}

.body ul,
.body ol {
  margin: 0 0 22px 1.4em;
  padding: 0;
}

.body a {
  color: var(--support);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.content-font--serif {
  font-family: Georgia, "Times New Roman", serif;
}

.content-font--sans {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.content-font--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.body .content-size--small {
  font-size: 0.9em;
}

.body .content-size--normal {
  font-size: 1em;
}

.body .content-size--large {
  font-size: 1.16em;
}

.rich-text--left {
  text-align: left;
}

.rich-text--center {
  text-align: center;
}

.rich-text--right {
  text-align: right;
}

.rich-text--center ul,
.rich-text--center ol,
.rich-text--right ul,
.rich-text--right ol {
  display: inline-block;
  text-align: left;
}

.heading-align--left {
  text-align: left;
}

.heading-align--center {
  text-align: center;
}

.heading-align--right {
  text-align: right;
}

.body h2,
.body h3 {
  clear: both;
  margin: 42px 0 16px;
  line-height: 1.12;
  letter-spacing: 0;
}

.body h2 {
  font-size: 34px;
}

.body h3 {
  font-size: 26px;
}

.body h2.content-size--small {
  font-size: 28px;
}

.body h2.content-size--normal {
  font-size: 34px;
}

.body h2.content-size--large {
  font-size: 42px;
}

.body h3.content-size--small {
  font-size: 22px;
}

.body h3.content-size--normal {
  font-size: 26px;
}

.body h3.content-size--large {
  font-size: 32px;
}

.body blockquote {
  clear: both;
  margin: 34px 0;
  padding: 2px 0 2px 22px;
  border-left: 3px solid var(--accent);
  color: var(--ink);
}

.body blockquote p {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.45;
}

.body blockquote.content-size--small p {
  font-size: 20px;
}

.body blockquote.content-size--normal p {
  font-size: 24px;
}

.body blockquote.content-size--large p {
  font-size: 29px;
}

.body cite {
  color: var(--muted);
  font: 14px/1.4 system-ui, sans-serif;
}

.body hr {
  clear: both;
  margin: 42px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.body::after {
  content: "";
  display: block;
  clear: both;
}

.body figure,
.media-figure {
  margin: 34px 0;
}

.body img {
  display: block;
  width: 100%;
  height: auto;
}

.body figcaption {
  margin-top: 10px;
  color: var(--muted);
  font: 14px/1.4 system-ui, sans-serif;
}

.media-figure--center {
  margin-left: auto;
  margin-right: auto;
}

.media-figure--small {
  max-width: 260px;
}

.media-figure--medium {
  max-width: 420px;
}

.media-figure--large {
  max-width: 680px;
}

.media-figure--full {
  max-width: none;
}

.media-figure--left,
.media-figure--right {
  margin-top: 6px;
  margin-bottom: 18px;
}

.media-figure--left.media-figure--small,
.media-figure--right.media-figure--small {
  width: min(220px, 38%);
}

.media-figure--left.media-figure--medium,
.media-figure--right.media-figure--medium {
  width: min(320px, 46%);
}

.media-figure--left.media-figure--large,
.media-figure--right.media-figure--large {
  width: min(420px, 52%);
}

.media-figure--left.media-figure--full,
.media-figure--right.media-figure--full {
  width: min(520px, 60%);
}

.media-figure--left {
  float: left;
  margin-right: 24px;
}

.media-figure--right {
  float: right;
  margin-left: 24px;
}

.image-text {
  clear: both;
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(0, 1.1fr);
  gap: 26px;
  align-items: start;
  margin: 38px 0;
}

.image-text--right {
  grid-template-columns: minmax(0, 1.1fr) minmax(180px, 0.9fr);
}

.image-text--right figure {
  order: 2;
}

.image-text figure {
  margin: 0;
}

.image-text p:last-child {
  margin-bottom: 0;
}

.video-block {
  clear: both;
  margin: 38px 0;
}

.video-frame {
  aspect-ratio: 16 / 9;
  background: var(--ink);
}

.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.link-card {
  clear: both;
  display: grid;
  gap: 8px;
  margin: 28px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  font-family: system-ui, sans-serif;
}

.social-link {
  clear: both;
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  font-family: system-ui, sans-serif;
}

.link-card span {
  color: var(--support);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.link-card strong,
.social-link strong {
  font-size: 20px;
  line-height: 1.25;
}

.social-link .social-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: var(--panel);
}

.social-link .social-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.post-list {
  display: grid;
  gap: 18px;
}

.post-card {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.post-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: 0;
}

.post-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.archive-description {
  margin: -8px 0 28px;
  color: var(--muted);
  font: 18px/1.5 system-ui, sans-serif;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 32px;
  padding: 32px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  font: 14px/1.5 system-ui, sans-serif;
}

.site-footer strong {
  display: block;
  margin-bottom: 6px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.site-footer small {
  grid-column: 1 / -1;
  color: var(--muted);
}

@media (max-width: 640px) {
  .site-header {
    padding: 0 18px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
  }

  .site-actions,
  .site-footer,
  .site-footer nav {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .site-footer {
    grid-template-columns: 1fr;
    padding: 28px 18px;
  }

  main {
    margin: 40px auto;
  }

  .content h1 {
    font-size: 42px;
  }

  .body {
    font-size: 18px;
  }

  .media-figure--left,
  .media-figure--right {
    float: none;
    width: 100%;
    max-width: none;
    margin: 28px 0;
  }

  .image-text,
  .image-text--right {
    grid-template-columns: 1fr;
  }

  .image-text--right figure {
    order: 0;
  }
}
