:root {
  --bg: #ddd4f4;
  --ink: #2c204d;
  --accent: #6339ad;
  --second: #14766e;
  --font: Rockwell, "Courier New", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: .22em; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button, input, select, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid var(--second);
  outline-offset: 5px;
}
::selection { background: var(--second); color: var(--bg); }
.skip {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 10;
  padding: 12px;
  background: var(--ink);
  color: var(--bg);
}
.skip:focus { top: 10px; }
.site-header, main, .site-footer { max-width: 1280px; margin: 0 auto; padding: 0 48px; }
.site-header { padding-top: 36px; }
.wordmark { font-size: clamp(28px, 4vw, 55px); letter-spacing: -.045em; font-weight: 700; }
.wordmark a { text-decoration: none; }
.edition { display: block; font-size: 11px; letter-spacing: .21em; margin-bottom: 14px; }
.tabs { display: flex; flex-wrap: wrap; width: 100%; margin-top: 25px; border-block: 1px solid currentColor; }
.tabs a { padding: 13px 26px; text-decoration: none; border-right: 1px solid currentColor; font-size: 13px; }
.tabs a:first-child { padding-left: 0; }
.tabs a:hover { color: var(--accent); }
.tabs span { margin-left: auto; align-self: center; font-size: 11px; letter-spacing: .1em; }
.hero { display: grid; grid-template-columns: 1.04fr 1fr; gap: 48px; padding: 64px 0 52px; align-items: center; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .17em; }
h1 {
  font-size: clamp(42px, 5.4vw, 74px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -.055em;
  margin: 20px 0 26px;
}
.hero p { max-width: 46ch; margin: 0; font-size: 18px; }
.hero figure { margin: 0; border: 1px solid currentColor; padding: 20px 10px 10px; }
svg { max-width: 100%; width: 100%; height: auto; display: block; overflow: hidden; }
svg text { fill: currentColor; font-family: var(--font); }
figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  font-size: 10px;
  letter-spacing: .1em;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: baseline;
  border-top: 2px solid;
}
.section-heading h2 { font-size: 30px; font-weight: 500; letter-spacing: -.025em; }
.section-heading span { font-size: 11px; color: var(--accent); letter-spacing: .12em; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.guide { padding: 14px 28px 28px 0; min-width: 0; }
.guide + .guide { padding-left: 28px; border-left: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); }
.guide:last-child { padding-right: 0; }
.guide-number { display: block; font-size: 48px; color: var(--accent); line-height: 1.3; letter-spacing: -.05em; }
h3 { font-size: 23px; line-height: 1.25; font-weight: 500; margin: 17px 0; }
.guide p { margin: 0; font-size: 15px; line-height: 1.85; }
.tool-section { margin: 44px 0; padding: 38px; border: 2px solid var(--accent); position: relative; }
.tool-section::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 60px;
  height: 8px;
  background: var(--second);
}
.tool-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-bottom: 30px; }
.tool-heading h2 { font-size: 36px; font-weight: 500; line-height: 1.12; letter-spacing: -.035em; margin: 10px 0; }
.tool-heading p { margin: 0; font-size: 14px; }
.fields { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 23px; }
label { display: flex; flex: 1 1 180px; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 700; }
input, select { min-width: 0; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid; }
input, select { color: var(--ink); background: var(--bg); border-radius: 0; }
input[type='color'] { padding: 4px; }
button { padding: 12px 20px; background: var(--accent); color: var(--bg); border: 1px solid var(--accent); }
button { font-size: 13px; font-weight: 700; min-height: 46px; margin: 0 8px 8px 0; }
button:hover { filter: brightness(1.12); }
button.secondary { background: transparent; color: var(--ink); border-color: currentColor; }
output { display: block; margin-top: 22px; padding: 20px 0 0; border-top: 1px solid; }
output { font-size: 20px; font-weight: 500; min-height: 55px; }
.notes { display: grid; grid-template-columns: .7fr 1.3fr; gap: 45px; margin: 55px 0; }
.notes h2 { font-size: 40px; line-height: 1.1; font-weight: 500; letter-spacing: -.045em; margin: 15px 0; }
.notes ul { margin: 0; padding: 0; list-style: none; }
.notes li { padding: 14px 0 14px 30px; border-bottom: 1px solid; position: relative; font-size: 14px; }
.notes li::before { content: '+'; position: absolute; left: 0; color: var(--accent); font-size: 20px; }
.site-footer { padding-top: 24px; padding-bottom: 36px; display: flex; justify-content: space-between; gap: 30px; }
.site-footer { border-top: 1px solid; font-size: 11px; letter-spacing: .04em; }
.site-footer a { overflow-wrap: anywhere; }
.sudoku-board { display: grid; grid-template-columns: repeat(9, 1fr); max-width: 495px; border: 2px solid; }
.sudoku-board input, .sudoku-board span { min-width: 0; height: 48px; min-height: 0; text-align: center; }
.sudoku-board input, .sudoku-board span { padding: 6px 0; border: .5px solid; font-size: 20px; }
.sudoku-board input { color: var(--accent); font-weight: 700; }
.sudoku-board :nth-child(3n) { border-right-width: 2px; }
.sudoku-board :nth-child(n+19):nth-child(-n+27), .sudoku-board :nth-child(n+46):nth-child(-n+54) {
  border-bottom-width: 2px;
}
.sudoku-board .incorrect { color: #a91e2c; background: #ffe4e7; }
.tool-buttons { margin-top: 20px; }
#pattern { border: 1px solid; max-height: 350px; margin-top: 20px; }
.bounce-stage { max-height: 280px; border-block: 1px dashed; }
.bead-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 28px 0; }
.rod { text-align: center; position: relative; min-width: 0; }
.rod::before {
  content: '';
  position: absolute;
  left: 50%;
  width: 3px;
  top: 40px;
  bottom: 45px;
  background: var(--second);
}
.rod strong { font-size: 11px; display: block; margin-bottom: 18px; }
.rod .bead { position: relative; display: block; width: 70%; max-width: 95px; margin: 9px auto; border-radius: 50%; }
.rod .bead { color: var(--ink); background: var(--bg); border: 2px solid var(--second); padding: 0; min-height: 30px; }
.rod .bead.active { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.rod hr { border: 0; border-top: 5px solid var(--second); margin: 18px 0; }
.rod span { display: block; margin-top: 18px; font-size: 26px; }
.score-history { columns: 2; padding-left: 24px; font-size: 14px; }
body.fountainpens .hero figure { transform: rotate(1deg); border-color: var(--second); }
body.sudoku .hero figure { border: 0; padding: 0; }
body.tessellation .hero { grid-template-columns: .9fr 1.1fr; }
body.tessellation .guide-number { border-bottom: 6px solid var(--second); display: inline-block; padding-right: 20px; }
body.paperengineering .guide { border-top: 1px dashed var(--accent); }
body.paperengineering .tool-section { border-style: dashed; }
body.basketry .hero { padding-top: 40px; }
body.basketry .hero figure { border: 0; }
body.basketry .section-heading { border-top-style: double; border-top-width: 5px; }
body.flowerpressing .hero figure { padding: 24px; box-shadow: 9px 9px 0 var(--second); }
body.flowerpressing .guide-number { font-size: 18px; border: 1px solid; padding: 8px 14px; width: fit-content; }
body.shadowpuppets .hero figure { border: 0; }
body.shadowpuppets h1 { text-transform: uppercase; font-size: clamp(38px, 4.4vw, 61px); }
body.shadowpuppets .tool-section { border-width: 7px 1px 1px; }
body.flipbooks .guide-number { font-size: 18px; border-block: 1px solid; padding: 8px; }
body.flipbooks .hero figure { border-style: dashed; }
body.modelrailway .hero figure { border-radius: 50% / 22%; padding: 30px 10px; }
body.modelrailway .section-heading { border-top: 5px double var(--accent); }
body.abacus .hero figure { border: 0; }
body.abacus .guide-number { color: var(--second); }
body.beadwork .hero figure { border: 8px double var(--accent); }
body.beadwork .notes li::before { content: '●'; font-size: 10px; top: 19px; }
body.dominoes .hero { grid-template-columns: 1fr 1.1fr; }
body.dominoes .hero figure { border: 0; }
body.dominoes .guide-number { color: var(--bg); background: var(--ink); width: 64px; text-align: center; }
@media (max-width: 950px) {
  .site-header, main, .site-footer { padding-left: 28px; padding-right: 28px; }
  .hero, body.tessellation .hero, body.dominoes .hero { gap: 25px; }
  h1 { font-size: 47px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide, .guide + .guide, .guide:last-child { padding: 25px 0; border-left: 0; border-bottom: 1px solid; }
  .guide { display: grid; grid-template-columns: 80px 1fr; column-gap: 22px; }
  .guide-number { grid-row: 1 / 3; align-self: start; }
  .guide h3 { margin-top: 4px; }
  .tool-section { padding: 28px; }
  .tabs span { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .site-header, main, .site-footer { padding-left: 20px; padding-right: 20px; }
  .site-header { padding-top: 24px; }
  .wordmark { font-size: 32px; }
  .tabs a { padding: 12px 14px; font-size: 11px; }
  .hero, body.tessellation .hero, body.dominoes .hero { grid-template-columns: 1fr; padding: 38px 0; gap: 30px; }
  .hero p { font-size: 16px; }
  h1 { font-size: 48px; max-width: 12ch; }
  .hero figure { max-width: 100%; }
  .section-heading { gap: 12px; }
  .section-heading h2 { font-size: 25px; }
  .section-heading span { font-size: 9px; text-align: right; }
  .guide { grid-template-columns: 48px 1fr; column-gap: 18px; }
  .guide-number { font-size: 32px; }
  .guide h3 { font-size: 22px; }
  .guide p { font-size: 14px; }
  .tool-section { padding: 21px 17px; margin: 32px 0; }
  .tool-heading { grid-template-columns: 1fr; gap: 15px; }
  .tool-heading h2 { font-size: 31px; }
  .fields { gap: 15px; }
  label { flex-basis: 100%; }
  output { font-size: 18px; }
  .notes { grid-template-columns: 1fr; gap: 12px; margin: 35px 0; }
  .notes h2 { font-size: 33px; }
  .site-footer { flex-direction: column; gap: 10px; }
  .sudoku-board input, .sudoku-board span { height: 31px; font-size: 16px; padding: 0; line-height: 30px; }
  .bead-board { gap: 9px; }
  .rod strong { font-size: 8px; }
  .rod .bead { width: 88%; }
  .score-history { columns: 1; }
  body.dominoes .guide-number { width: 45px; }
  body.flowerpressing .guide-number { padding: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
