@font-face {
  font-family: "Archivo Narrow";
  src: url("assets/fonts/archivo-narrow.woff2") format("woff2");
  font-weight: 600 700;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-3.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #102638;
  --night: #102638;
  --canvas: #20374a;
  --paper: #f4ebd9;
  --slip: #faf4e8;
  --muted: #4a5357;
  --cream: #fff4df;
  --line: #ae9c7d;
  --amber: #f0b960;
  --berry: #92314c;
  --gutter: clamp(20px, 5vw, 80px);
  font: 100% / 1.45 "Source Sans 3", sans-serif;
  color: var(--ink);
  background: var(--night);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, p, h1, h2, h3, figure, fieldset { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .24em; }
a, input, button, label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: #f0b96045;
}
button, input { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--berry);
  outline-offset: 4px;
}
h1:focus-visible, h2:focus-visible { outline: 2px solid var(--berry); outline-offset: 4px; }
::selection { color: var(--ink); background: #f1bd81; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 12px 20px;
  background: var(--slip);
}
h1, h2, h3 {
  font-family: "Archivo Narrow", sans-serif;
  font-weight: 700;
  line-height: .92;
  letter-spacing: -.025em;
}
.masthead {
  min-block-size: 75px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 7px max(var(--gutter), env(safe-area-inset-right)) 7px max(var(--gutter), env(safe-area-inset-left));
  background: var(--paper);
}
.brand {
  display: grid;
  place-items: center start;
  width: clamp(132px, 13.9vw, 191px);
  min-height: 44px;
  flex-shrink: 0;
}
.header-link {
  display: grid;
  place-items: center;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration-thickness: 1px;
  white-space: nowrap;
}
.header-link:hover, .fit-note a:hover, .manual:hover, .back:hover { color: var(--berry); }
.workbench { margin-inline: auto; max-width: 1920px; width: 100%; }
.interactive body { display: grid; grid-template-rows: auto 1fr auto; min-height: 100svh; }
.interactive .workbench { display: grid; }
.stage { position: relative; isolation: isolate; }
.opening {
  display: grid;
  min-height: clamp(615px, calc(100svh - 151px), 855px);
  align-items: start;
  padding-block: clamp(22px, 4vw, 56px) 48px;
  background: var(--canvas);
}
.work-photo {
  position: absolute;
  inset: 0;
}
.work-photo img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: 60% 56%;
}
.work-photo figcaption, .wind-photo figcaption {
  position: absolute;
  right: var(--gutter);
  bottom: 15px;
  background: var(--night);
  color: var(--cream);
  font-size: .8rem;
  padding: 4px 9px;
}
.paper-slip {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: clamp(20px, 3vw, 48px);
  row-gap: 10px;
  width: min(86%, 1280px);
  padding: clamp(20px, 2.4vw, 35px) clamp(22px, 3.1vw, 48px) clamp(22px, 2.6vw, 39px) var(--gutter);
  background: var(--paper);
  border-block-end: 1px solid #cdbb9b;
}
.paper-slip h1 {
  grid-column: 1;
  font-size: clamp(2.7rem, 6.1vw, 6.2rem);
  text-wrap: balance;
}
.paper-slip p {
  grid-column: 1;
  font-size: clamp(1.06rem, 1.54vw, 1.38rem);
  line-height: 1.28;
  max-width: 56ch;
  text-wrap: pretty;
}
.action {
  display: inline-grid;
  place-items: center;
  text-align: center;
  min-height: 49px;
  width: fit-content;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: var(--berry);
  color: #fff8eb;
  font-weight: 700;
  font-size: 1.06rem;
  line-height: 1.16;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease-out;
}
.action:hover, .action:active { background: #6f2339; }
.paper-slip .action {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.thread-route {
  color: var(--cream);
  padding: 14px var(--gutter) 12px;
  background: var(--night);
}
.thread-route ol {
  max-width: 1760px;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
}
.thread-route li {
  border-top: 2px dashed #86765d;
  position: relative;
  text-align: center;
}
.thread-route li:has([aria-current="step"]) {
  border-top: 2px solid var(--amber);
}
.thread-route li:has([aria-current="step"])::before {
  content: "";
  position: absolute;
  top: -4px;
  left: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}
.thread-route a, .thread-route span {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 3px 5px 0;
  text-decoration: none;
  font-size: clamp(.86rem, 1.4vw, 1.08rem);
  font-weight: 600;
  line-height: 1.16;
}
.thread-route a[aria-current="step"], .thread-route a:hover { color: var(--amber); }
.thread-route a:focus-visible { outline-color: var(--amber); }
.thread-route span { color: #a8b1b6; }

.match {
  padding: clamp(80px, 18vh, 186px) var(--gutter) 39px;
  min-height: clamp(615px, calc(100svh - 151px), 855px);
  background: var(--canvas);
}
.continuing-seam {
  position: absolute;
  inset: 0 0 auto;
  height: clamp(135px, 26vh, 280px);
  z-index: -1;
  background: var(--canvas) url("assets/paused-seam.webp") 64% 57% / cover;
}
.pattern {
  max-width: 1310px;
  margin-inline: auto;
  background: var(--paper);
  padding: clamp(26px, 3.4vw, 51px);
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(22px, 4vw, 58px);
  position: relative;
}
.pattern::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed #a2753d;
  pointer-events: none;
}
.check h2, .wind-content h2 { font-size: clamp(3.3rem, 5.52vw, 6.15rem); }
.check > p {
  margin-block: 15px 20px;
  font-size: clamp(1.05rem, 1.34vw, 1.22rem);
  line-height: 1.38;
  max-width: 38ch;
  color: var(--muted);
}
.choices {
  min-width: 0;
  border: 0;
  padding: 0;
  display: grid;
  gap: 5px;
}
.choices legend { font-weight: 700; padding: 0; margin-bottom: 7px; }
.choices label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  min-height: 46px;
  padding: 4px 12px;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 700;
  cursor: pointer;
}
.choices label:hover { background: var(--slip); border-color: var(--berry); }
.choices label:has(input:checked) {
  background: #f9e5e3;
  border-color: var(--berry);
  box-shadow: inset 0 0 0 1px var(--berry);
}
.choices label:has(:focus-visible) { outline: 3px solid var(--berry); outline-offset: 2px; }
.choices label:has(:focus-visible) input { outline: none; }
.choices input {
  inline-size: 19px;
  block-size: 19px;
  margin: 0;
  accent-color: var(--berry);
  flex: 0 0 auto;
}

.fit-area {
  align-self: stretch;
  min-width: 0;
  display: grid;
  align-items: center;
  border-inline-start: 1px solid var(--line);
  padding-inline-start: clamp(22px, 4vw, 58px);
}
.fit-note h3 { font-size: clamp(2rem, 3vw, 3rem); }
.fit-note p { color: var(--muted); max-width: 33ch; margin-top: 12px; }
.fit-note a, .manual, .back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  line-height: 1.15;
}
.matched {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 18px 17px;
}
.specimen {
  background: var(--slip);
  border: 1px solid #d1c3a9;
}
.specimen img { width: 100%; mix-blend-mode: multiply; }
.match-stamp {
  color: var(--berry);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
}
.matched h3 { font-size: clamp(1.65rem, 2.75vw, 3rem); }
.part-no {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.matched .part-no { margin-top: 10px; }
.price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 1.55rem;
  line-height: 1.18;
}
.price small { color: var(--muted); font-size: .75rem; }
.matched > .action { grid-column: 1 / -1; width: 100%; }

