:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  --ink: #152137;
  --muted: #46556a;
  --nav: #143d52;
  --teal: #00685f;
  --line: #c8d1da;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: white; line-height: 1.6; }
a { color: #12546f; text-underline-offset: .16em; }
header { background: var(--nav); color: white; }
header a { color: inherit; }
nav, main, footer { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.5rem; padding: .85rem 0; }
.brand { font-size: 1.18rem; font-weight: 750; text-decoration: none; }
.nav-tools { border-inline-start: 1px solid #839eaa; padding-inline-start: 1.5rem; }
main { padding-block: clamp(1.3rem, 4vw, 2.5rem); }
h1, h2 { line-height: 1.15; }
h1 { font-size: clamp(1.95rem, 5vw, 3rem); margin: 0 0 .35rem; letter-spacing: -.038em; }
h2 { font-size: 1.4rem; margin: 1.55rem 0 .55rem; }
p { margin: .6rem 0 1rem; }
.lead { color: var(--muted); font-size: 1.12rem; margin-block-end: 1.35rem; }
.workspace { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2.75fr); gap: 1rem; }
.panel { border: 1px solid var(--line); border-radius: 9px; padding: 1rem; min-width: 0; }
.panel h2 { margin-top: 0; }
label { display: block; font-weight: 680; margin-block: 0 .95rem; }
input, button { font: inherit; }
.citation-workspace { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.citation-workspace textarea { display: block; width: 100%; margin-top: .25rem; border: 1px solid #919faf; border-radius: 5px; padding: .45rem .55rem; resize: vertical; font: inherit; color: var(--ink); }
.citation-workspace textarea[readonly] { background: #f6f8fa; font-family: ui-monospace, monospace; font-size: .9rem; }
.citation-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.concordance-controls label[for="example"], .concordance-controls label[for="pairs"] { margin-bottom: .25rem; }
.concordance-controls select, .concordance-controls textarea { width: 100%; border: 1px solid #919faf; border-radius: 5px; padding: .4rem .55rem; color: var(--ink); font: inherit; background: white; }
.concordance-controls select { margin-bottom: .95rem; }
.concordance-controls textarea { display: block; margin-bottom: .9rem; resize: vertical; font-family: ui-monospace, monospace; }
#pairs-help { margin: 0 0 .45rem; }
#limits { overflow-wrap: anywhere; }
input { display: block; width: 100%; border: 1px solid #919faf; border-radius: 5px; padding: .35rem .55rem; margin-top: .25rem; }
button { border: 1px solid var(--nav); border-radius: 6px; background: var(--nav); color: white; font-weight: 680; padding: .55rem .8rem; cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 3px solid #008b77; outline-offset: 3px; }
canvas { display: block; width: 100%; height: clamp(220px, 34vw, 300px); }
.signal-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; list-style: none; padding: 0; margin: 0 0 .4rem; }
.signal-legend li { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .92rem; }
.signal-legend li::before { content: ""; width: 1.4rem; border-top: 2px solid var(--teal); }
.signal-legend .signal-input::before { border-color: #99521d; border-top-style: dashed; }
.signal-legend .signal-samples::before { width: .5rem; height: .5rem; border: 0; border-radius: 50%; background: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin: .5rem 0 0; text-align: center; }
.stats div { padding: .7rem .35rem .3rem; }
.stats div + div { border-inline-start: 1px solid var(--line); }
.stats dd { margin: 0; font-size: 1.35rem; font-weight: 760; font-variant-numeric: tabular-nums; }
.signal-legend ~ .stats dd { font-size: clamp(1rem, 4.5vw, 1.35rem); }
.stats dt, .muted { color: var(--muted); font-size: .92rem; }
.copy { max-width: 73ch; }
.list { padding-left: 1.25em; }
.list li { margin-bottom: .63rem; }
footer { border-top: 1px solid var(--line); padding: .9rem 0 1.4rem; color: var(--muted); }
@media (max-width: 720px) {
  .workspace { grid-template-columns: 1fr; }
  .nav-tools { padding-inline-start: .85rem; }
  nav { gap: .5rem .85rem; }
  .stats dt { font-size: .78rem; }
}
