/* Cedergren Press, design A: paper and oxblood */
:root {
  --paper: #F5F3EE;
  --paper-light: #FBFAF7;
  --paper-deep: #E9E6DF;
  --ink: #1B1E24;
  --ink-soft: #4A4F57;
  --rule: #D9D5CC;
  --rule-strong: #C9C5BC;
  --rubric: #8C2F28;
  --rubric-light: #D9A79F;
  --muted-dark: #8F8B83;
  --display: 'Cormorant Garamond', Garamond, serif;
  --text: 'Source Serif 4', Georgia, serif;
  --ui: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--text); }
img { display: block; max-width: 100%; }
a { color: var(--ink); }
a:hover { color: var(--rubric); }
:focus-visible { outline: 2px solid var(--rubric); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; }
p { margin: 0; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.muted { color: var(--ink-soft); }
.ui { font-family: var(--ui); }
.eyebrow { font-family: var(--ui); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--rubric); }
.plain { text-decoration: none; }
.link { font-family: var(--ui); font-size: 15px; font-weight: 500; text-underline-offset: 5px; min-height: 44px; display: inline-flex; align-items: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px;
  border: 1px solid var(--ink); border-radius: 2px; background: transparent; color: var(--ink);
  font: 500 15px var(--ui); text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--ink); background: var(--paper-light); }
