/**
 * lost4ever.com — Design System
 * 
 * Per design-doc §3:
 * Warm dark, never pure black — lamplight, not Material Design elevation
 * Typography: Literata (body), Courier Prime (display/labels)
 * Color tokens: espresso, parchment, faded-ink, pencil, candlelight
 */

/* ============================================================================
   COLOR TOKENS
   §3.1 Color table
   ============================================================================ */

:root {
  /* Page background */
  --espresso: #191410;
  
  /* Cards, surfaces */
  --old-leather: #221B14;
  
  /* Raised/hover surfaces */
  --worn-shelf: #2C241B;
  
  /* Borders, dividers */
  --hairline: #3B3227;
  
  /* Primary text */
  --parchment: #EFE6D3;
  
  /* Secondary text, metadata */
  --faded-ink: #B3A68C;
  
  /* Tertiary, placeholders */
  --pencil: #857A66;
  
  /* Accent: links, focus, live status */
  --candlelight: #E8A845;
  
  /* Hover states */
  --candlelight-bright: #F4BE6A;
  
  /* Success, "alive and on the shelf" indicators */
  --shamrock-sage: #9DB380;
  
  /* The MISSING stamp, gentle warnings */
  --old-stamp: #B0604C;
  
  /* Amber glow — the site's only luminous effect */
  --amber-glow: rgba(232, 168, 69, 0.35);
}

/* ============================================================================
   TYPOGRAPHY
   §3.2 Typography
   ============================================================================ */

