: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);
  background-image: var(--site-background-image);
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  overflow-x: hidden;
}

.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 {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  font: 700 18px/1 system-ui, sans-serif;
  overflow-wrap: anywhere;
}

.site-logo {
  display: block;
  width: auto;
  max-width: min(240px, 58vw);
  max-height: 52px;
  object-fit: contain;
}

.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;
}

/* Public theme toggle: icon-only, no frame. */
.theme-toggle {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  cursor: pointer;
  appearance: none;
}

.theme-toggle:hover {
  background: transparent;
  color: var(--ink);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.theme-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .theme-icon {
  display: block;
}

.theme-toggle .theme-icon--sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .theme-icon--moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .theme-icon--sun {
  display: block;
}

:root:not([data-theme="dark"]) .theme-toggle .theme-icon--moon {
  display: block;
}

:root:not([data-theme="dark"]) .theme-toggle .theme-icon--sun {
  display: none;
}

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

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

main:has(.map-page) {
  width: min(1180px, calc(100% - 32px));
}

.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;
  overflow-wrap: anywhere;
}

.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;
}

.content-ref-card {
  clear: both;
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  margin: 34px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  font-family: system-ui, sans-serif;
  box-shadow: 0 12px 30px rgba(20, 32, 40, 0.08);
}

.content-ref-card:hover {
  border-color: var(--accent);
}

.content-ref-card > div:first-child:last-child {
  grid-column: 1 / -1;
}

.content-ref-card figure {
  margin: 0;
  min-height: 100%;
}

.content-ref-card img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  border-radius: 6px;
}

.content-ref-card div {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
}

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

.content-ref-card strong {
  font-size: 24px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

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

.content-ref-card--feature {
  grid-template-columns: 1fr;
  padding: 16px;
}

.content-ref-card--feature figure {
  aspect-ratio: 16 / 9;
}

.content-ref-card--feature img {
  min-height: 240px;
}

.content-ref-card--feature strong {
  font-size: 30px;
}

.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;
  overflow-wrap: anywhere;
}

.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;
}

.post-share {
  clear: both;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 48px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-family: system-ui, sans-serif;
}

.post-share > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.post-share-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.post-share-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.post-share-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.post-share-link span {
  display: inline-grid;
  place-items: center;
}

.post-share-link svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rating-section,
.comments-section {
  clear: both;
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: system-ui, sans-serif;
}

.rating-section {
  gap: 8px;
}

.rating-heading,
.comments-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.rating-heading h2,
.comments-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
}

.rating-average,
.comments-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rating-status,
.comments-status,
.comments-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.rating-status.is-error,
.comments-status.is-error {
  color: #a33a2b;
}

.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.rating-stars button {
  width: 28px;
  height: 28px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font: 22px/1 system-ui, sans-serif;
  cursor: pointer;
}

.rating-stars button:hover,
.rating-stars button:focus-visible,
.rating-stars button.is-selected {
  color: var(--accent);
  background: var(--field);
}

.comments-list {
  display: grid;
  gap: 8px;
}

.comment {
  display: grid;
  gap: 6px;
  padding: 8px 0 8px 12px;
  border: 0;
  border-left: 2px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.comment.is-reply {
  margin-left: 18px;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.comment-meta strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.comment-meta time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.comment-body {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.comment-body p {
  margin: 0;
}

.comment-actions {
  display: flex;
  justify-content: flex-start;
}

.comment-actions button {
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--support);
  font: 800 12px/1 system-ui, sans-serif;
  cursor: pointer;
}

.comment-form button,
.comment-reply-mark {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--field);
  color: var(--ink);
  font: 800 12px/1 system-ui, sans-serif;
  cursor: pointer;
}

.comment-actions button:hover,
.comment-form button:hover,
.comment-reply-mark:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.comment-form {
  display: grid;
  gap: 8px;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.comment-form label {
  display: grid;
  gap: 4px;
}

.comment-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  background: var(--field);
  color: var(--ink);
  font: 14px/1.4 system-ui, sans-serif;
}

.comment-form textarea {
  resize: vertical;
  min-height: 78px;
}

.comment-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.comment-form button[type="submit"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--button-ink);
}

.comment-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.comments-replies {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  background: var(--field);
}

.comments-replies h3 {
  margin: 0;
  font-size: 16px;
}

.comment-reply-notice {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 13px;
}

.comment-reply-notice a {
  color: var(--support);
  font-weight: 800;
}

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

.map-page {
  width: min(1120px, 100%);
}

.archive-map,
.slippy-map {
  clear: both;
  position: relative;
  width: 100%;
  height: clamp(500px, 68vh, 720px);
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--field);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  isolation: isolate;
}

