@font-face {
  font-family: Studio Display;
  src: url(assets/dm-serif-text.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: DM Sans;
  src: url(assets/dm-sans.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #fbfaf5;
  --cream: #f4f1e7;
  --green: #263f35;
  --ink: #283c32;
  --moss: #647353;
  --muted: #546158;
  --rule: #d8d8c9;
  --display: "New York","Studio Display",Georgia,serif;
  --body: "New York",ui-serif,Georgia,serif;
  --sans: "DM Sans",Arial,sans-serif;
  background: var(--paper);
  color: var(--ink);
  font: 100%/1.5 var(--body);
  -webkit-text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

body,h1,h2,h3,p,figure {
  margin: 0;
}

body {
  min-width: 280px;
}

button,select {
  font: inherit;
}

button,a,select {
  -webkit-tap-highlight-color: transparent;
}

button,select {
  cursor: pointer;
}

a {
  color: inherit;
  text-underline-offset: .25em;
}

button {
  color: inherit;
}

button:disabled {
  opacity: .42;
  cursor: default;
}

button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible {
  outline: 3px solid #a66633;
  outline-offset: 4px;
}

main:focus {
  outline: none;
}

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  transform: translateY(-155%);
  z-index: 100;
  background: var(--paper);
  padding: .6rem 1rem;
}

.skip:focus {
  transform: none;
}

.wrap {
  margin-inline: auto;
  width: min(1330px,calc(100% - clamp(46px,10.6vw,170px)));
}

.icon {
  width: 1.12em;
  height: 1.12em;
  flex: none;
  vertical-align: -.12em;
}

.brand,.mast nav,.primary,.secondary,.hero-secondary,.nav-mat,.back-link,.kicker,.card-area,.filters,.tag,.count,.bench-head h2,.tools,.bench-foot span,.piece-tools button,.work-note,.hint,.rug-note summary {
  display: inline-flex;
  align-items: center;
}

.mast {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.mast nav {
  gap: clamp(15px,3.2vw,48px);
  font: 600 .9rem/1.25 var(--sans);
}

.mast a {
  text-decoration: none;
}

.brand {
  gap: 9px;
}

.brand img {
  width: 51px;
  height: 47px;
}

.brand small {
  display: block;
  text-transform: uppercase;
  font: 650 .65rem/1 var(--sans);
  letter-spacing: .23em;
  color: #5b6958;
  margin: 0 0 5px 2px;
}

.brand strong {
  font: 400 1.6rem/.95 var(--display);
  letter-spacing: -.04em;
}

.mast nav a:not(.nav-mat) {
  position: relative;
  padding: 12px 0;
}

.mast nav a:not(.nav-mat)[aria-current]::after,.mast nav a:not(.nav-mat):hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 1.5px;
  background: var(--moss);
}

header {
  border-bottom: 1px solid var(--rule);
  background: #fcfaf3;
}

.nav-mat,.secondary {
  gap: 9px;
  border: 1px solid #a1aa98;
  background: transparent;
  border-radius: 6px;
  padding: 10px 15px;
}

.nav-mat:hover,.secondary:hover,.nav-mat[aria-current] {
  background: #e8ecdf;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #eee8da;
  border-bottom: 1px solid #d5cdbb;
}

.hero picture,.hero-image,.wash {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-image {
  object-fit: cover;
  object-position: 50% 56%;
}

.wash {
  z-index: -1;
  background: linear-gradient(90deg,#f6f2e9 0%,#f6f2e9fa 23%,#f6f2e9ee 31%,#f6f2e997 41%,#f6f2e900 53%);
}

.hero-inner {
  min-height: clamp(415px,32vw,510px);
  display: flex;
  align-items: center;
  padding-block: 38px;
}

.hero-copy {
  max-width: 43%;
}

.kicker,.card-area {
  text-transform: uppercase;
  font: 650 .735rem/1.4 var(--sans);
  letter-spacing: .15em;
  color: #53664f;
  gap: 8px;
}

.kicker.line:before {
  content: "";
  display: inline-block;
  height: 1px;
  width: 30px;
  background: #839177;
  margin-right: 3px;
}

.hero h1 {
  font: 400 clamp(4.6rem,6.35vw,7rem)/.94 var(--display);
  letter-spacing: -.056em;
  margin: 14px 0 18px;
}

.hero h1 em {
  font: italic 400 1.02em/.95 "New York",Georgia,serif;
  letter-spacing: -.06em;
  color: #536449;
}

.hero p {
  font: 400 clamp(1.09rem,1.32vw,1.28rem)/1.48 var(--body);
  color: #475747;
  max-width: 43ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px 23px;
  margin-top: 25px;
}

.primary,.secondary,.hero-secondary,.hint {
  justify-content: center;
  text-decoration: none;
  font: 600 .9rem/1.35 var(--sans);
  gap: 9px;
}

.primary {
  border: 1px solid #2b4838;
  color: #fffdf3;
  background: #304c3a;
  border-radius: 6px;
  padding: 12px 17px;
  min-height: 44px;
  box-shadow: 0 2px 3px #283e2810;
}

.primary:hover {
  background: #243b2e;
}

.hero-secondary {
  color: #394d3f;
  min-height: 44px;
}

.hero-secondary:hover {
  text-decoration: underline;
}

.shelf {
  padding-block: clamp(31px,3vw,51px) 64px;
  scroll-margin-top: 16px;
}

.shelf-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.shelf h2,.guide-section h2,.guide-lower h2,.collection h2 {
  font: 400 clamp(2.25rem,3.1vw,3.4rem)/1.1 var(--display);
  letter-spacing: -.042em;
}

.shelf-heading p,.card-content p {
  color: var(--muted);
}

.shelf-heading p {
  margin-top: 5px;
  font-size: 1.05rem;
}

.count,.count-note {
  color: #596753;
  font: 500 .83rem/1.4 var(--sans);
}

.count {
  padding-bottom: 3px;
}

.filters {
  gap: 7px;
  flex-wrap: wrap;
  margin: 19px 0 22px;
}

.filters button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 550 .845rem/1.1 var(--sans);
  padding: 9px 13px;
  border: 1px solid #cecfc2;
  background: #fcfbf6;
  border-radius: 30px;
}

.filters button[aria-pressed=true] {
  background: #344e3c;
  border-color: #344e3c;
  color: #fffcf4;
}

.filters button:not([aria-pressed=true]):hover {
  background: #eff0e7;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: clamp(16px,1.7vw,28px);
}

.activity-card {
  text-decoration: none;
  border: 1px solid #d9d6c8;
  border-radius: 10px;
  overflow: hidden;
  background: #fffdf7;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 4px #372f1e07;
  transition: box-shadow .18s,transform .18s;
}

.activity-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px #372f1e14;
}

.card-art {
  aspect-ratio: 2.27;
  overflow: hidden;
  background: #efdfda;
  border-bottom: 1px solid #61574716;
}

.card-art img {
  display: block;
  object-fit: cover;
  width: 100%;
  height: 100%;
  transition: transform .25s;
}

.activity-card:hover .card-art img {
  transform: scale(1.025);
}

.art-rods {
  background: #dbe0ce;
}

.art-span,.art-compose {
  background: #e8dbc2;
}

.art-measure {
  background: #d7e1dd;
}

.card-content {
  padding: 18px 20px 17px;
  display: flex;
  align-items: start;
  flex-direction: column;
  flex: 1;
}

.card-area {
  font-size: .67rem;
  letter-spacing: .135em;
  gap: 7px;
}

.card-area svg {
  width: 16px;
  height: 16px;
}

.card-content h3,.material-entry h3,.guide-notes h3,.work-note h3 {
  font: 400 clamp(1.45rem,1.95vw,2.1rem)/1.16 var(--display);
  letter-spacing: -.032em;
}

.card-content h3 {
  margin: 7px 0 6px;
}

.card-content p {
  font-size: 1rem;
  line-height: 1.42;
}

.pair-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 13px;
}

.card-content .pair-tags {
  margin-top: auto;
  padding-top: 16px;
}

.tag {
  font: 500 .75rem/1.25 var(--sans);
  gap: 5px;
  color: #525848;
  white-space: nowrap;
}

.material-dot {
  width: 9px;
  height: 9px;
  border: 1px solid #44342b21;
  display: inline-block;
  border-radius: 2px;
}

.pink {
  background: #cf8fa9;
}

.brown {
  background: #8b6346;
}

.red {
  background: #c84439;
}

.number {
  background: linear-gradient(90deg,#c84439 50%,#44789d 50%);
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding-block: 27px;
}

.foot img {
  object-fit: contain;
  display: block;
  max-width: 100%;
}

.foot div,.collection>div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font: 500 .86rem/1.45 var(--sans);
}

footer {
  background: #f0efe5;
  border-top: 1px solid var(--rule);
}

.foot a:hover,.source-link:hover {
  color: #687540;
}

.back-link {
  gap: 8px;
  text-decoration: none;
  font: 550 .855rem/1.5 var(--sans);
  color: #4f6750;
}

.back-link:hover {
  text-decoration: underline;
}

.work-page,.guide-page {
  padding-block: 24px 48px;
  min-height: 70vh;
}

.work-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 20px 0 21px;
}