@font-face {
  font-family: 'Literata';
  src: url('/static/fonts/Literata-VariableFont_wght.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
}

@font-face {
  font-family: 'Courier Prime';
  src: url('/static/fonts/CourierPrime-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Courier Prime';
  src: url('/static/fonts/CourierPrime-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

html {
  font-size: 16px;
  line-height: 1.7;
}

body {
  background-color: var(--espresso);
  color: var(--parchment);
  font-family: 'Literata', Georgia, serif;
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.7;
}

/* Display & wordmark — Courier Prime bold */
.wordmark {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-weight: 700;
  font-size: 40px;
  letterspacing: 0.02em;
  color: var(--parchment);
}

.page-title {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-weight: 700;
  font-size: 28px;
  color: var(--parchment);
}

.card-title {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-weight: 700;
  font-size: 21px;
  color: var(--parchment);
}

/* Labels, stamps, metadata —Courier Prime, uppercase, letterspaced */
.label {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-weight: 400;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faded-ink);
}

.stamp-text {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-weight: 400;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Body text — Literata */
body,
.body-text,
.snippet {
  font-family: 'Literata', Georgia, serif;
  font-weight: 400;
}

.large-body {
  font-size: 18px;
}

/* ============================================================================
   TEXTURE
   §3.1 Texture
   ============================================================================ */

/* Paper-grain noise overlay */
.texture-overlay {
  background-image: url('/static/images/paper-grain.png');
  background-repeat: repeat;
  opacity: 0.03;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
}

/* ============================================================================
   BASE COMPONENTS
   §3.3 Components
   ============================================================================ */

* {
  box-sizing: border-box;
}

/* Links */
a {
  color: var(--candlelight);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover,
a:focus {
  color: var(--candlelight-bright);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--candlelight);
  outline-offset: 2px;
  text-decoration: underline;
}

/* Cards */
.card {
  background-color: var(--old-leather);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  transition: background-color 150ms ease;
}

.card:hover {
  background-color: var(--worn-shelf);
}

/* Buttons — quiet, mono labels
 */
.btn {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--parchment);
  border-radius: 2px;
  cursor: pointer;
  transition: all 150ms ease;
}

.btn:hover,
.btn:focus {
  border-color: var(--candlelight);
  color: var(--candlelight);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--candlelight);
  border-color: var(--candlelight);
  color: var(--espresso);
  font-weight: 700;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--candlelight-bright);
  border-color: var(--candlelight-bright);
  color: var(--espresso);
}

.btn:focus-visible {
  outline: 2px solid var(--candlelight);
  outline-offset: 2px;
}

/* ============================================================================
   THE SEARCH BAR
   §3.3: The search bar is the site's front door
   ============================================================================ */

.search-container {
  max-width: 720px;
  margin: 2rem auto;
}

.search-bar {
  background-color: var(--old-leather);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 16px;
  width: 100%;
  color: var(--parchment);
  font-family: 'Literata', Georgia, serif;
  transition: all 150ms ease;
}

.search-bar::placeholder {
  color: var(--pencil);
  font-style: italic;
}

.search-bar:focus {
  outline: none;
  border-color: var(--candlelight);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

/* Blinking cursor animation — the site's one permanent animation */
@keyframes cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.search-bar:focus::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 1.2em;
  background-color: var(--candlelight);
  animation: cursor-blink 1s step-end infinite;
}

/* ============================================================================
   CATALOG CARDS
   §3.3: Catalog cards are the universal result unit
   ============================================================================ */

.catalog-card {
  background-color: var(--old-leather);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.catalog-card:hover {
  background-color: var(--worn-shelf);
}

.catalog-card .title {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-weight: 700;
  font-size: 21px;
  color: var(--parchment);
  margin: 0 0 0.5rem 0;
}

.catalog-card .author {
  color: var(--faded-ink);
  font-size: 15px;
  margin: 0 0 0.5rem 0;
}

.catalog-card .fandoms {
  color: var(--faded-ink);
  font-size: 13px;
  font-family: 'Courier Prime', 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem 0;
}

.catalog-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.catalog-card .tag {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 11px;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  color: var(--faded-ink);
  letter-spacing: 0.05em;
}

.catalog-card .snippet {
  font-size: 15px;
  line-height: 1.7;
  color: var(--parchment);
  font-style: italic;
  margin: 1rem 0;
}

.catalog-card .status-line {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 13px;
  margin-top: 1rem;
}

/* Live status */
.status-live {
  color: var(--shamrock-sage);
}

.status-live a {
  color: var(--shamrock-sage);
}

.status-live a:hover {
  color: var(--candlelight);
}

/* Moved status */
.status-moved {
  color: var(--candlelight);
}

/* ============================================================================
   STAMPS
   §3.3: Stamps are a first-class component
   ============================================================================ */

.stamp {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 1rem;
  border: 2px solid;
  border-radius: 4px;
  display: inline-block;
  margin: 0.5rem 0;
  /* `rotation` is not a CSS property, so these never tilted. */
  rotate: var(--stamp-rotation, 0deg);
}

.stamp.missing {
  border-color: var(--old-stamp);
  color: var(--old-stamp);
  rotation: -2deg;
}

.stamp.found {
  border-color: var(--candlelight);
  color: var(--candlelight);
  background-color: var(--amber-glow);
  animation: stamp-press 0.3s ease-out;
}

@keyframes stamp-press {
  0% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================================================
   SHAMROCK PHOTO TREATMENTS
   §4 The Shamrock System
   ============================================================================ */

/* Amber duotone — functional appearances */
.shamrock-duotone {
  filter: grayscale(100%) sepia(100%) hue-rotate(10deg) saturate(150%);
  border-radius: 4px;
}

/* Polaroid frames — personality appearances */
.shamrock-polaroid {
  background-color: #F5F5F0;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 2px;
  display: inline-block;
  transform: rotate(var(--polaroid-rotation, -2deg));
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  margin: 1rem;
}

.shamrock-polaroid img {
  max-width: 200px;
  display: block;
}

.shamrock-polaroid .caption {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 10px;
  color: #333;
  margin-top: 0.5rem;
  text-align: center;
  font-style: italic;
}

/* Washi tape */
.washi-tape {
  background-color: var(--candlelight);
  width: 40px;
  height: 12px;
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  opacity: 0.8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ============================================================================
   RESPONSIVE DESIGN
   §8 Quality floor: Responsive from 320px
   ============================================================================ */

@media (max-width: 768px) {
  .wordmark {
    font-size: 28px;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .card-title {
    font-size: 18px;
  }
  
  .catalog-card {
    padding: 1rem;
    margin-left: 1rem;
    margin-right: 1rem;
  }
  
  .search-bar {
    font-size: 16px;
    padding: 0.6rem 0.8rem;
  }
  
  .shamrock-polaroid img {
    max-width: 150px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }
  
  .wordmark {
    font-size: 24px;
  }
  
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 13px;
  }
}

/* ============================================================================
   ACCESSIBILITY & REDUCED MOTION
   §8 Quality floor
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .stamp.found {
    animation: none;
  }
}

@media (prefers-color-scheme: light) {
  /* Daylight theme — fast-follow, not launch blocking */
  :root {
    --espresso: #F2EAD9;
    --old-leather: #E8E0D5;
    --worn-shelf: #DCD4C9;
    --parchment: #191410;
    --faded-ink: #3B3227;
    --pencil: #5C5142;
    --candlelight: #C4811E;
    --candlelight-bright: #D8962E;
  }
}

/* ============================================================================
   FOCUS STATES
   §8 Quality floor: Keyboard focus always visible
   ============================================================================ */

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--candlelight);
  outline-offset: 2px;
}

button:focus,
input:focus {
  outline: 2px solid var(--candlelight);
  outline-offset: 2px;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

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

.text-muted {
  color: var(--faded-ink);
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
/* ============================================================================
   PAGE LAYOUT
   The templates have always referenced these; the rules were never written, so
   every page rendered unstyled and flush against the viewport edge.
   ============================================================================ */

/* One shared gutter, so nothing ever touches the edge of a phone screen.
   The safe-area inset keeps content clear of rounded corners and notches. */
:root {
  --gutter: clamp(1.15rem, 5vw, 2.5rem);
  --measure: 46rem;
}

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: inherit; }

body {
  /* Nothing may push the page sideways on a phone. */
  overflow-x: hidden;
  min-height: 100svh;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.site-header {
  padding: clamp(1.75rem, 5vw, 3rem) 0 0;
  text-align: center;
}

.header-content {
  max-width: var(--measure);
  margin: 0 auto;
}

.site-header .wordmark {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.site-header .wordmark a {
  color: var(--candlelight);
  text-decoration: none;
}

.site-header .wordmark a:hover,
.site-header .wordmark a:focus-visible {
  color: var(--candlelight-bright);
}

.tagline {
  margin: 0.4rem 0 0;
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--pencil);
}

.site-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem) 0;
}

/* Search pages and galleries want more room than a column of prose. */
.search-results-container,
.gallery-wall {
  max-width: min(56rem, 100%);
  margin-inline: auto;
}

/* --- Footer: whisper weight, never competing with the page ---------------- */

.site-footer {
  flex-shrink: 0;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 0 calc(2.5rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hairline);
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.6rem;
  font-size: 0.9rem;
}

.footer-nav a {
  color: var(--faded-ink);
  text-decoration: none;
  /* Comfortable thumb target without visually enlarging the link. */
  padding: 0.4rem 0.15rem;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--candlelight);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-separator { color: var(--hairline); }

.footer-pledge {
  margin: 1rem auto 0;
  max-width: 34rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--pencil);
}

