:root {
  --ink: #1c1230;
  --paper: #fff4e8;
  --coral: #ff5a36;
  --mango: #ffb000;
  --teal: #0f9d8a;
  --violet: #6d4aff;
  --pink: #ef3d7a;
  --line: #1c1230;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Source Sans 3", "Avenir Next", "Segoe UI", sans-serif;
  --shadow: 7px 7px 0 var(--line);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.55;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 8% 8%, rgba(255, 90, 54, 0.22), transparent 26%),
    radial-gradient(circle at 92% 0%, rgba(109, 74, 255, 0.18), transparent 24%),
    radial-gradient(circle at 80% 42%, rgba(15, 157, 138, 0.14), transparent 22%),
    radial-gradient(circle at 6% 78%, rgba(255, 176, 0, 0.24), transparent 24%);
  min-height: 100vh;
}

img { max-width: 100%; }

h1, h2, h3, h4, .logo-name, .card-title, .lane-name {
  font-family: var(--display);
  letter-spacing: -0.04em;
  line-height: 0.96;
}

h1, h2, h3, h4 { margin: 0; }

p { margin: 0; }

a { color: inherit; }

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

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 30;
  background: #fff;
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
}

.skip-link:focus { top: 12px; }

#site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 244, 232, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 3px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}

.logo, .foot-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.logo-badge {
  width: 46px;
  height: 46px;
  display: block;
  flex: none;
}

.logo-badge svg { width: 100%; height: 100%; display: block; }

.logo-words { display: flex; flex-direction: column; }

.logo-name { font-size: 1.7rem; font-weight: 720; }

.logo-tag { font-size: 0.78rem; font-weight: 700; }

.finder {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex: 1;
  max-width: 420px;
}

.finder input, .note-form input, .note-form textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0.7rem 0.95rem;
}

.note-form textarea { border-radius: 18px; resize: vertical; }

.finder button, .note-form button, .nav-toggle {
  border: 2px solid var(--line);
  background: var(--coral);
  color: #fff;
  font: inherit;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  box-shadow: 3px 3px 0 var(--line);
  cursor: pointer;
}

.menu ul {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0 0 12px;
}

.nav-link {
  display: inline-flex;
  text-decoration: none;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: #fff;
}

.nav-link.is-current { background: var(--mango); }

.nav-toggle { display: none; }

.hero {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 32px;
  align-items: center;
  padding: 36px 0 8px;
}

.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #fff;
  color: #1c1230;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.hero h1, .section-title, .band h2, .related h2, .search-band h2 {
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  margin: 0.45rem 0 0.7rem;
}

.lede { font-size: 1.18rem; max-width: 38rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }

.hero-actions a, .missing a, a.button-link, a.jump {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  box-shadow: 4px 4px 0 var(--line);
}

