/* minimal-archive theme — white, serif headings, justified photo grid */
@import '_fonts.css';
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fff;
  --fg: #111;
  --mid: #666;
  --border: #ddd;
  --border-mid: #bbb;
  /* Override --accent in a custom theme to change link colour */
  --accent: #0068a5;
  --bg-subtle: #f5f5f5;
  --bg-muted: #f0f0f0;
  --bg-raised: #fafafa;
  /* Softer letterbox — less "gallery software", more "archive" */
  --hero-bg: #1a1a1a;
  --notice-bg: #fff8e1;
  --notice-border: #ffe082;
  --notice-fg: #5d4037;
  --font-ui: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Noto Sans Hebrew", sans-serif;
  --font-serif: 'Source Serif 4', "Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-mono: 'JetBrains Mono', ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  --thumb-h: 220px;
}

body { font-family: var(--font-ui); background: var(--bg); color: var(--fg); line-height: 1.6; }
a { color: var(--accent); }
a:hover { text-decoration: underline; }

/* Header / Nav */
.site-header { border-bottom: 1px solid var(--border); padding: .6rem 1.5rem .4rem; }
.site-nav {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.nav-brand {
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 400;
  color: var(--fg); margin-right: auto;
  display: flex; align-items: baseline; gap: .4em;
}
.nav-brand-name { text-decoration: none; color: var(--fg); }
.nav-handle { font-size: .8em; color: var(--mid); font-style: italic; text-decoration: none; }
.nav-handle:hover { color: var(--accent); }
.nav-links { list-style: none; display: flex; gap: 1rem; }
.nav-links a { text-decoration: none; color: var(--mid); font-size: .9rem; }
.nav-links a:hover { color: var(--fg); }
.nav-links a[aria-current="page"] {
  color: var(--bg); background: var(--fg);
  border-radius: 3px; padding: .15rem .5rem;
}

/* Scope metadata bar — "4,812 photos · 2020–2024 · archived Apr 2026" */
.site-meta {
  max-width: 1200px; margin: .3rem auto 0;
  font-size: .75rem; color: var(--mid);
  display: flex; align-items: center; gap: .45rem; flex-wrap: wrap;
  padding-bottom: .3rem;
}
.site-meta-sep { user-select: none; }
.search-wrap { position: relative; }
#search-input {
  border: 1px solid var(--border); border-radius: 4px;
  padding: .3rem .6rem; font-size: .85rem; width: 200px;
  background: var(--bg); color: var(--fg);
}
#search-results {
  position: absolute; right: 0; top: 100%; margin-top: .25rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: 4px;
  list-style: none; min-width: 260px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12); z-index: 100;
}
#search-results li a {
  display: block; padding: .4rem .75rem;
  color: var(--fg); text-decoration: none; font-size: .9rem;
}
#search-results li a:hover { background: var(--bg-subtle); }

/* Main content */
main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
main.main--wide { max-width: none; padding: .75rem; }
.page-title { font-family: var(--font-serif); font-size: 1.6rem; margin-bottom: 0; }
.page-title em { font-style: italic; color: var(--mid); }

/* Title block: title + counts on a ruled baseline */
.page-title-block {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border-mid);
  margin-bottom: 1rem;
  padding: .75rem .75rem .6rem;
}
.page-title-counts {
  display: flex; gap: 1rem; flex-shrink: 0;
  font-size: .8rem; color: var(--mid);
}
.page-title-counts strong { color: var(--fg); font-weight: 500; }

/* Photostream grid — justified layout: tiles grow to fill each row */
.photostream-grid {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.photostream-grid::after {
  /* absorbs leftover space so the last row stays left-aligned */
  content: ''; flex-grow: 9999;
}
.grid-tile {
  display: block; position: relative; overflow: hidden;
  background: var(--bg-muted); line-height: 0;
  flex-grow: 1; flex-shrink: 1;
  height: var(--thumb-h);
  max-width: calc(var(--thumb-h) * 6);
}
.grid-tile img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; transition: opacity .15s;
}
.grid-tile:hover img { opacity: .88; }
.tile-caption {
  display: none; position: absolute; inset: auto 0 0;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: .75rem; padding: .2rem .4rem; line-height: 1.3;
}
.grid-tile:hover .tile-caption,
.grid-tile:focus .tile-caption { display: block; }

