/* ==========================================================================
   Understanding Hydration — shared stylesheet
   Extracted from the original hand-written pages. Values are unchanged.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- Design tokens ---- */
:root {
  --ink:          #111827;
  --page:         #F4F6F8;
  --white:        #FFFFFF;
  --accent:       #1A6B7C;
  --accent-dark:  #145a69;
  --accent-pale:  #E5F4F7;
  --warm:         #B8862E;
  --mid:          #686F7D;  /* was #6B7280; darkened slightly to meet WCAG AA (4.5:1) on --page */
  --body:         #374151;
  --rule:         #DDE1E7;
  --f-display:    'Lora', Georgia, serif;
  --f-body:       'Karla', system-ui, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

html { scroll-behavior: smooth; }

/* Footer stays at the bottom of the window on short pages (search, 404). */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Site shell (every page)
   ========================================================================== */

/* ---- Nav ---- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 56px;
}

.nav-brand {
  font-family: var(--f-display);
  font-size: 15px;
  font-style: italic;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); }

main { flex: 1 0 auto; }

/* ---- Footer ---- */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px 56px;
  border-top: 1px solid var(--rule);
}

.footer-brand {
  font-family: var(--f-display);
  font-size: 14px;
  font-style: italic;
  color: var(--mid);
}

.footer-copy { font-size: 13px; color: var(--mid); }

/* ---- Skip link (visible only when focused with the keyboard) ---- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
}
.skip-link:focus { top: 16px; }

/* ---- Search link in the nav ---- */
.nav-search-icon { vertical-align: -3px; margin-right: 6px; }

/* ---- Focus ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   Homepage
   ========================================================================== */

/* ---- Hero ---- */
.hero {
  padding: 72px 56px 96px;
  max-width: 1160px;
  margin: 0 auto;
  animation: fadeUp 0.65s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* The four hero lines together form the homepage's <h1>. */
.hero-title { font-size: inherit; font-weight: inherit; }

.hero-line {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(44px, 6.5vw, 84px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.01em;
  margin-bottom: 0.08em;
  color: var(--ink);
}

.hero-line.recede { color: #C4CAD5; }
.hero-line.forward { color: var(--accent); font-style: italic; }

.hero-lower {
  margin-top: 56px;
  display: flex;
  gap: 80px;
  align-items: flex-start;
}

.hero-deck {
  max-width: 460px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--mid);
  font-weight: 300;
}

.hero-deck strong {
  color: var(--ink);
  font-weight: 500;
}

.hero-action {
  display: inline-block;
  margin-top: 36px;
  padding: 14px 30px;
  background: var(--accent);
  color: white;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.15s;
}

.hero-action:hover { background: var(--accent-dark); }

.hero-pull {
  flex-shrink: 0;
  padding-top: 6px;
}

.pull-figure {
  font-family: var(--f-display);
  font-size: 76px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}

.pull-caption {
  font-size: 13.5px;
  color: var(--mid);
  max-width: 210px;
  line-height: 1.55;
  margin-top: 10px;
  font-weight: 300;
}

/* ---- Section rule ---- */
.section-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0 56px;
}

/* ---- Moments ---- */
.moments {
  padding: 96px 56px;
  max-width: 1160px;
  margin: 0 auto;
}

.moments-heading {
  font-family: var(--f-display);
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 500;
  line-height: 1.25;
  max-width: 560px;
  margin-bottom: 64px;
}

.moment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--rule);
}

.moment {
  padding: 40px 48px 40px 0;
  border-right: 1px solid var(--rule);
}

.moment:first-child { border-right: 1px solid var(--rule); }

.moment:nth-child(2) {
  padding-left: 48px;
}

.moment:last-child {
  border-right: none;
  padding-left: 48px;
}

.moment-time {
  font-family: var(--f-display);
  font-size: 13px;
  font-style: italic;
  color: var(--warm);
  margin-bottom: 18px;
}

