:root {
  color-scheme: light dark;
  --page: #faf9f6;
  --text: #201f21;
  --muted: #5e5a59;
  --rule: #d8d4ce;
  --accent: #294fc3;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 1.2rem; }
body { margin: 0; background: var(--page); color: var(--text); font: 1rem/1.6 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.bar, main, footer { width: min(1200px, 90%); margin-inline: auto; }
.bar, footer, nav, .section-head, .card-info, .app-call { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.bar { min-height: 78px; border-bottom: 1px solid var(--rule); }
.logo { font-size: 1.85rem; font-weight: 800; letter-spacing: -.075em; text-decoration: none; line-height: 1.1; }
.logo span, .library-intro h1 span { color: var(--accent); }
nav, .crumb, .note, .edition, .card-info p, .section-head p, label { font-size: .875rem; }
nav a { font-weight: 600; text-decoration: none; padding-block: .65rem; }
a { color: inherit; text-underline-offset: .22em; }
nav a:hover, .card a:hover h3, .feature:hover b { text-decoration: underline; }
a:focus-visible, summary:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip { position: absolute; top: -6rem; left: 2rem; background: #fff; padding: 1rem; z-index: 10; }
.skip:focus { top: .5rem; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.09; text-wrap: balance; }
h1 { font-size: clamp(3rem, 6.7vw, 6.1rem); font-weight: 670; letter-spacing: -.065em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); letter-spacing: -.045em; font-weight: 650; }
h3 { font-size: 1.35rem; font-weight: 650; letter-spacing: -.035em; }
.library-intro, .family, .app-hero { display: grid; grid-template-columns: .94fr 1.1fr; align-items: center; gap: clamp(1.75rem, 5vw, 5.5rem); padding: clamp(2.2rem, 5.8vw, 5.3rem) 0; }
.lead { max-width: 57ch; font-size: clamp(1.04rem, 1.4vw, 1.2rem); margin: 1.2rem 0 1.5rem; color: var(--muted); }
.button, .app-call > a { display: inline-flex; align-items: center; gap: .85rem; border-radius: 9px; padding: .75rem 1.1rem; background: var(--text); color: white; font-weight: 650; text-decoration: none; }
.button:hover, .app-call > a:hover { background: #3b3840; }
.button span { margin-left: .4rem; }
.feature { overflow: hidden; display: block; border-radius: 18px; background: #f4d5bf; color: #513423; text-decoration: none; }
.feature img, .family-art, .card img { width: 100%; height: auto; display: block; }
.feature img { aspect-ratio: 2 / 1; object-fit: cover; }
.feature > span { padding: .85rem 1.4rem; border-top: 1px solid #51342333; display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.section-head { flex-wrap: wrap; padding: 1.35rem 0; border-top: 1px solid var(--rule); gap: .6rem; }
.section-head p, label, .card-info p, .note, .crumb, .related span { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.7rem 1.2rem; }
.card a { display: block; text-decoration: none; }
.card img, .family-art { border-radius: 13px; }
.card-info { align-items: baseline; margin: .8rem .1rem 0; gap: .5rem; }
.card-info p { margin: .25rem 0 0; }
.card-info span { color: var(--muted); font-size: 1.2rem; }
.crumb { margin: 1.3rem 0 0; }
.family { padding-top: 2rem; }
.family h1 { font-size: clamp(2.8rem, 5vw, 5rem); }
.kicker, .edition { color: var(--muted); font-weight: 600; }
.kicker { margin-bottom: .7rem; }
.edition { margin: 0 0 .8rem; }
.note { margin-top: .65rem; }
.tester { padding-block: .2rem; }
.tester textarea { display: block; width: 100%; border: 1px solid var(--rule); border-radius: 12px; padding: .45em .48em; background: var(--paper); color: var(--ink); resize: vertical; min-height: 2.6em; font: normal clamp(2.1rem, 5.6vw, 5rem)/1.55 Specimen, serif; }
.alphabet, .scripts { font: normal clamp(1.7rem, 3.5vw, 3.25rem)/1.5 Specimen, serif; overflow-wrap: anywhere; margin-top: .65rem; }
.scripts { margin-top: 0; }
.columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2.5rem; margin: 3.5rem 0 1.75rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.columns h2, .related h2, .app-call h2 { font-size: 1.55rem; }
.columns p, .app-call p { margin: .7rem 0; max-width: 65ch; color: var(--muted); }
summary { cursor: pointer; font-weight: 600; padding-block: .45rem; }
.app-call { padding: 1.6rem 1.8rem; background: #e9eafa; border-radius: 13px; flex-wrap: wrap; }
.app-call p { margin-bottom: 0; }
.related { margin-top: 2rem; }
.related ul, .columns ul { padding-left: 1.1rem; }
footer { margin-top: 3.5rem; border-top: 1px solid var(--rule); padding: 1.5rem 0 2rem; flex-wrap: wrap; }
footer .logo { font-size: 1.4rem; }
.app-hero { grid-template-columns: auto 1fr; max-width: 900px; }
.app-hero img { border-radius: 22%; }
@media(max-width: 850px) {
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .library-intro, .family { grid-template-columns: 1fr 1fr; gap: 1.8rem; }
}
@media(max-width: 640px) {
  .bar, main, footer { width: calc(100% - 2.25rem); }
  .bar { min-height: 65px; }
  nav { gap: .9rem; flex-wrap: wrap; }
  .library-intro, .family, .columns, .app-hero { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .library-intro br { display: none; }
  .library-intro h1 br::after { content: " "; }
  .library-intro { padding-top: 2.8rem; }
  .columns { margin-top: 2rem; gap: 1.5rem; }
  .app-call { padding: 1.2rem; gap: 1rem; }
  .app-hero img { width: 90px; height: 90px; }
}

@media screen and (prefers-color-scheme: dark) {
  :root {
    --page: #16191e; --text: #edf0f4; --muted: #b9bfc9;
    --rule: #434a56; --accent: #a4beff;
  }
  html, .skip { background: var(--page) }
  .button, .app-call > a { background: #d4e0f1; color: var(--page) }
  .button:hover, .app-call > a:hover { background: #edf1f9 }
  .app-call { background: #262b3b }
}