/* Fave tombstone */
.fave-tombstone {
  width: 180px; height: var(--thumb-h);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-subtle); border: 1px solid var(--border);
  text-decoration: none;
}
.tombstone-label { color: var(--mid); font-size: .8rem; }

/* Pagination */
.pagination {
  display: flex; justify-content: center; align-items: center; gap: 1rem;
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border);
}
.page-link { font-size: .9rem; }
.page-link.disabled { color: var(--mid); pointer-events: none; }
.page-current { color: var(--mid); font-size: .9rem; }

/* Photo hero — full-width area above the content column */
.photo-hero {
  background: var(--hero-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 120px rgba(0,0,0,.15);
}
.photo-hero .photo-display {
  display: block;
  max-width: 100vw;
  max-height: calc(100vh - 3.5rem);
  width: auto;
  height: auto;
}
.photo-hero video.photo-display { width: 100%; max-height: calc(100vh - 3.5rem); }

/* Photo detail */
.photo-detail h1 {
  font-family: var(--font-serif); font-size: 2rem; margin-bottom: .25rem;
}
.photo-title-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-bottom: .6rem; border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.photo-title-row h1 { margin-bottom: 0; }
.photo-taken-stamp { font-size: .8rem; color: var(--mid); flex-shrink: 0; }

/* Two-column layout: main content + sidecar */
.photo-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 2rem;
  align-items: start;
}
.photo-figure { position: relative; margin: 0 0 1.5rem; }
.photo-display { max-width: 100%; height: auto; display: block; }
.photo-description { margin-bottom: 1rem; }
.photo-tags {
  list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem;
}
.photo-tags li {
  background: transparent; border: 1px solid var(--border); border-radius: 2px;
  padding: .15rem .45rem; font-size: .8rem;
}
.photo-tags li a { text-decoration: none; color: var(--fg); }
.photo-tags li a:hover { color: var(--accent); }

/* Sidecar */
.photo-sidecar {
  border-left: 1px solid var(--border);
  padding-left: 1.25rem;
  font-size: .8125rem;
  display: flex; flex-direction: column; gap: 1rem;
}

/* Mono-caps field label used in sidecar (ON FLICKR, LICENSE, IMPORTED, …) */
.provenance {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mid); margin-bottom: 4px;
}

/* Flickr engagement block */
.engagement .stats { font-family: var(--font-serif); font-size: 14px; color: var(--fg); }

/* Geo chip in sidecar */
.sidecar-geo {
  display: flex; align-items: center; gap: .4rem;
  font-size: .75rem; color: var(--mid);
}
.sidecar-geo svg { flex-shrink: 0; }

.sidecar-links { font-size: .8rem; }

/* Three-level EXIF sidecar */
.exif-sidecar { font-size: .8125rem; }
.exif-camera { font-size: .85rem; font-weight: 500; margin: 0 0 .1rem; }
.exif-lens { font-size: .8rem; color: var(--mid); margin: 0 0 .15rem; }
.exif-exposure { font-size: .8rem; margin: 0 0 .5rem; }
.exif-sep { color: var(--border-mid); margin: 0 .2rem; user-select: none; }
.exif-details { margin-top: .1rem; font-size: .8rem; }
.exif-details > summary {
  cursor: pointer; color: var(--mid); font-size: .75rem; list-style: none;
  display: flex; align-items: center; gap: .3rem; padding: .2rem 0;
}
.exif-details > summary::before { content: "▶"; font-size: .5rem; transition: transform .15s; }
.exif-details[open] > summary::before { transform: rotate(90deg); }
.exif-details > summary::-webkit-details-marker { display: none; }
.exif-group { padding: .3rem 0 .4rem; }
.exif-group h5 {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--mid); margin: 0 0 .25rem; font-weight: 500;
}
.exif-group dl { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; margin: 0; }
.exif-group dt { color: var(--mid); font-size: .73rem; }
.exif-group dd { margin: 0; font-family: var(--font-mono); font-size: .7rem; color: var(--fg); overflow-wrap: anywhere; }
.exif-group .exif-wide { grid-column: 1 / -1; }
.exif-raw-details { margin-top: .4rem; }
.exif-raw-details > summary {
  cursor: pointer; color: var(--mid); font-size: .72rem; list-style: none;
  display: flex; align-items: center; gap: .3rem; padding: .15rem 0;
}
.exif-raw-details > summary::before { content: "▶"; font-size: .5rem; transition: transform .15s; }
.exif-raw-details[open] > summary::before { transform: rotate(90deg); }
.exif-raw-details > summary::-webkit-details-marker { display: none; }
.exif-raw { display: grid; grid-template-columns: auto 1fr; gap: .1rem .5rem; margin: .3rem 0 0; }
.exif-raw dt { color: var(--border-mid); font-size: .7rem; }
.exif-raw dd { margin: 0; font-family: var(--font-mono); font-size: .7rem; color: var(--fg); }
.exif-pii-note {
  font-size: .68rem; color: var(--mid); margin: .4rem 0 0; font-style: italic;
}
.exif-pii-note code {
  font-family: var(--font-mono); font-size: .68rem;
  background: var(--bg-subtle); padding: 1px 4px; border-radius: 2px; font-style: normal;
}