.moment-title {
  font-family: var(--f-display);
  font-size: 21px;
  font-weight: 500;
  margin-bottom: 14px;
  line-height: 1.3;
}

.moment-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--mid);
  font-weight: 300;
}

/* ---- The Gap ---- */
.gap-section {
  background: var(--white);
  padding: 88px 56px;
}

.gap-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 96px;
  align-items: center;
}

.gap-quote {
  font-family: var(--f-display);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink);
}

.gap-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--mid);
  font-weight: 300;
}

.gap-body p + p { margin-top: 22px; }

.gap-body strong {
  color: var(--ink);
  font-weight: 500;
}

/* ---- Article cards ("Start here") ---- */
.articles {
  padding: 96px 56px;
  max-width: 1160px;
  margin: 0 auto;
}

.articles-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 48px;
}

.articles-header h2 {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 500;
}

.articles-header a {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.articles-header a:hover { text-decoration: underline; }

.article-grid {
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.article-card {
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
}

.article-card:nth-child(odd) {
  padding-right: 64px;
  border-right: 1px solid var(--rule);
}

.article-card:nth-child(even) {
  padding-left: 64px;
}

/* Card category label (the article page has its own, larger version below) */
.article-card .article-topic {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.article-title {
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--ink);
}

.article-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}

.article-title a:hover { color: var(--accent); }

.article-desc {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.65;
  font-weight: 300;
}

/* Homepage "Browse by topic" links under the Start here cards */
.browse-topics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start; /* reset the site-header `nav` rule */
  align-items: baseline;
  gap: 8px 24px;
  padding: 0;
  margin-top: 32px;
  font-size: 14px;
}

.browse-topics-label { color: var(--mid); }

.browse-topics a {
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.browse-topics a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- About ---- */
.about-section {
  background: var(--white);
  padding: 96px 56px;
}
.about-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 80px;
  align-items: start;
}
.about-photo {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}
.about-text {
  padding-top: 8px;
}
.about-label {
  font-family: var(--f-display);
  font-size: 13px;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 20px;
  display: block;
}
.about-name {
  font-family: var(--f-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 36px;
}
.about-bio {
  font-size: 16px;
  line-height: 1.85;
  color: var(--mid);
  font-weight: 300;
  max-width: 540px;
}
.about-bio p + p { margin-top: 22px; }
.about-bio strong { color: var(--ink); font-weight: 500; }

/* ==========================================================================
   Article page
   ========================================================================== */

.article { max-width: 720px; margin: 0 auto; padding: 72px 24px 96px; }
.article .article-topic { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 18px; }
.article .article-topic a { color: inherit; text-decoration: none; }
.article .article-topic a:hover { text-decoration: underline; text-underline-offset: 3px; }
.article h1 { font-family: var(--f-display); font-size: clamp(34px,5vw,56px); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; margin-bottom: 56px; }

.prose { font-size: 18px; line-height: 1.85; color: var(--body); font-weight: 400; }
.prose p { margin-top: 24px; }
.prose > p:first-child { margin-top: 0; font-family: var(--f-display); font-size: 21px; line-height: 1.7; color: var(--ink); }
.prose h2 { font-family: var(--f-display); font-size: clamp(24px,3vw,31px); font-weight: 500; line-height: 1.25; margin-top: 64px; color: var(--ink); }
.prose h2 + p { margin-top: 20px; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-dark); }
.prose em { font-style: italic; }

/* Sources: the "## Sources" heading and the numbered list after it */
.prose h2#sources { font-size: 22px; margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--rule); }
.prose h2#sources ~ ol { margin-top: 24px; padding-left: 22px; font-size: 15px; line-height: 1.7; color: var(--mid); }
.prose h2#sources ~ ol li { margin-top: 14px; padding-left: 6px; overflow-wrap: anywhere; }
.prose h2#sources ~ ol li p { margin: 0; }