.btn-primary { background: var(--rubric); border-color: var(--rubric); color: #fff; }
.btn-primary:hover { background: #7A2822; color: #fff; }
.btn-light { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn-block { display: flex; width: 100%; }

/* Toggle chips (language filters, edition previews) */
.chip { min-height: 44px; padding: 0 18px; background: transparent; color: var(--ink); border: 1px solid var(--ink);
  border-radius: 2px; font: 14px var(--ui); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--ink); color: #fff; }

/* Announcement bar and header */
.announce { background: var(--ink); color: var(--paper-deep); font: 13px var(--ui); letter-spacing: 0.02em; text-align: center; padding: 10px 24px; }
.masthead { border-bottom: 1px solid var(--rule); }
.masthead .wrap { padding-top: 22px; padding-bottom: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.brand { text-decoration: none; display: flex; align-items: baseline; gap: 0.3em; font-size: 26px; line-height: 1; }
.brand-name { font: 500 1em var(--display); letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink); }
.brand-press { font: italic 500 1em var(--display); color: var(--rubric); }
.nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font: 500 14px var(--ui); }
.nav a { text-decoration: none; }
.nav a[aria-current="page"] { color: var(--rubric); }
.account { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; font: 14px var(--ui); }

/* Sections */
.section { padding-top: 88px; padding-bottom: 24px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: 48px; line-height: 1.1; }
.section-head p { max-width: 30em; font-size: 16px; color: var(--ink-soft); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }

/* Hero */
.hero { padding-top: 72px; padding-bottom: 88px; display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.hero-copy { flex: 5 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero-copy .eyebrow { font-size: 13px; }
.hero h1 { font-size: clamp(42px, 5vw, 68px); line-height: 1.02; letter-spacing: -0.01em; }
.hero-copy > p { max-width: 34em; font-size: 19px; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.hero-photo { flex: 6 1 440px; min-width: 0; }
.hero-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }

.strip { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.strip .wrap { padding-top: 22px; padding-bottom: 22px; display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: center;
  font: 13px var(--ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }

/* Cards */
.card { background: var(--paper-light); border: 1px solid var(--rule); padding: 36px 32px; display: flex; flex-direction: column; gap: 14px; }
.card-title { font-family: var(--display); font-size: 34px; line-height: 1.1; }
.card p { font-size: 15px; color: var(--ink-soft); }
.card .price { margin-top: auto; padding-top: 12px; font: 15px var(--ui); }
.card-dark { background: var(--ink); border-color: var(--ink); color: var(--paper-deep); }
.card-dark .eyebrow { color: var(--rubric-light); }
.card-dark .card-title { color: #fff; }
.card-dark p { color: var(--rule-strong); }
a.card { text-decoration: none; }
a.card .card-title { font-size: 32px; }
a.card span.muted { font-size: 16px; }

.places figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.places img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.places figcaption { font: 13px var(--ui); color: var(--ink-soft); }

/* Translation table */
.table-scroll { overflow-x: auto; }
.ttable { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 17px; }
.ttable th { padding: 12px 0; border-bottom: 1px solid var(--ink); font: 600 12px var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); text-align: left; }
.ttable td { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.ttable .num { text-align: right; }
.siglum { font: 600 13px var(--ui); letter-spacing: 0.08em; color: var(--rubric); }
.tname { font-family: var(--display); font-size: 23px; text-decoration: none; }

/* Edition diagrams */
.edition-col { margin: 0; display: flex; flex-direction: column; gap: 16px; }
.edition-col img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; }
.edition-col figcaption { display: flex; flex-direction: column; gap: 8px; }
.edition-col h3 { font-weight: 600; font-size: 26px; }
.edition-col p { font-size: 15px; color: var(--ink-soft); }

/* Accessible panel */
.panel { background: var(--paper-light); border: 1px solid var(--rule); padding: 48px 44px; display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.panel-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.panel-copy h2 { font-size: 40px; line-height: 1.1; }
.panel-copy p { font-size: 16px; color: var(--ink-soft); max-width: 32em; }
.faces { flex: 1 1 100%; gap: 20px; }
.faces figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.faces img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border: 1px solid var(--rule); background: #fff; display: block; }
.faces figcaption { font: 13px var(--ui); color: var(--ink-soft); }

.note-row { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 32px 0; display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; justify-content: space-between; }
.note-row > div { display: flex; flex-direction: column; gap: 4px; flex: 1 1 480px; }
.note-row .title { font-family: var(--display); font-size: 30px; line-height: 1.15; }

.band { background: var(--ink); color: var(--paper-deep); padding: 28px 32px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.band .title { font-family: var(--display); font-size: 26px; color: #fff; }

/* Footer */
.footer { background: var(--ink); color: var(--rule-strong); font: 14px var(--ui); margin-top: 112px; }
.footer .top { padding-top: 64px; padding-bottom: 48px; display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; }
.footer .brand-line { font: 500 24px/1 var(--display); letter-spacing: 0.07em; text-transform: uppercase; color: #fff; }
.footer .brand-line em { font-style: italic; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--rubric-light); margin-left: 0.15em; }
.footer .cols { display: flex; flex-wrap: wrap; gap: 48px; }
.footer .col { display: flex; flex-direction: column; gap: 10px; }
.footer .col-head { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-dark); }
.footer a { color: var(--paper-deep); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer .legal { border-top: 1px solid #3A3D42; padding-top: 20px; padding-bottom: 36px; font-size: 12px; color: var(--muted-dark); }

/* Catalogue */
.page { padding-top: 64px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 32px; }
.page-title { font-size: 64px; line-height: 1; }
.cat-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.cat-head > div:first-child { display: flex; flex-direction: column; gap: 8px; }
.search { display: flex; flex-direction: column; gap: 6px; width: 340px; max-width: 100%; }
.label { font: 600 12px var(--ui); letter-spacing: 0.14em; text-transform: uppercase; }
.search input { min-height: 48px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 2px; background: var(--paper-light); font: 15px var(--ui); color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font: 14px var(--ui); }
.filters .spacer { flex: 1; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--rubric); }
.groups { display: flex; flex-direction: column; gap: 40px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--ink); padding-bottom: 8px; }
.group-head h2 { font-size: 34px; }
.group-head span { font: 13px var(--ui); color: var(--ink-soft); }
.trow { text-decoration: none; display: grid; grid-template-columns: 80px minmax(0, 1fr) auto auto; gap: 20px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.trow .t-name { display: flex; flex-direction: column; min-width: 0; }
.trow .t-name > span:first-child { font-family: var(--display); font-size: 24px; line-height: 1.2; }
.trow .t-name > span:last-child { font: 13px var(--ui); color: var(--ink-soft); }
.trow .price { font: 14px var(--ui); min-width: 80px; text-align: right; }
.tag { font: 600 12px var(--ui); padding: 4px 10px; border: 1px solid var(--ink); }
.empty { padding: 24px 0; color: var(--ink-soft); }

/* Edition page */
.crumbs { padding-top: 28px; font: 13px var(--ui); color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.edition { padding-top: 40px; padding-bottom: 88px; display: flex; flex-wrap: wrap; gap: 72px; align-items: flex-start; }
.preview { flex: 1 1 460px; min-width: 0; background: var(--paper-deep); padding: 32px 24px 28px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.preview img { width: 100%; max-width: 560px; aspect-ratio: 1 / 1; object-fit: cover; }
.preview .chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.buy { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.buy-head { display: flex; flex-direction: column; gap: 10px; }
.buy-head .eyebrow { font-size: 13px; }
.buy-head h1 { font-size: 56px; line-height: 1.05; }
.buy-head p { font-size: 18px; color: var(--ink-soft); }
.contents { display: flex; flex-direction: column; gap: 12px; }
.contents table { width: 100%; border-collapse: collapse; font-size: 15px; }
.contents th { padding: 8px 0; border-bottom: 1px solid var(--ink); font: 500 12px var(--ui); color: var(--ink-soft); text-align: left; }
.contents th + th, .contents td + td { text-align: center; }
.contents td { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.contents td + td { color: var(--rubric); }
.small { font: 13px var(--ui); color: var(--ink-soft); }
.options { border: 0; margin: 0; padding: 24px 0 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; }
.options legend { padding: 0; margin-bottom: 12px; }
.option { display: flex; align-items: center; gap: 16px; min-height: 72px; padding: 14px 18px; border: 1px solid var(--rule-strong); border-radius: 2px; cursor: pointer; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .dot { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid var(--ink); display: flex; align-items: center; justify-content: center; }
.option .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.option .o-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.option .o-title { font-family: var(--display); font-size: 22px; line-height: 1.2; }
.option .o-note { font: 13px var(--ui); color: var(--ink-soft); }
.option .o-price { font: 500 15px var(--ui); white-space: nowrap; }
.option:has(input:checked) { background: var(--paper-light); border: 1.5px solid var(--ink); }
.option:has(input:checked) .dot::after { background: var(--rubric); }
.option:has(input:focus-visible) { outline: 2px solid var(--rubric); outline-offset: 3px; }
.options .btn-primary { margin-top: 8px; min-height: 52px; font-size: 16px; }
.also { text-decoration: none; display: flex; gap: 16px; align-items: center; }
.also .mark { width: 44px; height: 44px; flex: none; border: 1px solid var(--ink); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.also .a-text { display: flex; flex-direction: column; }
.also .a-text > span:first-child { font: 500 14px var(--ui); }
.also .a-text > span:last-child { font-size: 14px; color: var(--ink-soft); }
.details { border-top: 1px solid var(--rule); }
.details .wrap { padding-top: 72px; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 64px; }
.details h2 { font-size: 36px; margin-bottom: 20px; }
.facts { margin: 0; display: grid; grid-template-columns: 140px minmax(0, 1fr); font-size: 16px; }
.facts dt, .facts dd { margin: 0; padding: 12px 0; border-top: 1px solid var(--rule); }
.facts dt { font: 13px var(--ui); color: var(--ink-soft); padding-top: 15px; }
.facts dt:nth-last-of-type(1), .facts dd:last-of-type { border-bottom: 1px solid var(--rule); }
.history { margin: 0 0 20px; padding: 0; list-style: none; }
.history li { padding: 16px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 16px; }
.history li:last-child { border-bottom: 1px solid var(--rule); }
.history .v { font: 600 14px var(--ui); }
.history li:first-child .v { color: var(--rubric); }
.history .d { display: block; font: 13px var(--ui); color: var(--ink-soft); }

/* Library */
.lib-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.badge-dark { font: 600 13px var(--ui); letter-spacing: 0.14em; text-transform: uppercase; padding: 10px 16px; background: var(--ink); color: #fff; }
.update { background: var(--paper-light); border: 1px solid var(--rule); border-top: 3px solid var(--rubric); padding: 24px 28px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.update > div:first-child { display: flex; flex-direction: column; gap: 4px; flex: 1 1 420px; }
.update .title { font-family: var(--display); font-size: 24px; }
.update .actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font: 500 14px var(--ui); }
.shelf details { border-top: 1px solid var(--rule); }
.shelf details:last-child { border-bottom: 1px solid var(--rule); }
.shelf summary { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding: 22px 0; cursor: pointer; }
.shelf summary::-webkit-details-marker { display: none; }
.spine { width: 44px; height: 58px; background: var(--paper-light); border: 1px solid #A9A59C; flex: none; }
.shelf .s-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; }
.shelf .s-title { font-family: var(--display); font-size: 26px; line-height: 1.2; }
.shelf .s-meta { font: 13px var(--ui); color: var(--ink-soft); }
.shelf .toggle { font: 13px var(--ui); color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; }
.shelf .toggle svg { transition: transform .15s; }
.shelf details[open] .toggle svg { transform: rotate(180deg); }
.formats { margin: 0 0 28px 76px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.format { background: var(--paper-light); border: 1px solid var(--rule); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.format .f-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.format .f-head span:first-child { font: 600 14px var(--ui); }
.format .f-head span:last-child { font: 12px var(--ui); color: var(--ink-soft); }
.format .files { display: flex; flex-wrap: wrap; gap: 8px; }
.format .all { font: 13px var(--ui); text-underline-offset: 4px; min-height: 32px; display: inline-flex; align-items: center; }
.pass { background: var(--ink); color: var(--paper-deep); padding: 32px 36px; display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.pass > div:first-child { display: flex; flex-direction: column; gap: 6px; flex: 1 1 380px; }
.pass .eyebrow { color: var(--rubric-light); }
.pass .title { font-family: var(--display); font-size: 28px; color: #fff; }
.credits { display: flex; gap: 10px; align-items: center; }
.credits span { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--paper-deep); }
.credits span.used { background: var(--paper-deep); }
.preview-note { font: 13px var(--ui); color: var(--ink-soft); border: 1px dashed var(--rule-strong); padding: 10px 14px; }

/* Plain message page */
.message { padding-top: 96px; max-width: 40em; display: flex; flex-direction: column; gap: 20px; }
.message h1 { font-size: 48px; line-height: 1.1; }

/* Sign-in */
.auth { padding-top: 88px; max-width: 520px; display: flex; flex-direction: column; gap: 20px; }
.auth h1 { font-size: 52px; line-height: 1.05; }
.auth > p.muted { font-size: 17px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.auth-form input[type=email], .auth-form input.code { min-height: 52px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 2px;
  background: var(--paper-light); font: 17px var(--ui); color: var(--ink); }
.auth-form input.code { font-size: 26px; letter-spacing: 0.2em; max-width: 220px; }
.auth-form input[aria-invalid=true] { border-color: var(--rubric); border-width: 2px; }
.auth-form .btn { margin-top: 10px; min-height: 52px; font-size: 16px; }
.error { font: 14px var(--ui); color: var(--rubric); }
.owned { border-top: 1px solid var(--rule); padding-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.owned p { font-size: 16px; color: var(--ink-soft); }
form.inline { display: inline; margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; min-height: 44px; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.linkbtn:hover { color: var(--rubric); }

@media (max-width: 720px) {
  .auth { padding-top: 48px; }
  .auth h1 { font-size: 40px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .masthead .wrap { padding-top: 16px; padding-bottom: 16px; }
  .brand { font-size: 22px; }
  .nav { gap: 6px 18px; }
  .hero { padding-top: 40px; padding-bottom: 56px; gap: 40px; }
  .section { padding-top: 64px; }
  .section-head h2 { font-size: 36px; }
  .page-title { font-size: 44px; }
  .buy-head h1 { font-size: 40px; }
  .panel { padding: 32px 24px; }
  .trow { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .trow .tag, .trow > span:empty { display: none; }
  .formats { margin-left: 0; }
  .grid-3, .formats, .details .wrap { grid-template-columns: minmax(0, 1fr); }
  .edition { gap: 40px; }
}

/* Legal pages */
.prose { max-width: 760px; padding-top: 64px; display: flex; flex-direction: column; gap: 14px; }
.prose h1 { font-size: 56px; line-height: 1.05; }
.prose h2 { font-size: 30px; margin-top: 22px; }
.prose p, .prose li { font-size: 17px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; }
.prose .facts { margin-top: 6px; }
.ptable { width: 100%; border-collapse: collapse; font-size: 15px; }
.ptable th { text-align: left; font: 600 12px var(--ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--ink); }
.ptable td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
@media (max-width: 720px) {
  .prose h1 { font-size: 40px; }
  .ptable thead { display: none; }
  .ptable tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .ptable td { display: block; border: 0; padding: 2px 0; }
  .ptable td:first-child { font-weight: 600; }
}