/* Comments — serif body, mono date right-aligned */
.comments { margin-top: 2rem; }
.comments-heading { font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: .75rem; }
.comments-count { font-size: .8rem; color: var(--mid); font-family: var(--font-ui); }
.comment { border-bottom: 1px solid var(--border); padding: .75rem 0; }
.comment:last-child { border-bottom: none; }
.comment-header {
  display: flex; align-items: center; gap: .5rem;
  font-size: .85rem; color: var(--mid); margin-bottom: .35rem; flex-wrap: wrap;
}
.comment-author { font-weight: 600; color: var(--fg); }
.comment-date { margin-left: auto; font-size: .75rem; color: var(--mid); flex-shrink: 0; font-family: var(--font-mono); }
.comment-body {
  font-family: var(--font-serif); font-size: .9375rem;
  line-height: 1.55; color: var(--fg);
}

.photo-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border);
  font-size: .875rem;
}
.nav-arrow { font-family: var(--font-mono); }
.photo-links { margin-top: 1rem; margin-bottom: 1.5rem; font-size: .875rem; color: var(--mid); }
a.external-link::after { content: " ↗"; font-size: .75em; }

@media (max-width: 800px) {
  .photo-body { grid-template-columns: 1fr; }
  .photo-sidecar { border-left: none; border-top: 1px solid var(--border); padding-left: 0; padding-top: 1rem; }
}

/* Notes overlay */
.notes-layer { position: absolute; inset: 0; pointer-events: none; }
.note-overlay {
  position: absolute; border: 2px solid rgba(255, 255, 0, 0.9);
  box-sizing: border-box; pointer-events: auto; cursor: default;
}
.note-overlay:hover::after {
  content: attr(title);
  position: absolute; bottom: calc(100% + 4px); left: 0;
  background: rgba(0,0,0,.8); color: #fff;
  font-size: .8rem; padding: .2rem .5rem; border-radius: 3px;
  white-space: pre-wrap; max-width: 240px; z-index: 10;
  pointer-events: none;
}

/* About */
.about-profile h1 { font-family: var(--font-serif); font-size: 2rem; }
.about-realname, .about-since { color: var(--mid); font-size: .9rem; margin-top: .25rem; }
.about-bio { margin-top: 1.5rem; }
.about-stats { margin-top: 1.5rem; }
.about-stats h2 { font-family: var(--font-serif); font-size: 1.1rem; margin-bottom: .5rem; }
.stats-grid {
  display: grid; grid-template-columns: auto 1fr; gap: .2rem .75rem;
  font-size: .875rem;
}
.stats-grid dt { color: var(--mid); }

/* Groups */
.groups-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.group-item { display: flex; align-items: center; gap: .75rem; }
.group-link { font-size: .95rem; }
.group-role { font-size: .8rem; color: var(--mid); background: var(--bg-muted); padding: .1rem .35rem; border-radius: 2px; }

/* Testimonials */
.testimonials-section { margin-bottom: 2rem; }
.testimonials-section h2 { font-family: var(--font-serif); margin-bottom: 1rem; }
.testimonial { border-top: 1px solid var(--border); padding: .75rem 0; }
.testimonial-header { font-size: .875rem; color: var(--mid); margin-bottom: .25rem; }
.testimonial-header a { font-weight: 600; }
.testimonial-body { margin-top: .25rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); padding: 1rem 1.5rem;
  text-align: center; color: var(--mid); margin-top: 3rem;
}
.empty-state { color: var(--mid); text-align: center; padding: 3rem; }