.hero-actions a:first-child, .missing a, a.button-link { background: var(--coral); color: #fff; }

.hero-actions a:nth-child(2) { background: var(--mango); color: var(--ink); }

a.jump { background: #ffe56a; color: var(--ink); margin-top: 0.8rem; }

.card-feature .card-photo { aspect-ratio: 5 / 4; }

.fresh { margin-top: 8px; }

.card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
}

.card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.card-photo {
  aspect-ratio: 4 / 3;
  background: var(--tone, var(--mango));
  overflow: hidden;
}

.card-photo img, .card-photo .photo-fallback, .story-photo img, .story-photo .photo-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-copy { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.85rem 0.9rem 1rem; }

.card-title, .card-excerpt, .card-copy .kicker { color: #1c1230; }

.card-title { font-size: 1.28rem; }

.card-excerpt {
  color: #3d3150;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lanes {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding: 8px 0 0;
  margin: 0;
}

.lane > a {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 140px;
  text-decoration: none;
  background: var(--tone);
  color: var(--ink, #1c1230);
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 0.8rem;
  box-shadow: 5px 5px 0 var(--line);
}

.lane-kicker { font-weight: 700; font-size: 0.8rem; }

.lane-name { font-size: 1.55rem; }

.lanes li:nth-child(odd) { transform: rotate(-1deg); }

.lanes li:nth-child(even) { transform: rotate(1deg); }

.section-title { margin: 28px 0 12px; }

.band, .archive-block, .related, .search-band, .contact-panel { margin: 28px auto; }

.band-head, .search-band {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}

.band-head p, .lane-hero p { max-width: 42rem; margin-top: 0.45rem; }

.band-head > a, .search-page .finder { text-decoration: none; }

.band-head > a {
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 3px solid var(--coral);
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.lane-hero {
  background: var(--tone, var(--coral));
  color: var(--ink);
  border: 3px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 1.4rem 1.3rem 1.2rem;
  margin-top: 12px;
}

.lane-hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); margin: 0.4rem 0; }

.lane-hero .kicker { background: #fffdf8; }

.count-line { font-weight: 700; margin-top: 0.7rem; }

.child-row, .tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.8rem; }

.child-row a, .tag-row a {
  text-decoration: none;
  background: #fffdf8;
  color: #1c1230;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-weight: 700;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.crumbs a { text-decoration: underline; text-underline-offset: 3px; }

.story-top { padding-top: 26px; }

.story h1 { font-size: clamp(2.3rem, 5vw, 4.3rem); margin: 0.45rem 0 0.7rem; }

.story-meta { font-weight: 700; margin-top: 0.35rem; }

.story-photo {
  margin: 1rem 0 0;
  background: var(--tone, #fff);
  border: 3px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.story-photo img, .story-photo .photo-fallback {
  width: 100%;
  height: auto;
  max-height: 720px;
  object-fit: contain;
  background: #fff;
}

.prose {
  max-width: 46rem;
  padding: 1.2rem 0 0.4rem;
  font-size: 1.12rem;
}

.prose h2, .prose h3, .prose h4 { margin: 1.4rem 0 0.5rem; }

.prose h2 { font-size: 2rem; }

.prose p { margin: 0.75rem 0; }

.prose a {
  color: #9d174d;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose ul, .prose ol { margin: 0.8rem 0 1rem; }

.prose ul {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 0.8rem 1rem 0.8rem 1.5rem;
}

.prose ol {
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.prose ol > li {
  counter-increment: step;
  position: relative;
  padding: 0.75rem 0.8rem 0.75rem 3.2rem;
  margin: 0.55rem 0;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
}

.prose ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0.65rem;
  top: 0.7rem;
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-weight: 700;
}

.prose figure { margin: 1rem 0; }

.prose img {
  border-radius: 18px;
  border: 2px solid var(--line);
  height: auto;
}

.prose figcaption { font-size: 0.92rem; color: #5c5168; margin-top: 0.35rem; }

.prose blockquote {
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  background: #fff4c8;
  border-left: 8px solid var(--violet);
  border-radius: 12px;
}

.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }

.prose th, .prose td {
  border: 2px solid var(--line);
  padding: 0.4rem 0.55rem;
  text-align: left;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
}

.page-link {
  display: inline-flex;
  min-width: 2.4rem;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  background: #fff;
}

.page-link.is-current { background: var(--violet); color: #fff; }

.page-gap { font-weight: 700; }

.search-band, .contact-panel, .search-page {
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.finder-large { max-width: none; margin: 0.8rem 0 0; }

.search-page { margin-top: 24px; }

.search-page h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin: 0.4rem 0 0.8rem; }

.note-form { display: grid; gap: 12px; margin-top: 12px; }

.captcha { min-height: 78px; }

.note-form label { display: grid; gap: 6px; font-weight: 700; }

.notice {
  background: #e7fff6;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
  font-weight: 700;
}

.notice-bad { background: #ffe4dc; }

.hp { position: absolute; left: -9999px; }

.missing { padding: 48px 0 64px; }

.missing h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); margin: 0.4rem 0 0.7rem; }

#site-footer {
  margin-top: 36px;
  background: #1c1230;
  color: #fff6ec;
  padding: 28px 0 18px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, 1fr);
  gap: 18px;
}

.foot-logo { color: #fff; font-size: 1.6rem; font-weight: 720; }

.foot-brand p { margin-top: 0.6rem; max-width: 24rem; }

#site-footer h2 { font-size: 1.15rem; margin-bottom: 0.45rem; }

#site-footer ul { list-style: none; margin: 0; padding: 0; }

.foot-link { text-decoration: none; }

.foot-link:hover { text-decoration: underline; }

.legal { margin-top: 18px; padding-top: 12px; border-top: 1px solid rgba(255, 246, 236, 0.25); }

img.is-missing, .photo-fallback {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.45), transparent 32%),
    var(--tone, var(--mango));
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

::selection { background: #ffe56a; }

@media (max-width: 980px) {
  .hero, .foot-grid { grid-template-columns: 1fr; }
  .cards, .lanes { grid-template-columns: 1fr 1fr; }
  .finder { max-width: none; }
}

@media (max-width: 720px) {
  .bar { flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .finder { order: 3; flex-basis: 100%; margin-left: 0; }
  .menu { display: none; }
  body.nav-open .menu { display: block; }
  .cards, .lanes { grid-template-columns: 1fr; }
  .lanes li { transform: none; }
  .band-head, .search-band { flex-direction: column; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lanes li { transform: none; }
  .hero-actions a, .finder button, .nav-toggle, .card { box-shadow: none; }
}
