:root {
  color-scheme: light;
  --ink: #261e22;
  --muted: #62565c;
  --wine: #531326;
  --accent: #8f2140;
  --line: #e9dce0;
  --paper: #fdfafb;
  --blush: #f9edf1;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; background: var(--paper); color: var(--ink); }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--wine); }
a:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid #137d83; outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { letter-spacing: -.035em; line-height: 1.05; }
h2 { font-size: clamp(1.85rem, 3vw, 2.65rem); margin-bottom: .9rem; color: var(--wine); }
h3 { font-size: 1.14rem; line-height: 1.3; }
.shell { width: min(100% - 2.5rem, 71rem); margin-inline: auto; }
.skip { position: fixed; z-index: 2; top: .5rem; left: .5rem; padding: .6rem; background: white; transform: translateY(-200%); }
.skip:focus { transform: none; }
.masthead { border-bottom: 1px solid var(--line); background: #fff; }
.masthead-inner { min-height: 4rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.brand, .masthead nav a { text-decoration: none; color: var(--wine); }
.brand { font-weight: 760; display: flex; gap: .55rem; align-items: center; }
.brand-icon { display: grid; place-items: center; background: var(--wine); color: white; width: 1.7rem; height: 1.7rem; border-radius: .4rem; font-size: 1.22rem; }
.masthead nav { display: flex; gap: clamp(.65rem, 3vw, 1.7rem); font-size: .9rem; font-weight: 620; }
.masthead nav a:hover { text-decoration: underline; }
.hero { position: relative; overflow: hidden; isolation: isolate; margin-top: 1.5rem; padding: clamp(1.45rem, 5vw, 3.75rem); border-radius: 1.4rem; background: #5e172d; color: white; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { margin-bottom: .9rem; font-size: .88rem; font-weight: 760; letter-spacing: .095em; text-transform: uppercase; }
.hero .eyebrow { color: #f6c1ce; }
.hero h1 { margin: 0 0 1rem; font-size: clamp(3.1rem, 7.5vw, 6.5rem); font-weight: 720; line-height: .95; letter-spacing: -.065em; }
.lede { max-width: 36rem; font-size: clamp(1rem, 2vw, 1.18rem); }
.author { font-weight: 700; margin-bottom: 0; }
.author span { color: #f4d4dd; font-weight: 460; }
.hero-mark { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-mark div { position: absolute; top: -24%; right: 5%; width: 38%; aspect-ratio: 1; transform: rotate(-45deg); border-radius: 50% 50% 50% 7%; border: 1px solid #ffffff35; background: linear-gradient(140deg, #cb476573, #8b244934); box-shadow: 0 0 0 2.5rem #ffffff08, 0 0 0 5rem #ffffff08; }
.quick { display: grid; grid-template-columns: 1.35fr 1fr; gap: .75rem; margin-top: 1rem; }
.emergency { min-height: 4.5rem; display: flex; align-items: center; gap: .85rem; border-radius: .75rem; padding: .7rem 1rem; background: var(--blush); border: 1px solid #efcfda; color: var(--wine); text-decoration: none; }
.emergency:hover { background: #f6e1e8; }
.emergency strong, .emergency small { display: block; }
.emergency small { font-size: .9rem; }
.emergency.secondary { background: white; border-color: var(--line); }
.emergency.secondary:hover { background: var(--blush); }
.urgent-mark { flex: 0 0 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: white; font-weight: 800; display: grid; place-items: center; }
.catalog, .library, .share { margin: 2.35rem 0; }
.catalog-head { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-end; margin-bottom: 1.2rem; }
.catalog-head h2 { margin: 0; }
.search { width: min(100%, 23rem); }
.search label { display: block; font-size: .88rem; color: var(--muted); font-weight: 650; margin-bottom: .25rem; }
.search input { width: 100%; font: inherit; border: 1px solid #cdbac1; border-radius: .6rem; background: white; padding: .65rem .75rem; color: var(--ink); }
.search-status { color: var(--muted); }
.categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.category { border: 1px solid var(--line); background: white; border-radius: .85rem; padding: 1.15rem; }
.category h3 { color: var(--wine); font-size: 1.42rem; margin-bottom: .2rem; }
.category p { color: var(--muted); margin-bottom: .65rem; }
.category ul { list-style: none; margin: 0; padding: 0; }
.category li { border-top: 1px solid var(--line); }
.category li a { min-height: 2.8rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); padding: .4rem .15rem; }
.category li a:hover { color: var(--accent); text-decoration: underline; }
.category li span { color: var(--accent); font-size: 1.35rem; }
.library, .share { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.7rem; }
.library .eyebrow { color: var(--accent); }
.book-index { background: var(--blush); border-radius: .85rem; padding: 1.2rem; }
.book-index dl { margin: 0; }
.book-index dl div { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem 0; border-top: 1px solid #ead5dd; }
.book-index dd { white-space: nowrap; margin: 0; color: var(--wine); }
.share { grid-template-columns: 1fr auto; }
.share img { border: 1px solid var(--line); border-radius: .6rem; }
.downloads { display: flex; flex-wrap: wrap; gap: .5rem; }
.button { display: inline-block; padding: .5rem .75rem; background: white; border: 1px solid #d9c0ca; border-radius: .55rem; color: var(--wine); text-decoration: none; font-weight: 650; }
.button:hover { background: var(--blush); }
.reading { margin-block: 1.3rem; }
.reading:has(> article:target) > article:not(:target) { display: none; }
.fiche { width: min(100%, 55rem); margin: 0 auto 1.5rem; padding: clamp(1rem, 3.8vw, 2.3rem); background: white; border: 1px solid var(--line); border-radius: .95rem; overflow-wrap: anywhere; }
.fiche header { border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.fiche .eyebrow, .refs { color: var(--accent); }
.fiche h3 { margin: 1.25rem 0 .32rem; color: var(--wine); }
.callout { border-left: .25rem solid var(--accent); border-radius: .25rem; background: var(--blush); padding: .85rem 1rem; }
.table-scroll { overflow-x: auto; margin: 1rem 0; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { border: 1px solid var(--line); padding: .55rem .65rem; vertical-align: top; overflow-wrap: normal; }
th { background: var(--blush); color: var(--wine); }
tbody tr:nth-child(even) { background: var(--paper); }
.refs { font-size: .9rem; }
.fiche-nav { display: flex; gap: .55rem 1.6rem; justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: .85rem; font-weight: 650; }
footer { border-top: 1px solid var(--line); padding: 1.15rem 0 1.5rem; color: var(--muted); font-size: .9rem; }
footer p { margin-bottom: .4rem; }
@media (max-width: 42rem) {
  .shell { width: calc(100% - 1.5rem); }
  .hero { margin-top: .85rem; }
  .hero-mark div { width: 62%; right: -15%; top: -8%; }
  .author span { display: block; }
  .quick, .categories, .library { grid-template-columns: 1fr; }
  .catalog-head { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  .share { gap: .8rem; }
  .share img { width: 6rem; height: 6rem; }
  table { min-width: 27rem; }
}
@media (max-width: 23rem) {
  .brand { font-size: .9rem; gap: .3rem; }
  .masthead nav { gap: .5rem; }
  .share { grid-template-columns: 1fr; }
}
@media print {
  .masthead, .hero, .quick, [data-directory], .fiche-nav, .skip { display: none; }
  .shell { width: 100%; }
  .fiche { border: 0; padding: .25rem; }
  .table-scroll { overflow: visible; }
  th, td { font-size: 10pt; }
  tr { break-inside: avoid; }
}