.work-title h1,.guide-page h1 {
  font: 400 clamp(2.75rem,4.6vw,4.8rem)/1.03 var(--display);
  letter-spacing: -.049em;
  margin-top: 5px;
}

.work-title .pair-tags {
  padding-bottom: 6px;
}

.work-title .tag {
  font-size: .84rem;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0,2.65fr) minmax(247px,1fr);
  align-items: start;
  gap: 20px;
}

.bench,.instruction-panel,.material-entry {
  border: 1px solid #d1d0c2;
  border-radius: 10px;
  overflow: hidden;
  background: #fffdf7;
}

.bench-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  min-height: 52px;
}

.bench-head h2 {
  gap: 8px;
  font: 600 .94rem/1.2 var(--sans);
}

.tools,.piece-tools,.nudges {
  display: flex;
  gap: 4px;
}

.tools button,.nudges button,.piece-tools button {
  border: 1px solid transparent;
  background: transparent;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  min-height: 34px;
  min-width: 34px;
}

.tools button:hover,.nudges button:hover,.piece-tools button:hover {
  background: #e9ecdf;
}

.tools .icon {
  width: 17px;
  height: 17px;
}

.board {
  position: relative;
  background-color: #e8dfc9;
  background-image: repeating-linear-gradient(0deg,#a69a7d14 0 1px,transparent 1px 3px),repeating-linear-gradient(90deg,#faf7e94a 0 1px,transparent 1px 3px),linear-gradient(120deg,#e9e2cf,#f0e8d9 53%,#ddd4bd);
  box-shadow: inset 0 2px 7px #60553625;
  isolation: isolate;
}

.board:after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 9px;
  border: 1px dashed #8b80634a;
  border-radius: 3px;
}

