:root { color-scheme: light dark; font: 17px/1.5 system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: #f5f6f8; color: #182735; }
header, main { max-width: 1000px; margin: auto; padding: 1.2rem; }
header { display: flex; justify-content: space-between; border-bottom: 1px solid #c6ced6; }
a { color: #175a8a; }
.brand { font-weight: 750; text-decoration: none; }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin-bottom: 1rem; }
h2 { font-size: 1.35rem; }
.intro { max-width: 44rem; }
.notice { padding: 1rem; border-left: 4px solid #b77718; background: #fff4da; }
form { display: grid; gap: .55rem; }
#limit-controls:not([hidden]) { display: grid; gap: .55rem; }
input, select, textarea, button { font: inherit; border: 1px solid #8295a5; border-radius: .3rem; padding: .6rem .8rem; }
textarea { width: 100%; resize: vertical; }
button { cursor: pointer; background: #e7edf3; color: #182735; }
button:hover { background: #d1e1ee; }
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #bc710e; outline-offset: 3px; }
#submit, #text-submit { justify-self: start; background: #175a8a; color: white; }
.comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.marked-text { white-space: pre-wrap; overflow-wrap: anywhere; padding: 1rem; background: white; border: 1px solid #c6ced6; border-radius: .3rem; }
.hit { padding: 0 .1rem; border-radius: .15rem; border: 0; color: inherit; font: inherit; }
.exact-hit { background: #ffe4a8; color: #382700; }
.lemma-hit { background: #c3e7f9; color: #12344a; }
.hypothesis-hit { background: #eee0fa; color: #42245a; border-bottom: 2px dashed #795291; }
.hit:hover { filter: brightness(.93); }
#explorer { margin-top: 2rem; border-top: 1px solid #c6ced6; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1rem 0; }
.examples button { font-size: .9rem; }
.card { border: 1px solid #c6ced6; background: white; padding: 1rem; border-radius: .3rem; margin: .8rem 0; }
.card p { margin: .35rem 0; overflow-wrap: anywhere; }
.card button { margin: .4rem .4rem 0 0; }
.tag { color: #52697b; font-size: .9rem; }
.warning { color: #854f00; font-weight: 650; }
pre { max-height: 32rem; overflow: auto; background: #142331; color: #ecf1f5; padding: 1rem; font: .85rem/1.5 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
summary { cursor: pointer; padding: .6rem 0; }
footer { font-size: .8rem; color: #52697b; border-top: 1px solid #c6ced6; margin-top: 2rem; padding-top: 1rem; overflow-wrap: anywhere; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem; border-bottom: 1px solid #c6ced6; vertical-align: top; }
code { overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) {
  body { background: #101a22; color: #e3edf4; }
  a { color: #83c6f5; }
  .card { background: #192a38; }
  .marked-text { background: #192a38; }
  .notice { background: #30291b; }
  .warning { color: #ffca7e; }
  .tag, footer { color: #b4c7d5; }
}
@media (max-width: 700px) { .comparison { grid-template-columns: 1fr; } }
