:root {
  color-scheme: dark;
  --ink: #07111f;
  --panel-solid: #10263c;
  --line: rgba(172, 205, 224, 0.19);
  --line-strong: rgba(172, 205, 224, 0.38);
  --text: #f4f8fb;
  --muted: #a9bdca;
  --cyan: #61e5e2;
  --cyan-deep: #0f7f86;
  --gold: #f1c45b;
  --green: #8be0a8;
  --violet: #c4b3ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius: 1.1rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 18rem;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 7%, rgba(38, 140, 150, 0.22), transparent 28rem),
    radial-gradient(circle at 88% 22%, rgba(96, 81, 166, 0.16), transparent 30rem),
    linear-gradient(180deg, #07111f 0%, #091827 58%, #07111f 100%);
  line-height: 1.55;
}
a { color: inherit; text-underline-offset: 0.22em; }
a:hover { color: var(--cyan); }
button, input, select { font: inherit; }
.skip-link { position: fixed; z-index: 20; top: .75rem; left: .75rem; padding: .7rem 1rem; color: var(--ink); background: var(--cyan); border-radius: .45rem; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; width: min(90rem, calc(100% - 2rem)); margin: 0 auto; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .75rem; font-weight: 760; text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; color: var(--ink); background: var(--cyan); border-radius: 50%; font-family: Georgia, serif; font-size: 1.25rem; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 1.15rem; }
.site-header nav a, .footer-links a { color: var(--muted); font-size: .9rem; text-decoration: none; }
main, footer { width: min(90rem, calc(100% - 2rem)); margin-inline: auto; }
.chooser { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(18rem, .92fr) minmax(14rem, .58fr); gap: 1.25rem; align-items: stretch; padding: clamp(2.5rem, 6vw, 5.8rem) 0 2.6rem; }
.intro { max-width: 47rem; }
.eyebrow { margin: 0 0 .7rem; color: var(--cyan); font-size: .77rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 540; letter-spacing: -0.035em; }
h1 { max-width: 14ch; margin-bottom: 1rem; font-size: clamp(2.5rem, 5.5vw, 5.2rem); line-height: .98; }
h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.04; }
h3 { line-height: 1.2; }
.lede { max-width: 43rem; margin-bottom: 0; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.18rem); }
.language-picker, .scope-note { align-self: end; min-height: 12.5rem; padding: 1.35rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: linear-gradient(145deg, rgba(22, 52, 78, .86), rgba(9, 25, 42, .92)); box-shadow: var(--shadow); }
.language-picker { display: flex; flex-direction: column; justify-content: center; }
.language-picker label { margin-bottom: .6rem; font-weight: 740; }
.select-wrap { position: relative; }
.select-wrap select { width: 100%; min-height: 3.25rem; appearance: none; padding: .7rem 2.8rem .7rem .9rem; color: var(--text); background: #081524; border: 1px solid var(--line-strong); border-radius: .65rem; }
.select-wrap > span { position: absolute; top: 50%; right: 1rem; color: var(--cyan); transform: translateY(-50%); pointer-events: none; }
#picker-help { margin: .65rem 0 0; color: var(--muted); font-size: .82rem; }
.scope-note { display: flex; flex-direction: column; justify-content: space-between; }
.scope-note p { margin: 1rem 0 0; color: var(--muted); }
.scope-note strong { color: var(--text); }
.scope-symbol { color: var(--gold); font-family: Georgia, serif; font-size: 3.45rem; line-height: 1; }
.catalogue { padding: 4rem 0 5rem; }
.catalogue-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.catalogue-summary { max-width: 27rem; margin: 0; color: var(--muted); text-align: right; }
.controls { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1.25rem 0; }
.search-control { display: grid; gap: .35rem; width: min(100%, 27rem); color: var(--muted); font-size: .8rem; font-weight: 700; }
.search-control input { min-height: 2.8rem; padding: .6rem .85rem; color: var(--text); background: rgba(7, 17, 31, .7); border: 1px solid var(--line-strong); border-radius: .65rem; }
.filter-group { display: flex; flex-wrap: wrap; gap: .45rem; }
.filter, #clear-filters { min-height: 2.55rem; padding: .55rem .85rem; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.filter:hover, .filter.active, #clear-filters:hover { color: var(--ink); background: var(--cyan); border-color: var(--cyan); }
.edition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.edition-card { position: relative; display: flex; min-height: 24rem; flex-direction: column; padding: 1.25rem; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(155deg, rgba(16, 38, 60, .96), rgba(8, 23, 39, .96)); box-shadow: 0 12px 35px rgba(0, 0, 0, .18); scroll-margin-top: 1rem; transition: transform 160ms ease, border-color 160ms ease; }
.edition-card[hidden] { display: none; }
.edition-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.edition-card:target, .edition-card.focused { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(97, 229, 226, .15); }
.edition-card::after { content: attr(data-script); position: absolute; right: -.3rem; bottom: -1.55rem; color: rgba(150, 195, 216, .055); font-family: Georgia, serif; font-size: 7rem; line-height: 1; pointer-events: none; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-bottom: 1.2rem; }
.language-tag { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .75rem; }
.status-badge { padding: .28rem .52rem; border: 1px solid currentColor; border-radius: 999px; font-size: .69rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.status-complete { color: var(--green); }
.status-partial { color: var(--cyan); }
.status-source { color: var(--gold); }
.native-name { min-height: 1.5em; margin: 0 0 .25rem; color: var(--cyan); font-size: 1.06rem; }
.edition-card h3 { margin-bottom: .45rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.6rem; font-weight: 540; letter-spacing: -0.025em; }
.layer { margin-bottom: .6rem; color: var(--muted); font-size: .87rem; }
.pages { margin-bottom: 1.1rem; color: var(--text); font-size: .85rem; }
.actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
.actions a { display: inline-flex; min-height: 2.45rem; align-items: center; padding: .5rem .75rem; color: var(--text); border: 1px solid var(--line-strong); border-radius: .55rem; font-size: .8rem; font-weight: 720; text-decoration: none; }
.actions a.primary { color: var(--ink); background: var(--cyan); border-color: var(--cyan); }
.actions a:hover { color: var(--ink); background: var(--gold); border-color: var(--gold); }
.edition-metadata { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .7rem; }
.edition-metadata a { color: var(--cyan); font-size: .8rem; }
.edition-card details { position: relative; z-index: 1; margin-top: .8rem; color: var(--muted); font-size: .8rem; }
.edition-card summary { cursor: pointer; color: var(--text); }
.edition-card ul { padding-left: 1.1rem; }
.edition-card details p, .edition-card details li, .edition-metadata a { overflow-wrap: anywhere; }
.empty-state { margin-top: 1rem; padding: 2rem; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(9, 26, 44, .7); }
.empty-state p { color: var(--muted); }
.method { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 7vw, 7rem); padding: 5rem 0; border-top: 1px solid var(--line); }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.method-grid article { padding: 1.1rem; border-left: 1px solid var(--line-strong); }
.method-grid article > span { color: var(--gold); font-family: ui-monospace, monospace; font-size: .8rem; }
.method-grid h3 { margin: .8rem 0 .45rem; }
.method-grid p { margin: 0; color: var(--muted); font-size: .87rem; }
.method-body { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.method-body p, .method-body li { margin: 0; color: var(--muted); font-size: .9rem; }
.method-body ul { display: grid; gap: .45rem; margin: 0; padding-left: 1.1rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: .75rem; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.table-wrap th, .table-wrap td { padding: .55rem .75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap thead th { color: var(--cyan); font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.table-wrap tbody th { color: var(--text); font-weight: 650; white-space: nowrap; }
.table-wrap td { color: var(--muted); }
.table-wrap tbody tr:last-child th, .table-wrap tbody tr:last-child td { border-bottom: 0; }
footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2rem 0 3rem; color: var(--muted); border-top: 1px solid var(--line); font-size: .82rem; }
footer p { max-width: 37rem; margin: 0; }
.footer-notes { display: grid; gap: .8rem; }
.footer-links { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.15rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
[dir="rtl"].native-name { text-align: right; }
@media (max-width: 68rem) {
  .chooser { grid-template-columns: 1.25fr 1fr; }
  .scope-note { grid-column: 1 / -1; min-height: auto; flex-direction: row; align-items: center; }
  .scope-note p { margin: 0 0 0 1rem; }
  .edition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method { grid-template-columns: 1fr; }
}
@media (max-width: 48rem) {
  .site-header, .catalogue-head, .controls, footer { align-items: flex-start; flex-direction: column; }
  .chooser { grid-template-columns: 1fr; padding-top: 3rem; }
  .language-picker, .scope-note { grid-column: auto; min-height: auto; }
  .catalogue-summary { text-align: left; }
  .search-control { width: 100%; }
  .edition-grid, .method-grid { grid-template-columns: 1fr; }
  .edition-card { min-height: 0; }
  .table-wrap tbody th { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
