/* MeloPresto website. Every colour, size and face is a token from tokens.css. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

main, .site-footer {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: max(var(--space-16), env(safe-area-inset-left, 0px));
  padding-right: max(var(--space-16), env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  main, .site-footer {
    padding-left: var(--space-56);
    padding-right: var(--space-56);
  }
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-72);
  padding-block: var(--space-72) var(--space-120);
}
section { display: flex; flex-direction: column; gap: var(--space-24); }
section > * { margin: 0; }
h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 40px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--line);
}
p, li { max-width: var(--measure); }
h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  margin-top: var(--space-12);
}
h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink-muted);
}
/* A label of force (System, House) at the start of a statement on the Nomenclature page. */
span.eyebrow { margin-right: 0.6em; white-space: nowrap; }
.lead { font-size: 19px; line-height: 1.6; color: var(--ink-muted); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--link);
}
.muted { color: var(--ink-muted); }
ul.plain { display: flex; flex-direction: column; gap: var(--space-8); }
/* The MeloPresto bullet (Design System, Lists): every bulleted list in the page
   content is marked with the note-button, about one em tall, centred on the first
   line: a brass outline (::after) over an interior (::before) that alternates by
   nesting level, light (Bone, a White Note) at the first level, dark (Rosewood, a
   Black Note) at the second, and so on. Numbered lists keep their numbers. */
main ul { list-style: none; padding-left: 0; }
main ul > li { position: relative; padding-left: 1.5em; }
main ul > li::before, main ul > li::after {
  content: ""; position: absolute; left: 0.1em; top: calc((1lh - 1em) / 2); width: 0.85em; height: 1em;
}
main ul > li::before {
  background: var(--bone);
  -webkit-mask: url(/assets/melopresto-bullet-fill.svg) center / contain no-repeat;
  mask: url(/assets/melopresto-bullet-fill.svg) center / contain no-repeat;
}
main ul > li::after {
  background: var(--accent);
  -webkit-mask: url(/assets/melopresto-bullet.svg) center / contain no-repeat;
  mask: url(/assets/melopresto-bullet.svg) center / contain no-repeat;
}
main ul ul > li::before { background: var(--rosewood); }
main ul ul ul > li::before { background: var(--bone); }
main ul ul ul ul > li::before { background: var(--rosewood); }
main ul ul ul ul ul > li::before { background: var(--bone); }
main ul ul ul ul ul ul > li::before { background: var(--rosewood); }
main ul ul { margin-top: var(--space-8); }

/* The home page's opening: the lockup on its own bone ground in both themes. */
/* Transparent, so the home page's button-field shows through behind the lockup. */
.hero {
  padding: var(--space-48) var(--space-40);
  display: flex;
  justify-content: center;
}
.hero h1 { margin: 0; line-height: 0; }
.hero img { width: 100%; max-width: 520px; display: block; }
@media (max-width: 480px) { .hero { padding: var(--space-40) var(--space-24); } }

.mission {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 4.2vw, 30px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 32ch;
}
.mission em { font-style: normal; color: var(--accent); }
/* The paragraph after the Mission: regular weight, but at 24px, the size at which
   the brass accent meets the 3:1 minimum for large text on the light ground. */
.mission-more { font-size: 24px; font-weight: 400; line-height: 1.45; max-width: 40ch; }
.mission-more em { font-style: normal; color: var(--accent); }
/* The development gates: names in brass, bold at 20px (large text, where the
   accent brass meets its 3:1 minimum), dates in the mono face. */
.gates { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-16);
  font-size: 20px; line-height: 1.45; max-width: 46ch; }
.gates strong { color: var(--accent); font-weight: 700; }
.gates .date { font-family: var(--font-mono); font-size: 0.8em; letter-spacing: 0.04em; color: var(--ink-muted); white-space: nowrap; }
/* "Fast." in italics, echoing the tagline lockup. */
.mission-more em i { font-style: italic; }
/* A key phrase in running text ("smartening-up"): brass, in the Design System's
   darker link brass, which keeps the 4.5:1 minimum at body size. */
.key { font-style: normal; color: var(--link); }

.button {
  display: inline-block;
  align-self: flex-start;
  background: var(--action);
  color: var(--ink-inverse);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  padding: var(--space-12) var(--space-24);
  border: 0;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { color: var(--ink-inverse); filter: brightness(1.1); }

.panel { background: var(--surface); border: 1px solid var(--line); padding: var(--space-40); }
@media (max-width: 480px) { .panel { padding: var(--space-24); } }

form.password { display: flex; flex-direction: column; gap: var(--space-16); max-width: 360px; }
form.password label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-label); }
form.password input {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-none);
  padding: var(--space-12);
}
.error { color: var(--ink); border-left: 2px solid var(--accent); padding-left: var(--space-12); }

table.facts { border-collapse: collapse; width: 100%; font-size: 14.5px; }
table.facts th, table.facts td { text-align: left; padding: var(--space-8) var(--space-12); border-bottom: 1px solid var(--line); vertical-align: top; }
table.facts th { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-label); font-weight: 400; }
.table-wrap { overflow-x: auto; }
code { font-family: var(--font-mono); font-size: 0.92em; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-8) var(--space-24);
  padding-block: var(--space-24) var(--space-40);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-label);
}
.site-footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* The home page's background button-field (site/field.js): almost invisible.
   White Notes are outlined and Black Notes faintly filled, never both, so no
   point of the field is darker than its strongest colour alone; at these
   strengths the field stays faint behind the text. On the dark ground the roles swap. */
body { position: relative; }
.button-field { position: absolute; top: 0; left: 0; width: 100%; z-index: -1; pointer-events: none; }
.button-field .w { fill: none; stroke: rgba(74, 34, 32, 0.045); stroke-width: 1; }
.button-field .k { fill: rgba(74, 34, 32, 0.035); stroke: none; }
@media (prefers-color-scheme: dark) {
  .button-field .w { fill: rgba(246, 239, 226, 0.05); stroke: none; }
  .button-field .k { fill: none; stroke: rgba(246, 239, 226, 0.07); stroke-width: 1; }
}
@media print { .button-field { display: none; } }

/* The short print-edition link is secondary to the paper title. */
span.paper-format { margin-inline-start: .5em; white-space: nowrap; font-size: .85em; }


.paper-list {
  display: grid;
  gap: var(--space-16);
  padding-inline-start: var(--space-40);
}
.paper-list li { padding-inline-start: var(--space-4); }
.paper-list li::marker { color: var(--ink-label); font-variant-numeric: tabular-nums; }
.paper-annotation { margin: var(--space-4) 0 0; color: var(--ink-muted); }

.just-intonation-paper figure { margin: var(--space-24) 0; }
.just-intonation-paper figcaption { color: var(--ink-muted); font-size: 0.93em; max-width: var(--measure); }