/* "Keep reading" links at the end of an article */
.next { margin-top: 72px; padding-top: 36px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.next a { font-family: var(--f-display); font-size: 19px; font-weight: 500; line-height: 1.35; color: var(--ink); text-decoration: none; max-width: 300px; display: block; }
.next a:hover { color: var(--accent); }
.next small { display: block; font-family: var(--f-body); font-size: 13px; font-weight: 500; color: var(--mid); margin-bottom: 8px; }
.next .right { text-align: right; margin-left: auto; }

/* ==========================================================================
   Article library and category pages
   ========================================================================== */

.library {
  padding: 72px 56px 96px;
  max-width: 1160px;
  margin: 0 auto;
}

.library-header { max-width: 720px; margin-bottom: 48px; }

.library-eyebrow {
  font-family: var(--f-display);
  font-size: 13px;
  font-style: italic;
  color: var(--warm);
  margin-bottom: 18px;
}

.library-heading {
  font-family: var(--f-display);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.library-intro {
  margin-top: 24px;
  max-width: 560px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--mid);
  font-weight: 300;
}

/* Category filter links (reset the site-header `nav` rule above) */
.category-nav { display: block; padding: 0; }

.category-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  list-style: none;
  padding-bottom: 20px;
}

.category-nav a {
  display: inline-block;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.category-nav a:hover { color: var(--ink); }

.category-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.category-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--mid);
  margin-left: 2px;
}

/* Article listing */
.library-list {
  list-style: none;
  border-top: 1px solid var(--rule);
}

.library-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
}

.library-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 5px;
}

.library-category {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.library-category:hover { text-decoration: underline; text-underline-offset: 3px; }

.library-date {
  font-size: 13px;
  color: var(--mid);
}

.library-body { max-width: 640px; }

.library-title {
  font-family: var(--f-display);
  font-size: clamp(21px, 2.4vw, 26px);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 12px;
}

.library-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}

.library-title a:hover { color: var(--accent); }

.library-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--mid);
  font-weight: 300;
}

.library-empty {
  padding: 36px 0;
  border-top: 1px solid var(--rule);
  font-size: 16px;
  color: var(--mid);
}

.library-empty a { color: var(--accent); text-underline-offset: 3px; }

/* ==========================================================================
   Mini-series
   ========================================================================== */

/* Progress steps: one segment per article */
.series-steps { display: flex; gap: 4px; }
.series-steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--rule); }
.series-steps span.is-filled { background: var(--accent); }

.series-read-label { color: var(--warm); font-style: italic; font-family: var(--f-display); }

/* ---- Series landing page ---- */
.series-page {
  padding: 72px 56px 96px;
  max-width: 1160px;
  margin: 0 auto;
}

.series-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
  align-items: center;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--rule);
}

.series-hero.has-image { grid-template-columns: 7fr 5fr; }

.series-hero-text { max-width: 720px; }

.series-eyebrow {
  font-family: var(--f-display);
  font-size: 13px;
  font-style: italic;
  color: var(--warm);
  margin-bottom: 18px;
}

.series-eyebrow a { color: inherit; text-underline-offset: 3px; }

.series-title {
  font-family: var(--f-display);
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.series-intro {
  margin-top: 28px;
  max-width: 600px;
  font-family: var(--f-display);
  font-size: 21px;
  line-height: 1.6;
  color: var(--ink);
}

.series-image { width: 100%; display: block; border-radius: 2px; }

.series-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 80px;
  padding-top: 64px;
  align-items: start;
}

.series-side { display: flex; flex-direction: column; gap: 40px; }

.series-side-heading {
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 500;
  margin-bottom: 16px;
}

.series-learn ul { list-style: none; }

.series-learn li {
  position: relative;
  padding-left: 22px;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--mid);
}

.series-learn li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

.series-progress {
  background: var(--white);
  padding: 28px;
  border-radius: 3px;
}

.series-progress-text { margin-top: 12px; font-size: 14px; color: var(--mid); }

