/* =========================================================
   deltrons.com — production design system
   Ported from WP0-Design/prototype/prototype.css
   Type: Newsreader (serif) + Mulish (sans)  [JetBrains Mono dropped]
   Palette: warm paper, deep teal accent
   ========================================================= */

:root {
  /* Surfaces */
  --paper:       #f8f5ef;
  --paper-2:     #f3eee2;
  --card:        #ffffff;
  --card-hover:  #fcfaf4;

  /* Ink */
  --ink:         #1a1714;
  --ink-strong:  #0d0b08;
  --ink-soft:    #443f37;
  --muted:       #6e6a63;
  --faint:       #a8a499;

  /* Lines */
  --border:      #e6dec9;
  --border-soft: #efe8d8;
  --rule:        #d6cdb6;

  /* Accent (deep teal) */
  --teal:        #1f8a7e;
  --teal-hover:  #166b62;
  --teal-soft:   #d9ebe8;
  --teal-tint:   #f0f7f6;
  --teal-deep:   #0f4f48;

  /* Sources */
  --wp:          #4a7ca8;
  --wp-soft:     #e0ebf4;
  --blogger:     #c97548;
  --blogger-soft:#f6e3d6;

  /* Type */
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Mulish", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;

  /* Radii / shadows */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;
  --sh-sm: 0 1px 2px rgba(40, 30, 10, 0.05), 0 1px 1px rgba(40, 30, 10, 0.04);
  --sh:    0 4px 14px rgba(40, 30, 10, 0.06), 0 1px 2px rgba(40, 30, 10, 0.04);
  --sh-lg: 0 20px 50px rgba(20, 14, 4, 0.18), 0 6px 16px rgba(20, 14, 4, 0.08);

  /* Layout */
  --content-max:    1180px;
  --reading-max:    640px;
  --sidebar-w:      200px;
  --header-h:       64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* =========================================================
   Typography
   ========================================================= */
.serif { font-family: var(--serif); }
.sans  { font-family: var(--sans); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink-strong);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4.5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  text-wrap: balance;
}
.title-lg { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.15; }
.title    { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.2; }
.title-sm { font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1.25; }

.body    { font-size: 16px; line-height: 1.6; }
.body-lg { font-size: 18px; line-height: 1.65; }
.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.caption {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(0.5px); }
.btn-primary {
  background: var(--teal);
  color: white;
}
.btn-primary:hover { background: var(--teal-hover); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--card-hover); border-color: var(--rule); }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* Source badge */
.src-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.src-badge.wordpress { background: var(--wp-soft); color: var(--wp); }
.src-badge.blogger   { background: var(--blogger-soft); color: var(--blogger); }

/* =========================================================
   Site chrome
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 245, 239, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: var(--content-max);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 24px;
  display: flex; align-items: center; gap: 20px;
}
.brand {
  display: flex; flex-direction: column;
  line-height: 1.1;
}
.brand .name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  color: var(--ink-strong);
  letter-spacing: -0.01em;
}
.brand .subtitle {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
}
.nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
}
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14px;
  font-family: var(--sans);
  cursor: pointer;
}
.nav a:hover { background: var(--card-hover); color: var(--ink); }
.nav a.active { color: var(--teal-deep); }
.search-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  min-width: 160px;
}
.search-btn:hover { color: var(--ink); border-color: var(--rule); }
.search-btn .kbd {
  margin-left: auto;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 11px;
  color: var(--faint);
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--paper);
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  padding: 28px 24px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.site-footer .heart { color: var(--teal); }
.site-footer a:hover { color: var(--teal-deep); }

/* =========================================================
   Photo containers — real <img>/<video> elements
   ========================================================= */
.photo-wrap {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
}
.photo-wrap img,
.photo-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-wrap.clickable { cursor: pointer; }
.photo-wrap.clickable img { transition: transform .25s ease; }
.photo-wrap.clickable:hover img { transform: scale(1.03); }

/* video play badge over a video thumbnail */
.video-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.video-play svg {
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  opacity: 0.95;
}
/* missing-media fallback (media lives in R2; 404 locally is expected) */
.photo-wrap img {
  color: transparent;
}

