/* The Cairn */
:root {
  --bg: #f5f1eb;
  --ink: #1a1a1a;
  --muted: #5a5348;
  --accent: #8b1c1c;
  --sep: #d0c4b6;
  --max: 42rem;
}
* { box-sizing: border-box; margin: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  padding: 1rem;
}
header {
  max-width: var(--max);
  margin: 0 auto 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  border-bottom: 1px solid var(--sep);
  padding-bottom: 0.75rem;
}
header .home {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
header nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 0.75rem;
  font-size: 0.9rem;
}
header nav a:hover { color: var(--accent); }
main {
  max-width: var(--max);
  margin: 0 auto;
}
h1 { font-size: 1.6rem; margin-bottom: 0.25rem; }
.meta, .date, .coords {
  color: var(--muted);
  font-size: 0.85rem;
}
.date { margin-bottom: 0.5rem; }
.coords { margin-top: 0.25rem; margin-bottom: 1rem; }
.text { margin: 1rem 0; }
figure { margin: 1rem 0; }
figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
figcaption {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.3rem;
}
.stone-wrap {
  margin: 1.5rem 0;
  text-align: center;
}
.stone-btn {
  width: 3rem; height: 3rem;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}
.stone-btn.placed { background: var(--accent); color: white; border-color: var(--accent); }
.stone-label { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.stone-count { font-size: 0.75rem; color: var(--muted); }
.cairn-wrap { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--sep); }
.cairn-wrap h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.cairn { width: 100%; max-width: 160px; height: auto; display: block; margin: 0 auto; }
.cairn-note { font-size: 0.8rem; color: var(--muted); text-align: center; margin-top: 0.5rem; }
.sources { margin-top: 1.5rem; }
.sources h2 { font-size: 1rem; }
.sources ul { list-style: none; padding: 0; font-size: 0.8rem; word-break: break-all; }
.sources li { margin: 0.2rem 0; }
.back { margin-top: 2rem; font-size: 0.9rem; }
.more { margin-top: 1rem; }
.archive-map { margin: 1rem 0; }
.archive-map svg { width: 100%; height: auto; }
.archive { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.85rem; }
.archive th, .archive td { text-align: left; padding: 0.4rem 0.3rem; border-bottom: 1px solid var(--sep); }
.archive th { color: var(--muted); font-weight: 600; }
.locator { width: 100%; max-width: 320px; height: auto; display: block; margin: 0.5rem 0; }
a { color: var(--accent); }

@media (max-width: 30rem) {
  body { padding: 0.75rem; font-size: 15px; }
  h1 { font-size: 1.35rem; }
  header nav a { margin-left: 0.5rem; }
}