.series-continue { margin-top: 20px; }

.series-parts-heading {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 500;
  margin-bottom: 8px;
}

.series-list { list-style: none; }

.series-part {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
}

.series-part:last-child { border-bottom: none; }

.series-part-number {
  font-family: var(--f-display);
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
}

.series-part.is-read .series-part-number { color: var(--warm); }

.series-part-label { font-size: 13px; font-weight: 500; color: var(--mid); margin-bottom: 8px; }

.series-part-title {
  font-family: var(--f-display);
  font-size: clamp(20px, 2.3vw, 24px);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 10px;
}

.series-part-title a { color: var(--ink); text-decoration: none; transition: color 0.15s; }
.series-part-title a:hover { color: var(--accent); }

.series-part-desc { font-size: 15px; line-height: 1.7; color: var(--mid); font-weight: 300; max-width: 600px; }

/* ---- On article pages ---- */
.article-series-tag {
  margin-top: -6px;
  margin-bottom: 20px;
  font-family: var(--f-display);
  font-size: 14px;
  font-style: italic;
  color: var(--warm);
}

.article-series-tag a { color: inherit; text-underline-offset: 3px; }

.series-box {
  margin-top: 72px;
  padding: 36px 40px;
  background: var(--white);
  border-radius: 3px;
}

.series-box + .series-box { margin-top: 20px; }

.series-box-eyebrow {
  font-family: var(--f-display);
  font-size: 13px;
  font-style: italic;
  color: var(--warm);
  margin-bottom: 10px;
}

.series-box-title {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 16px;
}

.series-box-title a { color: var(--ink); text-decoration: none; }
.series-box-title a:hover { color: var(--accent); }

.series-box-list { list-style: none; margin-top: 20px; }

.series-box-list li {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--mid);
}

.series-box-num { flex-shrink: 0; min-width: 20px; font-weight: 500; }

.series-box-list a { color: var(--accent); text-underline-offset: 3px; }
.series-box-list a:hover { color: var(--accent-dark); }

.series-box-current { color: var(--ink); font-weight: 500; }
.series-box-current small { font-weight: 400; color: var(--mid); }

.series-box-details { margin-top: 16px; }

.series-box-details summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.series-pager {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 0;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.series-pager a {
  display: block;
  max-width: 280px;
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
}

.series-pager a:hover { color: var(--accent); }

.series-pager small {
  display: block;
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--mid);
  margin-bottom: 6px;
}

.series-pager .right { text-align: right; margin-left: auto; }

.series-box-all {
  display: inline-block;
  margin-top: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-underline-offset: 3px;
}

/* ---- Series strip on library and category pages ---- */
.series-strip { margin-bottom: 56px; }

.series-strip-heading {
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 500;
  margin-bottom: 20px;
}

.series-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.series-card {
  background: var(--white);
  padding: 28px;
  border-radius: 3px;
  border-top: 3px solid var(--accent);
}

.series-card-meta {
  font-family: var(--f-display);
  font-size: 13px;
  font-style: italic;
  color: var(--warm);
  margin-bottom: 10px;
}

.series-card-title {
  font-family: var(--f-display);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.3;
}

.series-card-title a { color: var(--ink); text-decoration: none; }
.series-card-title a:hover { color: var(--accent); }

.series-card-intro { margin-top: 10px; font-size: 14px; line-height: 1.65; color: var(--mid); font-weight: 300; }

/* Drafts: shown only in the local preview (npm start) */
.draft-banner {
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--white);
  border-left: 3px solid var(--warm);
  font-size: 14px;
  color: var(--ink);
}
.draft-banner code { font-size: 13px; }
.library-draft { font-size: 12px; font-weight: 600; color: var(--ink); }

/* ==========================================================================
   Related articles (end of an article)
   ========================================================================== */
.related { margin-top: 72px; padding-top: 36px; border-top: 1px solid var(--rule); }

.related-heading {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
}