/* --- Homepage: a search bar and almost nothing else ----------------------- */

.homepage-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  /* Sits the search near the optical centre instead of leaving a long void
     between the header and the fold. */
  min-height: min(52svh, 30rem);
  text-align: center;
}

.homepage-container .search-container {
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
}

.gentle-murmur {
  margin: 0;
  font-size: 0.9rem;
  color: var(--pencil);
}

.murmur-number {
  color: var(--candlelight);
  font-family: 'Courier Prime', 'Courier New', monospace;
}

.search-loading { color: var(--pencil); }

.results-count { color: var(--faded-ink); }

.no-results { color: var(--faded-ink); }

/* --- About page polaroid wall --------------------------------------------- */

.gallery-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

/* --- The cat ------------------------------------------------------------- */

/* On a phone the polaroid stops being a fixed overlay: pinned to the corner it
   sat on top of the footer links and stole taps. It becomes part of the page
   instead, which is the "shrinks to a thumbnail rather than disappearing"
   behaviour the design doc asks for. */
@media (max-width: 640px) {
  .homepage-container ~ .shamrock-polaroid,
  .shamrock-polaroid[style*="fixed"] {
    position: static !important;
    bottom: auto !important;
    right: auto !important;
    display: block;
    width: fit-content;
    margin: 2rem auto 0;
  }

  .shamrock-polaroid img { max-width: 128px; }

  .site-main { padding-top: 1rem; }
}

