:root {
  --paper: #f8ecd9;
  --ink: #24283b;
  --muted: #5e594f;
  --rule: #c6b7a2;
  --accent: #923c2d;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --serif: Baskerville, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(24px, 5.55vw, 104px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.45; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }
h1,h2,h3,p,figure,dl,dd,fieldset { margin: 0; }
fieldset { padding: 0; border: 0; min-width: 0; }
.skip,.sr,.view-switch input,.choices input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip:focus { left: 16px; top: 10px; z-index: 3; width: auto; height: auto; padding: 10px; clip-path: none; background: var(--paper); }
.masthead { min-height: 77px; display: flex; gap: 35px; align-items: center; padding: 0 var(--gutter); border-bottom: 1px solid var(--rule); }
.brand { display: flex; gap: 11px; align-items: center; }
.brand > span { font-family: var(--serif); font-weight: 700; font-size: 35px; line-height: .88; letter-spacing: -.065em; }
.brand-minor { display: block; font: 9px var(--mono); text-transform: uppercase; letter-spacing: .245em; margin-top: 5px; }
nav { display: flex; gap: clamp(20px, 3.2vw, 56px); margin-left: auto; }
nav a { text-decoration: none; font-size: 13px; font-weight: 550; }
nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.concept { display: inline-flex; align-items: center; gap: 7px; font: 10px var(--mono); letter-spacing: .02em; padding: 7px 11px; border: 1px solid #b4a58d; border-radius: 20px; }
.concept i { background: var(--accent); width: 6px; height: 6px; border-radius: 50%; }
.hero { position: relative; isolation: isolate; display: grid; place-items: center; min-height: clamp(475px,40vw,670px); padding: 60px 24px; background: #a45132; }
.hero-copy { position: relative; text-align: center; padding: 31px clamp(30px,4vw,76px) 32px; width: max-content; max-width: 100%; background: repeating-linear-gradient(0deg,#ffffff0f 0 1px,transparent 1px 3px),#f8ecd9; box-shadow: 0 4px 8px #2b1b2230,0 13px 40px #401c272e; transform: rotate(-1.75deg); }
.hero-copy::before { content: ""; position: absolute; inset: 7px; border: 1px dashed #a79070; pointer-events: none; }
.hero-copy .section-label { justify-content: center; }
.hero-copy .line { display: none; }
.section-label,.sample-code,.sample-foot,.repeat,legend,.cover figcaption { font-family: var(--mono); }
.section-label { display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 600; color: var(--accent); }
.line { width: 28px; height: 1px; background: currentColor; }
.divider { color: #997a60; }
h1,h2,h3 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(78px,7.3vw,136px); line-height: .88; letter-spacing: -.07em; margin: 25px 0 19px; }
h1 em,h2 em { font-weight: 400; }
h1 em { color: var(--accent); }
.hero-copy > p { max-width: 42ch; margin: 0 auto; color: #514e49; font-size: clamp(16px,1.24vw,22px); line-height: 1.52; }
.jump { display: inline-flex; gap: 20px; align-items: center; margin-top: 20px; padding: 12px 16px 12px 18px; background: var(--ink); color: var(--paper); text-decoration: none; font-size: 13px; font-weight: 600; transition: background .18s; }
.jump span { font-size: 19px; font-weight: 400; line-height: 1; }
.jump:hover { background: #803c32; }
.cover { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.cover img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover figcaption { position: absolute; left: var(--gutter); bottom: 18px; padding: 5px 9px; color: #f8ecd9; background: #24283bed; display: flex; gap: 14px; font-size: 10px; letter-spacing: .035em; }
.cover b { text-transform: uppercase; letter-spacing: .08em; }
.library { padding: clamp(52px,5.3vw,94px) var(--gutter) clamp(54px,6vw,100px); }
.section-title { margin: 13px 0 27px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
h2 { font-size: clamp(54px,5.45vw,100px); line-height: .98; letter-spacing: -.058em; }
.section-title p { color: var(--muted); font-size: 14px; line-height: 1.5; padding-bottom: 2px; }
.workbench { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(330px,1fr); gap: clamp(24px,3.4vw,65px); align-items: stretch; }
.sample { display: flex; flex-direction: column; min-width: 0; background: #eee0c9; border: 1px solid var(--rule); }
.sample-head,.sample-foot { display: flex; min-height: 52px; padding: 9px 14px; justify-content: space-between; align-items: center; gap: 8px; }
.sample-code { font-size: 11px; letter-spacing: .07em; }
.view-switch,.option-row { display: flex; }
.view-switch { gap: 1px; padding: 2px; border: 1px solid #b7a990; border-radius: 24px; }
.view-switch label,.choices label { cursor: pointer; position: relative; }
.view-switch label span { display: block; padding: 5px 10px; font-size: 12px; line-height: 1.2; border-radius: 20px; }
.view-switch input:checked + span { color: var(--paper); background: var(--ink); }
.sample-screen { position: relative; flex: 1; min-height: 235px; background: #b76e4b; overflow: hidden; }
#swatch { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sample-foot { min-height: 39px; font-size: 10px; color: #514d47; }
.sample-sig { font-family: var(--serif); font-size: 17px; letter-spacing: -.14em; font-style: italic; }
.controls { border-top: 1px solid var(--rule); padding-top: 17px; }
legend { display: block; text-transform: uppercase; letter-spacing: .115em; font-size: 10px; font-weight: 700; margin: 0 0 10px; }
.option-row { flex-wrap: wrap; gap: 6px; }
.choices label > span { border: 1px solid #bba98f; min-height: 40px; display: flex; align-items: center; gap: 7px; font-size: 12px; padding: 6px 10px; }
.choices label:hover > span { border-color: var(--ink); }
.choices input:checked + span { box-shadow: inset 0 0 0 1px var(--ink); border-color: var(--ink); background: #eddbc0; }
.structures canvas { width: 19px; height: 19px; }
.chips { width: 16px; height: 16px; border: 1px solid #2c263a35; border-radius: 50%; display: inline-block; }
.madder { background: linear-gradient(90deg,#873b39 50%,#ec995d 50%); }
.indigo { background: linear-gradient(90deg,#283653 50%,#879eb0 50%); }
.oat { background: linear-gradient(90deg,#8d7252 50%,#e7d8ae 50%); }
.palette { margin: 17px 0 20px; }
.specs { border-top: 1px solid var(--rule); padding-top: 13px; }
.spec-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
h3 { font-size: 38px; letter-spacing: -.055em; line-height: 1.1; }
.repeat { font-size: 10px; color: var(--muted); white-space: nowrap; }
.specs p { margin: 8px 0 15px; font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 52ch; }
.specs dl { display: flex; flex-wrap: wrap; gap: 14px 36px; }
.specs dt { font: 10px var(--mono); color: var(--muted); }
.specs dd { font-size: 13px; margin-top: 3px; }
.notes { background: var(--ink); color: var(--paper); display: grid; grid-template-columns: .92fr 1.08fr; gap: 48px; padding: clamp(45px,6vw,100px) var(--gutter); }
.notes .section-label { color: #f3ae81; margin: 0 0 22px; }
.notes h2 em { color: #f1b48d; }
.notes-body > p { font: clamp(22px,2.25vw,38px)/1.22 var(--serif); letter-spacing: -.025em; max-width: 40ch; margin-bottom: 24px; }
.notes dl > div { display: grid; grid-template-columns: 90px 1fr; border-top: 1px solid #666373; padding: 11px 0; gap: 14px; }
.notes dt { font-weight: 600; font-size: 13px; }
.notes dd { font-size: 13px; line-height: 1.55; color: #e3d7ca; max-width: 58ch; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 24px var(--gutter); color: var(--muted); font: 10px/1.5 var(--mono); }
.foot-divider { margin: 0 6px; color: var(--accent); }
@media (min-width: 1700px) { .workbench { grid-template-columns: 1.4fr 1fr; } .controls { padding: 25px 0; } .choices label > span { font-size: 15px; padding: 10px 16px; } }
@media (max-width: 880px) {
  .masthead { gap: 23px; min-height: 68px; }
  .hero-copy { padding-inline: 40px; }
  .workbench { gap: 22px; grid-template-columns: minmax(0,1fr) minmax(300px,.86fr); }
  .choices label > span { padding-inline: 7px; }
}
@media (max-width: 680px) {
  :root { --gutter: 20px; }
  .masthead { min-height: 61px; gap: 14px; }
  .brand { gap: 6px; } .brand img { width: 29px; height: 29px; } .brand > span { font-size: 28px; } .brand-minor { font-size: 7px; }
  nav { gap: 14px; } nav a { font-size: 12px; }
  .concept { font-size: 9px; padding: 5px 7px; gap: 4px; }
  .hero { min-height: clamp(425px,76vw,500px); padding: 50px 18px; }
  .hero-copy { width: min(100%,485px); padding: 25px 18px; }
  .section-label { font-size: 9px; }
  h1 { font-size: clamp(52px,11.3vw,76px); line-height: .98; margin: 18px 0 11px; }
  .hero-copy > p { max-width: 36ch; font-size: 15px; }
  .jump { margin-top: 21px; }
  .cover figcaption { left: 13px; bottom: 12px; }
  .section-title { display: block; margin: 14px 0 22px; }
  .section-title p { margin-top: 10px; }
  .section-title p br { display: none; }
  .workbench { grid-template-columns: 1fr; gap: 22px; }
  .sample-screen { flex: none; min-height: 0; aspect-ratio: 1.55; }
  .controls { padding-top: 2px; border: 0; }
  .choices label > span { padding: 8px 10px; }
  .notes { grid-template-columns: 1fr; gap: 24px; }
  .notes h2 br { display: none; } .notes h2 em::before { content: ' '; }
  .notes .section-label { margin-bottom: 13px; }
  .notes dl > div { grid-template-columns: 80px 1fr; }
  footer { align-items: start; flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .masthead { gap: 9px; } nav { gap: 11px; }
  nav a { font-size: 11px; } .concept { max-width: 53px; line-height: 1.05; border: none; border-left: 1px solid var(--rule); border-radius: 0; padding: 0 0 0 8px; }
  .concept i { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *,*::before,*::after { transition: none !important; } }

/* A bound sample ticket uses the same paper, fabric and ink as the cover. */
.hero-copy > p { max-width: 48ch; text-wrap: pretty; }
.section-title > p { max-width: 43ch; }
.library { padding-bottom: clamp(46px, 5.1vw, 86px); }
.ticket { margin: 0 var(--gutter) clamp(56px, 6.3vw, 104px); background: #f4e6cf; border: 1px solid #baaa92; position: relative; }
.ticket::before { content: ""; position: absolute; top: -1px; bottom: -1px; left: 0; width: 9px; background: repeating-linear-gradient(0deg,#8e4035 0 3px,#a75843 3px 4px,#d88754 4px 7px,#e0a06d 7px 8px); border-right: 1px solid #af735b; }
.ticket-head { padding: clamp(26px,3.1vw,54px) clamp(24px,4vw,76px) 0; }
.ticket-head h2 { margin: 16px 0 15px; font-size: clamp(42px,4.8vw,82px); }
.ticket-head > p { color: #46463e; font-size: clamp(15px,1.13vw,18px); line-height: 1.65; }
.ticket-head > p { max-width: 77ch; }
.ticket-fold { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(220px,.95fr); gap: clamp(28px,5.4vw,90px); padding: 24px clamp(24px,4vw,76px) clamp(29px,3.4vw,62px); align-items: center; }
.ticket-method ol { list-style: none; counter-reset: picks; margin: 0; padding: 0; }
.ticket-method li { position: relative; counter-increment: picks; padding: 13px 0 13px 2.9em; border-top: 1px solid #c7b89f; font-size: clamp(14px,1.1vw,17px); line-height: 1.62; max-width: 68ch; color: #46463e; }
.ticket-method li:last-child { padding-bottom: 0; }
.ticket-method li::before { content: "0" counter(picks); position: absolute; top: 16px; left: 0; font: 12px/1.5 var(--mono); color: #8b3c30; }
.ticket-method strong { color: var(--ink); }
.draft-card { padding: clamp(17px,1.7vw,30px); background: #f9eedc; border: 1px solid #c7b398; border-top: 3px solid #92432f; }
.draft-card figcaption { display: grid; gap: 3px; margin-bottom: 14px; }
.draft-card figcaption strong { font: 25px/1.1 var(--serif); color: var(--ink); }
.draft-card figcaption span,.draft-card > p { font: 11px/1.55 var(--mono); color: #5d4f44; }
.draft-card > p { margin-top: 12px; }
.crossings { border-collapse: separate; border-spacing: 2px; width: min(100%, 260px); table-layout: fixed; }
.crossings td,.crossings th { font: 11px/1.4 var(--mono); text-align: center; }
.crossings th { color: #685647; }
.crossings tbody td { background: #e3d0b0; height: clamp(26px,2.45vw,40px); }
.crossings .warp { color: #f8ecd9; background: #323548; }
.notes dt { line-height: 1.45; }
.notes dt small { font: 11px/1.6 var(--mono); color: #efb78e; }
.notes dd { font-size: clamp(14px,1.04vw,17px); line-height: 1.6; }
.notes dl > div { grid-template-columns: minmax(87px,.32fr) minmax(0,1fr); }
@media (max-width: 740px) {
  .ticket-fold { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .draft-card { max-width: 380px; }
  .crossings tbody td { height: 30px; }
}
@media (max-width: 680px) {
  .hero-copy { width: min(100%,485px); }
  .hero-copy > p { max-width: 39ch; }
  .ticket-head { padding-inline: 25px 17px; }
  .ticket-fold { padding-inline: 25px 17px; }
  .ticket-method li { padding-left: 27px; }
  .section-title > p { max-width: 52ch; }
  .notes dl > div { grid-template-columns: 90px minmax(0,1fr); }
}
@media print {
  .hero-copy { transform: none; }
  .ticket,.draft-card { break-inside: avoid; }
}

/* The board label, reading sample and loom slip share a selvedge. */
.edition { margin: 0 0 8px; font: 10px/1.3 var(--mono); color: var(--muted); }
.cover figcaption::after { content: ""; position: absolute; top: 100%; left: 0; height: 20px; border-left: 1px solid #fde1bd; }
.library { position: relative; }
.library::before { content: ""; position: absolute; top: 0; left: var(--gutter); height: clamp(35px,4.5vw,76px); border-left: 1px solid #aa674d; }
.board-label { display: grid; gap: 2px; }
.board-label small,.slip-fields dt,.observation,.physical-limits li,.mill-mark p:first-child { font-family: var(--mono); }
.board-label small { color: var(--accent); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; }
.sample-code { font-size: clamp(19px,2vw,28px); line-height: 1.2; letter-spacing: -.03em; }
.sample-head { padding-block: 13px; }
.choices label > span { min-height: 44px; }
#swatches:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.notes { grid-template-columns: minmax(0,.55fr) minmax(0,1.45fr); gap: clamp(25px,4vw,70px); }
.notes dl > div { grid-template-columns: 84px 192px minmax(0,1fr); align-items: start; column-gap: clamp(12px,2vw,30px); padding: 22px 0; }
.notes-body > p { margin-bottom: 28px; }
.open-draft { display: inline-flex; flex-direction: column; gap: 6px; align-items: start; color: #ffd3ac; font: 11px/1.4 var(--mono); text-decoration: none; }
.open-draft span { border-bottom: 1px solid #a99179; }
.open-draft canvas { display: block; }
.open-draft:hover span { color: #fff3e5; border-color: currentColor; }
.open-draft:focus-visible { outline-color: #ffcc96; }
.draft-specimen { overflow-x: auto; padding: 4px; margin: -4px; }
html:not(.has-loom) .draft-specimen { display: none; }
html:not(.has-loom) .notes dl > div { grid-template-columns: 95px minmax(0,1fr); }
.ticket { margin-top: clamp(44px,5.4vw,90px); margin-bottom: clamp(40px,5vw,78px); }
.ticket-method li { padding-left: 60px; }
.ticket-method li::before { top: 10px; font: italic 40px/1.1 var(--serif); letter-spacing: -.07em; }
.loom-area { padding: 0 var(--gutter) clamp(38px,5vw,70px); }
.loom-slip { position: relative; margin: auto; max-width: 1240px; padding: clamp(27px,4vw,54px); border: 1px solid #b8aa8f; border-top: 2px dashed #ad8c70; background: #faeedb; }
.loom-slip::before { content: ""; position: absolute; inset: 0 auto 0 -1px; width: 9px; background: repeating-linear-gradient(0deg,#8e4035 0 3px,#a75843 3px 4px,#d88754 4px 7px,#e0a06d 7px 8px); border-right: 1px solid #af735b; }
.slip-head h2 { margin: 11px 0 12px; font-size: clamp(43px,5vw,79px); }
.slip-head > p,.render-note p,.physical-limits p { font-size: clamp(14px,1.1vw,17px); line-height: 1.6; color: #4b473e; }
.slip-head > p { max-width: 63ch; }
.slip-columns { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,.9fr); gap: clamp(25px,5.2vw,78px); margin: 28px 0 23px; }
.slip-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.slip-fields div { padding-top: 5px; border-top: 1px solid #bfad91; }
.slip-fields div:first-child { grid-column: 1/-1; }
.slip-fields dt,.observation { font-size: 11px; color: var(--accent); }
.slip-fields dd { font: 15px/1.5 var(--mono); }
.slip-fields div:first-child dd { font-size: 22px; }
.observation { display: block; margin-top: 18px; }
.observation small { display: inline-block; color: var(--muted); font: 11px/1.4 var(--sans); }
#observation { width: 100%; padding: 9px 0; font: 15px/1.4 var(--serif); color:var(--ink); background: transparent; border: 0; border-radius: 0; border-bottom: 1px solid #9c856c; }
#observation:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.physical-limits h3 { margin: 3px 0 8px; font-size: clamp(26px,2.2vw,37px); }
.physical-limits ul { list-style: none; padding: 0; margin: 12px 0 0; }
.physical-limits li { position: relative; padding: 3px 0 3px 22px; font-size: 12px; }
.physical-limits li::before { content: ""; position: absolute; top: 7px; left: 1px; width: 8px; height: 8px; border: 1px solid #966e50; background: linear-gradient(135deg,transparent 46%,#966e50 48% 54%,transparent 56%); }
.physical-limits li span { color: var(--muted); font-family: var(--sans); }
.render-note { max-width: 82ch; }
.slip-bottom { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-top: 21px; padding-top: 17px; border-top: 1px solid #c0ab90; }
.slip-bottom .jump { margin: 0; }
.mill-mark p:first-child { color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: .13em; }
.mill-mark p:last-child { margin-top: 4px; font: italic 15px/1.45 var(--serif); color: var(--ink); }
footer { border-top: 1px solid var(--rule); }
@media (max-width: 950px) {
  .notes { grid-template-columns: 1fr; }
  .notes h2 br { display: none; }
  .notes h2 em::before { content: " "; }
}
@media (max-width: 680px) {
  .library::before { height: 36px; left: 13px; }
  .sample-head { padding: 10px; }
  .sample-code { font-size: 18px; }
  .view-switch label span { min-height: 38px; display: grid; align-items: center; }
  .notes dl > div { grid-template-columns: 1fr; gap: 10px; }
  .notes dt br { display: none; }
  .notes dt small { margin-left: 8px; }
  .open-draft { max-width: 100%; }
  .ticket-method li { padding-left: 45px; }
  .ticket-method li::before { font-size: 35px; }
  .slip-columns { grid-template-columns: minmax(0,1fr); }
  .loom-slip { padding: 24px 18px 24px 24px; }
  .slip-bottom { flex-direction: column; align-items: stretch; gap: 24px; }
  .slip-bottom .jump { justify-content: space-between; }
  .slip-fields dd { font-size: 14px; }
}
@media print {
  .loom-slip { break-inside: avoid; }
  #observation::placeholder { color: transparent; }
}