.wind {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  min-height: clamp(615px, calc(100svh - 151px), 855px);
  background: var(--canvas);
}
.wind-photo { position: relative; min-height: 360px; }
.wind-photo img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: 64% 55%;
}
.wind-photo figcaption { right: 15px; }
.wind-content {
  align-self: center;
  background: var(--paper);
  margin: 28px var(--gutter) 28px -22px;
  padding: clamp(22px, 3vw, 44px);
  z-index: 1;
}
.wind-content > p {
  font-size: clamp(1.01rem, 1.36vw, 1.2rem);
  color: var(--muted);
  line-height: 1.37;
  margin-top: 15px;
  max-width: 40ch;
}
.part-slip {
  background: var(--slip);
  border-block: 1px dashed #ae8a59;
  padding: 12px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 9px 12px;
  margin-top: 9px;
}
.part-slip > img { width: 76px; mix-blend-mode: multiply; }
.part-slip h3 { font-size: clamp(1.25rem, 1.85vw, 1.7rem); }
.part-slip .price { font-size: 1.08rem; margin-top: 5px; }
.part-slip input {
  max-width: 9em;
  width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--slip);
  color: var(--ink);
  margin-top: 4px;
}
.copy { grid-column: 1 / -1; min-height: 44px; font-size: .98rem; }
.copy-status { grid-column: 1 / -1; font-size: .9rem; color: var(--muted); }
.copy-status:empty { display: none; }
.back { margin-top: 4px; }
.javascript-note { background: var(--paper); padding: 15px var(--gutter); }
html:not(.interactive) .copy { display: none; }