.board>svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 75vh;
  touch-action: none;
  user-select: none;
}

.piece {
  outline: none;
  cursor: grab;
}

.piece:focus-visible .outline,.piece.selected .outline {
  opacity: .8;
  stroke-dasharray: 4 3;
}

.piece .outline {
  opacity: 0;
}

.piece.moving {
  cursor: grabbing;
}

.bench-foot {
  padding: 10px 15px 4px;
  color: #5c6457;
}

.bench-foot span {
  font: 450 .82rem/1.35 var(--sans);
  gap: 7px;
}

.selection {
  min-height: 53px;
  padding: 6px 15px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.select-piece {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 550 .8rem/1.4 var(--sans);
}

select {
  border: 1px solid #bdc1b1;
  border-radius: 5px;
  padding: 8px 28px 8px 9px;
  background-color: #fffdf7;
  color: var(--ink);
  font: 500 .87rem/1.4 var(--sans);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23596557' stroke-width='1.5'/%3E%3C/svg%3E");
  background-position: right 9px center;
  background-repeat: no-repeat;
}

.nudges button,.piece-tools button {
  border-color: #d8dbce;
  background: #f9f8f1;
}

.piece-tools button {
  display: flex;
  padding-inline: 8px;
  gap: 5px;
  font: 550 .78rem/1.4 var(--sans);
}

.instruction-panel {
  padding: 22px;
  background: #f4f3e9;
}

.instruction-panel h2 {
  font: 400 clamp(1.8rem,2.25vw,2.45rem)/1.08 var(--display);
  letter-spacing: -.035em;
  margin: 14px 0 9px;
}

.instruction-panel p {
  line-height: 1.5;
  color: #4e5a4f;
}

.instruction-panel .primary,.instruction-panel .secondary {
  width: 100%;
  margin-top: 17px;
}

.instruction-panel .secondary {
  margin-top: 8px;
}

.instruction-panel .hint {
  background: transparent;
  border: 0;
  width: 100%;
  padding: 12px 3px 3px;
  font-size: .84rem;
  color: #4e664c;
}

.hint:hover {
  text-decoration: underline;
}

.step-track {
  display: flex;
  gap: 5px;
  margin-top: 9px;
}

.step-track i {
  flex: 1;
  height: 3px;
  background: #d5dac9;
  border-radius: 3px;
}

.step-track i.on {
  background: #6b7f5d;
}

.feedback:not(:empty) {
  margin-top: 15px;
  padding: 10px 12px;
  border-left: 2px solid #aa874b;
  background: #fffdf4;
  font-size: .95rem;
}

.feedback.good {
  border-color: #729063;
}

.instruction-panel label {
  display: block;
  margin-top: 12px;
  font: 600 .83rem/1.35 var(--sans);
}

.instruction-panel label select {
  display: block;
  width: 100%;
  margin-top: 4px;
}

.instruction-panel p.count-note {
  margin-top: 9px;
  text-align: center;
  font-size: .79rem;
}

.work-note,.rug-note {
  margin-top: 20px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  padding: 13px 17px;
  background: #f6f5eb;
}

.work-note {
  gap: 13px;
}

.work-note h3 {
  font-size: 1.25rem;
}

.work-note p,.rug-note p {
  color: #4d5a4d;
  margin-top: 4px;
}

.rug-note {
  width: fit-content;
  max-width: 700px;
}

.rug-note summary {
  gap: 9px;
  cursor: pointer;
  font: 600 .9rem/1.4 var(--sans);
}

.rug-note summary::after {
  content: "+";
  margin-left: 8px;
}

.rug-note[open] summary::after {
  content: "−";
}

.rug-note p {
  margin-top: 10px;
}

.mat-expanded {
  overflow: hidden;
}

.bench.expanded {
  position: fixed;
  inset: 0;
  z-index: 20;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.bench.expanded .board {
  flex: 1;
  min-height: 0;
}

.bench.expanded .board>svg {
  height: 100%;
  max-height: 100%;
}

.guide-page>.kicker {
  display: flex;
  margin-top: 25px;
}

.guide-page .intro {
  font-size: 1.18rem;
  max-width: 62ch;
  color: var(--muted);
  margin: 15px 0 32px;
}

.guide-section h2,.guide-lower h2,.collection h2 {
  font-size: 2.15rem;
  margin-bottom: 15px;
}

.materials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.material-entry {
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.material-symbol {
  width: 82px;
  flex: none;
}

.material-entry h3 {
  font-size: 1.55rem;
}

.material-entry p,.guide-notes p {
  font: 400 1rem/1.5 var(--body);
  color: var(--muted);
  margin: 5px 0 8px;
}

.source-link {
  font: 550 .84rem/1.4 var(--sans);
}

.guide-lower {
  margin: 32px 0;
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: 20px;
  border-top: 1px solid var(--rule);
  padding-top: 26px;
}

.guide-lower h2 {
  margin-top: 5px;
}

.guide-notes {
  display: grid;
  gap: 15px;
}

.guide-notes h3 {
  font-size: 1.5rem;
}

.collection {
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

@media(min-width:1600px) {
  .hero-image {
    object-position: 50% 58%;
  }
  .card-art {
    aspect-ratio: 2.33;
  }
}

@media(max-width:900px) {
  .hero-copy {
    max-width: 46%;
  }
  .hero h1 {
    font-size: clamp(3.8rem,8.1vw,4.8rem);
  }
  .hero-actions {
    gap: 8px 16px;
  }
  .hero-inner {
    min-height: 385px;
  }
  .wrap {
    width: calc(100% - 54px);
  }
  .work-grid {
    grid-template-columns: minmax(0,1fr) 235px;
    gap: 13px;
  }
  .instruction-panel {
    padding: 16px;
  }
  .work-title {
    flex-wrap: wrap;
  }
  .card-content {
    padding: 15px;
  }
  .card-grid {
    gap: 13px;
  }
  .card-content h3 {
    font-size: 1.5rem;
  }
  .material-symbol {
    width: 60px;
  }
}

@media(max-width:700px) {
  .mast {
    min-height: 65px;
    gap: 10px;
  }
  .mast nav {
    gap: 16px;
    font-size: .82rem;
  }
  .brand {
    gap: 5px;
  }
  .brand img {
    width: 41px;
    height: 40px;
  }
  .brand strong {
    font-size: 1.37rem;
  }
  .brand small {
    font-size: .55rem;
  }
  .nav-mat {
    padding: 8px 9px;
  }
  .work-grid {
    display: flex;
    flex-direction: column;
  }
  .bench,.instruction-panel {
    width: 100%;
  }
  .work-title {
    margin: 15px 0;
  }
  .instruction-panel h2 {
    margin: 9px 0;
  }
  .guide-lower {
    grid-template-columns: 1fr;
  }
  .card-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .materials-grid {
    grid-template-columns: 1fr;
  }
  .material-entry {
    gap: 12px;
  }
  .foot {
    flex-wrap: wrap;
  }
  .foot div {
    gap: 10px 16px;
  }
}

@media(max-width:650px) {
  .wrap {
    width: calc(100% - 36px);
  }
  .mast {
    flex-wrap: wrap;
    justify-content: space-between;
    padding-top: 8px;
    gap: 5px;
  }
  .brand {
    margin-bottom: 5px;
  }
  .mast nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid #dfdfd1;
    min-height: 43px;
  }
  .mast nav a:not(.nav-mat) {
    padding: 9px 0;
  }
  .nav-mat {
    border: 0;
    padding: 8px 0;
  }
  .hero {
    display: flex;
    flex-direction: column;
  }
  .hero picture {
    position: relative;
    inset: auto;
    order: 2;
    z-index: 0;
    height: auto;
    aspect-ratio: 2.35;
    overflow: hidden;
  }
  .hero-image {
    position: static;
    object-position: center 54%;
  }
  .hero .wash {
    display: none;
  }
  .hero-inner {
    order: 1;
    min-height: 0;
    padding: 24px 0 22px;
  }
  .hero-copy {
    max-width: none;
  }
  .hero h1 {
    font-size: clamp(3.35rem,11.5vw,4.3rem);
    margin: 10px 0;
  }
  .hero h1 br {
    display: none;
  }
  .hero h1 em:before {
    content: " ";
  }
  .hero h1 em {
    white-space: nowrap;
  }
  .hero p {
    font-size: 1.02rem;
    line-height: 1.4;
    max-width: 43ch;
  }
  .hero-actions {
    margin-top: 15px;
    gap: 15px;
  }
  .hero-actions .primary {
    min-height: 40px;
    padding: 9px 13px;
  }
  .hero .kicker {
    font-size: .64rem;
  }
  .kicker.line:before {
    width: 20px;
  }
  .shelf {
    padding-block: 24px 36px;
  }
  .shelf h2 {
    font-size: 2.1rem;
  }
  .filters {
    margin: 13px 0 17px;
    gap: 6px;
  }
  .filters button {
    font-size: .77rem;
    padding: 8px 11px;
  }
  .card-art {
    aspect-ratio: 2.05;
  }
  .card-content {
    padding: 12px;
  }
  .card-content p {
    font-size: .95rem;
  }
  .pair-tags {
    gap: 5px 9px;
  }
  .work-page,.guide-page {
    padding-top: 16px;
  }
  .work-title h1,.guide-page h1 {
    font-size: 2.5rem;
  }
  .bench-foot span {
    font-size: .76rem;
  }
  .work-note {
    align-items: flex-start;
  }
  .guide-page .intro {
    font-size: 1.05rem;
  }
  .foot {
    padding-block: 20px;
  }
  .foot>a img {
    width: 145px;
    height: auto;
  }
  .foot div {
    font-size: .78rem;
  }
}

@media(max-width:480px) {
  .card-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .card-content {
    padding: 15px 17px;
  }
  .card-art {
    aspect-ratio: 2.45;
  }
  .card-content h3 {
    font-size: 1.65rem;
  }
  .card-content .pair-tags {
    padding-top: 12px;
  }
  .card-area {
    font-size: .64rem;
  }
  .select-piece {
    flex-wrap: wrap;
  }
  .selection {
    padding-inline: 10px;
  }
  .mast nav .icon {
    width: 15px;
  }
  .material-entry {
    align-items: flex-start;
  }
  .material-symbol {
    width: 52px;
  }
  .shelf-heading p {
    font-size: .97rem;
  }
}

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

@media(min-width:901px) {
  .hero-image {
    object-fit: contain;
    object-position: right center;
    transform: scale(1.1);
    transform-origin: 90% center;
  }
  .hero {
    background: #eee8db;
  }
}

@media(min-width:651px) and (max-width:900px) {
  .hero-image {
    object-position: 90% center;
  }
}

@media(max-width:650px) {
  .hero picture {
    aspect-ratio: 1160/708;
  }
  .hero-image {
    object-fit: cover;
  }
}