.slippy-map-toolbar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.slippy-map-layer-tabs,
.slippy-map-zoom {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: 0 10px 28px rgba(16, 32, 51, 0.12);
  pointer-events: auto;
}

.slippy-map button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 11px;
  background: var(--panel);
  color: var(--ink);
  font: 800 13px/1 system-ui, sans-serif;
  cursor: pointer;
}

.slippy-map button:hover,
.slippy-map button.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.slippy-map-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.slippy-map-stage.is-dragging {
  cursor: grabbing;
}

.slippy-map-tiles,
.slippy-map-markers {
  position: absolute;
  inset: 0;
}

.slippy-map-tile {
  position: absolute;
  width: 256px;
  height: 256px;
  max-width: none;
  object-fit: cover;
  user-select: none;
}

.map-pin,
.map-cluster {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -100%);
}

.slippy-map .map-pin {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  padding: 0;
  background: #d93025;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(16, 32, 51, 0.32);
  transform: translate(-50%, -100%) rotate(-45deg);
}

.slippy-map .map-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: #ffffff;
}

.map-cluster {
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--panel);
  box-shadow: 0 8px 22px rgba(16, 32, 51, 0.25);
}

.map-popup-wrap {
  position: absolute;
  z-index: 4;
  width: min(260px, calc(100% - 28px));
  transform: translate(-50%, calc(-100% - 34px));
}

.map-popup {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 38px rgba(16, 32, 51, 0.18);
}

.map-popup-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  background: var(--field);
}

.map-popup strong {
  font-size: 16px;
  line-height: 1.25;
}

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

.map-popup p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.map-popup a {
  color: var(--support);
  font-weight: 800;
  text-decoration: none;
}

.slippy-map-attribution {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 5;
  max-width: calc(100% - 20px);
  padding: 4px 7px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  color: var(--muted);
  font: 11px/1.3 system-ui, sans-serif;
}

.slippy-map-attribution a {
  color: var(--support);
}

.map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.map-empty--pins {
  inset: auto 16px 16px 16px;
  z-index: 4;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.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: 820px) {
  body {
    background-attachment: scroll;
  }

  .site-header {
    min-height: 0;
    padding: 14px 16px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
  }

  .site-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: center;
    gap: 10px;
  }

  .site-header nav {
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
  }

  .site-header nav a {
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 12px;
    background: var(--field);
  }

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

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

  main {
    width: min(100% - 28px, 760px);
    margin: 38px auto;
  }

  .content h1 {
    font-size: 42px;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .body {
    font-size: 18px;
    line-height: 1.62;
  }

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

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

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

  .media-figure--left.media-figure--small,
  .media-figure--right.media-figure--small,
  .media-figure--left.media-figure--medium,
  .media-figure--right.media-figure--medium,
  .media-figure--left.media-figure--large,
  .media-figure--right.media-figure--large,
  .media-figure--left.media-figure--full,
  .media-figure--right.media-figure--full {
    width: 100%;
  }

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

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

  .link-card,
  .content-ref-card,
  .social-link {
    width: 100%;
  }

  .content-ref-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .rating-heading,
  .comments-heading,
  .comment-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-share,
  .post-share-links {
    align-items: stretch;
    justify-content: stretch;
  }

  .post-share-link {
    flex: 1 1 132px;
  }

  .comment.is-reply {
    margin-left: 10px;
  }

  .comment-form-actions button {
    width: 100%;
  }

  .content-ref-card img,
  .content-ref-card--feature img {
    min-height: 210px;
  }

  .archive-map,
  .slippy-map {
    min-height: 520px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    margin-inline: -14px;
  }

  .slippy-map-toolbar {
    top: 10px;
    left: 10px;
    right: 10px;
  }
}

@media (max-width: 430px) {
  .site-logo {
    max-width: calc(100vw - 40px);
    max-height: 46px;
  }

  main {
    width: min(100% - 24px, 760px);
    margin: 30px auto;
  }

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

  .body {
    font-size: 17px;
  }

  .site-footer {
    padding: 24px 14px;
  }

  .archive-map,
  .slippy-map {
    min-height: 460px;
    margin-inline: -12px;
  }

  .slippy-map-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .slippy-map-layer-tabs {
    min-width: 0;
    overflow-x: auto;
  }

  .map-popup-wrap {
    width: min(240px, calc(100% - 24px));
  }
}

