/* Tallyrow marketing pages (home, full edition, privacy), on top of the kit (/studio/studio.css) and the site palette
   (/assets/style.css). A neutral graphite page; the only bright things are the yarn strip and one cochineal accent.
   No gradients, no card shadows, no emoji. The app at /app/ has its own file (/app/app.css) and does not load this one. */

.ss-nav .nav-buy { border: 2px solid var(--ss-accent); border-radius: var(--ss-radius); padding: .25rem .8rem; }
.ss-nav .nav-buy:hover, .ss-nav .nav-buy[aria-current="page"] { background: var(--ss-accent-soft); }

/* ---------- header with the menu (.has-menu, on the page's header row): the name and the studio badge on the first row, the nav (the Full edition pill and the menu) on the second, at every width.
   The private download page loads this file too and has no menu, so it keeps the kit's one-row header. ---------- */
.has-menu { gap: .15rem 1rem; padding-block: .6rem; }
.has-menu .ss-nav { flex-basis: 100%; align-items: center; gap: 0 .6rem; }
/* the Full edition pill is a 44px touch target at every width, the same height as the buttons beside it (border-box, so the padding is inside it) */
.has-menu .ss-nav a.nav-buy { display: inline-flex; align-items: center; box-sizing: border-box; min-height: 44px; }

/* ---------- the menu of every page (owner, 2026-12-03; assets/nav.js opens and closes it, tools/nav.mjs builds it from the page list and tools/set-nav.mjs writes it into the pages) ----------
   Without JavaScript the two kinds of button are hidden and the links run along the bar as plain links, the group's name before its pages.
   With it (html.nav-js, set in the head so nothing jumps): under 48rem one Menu button opens the whole list under the bar, from 48rem the Guides group is a button that opens
   its own pages. Every control is at least 44px tall. Palette variables only. The counter at /app/ does not load this file. */
