/* Mid the English: the Old English Seafarer, word by word, against Pound's English and two literal translations. */
:root {
  --bg: #f2eee6; --panel: #e9e3d8; --ink: #1c1d1f; --dim: #5d6166; --faint: #8b8f94; --rule: #cfc7b9;
  --sea: #2b5870; --accent: #8a5a12;
  --kept: #1f7a68; --kin: #3c8f86; --drift: #a8660b; --trans: #4f6378; --miss: #b23a2a; --moot: #6b4fa8; --drop: #9aa0a6;
  --kept-bg: #d5ece6; --kin-bg: #dbeeec; --drift-bg: #f5e3c6; --trans-bg: #e1e6ec; --miss-bg: #f4d8d3; --moot-bg: #e6def4;
  --mono: "Martian Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Fraunces", "Fraunces Fallback", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1418; --panel: #141e24; --ink: #e4eaed; --dim: #a3b0b8; --faint: #6f7d86; --rule: #26343c;
    --sea: #8fc1d4; --accent: #e7b45a;
    --kept: #6fd3bd; --kin: #8fd0c9; --drift: #f0b44c; --trans: #a9bccf; --miss: #ff8a75; --moot: #c3a8f5; --drop: #6f7d86;
    --kept-bg: #123a33; --kin-bg: #163834; --drift-bg: #3d2c0f; --trans-bg: #1d2a36; --miss-bg: #3f1d18; --moot-bg: #2a2140;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1418; --panel: #141e24; --ink: #e4eaed; --dim: #a3b0b8; --faint: #6f7d86; --rule: #26343c;
  --sea: #8fc1d4; --accent: #e7b45a;
  --kept: #6fd3bd; --kin: #8fd0c9; --drift: #f0b44c; --trans: #a9bccf; --miss: #ff8a75; --moot: #c3a8f5; --drop: #6f7d86;
  --kept-bg: #123a33; --kin-bg: #163834; --drift-bg: #3d2c0f; --trans-bg: #1d2a36; --miss-bg: #3f1d18; --moot-bg: #2a2140;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--serif); font-size: 1.06rem; line-height: 1.6; }
main { max-width: 50rem; margin: 0 auto; padding: 3.5rem 1rem 5rem; }
a { color: var(--sea); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kicker, .eyebrow, .label { font: 600 .72rem/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
h1 { font-size: clamp(2.6rem, 9vw, 4.6rem); line-height: 1; margin: .4rem 0 1.4rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 4vw, 1.9rem); line-height: 1.15; margin: 3.4rem 0 .9rem; }
h3 { font-size: 1.12rem; margin: 2rem 0 .5rem; }
.dek { font-size: 1.16rem; color: var(--ink); margin: 1.6rem 0 0; }
p { margin: .8rem 0; }
.micro { font-size: .86rem; color: var(--dim); }
.mono { font-family: var(--mono); font-size: .86em; }
code { font-family: var(--mono); font-size: .84em; background: var(--panel); padding: .05em .3em; border-radius: .2em; overflow-wrap: anywhere; }

/* The pair at the top */
.pair { margin: 1.2rem 0 0; padding: 1.3rem 1.2rem; background: var(--panel); border-radius: .6rem; border: 1px solid var(--rule); position: relative; }
.pair p { margin: 0; font-size: clamp(1.15rem, 4.2vw, 1.55rem); line-height: 1.5; }
.pair .oe { font-style: normal; }
.pair .en { font-style: italic; color: var(--dim); margin-top: .9rem; }
.pair .src { display: block; font: .68rem/1.4 var(--mono); letter-spacing: .04em; color: var(--faint); font-style: normal; margin-top: .2rem; }
.pair .hot { font: inherit; color: inherit; background: none; border: 0; padding: 0 .1em; border-bottom: 2px solid var(--miss); cursor: pointer; }
.pair .hot.en-w { color: var(--ink); }
.pair .note { margin-top: 1rem; font-size: .95rem; color: var(--ink); border-top: 1px dashed var(--rule); padding-top: .8rem; }
.pair .note[hidden] { display: none; }

/* Class swatches and chips */
.c-kept { --c: var(--kept); --cb: var(--kept-bg); }
.c-kept-kin { --c: var(--kin); --cb: var(--kin-bg); }
.c-drifted { --c: var(--drift); --cb: var(--drift-bg); }
.c-translated { --c: var(--trans); --cb: var(--trans-bg); }
.c-missed { --c: var(--miss); --cb: var(--miss-bg); }
.c-moot { --c: var(--moot); --cb: var(--moot-bg); }
.c-dropped { --c: var(--drop); --cb: transparent; }
.c-other-text { --c: var(--faint); --cb: transparent; }
.chip { display: inline-flex; align-items: center; gap: .35em; font: 600 .7rem/1.3 var(--mono); letter-spacing: .03em; padding: .28em .55em; border-radius: 99px; border: 1px solid var(--c, var(--rule)); color: var(--c, var(--ink)); background: var(--cb, transparent); white-space: nowrap; }
.chip .sw { width: .62em; height: .62em; border-radius: 2px; background: var(--c); display: inline-block; }
.chip.c-dropped { border-style: dashed; }

/* The instrument */
.instrument { margin: 1.6rem -1rem 0; padding: 1rem; background: var(--panel); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
@media (min-width: 52rem) { .instrument { margin-left: -2rem; margin-right: -2rem; padding: 1.2rem 2rem; border-radius: .6rem; border: 1px solid var(--rule); } }
.controls { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: .45rem; overflow: hidden; }
.seg button { font: 600 .74rem/1.2 var(--mono); padding: .55em .8em; background: transparent; color: var(--dim); border: 0; border-right: 1px solid var(--rule); cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.filters { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .7rem; }
.filters button { cursor: pointer; }
.filters button[aria-pressed="false"] { opacity: .45; }
.legend-line { font-size: .86rem; color: var(--dim); margin: .7rem 0 0; }

.poem { margin-top: 1rem; max-height: 72vh; overflow-y: auto; padding-right: .3rem; scrollbar-width: thin; }
.blk { display: grid; grid-template-columns: 2.4rem 1fr; gap: .1rem .6rem; padding: .55rem 0; border-bottom: 1px solid var(--rule); }
.blk:last-child { border-bottom: 0; }
.ln { font: .68rem/2 var(--mono); color: var(--faint); text-align: right; }
.oeline { font-size: 1.04rem; line-height: 1.75; }
.oeline .half { margin-right: 1.6em; white-space: normal; }
.w { font: inherit; color: var(--faint); background: none; border: 0; padding: 0 .06em; margin: 0; cursor: default; border-radius: .2em; }
.w.u { color: var(--ink); cursor: pointer; border-bottom: 2px solid var(--c, var(--rule)); background: color-mix(in srgb, var(--cb, transparent) 75%, transparent); }
.w.u.c-dropped { border-bottom-style: dashed; color: var(--dim); background: none; }
.w.u.c-other-text { border-bottom-style: dotted; color: var(--dim); background: none; }
.chip.c-other-text { border-style: dotted; }
.w.u.dim { opacity: .28; }
.w.u.alike::after { content: "≈"; font: 700 .64em/1 var(--mono); color: var(--accent); vertical-align: super; margin-left: .05em; }
.w.u[aria-pressed="true"], .tw[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 1px; }
.sep { color: var(--faint); }
.trl { grid-column: 2; font-style: italic; color: var(--dim); font-size: .98rem; line-height: 1.6; }
.trl .tl { display: block; }
.trl .tid { font: normal .62rem/1 var(--mono); color: var(--faint); margin-right: .45em; font-style: normal; }
.tw { font: inherit; font-style: italic; color: var(--ink); background: color-mix(in srgb, var(--cb, transparent) 80%, transparent); border: 0; border-bottom: 2px solid var(--c); padding: 0 .08em; cursor: pointer; border-radius: .15em; }
.tw.dim { opacity: .3; }
.trl .none { font-style: normal; font-family: var(--mono); font-size: .72rem; color: var(--faint); }
.blk.ending .oeline { color: var(--dim); }

.card { margin-top: .9rem; padding: .9rem 1rem; background: var(--bg); border: 1px solid var(--rule); border-radius: .5rem; min-height: 5rem; }
.card h3 { margin: 0 0 .3rem; font-size: 1.25rem; }
.card .lemma { font: .74rem/1.5 var(--mono); color: var(--dim); }
.card .rows { display: grid; gap: .7rem; margin-top: .8rem; }
.card .row { border-left: 3px solid var(--c, var(--rule)); padding: .1rem 0 .1rem .7rem; }
.card .row .who { font: 600 .68rem/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.card .row .said { font-style: italic; margin: .15rem 0; }
.card .row .why { font-size: .9rem; color: var(--dim); margin: .25rem 0 0; }
.card .row .snd { font: .7rem/1.4 var(--mono); color: var(--faint); }
.card .empty { color: var(--dim); font-size: .95rem; }
@media (min-width: 64rem) {
  .instrument.wide { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 0 1.4rem; align-items: start; }
  .instrument.wide .controls, .instrument.wide .filters, .instrument.wide .legend-line { grid-column: 1 / -1; }
  .instrument.wide .card { position: sticky; top: 1rem; margin-top: 1rem; max-height: 72vh; overflow-y: auto; }
}

/* The count */
.bars { display: grid; gap: .9rem; margin: 1.2rem 0; }
.bar .who { font: 600 .74rem/1.4 var(--mono); color: var(--dim); display: flex; justify-content: space-between; gap: 1rem; }
.bar .track { display: flex; height: 1.7rem; border-radius: .35rem; overflow: hidden; border: 1px solid var(--rule); margin-top: .3rem; }
.bar .seg-c { background: var(--c); min-width: 0; position: relative; }
.bar .seg-c.c-dropped { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--drop) 5px 6px); }
.bar .seg-c span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 .66rem/1 var(--mono); color: var(--bg); white-space: nowrap; overflow: hidden; }
.bar .seg-c.c-dropped span { color: var(--ink); }
table.t { border-collapse: collapse; width: 100%; font-size: .9rem; margin: 1rem 0; }
table.t th, table.t td { padding: .4rem .5rem; border-bottom: 1px solid var(--rule); text-align: right; vertical-align: top; }
table.t th:first-child, table.t td:first-child { text-align: left; }
table.t th { font: 600 .68rem/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.tablewrap { overflow-x: auto; }

.big { font-size: clamp(1.25rem, 3.6vw, 1.5rem); line-height: 1.4; }
.figure { margin: 1.4rem 0; }
.figure svg { width: 100%; height: auto; display: block; }
.figure figcaption { font-size: .86rem; color: var(--dim); margin-top: .4rem; }

/* The list of departures */
.deps { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .8rem; }
.deps li { border: 1px solid var(--rule); border-left: 4px solid var(--c); border-radius: .4rem; padding: .7rem .9rem; background: var(--panel); }
.deps .pr { font-size: 1.08rem; }
.deps .pr b { font-weight: 700; }
.deps .pr i { color: var(--ink); }
.deps .ln2 { font: .68rem/1.4 var(--mono); color: var(--faint); }
.deps .gl { font-size: .9rem; color: var(--dim); margin: .3rem 0 0; }

.box { border: 1px solid var(--rule); border-radius: .6rem; padding: 1rem 1.1rem; background: var(--panel); margin: 1.4rem 0; }
.box h3 { margin-top: 0; }
blockquote { margin: 1rem 0; padding: .2rem 0 .2rem 1rem; border-left: 3px solid var(--rule); color: var(--dim); }
ul.plain { padding-left: 1.1rem; }
ul.plain li { margin: .35rem 0; }
.ending-lines { font-size: .98rem; color: var(--dim); columns: 2 18rem; column-gap: 2rem; }
.ending-lines p { margin: 0 0 .25rem; break-inside: avoid; }
.ending-lines .n { font: .64rem/1 var(--mono); color: var(--faint); margin-right: .5em; }

@media (prefers-reduced-motion: no-preference) { .w.u, .tw { transition: opacity .15s ease, background-color .15s ease; } }
@media (max-width: 30rem) { .blk { grid-template-columns: 1.9rem 1fr; } .oeline { font-size: .99rem; } .pair { padding: 1rem .9rem; } }

/* The staves, line by line */
.stavestrip { display: flex; flex-wrap: wrap; gap: 3px; margin: 1.1rem 0 .4rem; }
.stavestrip .sc { width: 1.65rem; height: 1.65rem; display: inline-flex; align-items: center; justify-content: center; font: 600 .66rem/1 var(--mono); color: var(--faint); border: 1px solid var(--rule); border-radius: .25rem; background: transparent; }
.stavestrip .sc.kept { background: var(--sea); border-color: var(--sea); color: var(--bg); }
.stave-key { font-size: .86rem; color: var(--dim); }
.stave-key .sw { display: inline-block; width: .8em; height: .8em; border-radius: 2px; vertical-align: -.05em; margin: 0 .3em 0 .1em; border: 1px solid var(--rule); }
.stave-key .sw.kept { background: var(--sea); border-color: var(--sea); }

/* Who singled a word out before */
.deps .gl.named { color: var(--ink); font-size: .86rem; }
table.t.echoes td, table.t.echoes th { text-align: left; }
.lede-num { font-weight: 700; }
