/* Purl & Paper. Concept: a crafter's work table on graph paper. Running-stitch lines are the divider motif,
   tools sit on the table like pinned paper pieces, and the hero is a knitted swatch you can knit and colour yourself. */
:root {
  --ink: #1f2a44;
  --ink-2: #4a5470;
  --paper: #eef2ef;
  --sheet: #fbfcfa;
  --marigold: #f4a823;
  --berry: #b8326a;
  --teal: #2f8f8a;
  --kraft: #c9a37a;
  --line: rgba(31, 42, 68, 0.14);
  --display: "Bricolage Grotesque", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --r: 14px;
  --shadow: 0 1px 0 rgba(31,42,68,0.06), 0 10px 26px -12px rgba(31,42,68,0.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; color: var(--ink); font: 400 1.0625rem/1.65 var(--body);
  background-color: var(--paper);
  background-image: linear-gradient(rgba(47,143,138,0.09) 1px, transparent 1px), linear-gradient(90deg, rgba(47,143,138,0.09) 1px, transparent 1px);
  background-size: 28px 28px;
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: var(--berry); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; margin: 0 0 0.5em; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 36px); margin-inline: auto; }
.narrow { width: min(1160px, 100% - 36px); margin-inline: auto; }
.narrow > * { max-width: 780px; }
.narrow > .tbl-wrap, .narrow > .finder { max-width: 860px; }
.muted { color: var(--ink-2); }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 36em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stitch { border: 0; border-top: 2.5px dashed rgba(31,42,68,0.28); margin: 0; }

