:root {
  --bg: #f3f0ea;
  --paper: #fbf9f6;
  --ink: #1c1916;
  --muted: #6d655c;
  --line: #e3dcd2;
  --line-strong: #cfc6ba;
  --accent: #1b4a46;
  --accent-soft: #e5efec;
  --serif: "Newsreader", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --shadow: 0 18px 50px rgba(28, 25, 22, 0.08);
  --max: 760px;
  --wide: 920px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 40% at 10% -10%, rgba(27, 74, 70, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 35% at 100% 0%, rgba(140, 110, 70, 0.07), transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

button, input { font: inherit; color: inherit; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 240, 234, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
  padding: 0.7rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  min-width: 0;
}

.brand-logo {
  width: auto;
  height: 2.55rem;
  max-width: min(260px, 62vw);
}

.top-label {
  flex: none;
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.burger {
  display: none;
  position: relative;
  width: 2.6rem;
  height: 2.6rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex: none;
}

.burger-lines {
  position: relative;
  display: block;
  width: 1.25rem;
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transition: background-color 0.18s ease;
}

.burger-lines::before,
.burger-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 1.25rem;
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.22s ease, top 0.22s ease;
}

.burger-lines::before { top: -7px; }
.burger-lines::after { top: 7px; }

.burger[aria-expanded="true"] .burger-lines {
  background: transparent;
}

.burger[aria-expanded="true"] .burger-lines::before {
  top: 0;
  transform: rotate(45deg);
}

.burger[aria-expanded="true"] .burger-lines::after {
  top: 0;
  transform: rotate(-45deg);
}

.year-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.year-drawer:not([hidden]) {
  pointer-events: auto;
}

.year-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(28, 25, 22, 0.38);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.year-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(19.5rem, 86vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(104%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.year-drawer.is-open .year-drawer-backdrop { opacity: 1; }
.year-drawer.is-open .year-drawer-panel { transform: translateX(0); }

.year-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.15rem 0.85rem;
  border-bottom: 1px solid var(--line);
}

.year-drawer-head p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.year-drawer-close {
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.year-drawer-close:hover { color: var(--ink); }

.years-menu {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0.85rem 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.years-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.years-menu button:hover {
  background: var(--accent-soft);
}

.years-menu button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.years-menu button[aria-pressed="true"]::after {
  content: "✓";
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
}

body.menu-open {
  overflow: hidden;
}

.wrap {
  width: min(var(--wide), calc(100% - 2.4rem));
  margin: 0 auto;
}

.intro {
  padding: 3.2rem 0 1.8rem;
}

.intro-copy {
  max-width: 38rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 450;
  font-size: clamp(2.55rem, 6.4vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.lead {
  margin: 0.95rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.tools {
  display: grid;
  gap: 1rem;
  margin-top: 1.35rem;
}

.search {
  display: block;
  max-width: 28rem;
}

.search input {
  width: 100%;
  padding: 0.78rem 0.95rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s ease;
}

.search input::placeholder {
  color: #9a9186;
}

.search input:focus {
  border-bottom-color: var(--accent);
}

.years-wrap {
  position: relative;
}

.years-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2.2rem;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--bg));
}

.years {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.15rem;
  overflow-x: auto;
  padding: 0.1rem 1.4rem 0.35rem 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.years::-webkit-scrollbar { display: none; }

.years button {
  flex: none;
  padding: 0.45rem 0.7rem;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.years button:hover { color: var(--ink); }

.years button[aria-pressed="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: transparent;
  font-weight: 600;
}

.count {
  margin: 1.4rem 0 0.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.group { padding: 1.7rem 0 0.4rem; }

.group h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}

.rows { margin: 0.45rem 0 0; padding: 0; list-style: none; }

.rows li { border-top: 1px solid var(--line); }

.rows li:last-child { border-bottom: 1px solid var(--line); }

.row {
  display: grid;
  gap: 0.9rem 1rem;
  align-items: center;
  padding: 1.1rem 0.1rem;
  text-decoration: none;
}

.row-photo {
  grid-template-columns: 5.6rem minmax(0, 1fr) auto;
}

.row-text {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 1.15rem 0.15rem 1.15rem 0.85rem;
  border-left: 2px solid var(--line);
  transition: border-color 0.15s ease;
}

.row-text:hover {
  border-left-color: var(--accent);
}

.row-media {
  display: block;
  overflow: hidden;
  width: 5.6rem;
  height: 4.1rem;
  background: #e7e1d8;
}

.row-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-copy {
  min-width: 0;
}

.row:hover .row-title { color: var(--accent); }

.row:hover .tag {
  background: var(--accent);
  border-color: var(--accent);
  color: #f7f4ef;
}

.row-title {
  font-size: 1.05rem;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.tag {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  justify-self: end;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tag span {
  font-size: 0.95rem;
  line-height: 1;
}

.empty {
  margin: 2rem 0 3rem;
  padding: 1.4rem 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer {
  margin-top: 3.5rem;
  padding: 1.8rem 0 2.4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p { margin: 0.2rem 0; }

.site-footer a { color: var(--accent); }

.social { margin-top: 0.7rem; }

.social a { text-decoration: none; }

.social a:hover { text-decoration: underline; }

.page-detail .article {
  animation: rise 0.55s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.article {
  width: min(820px, calc(100% - 2.4rem));
  margin: 0 auto;
  padding: 0 0 2rem;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1.7rem 0 1.5rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}

.back::before {
  content: "←";
  font-size: 0.95rem;
}

.back:hover { text-decoration: underline; }

.article .year {
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article h1 {
  margin: 0.45rem 0 0;
  font-size: clamp(2.1rem, 5.4vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.when {
  margin: 0.95rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.prose {
  margin-top: 1.9rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 1.1rem;
  line-height: 1.85;
  text-align: justify;
  hyphens: auto;
}

.prose p {
  margin: 0 0 1.15rem;
  text-align: justify;
}

.prose h2 {
  margin: 2rem 0 0.85rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  text-align: left;
}

.prose ul {
  margin: 0 0 1.25rem;
  padding: 0.2rem 0 0.2rem 1.15rem;
  text-align: left;
}

.prose li {
  margin: 0.45rem 0;
  padding-left: 0.15rem;
}

.prose li::marker {
  color: var(--accent);
}

.prose a { color: var(--accent); }

.prose strong {
  font-weight: 600;
  color: #15120f;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.35rem 0 0;
}

.actions a {
  display: inline-flex;
  align-items: center;
  padding: 0.58rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.94rem;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.actions a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.gallery-block {
  margin: 1.8rem 0 0.3rem;
}

.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.gallery-head .kicker { margin: 0; }

.gallery-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.gallery button {
  position: relative;
  padding: 0;
  border: 0;
  background: #ddd6cb;
  cursor: zoom-in;
  overflow: hidden;
  isolation: isolate;
}

.gallery button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(20, 16, 12, 0.22));
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.gallery button:hover::after { opacity: 1; }

.gallery button:first-child {
  grid-column: 1 / -1;
}

.gallery img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery button:first-child img {
  height: clamp(220px, 42vw, 420px);
}

.gallery button:hover img {
  transform: scale(1.035);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(18, 15, 12, 0.9);
  backdrop-filter: blur(6px);
  animation: fade 0.2s ease;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: min(1100px, 100%);
  max-height: 86vh;
  object-fit: contain;
  box-shadow: var(--shadow);
}

.lightbox-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lightbox-ui button {
  pointer-events: auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(246, 243, 238, 0.94);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.lightbox-close {
  top: 0.9rem !important;
  right: 0.9rem;
  transform: none !important;
}

.lightbox-prev { left: 0.9rem; }
.lightbox-next { right: 0.9rem; }

.lightbox-count {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  color: #f4efe8;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 719px) {
  .burger { display: inline-flex; align-items: center; justify-content: center; }
  .years-wrap { display: none; }
}

@media (min-width: 720px) {
  .top-inner { min-height: 4.6rem; padding: 0.85rem 0; }
  .brand-logo { height: 2.85rem; max-width: 280px; }
  .intro { padding-top: 4.2rem; }
  .search { max-width: 32rem; }
  .burger,
  .year-drawer { display: none !important; }
  .years-wrap::after { display: none; }
  .years {
    flex-wrap: wrap;
    overflow: visible;
    padding-right: 0;
    gap: 0.1rem 0.05rem;
  }
  .row-photo {
    grid-template-columns: 7.2rem minmax(0, 1fr) auto;
    gap: 1.15rem;
  }
  .row-media {
    width: 7.2rem;
    height: 5rem;
  }
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
  .gallery img { height: 170px; }
  .gallery button:first-child img { height: 420px; }
}

@media (max-width: 560px) {
  .top-label { display: none; }
  .brand-logo { height: 2.25rem; }
  .row-photo {
    grid-template-columns: 4.4rem minmax(0, 1fr);
    gap: 0.7rem 0.75rem;
  }
  .row-photo .tag {
    grid-column: 2;
    justify-self: start;
  }
  .row-text {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .row-text .tag {
    justify-self: start;
  }
  .row-media {
    width: 4.4rem;
    height: 3.4rem;
  }
  .gallery img { height: 130px; }
  .gallery button:first-child img { height: 210px; }
  .gallery-head { flex-direction: column; gap: 0.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .page-detail .article { animation: none; }
  .gallery img,
  .tag,
  .burger-lines,
  .burger-lines::before,
  .burger-lines::after,
  .year-drawer-backdrop,
  .year-drawer-panel {
    transition: none;
  }
}