/* Collection list (albums, galleries) */
.collection-list { list-style: none; display: flex; flex-direction: column; gap: .75rem; }
.collection-item { border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.collection-link { display: flex; align-items: center; gap: 1rem; padding: .75rem; text-decoration: none; color: var(--fg); }
.collection-link:hover { background: var(--bg-subtle); }
.collection-thumb { width: 80px; height: 60px; object-fit: cover; flex-shrink: 0; border-radius: 2px; }
.collection-thumb--placeholder { background: var(--bg-muted); }
.collection-info { flex: 1; }
.collection-count { font-size: .8rem; color: var(--mid); display: block; }
.collection-desc { font-size: .8rem; color: var(--mid); margin-top: .2rem; }
.album-meta { color: var(--mid); font-size: .875rem; margin-bottom: 1rem; }
.tombstone { background: var(--bg-subtle); display: flex; align-items: center; justify-content: center; height: var(--thumb-h); font-size: .8rem; }
.tombstone-label { color: var(--mid); }

/* Groups */
.groups-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.group-item { display: flex; align-items: center; gap: .75rem; }
.group-link { font-size: .95rem; }
.group-role { font-size: .8rem; color: var(--mid); background: var(--bg-muted); padding: .1rem .35rem; border-radius: 2px; }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; padding: 1rem 0; }
.tag-cloud-item { text-decoration: none; color: var(--fg); display: inline-flex; align-items: baseline; gap: .3em; }
.tag-cloud-item:hover { color: var(--accent); }
.tag-count { font-size: .75em; color: var(--mid); }
.tag-size-1 { font-size: .85rem; }
.tag-size-2 { font-size: 1rem; }
.tag-size-3 { font-size: 1.2rem; }
.tag-size-4 { font-size: 1.45rem; }
.tag-size-5 { font-size: 1.75rem; }
.tag-photo-count { color: var(--mid); margin-bottom: 1rem; }
.tags-top20 { margin-bottom: 1.5rem; }
.tags-top20-heading { font-family: var(--font-serif); font-size: .85rem; color: var(--mid); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .4rem; font-weight: 400; }
.tag-letter-strip {
  display: flex; flex-wrap: wrap; gap: .15rem; margin: .5rem 0;
  font-size: .75rem;
}
.tag-letter-strip a {
  padding: .1rem .4rem; border-radius: 2px; color: var(--mid);
  text-decoration: none; border: 1px solid var(--border);
}
.tag-letter-strip a:hover { color: var(--fg); border-color: var(--fg); }
.tag-letter-anchor { display: block; height: 0; overflow: hidden; }

/* Tag sort filter tabs — CSS-only via :target */
.filter-row {
  display: flex; gap: .25rem; margin: .5rem 0 0;
  font-size: .75rem;
}
.filter-row a {
  padding: .2rem .6rem; border-radius: 2px; color: var(--mid);
  text-decoration: none; border: 1px solid transparent;
}
.filter-row a:hover { color: var(--fg); border-color: var(--border); }

/* Hidden anchors for :target switching */
#sort-anchor-alpha, #sort-anchor-count { display: block; height: 0; overflow: hidden; }

/* Default: alpha visible, count/first hidden */
.tags-by-count { display: none; }
.tags-by-first { display: none; }

/* When count anchor is targeted: show count, hide alpha */
#sort-anchor-count:target ~ .tags-by-alpha { display: none; }
#sort-anchor-count:target ~ .tags-by-count { display: flex; }

/* When first anchor is targeted: show first, hide alpha */
#sort-anchor-first:target ~ .tags-by-alpha { display: none; }
#sort-anchor-first:target ~ .tags-by-first { display: flex; }

/* Highlight active sort tab: alpha is default, count/first when targeted */
.filter-row a[href="#sort-anchor-alpha"] { background: var(--fg); color: var(--bg); }
#sort-anchor-count:target ~ .filter-row a[href="#sort-anchor-alpha"] { background: transparent; color: var(--mid); border-color: transparent; }
#sort-anchor-count:target ~ .filter-row a[href="#sort-anchor-count"] { background: var(--fg); color: var(--bg); }
#sort-anchor-first:target ~ .filter-row a[href="#sort-anchor-alpha"] { background: transparent; color: var(--mid); border-color: transparent; }
#sort-anchor-first:target ~ .filter-row a[href="#sort-anchor-first"] { background: var(--fg); color: var(--bg); }

