@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/instrument-regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/instrument-italic.ttf') format('truetype');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
:root {
  --paper: #f9f8f2;
  --ink: #1c3930;
  --accent: #943f29;
  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; }
::selection { color: white; background: #415d4d; }

.page {
  width: min(88%, 76rem);
  margin-inline: auto;
  padding-bottom: clamp(2.6rem, 6vw, 5rem);
}
.frontispiece {
  padding-block: clamp(2.5rem, 6vw, 5.5rem);
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4.5rem);
}
h1, p { margin: 0; }
h1 {
  font: 400 clamp(5.4rem, 9.7vw, 9.3rem)/.89 'Instrument Serif', Georgia, serif;
  letter-spacing: -.044em;
}
.wordmark h1 > span { display: block; }
h1 em, .period { color: var(--accent); }
.wordmark p {
  margin-top: 1.75rem;
  color: #45544a;
  font: 400 clamp(1rem, 1.35vw, 1.2rem)/1.45 -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}
.engraving { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }

.projects {
  border-top: 1px solid #bdc5b9;
  padding-top: clamp(1.5rem, 2.6vw, 2.5rem);
}
.projects h2, .project .project-title {
  margin: 0;
  font: 400 2.7rem/1.08 'Instrument Serif', Georgia, serif;
  letter-spacing: -.025em;
}
.project-list { list-style: none; padding: 0; margin: .9rem 0 0; }
.project-list li + li { border-top: 1px solid #d2d7ce; }
.project {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.1rem;
  padding: 1.05rem 0;
  color: inherit;
  text-decoration: none;
  font: 400 1rem/1.5 -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}
.project-icon { display: block; width: 3.8rem; height: auto; border-radius: 23%; }
.project .project-title { font-size: 1.95rem; }
.project-info p { margin-top: .3rem; color: #45544a; }
.project-access { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; }
.access-label {
  padding: .18rem .65rem;
  border-radius: 2rem;
  background: #e9ede4;
  color: #394e40;
  font-size: .875rem;
}
.open-link { color: var(--accent); text-decoration: underline; text-underline-offset: .22em; }
.project:focus-visible { outline: 2px solid var(--accent); outline-offset: .4rem; border-radius: .15rem; }
@media (hover: hover) {
  .project:hover .open-link { text-decoration-thickness: 2px; }
}
@media (max-width: 47rem) {
  .page { width: min(88%, 34rem); }
  .frontispiece {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    justify-items: center;
    gap: 1.7rem;
    padding-block: clamp(2rem, 6svh, 3.5rem) 2rem;
  }
  .wordmark { text-align: center; }
  h1 { font-size: clamp(4.8rem, 17vw, 7.25rem); }
  .wordmark p { margin-top: 1.25rem; }
  .projects h2 { font-size: 2.3rem; }
  .project { grid-template-columns: auto minmax(0, 1fr); gap: .65rem .85rem; align-items: start; }
  .project-icon { width: 3.2rem; }
  .project .project-title { font-size: 1.72rem; }
  .project-access { grid-column: 2; gap: 1rem; }
}

.directory-head, .visibility-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .45rem 1.1rem;
}
.quiet-link, .visibility-tools, .owner-note, .empty, .notice, .account {
  font: 400 .9375rem/1.5 -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}
.quiet-link, .visibility-button {
  color: #45544a;
  text-decoration: underline;
  text-underline-offset: .22em;
}
.quiet-link { display: inline-block; padding-block: .6rem; }
.owner-note, .empty { margin-top: .8rem; color: #45544a; }
.notice { margin-top: 1rem; }
.visibility-tools {
  justify-content: flex-start;
  margin: -.35rem 0 .65rem 4.9rem;
  color: #45544a;
}
.visibility-button {
  min-height: 2.75rem;
  border: 0;
  padding: 0 .25rem;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.listing-group {
  margin-top: 1.5rem;
  padding: .9rem clamp(.8rem, 2vw, 1.4rem) .25rem;
  border: 1px solid #c9d1c5;
  border-radius: .5rem;
}
.listing-group-hidden { background: #f2ebe3; border-color: #d8c9bb; }
.listing-heading {
  margin: 0;
  color: #365342;
  font: 600 1rem/1.45 -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}
.listing-group-hidden .listing-heading { color: #7a3c28; }
.listing-count { font-weight: 400; font-variant-numeric: tabular-nums; }
.listing-group .project-list { margin-top: .25rem; }
.listing-group .empty { margin: .45rem 0 .75rem; }
.quiet-link:focus-visible, .visibility-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: .12rem;
}
.account { border-top: 1px solid #d2d7ce; padding-top: .5rem; margin-top: .45rem; text-align: right; }
@media (max-width: 47rem) {
  .visibility-tools { margin-left: 4.05rem; }
}

.directory-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .1rem 1.25rem;
}
.preview-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .2rem .9rem;
  background: #e9ede4;
  border-bottom: 1px solid #bdc5b9;
  color: var(--ink);
  font: 400 .9375rem/1.5 -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

/* Navigation and interior pages */
:root { --sans: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif; --rule: #c9d0c4; }
.site-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.6rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--rule);
}
.home-header { justify-content: flex-end; border: 0; padding-bottom: 0; }
.site-header nav, .launch-row, .form-end, .inbox-paging { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.35rem; }
.site-header a, .back-link, .detail-link, .reading-copy a { color: var(--ink); text-underline-offset: .22em; }
.site-header nav a { padding: .55rem 0; font: 500 .94rem/1.35 var(--sans); text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current] { text-decoration: underline; }
.small-wordmark { font: 400 1.9rem/1 'Instrument Serif', Georgia, serif; letter-spacing: -.035em; text-decoration: none; }
.small-wordmark em, .small-wordmark span { color: var(--accent); }
.page-title { font: 400 clamp(3.4rem, 7vw, 6.2rem)/.97 'Instrument Serif', Georgia, serif; letter-spacing: -.04em; text-wrap: balance; }
.about-spread, .idea-layout, .detail-spread {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  align-items: start; gap: 2.5rem clamp(2rem, 6vw, 6rem); padding-top: clamp(2.5rem, 6vw, 5.7rem);
}
.about-spread { align-items: center; }
.about-art { width: 100%; height: auto; mix-blend-mode: multiply; }
.reading-copy p, .idea-intro p, .detail-copy p, .single-page p, .features dd {
  font: 400 1.04rem/1.65 var(--sans); color: #45544a;
}
.reading-copy p, .idea-intro p, .detail-copy p, .single-page .lede { margin-top: 1.1rem; }
.reading-copy .lede, .idea-intro .lede, .detail-copy .lede, .single-page .lede { font-size: 1.16rem; color: var(--ink); }
.reading-copy a { color: var(--accent); }
.primary, .secondary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem;
  padding: .65rem 1.15rem; border: 1px solid var(--ink); border-radius: .35rem; cursor: pointer;
  background: var(--ink); color: white; font: 600 1rem/1.35 var(--sans); text-decoration: none;
}
.secondary { background: transparent; color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: .22rem;
}
.back-link { display: inline-block; font: 500 .94rem/1.45 var(--sans); margin-bottom: 1rem; }
.single-page { width: min(100%, 45rem); padding-top: clamp(2.5rem, 6vw, 5rem); }
.project { position: relative; }
.open-link::after { content: ""; position: absolute; inset: 0; }
.detail-link { position: relative; z-index: 1; }
.project:has(.open-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: .15rem; }
.project-access { gap: .55rem 1.1rem; }

/* Project pages */
.launch-row { margin-top: 1.5rem; font-family: var(--sans); }
.project-sample { margin: 0; align-self: center; min-width: 0; }
.project-sample fieldset { margin: 0; padding: 0; min-width: 0; border: 0; }
.project-sample legend, .features dt { margin: 0 0 .75rem; font: 400 1.7rem/1.16 'Instrument Serif', Georgia, serif; }
.screen-choice { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.project-sample label { display: inline-block; padding: .55rem .85rem; font: 500 .94rem/1.3 var(--sans); color: #415248; cursor: pointer; border-bottom: 2px solid transparent; }
.screen-choice:checked + label { color: var(--ink); border-bottom-color: var(--accent); }
.screen-choice:focus-visible + label { outline: 2px solid var(--accent); outline-offset: -2px; }
.sample-frame { padding: clamp(.8rem, 2.6vw, 2.25rem); background: #e6eade; border-radius: .65rem; }
.sample-dose .sample-frame { background: #e5e4ee; }
.sample-budget .sample-frame { background: #e4eaf0; }
.sample-desk .sample-frame { background: #e6eae4; }
.sample-panel { display: none; font: 400 1rem/1.4 var(--sans); background: white; color: #26372f; border: 1px solid #0002; border-radius: .65rem; overflow: hidden; box-shadow: 0 .4rem 1.25rem #292f2010; }
.choice-0:checked ~ .sample-frame .panel-0, .choice-1:checked ~ .sample-frame .panel-1 { display: block; }
.sample-brand { padding: .7rem 1rem; display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid #dde2d8; font: 600 1.05rem/1.2 Georgia, serif; }
.sample-brand img { border-radius: .35rem; flex-shrink: 0; }
.sample-body { min-height: 12rem; padding: 1rem; }
.sample-body h3 { margin: 0 0 .8rem; font: 600 1.35rem/1.2 Georgia, serif; }
.example-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.dose-entry { display: grid; gap: .2rem; background: #efe8ff; color: #4d3370; padding: .8rem; border-radius: .55rem; }
.dose-entry:nth-child(2) { background: #fff1d3; color: #654519; }
.dose-entry span, .example-row small, .example-note { display: block; font-size: .875rem; }
.example-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem 0; border-top: 1px solid #dce1d9; }
.example-note { border-left: 2px solid #748c75; padding: .35rem .65rem; }
.example-search { padding: .55rem .75rem; border: 1px solid #a9b7ac; border-radius: .35rem; margin-bottom: .5rem; }
.sticker-stage { display: grid; place-items: center; padding: .7rem; background: #edf3e9; border-radius: .4rem; }
.sticker { display: grid; justify-items: center; padding: .35rem 1.1rem; border: 1px dashed #8c9d8a; border-radius: .45rem; background: white; }
.sticker img { object-fit: contain; }
.example-bar { margin-top: .75rem; }
.example-bar span { display: flex; justify-content: space-between; gap: .4rem; }
.example-bar i { display: block; height: .5rem; border-radius: .2rem; background: #557899; margin-top: .3rem; }
.example-bar + .example-bar i { background: #33536c; }
.project-sample figcaption, .hint, .inbox-meta, .contact { margin: .6rem 0 0; font: 400 .9rem/1.5 var(--sans); color: #4d5c50; }
.features { grid-column: 1/-1; margin: .5rem 0 0; padding-top: 1.45rem; border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem 3rem; }
.features dd { margin: 0; }

/* Idea submission and private inbox */
.idea-form { padding: clamp(1.1rem, 3vw, 2.2rem); border: 1px solid #c6cfc1; border-radius: .65rem; background: #f0f2e9; }
.idea-form label, .inbox-item label { display: block; margin: 1.1rem 0 .4rem; font: 600 1rem/1.45 var(--sans); }
.idea-form label:first-of-type { margin-top: 0; }
.idea-form label span { font-weight: 400; color: #536257; }
.idea-form textarea, .idea-form input:not([type=hidden]), .inbox-item select {
  width: 100%; padding: .65rem .8rem; border: 1px solid #97a599; border-radius: .3rem; background: #fffefb;
  color: var(--ink); font: 400 1rem/1.5 var(--sans);
}
.idea-form textarea { resize: vertical; }
.form-end { margin-top: 1.4rem; gap: .65rem 1rem; }
.form-end .hint { margin: 0; }
.form-error { font: 600 1rem/1.5 var(--sans); color: #852c1e; margin-top: 1rem; }
.idea-list { list-style: none; margin: 1.7rem 0; padding: 0; }
.inbox-item { padding: 1rem 0 1.4rem; border-top: 1px solid var(--rule); }
.inbox-meta, .inbox-item form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.inbox-meta span { color: var(--ink); font-weight: 600; }
.inbox-item .idea-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: .7rem 0; }
.inbox-item .contact { overflow-wrap: anywhere; font-size: .95rem; }
.inbox-item form { margin-top: .9rem; }
.inbox-item form label { margin: 0; }
.inbox-item select { width: auto; min-height: 2.75rem; }
@media (max-width: 47rem) {
  .about-spread, .idea-layout, .detail-spread, .features { grid-template-columns: minmax(0,1fr); gap: 1.8rem; }
  .detail-spread { gap: 2rem; }
  .features { grid-column: 1; }
  .site-header { gap: .35rem 1rem; }
  .site-header nav { gap: .3rem 1.05rem; }
  .home-header { justify-content: center; }
  .sample-body { min-height: 11rem; }
}
