/* Ballband — "Banderol": a yarn ball band. Cream paper, ink, serif printed figures,
   typewriter labels, madder red, and the saffron row band that keeps your place.
   One stylesheet for the product page, the free tools and the Guides. System fonts only.
   Theme: data-theme on <html> ("light" | "dark"), set before paint from the saved
   choice or the system setting; the header toggle switches and remembers it. */
:root, :root[data-theme="light"] {
  --bg: #F5F0E6; --paper: #FFFDF8; --sunk: #EDE6D8; --border: #D9D0C2; --rule: #C9BEAD;
  --ink: #2A2420; --dim: #645A50; --faint: #7D7266;
  --madder: #9A3B2C; --on-madder: #FFF7EE; --madder-soft: #F3E1DB;
  --band: rgba(232, 176, 55, .38); --band-solid: #F2D48C; --band-edge: #C98F12; --band-text: #7A5300;
  --done: #A89C8E; --focus: #9A3B2C;
  --yarn-0: #9A3B2C; --yarn-1: #5E7A4B; --yarn-2: #C98F12; --yarn-3: #4F6F94;
  --shadow: 0 18px 44px rgba(42, 36, 32, .16);
  --shadow-sm: 0 3px 10px rgba(42, 36, 32, .08);
  --measure: 700px; --wide: 1120px;
  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #1E1B19; --paper: #2A2623; --sunk: #25211F; --border: #4A433D; --rule: #5A524B;
  --ink: #EFE7DA; --dim: #B3A799; --faint: #998D80;
  --madder: #E07A63; --on-madder: #1E1B19; --madder-soft: #3A2620;
  --band: rgba(232, 176, 55, .28); --band-solid: #5A4520; --band-edge: #D9A23A; --band-text: #F0C46A;
  --done: #7A7067; --focus: #F0C46A;
  --yarn-0: #E07A63; --yarn-1: #8FAE7A; --yarn-2: #D9A23A; --yarn-3: #8AA6CC;
  --shadow: 0 18px 44px rgba(0, 0, 0, .45);
  --shadow-sm: 0 3px 10px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-size-adjust: 100%; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.65; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--madder); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
.narrow { max-width: var(--measure); margin: 0 auto; padding: 0 20px; }
.wide { max-width: var(--wide); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 9; }
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-dark { display: block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Typewriter labels: the small print on a ball band. */
.label, .eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--madder); }
.eyebrow { display: block; margin-bottom: 12px; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 700; }