/* Private views */
.private-notice { background: var(--notice-bg); border: 1px solid var(--notice-border); border-radius: 4px; padding: .4rem .75rem; font-size: .85rem; color: var(--notice-fg); margin-bottom: 1rem; }
.user-list { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.mail-table { width: 100%; border-collapse: collapse; }
.mail-table th, .mail-table td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid var(--border); }
.mail-table th { font-weight: 600; background: var(--bg-raised); }
.mail-body { padding: .5rem .75rem .75rem; color: var(--mid); font-size: .9rem; }
.mail-body-row td { padding: 0; }
.comment-log { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.comment-log-item { border-top: 1px solid var(--border); padding-top: .75rem; }
.comment-log-item header { display: flex; gap: 1rem; font-size: .85rem; color: var(--mid); margin-bottom: .35rem; }

/* Map */
.map-container { position: relative; margin-top: 1rem; }
.world-map { width: 100%; border: 1px solid var(--border); overflow: hidden; }
.world-map svg { width: 100%; height: auto; display: block; }
/* Outline-only landmasses — match the page's rule colour */
.world-map svg path[fill]:not([fill="none"]) { fill: var(--bg-subtle); stroke: var(--border-mid); stroke-width: .6; }
.map-tooltip {
  position: fixed; background: rgba(0,0,0,.75); color: #fff;
  font-size: .8rem; padding: .25rem .5rem; border-radius: 3px;
  pointer-events: none; z-index: 200; max-width: 200px;
}
.map-subtitle { color: var(--mid); margin-bottom: .5rem; }

@media (max-width: 600px) {
  :root { --thumb-h: 130px; }
  main.main--wide { padding: .4rem; }
  .site-nav { gap: .75rem; }
  #search-input { width: 140px; }
  .photo-detail h1 { font-size: 1.4rem; }
}

/* Photo ref sections: people / in-albums / in-galleries / in-groups */
.photo-ref-section { margin-bottom: 1rem; }
.photo-ref-section h3 {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--mid); margin-bottom: .35rem; font-weight: 500;
}
.photo-ref-section ul { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; }
.photo-ref-section li a {
  font-size: .8rem; text-decoration: none; color: var(--fg);
  border: 1px solid var(--border); border-radius: 2px;
  padding: .15rem .45rem; display: inline-block;
}
.photo-ref-section li a:hover { color: var(--accent); border-color: var(--accent); }

/* Geo inset */
.geo-inset {
  margin-bottom: 1rem; max-width: 240px;
  border: 1px solid var(--border); border-radius: 4px; overflow: hidden;
}
.geo-inset svg { display: block; width: 100%; height: auto; }

/* Tombstone for missing-media photos */
.grid-tile.missing-media {
  background: var(--bg-muted); display: flex; align-items: center; justify-content: center;
}

/* Safety veiled tiles — tombstone shown in safe-only mode */
.grid-tile.safety-veiled { position: relative; overflow: hidden; }
.tombstone {
  display: none;
  position: absolute; inset: 0;
  background: var(--bg-subtle);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  cursor: pointer;
  z-index: 2;
  line-height: 1.4;
}
.tombstone-date {
  font-family: var(--font-mono);
  font-size: .75rem; color: var(--mid);
  text-transform: uppercase; letter-spacing: .04em;
}
.tombstone-hint { font-size: .7rem; color: var(--mid); font-style: italic; }

/* Activate tombstone in safe-only mode (JS adds this class to <body>) */
body.safe-only-mode .safety-veiled:not(.revealed) .tombstone { display: flex; }
body.safe-only-mode .safety-veiled:not(.revealed) img { visibility: hidden; }
body.safe-only-mode .safety-veiled:not(.revealed) .tile-caption { visibility: hidden; }

/* Safety toggle button in the nav */
.safety-toggle-btn {
  font-size: .8rem; padding: .25rem .6rem;
  border: 1px solid var(--border-mid); border-radius: 3px;
  background: var(--bg); color: var(--mid);
  cursor: pointer; white-space: nowrap;
}
.safety-toggle-btn:hover { border-color: var(--fg); color: var(--fg); }
body.safe-only-mode .safety-toggle-btn { background: var(--bg-subtle); color: var(--fg); }

/* Safety notice on photo detail pages */
.safety-notice {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--notice-bg); border: 1px solid var(--notice-border);
  color: var(--notice-fg); padding: .5rem 1rem;
  font-size: .875rem; margin-bottom: 1rem; border-radius: 3px;
}
.safety-notice-dismiss {
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; color: var(--notice-fg); padding: 0 .2rem; line-height: 1;
  flex-shrink: 0;
}

