:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #647069;
  --paper: #f5f3ec;
  --card: #fffdf8;
  --line: #dcd8cc;
  --accent: #176b4d;
  --accent-soft: #dcecdf;
  --warm: #b85b30;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { color: inherit; }

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.hero {
  padding: clamp(4rem, 10vw, 8rem) 0 3rem;
  background:
    radial-gradient(circle at 88% 16%, rgba(184, 91, 48, .16), transparent 22rem),
    linear-gradient(145deg, #e3eadf, var(--paper) 68%);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .14em;
  text-decoration: none;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin: .8rem 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 8vw, 6.5rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .95;
}

.hero p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

main { padding-block: 2rem 5rem; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.search {
  display: flex;
  width: min(100%, 520px);
  align-items: center;
  gap: .65rem;
  padding: .75rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 107, 77, .12);
}

.search svg {
  width: 1.15rem;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search input {
  width: 100%;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font: inherit;
  outline: 0;
}

.count { color: var(--muted); white-space: nowrap; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
}

.card {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(23, 33, 27, .035);
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(23, 33, 27, .08);
}

.card--featured { border-color: #a9c5b3; }
.card__image { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
.card__body { flex: 1; padding: 1.35rem; }
.card__meta { display: flex; align-items: center; gap: .5rem; }

.status,
.source {
  padding: .2rem .5rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.status--active { color: var(--accent); background: var(--accent-soft); }
.status--draft { color: #89520b; background: #f8e9c4; }
.status--archived { color: var(--muted); background: #e8e7e2; }
.source { color: var(--muted); border: 1px solid var(--line); }

.card h2 {
  margin: 1rem 0 .45rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.1;
}

.card p { margin: 0; color: var(--muted); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
}

.tags li { color: var(--muted); font-size: .78rem; }
.tags li:not(:last-child)::after { content: " ·"; }

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.35rem;
  border-top: 1px solid var(--line);
}

.card__footer a { font-size: .88rem; font-weight: 700; text-decoration: none; }
.primary-link { color: var(--accent); }
.repo-link { color: var(--muted); }
.card__footer a:hover { text-decoration: underline; text-underline-offset: .2em; }

.notice {
  padding: 1rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: .8rem;
}

.notice--error { color: #8a2f27; background: #fff0ed; border-color: #efbeb8; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem 2.5rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .82rem;
}

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

[hidden] { display: none !important; }

@media (max-width: 600px) {
  .toolbar, .site-footer { align-items: stretch; flex-direction: column; }
  .count { padding-left: .25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