/* ---------- Header and footer ---------- */
.site-head { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.site-head .wide { display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 62px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.mark img { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--rule); }
.mark span { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.site-nav { display: flex; align-items: center; gap: 16px; font-size: 15px; }
.site-nav > a:not(.chip) { color: var(--dim); text-decoration: none; white-space: nowrap; }
.site-nav > a:not(.chip):hover { color: var(--ink); }
.chip { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 9px; background: var(--madder); color: var(--on-madder); font-weight: 650; font-size: 14.5px; text-decoration: none; white-space: nowrap; }
.toggle { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--paper); color: var(--dim); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.toggle:hover { color: var(--ink); }
.toggle svg { width: 16px; height: 16px; }
.toggle .sun { display: none; }
:root[data-theme="dark"] .toggle .sun { display: block; }
:root[data-theme="dark"] .toggle .moon { display: none; }
.site-foot { margin-top: 80px; border-top: 1px solid var(--border); padding: 30px 0 56px; }
.site-foot .wide { display: flex; flex-wrap: wrap; gap: 14px 20px; justify-content: space-between; color: var(--dim); font-size: 14px; }
.site-foot a { color: var(--dim); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot .links { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ---------- Buttons ---------- */
.store { display: inline-flex; align-items: center; gap: 12px; padding: 11px 24px 11px 18px; border-radius: 12px; background: var(--ink); color: var(--bg) !important; text-decoration: none; line-height: 1.1; border: 1.5px solid var(--ink); transition: transform .15s, box-shadow .15s; }
.store svg { width: 26px; height: 26px; fill: currentColor; flex: none; margin-top: -2px; }
.store span { display: flex; flex-direction: column; align-items: flex-start; }
.store b { white-space: nowrap; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.store small { white-space: nowrap; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; opacity: .78; margin-top: 4px; }
.store:hover { transform: translateY(-1px); box-shadow: 0 0 0 4px var(--band); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 18px; border-radius: 10px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); font-weight: 650; font-size: 15.5px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--sunk); }
.btn.primary { background: var(--madder); border-color: var(--madder); color: var(--on-madder); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.quiet { border-color: var(--border); font-weight: 600; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; color: var(--madder); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: inherit; }

/* ---------- Home: hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero .wide { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: end; padding-top: 64px; }
.hero .copy { padding-bottom: 72px; align-self: center; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.1rem); line-height: 1.04; letter-spacing: -.02em; margin-bottom: 20px; }
.hero h1 em { font-style: normal; padding: 0 .06em; background: linear-gradient(transparent 20%, var(--band-edge) 20%, var(--band-edge) calc(20% + 2px), var(--band) calc(20% + 2px), var(--band) calc(92% - 2px), var(--band-edge) calc(92% - 2px), var(--band-edge) 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero .lead { color: var(--dim); font-size: 1.18rem; max-width: 31em; margin-bottom: 28px; }
.hero .meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero .meta span { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.hero-phone { position: relative; justify-self: center; width: min(320px, 78vw); }
.hero-phone .strip { position: absolute; left: -60px; right: -60vw; top: 50.3%; height: 6.2%; background: var(--band); border-top: 2px solid var(--band-edge); border-bottom: 2px solid var(--band-edge); }
.hero-phone .shot { position: relative; border-radius: 42px 42px 0 0; border: 9px solid #2A2420; border-bottom: 0; box-shadow: var(--shadow); overflow: hidden; background: #2A2420; aspect-ratio: 550 / 1000; }
.hero-phone .shot img { width: 100%; }

/* ---------- Home: sections ---------- */
.section { padding: 80px 0 0; }
.section h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); letter-spacing: -.015em; line-height: 1.12; margin-bottom: 12px; }
.section p.sub { color: var(--dim); max-width: 40em; margin-bottom: 30px; font-size: 1.07rem; }

/* The demo: a printed pattern, the band and the counter. */
.demo { display: grid; grid-template-columns: 1.35fr .65fr; gap: 0; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 16px; overflow: hidden; }
.sheet { position: relative; padding: 26px 28px 28px; font-family: var(--serif); font-size: 15.5px; line-height: 1.5; }
.sheet .ttl { font-family: var(--serif); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; color: var(--dim); margin-bottom: 14px; }
.sheet .hd { font-weight: 700; margin: 12px 0 2px; }
.sheet .nt { font-style: italic; color: var(--dim); margin-bottom: 6px; font-size: 14.5px; }
.sheet .r { position: relative; z-index: 1; transition: color .25s; max-width: 32em; }
.sheet .r.done { color: var(--done); }
.sheet .band { position: absolute; left: 14px; right: 14px; top: 0; height: 0; background: var(--band); border-top: 2px solid var(--band-edge); border-bottom: 2px solid var(--band-edge); border-radius: 2px; transition: top .35s cubic-bezier(.2,.8,.2,1), height .35s cubic-bezier(.2,.8,.2,1); z-index: 0; }
.counter { border-left: 1.5px solid var(--ink); display: flex; flex-direction: column; }
.counter .num { padding: 22px 22px 16px; flex: 1; }
.counter .big { font-family: var(--serif); font-weight: 700; font-size: 5.2rem; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 6px 0 10px; }
.counter .small { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--madder); line-height: 1.6; }
.counter .keys { display: grid; grid-template-columns: 1fr 2fr; border-top: 1.5px solid var(--ink); }
.counter button { border: 0; cursor: pointer; font-family: var(--serif); font-size: 2.4rem; line-height: 1; min-height: 88px; }
.counter .minus { background: var(--paper); color: var(--ink); border-right: 1.5px solid var(--ink); }
.counter .minus:hover { background: var(--sunk); }
.counter .plus { background: var(--madder); color: var(--on-madder); font-size: 3rem; }
.counter .plus:hover { filter: brightness(1.07); }
.counter button:disabled, .fl-counter button.k:disabled { opacity: .4; cursor: default; }
.counter button:focus-visible { outline-offset: -5px; }
.demo-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.demo-notes p { font-size: 15px; color: var(--dim); border-top: 1.5px solid var(--ink); padding-top: 10px; }
.demo-notes b { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.02rem; margin-bottom: 2px; }

/* Features as the printed side of a ball band: grouped, ruled, no icon tiles. */
.spec { display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--ink); border-radius: 16px; background: var(--paper); overflow: hidden; }
.spec section { padding: 22px 24px 8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.spec section:nth-child(3n) { border-right: 0; }
.spec section:nth-last-child(-n+3) { border-bottom: 0; }
.spec h3 { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--madder); margin-bottom: 6px; }
.spec dl div { padding: 12px 0; border-top: 1px dashed var(--rule); }
.spec dl div:first-child { border-top: 0; }
.spec dt { font-family: var(--serif); font-weight: 700; font-size: 1.04rem; line-height: 1.3; margin-bottom: 3px; }
.spec dd { color: var(--dim); font-size: 15px; line-height: 1.55; }
.spec-note { color: var(--dim); font-size: 14.5px; margin-top: 14px; }