/* Safety badge in photo metadata */
.safety-moderate { color: #b45309; font-weight: 600; }
.safety-restricted { color: #dc2626; font-weight: 600; }

/* About page location and social links */
.about-location { color: var(--mid); font-size: .875rem; margin: .25rem 0; }
.about-social { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.about-social li a { font-size: .875rem; }

/* Comment author initials-circle avatar */
.comment-header { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--mid);
  color: #fff;
  font-size: .75rem;
  font-weight: bold;
  flex-shrink: 0;
  user-select: none;
}
.avatar-img {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; vertical-align: middle;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --fg: #e0e0e0;
    --mid: #999;
    --border: #333;
    --border-mid: #555;
    --accent: #5ab3e0;
    --bg-subtle: #252525;
    --bg-muted: #222;
    --bg-raised: #202020;
    --hero-bg: #0a0a0a;
    --notice-bg: #2a2200;
    --notice-border: #5a4200;
    --notice-fg: #e8c840;
  }
}

/* Date archive — sparkline + year pages */
.sparkline { display: flex; flex-direction: column; gap: 3px; margin: 1.5rem 0; }
.sparkline-row { display: flex; align-items: center; gap: 6px; }
.sparkline-month-label {
  font-family: var(--font-mono); font-size: .65rem; color: var(--mid);
  width: 2.4rem; flex-shrink: 0; text-align: right;
}
.sparkline-cells { display: flex; gap: 2px; }
.sparkline-cell {
  width: 11px; height: 11px; border-radius: 2px; display: block;
  background: var(--bg-subtle); text-decoration: none;
}
a.sparkline-cell:hover { outline: 1px solid var(--accent); }
a.sparkline-cell:focus { outline: 2px solid var(--accent); }
.sparkline-cell[data-density="0"] { background: var(--bg-subtle); }
.sparkline-cell[data-density="1"] { background: color-mix(in srgb, var(--accent) 20%, var(--bg-subtle)); }
.sparkline-cell[data-density="2"] { background: color-mix(in srgb, var(--accent) 40%, var(--bg-subtle)); }
.sparkline-cell[data-density="3"] { background: color-mix(in srgb, var(--accent) 65%, var(--bg-subtle)); }
.sparkline-cell[data-density="4"] { background: var(--accent); }

/* Archive index row */
.archive-index { display: flex; flex-direction: column; gap: 8px; margin-top: 1.5rem; }
.archive-year-row { display: flex; align-items: center; gap: 1rem; }
.archive-year-label {
  font-family: var(--font-mono); font-size: .8rem; color: var(--fg);
  width: 3.2rem; flex-shrink: 0; text-align: right; text-decoration: none; font-weight: 500;
}
.archive-year-label:hover { color: var(--accent); }
.archive-year-strip { display: flex; gap: 3px; }
.archive-month-cell { width: 18px; height: 14px; border-radius: 2px; }
.archive-year-total {
  font-family: var(--font-mono); font-size: .72rem; color: var(--mid); flex-shrink: 0;
}

/* Year page — day sections */
.archive-days { margin-top: 2rem; }
.day-section { padding-top: 1.5rem; }
.day-section-heading {
  font-family: var(--font-mono); font-size: .75rem; color: var(--mid);
  text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .6rem;
  border-bottom: 1px solid var(--border); padding-bottom: .3rem;
}
.archive-day-grid {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.archive-thumb-link { display: block; flex-shrink: 0; }
.archive-thumb { width: 80px; height: 60px; object-fit: cover; border-radius: 2px; display: block; }

/* Photo detail: date links */
.photo-taken-stamp a {
  color: inherit; text-decoration: none;
}
.photo-taken-stamp a:hover { color: var(--accent); text-decoration: underline; }
.photo-taken-stamp a + a::before { content: " "; }

@media print {
  .site-header, .site-footer, .search-wrap,
  .photo-nav, .pagination, .filter-row { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; }
  /* Print URLs next to external links */
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #444; }
  a[href^="http"].external-link::after { content: " (" attr(href) ")"; }
  .photo-body { display: block; }
  .photo-sidecar { border-left: 1px solid #ccc; padding-left: 1rem; margin-top: 1rem; }
  .photo-hero { break-after: avoid; }
  img { max-width: 100%; }
}