.nav-menu, .nav-group__list { list-style: none; margin: 0; padding: 0; }
.nav-menu { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0 .65rem; min-width: 0; }
.nav-group { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0 .5rem; }
.nav-group__list { display: flex; flex-wrap: wrap; gap: 0 .65rem; }
.nav-group__label { color: var(--ss-muted); font-size: .85rem; font-weight: 600; }
.nav-menu a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; border-bottom: 0; text-decoration: underline 2px transparent; text-underline-offset: .3em; }
.nav-menu a:hover, .nav-menu a[aria-current="page"] { text-decoration-color: var(--ss-accent); }
.nav-toggle, .nav-group__btn { display: none; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; min-width: 44px; margin: 0; padding: 0 .75rem; border: 1px solid transparent; border-radius: var(--ss-radius); background: transparent; color: var(--ss-ink); font: inherit; font-size: inherit; cursor: pointer; }
.nav-toggle { border-color: var(--ss-muted); }
.nav-toggle:hover, .nav-group__btn:hover { border-color: var(--ss-accent); }
.nav-toggle__i { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav-i-x, .nav-toggle[aria-expanded="true"] .nav-i-bars { display: none; }
.nav-toggle[aria-expanded="true"] .nav-i-x { display: inline; }
/* a small chevron after a group's name; it turns over while the list is open */
.nav-group__btn::after { content: ""; flex: none; width: .45em; height: .45em; margin: -.2em 0 0 .1rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.nav-group__btn[aria-expanded="true"]::after { margin-top: .2em; transform: rotate(225deg); }
.nav-group--current > .nav-group__btn { text-decoration: underline 2px var(--ss-accent); text-underline-offset: .3em; }
.nav-js .nav-toggle, .nav-js .nav-group__btn { display: inline-flex; }
/* phones and small tablets: one Menu button, one list */
@media (max-width: 47.99rem) {
  .nav-js .nav-group__btn { display: none; }
  .nav-js .nav-toggle { margin-left: auto; }
  .nav-js .nav-menu { display: none; flex: 1 1 100%; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; margin: .15rem 0 .5rem; padding: 0 .85rem; background: var(--ss-bg); border: 1px solid var(--ss-line); border-radius: var(--ss-radius-lg); }
  .nav-js .ss-nav.is-open .nav-menu { display: flex; }
  .nav-js .nav-group { display: block; }
  .nav-js .nav-group--menu { padding-bottom: .25rem; border-bottom: 1px solid var(--ss-line); }
  .nav-js .nav-group__label { display: block; padding: .6rem 0 .1rem; }
  .nav-js .nav-group__list { display: block; }
  .nav-js .nav-menu a { display: flex; width: 100%; box-sizing: border-box; overflow-wrap: normal; }
  .nav-js .nav-menu a:focus-visible { outline-offset: -3px; }
  .nav-js .nav-menu a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--ss-accent); padding-left: .8rem; text-decoration: none; font-weight: 700; }
}
/* the same rules without JavaScript: the list is the page's own links, so a link that is too long for a narrow phone breaks between words, never inside one */
.nav-menu a { overflow-wrap: normal; }
/* from 48rem: no Menu button; the Guides group is a button that opens its own list under it */
@media (min-width: 48rem) {
  .nav-toggle { display: none !important; }
  .nav-js .nav-group__label { display: none; }
  .nav-js .nav-menu { gap: 0 .2rem; }
  .nav-js .nav-group--link a { padding-inline: .75rem; }   /* the same side room as a group button, so Home, Free version and Privacy are spaced like the Guides button between them */
  .nav-js .nav-group__list { display: none; position: absolute; top: 100%; left: 0; z-index: 40; flex-direction: column; flex-wrap: nowrap; gap: 0; min-width: 15rem; max-width: calc(100vw - 2rem); padding: .35rem; background: var(--ss-surface); border: 1px solid var(--ss-line); border-radius: var(--ss-radius-lg); box-shadow: 0 10px 24px var(--ss-bg); }
  .nav-js .nav-group--end > .nav-group__list { left: auto; right: 0; }
  .nav-js .nav-group.is-open > .nav-group__list { display: flex; }
  .nav-js .nav-group__list a { display: flex; padding-inline: .75rem; border-radius: var(--ss-radius); }
  .nav-js .nav-group__list a:hover { background: var(--ss-accent-soft); }
  .nav-js .nav-group__list a:focus-visible { outline-offset: -3px; }
  .nav-js .nav-group__list a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--ss-accent); font-weight: 700; text-decoration: none; }
}
/* a tablet: the pill and the buttons share one row of about 720px, so the buttons give up some padding (still 44px tall) */
@media (min-width: 48rem) and (max-width: 63.99rem) { .nav-js .nav-group__btn { padding-inline: .45rem; gap: .35rem; } .nav-js .nav-group--link a { padding-inline: .45rem; } }
@media (prefers-reduced-motion: no-preference) { .nav-group__btn::after { transition: transform .15s ease-out; } }
/* The full edition (edition-boot.js, on the privacy and 404 pages) keeps the header it had: Free version and Privacy are the only links it leaves, so no Guides group and no Home link
   show there. The Play app hides the whole nav (assets/style.css), and in neither mode does the inline script in the head turn the menu buttons on (it checks for the mode first). */
[data-edition="full"] .nav-group--menu { display: none !important; }
[data-edition="full"] .nav-menu li:has(> a[href="/"]) { display: none !important; }
.mk .ss-main { padding-block: 1.25rem 2.5rem; }
@media (min-width: 40rem) { .mk .ss-main { padding-block: 2rem 3rem; } }
.mk .ss-lede { max-width: 34rem; }
.mk table { font-variant-numeric: tabular-nums; }

/* ---------- home: the counter is the first thing on the page ---------- */
.hero-home { display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; }
.hero-home__title { margin: 0; font-size: clamp(2.1rem, 1.4rem + 3vw, 3.9rem); }
.hero-home__lede { margin: 0; font-size: 1.1rem; }
.hero-home .try { margin: 0; padding-left: 1.2rem; color: var(--ss-muted); max-width: 30rem; }
.hero-home .try li { margin-bottom: .35rem; }
.hero-home .try strong { color: var(--ss-ink); }
.hero-home__actions { margin: .5rem 0 0; }
@media (min-width: 58rem) {
  .hero-home { grid-template-columns: minmax(0, 1fr) 27.5rem; grid-template-rows: auto auto auto auto 1fr; column-gap: 3.5rem; row-gap: 1rem; align-items: start; padding-top: .5rem; }
  .hero-home__title { grid-column: 1; grid-row: 1; margin-top: 1rem; }
  .hero-home__lede { grid-column: 1; grid-row: 2; font-size: 1.25rem; }
  .hero-home .try { grid-column: 1; grid-row: 3; margin-top: .5rem; }
  .hero-home__actions { grid-column: 1; grid-row: 4; margin-top: 1rem; }
  .hc-wrap { grid-column: 2; grid-row: 1 / span 5; }
}