/* Screens */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.shots figure { margin: 0; }
.shots img { border-radius: 26px; border: 1.5px solid var(--ink); box-shadow: var(--shadow-sm); }
.shots figcaption { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-top: 12px; text-align: center; }
.shots-note { color: var(--faint); font-size: 13.5px; margin-top: 14px; }

/* Free tools: cards drawn like the app's project cards (yarn strip, dotted rule, printed figure). */
.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tool-card { display: grid; grid-template-columns: 1fr auto; align-items: stretch; background: var(--paper); border: 1.5px solid var(--ink); border-left-width: 8px; border-radius: 12px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.tool-card:hover { transform: translateY(-1px); box-shadow: 0 0 0 4px var(--band); }
.tool-card.yarn-0 { border-left-color: var(--yarn-0); } .tool-card.yarn-1 { border-left-color: var(--yarn-1); }
.tool-card.yarn-2 { border-left-color: var(--yarn-2); } .tool-card.yarn-3 { border-left-color: var(--yarn-3); }
.tc-text { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 16px 18px; }
.tc-text .label { font-size: 11px; }
.tc-title { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; line-height: 1.25; }
.tc-line { color: var(--dim); font-size: 15px; line-height: 1.5; }
.tc-fig { display: flex; align-items: center; justify-content: center; min-width: 108px; padding: 0 16px; border-left: 2px dotted var(--rule); font-family: var(--serif); font-weight: 700; font-size: 1.45rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tool-inline { margin: 24px 0; }
.tool-inline .tool-card { max-width: 560px; }

/* Guides */
.guides-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.guide-card { display: flex; flex-direction: column; gap: 6px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 14px; padding: 0 0 20px; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.guide-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 4px var(--band); }
.guide-card .tag { font-family: var(--mono); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--madder); }
.guide-card h3 { font-size: 1.18rem; line-height: 1.3; }
.guide-card p { color: var(--dim); font-size: 15px; }
.guide-card .tag, .guide-card h3, .guide-card p { margin-left: 20px; margin-right: 20px; }
.guide-card .thumb { display: block; aspect-ratio: 16 / 9; margin-bottom: 10px; border-bottom: 1.5px solid var(--ink); }
.more { margin-top: 20px; display: inline-block; font-weight: 650; }

/* FAQ and closing band */
.faq details { border-top: 1px solid var(--rule); padding: 16px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-family: var(--serif); font-weight: 700; font-size: 1.06rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--madder); font-family: var(--mono); font-weight: 400; font-size: 1.2rem; line-height: 1.2; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--dim); margin-top: 8px; }
.closing { margin-top: 88px; border-top: 3px solid var(--band-edge); border-bottom: 3px solid var(--band-edge); background: var(--band-solid); position: relative; }
.closing .wide { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; padding-top: 46px; padding-bottom: 46px; }
.closing h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); line-height: 1.15; }
.closing p { color: var(--ink); opacity: .8; margin-top: 4px; }
.closing + .site-foot, main:has(> .closing:last-child) + .site-foot { margin-top: 0; border-top: 0; }