/* header */
.head { position: sticky; top: 0; z-index: 50; background: rgba(251,252,250,0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 2.5px dashed rgba(31,42,68,0.22); }
.head .wrap { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.35rem var(--display); color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand svg { width: 36px; height: 36px; }
.brand i { font-style: normal; color: var(--berry); }
.nav { display: flex; gap: 4px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.98rem; }
.nav a:hover { background: rgba(244,168,35,0.18); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.burger { display: none; margin-left: auto; font: 700 1rem var(--body); color: var(--ink); background: var(--sheet); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 16px; cursor: pointer; }
@media (max-width: 920px) {
  .burger { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--sheet); padding: 10px 18px 18px; border-bottom: 2.5px dashed var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 700 1rem var(--body); text-decoration: none; color: #fff; background: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 12px 22px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 6px 0 -1px var(--marigold); }
.btn.gold { background: var(--marigold); border-color: var(--marigold); color: var(--ink); }
.btn.gold:hover { color: var(--ink); box-shadow: 0 6px 0 -1px var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--sheet); }
.btn.sm { padding: 8px 16px; font-size: 0.92rem; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* sections */
section { padding: 64px 0; }
.sh { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.sh h2 { margin: 0; }
.sh p { margin: 0; }
.page-top { padding: 52px 0 24px; }
.page-top .lead { margin-top: 6px; }
.crumbs { font-size: 0.92rem; color: var(--ink-2); margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); }

/* paper pieces */
.sheet { position: relative; background: var(--sheet); border-radius: var(--r); box-shadow: var(--shadow); padding: 24px; }
.tape::before { content: ""; position: absolute; top: -11px; left: 50%; width: 92px; height: 24px; margin-left: -46px; background: var(--tape, rgba(244,168,35,0.75)); transform: rotate(-3deg); border-left: 3px dotted rgba(255,255,255,0.6); border-right: 3px dotted rgba(255,255,255,0.6); opacity: 0.9; }

/* HERO: knitted fabric, full width, with a yarn ball band as the headline label */
.hero { position: relative; min-height: clamp(620px, 88svh, 820px); display: flex; align-items: center; overflow: hidden; padding: 48px 0 110px; border-bottom: 2.5px dashed rgba(31,42,68,0.28); }
.fabric { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.hero-in { position: relative; z-index: 2; pointer-events: none; }
.hero-in > * { pointer-events: auto; }
.ballband { position: relative; max-width: 600px; background: var(--sheet); padding: 26px 40px 22px; border-radius: 6px; transform: rotate(-1.4deg);
  box-shadow: 0 2px 0 rgba(31,42,68,0.05), 0 30px 60px -24px rgba(31,42,68,0.55);
  background-image: linear-gradient(90deg, var(--berry) 0 14px, transparent 14px calc(100% - 14px), var(--berry) calc(100% - 14px)),
    linear-gradient(90deg, rgba(0,0,0,0.12), transparent 30px, transparent calc(100% - 30px), rgba(0,0,0,0.12)); }
.ballband::before, .ballband::after { content: ""; position: absolute; top: -6px; bottom: -6px; width: 22px; background: radial-gradient(circle at 11px 8px, var(--sheet) 3px, transparent 3.5px) 0 0 / 22px 16px; }
.ballband::before { left: -11px; } .ballband::after { right: -11px; }
.bb-top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 0.92rem; color: var(--ink-2); padding-bottom: 12px; margin-bottom: 18px; border-bottom: 2.5px dashed var(--line); }
.bb-wt { width: 40px; color: var(--berry); }
.ballband h1 { font-size: clamp(2.6rem, 5.6vw, 4.3rem); margin-bottom: 14px; }
.ballband h1 .l2 { color: var(--berry); display: block; } .ballband h1 .l3 { color: var(--teal); display: block; }
.ballband .lead { font-size: 1.1rem; margin-bottom: 0; }
.ballband .btns { margin-top: 20px; }
.bb-specs { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 10px; margin: 22px 0 0; padding-top: 14px; border-top: 2.5px dashed var(--line); }
.bb-specs dt { font-size: 0.75rem; font-weight: 700; color: var(--ink-2); }
.bb-specs dd { margin: 0; font: 800 1.05rem var(--display); }
.knit-ctl { position: absolute; right: 18px; bottom: -84px; display: flex; align-items: center; gap: 12px; background: rgba(251,252,250,0.95); padding: 10px 12px 10px 18px; border-radius: 999px; box-shadow: var(--shadow); }
.kc-l { font-weight: 700; font-size: 0.9rem; }
.yarns { display: flex; gap: 7px; flex-wrap: wrap; }
.yarn-btn { width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; background: var(--c); background-image: repeating-linear-gradient(35deg, rgba(255,255,255,0.22) 0 3px, transparent 3px 7px), repeating-linear-gradient(-35deg, rgba(0,0,0,0.12) 0 2px, transparent 2px 8px); box-shadow: inset 0 -4px 6px rgba(0,0,0,0.18), 0 0 0 1px rgba(31,42,68,0.15); transition: transform .15s; }
.yarn-btn[aria-pressed="true"] { border-color: var(--ink); transform: scale(1.12); }
.row-chip { font: 800 1rem var(--display); background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kc-reset { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); background: #fff; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.linkbtn { font: 700 0.92rem var(--body); color: var(--berry); background: none; border: 0; padding: 4px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) {
  .hero { display: block; min-height: 0; padding: 22px 0 250px; }
  .ballband { padding: 20px 26px 18px; transform: rotate(-0.8deg); }
  .bb-specs { display: none; }
  .knit-ctl { left: 0; right: 0; bottom: -228px; justify-content: space-between; padding: 8px 10px 8px 14px; gap: 8px; }
  .kc-l { display: none; }
  .yarn-btn { width: 30px; height: 30px; }
}

/* the work table: tool pieces */
.table { display: grid; grid-template-columns: repeat(12, 1fr); gap: 26px 22px; }
.piece { grid-column: span 4; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--sheet); border-radius: var(--r); padding: 26px 24px 22px; box-shadow: var(--shadow); position: relative; transition: transform .2s, box-shadow .2s; }
.piece:nth-child(odd) { transform: rotate(-0.7deg); }
.piece:nth-child(even) { transform: rotate(0.6deg); }
.piece:hover, .piece:focus-visible { color: var(--ink); transform: rotate(0) translateY(-4px); box-shadow: 0 1px 0 rgba(31,42,68,0.06), 0 22px 36px -16px rgba(31,42,68,0.45); }
.piece.big { grid-column: span 7; }
.piece.mid { grid-column: span 5; }
.piece p { color: var(--ink-2); margin-bottom: 16px; }
.piece .go { margin-top: auto; font-weight: 700; color: var(--berry); }
.piece.t1 { --tape: rgba(244,168,35,0.75); }
.piece.t2 { --tape: rgba(47,143,138,0.55); }
.piece.t3 { --tape: rgba(184,50,106,0.5); }
.piece.t4 { --tape: rgba(201,163,122,0.8); }
@media (max-width: 960px) { .piece, .piece.big, .piece.mid { grid-column: span 6; } }
@media (max-width: 640px) { .table { grid-template-columns: 1fr; } .piece, .piece.big, .piece.mid { grid-column: auto; } }
.mini-count { display: flex; align-items: center; gap: 16px; margin: 4px 0 18px; }
.mini-count b { font: 800 4.4rem/1 var(--display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.mini-count span { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--marigold); font: 800 2rem var(--display); }
.mini-count small { color: var(--ink-2); font-size: 0.9rem; }
.skeins { display: flex; gap: 6px; margin: 4px 0 18px; align-items: end; }
.skeins i { width: 34px; height: 46px; border-radius: 40% 40% 36% 36%; background: var(--teal); background-image: repeating-linear-gradient(70deg, rgba(255,255,255,0.22) 0 3px, transparent 3px 7px); }
.skeins i:nth-child(2) { background-color: #3aa39d; } .skeins i:last-child { opacity: 0.35; }
.mini-gauge { display: flex; align-items: center; gap: 12px; margin: 2px 0 16px; }
.mini-gauge svg { width: 84px; height: 84px; background: #f6f2ea; border-radius: 10px; padding: 6px; }
.mini-gauge span { font: 800 1rem var(--display); color: var(--ink-2); }
.mini-proj { list-style: none; padding: 0; margin: 2px 0 16px; display: grid; gap: 9px; font-size: 0.9rem; font-weight: 700; }
.mini-proj i { display: block; height: 8px; border-radius: 99px; margin-top: 3px; background: linear-gradient(90deg, var(--c) var(--p), rgba(31,42,68,0.1) var(--p)); }
.prompt-peek { font: 700 1.15rem/1.35 var(--display); margin: 2px 0 16px; padding: 12px 14px; background: #f6efe2; border-radius: 10px; border-left: 5px solid var(--berry); }

/* tool panels */
.tool { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 26px; align-items: start; }
@media (max-width: 860px) { .tool { grid-template-columns: 1fr; } }
label, .label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
input[type=text], input[type=number], input[type=search], input[type=url], input[type=date], select, textarea {
  width: 100%; font: 400 1.05rem var(--body); color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 11px 13px; min-height: 48px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(47,143,138,0.2); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: inline-flex; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { font: 700 0.95rem var(--body); color: var(--ink); background: none; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; min-height: 40px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.result { background: var(--ink); color: #fff; border-radius: var(--r); padding: 26px; position: sticky; top: 90px; }
.result h3 { color: var(--marigold); font-size: 1rem; letter-spacing: 0; margin-bottom: 4px; font-family: var(--body); }
.result .big { font: 800 clamp(3rem, 7vw, 4.4rem)/1 var(--display); letter-spacing: -0.04em; margin: 4px 0 6px; }
.result p { color: rgba(255,255,255,0.82); }
.result .sub { font-size: 0.95rem; }
.result hr { border: 0; border-top: 2px dashed rgba(255,255,255,0.25); margin: 18px 0; }
.result .skein-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.result .skein-row i { width: 22px; height: 30px; border-radius: 40%; background: var(--marigold); background-image: repeating-linear-gradient(70deg, rgba(255,255,255,0.3) 0 2px, transparent 2px 6px); }
.result .skein-row i.part { background-color: rgba(244,168,35,0.45); }
.note { font-size: 0.92rem; color: var(--ink-2); }

/* row counter */
.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.counter { max-width: 640px; width: 100%; }
.counter { background: var(--sheet); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 18px 20px; position: relative; }
.counter .c-name { font: 800 1.25rem var(--display); border: 0; background: transparent; padding: 4px 0; min-height: 0; width: calc(100% - 40px); border-bottom: 2px dashed transparent; border-radius: 0; }
.counter .c-name:focus { border-bottom-color: var(--teal); box-shadow: none; }
.counter .c-del { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: #fff; cursor: pointer; font-size: 1rem; color: var(--ink-2); }
.odo { position: relative; display: flex; justify-content: center; gap: 6px; padding: 16px 22px; margin: 12px 0 10px; border-radius: 18px;
  background: linear-gradient(180deg, #34415f, #1f2a44 60%, #18213a); box-shadow: inset 0 2px 0 rgba(255,255,255,0.1), inset 0 -6px 0 rgba(0,0,0,0.3), 0 10px 22px -12px rgba(31,42,68,0.7); }
.odo::before, .odo::after { content: ""; position: absolute; top: 10px; bottom: 10px; width: 8px; border-radius: 6px; background: linear-gradient(90deg, #c98a12, #f4c15a 45%, #b87a0c); }
.odo::before { left: 8px; } .odo::after { right: 8px; }
.dg { --dh: clamp(78px, 21vw, 108px); width: calc(var(--dh) * 0.68); height: var(--dh); overflow: hidden; border-radius: 9px;
  background: linear-gradient(180deg, #d8d0c0 0%, #fbf8f2 22%, #fbf8f2 78%, #d8d0c0 100%); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25); position: relative; }
.dg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.28), transparent 26%, transparent 74%, rgba(0,0,0,0.28)); pointer-events: none; }
.strip { display: block; transform: translateY(calc(var(--d, 0) * var(--dh) * -1)); transition: transform .5s cubic-bezier(.3, 1.35, .5, 1); }
.strip b { display: block; height: var(--dh); line-height: var(--dh); text-align: center; font: 800 calc(var(--dh) * 0.74) var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.c-num { font: 800 clamp(5rem, 18vw, 7.5rem)/1 var(--display); text-align: center; letter-spacing: -0.05em; margin: 10px 0 4px; font-variant-numeric: tabular-nums; }
.c-num.bump { animation: bump .25s ease; }
@keyframes bump { 50% { transform: scale(1.08); color: var(--berry); } }
.c-of { text-align: center; color: var(--ink-2); font-weight: 700; min-height: 1.6em; }
.c-bar { height: 10px; border-radius: 99px; background: rgba(31,42,68,0.1); overflow: hidden; margin: 8px 0 14px; }
.c-bar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(45deg, var(--teal) 0 8px, #3aa39d 8px 16px); transition: width .25s; }
.c-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.c-btns button { font: 800 2.4rem var(--display); border-radius: 16px; border: 0; cursor: pointer; min-height: 84px; color: var(--ink); }
.c-minus { background: #e3e8e5; }
.c-plus { background: var(--marigold); box-shadow: inset 0 -5px 0 rgba(0,0,0,0.12); }
.c-plus:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0,0,0,0.12); }
.c-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.c-opts label { font-size: 0.82rem; color: var(--ink-2); margin-bottom: 4px; }
.c-opts input { min-height: 42px; padding: 8px 10px; font-size: 0.98rem; }
.c-rep { margin-top: 12px; text-align: center; font-weight: 700; background: rgba(184,50,106,0.1); color: var(--berry); border-radius: 10px; padding: 8px; }
.c-foot { display: flex; justify-content: space-between; margin-top: 10px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.toolbar .spacer { flex: 1; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--teal); }

/* gauge */
.gauge-viz { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.gauge-viz figure { margin: 0; text-align: center; font-size: 0.85rem; color: rgba(255,255,255,0.8); }
.gauge-viz svg { width: 100%; height: auto; background: rgba(255,255,255,0.06); border-radius: 10px; }

/* project tracker */
.proj-form { margin-bottom: 30px; }
.proj-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.proj { background: var(--sheet); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; position: relative; border-top: 8px solid var(--pc, var(--teal)); }
.proj h3 { margin: 4px 0 8px; font-size: 1.3rem; overflow-wrap: anywhere; }
.proj .tag { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(31,42,68,0.08); margin: 0 6px 6px 0; }
.proj dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 0.95rem; margin: 10px 0; }
.proj dt { color: var(--ink-2); }
.proj dd { margin: 0; overflow-wrap: anywhere; }
.proj .p-bar { height: 8px; background: rgba(31,42,68,0.1); border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.proj .p-bar i { display: block; height: 100%; background: var(--pc, var(--teal)); }
.proj-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.proj-actions button, .proj-actions select { font: 700 0.88rem var(--body); padding: 6px 12px; min-height: 36px; border-radius: 999px; border: 2px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; width: auto; }
.empty { text-align: center; padding: 40px 20px; border: 2.5px dashed var(--line); border-radius: var(--r); color: var(--ink-2); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }

/* prompts */
.spread { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.card-p { position: relative; background: var(--sheet); border-radius: 12px; padding: 22px 20px 18px; box-shadow: var(--shadow); grid-column: span 6; min-height: 150px; }
.card-p.wide { grid-column: span 12; }
.card-p.third { grid-column: span 4; }
.card-p:nth-child(1) { --tape: rgba(184,50,106,0.5); transform: rotate(-0.8deg); background: #fbf3e6; }
.card-p:nth-child(2) { --tape: rgba(47,143,138,0.5); transform: rotate(0.7deg); }
.card-p:nth-child(3) { --tape: rgba(244,168,35,0.7); transform: rotate(0.4deg); background: #eef4f6; }
.card-p:nth-child(4) { --tape: rgba(201,163,122,0.8); transform: rotate(-0.5deg); }
.card-p:nth-child(5) { --tape: rgba(184,50,106,0.4); transform: rotate(0.3deg); background: #f7f1fa; }
.card-p .k { font-size: 0.85rem; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-p .v { font: 800 1.45rem/1.25 var(--display); letter-spacing: -0.01em; }
.card-p.wide .v { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.lock { font: 700 0.8rem var(--body); border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; cursor: pointer; color: var(--ink); }
.lock[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.palette { display: flex; height: 64px; border-radius: 10px; overflow: hidden; margin-top: 4px; }
.palette i { flex: 1; position: relative; }
.palette i span { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 0.7rem; font-weight: 700; color: rgba(0,0,0,0.6); mix-blend-mode: multiply; }
.card-p.flip { animation: flipin .45s ease; }
@keyframes flipin { from { opacity: 0; translate: 0 10px; } }
@media (max-width: 760px) { .card-p, .card-p.third { grid-column: span 12; } }
.saved { display: grid; gap: 12px; }
.saved .sheet { padding: 16px 18px; font-size: 0.98rem; }
.saved .sheet button { float: right; }

/* tables + guides */
.tbl-wrap { overflow-x: auto; background: var(--sheet); border-radius: var(--r); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
th, td { text-align: left; padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { font-family: var(--display); font-size: 1rem; background: var(--ink); color: #fff; position: sticky; top: 0; }
tbody tr:hover { background: rgba(244,168,35,0.1); }
tbody tr.hl { background: rgba(244,168,35,0.24); }
.wnum { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--marigold); font: 800 1rem var(--display); }
.prose { font-size: 1.08rem; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.callout { background: var(--sheet); border-left: 6px solid var(--teal); border-radius: 10px; padding: 16px 18px; margin: 20px 0; box-shadow: var(--shadow); }
.thick { display: flex; align-items: end; gap: 10px; margin: 18px 0 6px; flex-wrap: wrap; }
.thick figure { margin: 0; text-align: center; font-size: 0.8rem; font-weight: 700; }
.thick i { display: block; margin: 0 auto 6px; width: 54px; border-radius: 99px; background: var(--berry); background-image: repeating-linear-gradient(60deg, rgba(255,255,255,0.25) 0 3px, transparent 3px 7px); }
.finder { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 18px; }
.finder .field { margin: 0; min-width: 200px; }

/* faq */
.faq details { background: var(--sheet); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font: 800 1.4rem/1 var(--display); color: var(--berry); }
.faq details[open] summary::after { content: "−"; }
.faq summary::-webkit-details-marker { display: none; }

/* band */
.band { background: var(--ink); color: #fff; background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 28px 28px; }
.band h2 { color: #fff; }
.band .muted { color: rgba(255,255,255,0.75); }
.band a { color: var(--marigold); }
.guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.guide { display: block; text-decoration: none; color: #fff; border: 2.5px dashed rgba(255,255,255,0.3); border-radius: var(--r); padding: 20px; transition: border-color .2s, background .2s; }
.guide:hover { color: #fff; border-color: var(--marigold); background: rgba(255,255,255,0.05); }
.guide h3 { color: #fff; }
.guide p { color: rgba(255,255,255,0.75); margin: 0; font-size: 0.98rem; }
.guide .gi { font: 800 1.6rem var(--display); color: var(--marigold); margin-bottom: 10px; }

/* footer */
footer { margin-top: 30px; padding: 46px 0 30px; background: var(--sheet); border-top: 2.5px dashed rgba(31,42,68,0.25); }
.fgrid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
footer ul { list-style: none; padding: 0; margin: 10px 0 0; }
footer li { margin-bottom: 6px; }
footer a { color: var(--ink); }
.legal { font-size: 0.88rem; color: var(--ink-2); margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .fgrid { grid-template-columns: 1fr; } }

.ad-slot { min-height: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; opacity: 0; transition: .25s; z-index: 99; pointer-events: none; }
.toast.on { opacity: 1; transform: translateX(-50%); }
[hidden] { display: none !important; }
@media print {
  .head, footer, .btns, .toolbar, .ad-slot, .faq, .no-print { display: none !important; }
  body { background: #fff; }
}
@media (max-width: 640px) { .page-top { padding: 26px 0 6px; } .lead { font-size: 1.05rem; } section { padding: 44px 0; } .hero { padding: 30px 0 40px; } }

/* journal spread (prompts) */
.journal { display: grid; grid-template-columns: 1fr 1fr; padding: 14px; border-radius: 16px; background: #6e4429; background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px); background-size: 6px 6px; box-shadow: 0 30px 60px -28px rgba(31,42,68,0.7); }
.jpage { position: relative; min-height: 540px; padding: 38px 30px 30px; background-color: #f7f0e1; background-image: radial-gradient(rgba(31,42,68,0.13) 1.1px, transparent 1.2px); background-size: 18px 18px; display: flex; flex-direction: column; gap: 26px; }
.jpage.left { border-radius: 8px 3px 3px 8px; box-shadow: inset -30px 0 34px -26px rgba(60,35,15,0.5); }
.jpage.right { border-radius: 3px 8px 8px 3px; box-shadow: inset 30px 0 34px -26px rgba(60,35,15,0.5); }
.jp { position: relative; padding: 18px 20px; }
.jp .k { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 700; color: rgba(31,42,68,0.7); margin-bottom: 6px; }
.jp .v { font: 800 1.35rem/1.25 var(--display); letter-spacing: -0.01em; }
.jp.drop { animation: drop .5s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes drop { from { opacity: 0; translate: 0 -26px; rotate: -4deg; } }
.jp-torn { background: #fff; transform: rotate(-1.5deg); padding: 26px 24px 30px; clip-path: polygon(0 4%, 4% 0, 9% 3%, 15% 0, 22% 4%, 30% 1%, 38% 4%, 46% 0, 55% 3%, 63% 0, 71% 4%, 79% 1%, 87% 4%, 94% 0, 100% 3%, 100% 96%, 95% 100%, 88% 97%, 80% 100%, 72% 96%, 63% 100%, 55% 97%, 46% 100%, 38% 96%, 29% 100%, 21% 97%, 12% 100%, 5% 96%, 0 100%); filter: drop-shadow(0 3px 2px rgba(0,0,0,0.12)); }
.jp-torn .v { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.1; }
.jp-ticket { background: #f1c86b; transform: rotate(2deg); margin-left: 18px; padding: 20px 26px 20px 30px; border-radius: 6px;
  -webkit-mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; }
.jp-ticket::before { content: ""; position: absolute; top: 10px; bottom: 10px; right: 64px; border-left: 2px dashed rgba(31,42,68,0.3); }
.jp-ticket .v { padding-right: 70px; }
.tk-no { position: absolute; right: 14px; top: 50%; transform: translateY(-50%) rotate(90deg); font: 700 0.75rem var(--body); letter-spacing: 0.08em; color: rgba(31,42,68,0.6); }
.jp-tag { background: #d9b98f; transform: rotate(-2deg); margin-right: 26px; padding: 20px 24px 20px 52px; clip-path: polygon(30px 0, 100% 0, 100% 100%, 30px 100%, 0 50%); }
.jp-tag::before { content: ""; position: absolute; left: 22px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: #f7f0e1; box-shadow: inset 0 0 0 3px #b8935f; }
.jp-chips { background: #fff; transform: rotate(1.5deg); box-shadow: 0 6px 14px -8px rgba(0,0,0,0.35); padding: 14px 14px 16px; }
.jp-chips .palette { height: 92px; border-radius: 4px; gap: 6px; overflow: visible; }
.jp-chips .palette i { border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.jp-chips .palette i span { bottom: -2px; transform: translateY(100%); padding-top: 4px; mix-blend-mode: normal; color: var(--ink-2); font-size: 0.68rem; }
.jp-chips { padding-bottom: 30px; }
.jp-note { background-color: #fffdf6; background-image: linear-gradient(90deg, transparent 34px, rgba(184,50,106,0.4) 34px 36px, transparent 36px), repeating-linear-gradient(transparent 0 29px, rgba(47,143,138,0.28) 29px 30px); transform: rotate(-1deg); padding: 16px 20px 22px 50px; box-shadow: 0 6px 14px -8px rgba(0,0,0,0.35); }
.jp-note .v { font-size: 1.2rem; line-height: 30px; }
.jp .lock { font-size: 0.75rem; padding: 3px 9px; }
@media (max-width: 760px) { .journal { grid-template-columns: 1fr; padding: 10px; } .jpage { min-height: 0; padding: 26px 18px; } .jpage.left, .jpage.right { border-radius: 8px; box-shadow: none; } .jpage.left { border-radius: 8px 8px 0 0; border-bottom: 2px dashed rgba(60,35,15,0.25); } .jpage.right { border-radius: 0 0 8px 8px; } }

/* yarn balls in the calculator result */
.balls { display: flex; flex-wrap: wrap; gap: 4px 2px; margin: 14px 0 8px; }
.balls svg { width: 46px; height: 46px; }
.balls svg.spare { opacity: 0.42; }
.result .yarns { margin-top: 0; }
#yc-col .yarn-btn { width: 34px; height: 34px; }

/* gauge fabric strips */
.gv { width: 100%; height: 260px; display: block; margin-top: 12px; }
.jp-ticket .k { padding-right: 62px; }
.balls svg { width: 52px; height: 52px; }

/* shop strip */
.shop-strip { padding: 56px 0; background: var(--paper, #eef2ef); border-top: 2px dashed rgba(31,42,68,.18); }
.shop-strip h2 { margin: 0 0 6px; }
.shop-grid { list-style: none; padding: 0; margin: 22px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px; }
.shop-card > a { display: block; text-decoration: none; color: inherit; }
.shop-card img { width: 100%; height: auto; border-radius: 14px; display: block; box-shadow: 0 14px 24px -16px rgba(31,42,68,.6); transition: transform .2s; }
.shop-card > a:hover img { transform: rotate(-1.5deg) translateY(-3px); }
.shop-name { display: block; font-weight: 700; margin-top: 10px; }
.shop-meta { font-size: .92rem; opacity: .8; }
@media (prefers-reduced-motion: reduce) { .shop-card img { transition: none; } }

/* ---- Email signup (Kit) ---- */
.nl { padding: 28px 0 8px; }
.nl-card { background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; padding: 26px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px 28px; align-items: center; color: var(--ink); }
.nl-card h2 { font-family: var(--display); margin: 0 0 6px; font-size: clamp(1.35rem, 2.6vw, 1.8rem); line-height: 1.15; }
.nl-card p { margin: 0; color: var(--ink-2); }
.nl-form { display: flex; gap: 8px; flex-wrap: wrap; }
.nl-form input { flex: 1 1 220px; min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-size: 1rem; }
.nl-form button { min-height: 48px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--berry); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.nl-form button:hover { filter: brightness(1.08); }
.nl-form input:focus-visible, .nl-form button:focus-visible { outline: 3px solid var(--berry); outline-offset: 2px; }
.nl-fine { grid-column: 1 / -1; font-size: .85rem; }
.nl-fine a { color: inherit; }
.nl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nl-done { text-align: center; max-width: 640px; margin: 0 auto; padding: 56px 0 28px; }
.nl-done .nl-btn { display: inline-block; margin: 18px 0 8px; padding: 14px 24px; border-radius: 12px; background: var(--berry); color: #fff; font-weight: 700; text-decoration: none; }
.nl-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.nl-links a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: inherit; text-decoration: none; }
@media (max-width: 760px) { .nl-card { grid-template-columns: 1fr; padding: 20px; } }

/* ---- Affiliate placements ---- */
.aff-box { margin: 18px 0; padding: 16px 18px; border-radius: 14px; border: 1px dashed currentColor; }
.aff-box h3 { margin: 0 0 8px; }
.aff-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.aff-links a { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid currentColor; text-decoration: none; color: inherit; font-weight: 600; }
.aff-note { font-size: .8rem; opacity: .75; margin: 8px 0 0; }

/* home: extra tools line under the guides */
.guides-more { margin: 22px 0 0; color: rgba(255,255,255,0.82); }
.guides-more a { color: var(--marigold); font-weight: 700; }
.guides-more a:hover { color: #fff; }

/* blanket size calculator */
.bk-fig { margin: 18px 0 0; }
.bk-fig svg { display: block; width: 100%; height: auto; background: #fff; border-radius: 12px; border: 2px dashed var(--line); }
.bk-fig figcaption { margin-top: 8px; }
.result .bk-dims { font: 800 clamp(2rem, 5vw, 2.8rem)/1.05 var(--display); letter-spacing: -0.03em; margin: 4px 0 8px; }
.result .bk-dims small { display: block; font: 400 1rem var(--body); letter-spacing: 0; color: rgba(255,255,255,0.75); margin-top: 6px; }
/* Handmade gift planner */
.gp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gp-item { display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.gp-item.done .gp-what { opacity: .55; text-decoration: line-through; }
.gp-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--c); background-image: repeating-linear-gradient(60deg, rgba(255,255,255,.35) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px rgba(31,42,68,.15); }
.gp-what { flex: 1; min-width: 0; line-height: 1.3; }
.gp-what strong { display: block; overflow-wrap: anywhere; }
.gp-what span { font-size: .9rem; color: var(--ink-2); }
.gp-done { display: flex; align-items: center; gap: 4px; font-size: .9rem; white-space: nowrap; }
.gp-mini { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); background: var(--sheet); color: var(--ink); font: 700 1rem var(--body); cursor: pointer; }
.gp-mini:hover { border-color: var(--ink); }
.gp-mini-sp { flex: none; width: 36px; }
.result .big small { font-size: .4em; letter-spacing: 0; }
.result .gp-ok { color: #bfe8e4; }
.result .gp-short { color: #ffd38a; }
.gp-strand { position: relative; display: flex; align-items: center; gap: 0; height: 30px; margin: 18px 0 0; padding: 0 2px; background: linear-gradient(transparent 13px, rgba(255,255,255,.35) 13px 16px, transparent 16px); }
.gp-seg { height: 22px; min-width: 6px; border-radius: 11px; background: var(--c); background-image: repeating-linear-gradient(60deg, rgba(255,255,255,.3) 0 2px, transparent 2px 6px); border: 2px solid var(--ink); }
.gp-seg.late { outline: 2px dashed #ff8a8a; outline-offset: 1px; opacity: .7; }
.gp-due { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1px; background: var(--marigold); border-radius: 2px; }
.gp-dates { list-style: none; margin: 10px 0 0; padding: 0; font-size: .95rem; }
.gp-dates li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.2); }
.gp-dates li span { min-width: 0; overflow-wrap: anywhere; }
.gp-dates li b { white-space: nowrap; font-weight: 700; color: #fff; }
.gp-dates li.late b { color: #ffb3b3; }
@media (max-width: 480px) { .gp-done { font-size: .82rem; } .gp-mini, .gp-mini-sp { width: 32px; height: 32px; } }
@media print { #gp-form, .page-top .lead { display: none; } .result { position: static; } }

/* hat size calculator */
.ht-fig { margin: 18px 0 0; }
.ht-fig svg { display: block; width: 100%; height: auto; background: #fff; border-radius: 12px; border: 2px dashed var(--line); }
.ht-fig figcaption { margin-top: 8px; }
.gs-fig { margin: 18px 0 0; }
.gs-fig svg { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; background: #fff; border-radius: 12px; border: 2px dashed var(--line); }
.gs-fig figcaption { margin-top: 8px; }

/* quick answer box (standing rule: direct answer first) */
.quick { background: var(--sheet); border: 2px solid var(--ink); border-left: 8px solid var(--marigold); border-radius: 12px; padding: 16px 18px; margin: 6px 0 22px; box-shadow: 4px 4px 0 var(--line); }
/* increase / decrease evenly calculator */
.id-fig { margin: 18px 0 0; }
.id-fig svg { display: block; width: 100%; height: auto; background: #fff; border-radius: 12px; border: 2px dashed var(--line); }
.id-fig figcaption { margin-top: 8px; }
.result .id-line { font: 700 1.18rem/1.5 var(--body); color: #fff; background: rgba(255,255,255,0.08); border-left: 4px solid var(--marigold); border-radius: 8px; padding: 12px 14px; margin: 6px 0 12px; overflow-wrap: anywhere; }
td code { font: 600 0.92rem/1.45 var(--body); overflow-wrap: anywhere; }
.sk-steps { margin: 6px 0 0; padding-left: 20px; }
.sk-steps li { margin: 0 0 6px; }

/* tea stain shade tester */
.ts-ex { border: 0; padding: 0; }
.ts-ex legend { font-weight: 700; margin-bottom: 6px; }
.ts-ex label { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0 0 6px; }
.ts-ex input { width: 20px; height: 20px; accent-color: var(--berry); }
.ts-fig { margin: 18px 0 8px; }
.ts-fig svg { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto; border-radius: 12px; }
.ts-fig figcaption { margin-top: 8px; text-align: center; }

/* journal prompt seasons */
.toolbar .jp-sea-l { font-weight: 700; }
.toolbar select.jp-sea { width: auto; min-width: 210px; max-width: 100%; }
.jp-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 16px; }
.jp-list h3 { font-size: 1.15rem; margin: 0 0 8px; color: var(--berry); }
.jp-list .k { font-weight: 700; font-size: 0.9rem; color: var(--ink-2); margin: 12px 0 4px; }
.jp-list ul { margin: 0; padding-left: 18px; font-size: 0.97rem; }
.jp-list li { margin: 0 0 3px; }

/* cast-on calculator */
.co-fig { margin: 18px 0 0; }
.co-fig svg { display: block; width: 100%; height: auto; background: #fff; border-radius: 12px; border: 2px dashed var(--line); }
.co-fig figcaption { margin-top: 8px; }
.co-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 0.9rem; }
.co-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.result .co-alt { list-style: none; padding: 0; margin: 6px 0 0; }
.result .co-alt li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.result .co-alt li:last-child { border-bottom: 0; }
.result .ci-list { list-style: none; padding: 0; margin: 6px 0 10px; max-height: 360px; overflow-y: auto; }
.result .ci-list li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.12); overflow-wrap: anywhere; }
.result .ci-list li b { color: var(--marigold); min-width: 2.6em; flex: none; }
.result .ci-list .ci-c { margin-left: auto; flex: none; font-weight: 700; background: rgba(255,255,255,0.1); border-radius: 999px; padding: 1px 9px; }

/* knitting abbreviations */
.ka-ex { display: flex; flex-wrap: wrap; gap: 8px; }
.ka-ex .lock { font-size: 0.88rem; padding: 6px 12px; }
.result .ka-line { font: 700 1.25rem/1.4 var(--display); color: #fff; margin: 6px 0 4px; overflow-wrap: anywhere; }
.ka-found { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.ka-found li { padding-left: 12px; border-left: 3px solid var(--marigold); font-size: 0.97rem; color: #fff; }
.ka-found li span { color: rgba(255,255,255,0.75); font-size: 0.9rem; }
.ka-tbl td:first-child { white-space: nowrap; }
.prose code { font-size: 0.92em; background: #f6efe2; padding: 1px 5px; border-radius: 5px; }
#ka-g .lock { padding: 6px 12px; }

/* ephemera checklist */
.ep-list { display: grid; gap: 16px; }
.ep-grp { border: 0; margin: 0; padding: 18px 20px 12px; }
.ep-grp legend { float: left; width: 100%; font: 800 1.15rem var(--display); margin-bottom: 8px; display: flex; justify-content: space-between; }
.ep-grp ul { clear: both; list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.ep-grp li { padding: 8px 0; border-top: 1.5px dashed var(--line); display: grid; gap: 2px; }
.ep-grp li label { display: flex; gap: 10px; align-items: center; font-weight: 400; margin: 0; cursor: pointer; }
.ep-grp li input { width: 22px; height: 22px; accent-color: var(--berry); flex: none; }
.ep-grp li span { padding-left: 32px; font-size: 0.92rem; color: var(--ink-2); }
.ep-pile { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 8px; }
.ep-tag { background: #f6efe2; color: var(--ink); font: 700 1rem/1.3 var(--display); padding: 12px 14px 12px 22px; border-radius: 4px 10px 10px 4px; position: relative; box-shadow: 0 6px 14px -8px rgba(0,0,0,0.5); max-width: 100%; }
.ep-tag::before { content: ""; position: absolute; left: 8px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--ink); }
.ep-tag.t0 { transform: rotate(-2deg); }
.ep-tag.t1 { transform: rotate(1.5deg); background: #fbe1a6; }
.ep-tag.t2 { transform: rotate(-0.8deg); background: #f0b9cf; }
@media print { [data-page="junk-journal-ephemera-ideas"] .result, [data-page="junk-journal-ephemera-ideas"] .quick { display: none !important; } .ep-grp { box-shadow: none; break-inside: avoid; } [data-page="junk-journal-ephemera-ideas"] .tool { display: block; } }
/* temperature blanket planner */
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .row3 { grid-template-columns: 1fr 1fr; } .row3 > .field:first-child { grid-column: 1 / -1; } }
.tb-more { margin: 4px 0 16px; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.tb-more summary { font-weight: 700; cursor: pointer; }
.tb-more[open] summary { margin-bottom: 10px; }
.tb-h { margin-top: 8px; }
.tb-key-wrap { box-shadow: none; border: 2px solid var(--line); }
.tb-key { width: 100%; font-size: 0.95rem; }
.tb-key td, .tb-key th { padding: 6px 10px; }
.tb-key input[type=color] { width: 44px; height: 32px; padding: 0; border: 2px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
.tb-key .muted { font-size: 0.85rem; }
.tb-fig { margin: 18px 0 0; text-align: center; }
.tb-fig svg { width: 100%; max-width: 240px; height: auto; }
.result .tb-fig .note { color: rgba(255,255,255,0.75); }
.result .tb-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 10px 0; }
.result .tb-stats div { background: rgba(255,255,255,0.08); border-radius: 10px; padding: 10px 12px; }
.result .tb-stats strong { display: block; font: 800 1.35rem/1.1 var(--display); color: #fff; }
.result .tb-stats span { font-size: 0.85rem; color: rgba(255,255,255,0.75); }
.result .tb-warn { color: #ffd38a; }
.tb-key td:last-child { white-space: nowrap; }

/* yarn yardage calculator */
.yy-list { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 8px; }
.yy-list li { display: grid; grid-template-columns: 5.5em minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.yy-list label { margin: 0; font-weight: 700; }
.yy-list input { width: 100%; }
/* craft fair checklist */
#cf-out .field label { color: #fff; }
#cf-out input { width: 100%; }
@media print { [data-page="craft-fair-checklist"] .result, [data-page="craft-fair-checklist"] .quick { display: none !important; } [data-page="craft-fair-checklist"] .tool { display: block; } }

/* our paperback box */
.book-strip{padding:8px 0 24px}
.book-card{display:grid;grid-template-columns:180px 1fr;gap:22px;align-items:center;background:#fff;border:1px solid rgba(30,41,74,.12);border-radius:16px;padding:20px}
.book-card img{width:180px;height:180px;border-radius:10px;object-fit:cover}
.book-card h2{margin:.2em 0 .4em}
@media (max-width:560px){.book-card{grid-template-columns:1fr}.book-card img{width:150px;height:150px}}
/* how-to step drawings (magic ring, colour change) */
.mr-steps, .cc-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin: 18px 0 6px; }
.mr-step { margin: 0; background: var(--sheet); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px 16px; border: 1px dashed var(--line); }
.mr-step svg { display: block; width: 100%; height: auto; background: repeating-linear-gradient(0deg, transparent 0 13px, rgba(31,42,68,.04) 13px 14px); border-radius: 10px; }
.mr-step figcaption { margin-top: 10px; font-size: .96rem; line-height: 1.45; }
.mr-step figcaption strong { display: block; font-family: var(--display); font-size: 1.05rem; color: var(--berry); margin-bottom: 2px; }
.result .mr-lines li { margin-bottom: 8px; }
.result .mr-lines .muted { color: rgba(255,255,255,.7); }
.cc-list { display: grid; gap: 8px; margin-bottom: 12px; }
.cc-row { display: flex; align-items: center; gap: 8px; }
.cc-row select { flex: 1 1 80px; min-width: 0; }
.cc-row input { flex: none; }
.cc-row input { width: 72px; }
.cc-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(31,42,68,.25); flex: none; }
.cc-del { border: 0; background: none; font-size: 1.4rem; line-height: 1; color: var(--ink-2); cursor: pointer; padding: 2px 8px; }
.cc-del:hover { color: var(--berry); }
.toolbar select#cc-rep { width: auto; flex: none; }
.cn-more { margin: 4px 0 14px; background: var(--paper, #fbf7ef); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; }
.cn-more summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.dc-list code, .result code { white-space: normal; overflow-wrap: anywhere; }

/* junk journal supply checklist */
.js-tier { font: 600 .74rem var(--body); padding: 2px 8px; border-radius: 999px; margin-left: auto; white-space: nowrap; }
.js-free { background: #d8efe9; color: #1d5f5b; }
.js-basic { background: #fbe1a6; color: #5a4108; }
.js-extra { background: #f3dbe6; color: #7a1f48; }
.js-tpl-wrap svg { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
#js-plan button[aria-pressed="false"] { color: var(--ink); }
@media print {
  [data-page="junk-journal-supply-checklist"] .quick, [data-page="junk-journal-supply-checklist"] .js-tpl-wrap { display: none !important; }
  [data-page="junk-journal-supply-checklist"] .tool { display: block; }
  html.print-tpl body * { visibility: hidden !important; }
  html.print-tpl .js-tpl-wrap, html.print-tpl .js-tpl-wrap * { visibility: visible !important; }
  html.print-tpl .js-tpl-wrap { display: block !important; position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; border: 0; }
  html.print-tpl .js-tpl-wrap .toolbar { display: none !important; }
}
/* stripe generator */
.sg-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sg-col { display: flex; gap: 6px; align-items: center; }
.sg-col input[type=color] { width: 44px; height: 40px; padding: 2px; border: 2px solid var(--line); border-radius: 10px; background: #fff; flex: none; cursor: pointer; }
.sg-col input[type=text] { min-width: 0; flex: 1; }
.result .sg-list { list-style: none; padding: 0; margin: 6px 0 10px; }
.result .sg-list li { margin: 3px 0; }
.result .sg-list i { display: inline-block; vertical-align: -2px; margin-right: 8px; width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(255,255,255,.6); flex: none; }
.result .sg-rows { max-height: 420px; overflow: auto; }
@media print { [data-page="stripe-generator"] .sheet, [data-page="stripe-generator"] .quick, [data-page="stripe-generator"] .page-top .lead { display: none; } [data-page="stripe-generator"] .tool { display: block; } [data-page="stripe-generator"] .result { position: static; } [data-page="stripe-generator"] .result .sg-rows { max-height: none; overflow: visible; } }

.bs-terms { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-weight: 700; }
#bs-st button { padding: 8px 12px; }

/* knit stitch patterns (26 Nov run 5) */
.ks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 18px; margin-top: 18px; }
.ks-card { background: var(--sheet); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 90px; }
.ks-sw svg { width: 100%; height: auto; display: block; border-radius: 8px; }
.ks-card h3 { margin: 0; font-size: 1.15rem; }
.ks-aka { margin: 2px 0 0; color: #5b6478; font-size: .9rem; }
.ks-meta { font-size: .92rem; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ks-tag { display: inline-block; background: rgba(47,143,138,.12); color: #1d6b67; border-radius: 999px; padding: 2px 10px; font-size: .82rem; font-weight: 600; }
.ks-rows, .ks-out-rows { padding-left: 20px; margin: 6px 0; font-size: .95rem; }
.ks-rows li, .ks-out-rows li { margin: 3px 0; overflow-wrap: anywhere; }
.ks-rep { font-size: .9rem; color: #5b6478; margin: 4px 0; }
.ks-prev, .sb-prev { margin: 14px 0 0; background: #fff; border-radius: 8px; padding: 8px; }
.ks-prev svg, .sb-prev svg { width: 100%; height: auto; display: block; max-height: 320px; }
.ks-prev figcaption, .sb-prev figcaption { color: #555; font-size: .85rem; margin-top: 4px; }
/* scrapbook page sizes */
.sb-fig { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; margin: 18px 0; }
.sb-fig svg { width: 100%; max-width: 280px; height: auto; display: block; margin: 0 auto; }
.sb-fig figcaption { text-align: center; font-size: .9rem; color: #5b6478; margin-top: 6px; }
/* craft fair sales log */
.cf-log table td { height: 30px; }
@media print { body.print-cflog > * { display: none !important; } body.print-cflog > main { display: block !important; } body.print-cflog main > * { display: none !important; } body.print-cflog main > .cf-log-sec { display: block !important; } body.print-cflog .cf-log-sec .btn { display: none !important; } }

/* 26 Nov run 6: crochet project planner printable */
.pjp-paper { background: #fff; color: #1f2a44; border: 1px solid #d9d3c4; border-radius: 6px; padding: 18px 18px 10px; font-size: 13px; }
.pjp-k { margin: 0; color: #2f8f8a; font: 700 14px Georgia, serif; }
.pjp-t { margin: 2px 0 10px; font: 700 22px Georgia, serif; border-bottom: 2px solid #1f2a44; padding-bottom: 4px; min-height: 1.3em; }
.pjp-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.pjp-ln { display: flex; gap: 6px; align-items: baseline; border-bottom: 1px solid #c9c2b2; padding: 5px 0 2px; min-height: 24px; min-width: 0; }
.pjp-ln span { color: #5b6b94; white-space: nowrap; font-size: 12px; }
.pjp-ln b { font-weight: 600; overflow-wrap: anywhere; }
.pjp-h { margin: 12px 0 4px; font-weight: 700; }
.pjp-sm { margin: 0 0 8px; color: #5b6b94; }
.pjp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(28px, 1fr)); gap: 3px; }
.pjp-grid i { font-style: normal; border: 1px solid #8a93ad; border-radius: 3px; height: 24px; font-size: 9px; color: #8a93ad; padding: 1px 3px; }
.pjp-lines i { display: block; border-bottom: 1px solid #c9c2b2; height: 22px; }
.pjp-ck { list-style: none; padding: 0; margin: 0; }
.pjp-ck li { padding: 3px 0 3px 22px; position: relative; }
.pjp-ck li::before { content: ""; position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border: 1.5px solid #1f2a44; border-radius: 2px; }
.pjp-tb { width: 100%; border-collapse: collapse; table-layout: fixed; }
.pjp-tb th, .pjp-tb td { border: 1px solid #c9c2b2; height: 26px; padding: 2px 4px; font-size: 11px; text-align: left; }
.pjp-tb th:last-child { width: 24px; }
.pjp-yr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pjp-mo { border: 1px solid #c9c2b2; border-radius: 4px; padding: 4px 6px; }
.pjp-mo b { font: 700 13px Georgia, serif; color: #b8326a; }
.pjp-mo i { display: block; border-bottom: 1px solid #ddd6c6; height: 20px; }
.pjp-foot { margin: 12px 0 0; text-align: right; font-size: 10px; color: #8a93ad; }
@media (max-width: 520px) { .pjp-2 { grid-template-columns: 1fr; } .pjp-yr { grid-template-columns: repeat(2, 1fr); } }
#pjp-printbox { display: none; }
@media print { body.print-pjp > * { display: none !important; } body.print-pjp > #pjp-printbox { display: block !important; border: 0; padding: 0; font-size: 12pt; } body.print-pjp .pjp-grid i { height: 30px; } }
#pjp-form .row2 > .field { min-width: 0; } #pjp-form input, #pjp-form select { min-width: 0; max-width: 100%; width: 100%; box-sizing: border-box; }
.result .pjp-paper, .result .pjp-paper p, .result .pjp-paper h3, .result .pjp-paper b, .result .pjp-paper li, .result .pjp-paper th { color: #1f2a44; } .result .pjp-paper .pjp-k { color: #2f8f8a; } .result .pjp-paper .pjp-mo b { color: #b8326a; } .result .pjp-paper .pjp-sm, .result .pjp-paper .pjp-ln span { color: #5b6b94; } .result .pjp-paper .pjp-foot { color: #8a93ad; }

@media (max-width:600px){table.mt{display:block;overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}}
/* run 7 (26 Nov): fabric yardage rows, checkbox labels, quiz */
.fy-row { display: grid; grid-template-columns: 28px 1fr 1fr 1fr; gap: 8px; align-items: end; }
.fy-row .field { min-width: 0; } .fy-row input { width: 100%; min-width: 0; box-sizing: border-box; }
.fy-n { font: 700 18px Georgia, serif; color: var(--berry, #b8326a); padding-bottom: 12px; }
.chk { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; font-weight: 400; cursor: pointer; }
.chk input { margin-top: 4px; flex: none; }
.jvs-q { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; } .jvs-q legend { font-weight: 700; margin-bottom: 4px; padding: 0; }
#cs-table tr[hidden] { display: none; }

/* run 8 (27 Nov): granny square + cross stitch step figures */
.gq-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 14px 0 18px; }
.gq-fig { margin: 0; background: #fff; border-radius: 12px; padding: 10px; box-shadow: 0 1px 3px rgba(31,42,68,.12); }
.gq-fig svg { width: 100%; height: auto; display: block; }
.gq-fig figcaption { font-size: .88rem; color: #555; margin-top: 6px; }
.gq-pat { padding-left: 20px; } .gq-pat li { margin: 6px 0; line-height: 1.45; }
@media print { [data-page="how-to-crochet-a-granny-square"] .sheet, [data-page="how-to-crochet-a-granny-square"] .quick, [data-page="how-to-crochet-a-granny-square"] #gq-print { display: none !important; } [data-page="how-to-crochet-a-granny-square"] .tool { display: block; } }

/* run 11: junk journal pockets, 2027 goal planner, blocking */
.result .jpk-big, .result .blk-m { font: 800 clamp(1.9rem, 4.6vw, 2.6rem)/1.05 var(--display); letter-spacing: -0.03em; margin: 4px 0 8px; color: #fff; }
.jpk-prev { background: #fff; border-radius: 8px; padding: 8px; margin: 6px 0 8px; overflow: hidden; }
.jpk-prev svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
@media print {
  html.print-jpk body > * { display: none !important; }
  html.print-jpk body > #jpk-printbox { display: block !important; }
  html.print-jpk #jpk-printbox svg { width: var(--w) !important; height: var(--h) !important; }
}
#jpk-printbox { display: none; }
fieldset.gpl-g { border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px 2px; margin: 0 0 12px; min-width: 0; }
fieldset.gpl-g legend { font-weight: 700; padding: 0 6px; }
.gpl-pg + .gpl-pg { margin-top: 18px; padding-top: 14px; border-top: 2px dashed #c9c2b2; }
.gpl-goal { break-inside: avoid; }
.gpl-q { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 10px; }
.gpl-hb td:first-child, .gpl-hb th:first-child { width: 34%; }
.gpl-hb th:last-child { width: auto; }
.gpl-mo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gpl-tk { display: grid; grid-template-columns: 1fr 1fr; gap: 0 6px; font-size: 10px; color: #5b6b94; margin: 2px 0; }
.gpl-tk span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .gpl-mo { grid-template-columns: 1fr 1fr; } }
@media print { body.print-gpl > * { display: none !important; } body.print-gpl > #gpl-printbox { display: block !important; border: 0; padding: 0; font-size: 11pt; }
  body.print-gpl .gpl-pg + .gpl-pg { break-before: page; border-top: 0; margin-top: 0; padding-top: 0; } body.print-gpl .gpl-mo { grid-template-columns: repeat(3, 1fr); } body.print-gpl .pjp-mo { break-inside: avoid; min-height: 2in; } body.print-gpl .pjp-ln { padding-top: 9px; } }

/* run 12: spread generator + slip stitch writer */
.result button.linkish { display: block; width: 100%; background: none; border: 0; color: inherit; font: inherit; text-align: left; padding: 4px 0; cursor: pointer; text-decoration: underline dotted rgba(255,255,255,.5); text-underline-offset: 4px; }
.result button.linkish:hover, .result button.linkish:focus-visible { text-decoration-color: #f4a823; }
.result .sls-line { font-size: 1.08rem; line-height: 1.5; }
/* run 15: crochet sheep pattern round tracker */
.shp-list { list-style: none; padding-left: 0; }
.shp-list li { margin: 2px 0; }
.shp-list .shp-note { margin: 6px 0 6px 26px; font-style: italic; color: var(--muted, #555); }
.shp-list em { color: var(--muted, #555); font-style: normal; }
.result svg text { user-select: none; }