.hc { box-sizing: border-box; background: var(--ss-surface); border: 1px solid var(--ss-line); border-radius: var(--ss-radius-lg); padding: 12px;
  font-variant-numeric: tabular-nums; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.hc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 2px 10px; }
.hc-name { margin: 0; font: 700 1.5rem/1.1 var(--ss-display); letter-spacing: .01em; }
.hc-yarn { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .9rem; color: var(--ss-muted); white-space: nowrap; }
.hc-chip { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--ss-line); background: var(--chip, #8a8f98); }
.hc-show { display: grid; grid-template-columns: var(--strip-w) minmax(0, 1fr); gap: 10px; height: 214px; --strip-w: clamp(68px, 21vw, 96px); }
.hc-strip { position: relative; min-height: 0; border: 1px solid var(--ss-line); border-radius: 6px; background: var(--ss-bg); overflow: hidden; }
.hc-strip canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hc-col { container-type: size; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hc-label { margin: 0; font-size: 1rem; font-weight: 600; color: var(--ss-muted); line-height: 1.2; }
.hc-count { margin: 0; line-height: 1; }
.hc-digits { display: inline-flex; justify-content: center; font-family: var(--ss-display); font-weight: 700; line-height: .74;
  font-size: 6rem; font-size: max(3rem, min(calc((100cqh - 92px) / .74), calc(100cqw / (var(--digits, 2) * 0.5 + 0.1)), 20rem)); }
.hc-digits span { display: inline-block; width: .5em; text-align: center; }
.hc-goal { margin: 6px 0 0; min-height: 1.3em; font-size: 1.05rem; color: var(--ss-muted); line-height: 1.3; }
.hc-repeat { margin: 4px 0 0; padding: 4px 10px; border: 1px solid var(--ss-line); border-radius: var(--ss-radius); font-weight: 600; font-size: .95rem; line-height: 1.3; max-width: 100%; }
.hc-tap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-sizing: border-box; width: 100%; height: 116px; margin: 10px 0 0; padding: 0;
  border: 2px solid var(--ss-accent); border-radius: 10px; background: var(--ss-bg); color: var(--ss-ink); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; font-family: var(--ss-font); }
.hc-tap__plus { font: 700 4.6rem/.9 var(--ss-display); color: var(--ss-link); }
.hc-tap__word { font-size: 1rem; font-weight: 600; color: var(--ss-muted); }
.hc-tap.is-down { background: var(--ss-accent); }
.hc-tap.is-down .hc-tap__plus, .hc-tap.is-down .hc-tap__word { color: var(--ss-accent-ink); }
.hc-bar { display: flex; gap: 8px; margin-top: 10px; }
.hc-undo, .hc-redo { display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; min-height: 56px; border: 2px solid var(--ss-line); border-radius: var(--ss-radius);
  background: transparent; color: var(--ss-ink); font: 700 1.3rem/1 var(--ss-display); letter-spacing: .02em; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.hc-undo { flex: 3 1 0; }
.hc-redo { flex: 2 1 0; }
.hc-undo:hover, .hc-redo:hover { background: var(--ss-accent-soft); border-color: var(--ss-accent); }
.hc-undo[aria-disabled="true"], .hc-redo[aria-disabled="true"] { opacity: .45; cursor: default; background: transparent; border-color: var(--ss-line); }
.hc .ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hc-note { margin: .7rem 0 0; font-size: .9rem; color: var(--ss-muted); max-width: 27.5rem; }
@media (min-width: 58rem) {
  .hc-show { height: 262px; --strip-w: 96px; }
  .hc-tap { height: 124px; }
  /* the count is set by height here, so leave the label room above the tall figures (layout check: no text over text) */
  .hc-label { margin-bottom: 12px; }
  .hc-digits { font-size: max(3rem, min(calc((100cqh - 104px) / .74), calc(100cqw / (var(--digits, 2) * 0.5 + 0.1)), 20rem)); }
}
/* a short phone (360 x 640): the whole +1 target on the first screen */
@media (max-width: 57.99rem) and (max-height: 700px) {
  .hc-show { height: 190px; }
  .hc-tap { height: 100px; }
}

/* the four plain lines */
.four { padding-block: 1.5rem 0; }
.plain { margin: 0; max-width: 52rem; border-top: 1px solid var(--ss-line); }
.plain dt { margin: 0; padding-top: 1.1rem; font: 700 1.55rem/1.1 var(--ss-display); letter-spacing: .01em; }
.plain dd { margin: 0; padding: .35rem 0 1.1rem; border-bottom: 1px solid var(--ss-line); max-width: 40rem; }
@media (min-width: 48rem) {
  .plain { display: grid; grid-template-columns: 14rem minmax(0, 1fr); column-gap: 2rem; }
  .plain dt, .plain dd { padding-block: 1.1rem; border-bottom: 1px solid var(--ss-line); }
  .plain dt { border-bottom: 1px solid var(--ss-line); }
  .plain dd { max-width: none; }
}

/* ---------- breadcrumb ---------- */
.crumb { margin: 0 0 .5rem; font-size: .9rem; color: var(--ss-muted); }
.crumb a { color: var(--ss-muted); }

/* ---------- full edition: the offer first ---------- */
.hero-full { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-block: .5rem 1rem; align-items: start; }
.hero-full h1 { margin-bottom: .35em; }
.hero-full__text p:last-child { margin-bottom: 0; }
.hero-full .ss-buy { max-width: 30rem; }
.hero-full .ss-buy h3 { margin-bottom: .3rem; }
#refunds { scroll-margin-top: 1rem; }
@media (min-width: 52rem) {
  .hero-full { grid-template-columns: minmax(0, 1fr) 24rem; column-gap: 3rem; padding-top: 1rem; }
}

/* three real screens, each next to what it is */
.looks__list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 2.5rem; }
.look { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.look figure { margin: 0; }
.look img { display: block; width: min(15rem, 100%); height: auto; border: 1px solid var(--ss-line); border-radius: var(--ss-radius-lg); background: var(--ss-surface); }
.look__text h3 { margin-bottom: .4rem; }
.look__text p { max-width: 34rem; }
@media (min-width: 44rem) {
  .look { grid-template-columns: 15rem minmax(0, 1fr); column-gap: 2.5rem; }
  .look:nth-child(even) { grid-template-columns: minmax(0, 1fr) 15rem; }
  .look:nth-child(even) figure { order: 2; }
}

/* the honest comparison */
.compare { max-width: 44rem; overflow-x: auto; }
.compare table { min-width: 0; }
.compare th, .compare td { overflow-wrap: break-word; vertical-align: top; }
.compare thead th { border-bottom: 2px solid var(--ss-line); font-family: var(--ss-display); font-size: 1.2rem; letter-spacing: .01em; }
.compare tbody th { font-weight: 500; }
.compare tr.differs th, .compare tr.differs td { font-weight: 700; }
.compare tr.differs th:first-child { border-left: 4px solid var(--ss-accent); padding-left: .6rem; }
.compare tr.price th, .compare tr.price td { font-weight: 700; border-bottom: 0; }
@media (max-width: 34rem) {
  .compare th, .compare td { padding-inline: .4rem; font-size: .95rem; }
  .compare td { width: 6.2rem; }
}

/* how you get it: a real sequence, counted the way a knitter counts */
.rows-list { list-style: none; margin: 1.25rem 0 0; padding: 0; counter-reset: r; max-width: 40rem; border-left: 2px solid var(--ss-line); }
.rows-list li { counter-increment: r; position: relative; margin: 0; padding: .2rem 0 1.1rem 1.25rem; }
.rows-list li::before { content: "Row " counter(r); display: block; font: 700 1.05rem/1.2 var(--ss-display); letter-spacing: .02em; color: var(--ss-link); }
.rows-list li::after { content: ""; position: absolute; left: -6px; top: .45rem; width: 10px; height: 10px; border-radius: 50%; background: var(--ss-accent); }

.forgrid { display: grid; gap: 0 3rem; }
.forgrid ul { padding-left: 1.2rem; max-width: 34rem; }
.forgrid li { margin-bottom: .55rem; }
@media (min-width: 52rem) { .forgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.doubts { margin: 1rem 0 1.5rem; max-width: 42rem; }
.doubts dt { margin: 1.1rem 0 .2rem; font-weight: 700; }
.doubts dd { margin: 0; color: var(--ss-muted); }
.doubts dd a { color: var(--ss-link); }

/* privacy */
.privacy h2 { margin-top: 1.6em; }
.privacy code { font-size: .9em; overflow-wrap: anywhere; }
.privacy .ss-actions { margin-top: 1.5rem; }

.nextlist { margin: 0 0 1.5rem; padding-left: 1.2rem; }
.nextlist li { margin-bottom: .5rem; }
.ss-buy__price small { display: block; margin: .4rem 0 .9rem; }

/* ---------- guides (/guides/<slug>/): a reading column with one small counter in it; only the kit's colors ---------- */
.guide { max-width: var(--ss-read); }
.guide h1 { margin-bottom: .45em; }
.guide h2 { margin-top: 2.2rem; }
.guide h3 { margin: 1.6rem 0 .35rem; }
.guide .ss-lede { margin-bottom: 1.6rem; }
.guide ul, .guide ol.clues { padding-left: 1.3rem; }
.guide li { margin-bottom: .6rem; }
.guide .gd { margin: 0 0 1.5rem; padding: 1.1rem 0 .2rem; border-top: 1px solid var(--ss-line); border-bottom: 1px solid var(--ss-line); }
.guide .gd h2 { margin-top: 0; }
.gd .hc { max-width: 27.5rem; }
.gd .hc-note { margin-bottom: 1rem; }
.gd .hc-tap[aria-disabled="true"] { opacity: .55; cursor: default; }
.gd-choice { box-sizing: border-box; max-width: 27.5rem; min-width: 0; margin: 0 0 .9rem; padding: .35rem .9rem .5rem; border: 1px solid var(--ss-line); border-radius: var(--ss-radius-lg); }
.gd-choice legend { padding: 0 .4rem; font-weight: 700; }
.gd-opt { display: flex; align-items: flex-start; gap: .7rem; min-height: 48px; box-sizing: border-box; padding: .55rem 0; cursor: pointer; }
.gd-opt input { flex: none; width: 1.4rem; height: 1.4rem; margin: .1rem 0 0; accent-color: var(--ss-accent); }
.gd-next { margin: 0 0 .8rem; font: 700 1.35rem/1.2 var(--ss-display); letter-spacing: .01em; }
/* the repeats helper: four number boxes and the three lines they give */
.gd-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; box-sizing: border-box; max-width: 27.5rem; margin: 0 0 1rem; }
@media (min-width: 32rem) { .gd-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; } }
.gd-field { display: grid; gap: .3rem; align-content: space-between; min-width: 0; }
.gd-field input { width: 100%; min-height: 52px; font-variant-numeric: tabular-nums; }
.gd-sub { margin: 0 0 .3rem; color: var(--ss-muted); }
.gd-err { margin: 0 0 .8rem; font-weight: 600; }
.gd-err:empty { display: none; }
.guide .compare { margin-bottom: 1rem; }
.worked { box-sizing: border-box; max-width: 34rem; margin: 0 0 1.1rem; padding: .7rem .9rem; background: var(--ss-surface); border: 1px solid var(--ss-line); border-left: 4px solid var(--ss-accent); border-radius: var(--ss-radius-lg); }
.worked p { margin: 0 0 .45rem; font-variant-numeric: tabular-nums; }
.worked p:last-child { margin-bottom: 0; }
.worked .worked-t { font-weight: 700; }
.gd-pat-title { margin: 1.1rem 0 .4rem; font-weight: 700; }
.gd-pat { list-style: none; box-sizing: border-box; max-width: 27.5rem; margin: 0 0 .8rem; padding: 0; overflow: hidden; background: var(--ss-surface); border: 1px solid var(--ss-line); border-radius: var(--ss-radius-lg); }
.gd-pat li { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin: 0; padding: .6rem .75rem; border-left: 4px solid transparent; border-bottom: 1px solid var(--ss-line); }
.gd-pat li:last-child { border-bottom: 0; }
.gd-pat li.is-next { background: var(--ss-accent-soft); border-left-color: var(--ss-accent); font-weight: 600; }
.gd-here { display: none; flex: none; font: 700 1rem/1.3 var(--ss-display); letter-spacing: .02em; color: var(--ss-link); }
.gd-pat li.is-next .gd-here { display: block; }

/* the guide list on the home page */
.guide-list { list-style: none; margin: 0; padding: 0; max-width: 40rem; border-top: 1px solid var(--ss-line); }
.guide-list li { margin: 0; padding: .9rem 0; border-bottom: 1px solid var(--ss-line); }
.guide-list a { font: 700 1.35rem/1.2 var(--ss-display); letter-spacing: .01em; }
.guide-list p { margin: .2rem 0 0; color: var(--ss-muted); }
/* guides: a one-digit count is sized by height at every width, so the label gets the same room above the figures as on a wide screen (layout check: no text over text) */
.gd .hc-label { margin-bottom: 12px; }
.gd .hc-digits { font-size: max(3rem, min(calc((100cqh - 104px) / .74), calc(100cqw / (var(--digits, 2) * 0.5 + 0.1)), 20rem)); }