/* =========================================================
   Page containers
   ========================================================= */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}
.reading {
  max-width: var(--reading-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   HOME (D2)
   ========================================================= */
.home-hero {
  padding: 56px 24px 24px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.home-hero .welcome {
  font-family: var(--sans);
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.home-hero .h1 {
  margin-top: 10px;
}
.home-hero .h1 em {
  font-style: italic;
  color: var(--teal-deep);
  font-weight: 500;
}
.home-hero .subline {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14.5px;
}
.home-hero .subline .dot { margin: 0 8px; color: var(--faint); }

.memory-card {
  margin: 36px auto 0;
  max-width: 720px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  overflow: hidden;
  text-align: left;
  transition: box-shadow .2s, transform .2s;
}
.memory-card .photo-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.memory-card .body {
  padding: 24px 28px 28px;
}
.memory-card .meta {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}
.memory-card .meta .sep { color: var(--faint); }
.memory-card h2 {
  margin-top: 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.memory-card .excerpt {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
  font-family: var(--serif);
  font-weight: 400;
}
.memory-card .actions {
  margin-top: 22px;
  display: flex; gap: 10px; flex-wrap: wrap;
}

.divider-or {
  display: flex; align-items: center; gap: 16px;
  max-width: 720px;
  margin: 56px auto 18px;
  color: var(--muted);
  font-size: 13px;
}
.divider-or::before, .divider-or::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.browse-pills {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  padding-bottom: 40px;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.pill:hover { background: var(--card-hover); border-color: var(--rule); color: var(--ink); }
.pill.active { background: var(--teal); color: white; border-color: var(--teal); }
.pill .count { font-weight: 500; color: var(--faint); margin-left: 4px; }
.pill.active .count { color: rgba(255,255,255,0.75); }

/* =========================================================
   BROWSE (A)
   ========================================================= */
.browse-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 40px;
  padding-top: 28px;
  padding-bottom: 60px;
}
.browse-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
  padding-right: 4px;
}
.browse-sidebar h4 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.year-tree { display: flex; flex-direction: column; gap: 1px; }
.year-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .12s, color .12s;
  user-select: none;
}
.year-row:hover { background: var(--card-hover); color: var(--ink); }
.year-row.open { color: var(--ink); }
.year-row .chev {
  width: 12px; opacity: 0.5; transition: transform .15s;
}
.year-row.open .chev { transform: rotate(90deg); opacity: 0.7; }
.year-row .count { margin-left: auto; color: var(--faint); font-weight: 500; font-size: 12.5px; }
.year-row.active {
  background: var(--teal-tint);
  color: var(--teal-deep);
}
.year-row.active .count { color: var(--teal); }
.month-list { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 6px; }
.month-row {
  padding: 5px 10px 5px 30px;
  border-radius: 6px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.month-row:hover { background: var(--card-hover); color: var(--ink); }
.month-row.active {
  background: var(--teal);
  color: white;
}
.month-row .count { margin-left: auto; font-size: 12px; color: var(--faint); }
.month-row.active .count { color: rgba(255,255,255,0.75); }

.media-toggle {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
}
.media-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
}
.media-row:hover { background: var(--card-hover); }
.media-row.active { background: var(--teal-tint); color: var(--teal-deep); font-weight: 600; }
.media-row svg { width: 14px; height: 14px; }

.browse-header {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.browse-header h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.01em;
}
.browse-header .count {
  color: var(--muted);
  font-size: 14.5px;
}
.browse-search {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  min-width: 220px;
}
.browse-search:hover { border-color: var(--rule); color: var(--ink); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px 18px;
}
.post-card {
  display: flex; flex-direction: column;
  background: transparent;
  cursor: pointer;
}
.post-card .photo-wrap {
  aspect-ratio: 4 / 3;
  border-radius: var(--r);
  overflow: hidden;
  position: relative;
  box-shadow: var(--sh-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.post-card:hover .photo-wrap {
  transform: translateY(-2px);
  box-shadow: var(--sh);
}
.post-card h3 {
  margin-top: 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--ink-strong);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card time {
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted);
}

.empty-note {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 18px;
}

.pagination {
  margin-top: 38px;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  font-family: var(--sans);
}
.pagination a, .pagination span.btn-disabled {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14px;
}
.pagination a:hover { background: var(--card-hover); color: var(--ink); }
.pagination span.btn-disabled { color: var(--faint); cursor: default; }
.pagination .page-info { color: var(--muted); font-size: 13.5px; font-weight: 400; }

/* =========================================================
   POST (A2 + A3)
   ========================================================= */
.post-page {
  padding: 32px 0 40px;
}
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
}
.back-link:hover { color: var(--teal-deep); }

.post-header { margin-top: 12px; }
.post-header h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
}
.post-meta {
  margin-top: 14px;
  display: flex; align-items: center; gap: 14px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}
.post-meta .sep { color: var(--faint); }

.post-body {
  margin-top: 28px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
}
.post-body p { margin-bottom: 1em; }
.post-body h1, .post-body h2, .post-body h3 { margin: 1.2em 0 .5em; }
.post-body a { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover { color: var(--teal); }
.post-body ul, .post-body ol { margin: 0 0 1em 1.4em; }
.post-body li { margin-bottom: .3em; }
.post-body blockquote {
  margin: 1.2em 0; padding-left: 18px;
  border-left: 3px solid var(--rule); color: var(--ink-soft);
}
.post-body br { line-height: 1; }

/* In-body images rewritten to real <img> — make them tidy + clickable */
.post-body img {
  border-radius: var(--r);
  margin: 6px 0;
  cursor: zoom-in;
  background: var(--paper-2);
}
.post-body a img { cursor: zoom-in; }
.post-body figure { margin: 28px 0; }
.post-body figcaption {
  text-align: center;
  margin-top: 10px;
  font-family: var(--sans);
  font-style: italic;
  font-size: 13.5px;
  color: var(--muted);
}
.post-body video {
  width: 100%;
  border-radius: var(--r);
  margin: 16px 0;
  background: #000;
}

/* YouTube embeds (rewrite_content emits .yt-embed-wrapper) */
.yt-embed-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 24px 0;
  border-radius: var(--r);
  overflow: hidden;
  background: #000;
}
.yt-embed-wrapper iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* All photos drawer */
.all-photos {
  max-width: var(--reading-max);
  margin: 56px auto 0;
  padding: 0 24px;
}
.all-photos > .head {
  display: flex; align-items: baseline; gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
  margin-bottom: 16px;
  cursor: pointer;
  list-style: none;
}
.all-photos > .head::-webkit-details-marker { display: none; }
.all-photos .head h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
}
.all-photos .head .count { color: var(--muted); font-size: 13.5px; }
.all-photos .head .toggle {
  margin-left: auto;
  color: var(--teal-deep);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
}
.all-photos .toggle .when-open { display: inline; }
.all-photos .toggle .when-closed { display: none; }
.all-photos:not([open]) .toggle .when-open { display: none; }
.all-photos:not([open]) .toggle .when-closed { display: inline; }
.all-photos .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.all-photos .grid .photo-wrap {
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}

.post-nav {
  max-width: var(--reading-max);
  margin: 60px auto 0;
  padding: 26px 24px 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  font-family: var(--sans);
  font-size: 14px;
}
.post-nav .prev, .post-nav .next {
  color: var(--muted);
}
.post-nav .prev:hover, .post-nav .next:hover { color: var(--teal-deep); }
.post-nav .prev .dir, .post-nav .next .dir {
  display: block;
  font-weight: 700; font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 3px;
}
.post-nav .next { text-align: right; }
.post-nav .home {
  font-weight: 600;
  color: var(--ink-soft);
  align-self: center;
}
.post-nav .home:hover { color: var(--teal-deep); }
.post-nav .spacer { color: transparent; }

/* =========================================================
   Lightbox (A3)
   ========================================================= */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 8, 4, 0.92);
  display: none;
  flex-direction: column;
}
.lightbox.open { display: flex; animation: lb-in .18s ease-out; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox .lb-top {
  display: flex; align-items: center;
  padding: 14px 20px;
  color: rgba(255,255,255,0.85);
  font-family: var(--sans);
  font-size: 13.5px;
}
.lightbox .lb-top .index { font-variant-numeric: tabular-nums; }
.lightbox .lb-top .title-track { margin-left: 14px; opacity: 0.7; }
.lightbox .lb-top .close {
  margin-left: auto;
  color: rgba(255,255,255,0.9);
  font-size: 22px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
}
.lightbox .lb-top .close:hover { background: rgba(255,255,255,0.1); }
.lightbox .lb-stage {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0 24px 8px;
  gap: 16px;
  min-height: 0;
}
.lightbox .lb-stage .arrow {
  width: 48px; height: 48px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.9);
  font-size: 24px;
  cursor: pointer;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.lightbox .lb-stage .arrow:hover { background: rgba(255,255,255,0.14); }
.lightbox .lb-stage .arrow[hidden] { visibility: hidden; }
.lightbox .lb-stage .frame {
  width: 100%; max-width: 1100px; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.lightbox .lb-stage .frame img,
.lightbox .lb-stage .frame video {
  max-width: 100%;
  max-height: calc(100vh - 200px);
  width: auto; height: auto;
  border-radius: 8px;
  box-shadow: var(--sh-lg);
  object-fit: contain;
  background: #000;
}
.lightbox .lb-thumbs {
  display: flex; gap: 6px; padding: 14px 24px 22px;
  overflow-x: auto;
  justify-content: center;
}
.lightbox .lb-thumbs .photo-wrap {
  width: 60px; height: 60px;
  border-radius: 4px; overflow: hidden;
  opacity: 0.55; cursor: pointer;
  flex-shrink: 0;
  border: 2px solid transparent;
}
.lightbox .lb-thumbs .photo-wrap.active {
  opacity: 1;
  border-color: rgba(255,255,255,0.85);
}
.lightbox .lb-caption {
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 12.5px;
  font-family: var(--sans);
  padding-bottom: 12px;
}

/* =========================================================
   SEARCH (reuses browse styling)
   ========================================================= */
.search-page { padding-top: 36px; padding-bottom: 60px; }
.search-page h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.01em;
}
.search-box {
  margin: 18px 0 8px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  max-width: 520px;
}
.search-box input {
  flex: 1;
  font-family: var(--sans);
  font-size: 15px;
  border: none; outline: none; background: none;
  color: var(--ink);
}
.search-box svg { color: var(--muted); flex-shrink: 0; }
.search-status {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 14px;
}
#search-results .post-grid { margin-top: 8px; }
mark { background: var(--teal-soft); color: var(--teal-deep); padding: 0 2px; border-radius: 3px; }

/* Pagefind UI theming */
:root {
  --pagefind-ui-scale: 0.9;
  --pagefind-ui-primary: var(--teal-deep);
  --pagefind-ui-text: var(--ink);
  --pagefind-ui-background: var(--card);
  --pagefind-ui-border: var(--border);
  --pagefind-ui-tag: var(--paper-2);
  --pagefind-ui-border-radius: 12px;
  --pagefind-ui-font: var(--sans);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 860px) {
  .browse-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .browse-sidebar {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
  }
  .browse-sidebar .year-tree { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .browse-sidebar .year-row { padding: 4px 10px; }
  .browse-sidebar .month-list { display: none; }
  .browse-sidebar .media-toggle {
    flex-direction: row; flex-wrap: wrap;
    border-top: none; margin-top: 8px; padding-top: 8px;
  }
  .post-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
  .nav a { display: none; }
  .nav a.always-show { display: inline-flex; }
  .search-btn { min-width: 0; padding: 7px 10px; }
  .search-btn .kbd { display: none; }
  .memory-card .body { padding: 20px 22px 22px; }
  .memory-card h2 { font-size: 24px; }
}
@media (max-width: 520px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
  .all-photos .grid { grid-template-columns: repeat(3, 1fr); }
  .home-hero { padding: 32px 16px 16px; }
}
