:root {
  color-scheme: light;
  --paper: #f7f5ee;
  --ink: #172d24;
  --green: #183e32;
  --mustard: #efb94e;
  --muted: #536359;
  --line: #cccfc4;
  --serif: "Iowan Old Style", Baskerville, Georgia, serif;
  font: 16px/1.5 "Helvetica Neue", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.mast, main, footer { width: min(1250px, 92%); margin-inline: auto; }
.mast, footer, .title-bar, .tools, .controls, .tabs, .pager, .report-link, nav, .rank-line, .counts {
  display: flex; flex-wrap: wrap; align-items: center; gap: .7rem;
}
.mast, footer, .title-bar, .report-link { justify-content: space-between; }
.mast { min-height: 78px; border-bottom: 2px solid var(--ink); }
.brand { display: flex; align-items: center; gap: .55rem; font: bold 2rem var(--serif); letter-spacing: -.055em; }
.brand i { width: 25px; height: 25px; border-radius: 50%; background: repeating-radial-gradient(var(--ink) 0 2px, transparent 2px 3px); }
main { padding: 2rem 0 3rem; min-height: 75vh; }
footer { border-top: 1px solid var(--line); padding: 1.4rem 0; font-size: .83rem; color: var(--muted); }
footer span:first-child { font: bold 1.4rem var(--serif); color: var(--ink); }
h1, h2, h3, p, ol { margin: 0; }
h1, h2, h3, .figure { font-family: var(--serif); line-height: 1.08; }
h1 { font-size: clamp(2.8rem, 6vw, 5.3rem); font-weight: 500; letter-spacing: -.055em; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.4rem); font-weight: 500; letter-spacing: -.035em; }
h3 { font-size: 1.4rem; }
a { color: #24513c; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; color: var(--ink); }
button, select, input[type=search], input::file-selector-button {
  padding: .5rem .85rem; border: 1px solid #8c9c8d; border-radius: 5px; background: #fffefa;
}
button, select, input::file-selector-button, summary { cursor: pointer; }
button:hover:enabled, input::file-selector-button:hover { background: #e5ebdc; border-color: var(--ink); }
button[aria-current=page], button[aria-pressed=true], button[aria-expanded=true]:not(#replace) {
  color: white; background: var(--green); border-color: var(--green);
}
button:disabled { color: #637165; cursor: default; }
:focus-visible { outline: 3px solid #af4a17; outline-offset: 3px; }
h1:focus, main:focus { outline: none; }
.skip { position: absolute; left: 1em; top: -6rem; background: white; padding: .5em; z-index: 2; }
.skip:focus { top: 1rem; }
.cover { background: var(--green); color: #fff9e8; padding: clamp(2rem, 5vw, 5rem); display: grid;
  grid-template-columns: 1.3fr 1fr; align-items: center; gap: 1rem; overflow: hidden; position: relative; }
.cover h1 { font-size: clamp(3.2rem, 6.7vw, 6.2rem); line-height: .95; }
.cover h1 span { color: var(--mustard); }
.cover p { max-width: 32ch; margin-top: 1.5rem; font-size: 1.15rem; color: #e7eadd; }
.sleeve { width: min(100%, 370px); aspect-ratio: 1.45; position: relative; justify-self: center; transform: rotate(-8deg); }
.vinyl { position: absolute; inset: 4% 0 4% auto; aspect-ratio: 1; border-radius: 50%; border: 2px solid #131f1a;
  background: radial-gradient(circle, var(--green) 0 2%, #d97c4a 2.5% 23%, transparent 24%),
    conic-gradient(from 30deg, transparent, #d6dccc45 11%, transparent 25%, transparent 52%, #d6dccc44 63%, transparent 78%),
    repeating-radial-gradient(circle, #16271f 0 2px, #384940 2px 3px, #1a2e24 3px 5px); }
.jacket { position: absolute; inset: 0 auto 0 0; aspect-ratio: 1; border: 1px solid #e5af4f;
  background: repeating-radial-gradient(ellipse at 0% 100%, #f1c571 0 9%, #bd5833 9.4% 16%, #f1c571 16.4% 18%);
  box-shadow: 3px 6px 0 #15251d66; }
#import-area { display: grid; grid-template-columns: 1fr 1.2fr; border: 1px solid var(--line); margin-top: 1.5rem; background: #fffdf6; }
.file-box, .export { padding: clamp(1.3rem, 3vw, 2.6rem); }
.file-box { border-right: 1px solid var(--line); }
.file-box label { display: block; margin: 1.4rem 0 .5rem; }
input[type=file] { max-width: 100%; font-size: .95rem; }
input::file-selector-button { background: var(--green); color: white; margin-right: .6rem; padding: .8rem 1.2rem; }
input::file-selector-button:hover { color: var(--ink); }
.file-box p, .sub, small { color: var(--muted); }
.file-box p, .export ol { margin-top: 1rem; }
.export ol { padding-left: 1.3rem; }
.export li + li { margin-top: .45rem; }
#feedback { display: flex; gap: 1rem; align-items: center; }
#status:not(:empty) { margin: .85rem 0; font-size: .9rem; }
.tools { justify-content: flex-end; font-size: .85rem; }
.tools nav { margin-right: auto; }
.view-head { margin: 1.4rem 0; }
.view-head p { margin-top: .55rem; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--green); color: #fff8e8; padding: 1.6rem 0; margin: 1.4rem 0; }
.metrics .measure { display: grid; align-content: start; padding: .25rem clamp(1rem, 2vw, 2rem); border-left: 1px solid #648171; }
.metrics .measure:first-child { border: 0; }
.metrics strong { font: 500 clamp(1.9rem, 4vw, 3.7rem)/1.1 var(--serif); color: #f3ca7b; }
.metrics .measure > span { margin-top: .4rem; font-size: .9rem; }
.panel { padding: clamp(1rem, 2.3vw, 1.8rem); border: 1px solid var(--line); background: #fffdf7; margin: 1.25rem 0; min-width: 0; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.pair .panel { margin-bottom: 0; }
.title-bar { gap: 1rem; }
.sub, small, .detail, .counts, .pager { font-size: .88rem; }
.panel > .sub, .panel > label, .panel > .controls, .comparison, .pager, .story-line { margin-top: 1rem; }
label { font-weight: 600; }
select { max-width: 100%; font-weight: 400; }
.tools select { max-width: 15rem; }
.results { padding-left: 1.7rem; margin-top: 1rem; }
.results > li { border-top: 1px solid var(--line); padding: .8rem .2rem .8rem .1rem; overflow-wrap: anywhere; }
.results > li::marker { color: #57685b; font-variant-numeric: tabular-nums; font-size: .85rem; }
.identity > a, .rank-line > a { font-weight: 650; }
.identity small, .detail small { display: block; }
.detail { margin-top: .3rem; }
.counts .measure { display: inline-flex; gap: .25rem; align-items: baseline; }
.rank-line { gap: .7rem; }
.rank-line > :first-child { flex: 1 1 11rem; }
.rank-line button { font-size: .84rem; }
.chart > label { display: inline-block; }
.chart-scroll { overflow-x: auto; margin-top: 1.25rem; }
.chart-bars { display: flex; padding: 4px; }
.chart-bars button { flex: 1 0 58px; display: flex; flex-direction: column; gap: .2rem; align-items: stretch;
  border: 0; border-radius: 0; background: transparent; padding: .35rem; }
.chart-bars button:focus-visible { outline-offset: -3px; }
.chart-bars .plot { height: 115px; border-bottom: 1px solid var(--ink); background: #f1efe7; display: flex; align-items: flex-end; }
.plot i { display: block; width: 100%; background: #34705b; }
[data-availability=recorded] .plot i { min-height: 2px; }
[data-availability=outside] .plot { background: repeating-linear-gradient(135deg, transparent 0 5px, #d9dacf 5px 6px); }
.chart-bars small { font-size: .72rem; }
.drill { padding: 1rem; background: #f0f1e8; margin-top: .75rem; }
.drill h2 { font-size: 1.6rem; }
.controls, .tabs { margin-block: .8rem; }
.controls label { display: grid; gap: .35rem; min-width: 0; }
.controls { align-items: end; }
.pager { justify-content: flex-end; }
.pager > span { margin-right: auto; }
.report section { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.report p, .report .figure, .report a, .report button, .report .counts { display: block; max-width: 72ch; margin-top: .8rem; }
.report .counts { display: flex; }
.figure { font-size: 1.7rem; color: var(--green); }
.chapter h2 { margin: .6rem 0 1.1rem; }
summary { font-weight: 600; }
.empty { margin: 1rem 0; color: var(--muted); }
@media (max-width: 760px) {
  .mast { padding: .8rem 0; }
  .tools nav { gap: .3rem; }
  .tools nav button { padding: .45rem .55rem; }
  #import-area, .pair { grid-template-columns: 1fr; gap: 0; }
  .file-box { border-right: 0; border-bottom: 1px solid var(--line); }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 1.2rem 0; }
  .metrics .measure:nth-child(3) { border: 0; }
  .tools { justify-content: flex-start; }
  .cover { grid-template-columns: 1fr; padding: 2rem; }
  .sleeve { position: absolute; width: 170px; right: -70px; top: 2.2rem; }
  .cover-copy { z-index: 1; }
  .cover p { max-width: 29ch; }
  .drill { padding: .65rem; }
}
@media (max-width: 420px) {
  main { padding-top: 1rem; }
  .cover { padding: 1.6rem; }
  .sleeve { width: 130px; right: -70px; }
  .tools select { max-width: 11rem; }
  .mast { gap: .4rem; }
  .brand { font-size: 1.7rem; }
}
