:root {
  --paper: #f7f5ef;
  --paper-deep: #ece7dc;
  --ink: #142642;
  --ink-soft: #263a57;
  --muted: #66707d;
  --line: #d8d1c4;
  --accent: #92713b;
  --accent-dark: #6f5225;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(20, 38, 66, 0.12);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fff 0, var(--paper) 260px);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: white; padding: 10px 14px; }
.skip-link:focus { left: 8px; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(20, 38, 66, .035);
}
.header-inner { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-brand { display: block; text-decoration: none; flex: 0 1 350px; }
.site-brand-picture { display: block; }
.site-brand-picture img { width: min(340px, 100%); height: auto; }
.site-nav { display: flex; gap: 28px; }
.site-nav a { text-decoration: none; font-size: .82rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--accent-dark); }

.hero { min-height: 570px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 80px; padding-block: 88px; border-bottom: 1px solid var(--line); }
.kicker { margin: 0 0 16px; color: var(--accent-dark); font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero h1, .simple-page h1, .detail-copy h1 { font-family: var(--serif); font-weight: 400; letter-spacing: -.045em; line-height: .97; }
.hero h1 { margin: 0; font-size: clamp(3.4rem, 8vw, 7.2rem); }
.hero-intro { max-width: 660px; margin: 34px 0 0; color: var(--muted); font-family: var(--serif); font-size: clamp(1.15rem, 2.2vw, 1.55rem); line-height: 1.55; }
.hero-art {
  aspect-ratio: 1 / 1;
  max-height: 430px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 58px);
}
.hero-art::before, .hero-art::after { content: ''; position: absolute; pointer-events: none; }
.hero-art::before { inset: 14px; border: 1px solid rgba(146, 113, 59, .32); }
.hero-art::after { width: 120px; height: 3px; background: var(--accent); right: 0; bottom: 34px; }
.hero-art img { width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 1; }

.library { padding-block: 88px 110px; }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: end; margin-bottom: 36px; }
.section-heading h2, .results-heading h2 { margin: 0; font: 400 clamp(2rem, 4vw, 3.5rem)/1.05 var(--serif); letter-spacing: -.035em; }
.section-heading > p { color: var(--muted); margin: 0; max-width: 620px; }
.filter-panel { border: 1px solid var(--line); border-top: 3px solid var(--accent); background: rgba(255,255,255,.78); padding: 24px; box-shadow: 0 8px 30px rgba(20,38,66,.055); }
.preset-row { display: flex; flex-wrap: wrap; gap: 9px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.preset-button, .clear-button, .selected-tag, .tag-directory button, .tag-link { border: 1px solid var(--line); background: transparent; border-radius: 999px; cursor: pointer; }
.preset-button, .clear-button { padding: 9px 15px; font-size: .86rem; }
.preset-button:hover, .preset-button.is-active { border-color: var(--ink); background: var(--ink); color: var(--white); }
.clear-button { margin-left: auto; border-color: transparent; color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.filter-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-block: 22px; }
.filter-tools label { position: relative; display: grid; gap: 7px; color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.filter-tools input { width: 100%; border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: 10px 2px; color: var(--ink); outline: none; text-transform: none; letter-spacing: 0; font-weight: 400; }
.filter-tools input:focus { border-color: var(--accent); box-shadow: 0 2px 0 var(--accent); }
.tag-suggestions { position: absolute; top: 100%; left: 0; right: 0; z-index: 15; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tag-suggestions button { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 11px 13px; display: flex; justify-content: space-between; cursor: pointer; text-align: left; text-transform: none; letter-spacing: 0; }
.tag-suggestions button:hover { background: var(--paper); }
.tag-suggestions small { color: var(--muted); }
.selected-row { display: flex; gap: 14px; min-height: 42px; align-items: flex-start; }
.selected-label { color: var(--muted); font-size: .8rem; padding-top: 6px; white-space: nowrap; }
.selected-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.selected-tag { padding: 5px 10px; background: var(--paper); font-size: .8rem; }
.selected-tag:hover { border-color: var(--accent); color: var(--accent-dark); }
.tag-browser { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 15px; }
.tag-browser summary { width: fit-content; cursor: pointer; color: var(--accent-dark); font-size: .84rem; }
.tag-directory { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 18px; }
.tag-directory h3 { flex-basis: 100%; margin: 10px 0 0; color: var(--muted); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.tag-directory button { padding: 5px 9px; font-size: .78rem; }
.tag-directory button:hover { border-color: var(--accent); color: var(--accent-dark); }
.tag-directory small { margin-left: 5px; color: var(--muted); }
.results-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin: 72px 0 24px; }
.results-heading p { margin: 0; color: var(--muted); }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; transition: opacity .15s ease; }
.is-loading .work-grid { opacity: .42; }
.work-card { min-width: 0; display: grid; grid-template-columns: 180px 1fr; background: var(--white); border: 1px solid var(--line); box-shadow: 0 12px 35px rgba(20,38,66,.075); }
.work-cover, .detail-cover { position: relative; overflow: hidden; min-height: 260px; background: #dbe0e7; text-decoration: none; }
.work-cover img, .detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-placeholder { background: linear-gradient(145deg, #e8e5dc, #c9d0d9); color: var(--ink); }
.cover-placeholder::after { content: ''; position: absolute; inset: 12px; border: 1px solid rgba(146,113,59,.52); }
.cover-monogram { position: absolute; right: -9px; bottom: -50px; font: 400 11rem/1 var(--serif); color: rgba(20,38,66,.16); }
.cover-title { position: absolute; left: 24px; right: 20px; top: 30px; z-index: 1; font: 400 1.15rem/1.15 var(--serif); }
.work-card-body { min-width: 0; padding: 24px; display: flex; flex-direction: column; }
.eyebrow-row { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.work-card h2 { margin: 18px 0 3px; font: 400 1.8rem/1.05 var(--serif); letter-spacing: -.03em; }
.work-card h2 a { text-decoration: none; }
.work-card h2 a:hover { color: var(--accent-dark); }
.subtitle { margin: 5px 0 0; color: var(--muted); font-family: var(--serif); font-style: italic; }
.byline { margin: 10px 0 0; font-size: .78rem; }
.summary { margin: 18px 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-link { padding: 3px 8px; font-size: .72rem; text-decoration: none; }
.tag-link:hover { border-color: var(--accent); color: var(--accent-dark); }
.card-actions { margin-top: auto; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.text-link { color: var(--accent-dark); font-size: .8rem; font-weight: 700; text-decoration: none; }
.text-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.empty-state { text-align: center; padding: 90px 20px; border: 1px dashed var(--line); }
.empty-state.is-hidden { display: none; }
.empty-state > span { display: block; font: 400 7rem/1 var(--serif); color: var(--line); }
.empty-state h2 { margin: 12px 0 6px; font: 400 2rem/1.1 var(--serif); }
.empty-state p { margin: 0; color: var(--muted); }
.setup-message { margin-block: 80px; padding: 30px; border: 1px solid var(--line); background: var(--white); }

.work-page { padding-block: 50px 100px; }
.back-link { margin: 0 0 38px; font-size: .83rem; }
.back-link a { color: var(--accent-dark); text-decoration: none; }
.work-detail { display: grid; grid-template-columns: minmax(270px, .65fr) 1.35fr; gap: clamp(45px, 8vw, 110px); align-items: start; }
.cover-gallery { display: grid; gap: 28px; }
.cover-gallery figure { margin: 0; }
.cover-gallery figcaption { margin-top: 9px; color: var(--muted); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.detail-cover { aspect-ratio: 2 / 3; min-height: 0; box-shadow: var(--shadow); }
.detail-cover .cover-monogram { font-size: 18rem; }
.detail-cover .cover-title { top: 50px; left: 38px; right: 35px; font-size: 2rem; }
.detail-copy { padding-top: 24px; }
.detail-copy h1 { margin: 0; font-size: clamp(3.2rem, 7vw, 6.5rem); }
.detail-subtitle { margin: 18px 0 0; color: var(--muted); font: italic 1.4rem/1.4 var(--serif); }
.detail-byline { margin: 25px 0 0; }
.publication-date { margin: 6px 0 0; color: var(--muted); font-size: .8rem; }
.detail-summary { margin-top: 34px; max-width: 760px; font: 1.22rem/1.75 var(--serif); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 35px; }
.button { display: inline-block; border: 1px solid var(--ink); background: var(--ink); color: var(--white); padding: 11px 17px; text-decoration: none; font-size: .82rem; }
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button.secondary { background: transparent; color: var(--ink); }
.button.secondary:hover { color: var(--white); }
.detail-tags { margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--line); }
.detail-tags h2 { margin: 0 0 13px; color: var(--muted); font-size: .75rem; letter-spacing: .13em; text-transform: uppercase; }

.simple-page { min-height: 620px; padding-block: 100px; }
.simple-page h1 { max-width: 900px; margin: 0 0 45px; font-size: clamp(3.2rem, 7vw, 6.8rem); }
.about-logo { margin: 0 0 60px; padding: 28px; border: 1px solid var(--line); border-top: 3px solid var(--accent); background: var(--white); box-shadow: 0 12px 35px rgba(20,38,66,.06); }
.about-logo img { width: min(760px, 100%); margin-inline: auto; }
.prose-columns { display: grid; grid-template-columns: 1.4fr .6fr; gap: 80px; max-width: 1000px; }
.prose-columns > div { font: 1.25rem/1.75 var(--serif); }
.prose-columns aside { padding: 24px; border-top: 3px solid var(--accent); background: rgba(255,255,255,.72); color: var(--muted); }
.aside-label { color: var(--accent-dark); font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }

.site-footer { border-top: 1px solid var(--line); padding-block: 30px; background: rgba(255,255,255,.62); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted); font-size: .75rem; }
.footer-inner > p { margin: 0; }
.footer-brand { display: flex; align-items: center; gap: 9px; }
.footer-brand img { width: 42px; height: 42px; object-fit: contain; }
.footer-mark { margin: 0; font: 700 1rem/1 var(--serif); letter-spacing: .18em; color: var(--ink); }

:focus-visible { outline: 3px solid rgba(146,113,59,.5); outline-offset: 3px; }

@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 50px; }
  .hero-art { width: min(100%, 500px); aspect-ratio: 16 / 9; }
  .section-heading { grid-template-columns: 1fr; gap: 20px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-detail { grid-template-columns: minmax(230px, .6fr) 1.4fr; gap: 45px; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 78px; }
  .site-brand { flex-basis: auto; }
  .site-brand-picture img { width: 58px; height: 58px; object-fit: contain; }
  .site-nav { gap: 15px; }
  .site-nav a { font-size: .7rem; }
  .hero { padding-block: 65px; }
  .hero h1 { font-size: clamp(3.2rem, 18vw, 5.2rem); }
  .hero-art { aspect-ratio: 16 / 10; padding: 25px; }
  .library { padding-block: 65px 80px; }
  .filter-panel { padding: 17px; }
  .clear-button { margin-left: 0; }
  .filter-tools { grid-template-columns: 1fr; }
  .selected-row { display: block; }
  .selected-label { display: block; margin-bottom: 8px; }
  .results-heading { margin-top: 50px; }
  .work-card { grid-template-columns: 115px 1fr; }
  .work-cover { min-height: 210px; }
  .work-card-body { padding: 18px; }
  .work-card h2 { font-size: 1.45rem; }
  .summary { -webkit-line-clamp: 3; font-size: .9rem; }
  .eyebrow-row time { display: none; }
  .tag-row { display: none; }
  .card-actions { flex-wrap: wrap; }
  .work-detail { grid-template-columns: 1fr; }
  .detail-cover { width: min(75%, 340px); }
  .detail-copy h1 { font-size: clamp(3rem, 16vw, 5rem); }
  .simple-page { padding-block: 65px; }
  .about-logo { padding: 16px; margin-bottom: 40px; }
  .prose-columns { grid-template-columns: 1fr; gap: 35px; }
  .footer-inner { align-items: center; }
  .footer-brand img { width: 36px; height: 36px; }
}

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

/* Legal pages and footer navigation — v0.1.6 */
.footer-copy { display: grid; gap: 8px; }
.footer-copy > p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.footer-links a { color: var(--accent-dark); text-underline-offset: 3px; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--ink); }
.footer-links span { color: var(--line); }
.legal-page { max-width: 980px; }
.legal-page h1 { max-width: none; margin-bottom: 18px; font-size: clamp(3.2rem, 7vw, 6.2rem); }
.legal-meta { margin: 0 0 46px; color: var(--muted); font-size: .86rem; }
.legal-copy { max-width: 820px; font: 1.08rem/1.75 var(--serif); }
.legal-copy > :first-child { margin-top: 0; font-size: 1.24rem; }
.legal-copy h2 { margin: 48px 0 12px; color: var(--ink); font: 400 1.75rem/1.2 var(--serif); letter-spacing: -.02em; }
.legal-copy p { margin: 0 0 18px; }
.legal-copy a { color: var(--accent-dark); text-underline-offset: 3px; }
@media (max-width: 680px) {
  .footer-inner { align-items: flex-start; }
  .footer-brand { flex: 0 0 auto; }
  .legal-meta { margin-bottom: 34px; }
  .legal-copy { font-size: 1rem; }
  .legal-copy h2 { margin-top: 38px; }
}
