:root {
  --paper: #f9f8f3;
  --ink: #243a36;
  --muted: #6f7a72;
  --line: #d5dcd3;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Manrope, Arial, sans-serif; }
a { color: inherit; }
.masthead { padding: 25px 3vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { text-decoration: none; font-size: 22px; font-weight: 700; letter-spacing: .03em; }
.brand span { font-weight: 400; }
.masthead > span { font-size: 12px; letter-spacing: .08em; }
.masthead small { color: var(--muted); font-size: 10px; }
main { width: 100%; padding: 0 3vw; }
.introduction { padding: 46px 0 28px; text-align: center; }
.eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .19em; margin: 0 0 12px; }
h1 { font: 500 clamp(46px,5.5vw,86px)/1.05 'Cormorant Garamond',Georgia,serif; margin: 0; }
.lead { font-size: 16px; margin: 15px 0 10px; }
.description { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 0; }
nav { display: flex; justify-content: center; gap: 30px; padding: 18px 0 26px; flex-wrap: wrap; }
nav a { font-size: 12px; text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 5px; }
nav a:hover { border-color: var(--ink); }
.column-labels, .shelf { display: grid; grid-template-columns: 32fr 30fr 38fr; gap: 3vw; }
.column-labels { border-bottom: 1px solid var(--line); padding: 18px 0; font-size: 10px; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); }
.column-labels > span { text-align: center; }
.shelf { padding: 32px 0; border-bottom: 1px solid var(--line); align-items: center; scroll-margin-top: 20px; }
figure { margin: 0; min-width: 0; }
.scene { aspect-ratio: 2 / 1; background-image: url('assets/editorial-grid.png'); background-size: 200% 600%; background-repeat: no-repeat; background-color: #eeece5; }
figcaption { font-size: 11px; color: var(--muted); padding: 11px 0 0; line-height: 1.5; }
h2 { font: 500 clamp(25px,2.7vw,42px)/1.08 'Cormorant Garamond',Georgia,serif; margin: 0 0 13px; }
.copy p { font-size: 12px; line-height: 1.8; margin: 0 0 14px; }
dl { margin: 0; }
dl div { display: grid; grid-template-columns: 105px 1fr; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.6; }
.copy .shape-note { margin: 12px 0 0; font-size: 10px; color: var(--muted); line-height: 1.6; }
dt { color: var(--muted); }
dd { margin: 0; }
.ordering { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 5vw; padding: 50px 7vw; margin: 30px 0; background: #e9eee7; }
.ordering h2 { grid-row: span 2; }
.ordering p { font-size: 12px; line-height: 1.8; margin: 0; }
.ordering a { font-size: 12px; text-underline-offset: 5px; }
footer { padding: 25px 3vw; display: flex; justify-content: space-between; gap: 20px; font-size: 10px; color: var(--muted); }
a:focus-visible { outline: 2px solid #39796e; outline-offset: 5px; }
@media(min-width:1800px) {
  .copy p { font-size: 15px; }
  dl div { font-size: 13px; grid-template-columns: 125px 1fr; }
}
@media(max-width:800px) {
  main { padding: 0 20px; }
  .column-labels { display: none; }
  .shelf { grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
  .copy { grid-column: 2; grid-row: span 2; }
  .application { grid-column: 1; }
  nav { gap: 18px; }
  h2 { font-size: 31px; }
  .ordering { padding: 25px; }
}
@media(max-width:520px) {
  .masthead { padding: 18px 20px; }
  .masthead small { display: none; }
  .shelf { grid-template-columns: 1fr; gap: 18px; }
  .copy { grid-column: auto; grid-row: auto; }
  .application { grid-column: auto; }
  .introduction { padding-top: 35px; }
  .description br { display: none; }
  .ordering { display: block; }
  .ordering p { margin-bottom: 16px; }
  footer { flex-direction: column; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } }

.shelf-add, #shelf-editor button[type=submit] {
  background: #365e55;
  color: white;
  border: 0;
  padding: 14px 18px;
  margin-top: 16px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
#shelf-editor {
  width: min(700px, 95vw);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--line);
  padding: 28px;
  background: var(--paper);
  color: var(--ink);
}
#shelf-editor::backdrop { background: #17292399; }
.shelf-dialog-top { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.shelf-dialog-top button { font-size: 25px; background: none; border: 0; cursor: pointer; }
.shelf-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#shelf-editor label { display: grid; gap: 6px; font-size: 12px; }
#shelf-editor input, #shelf-editor select, #shelf-editor textarea {
  width: 100%;
  min-width: 0;
  font: inherit;
  padding: 10px;
  border: 1px solid #abb9af;
  background: white;
  color: #243a36;
}
#shelf-editor p { font-size: 12px; line-height: 1.6; }
#shelf-editor fieldset { margin: 18px 0; border: 1px solid var(--line); }
#shelf-editor [hidden] { display: none; }
#shelf-editor [data-error] { color: #a42828; }
@media(max-width:520px) { #shelf-editor { padding: 18px; } }

#shelf-editor [data-corner-lock] { padding: 8px 12px; border: 1px solid #abb9af; background: #e9eee7; color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }

#shelf-editor .shelf-diagram { text-align: center; }
#shelf-editor .corner-layout { position: relative; width: 100%; max-width: 450px; margin: auto; }
.corner-layout svg { width: 100%; display: block; }
.corner-layout path { fill: #cee1dc; stroke: #3e756a; stroke-width: 2; }
#shelf-editor .corner { position: absolute; width: 76px; }
#shelf-editor .corner span { font-size: 9px; line-height: 1.2; }
#shelf-editor .corner input { text-align: center; padding: 5px; }
.corner.tl { left: 0; top: 0; }
.corner.tr { right: 0; top: 0; }
.corner.bl { left: 0; bottom: 0; }
.corner.br { right: 0; bottom: 0; }

.shelf-material-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 18px; }
#shelf-editor .shelf-material-heading p { margin: 0; font-size: 14px; }
[data-material-image] { flex: 0 0 160px; height: 80px; background-image: url('assets/editorial-grid.png'); background-size: 200% 600%; background-repeat: no-repeat; border-radius: 3px; }
@media(max-width:520px) { [data-material-image] { flex-basis: 120px; height: 60px; } }
