:root {
  color-scheme: dark;
  --ink: #242321;
  --ink-raised: #2b2926;
  --ink-soft: #33302c;
  --paper: #eee9df;
  --paper-muted: #bcb5a9;
  --line: rgba(238, 233, 223, .14);
  --clay: #c97854;
  --clay-light: #e2a17d;
  --green: #b8c3a5;
  --content: 1200px;
  --sans: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; }
img { display: block; }
a { color: var(--clay-light); text-underline-offset: .2em; }
a:hover { color: #f0b391; }
button, input, select { font: inherit; }
button, select { color: inherit; }
:focus-visible { outline: 3px solid var(--clay-light); outline-offset: 4px; }
::selection { color: var(--ink); background: var(--clay-light); }

.wrap { width: min(var(--content), calc(100% - 64px)); margin-inline: auto; }

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(var(--content), calc(100% - 64px));
  min-height: 88px;
  margin-inline: auto;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.045em;
  text-decoration: none;
  white-space: nowrap;
}
.brand::before {
  width: 11px;
  height: 11px;
  border-radius: 3px 8px 3px 8px;
  background: var(--clay);
  content: "";
  transform: rotate(-12deg);
}
.top-links { display: flex; align-items: center; gap: 30px; }
.top-links a, .category-nav a {
  color: var(--paper-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color .18s ease;
}
.top-links a:hover, .category-nav a:hover, .category-nav a[aria-current="page"] { color: var(--paper); }
#menu-toggle {
  display: none;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.category-nav {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  padding-block: 15px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav a { white-space: nowrap; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, .8fr);
  align-items: center;
  gap: clamp(42px, 8vw, 112px);
  padding-block: clamp(72px, 10vw, 132px) clamp(70px, 9vw, 112px);
}
.hero-copy { max-width: 740px; }
.kicker, .tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--clay-light);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.kicker::before { width: 18px; height: 1px; background: currentColor; content: ""; }
h1, h2, h3, p { margin-top: 0; }
.hero h1, .article-heading h1 {
  margin: 20px 0 22px;
  font-family: var(--serif);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: 1.05;
}
.hero-copy > p { max-width: 58ch; margin-bottom: 30px; color: var(--paper-muted); font-size: 17px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 19px;
  border: 1px solid var(--clay);
  border-radius: 8px;
  background: var(--clay);
  color: #211d1a;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.button:hover { border-color: var(--clay-light); background: var(--clay-light); color: #211d1a; transform: translateY(-1px); }
.button.secondary { border-color: var(--line); background: transparent; color: var(--paper); }
.button.secondary:hover { border-color: rgba(238,233,223,.4); background: rgba(238,233,223,.05); }
.hero-portrait { position: relative; justify-self: end; width: min(100%, 360px); }
.hero-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: 4px 64px 4px 4px;
  background: var(--ink-soft);
  object-fit: cover;
}
.hero-portrait::after {
  position: absolute;
  right: -13px;
  bottom: -13px;
  z-index: -1;
  width: 44%;
  height: 44%;
  border-right: 1px solid var(--clay);
  border-bottom: 1px solid var(--clay);
  content: "";
}
.stats { display: flex; flex-wrap: wrap; gap: 40px; padding-block: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { display: grid; gap: 2px; }
.stat strong { font-family: var(--serif); font-size: 25px; font-weight: 500; line-height: 1.2; }
.stat span { color: var(--paper-muted); font-size: 12px; }

.section { padding-block: clamp(64px, 8vw, 100px); }
.section + .section { border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.section-heading h2, .about-grid h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1.14;
}
.section-heading p { max-width: 48ch; margin: 8px 0 0; color: var(--paper-muted); font-size: 14px; }
.section-heading > a { flex: 0 0 auto; font-size: 13px; font-weight: 650; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--ink-raised);
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: rgba(201,120,84,.55); transform: translateY(-3px); }
.card-image { overflow: hidden; background: var(--ink-soft); }
.card-image img { width: 100%; aspect-ratio: 1.63; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-image img { transform: scale(1.025); }
.card-body { padding: 21px 22px 19px; }
.tag { padding: 5px 8px; border: 1px solid rgba(201,120,84,.35); border-radius: 999px; font-size: 9px; letter-spacing: .06em; }
.card h2 { margin: 14px 0 9px; font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: -.025em; line-height: 1.24; }
.card h2 a { color: var(--paper); text-decoration: none; }
.card h2 a:hover { color: var(--clay-light); }
.card p { margin: 0; color: var(--paper-muted); font-size: 13px; line-height: 1.6; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--paper-muted); font-size: 11px; }
.catalog-tools { display: flex; gap: 12px; margin: 0 0 24px; }
.catalog-tools input, .catalog-tools select {
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink-raised);
  color: var(--paper);
}
.catalog-tools input { flex: 1; min-width: 0; }
.catalog-tools input::placeholder { color: #8e887f; }
.catalog-tools select { min-width: 190px; }
#result-count { margin: 0 0 16px; color: var(--paper-muted); font-size: 12px; }
.empty { display: none; padding: 32px; border: 1px dashed var(--line); border-radius: 12px; color: var(--paper-muted); text-align: center; }
.empty.is-visible { display: block; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 28px; color: var(--paper-muted); font-size: 12px; }
.breadcrumbs a { color: var(--paper-muted); }
.breadcrumbs span[aria-current="page"] { color: var(--paper); }
.notice { margin-block: 24px; padding: 17px 20px; border-left: 2px solid var(--clay); background: rgba(201,120,84,.08); color: var(--paper-muted); font-size: 14px; }
.article-heading { max-width: 850px; padding-block: 45px 28px; }
.article-heading h1 { max-width: 16ch; margin-top: 15px; }
.byline { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--paper-muted); font-size: 12px; }
.article-hero { width: 100%; max-height: 520px; margin-bottom: 40px; border: 1px solid var(--line); border-radius: 16px; background: var(--ink-soft); object-fit: cover; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 230px; align-items: start; gap: clamp(48px, 8vw, 112px); padding-bottom: 90px; }
.article-main { min-width: 0; }
.toc { position: sticky; top: 24px; padding: 18px 0 18px 18px; border-left: 1px solid var(--line); }
.toc h2 { margin-bottom: 12px; color: var(--paper-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.toc ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.toc a { color: var(--paper-muted); font-size: 12px; line-height: 1.5; text-decoration: none; }
.toc a:hover { color: var(--paper); }
.prose { max-width: 78ch; color: #ded8ce; font-size: 16px; line-height: 1.8; }
.prose > * + * { margin-top: 1.35em; }
.prose h2, .prose h3 { color: var(--paper); font-family: var(--serif); font-weight: 500; letter-spacing: -.03em; line-height: 1.2; }
.prose h2 { margin-top: 2.2em; font-size: clamp(28px, 3.5vw, 36px); }
.prose h3 { margin-top: 1.8em; font-size: 24px; }
.prose p { margin-bottom: 0; }
.prose strong { color: var(--paper); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose blockquote { margin-left: 0; padding: 5px 0 5px 22px; border-left: 2px solid var(--clay); color: var(--paper-muted); font-family: var(--serif); font-size: 19px; }
.prose pre { position: relative; overflow: auto; padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: #1b1a18; color: #ede7dc; font-size: 13px; line-height: 1.6; tab-size: 2; }
.prose code { padding: .15em .35em; border-radius: 4px; background: rgba(238,233,223,.09); color: #e3b08f; font-family: "SFMono-Regular", Consolas, monospace; font-size: .88em; }
.prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.copy-button { position: absolute; top: 10px; right: 10px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--ink-raised); color: var(--paper-muted); font-size: 11px; cursor: pointer; }
.copy-button:hover { color: var(--paper); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { padding: 11px 13px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--ink-raised); color: var(--paper); font-weight: 650; }
.prose details { padding: 15px 17px; border: 1px solid var(--line); border-radius: 8px; }
.prose summary { color: var(--paper); cursor: pointer; font-weight: 650; }
.prose details[open] > * + * { margin-top: 14px; }
.prose img, .prose video, .prose iframe { width: 100%; border: 1px solid var(--line); border-radius: 12px; }
.prose iframe { aspect-ratio: 16 / 9; }
.author-panel { display: flex; align-items: center; gap: 20px; margin-top: 55px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink-raised); }
.author-panel img { width: 68px; height: 68px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; }
.author-panel h2 { margin: 0 0 4px; font-size: 15px; }
.author-panel p { margin: 0; color: var(--paper-muted); font-size: 13px; }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: start; padding-block: 70px 100px; }
.about-grid p { color: var(--paper-muted); }
.about-grid .prose { font-size: 15px; }

.site-footer { margin-top: 30px; border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px; padding-block: 30px; color: var(--paper-muted); font-size: 12px; }
.site-footer a { color: var(--paper-muted); }
.site-footer a:hover { color: var(--paper); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }

@media (max-width: 850px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: minmax(0, 1.3fr) minmax(200px, .7fr); gap: 45px; }
  .article-layout { grid-template-columns: minmax(0, 1fr) 190px; gap: 38px; }
}
@media (max-width: 640px) {
  .wrap, .site-header { width: min(100% - 40px, var(--content)); }
  .site-header { min-height: 72px; }
  #menu-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .top-links {
    position: absolute;
    top: calc(100% + 1px);
    right: -20px;
    left: -20px;
    display: none;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--ink);
  }
  .top-links.is-open { display: flex; flex-direction: column; }
  .top-links a { padding: 11px 0; border-bottom: 1px solid var(--line); }
  .top-links a:last-child { border-bottom: 0; }
  .category-nav { gap: 20px; margin-inline: -20px; padding-inline: 20px; }
  .hero { grid-template-columns: 1fr; gap: 38px; padding-block: 62px 54px; }
  .hero h1, .article-heading h1 { font-size: 38px; }
  .hero-copy > p { font-size: 15px; }
  .hero-portrait { justify-self: start; width: min(72%, 290px); }
  .stats { gap: 22px 32px; }
  .stat strong { font-size: 22px; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .card-body { padding: 18px; }
  .catalog-tools { flex-direction: column; }
  .catalog-tools select { width: 100%; }
  .article-heading { padding-block: 32px 20px; }
  .article-layout { grid-template-columns: 1fr; gap: 28px; padding-bottom: 65px; }
  .toc { position: static; grid-row: 1; padding: 14px 0 0 14px; }
  .article-hero { margin-bottom: 28px; border-radius: 10px; }
  .prose { font-size: 15px; }
  .about-grid { grid-template-columns: 1fr; gap: 20px; padding-block: 52px 70px; }
  .site-footer .wrap { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
/* Production integration: intrinsic sizes and keyboard navigation. */
figure { margin: 0; }
.hero-portrait img { height:auto; aspect-ratio:4/5; }
.hero { padding-block:64px; }
.category-nav { padding-inline:max(24px,calc((100vw - 1200px)/2)); }
.skip-link { position:absolute;left:16px;top:-80px;z-index:100;background:var(--clay);color:#171615;padding:12px; }
.skip-link:focus { top:8px; }
.article-hero { margin:32px 0;max-width:760px; }
.article-hero img { width:100%;height:340px;object-fit:cover;object-position:50% 42%;border-radius:16px; }
.article-hero figcaption { font-size:13px;color:var(--paper-muted);padding-top:8px; }
.author-panel img { width:80px;height:80px;object-fit:cover;border-radius:50%; }
.prose { overflow-wrap:anywhere; }
.prose pre { white-space:pre-wrap; }
.prose table { display:block;max-width:100%;overflow-x:auto; }
.prose img { height:auto; }
@media(max-width:640px){.hero{padding-block:36px}.hero-portrait{width:100%;max-width:360px;justify-self:center}.article-hero img{height:230px}}
.category-nav { margin-inline:0;max-width:100%; }
.site-footer.wrap { display:flex;justify-content:space-between;gap:32px;padding-block:32px;font-size:13px; }
@media(max-width:640px){.site-footer.wrap{flex-direction:column}.catalog-tools label{min-width:0;width:100%}.catalog-tools input{width:100%;min-width:0}}
