:root {
  color-scheme: light;
  --board: #594f45;
  --paper: #fff4e7;
  --tab: #efd2af;
  --ink: #241b16;
  --link: #793d21;
  --rule: #716255;
  --grain: url("paper-fibre.svg");
  --tab-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 230 76' preserveAspectRatio='none'%3E%3Cpath d='M0 76C12 76 17 68 21 52L27 21C30 7 38 1 51 1H180C194 1 201 7 204 21L211 52C215 68 221 76 230 76Z'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at 48% 10%, #fff7e108, #211b171b 85%), var(--grain), var(--board);
  font: 1.125rem/1.48 Georgia, "Times New Roman", serif;
}
a, summary { color: var(--link); text-underline-offset: .18em; }
a:hover, summary:hover { color: #4d2413; }
:focus-visible { outline: 2px solid #935336; outline-offset: 4px; }
[hidden] { display: none !important; }
.skip, .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip:focus { z-index: 3; clip-path: none; width: auto; height: auto; background: var(--paper); padding: .5rem; }
.folder { max-width: 1120px; margin: 0 auto; padding: clamp(24px, 4.4vw, 48px) 24px 32px; }
.masthead { display: grid; grid-template-columns: 1fr 45%; align-items: end; min-height: clamp(48px, 5.7vw, 61px); position: relative; z-index: 1; }
.brand { display: inline-flex; align-items: center; justify-self: start; gap: .4rem; margin: 0 0 clamp(14px, 2.3vw, 25px); color: #fff1dc; text-decoration: none; font-size: clamp(1.35rem, 2.5vw, 1.85rem); line-height: 1.1; white-space: nowrap; }
.brand:hover { color: white; }
.brand:focus-visible { outline-color: #fff1dc; }
.brand svg { width: clamp(52px, 9vw, 100px); height: auto; flex: none; }
.tabs { display: flex; align-items: end; margin: 0 clamp(12px, 1.5vw, 18px) -1px 0; clip-path: inset(-6px -5px 0 -7px); }
.tab {
  flex: 1 1 0;
  isolation: isolate;
  position: relative;
  min-width: 0;
  min-height: clamp(38px, 4.1vw, 46px);
  padding: .48rem .35rem .47rem;
  color: var(--ink);
  font-size: clamp(.94rem, 1.83vw, 1.28rem);
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  filter: drop-shadow(-3px -2px 3px #25170f45) drop-shadow(0 -1px 0 #fff6e69c);
}
.tab + .tab { margin-left: clamp(-24px, -2.15vw, -14px); }
.tab::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  mask: var(--tab-shape) center / 100% 100% no-repeat;
  background: linear-gradient(108deg, #8a542631, transparent 39%, #fff5e64a 81%, #9b63312c),
    linear-gradient(180deg, #fff6e480, transparent 12%, transparent 65%, #8d532617),
    var(--grain), var(--tab);
}
.tab.current { z-index: 1; }
.tab.current::before {
  background: linear-gradient(180deg, #e9d5ba45, transparent 68%), var(--grain), var(--paper);
}
.tab:hover { text-decoration: underline; }
.sheet {
  background: var(--grain), linear-gradient(90deg, #c5935610, transparent 6%, transparent 95%, #a67a4510), var(--paper);
  border-radius: 15px;
  box-shadow: inset 0 2px 0 #fffaf1dc, inset 0 -2px 2px #9c724341, 0 2px 3px #29190f8a, 0 10px 22px #20160e65;
  padding: clamp(20px, 3.5vw, 40px);
}
.hero { display: grid; grid-template-columns: .84fr 1.3fr; gap: clamp(16px, 2vw, 26px); padding-bottom: 22px; align-items: start; }
.intro { align-self: center; }
.eyebrow { margin: 0 0 .65rem; color: var(--link); letter-spacing: .12em; text-transform: uppercase; font-weight: bold; font-size: clamp(.66rem, 1.28vw, .92rem); }
h1, h2 { margin: 0; font-weight: 600; line-height: 1.03; letter-spacing: -.035em; }
h1 { font-size: clamp(2.15rem, 5.25vw, 4.1rem); }
h1 span { white-space: nowrap; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.7rem); }
.intro > p:not(.eyebrow) { margin: .8rem 0; max-width: 24ch; font-size: clamp(1.12rem, 2.3vw, 1.55rem); line-height: 1.28; }
.hero-link { font-weight: bold; font-size: clamp(1.15rem, 2.25vw, 1.6rem); }
figure { margin: 0; }
.hero-print { padding-left: clamp(12px, 2vw, 22px); border-left: 1px solid #87786b70; }
.print {
  display: block;
  width: 100%;
  height: auto;
  border: clamp(5px, 1vw, 10px) solid #f8ead1;
  box-shadow: 0 2px 5px #442d2247;
  background: #eadbc4;
}
.hero-print .print { aspect-ratio: 1.65; object-fit: cover; }
figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: .4rem 1rem; flex-wrap: wrap; padding: .35rem .25rem 0; font-style: italic; }
.photo-caption-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ruled { border-top: 4px double var(--rule); padding: 21px 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .75rem; }
.search { display: flex; min-width: 0; border: 1px solid var(--rule); border-radius: 4px; }
.search input { min-width: 0; width: 100%; padding: .43rem .65rem; background: transparent; border: 0; color: var(--ink); font: inherit; font-size: 1rem; }
.search input::placeholder { color: #645548; }
.search button { display: grid; place-items: center; background: transparent; border: 0; padding: 0 .55rem; color: var(--ink); cursor: pointer; }
.search button svg { width: 1.2rem; }
.results { border-left: 2px solid var(--rule); margin: 0 0 1rem; padding-left: .8rem; }
.results p, .results ul { margin: .35rem 0; }
.guide-grid, .story-grid { display: grid; align-items: start; }
.guide-grid { grid-template-columns: repeat(3, 1fr); }
.guide-grid > * { padding: 0 1rem; border-left: 1px solid #87786b70; min-width: 0; }
.guide-grid > :first-child { border: 0; padding-left: 0; }
summary { cursor: pointer; text-decoration: underline; }
summary::marker { font-size: .72em; }
.guide-grid summary, .project-note summary { font-size: clamp(1.12rem, 2.4vw, 1.66rem); font-weight: bold; }
details p { margin: .55rem 0 0; }
.story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; margin-top: 1rem; }
.story-photo { aspect-ratio: 1.77; object-fit: cover; }
.story-grid summary { margin-top: .35rem; color: var(--ink); font-size: clamp(1.08rem, 2.2vw, 1.38rem); font-style: italic; }
.project-note { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; padding: .8rem 0; border-block: 1px solid var(--rule); }
.project-note img { display: block; width: clamp(58px, 10vw, 95px); height: auto; mix-blend-mode: multiply; }
.project-note details { padding-left: 1rem; border-left: 1px solid #87786b70; }
.footer-links { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .75rem; }
.credits { font-size: .94rem; }
.credits ul { padding-left: 1.3rem; }

@media (max-width: 680px) {
  .folder { padding: 12px 12px 20px; }
  .masthead { display: block; }
  .brand { margin: 0 0 .6rem .75rem; }
  .tabs { margin-inline: 6px; }
  .tab { min-height: 37px; padding-block: .4rem; }
  .sheet { border-radius: 9px; }
  .hero { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2.35rem, 8vw, 4rem); }
  .hero-print { border-left: 0; padding-left: 0; }
  .section-heading { display: grid; }
  .search { max-width: 22rem; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-grid > *, .guide-grid > :first-child { padding: .35rem 0; border: 0; }
}
@media (max-width: 460px) {
  .story-grid { grid-template-columns: 1fr; }
}

.photo-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.photo-trigger:hover .print { border-color: #eddbb9; }
.photo-dialog {
  width: min(52rem, calc(100% - 1.5rem));
  max-height: calc(100% - 1.5rem);
  padding: clamp(.75rem, 2vw, 1.35rem);
  border: 1px solid var(--rule);
  border-radius: .55rem;
  color: var(--ink);
  background: var(--grain), var(--paper);
  box-shadow: 0 8px 30px #21160d80;
}
.photo-dialog::backdrop { background: #241b16bb; }
.photo-dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}
.photo-dialog-heading h2 { font-size: 1.35rem; }
.photo-dialog-heading button {
  font: inherit;
  font-size: .95rem;
  padding: .35rem .7rem;
  border: 1px solid var(--rule);
  border-radius: .2rem;
  color: var(--ink);
  background: #f4e5ce;
  cursor: pointer;
}
.photo-dialog img {
  display: block;
  width: 100%;
  max-height: 68dvh;
  object-fit: contain;
  background: #e9dac1;
}
.photo-dialog figcaption { display: block; padding: .6rem 0 0; font-size: .95rem; }
.photo-dialog .photo-credit { display: block; margin-top: .25rem; }
.project-note .photo-trigger { width: auto; }
