:root {
  --fog: #D8D2C8;
  --ink: #1C1814;
  --brass: #C4A35A;
  --sky: #F6F4F3;
  --u: 0.7rem;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}
html, body, * { min-width: 0; }
body {
  min-height: 100svh;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.35;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.12em; }
a:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }

.mill {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  height: 100svh;
  max-height: 100svh;
  width: 100%;
  padding: calc(3 * var(--u));
  gap: var(--u);
  box-sizing: border-box;
}
.head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
}
.mark {
  display: grid;
  justify-items: start;
  text-decoration: none;
}
.mark img { width: 4.4rem; height: auto; }
.mark span {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  font-size: 0.9rem;
  justify-content: flex-end;
}
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.2rem;
}
nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.18em; }

h1 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  line-height: 0.95;
}
.lede { margin: 0; }

.zone {
  overflow: hidden;
  background: transparent;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}
.zone img {
  display: block;
  max-width: min(100%, 640px);
  width: auto;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: left bottom;
}

.stave {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--u) calc(3 * var(--u));
  color: var(--brass);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  width: 100%;
  max-width: 72rem;
}
.stave p { margin: 0; }
.stave strong {
  display: block;
  color: var(--brass);
  font-weight: 600;
  font-size: 1.05rem;
}
.stave span {
  display: block;
  font-size: 0.88rem;
  color: var(--ink);
  overflow-wrap: break-word;
}

.eq {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: calc(2 * var(--u)) calc(3 * var(--u));
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  width: 100%;
}
.eq li {
  overflow-wrap: break-word;
  line-height: 1.45;
  padding: 0.25rem 0;
}

.invite {
  max-width: 48rem;
  overflow-wrap: break-word;
}
.sheet {
  padding: calc(3 * var(--u));
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.sheet .head { margin-bottom: 0.4rem; }
.sheet h1 { margin: 1.2rem 0 1.4rem; }
.sheet .stave { margin-top: 1.4rem; }

.credit { font-size: 0.85rem; margin-top: 1rem; }

footer {
  display: flex;
  justify-content: flex-end;
  padding: calc(2 * var(--u)) calc(3 * var(--u));
  font-size: 0.75rem;
  width: 100%;
}
footer .by { color: var(--ink); }

@media (max-width: 960px) {
  .eq { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .mill {
    height: auto;
    max-height: none;
    min-height: 100svh;
    grid-template-rows: auto;
    padding: calc(2.2 * var(--u));
  }
  .head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
  }
  nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
    gap: 0 0.8rem;
  }
  nav a {
    min-height: 44px;
    padding: 0.55rem 0.2rem;
  }
  .zone img { max-height: 48vh; }
  .eq, .stave { grid-template-columns: 1fr; }
  .sheet { padding: calc(2.2 * var(--u)); }
  .sheet h1 { margin: 1rem 0 1.3rem; }
  h1 { font-size: clamp(1.8rem, 9vw, 2.6rem); }
}
