@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #242424;
  --muted: #707070;
  --line: #e7e5e1;
  --paper: #f7f6f3;
  --accent: #a52c35;
  --accent-dark: #7f2028;
  --white: #fff;
  font-family: "DM Sans", "Noto Sans", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
.site-header { width: 100%; background: #222; }
.site-logo { display: block; width: 100%; height: auto; max-height: 210px; object-fit: contain; object-position: left center; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: 46px 0 28px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .16em; }
h1 { margin: 0; font: 800 clamp(1.8rem, 4vw, 2.7rem)/1.12 Manrope, sans-serif; letter-spacing: -.045em; }
.intro-copy { max-width: 680px; margin: 12px 0 0; color: #64615e; line-height: 1.65; }
.total { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; padding-bottom: 5px; color: var(--muted); font-size: .82rem; }
.total strong { color: var(--ink); font: 800 2rem/1 Manrope, sans-serif; }
.toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) 220px 190px auto; gap: 10px; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 5px 20px #24242408; }
.search-wrap { position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-53%); color: #777; font-size: 1.55rem; }
input, select, button { font: inherit; }
.search-wrap input, .filter-label select { width: 100%; height: 46px; border: 1px solid #e5e2dd; border-radius: 7px; background: #fff; color: var(--ink); outline: none; }
.search-wrap input { padding: 0 14px 0 42px; }
.filter-label { display: flex; flex-direction: column; gap: 3px; color: #77716b; font-size: .68rem; font-weight: 600; }
.filter-label select { height: 29px; padding: 0 9px; font-size: .87rem; }
.search-wrap input:focus, .filter-label select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #a52c3515; }
.clear-button { align-self: end; height: 46px; padding: 0 16px; border: 1px solid #e5e2dd; border-radius: 7px; background: #faf9f7; color: #514d49; cursor: pointer; }
.clear-button:hover { border-color: #c9c3bc; background: #f2f0ec; }
.results-line { display: flex; justify-content: space-between; padding: 18px 2px 10px; color: var(--muted); font-size: .82rem; }
.results-line p { margin: 0; }
.magazine-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 54px; }
.magazine-card { overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 2px 9px #24242405; }
.card-summary { display: grid; grid-template-columns: 135px minmax(0, 1fr) 34px; align-items: center; gap: 22px; width: 100%; padding: 16px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.card-summary:hover { background: #fcfbfa; }
.cover { display: block; width: 135px; height: 200px; object-fit: contain; object-position: center; background: #f0efec; border: 1px solid #e9e7e3; }
.cover-fallback { display: flex; align-items: center; justify-content: center; width: 135px; height: 200px; padding: 12px; background: #eeece8; color: #777; text-align: center; font-size: .8rem; }
.card-meta { min-width: 0; }
.magazine-name { display: inline-block; margin-bottom: 9px; color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .09em; }
.issue-title { margin: 0; font: 700 1.23rem/1.35 Manrope, sans-serif; }
.issue-date { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }
.chevron { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: #666; font-size: 1.2rem; transition: transform .2s ease; }
.magazine-card[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.card-details { padding: 22px 24px 24px 173px; border-top: 1px solid var(--line); background: #fcfbf9; }
.card-details[hidden] { display: none; }
.details-heading { margin: 0 0 12px; font: 700 1rem Manrope, sans-serif; }
.contents { margin: 0; color: #4b4844; font-size: .91rem; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
.permalink-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.permalink-link { color: var(--accent); font-size: .86rem; font-weight: 600; text-underline-offset: 3px; }
.copy-link-button { padding: 8px 11px; border: 1px solid #ded9d2; border-radius: 6px; background: #fff; color: #514d49; font: inherit; font-size: .8rem; cursor: pointer; }
.copy-link-button:hover { border-color: var(--accent); color: var(--accent); }
.pdf-link { display: inline-flex; align-items: center; gap: 9px; margin-top: 20px; padding: 10px 15px; border-radius: 6px; background: var(--accent); color: white; text-decoration: none; font-size: .86rem; font-weight: 600; }
.pdf-link:hover { background: var(--accent-dark); }
.empty-state { margin: 12px 0 60px; padding: 44px 20px; border: 1px dashed #d7d2ca; border-radius: 10px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); }
.empty-state p { margin-bottom: 0; }
.load-error { padding: 20px; border: 1px solid #e7b9b9; border-radius: 8px; background: #fff2f2; color: #8c2525; }
.site-footer { padding: 25px 20px; background: #222; color: #ddd; text-align: center; font-size: .85rem; line-height: 1.6; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; text-underline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .intro { align-items: flex-start; }
  .total { padding-top: 4px; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .search-wrap { grid-column: 1 / -1; }
  .clear-button { width: 100%; }
  .card-summary { grid-template-columns: 96px minmax(0, 1fr) 28px; gap: 13px; padding: 12px; }
  .cover, .cover-fallback { width: 96px; height: 142px; }
  .issue-title { font-size: 1rem; }
  .magazine-name { font-size: .64rem; }
  .card-details { padding: 18px; }
}
@media (max-width: 440px) {
  .container { width: min(100% - 24px, 1120px); }
  .intro { padding-top: 30px; gap: 10px; }
  .intro-copy { font-size: .9rem; }
  .total { font-size: .7rem; }
  .total strong { font-size: 1.55rem; }
  .toolbar { padding: 10px; gap: 8px; }
  .filter-label select { font-size: .78rem; }
}
.permalink {
  display: inline-block;
  margin-top: 12px;
  margin-left: 12px;
  color: #a52c35;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}

.permalink:hover {
  text-decoration: underline;
}