/* DesertCMS component upgrade: lean comments and ratings. */
.rating-section, .comments-section { gap: 10px; margin: 28px 0 0; padding-top: 18px; }
.rating-section { gap: 8px; }
.rating-heading, .comments-heading { gap: 12px; }
.rating-heading h2, .comments-heading h2 { font-size: 20px; line-height: 1.15; }
.rating-average, .comments-count { font-size: 12px; }
.rating-status, .comments-status, .comments-help { font-size: 12px; }
.rating-stars { gap: 3px; }
.rating-stars button { width: 28px; height: 28px; min-height: 28px; border: 0; border-radius: 4px; background: transparent; font-size: 22px; }
.rating-stars button:hover, .rating-stars button:focus-visible, .rating-stars button.is-selected { color: var(--accent); background: var(--field); }
.comments-list { gap: 8px; }
.comment { gap: 6px; padding: 8px 0 8px 12px; border: 0; border-left: 2px solid var(--line); border-radius: 0; background: transparent; }
.comment.is-reply { margin-left: 18px; }
.comment-meta { gap: 10px; }
.comment-meta strong { font-size: 13px; }
.comment-meta time { font-size: 11px; }
.comment-body { gap: 6px; font-size: 14px; line-height: 1.45; }
.comment-actions button { min-height: 0; border: 0; border-radius: 0; padding: 0; background: transparent; color: var(--support); font-size: 12px; }
.comment-form button, .comment-reply-mark { min-height: 30px; padding: 0 10px; font-size: 12px; }
.comment-form { gap: 8px; padding: 10px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.comment-form label { gap: 4px; }
.comment-form label span { font-size: 11px; }
.comment-form input, .comment-form textarea { padding: 7px 9px; font-size: 14px; line-height: 1.4; }
.comment-form textarea { min-height: 78px; }
.comment-form-actions { gap: 8px; }
.comments-replies { gap: 6px; padding: 8px 10px; border-color: var(--line); border-left: 2px solid var(--accent); border-radius: 4px; }
.comments-replies h3 { font-size: 16px; }
.comment-reply-notice { gap: 3px; font-size: 12px; }

/* DesertCMS component upgrade: integrated comments ratings and modules. */
.rating-section { display: none; }
.comments-section { gap: 12px; margin: 28px 0 0; padding-top: 18px; }
.comments-heading { align-items: flex-start; gap: 12px; }
.comments-heading > div:first-child { display: grid; gap: 4px; }
.comments-heading h2 { font-size: 20px; line-height: 1.15; }
.comment-rating { display: grid; justify-items: end; gap: 3px; min-width: 132px; }
.rating-average, .comments-count { font-size: 12px; }
.rating-status, .comments-status, .comments-help { font-size: 12px; }
.rating-stars { gap: 1px; }
.rating-stars button { width: 22px; height: 22px; min-height: 22px; border: 0; border-radius: 4px; background: transparent; font-size: 17px; }
.rating-stars button:hover, .rating-stars button:focus-visible, .rating-stars button.is-selected { color: var(--accent); background: var(--field); }
.comments-list { gap: 10px; padding-top: 4px; }
.comment { gap: 6px; padding: 8px 0 8px 12px; border: 0; border-left: 2px solid var(--line); border-radius: 0; background: transparent; }
.comment.is-reply { margin-left: 18px; }
.comment-meta { gap: 10px; }
.comment-meta strong { font-size: 13px; }
.comment-meta time { font-size: 11px; }
.comment-body { gap: 6px; font-size: 14px; line-height: 1.45; }
.comment-actions button { min-height: 0; border: 0; border-radius: 0; padding: 0; background: transparent; color: var(--support); font-size: 12px; }
.comment-form button, .comment-reply-mark { min-height: 30px; padding: 0 10px; font-size: 12px; }
.comment-form { gap: 8px; padding: 12px 0 14px; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.comment-form label { gap: 4px; }
.comment-form label span { font-size: 11px; }
.comment-form input, .comment-form textarea { padding: 7px 9px; font-size: 14px; line-height: 1.4; }
.comment-form textarea { min-height: 78px; }
.comment-form-actions { gap: 8px; }
.comments-replies { gap: 6px; padding: 8px 10px; border-color: var(--line); border-left: 2px solid var(--accent); border-radius: 4px; }
.comments-replies h3 { font-size: 16px; }
.comment-reply-notice { gap: 3px; font-size: 12px; }
.module-page { display: grid; gap: 18px; }
.module-intro { max-width: 72ch; margin: 0 0 10px; color: var(--muted); font: 18px/1.55 system-ui, sans-serif; }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 10px; }
.portfolio-card { display: grid; gap: 10px; margin: 0; }
.portfolio-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--field); }
.portfolio-card figcaption { display: grid; gap: 3px; }
.portfolio-card strong { font-size: 16px; line-height: 1.25; }
.portfolio-card span, .portfolio-card small, .portfolio-empty { color: var(--muted); font-size: 13px; }
.public-form { display: grid; gap: 14px; width: min(720px, 100%); padding-top: 4px; }
.public-form label { display: grid; gap: 6px; }
.public-form label span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.public-form input, .public-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: var(--field); color: var(--ink); font: 15px/1.45 system-ui, sans-serif; }
.public-form textarea { resize: vertical; min-height: 150px; }
.public-form button { justify-self: start; min-height: 40px; border: 1px solid var(--accent); border-radius: 6px; padding: 0 16px; background: var(--accent); color: var(--button-ink); font: 800 14px/1 system-ui, sans-serif; cursor: pointer; }
.forms-notice { width: min(720px, 100%); margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--support); border-radius: 6px; background: var(--field); }
.forms-notice.is-error { border-left-color: #a33a2b; }
@media (max-width: 640px) { .comments-heading, .comment-meta { align-items: start; flex-direction: column; } .comment-rating { justify-items: start; min-width: 0; } .comment.is-reply { margin-left: 10px; } .comment-form-actions button, .public-form button { width: 100%; } }

/* DesertCMS component upgrade: markdown documentation module. */
main:has(.docs-index), main:has(.docs-page) { width: min(1120px, calc(100% - 32px)); }
.docs-index, .docs-page { gap: 22px; }
.docs-search-panel { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); font: 13px/1.4 system-ui, sans-serif; }
.docs-search-panel span, .docs-source-label { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.docs-search-panel code, .docs-source-label code { overflow-wrap: anywhere; color: var(--ink); font-size: 12px; text-transform: none; letter-spacing: 0; }
.docs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.docs-card { display: grid; gap: 8px; min-height: 164px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); text-decoration: none; }
.docs-card:hover { border-color: var(--accent); box-shadow: 0 12px 28px rgba(16, 32, 51, 0.10); }
.docs-card span { color: var(--muted); font: 800 11px/1.25 system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.08em; overflow-wrap: anywhere; }
.docs-card strong { font-size: 20px; line-height: 1.15; letter-spacing: 0; }
.docs-card p, .docs-empty { margin: 0; color: var(--muted); font: 14px/1.5 system-ui, sans-serif; }
.docs-layout { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 30px; align-items: start; }
.docs-sidebar { position: sticky; top: 20px; }
.docs-nav { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); font: 800 13px/1.25 system-ui, sans-serif; }
.docs-nav a { padding: 9px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; }
.docs-nav a:hover, .docs-nav a.active { background: var(--panel); color: var(--accent); }
.docs-markdown { min-width: 0; display: grid; gap: 16px; padding-bottom: 20px; }
.docs-markdown h1, .docs-markdown h2, .docs-markdown h3, .docs-markdown h4 { margin: 14px 0 0; line-height: 1.15; letter-spacing: 0; }
.docs-markdown h1 { font-size: 42px; }
.docs-markdown h2 { font-size: 30px; padding-top: 8px; border-top: 1px solid var(--line); }
.docs-markdown h3 { font-size: 23px; }
.docs-markdown h4 { font-size: 18px; }
.docs-markdown p, .docs-markdown li, .docs-markdown blockquote { font-size: 18px; line-height: 1.65; }
.docs-markdown p { margin: 0; color: var(--ink); }
.docs-markdown a { color: var(--support); font-weight: 800; }
.docs-markdown ul, .docs-markdown ol { margin: 0; padding-left: 24px; }
.docs-markdown blockquote { margin: 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--field); color: var(--muted); }
.docs-code { max-width: 100%; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); overflow-x: auto; color: var(--ink); font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.docs-markdown code { padding: 2px 5px; border-radius: 4px; background: var(--field); font: 0.88em/1.4 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.docs-code code { padding: 0; background: transparent; }
.docs-table { width: 100%; border-collapse: collapse; font: 14px/1.45 system-ui, sans-serif; }
.docs-table th, .docs-table td { padding: 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.docs-table th { background: var(--field); color: var(--ink); font-weight: 800; }
.docs-table td { color: var(--muted); }
.docs-markdown img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); }
@media (max-width: 820px) { .docs-layout { grid-template-columns: 1fr; gap: 18px; } .docs-sidebar { position: static; } .docs-nav { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } .docs-search-panel { grid-template-columns: 1fr; } .docs-markdown h1 { font-size: 34px; } .docs-markdown h2 { font-size: 26px; } }