/* ---------- Text pages, Guides articles ---------- */
.doc, .article { padding-top: 52px; }
.doc h1, .article h1 { font-size: clamp(2.05rem, 4.6vw, 2.9rem); letter-spacing: -.015em; line-height: 1.1; margin-bottom: 14px; }
.updated, .byline { color: var(--dim); font-size: 14.5px; margin-bottom: 30px; }
.doc h2, .article h2 { font-size: 1.45rem; letter-spacing: -.01em; margin: 44px 0 12px; scroll-margin-top: 80px; }
.doc h2 { font-size: 1.2rem; padding-top: 22px; border-top: 1px solid var(--rule); margin-top: 32px; }
.article h3 { font-size: 1.12rem; margin: 26px 0 8px; }
.doc p, .article p { margin-bottom: 15px; }
p.lead { font-size: 1.16rem; margin-bottom: 24px; }
.article p.lead { font-size: 1.22rem; line-height: 1.55; }
.doc ul, .article ul, .article ol { margin: 0 0 16px 22px; }
.doc li, .article li { margin-bottom: 7px; }
strong { font-weight: 650; }
.article table, .tool table { width: 100%; border-collapse: collapse; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.article th, .article td, .tool th, .tool td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.article th, .tool th { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); font-weight: 600; }
.table-wrap { overflow-x: auto; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 12px; padding: 4px 12px; margin: 10px 0 24px; }
.table-wrap tr:last-child td { border-bottom: 0; }
.article code { background: var(--sunk); border-radius: 5px; padding: 1px 6px; font-family: var(--mono); font-size: .88em; }
.callout { background: var(--paper); border: 1.5px solid var(--ink); border-left: 6px solid var(--madder); border-radius: 12px; padding: 16px 18px; margin: 22px 0; }
.callout p:last-child { margin-bottom: 0; }
.example { background: var(--paper); border: 1.5px dashed var(--rule); border-radius: 12px; padding: 18px 20px; margin: 22px 0; font-variant-numeric: tabular-nums; }
.example p:last-child { margin-bottom: 0; }
.toc { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 12px; padding: 16px 20px; margin: 0 0 30px; font-size: 15.5px; }
.toc strong { display: block; margin-bottom: 6px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--madder); }
.toc ol { margin: 0 0 0 20px; }
.sources { font-size: 14.5px; color: var(--dim); border-top: 1px solid var(--rule); margin-top: 38px; padding-top: 18px; }
.sources strong { font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.sources ol { margin: 8px 0 0 20px; }
.crumbs { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.crumbs a { color: var(--dim); }
.posts { list-style: none; margin: 8px 0 0; }
.posts li { border-top: 1px solid var(--rule); padding: 22px 0; }
.posts li:last-child { border-bottom: 1px solid var(--rule); }
.posts a { display: grid; grid-template-columns: 168px 1fr; gap: 20px; align-items: start; text-decoration: none; color: var(--ink); }
.posts a:hover h2 { color: var(--madder); }
.posts h2 { font-size: 1.28rem; margin: 0 0 4px; }
.posts p { color: var(--dim); font-size: 15.5px; margin: 0 0 6px; }
.posts .thumb { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 1.5px solid var(--ink); }
.posts .txt { display: block; }
.posts .tag { display: block; font-family: var(--mono); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--madder); margin-bottom: 4px; }
.posts time { display: block; color: var(--faint); font-size: 13.5px; }
.doc ul.posts { margin: 8px 0 0; }
.doc .posts li { margin-bottom: 0; }
.doc .posts h2 { border: 0; padding-top: 0; margin: 0 0 4px; }
.cover { aspect-ratio: 16 / 7; border-radius: 16px; overflow: hidden; margin: 6px 0 30px; border: 1.5px solid var(--ink); }
.thumb svg, .cover svg { display: block; width: 100%; height: 100%; }
.cover img, .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover:empty { display: none; }
.credit { font-size: 12px; color: var(--faint); margin: -22px 0 26px; text-align: right; }
.fig { margin: 26px 0 30px; }
.fig svg { display: block; width: 100%; max-width: 560px; margin: 0 auto; height: auto; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 14px; }
.fig text { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.fig figcaption { font-size: 14px; color: var(--dim); margin-top: 10px; text-align: center; line-height: 1.5; }
.fig.shot img { width: min(300px, 72%); margin: 0 auto; border-radius: 28px; border: 1.5px solid var(--ink); box-shadow: var(--shadow-sm); }
.fig.photo img { width: 100%; border-radius: 14px; aspect-ratio: 3 / 2; object-fit: cover; }
.fig.photo figcaption .credit { display: block; margin: 4px 0 0; text-align: center; }
/* Figure classes (k-*) for drawn SVG figures, so they follow the theme. */
.k-t { fill: var(--ink); } .k-d { fill: var(--dim); } .k-f { fill: var(--faint); } .k-at { fill: var(--madder); }
.k-paper { fill: var(--paper); } .k-bg { fill: var(--bg); } .k-sunk { fill: var(--sunk); }
.k-band { fill: var(--band); } .k-band-edge { stroke: var(--band-edge); fill: none; } .k-band-t { fill: var(--band-text); }
.k-madder { fill: var(--madder); } .k-on { fill: var(--on-madder); } .k-done { fill: var(--done); }
.k-ln { stroke: var(--rule); fill: none; } .k-ink { stroke: var(--ink); fill: none; }
.k-y0 { fill: var(--yarn-0); } .k-y1 { fill: var(--yarn-1); } .k-y2 { fill: var(--yarn-2); } .k-y3 { fill: var(--yarn-3); }

/* App box: the end of a guide or a tool. */
.app-box { position: relative; display: grid; grid-template-columns: 1fr 200px; gap: 26px; align-items: end; background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); border-left: 8px solid var(--madder); border-radius: 16px; padding: 28px 0 0 30px; margin: 52px 0 8px; overflow: hidden; }
.app-box::after { content: ""; position: absolute; left: 0; right: 0; bottom: 111px; height: 26px; background: var(--band); border-top: 2px solid var(--band-edge); border-bottom: 2px solid var(--band-edge); pointer-events: none; opacity: .7; }
.ab-text { position: relative; z-index: 1; padding-bottom: 30px; }
.ab-eyebrow { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--madder); margin: 0 0 14px !important; }
.ab-eyebrow img { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--rule); }
.ab-title { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin: 0 0 10px !important; }
.ab-body { font-size: 15.5px; line-height: 1.6; color: var(--dim); margin: 0 0 22px !important; }
.ab-text .store { position: relative; }
.ab-phone { position: relative; z-index: 1; height: 290px; overflow: hidden; margin-right: 28px; }
.ab-phone img { width: 200px; border-radius: 28px 28px 0 0; border: 7px solid #2A2420; border-bottom: 0; }

/* ---------- Free tools ---------- */
.tool { padding-top: 44px; }
.tool h1 { font-size: clamp(2.05rem, 4.6vw, 2.9rem); letter-spacing: -.015em; line-height: 1.1; margin-bottom: 12px; }
.tool .lead { color: var(--dim); max-width: 38em; }
.panel { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 14px; padding: 20px 22px; margin: 18px 0; }
.panel > h2 { font-size: 1.25rem; margin-bottom: 4px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px 16px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .fieldset legend { font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.field input, .field select, .field textarea { width: 100%; background: var(--bg); border: 1.5px solid var(--rule); border-radius: 10px; padding: 10px 12px; font-size: 17px; font-variant-numeric: tabular-nums; }
.field input:focus, .field select:focus, .field textarea:focus, .rv input:focus, .rv textarea:focus, .note-edit textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.field textarea { font-family: var(--serif); font-size: 16px; line-height: 1.5; min-height: 220px; resize: vertical; }
.fieldset { border: 0; display: flex; flex-direction: column; gap: 6px; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 10px; overflow: hidden; width: 100%; }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 10px 8px; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; }
.seg label + label span { border-left: 1.5px solid var(--ink); }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -4px; }
.result { margin-top: 18px; }
.answer { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; line-height: 1.35; background: linear-gradient(var(--band), var(--band)); border-top: 2px solid var(--band-edge); border-bottom: 2px solid var(--band-edge); padding: 12px 14px; margin: 6px 0 10px; overflow-wrap: anywhere; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.facts b { color: var(--ink); font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0; text-transform: none; }
.warn { color: var(--madder); font-weight: 600; }
.hint { color: var(--dim); font-size: 14.5px; margin: 10px 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 15.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--madder); }
.strip-fig { margin: 14px 0 4px; overflow-x: auto; }
.strip-fig svg { display: block; height: auto; }
.st-plain { fill: var(--sunk); stroke: var(--rule); } .st-inc { fill: var(--madder); } .st-dec { fill: var(--yarn-3); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--dim); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
tr.shape td { background: var(--band); }
tr.shape td:first-child { box-shadow: inset 3px 0 0 var(--band-edge); }
tr.sel td { background: var(--band); }
.tool .table-wrap { max-height: 520px; overflow: auto; }
.tool .table-wrap thead th { position: sticky; top: 0; background: var(--paper); }
.c2c-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.c2c-grid svg { width: 100%; height: auto; display: block; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--paper); }
.c-increase { fill: color-mix(in srgb, var(--yarn-1) 38%, var(--paper)); } .c-straight { fill: var(--border); } .c-decrease { fill: color-mix(in srgb, var(--yarn-3) 38%, var(--paper)); }
.c-sel { fill: var(--band-edge); }
i.c-key { border: 1px solid var(--rule); }
i.c-increase { background: color-mix(in srgb, var(--yarn-1) 38%, var(--paper)); } i.c-straight { background: var(--border); } i.c-decrease { background: color-mix(in srgb, var(--yarn-3) 38%, var(--paper)); }
.tool > p:not(.crumbs):not(.lead) { margin-bottom: 14px; }
.c2c-table button { all: unset; cursor: pointer; display: block; width: 100%; }
.c2c-table tr:hover td { background: var(--sunk); }
.c2c-table button:focus-visible { outline: 3px solid var(--focus); }
.more-tools { margin-top: 44px; }
.more-tools h2 { font-size: 1.3rem; margin-bottom: 14px; }
.local-note { display: flex; gap: 10px; align-items: baseline; font-size: 14.5px; color: var(--dim); margin: 10px 0 0; }
.local-note::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--band-solid); border: 1.5px solid var(--band-edge); transform: translateY(1px); }