/* Wide screens: the cat keeps her corner, but never over the content. */
@media (min-width: 641px) {
  .shamrock-polaroid[style*="fixed"] { z-index: 1; }
}

/* --- Mobile refinements --------------------------------------------------- */

@media (max-width: 768px) {
  /* 16px is the threshold below which iOS Safari zooms on focus. */
  .search-bar,
  input[type="text"],
  input[type="email"],
  input[type="search"],
  textarea,
  select { font-size: 16px; }

  /* The catalog cards carried their own side margins, which doubled up with
     the page gutter and squeezed the text column. */
  .catalog-card {
    margin-left: 0;
    margin-right: 0;
  }

  .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Long titles, tags and hrefs must wrap rather than widen the page. */
  .card-title,
  .fandoms,
  .tags,
  .snippet { overflow-wrap: anywhere; }
}

/* Wide tables and code blocks scroll inside themselves, never the page. */
table, pre { max-width: 100%; overflow-x: auto; display: block; }
img { max-width: 100%; height: auto; }

/* ============================================================================
   POLISH
   ============================================================================ */

/* The homepage search is the whole product, so give it the presence of a front
   door rather than a plain field, and a resting glow that lifts on focus. */
.homepage-container .search-bar {
  padding: 0.95rem 1.15rem;
  border-radius: 8px;
  font-size: clamp(1rem, 2.4vw, 1.0625rem);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 3%), 0 1px 2px rgb(0 0 0 / 12%);
}

.homepage-container .search-bar:hover:not(:focus) {
  border-color: var(--pencil);
}

/* The tagline and murmur are asides; keep them from crowding the search. */
.homepage-container .search-container { margin: 0 auto; }

/* Caption sat wider than the photo and spilled out of the frame. */
.shamrock-polaroid {
  max-width: calc(200px + 2rem);
}

.shamrock-polaroid .caption {
  max-width: 200px;
  margin-inline: auto;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .shamrock-polaroid { max-width: calc(128px + 2rem); }
  .shamrock-polaroid .caption { max-width: 128px; }
}

/* Links inside prose should be legible as links without shouting. */
.site-main a:not(.btn):not(.wordmark a) {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* Cards lift very slightly on hover — the only motion on a results page. */
.catalog-card {
  transition: border-color 150ms ease, transform 150ms ease;
}

@media (hover: hover) {
  .catalog-card:hover {
    border-color: var(--pencil);
    transform: translateY(-1px);
  }
}

/* The stamps read as struck by hand, per the design doc: slight opposing
   angles rather than a tidy stack. Kept small so nothing looks broken. */
.stamps-container .stamp:nth-of-type(odd)  { --stamp-rotation: -2.2deg; }
.stamps-container .stamp:nth-of-type(even) { --stamp-rotation: 1.6deg; }

@media (prefers-reduced-motion: reduce) {
  .stamps-container .stamp { --stamp-rotation: 0deg; }
}

/* ============================================================================
   SEARCH PROGRESS, FILTERS, HOMEPAGE ENTRY POINTS
   ============================================================================ */

/* htmx sets .htmx-request on the indicator for the life of the request. */
.htmx-indicator {
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 120ms ease;
}

.htmx-request.htmx-indicator,
.htmx-request .htmx-indicator {
  opacity: 1;
  height: auto;
  overflow: visible;
}

.search-loading {
  text-align: center;
  margin: 2rem auto;
}

/* Indeterminate by design: the server cannot report true progress on a vector
   query, so this communicates "working" honestly rather than faking a
   percentage that would be a lie. */
.search-progress {
  position: relative;
  width: min(22rem, 100%);
  height: 3px;
  margin: 0 auto 1.25rem;
  background: var(--hairline);
  border-radius: 2px;
  overflow: hidden;
}

.search-progress span {
  position: absolute;
  inset: 0;
  display: block;
  width: 40%;
  border-radius: 2px;
  background: linear-gradient(90deg,
    transparent, var(--candlelight), var(--candlelight-bright), transparent);
  animation: search-sweep 1.1s ease-in-out infinite;
}

@keyframes search-sweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

.search-status {
  margin: 0;
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--pencil);
}