.related-list { list-style: none; }
.related-list li { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.related-list li:last-child { border-bottom: none; }

.related-title {
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
}

.related-title:hover { color: var(--accent); }
.related-desc { margin-top: 6px; font-size: 15px; line-height: 1.65; color: var(--mid); font-weight: 300; }

/* ==========================================================================
   Search page
   ========================================================================== */
.search-form { max-width: 720px; }

.search-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 10px;
}

.search-row { display: flex; gap: 10px; }

.search-input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--white);
  font-family: var(--f-body);
  font-size: 17px;
  color: var(--ink);
}

.search-input::placeholder { color: var(--mid); }

.search-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }

.search-button {
  padding: 14px 26px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 3px;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.search-button:hover { background: var(--accent-dark); }
.search-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.search-status { margin: 32px 0 20px; font-size: 15px; color: var(--mid); min-height: 1.6em; }
.search-status a, .search-empty a { color: var(--accent); text-underline-offset: 3px; }

.search-empty { max-width: 560px; font-size: 16px; line-height: 1.7; color: var(--mid); }

.search-excerpt { margin-top: 10px; font-size: 14px; line-height: 1.7; color: var(--mid); }
.search-excerpt mark { background: var(--accent-pale); color: var(--ink); padding: 0 2px; border-radius: 2px; }

/* 404 page */
.notfound-links { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 32px; }
.notfound-links a { font-size: 16px; font-weight: 500; color: var(--accent); text-underline-offset: 3px; }

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 800px) {
  nav { padding: 20px 24px; }
  .nav-links { gap: 20px; }
  .nav-search-icon { margin-right: 0; }
  .browse-topics { padding: 0; }
  .nav-search-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }

  .hero { padding: 48px 24px 72px; }
  .hero-lower { flex-direction: column; gap: 36px; }
  .hero-deck { max-width: 100%; }

  .section-rule { margin: 0 24px; }

  .moments { padding: 72px 24px; }
  .moment-grid { grid-template-columns: 1fr; }
  .moment {
    padding: 32px 0;
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .moment:last-child { border-bottom: none; }
  .moment:nth-child(2),
  .moment:last-child { padding-left: 0; }

  .gap-section { padding: 72px 24px; }
  .gap-inner { grid-template-columns: 1fr; gap: 40px; }

  .articles { padding: 72px 24px; }
  .article-grid { grid-template-columns: 1fr; }
  .article-card:nth-child(odd) { padding-right: 0; border-right: none; }
  .article-card:nth-child(even) { padding-left: 0; }

  .about-section { padding: 72px 24px; }
  .about-inner { grid-template-columns: 1fr; gap: 40px; }

  .library { padding: 48px 24px 72px; }
  .library-header { margin-bottom: 36px; }
  .library-intro { font-size: 17px; }
  .category-nav ul { gap: 8px 24px; }
  .library-item { grid-template-columns: 1fr; gap: 10px; padding: 28px 0; }
  .search-row { flex-direction: column; }
  .library-meta { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding-top: 0; }

  .series-page { padding: 48px 24px 72px; }
  .series-hero, .series-hero.has-image { grid-template-columns: 1fr; gap: 36px; padding-bottom: 48px; }
  .series-intro { font-size: 19px; }
  .series-layout { grid-template-columns: 1fr; gap: 48px; padding-top: 48px; }
  .series-part { grid-template-columns: 52px 1fr; gap: 12px; padding: 28px 0; }
  .series-part-number { font-size: 30px; }
  .series-box { padding: 28px 24px; margin-top: 56px; }
  .series-pager .right { text-align: left; margin-left: 0; }

  .article { padding: 48px 24px 72px; }
  .prose { font-size: 17px; }
  .prose > p:first-child { font-size: 19px; }
  .next .right { text-align: left; margin-left: 0; }

  footer { padding: 32px 24px; flex-direction: column; gap: 12px; text-align: center; }
}