/* Pattern follower */
.pf-start { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pf-start .panel { display: flex; flex-direction: column; margin: 18px 0 0; }
.drop { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; border: 2px dashed var(--rule); border-radius: 12px; padding: 22px; background: var(--bg); flex: 1; }
.drop.over { border-color: var(--band-edge); background: var(--band); }
.drop p { color: var(--dim); font-size: 15px; }
.saved { list-style: none; margin-top: 8px; }
.saved li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; border-top: 1px dashed var(--rule); padding: 12px 0; }
.saved li:first-child { border-top: 0; }
.saved .nm { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.saved .mt { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.saved .acts { display: flex; gap: 8px; }
.status { margin-top: 12px; font-size: 15px; }
.status.err { color: var(--madder); font-weight: 600; }
.rv-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; }
.rv-list { list-style: none; margin-top: 12px; counter-reset: none; }
.rv { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px 12px; align-items: start; padding: 12px 0; border-top: 1px dashed var(--rule); }
.rv.skip-row .rv-text, .rv.skip-row .rv-num { opacity: .45; text-decoration: line-through; }
.rv-num { display: flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 12px; }
.rv-num input { width: 48px; padding: 6px 4px; text-align: center; border: 1.5px solid var(--rule); border-radius: 7px; background: var(--bg); font-family: var(--mono); font-size: 14px; }
.rv-text { field-sizing: content; width: 100%; border: 1.5px solid var(--rule); border-radius: 8px; padding: 8px 10px; background: var(--bg); font-family: var(--serif); font-size: 15.5px; line-height: 1.45; resize: vertical; min-height: 44px; }
.rv-sec { grid-column: 1 / -1; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--madder); padding-top: 6px; }
.rv-acts { display: flex; flex-direction: column; gap: 6px; }
.rv-acts .btn { min-height: 36px; padding: 5px 12px; font-size: 14px; }
.follow { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.fl-sheet { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 14px; padding: 18px 10px 18px 10px; font-family: var(--serif); }
.fl-title { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; color: var(--dim); padding: 0 12px 10px; }
.fl-sec { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--madder); padding: 14px 12px 4px; }
.fl-row { display: grid; grid-template-columns: 22px 1fr; gap: 8px; width: 100%; text-align: left; background: none; border: 0; border-top: 2px solid transparent; border-bottom: 2px solid transparent; padding: 7px 12px; cursor: pointer; font-family: var(--serif); font-size: 16px; line-height: 1.45; color: var(--ink); border-radius: 2px; }
.fl-row:hover { background: var(--sunk); }
.fl-row .tick { font-family: var(--mono); color: transparent; font-size: 14px; }
.fl-row.done { color: var(--done); }
.fl-row.done .tick { color: var(--yarn-1); }
.fl-row.now { background: var(--band); border-color: var(--band-edge); font-size: 1.2rem; font-weight: 600; padding: 12px; }
.fl-row .lb { font-weight: 700; }
.fl-row .nb { display: block; margin-top: 4px; font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--madder); }
.fl-row.done .nb { color: var(--done); }
.fl-col { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 2px; }
.fl-side { display: flex; flex-direction: column; gap: 14px; }
.fl-counter { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 14px; overflow: hidden; }
.fl-counter .num { padding: 16px 18px 12px; }
.fl-counter .big { font-family: var(--serif); font-weight: 700; font-size: 4.4rem; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 4px 0 8px; }
.fl-counter .small { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--madder); line-height: 1.6; }
.fl-counter .keys { display: grid; grid-template-columns: 1fr 2fr; border-top: 1.5px solid var(--ink); }
.fl-counter button.k { border: 0; cursor: pointer; font-family: var(--serif); font-size: 2.2rem; line-height: 1; min-height: 76px; }
.fl-counter .minus { background: var(--paper); color: var(--ink); border-right: 1.5px solid var(--ink) !important; }
.fl-counter .minus:hover { background: var(--sunk); }
.fl-counter .plus { background: var(--madder); color: var(--on-madder); font-size: 2.8rem; }
.fl-counter button.k:focus-visible { outline-offset: -5px; }
.progress { height: 8px; background: var(--sunk); border-top: 1.5px solid var(--ink); }
.progress i { display: block; height: 100%; background: var(--band-edge); width: 0; transition: width .3s; }
.mini { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 14px; padding: 14px 16px; }
.mini .label { display: block; margin-bottom: 6px; }
.rep { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.rep .val { font-family: var(--serif); font-weight: 700; font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.rep .val small { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--dim); }
.rep .of { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--madder); }
.rep .pm { display: flex; gap: 6px; }
.rep .pm button { width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--bg); cursor: pointer; font-size: 1.3rem; line-height: 1; }
.rep-set { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 10px; font-size: 14.5px; }
.rep-set input[type=number] { width: 64px; padding: 6px 8px; border: 1.5px solid var(--rule); border-radius: 8px; background: var(--bg); }
.note-edit textarea { width: 100%; min-height: 64px; border: 1.5px solid var(--rule); border-radius: 8px; padding: 8px 10px; background: var(--bg); font-size: 15px; resize: vertical; }
.banner { display: none; gap: 10px; align-items: baseline; background: var(--band); border: 1.5px solid var(--band-edge); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.banner.on { display: flex; }
.banner .label { flex: none; }
.fl-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.fl-tools .btn { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.kbd { font-family: var(--mono); font-size: 12px; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; }
.take { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.take ol { margin: 6px 0 0 20px; }
.take li { margin-bottom: 6px; }

@media (max-width: 900px) {
  .spec { grid-template-columns: 1fr 1fr; }
  .spec section:nth-child(3n) { border-right: 1.5px solid var(--ink); }
  .spec section:nth-child(2n) { border-right: 0; }
  .spec section:nth-last-child(-n+3) { border-bottom: 1.5px solid var(--ink); }
  .spec section:nth-last-child(-n+2) { border-bottom: 0; }
  .shots { grid-template-columns: repeat(4, 46%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .shots figure { scroll-snap-align: start; }
  .follow { grid-template-columns: minmax(0, 1fr); }
  .fl-col { display: contents; }
  .fl-sheet { order: 1; }
  .fl-counter { order: 2; position: sticky; bottom: 8px; z-index: 3; box-shadow: var(--shadow); }
  .fl-side { order: 3; }
}
@media (max-width: 760px) {
  .hero .wide { grid-template-columns: 1fr; gap: 0; padding-top: 40px; }
  .hero .copy { padding-bottom: 36px; }
  .hero-phone { width: min(280px, 74vw); }
  .hero-phone .strip { left: -50vw; right: -50vw; }
  .demo { grid-template-columns: 1fr; }
  .counter { border-left: 0; border-top: 1.5px solid var(--ink); }
  .counter .num { display: flex; align-items: center; gap: 16px; padding: 14px 18px; }
  .counter .big { font-size: 3.6rem; margin: 0; }
  .demo-notes { grid-template-columns: 1fr; gap: 10px; }
  .tools-grid, .guides-grid, .pf-start, .take, .c2c-wrap { grid-template-columns: 1fr; }
  .rv { grid-template-columns: 1fr auto; }
  .rv-num { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .site-nav { gap: 10px; }
  .spec { grid-template-columns: 1fr; }
  .spec section { border-right: 0 !important; border-bottom: 1.5px solid var(--ink) !important; }
  .spec section:last-child { border-bottom: 0 !important; }
  .shots { grid-template-columns: repeat(4, 70%); }
  .posts a { grid-template-columns: 96px 1fr; gap: 14px; }
  .cover { aspect-ratio: 16 / 9; }
  .app-box { grid-template-columns: 1fr; gap: 0; padding: 24px 20px 0; }
  .app-box::after { display: none; }
  .ab-text { padding-bottom: 24px; }
  .ab-phone { justify-self: center; height: 190px; margin: 0; }
  .ab-phone img { width: 190px; border-radius: 26px 26px 0 0; border-width: 6px; }
  .ab-title { font-size: 1.3rem; }
  .tc-fig { min-width: 0; padding: 0 12px; font-size: 1.15rem; }
  .panel { padding: 16px; }
  .fl-row.now { font-size: 1.1rem; }
  .fl-counter { display: grid; grid-template-columns: minmax(0, 1fr) 150px; }
  .fl-counter .num { padding: 10px 14px; min-width: 0; }
  .fl-counter .big { font-size: 2.6rem; margin: 2px 0 2px; }
  .fl-counter .small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fl-counter .keys { border-top: 0; border-left: 1.5px solid var(--ink); grid-template-columns: 1fr 1.4fr; }
  .fl-counter button.k { min-height: 0; }
  .fl-counter .progress { grid-column: 1 / -1; }
}
@media (max-width: 440px) {
  .site-nav:has(a[href="/guides/"]) .chip { display: none; }
  .mark span { font-size: 18px; }
}
@media (max-width: 340px) {
  .chip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-head, .site-foot, .app-box, .more-tools, .fl-side, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
}