@media (prefers-reduced-motion: reduce) {
  .search-progress span {
    animation: none;
    width: 100%;
    background: var(--candlelight);
    opacity: 0.6;
  }
}

/* --- Fandom filter chips -------------------------------------------------- */

.filter-drawer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 0 auto 1.75rem;
  text-align: center;
}

.facet-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  min-height: 34px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--old-leather);
  color: var(--faded-ink);
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 0.72rem;
  text-transform: lowercase;
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}

.facet-chip:hover,
.facet-chip:focus-visible {
  border-color: var(--candlelight);
  color: var(--parchment);
}

.facet-chip.is-active {
  border-color: var(--candlelight);
  color: var(--espresso);
  background: var(--candlelight);
}

.facet-chip.is-active .facet-count { color: var(--espresso); opacity: 0.75; }

.facet-count { color: var(--pencil); }

.facet-clear { background: transparent; }

.facet-current { color: var(--candlelight); }

.results-count {
  text-align: center;
  font-family: 'Courier Prime', 'Courier New', monospace;
  margin: 2rem 0 1rem;
  color: var(--faded-ink);
  font-size: 0.85rem;
}

.results-capped {
  display: block;
  margin-top: 0.35rem;
  color: var(--pencil);
  font-style: italic;
  text-transform: none;
}

/* --- Homepage entry points ------------------------------------------------ */

.example-searches {
  margin: 0.5rem auto 0;
  max-width: 40rem;
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--pencil);
}

.example-label {
  font-family: 'Courier Prime', 'Courier New', monospace;
  margin-right: 0.35rem;
}

/* Chips rather than underlined runs of text: an underline that wraps across
   two lines reads as damage, and these need a thumb-sized target. */
.example-search {
  display: inline-block;
  color: var(--faded-ink);
  text-decoration: none;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  margin: 0.15rem 0.1rem;
  line-height: 1.3;
}

.example-search:hover,
.example-search:focus-visible {
  color: var(--candlelight);
  border-color: var(--candlelight);
}

/* The separators are redundant once the examples are chips. */
.example-sep { display: none; }

.corpus-line {
  margin: 1.5rem auto 0;
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--pencil);
}

.corpus-stat b { color: var(--faded-ink); font-weight: 400; }
.corpus-sep { color: var(--hairline); margin: 0 0.4rem; }

.homepage-results:empty { display: none; }
.homepage-results { width: 100%; margin-top: 1rem; }

@media (max-width: 640px) {
  .example-searches { line-height: 2.3; }
  .corpus-line { line-height: 2; }
  .corpus-sep { margin: 0 0.25rem; }
}

/* --- Removals / DMCA ------------------------------------------------------ */

/* Sits on the homepage under the search. Quiet, but unmissable if you are
   looking for it — which is the point: an author who wants out should not have
   to hunt. */
.takedown-line {
  margin: 1.75rem auto 0;
  font-size: 0.85rem;
}

.takedown-link {
  color: var(--faded-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding: 0.3rem 0.1rem;
}

.takedown-link:hover,
.takedown-link:focus-visible {
  color: var(--old-stamp);
  border-bottom-color: var(--old-stamp);
}

/* --- Long-form pages ------------------------------------------------------ */

.prose-page {
  max-width: 38rem;
  margin: 0 auto;
}

.prose-page .lede {
  font-size: 1.05rem;
  color: var(--parchment);
  margin-bottom: 2.5rem;
}

.prose-page h2.section-title {
  margin: 2.5rem 0 0.75rem;
  color: var(--candlelight);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.prose-page p { color: var(--faded-ink); }

.plain-list {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  color: var(--faded-ink);
}

.plain-list li { margin-bottom: 0.4rem; }

.prose-page a { color: var(--candlelight); }

.contact-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.85rem;
}