@media (max-width: 950px) {
  .pattern { padding: 26px; gap: 24px; }
  .fit-area { padding-inline-start: 18px; }
  .matched { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); }
  .wind-content { margin-inline-end: 25px; padding: 23px; }
}
@media (max-width: 700px) {
  .masthead { min-height: 62px; padding-block: 6px; }
  .brand { width: clamp(123px, 32vw, 157px); }
  .header-link { font-size: .9rem; }
  .opening { padding: 0; min-height: 0; grid-template-rows: 1fr auto; align-items: stretch; }
  .work-photo {
    position: relative;
    min-height: clamp(255px, 83vw, 408px);
    height: 100%;
  }
  .work-photo img { object-position: 73% 53%; }
  .work-photo figcaption { right: 11px; bottom: 23px; font-size: .73rem; }
  .paper-slip {
    display: block;
    width: 100%;
    padding: 18px var(--gutter) 22px;
    border-block-start: 1px solid #cdbb9b;
  }
  .paper-slip h1 {
    font-size: clamp(3.25rem, 13.5vw, 5rem);
    max-width: 11ch;
    margin-bottom: 9px;
  }
  .paper-slip p { font-size: 1.04rem; line-height: 1.27; max-width: 35ch; }
  .paper-slip .action { margin-top: 13px; width: 100%; }
  .thread-route { padding: 11px 10px 3px; }
  .thread-route a, .thread-route span { font-size: .84rem; }
  .match { padding: 83px 12px 12px; min-height: 0; }
  .continuing-seam { height: 125px; background-position: 64% 49%; }
  .pattern { grid-template-columns: 1fr; gap: 17px; padding: 19px 19px 16px; }
  .pattern::after { inset: 5px; }
  .check h2, .wind-content h2 { font-size: clamp(2.4rem, 9.4vw, 4rem); }
  .check h2 br { display: none; }
  .check > p { font-size: 1rem; margin-block: 7px 10px; }
  .choices label { min-height: 44px; }
  .choices legend { font-size: .93rem; }
  .fit-area {
    border-inline-start: 0;
    border-top: 1px solid var(--line);
    padding-inline-start: 0;
    padding-top: 14px;
  }
  .fit-note h3 { font-size: 1.85rem; }
  .fit-note p { font-size: .97rem; margin-top: 7px; }
  .matched { grid-template-columns: minmax(0, .73fr) minmax(0, 1.27fr); gap: 12px; }
  .matched h3 { font-size: clamp(1.36rem, 5.5vw, 2rem); }
  .match-stamp { font-size: .86rem; margin-bottom: 5px; }
  .matched .part-no { font-size: .94rem; margin-top: 6px; }
  .matched .price { font-size: 1.22rem; }
  .matched .action { min-height: 45px; }
  .wind { grid-template-columns: 1fr; min-height: 0; }
  .wind-photo { min-height: clamp(215px, 63vw, 380px); }
  .wind-photo figcaption { right: 11px; bottom: 18px; font-size: .73rem; }
  .wind-content { margin: -10px 12px 12px; padding: 18px; }
  .wind-content h2 br { display: none; }
  .wind-content > p { font-size: 1.01rem; margin-top: 8px; }
  .part-slip { grid-template-columns: 64px minmax(0, 1fr); }
  .part-slip > img { width: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@media (pointer: fine) { html { overscroll-behavior: none; } }
