:root {
  color-scheme: dark;
  --page: #080c13;
  --card: #121c2c;
  --border: #34465e;
  --ink: #e9f0fb;
  --muted: #aebed4;
  --link: #b8d7ff;
  --selected: #ffd68c;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--ink); font: 1rem/1.5 system-ui, sans-serif; }
main { width: min(100% - 2rem, 70rem); margin: 1.3rem auto 3rem; }
h1, h2 { font-family: Georgia, serif; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin: 1.55rem 0 .8rem; font-weight: 500; }
h2 { font-size: 1.55rem; margin: 1.2rem 0 .8rem; }
a { color: var(--link); text-underline-offset: .17em; }
nav, .examples, .controls, form { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem 1rem; }
.views { margin-top: 1.2rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.views a[aria-current] { color: var(--ink); text-decoration-color: #79adf3; text-decoration-thickness: 2px; }
label { display: grid; gap: .3rem; }
.checkbox { display: flex; gap: .4rem; align-items: center; min-height: 2.6rem; }
input, select, button { font: inherit; color: inherit; }
input, select, button { border: 1px solid var(--border); border-radius: .35rem; background: var(--card); padding: .42rem .63rem; min-height: 2.6rem; }
input[type='checkbox'] { min-height: auto; }
input[type='search'] { width: min(100%, 23rem); }
button { cursor: pointer; }
button[type='submit'] { background: var(--link); color: #0d213b; font-weight: 600; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--selected); outline-offset: 2px; }
details { border: 1px solid var(--border); border-radius: .45rem; padding: .55rem .75rem; margin: .65rem 0; }
summary { cursor: pointer; }
#form-table, #book-table, #neighbor-table { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: start; margin-top: .6rem; }
th, td { border-bottom: 1px solid var(--border); padding: .48rem .55rem; text-align: start; }
th:last-child, td:last-child { text-align: end; }
#form-table button { padding: .26rem .48rem; min-height: 2rem; }
ol { padding-inline-start: 1.7rem; }
li { padding: .58rem .75rem; border-bottom: 1px solid var(--border); }
.kwic-line { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: .7rem; align-items: baseline; margin: .4rem 0; font: 1.16rem/1.6 Georgia, serif; }
.kwic-line .before { text-align: end; }
.kwic-line .after { text-align: start; }
.kwic-line a, mark { background: var(--link); color: #102541; border-radius: .2rem; padding-inline: .18em; }
.source-location { display: flex; flex-wrap: wrap; gap: .3rem .8rem; }
.tag, footer { color: var(--muted); font-size: .9rem; }
.swete-text { font: 1.22rem/1.65 Georgia, serif; overflow-wrap: anywhere; }
.focused-hit { outline: 2px solid var(--selected); border-radius: .25rem; }
footer { margin-top: 1.6rem; }
@media (max-width: 34rem) {
  main { width: calc(100% - 1.25rem); }
  .kwic-line { display: block; }
  .kwic-line a { margin-inline: .2em; }
  .kwic-line span { white-space: normal; }
  #swete-form label:has(input[type='search']) { width: 100%; }
  #swete-form input[type='search'] { width: 100%; }
}
