/* Built from themes/shoddy-v2/theme.md. Do not edit here: change the tables in that file. */
[data-brand="shoddy-v2"] {
  --b-bg: #f5f3ea;
  --b-bg-sunk: #ece9dc;
  --b-text: #22221f;
  --b-text-soft: #3d3c37;
  --b-text-muted: #66635a;
  --b-edge: #8c897e;
  --b-line: #cfccbf;
  --b-accent: #992f27;
  --b-gap: #e0219f;
  --b-surface: #f5f3ea;
  --b-line-strong: #22221f;
  --b-on-accent: #f5f3ea;
  --b-good: #22221f;
  --b-warn: #66635a;
  --b-bad: #992f27;
  --b-font-display: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --b-font-body: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --b-font-label: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --b-font-hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --b-display-weight: 400;
  --b-body-size: 1.0625rem;
  --b-body-leading: 1.8;
  --b-prose-size: 1.125rem;
  --b-prose-leading: 2;
  --b-h1: clamp(1.9rem, 4.5vw, 2.8rem);
  --b-h2: 1.45rem;
  --b-h3: 1.15rem;
  --b-label-size: .7rem;
  --b-label-weight: 600;
  --b-label-tracking: .14em;
  --b-label-case: uppercase;
  --b-btn-size: .85rem;
  --b-btn-weight: 600;
  --b-btn-tracking: 0;
  --b-btn-case: none;
  --b-btn-pad: .7rem 1.2rem;
  --b-radius: 0;
  --b-radius-btn: 0;
  --b-radius-input: 0;
  --b-radius-tag: 0;
  --b-shadow: none;
  --b-shadow-btn: none;
  --b-card-pad: 0;
  --b-measure: 46rem;
  --b-page: 72rem;
  --b-head-align: center;
  --b-s1: .5rem;
  --b-s2: 1rem;
  --b-s3: 1.75rem;
  --b-s4: 3rem;
  --b-s5: 4.5rem;
  --b-speed: .12s;
}
[data-brand="shoddy-v2"][data-stage="lights-off"],
[data-brand="shoddy-v2"] [data-stage="lights-off"] {
  --b-bg: #1b1b19;
  --b-bg-sunk: #24241f;
  --b-text: #ece8dc;
  --b-text-soft: #d2cec1;
  --b-text-muted: #aaa69a;
  --b-edge: #6f6c62;
  --b-line: #3c3b35;
  --b-accent: #e07a6f;
  --b-gap: #ff7fd4;
  --b-surface: #1b1b19;
  --b-line-strong: #ece8dc;
  --b-on-accent: #1b1b19;
  --b-good: #ece8dc;
  --b-warn: #aaa69a;
  --b-bad: #e07a6f;
}

/* Shoddy v2: the hand-written part of the theme (font files, and the rules that variables can't express).
   The variables themselves are built from the tables in theme.md.
   The first half is the Shoddy site's page. The second half is the drawn parts, whose shapes come from sketch.js. */

[data-brand="shoddy-v2"] {
  color-scheme: light;
}

[data-brand="shoddy-v2"][data-stage="lights-off"],
[data-brand="shoddy-v2"] [data-stage="lights-off"] {
  color-scheme: dark;
}

@font-face { font-family: "Libre Baskerville"; src: url(fonts/baskerville-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url(fonts/baskerville-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url(fonts/baskerville-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url(fonts/franklin-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url(fonts/franklin-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Caveat"; src: url(fonts/caveat-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }

/* ---------- The page: the Shoddy site's layout ---------- */

/* The nameplate: spaced capitals, like a newspaper masthead */
[data-brand="shoddy-v2"] .b-wordmark {
  display: inline-block; font-size: 1.2rem; line-height: 1.4;
  letter-spacing: .3em; text-indent: .3em; text-transform: uppercase;
}

/* Navigation sits between an ink rule and a hairline, centred */
[data-brand="shoddy-v2"] .b-nav {
  justify-content: center;
  border-top: 1px solid var(--b-line-strong);
  border-bottom: 1px solid var(--b-line);
  padding: .5rem var(--b-gutter);
}
[data-brand="shoddy-v2"] .b-nav--front { border-top: 3px double var(--b-line-strong); }

/* Title block: centred like a title page, then a short rule with plenty of air */
[data-brand="shoddy-v2"] .b-head { padding-block: var(--b-s5) var(--b-s4); }
[data-brand="shoddy-v2"] .b-head h1 { margin-inline: auto; max-width: 44rem; }
[data-brand="shoddy-v2"] .b-head .b-standfirst { margin-inline: auto; }
[data-brand="shoddy-v2"] .b-head::after {
  content: ""; display: block; width: 5rem; margin: 3.5rem auto 0;
  border-top: 1px solid var(--b-edge);
}
[data-brand="shoddy-v2"] .b-standfirst { font-style: italic; line-height: 1.85; }
/* Anything under the standfirst (a gauge, a note, a row of steps) stands a full step clear of it and of each other */
[data-brand="shoddy-v2"] .b-head > .b-standfirst ~ * { margin-top: var(--b-s3); }
[data-brand="shoddy-v2"] .b-head > .b-standfirst ~ .b-note { margin-top: var(--b-s2); }
[data-brand="shoddy-v2"] .b-head .b-gauges > li { justify-content: center; grid-template-columns: auto 11rem auto; }
[data-brand="shoddy-v2"] .b-head .b-steps { margin-top: var(--b-s4); }

/* A "card" is a section under an ink rule. Never a ruled box, never a shadow. (The drawn box is .b-sketch.) */
[data-brand="shoddy-v2"] .b-card {
  background: none; border: 0; border-top: 1px solid var(--b-line-strong);
  padding: var(--b-s3) 0 0;
}
[data-brand="shoddy-v2"] .b-well { padding: var(--b-s3); }

/* A section of a working screen: ink rule, label and heading, then the body, with a full step of air below.
   <section class="b-section"><span class="b-label">…</span><h2>…</h2> … </section>
   The rule runs the page. The contents sit in the centred reading column. A child marked .b-wide runs the page. */
[data-brand="shoddy-v2"] .b-section {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--b-measure)) minmax(0, 1fr);
  border-top: 1px solid var(--b-line-strong); padding: var(--b-s4) 0 var(--b-s5);
}
[data-brand="shoddy-v2"] .b-section > * { grid-column: 2; min-width: 0; }
[data-brand="shoddy-v2"] .b-section > .b-wide { grid-column: 1 / -1; }
[data-brand="shoddy-v2"] .b-section:last-child { padding-bottom: 0; }
/* The first section sits under the title block's short rule, which is enough: no ink rule of its own (Pete, 2 December 2026) */
[data-brand="shoddy-v2"] .b-head ~ .b-section:first-of-type, [data-brand="shoddy-v2"] .b-head ~ form > .b-section:first-of-type, [data-brand="shoddy-v2"] form > .b-head ~ .b-section:first-of-type { border-top: 0; padding-top: 0; }
[data-brand="shoddy-v2"] .b-section > * + * { margin-top: var(--b-s3); }
/* A section's title is plainly a title: a clear size above a row's name, standing well clear of the rule above it */
[data-brand="shoddy-v2"] .b-section > h2 + * { margin-top: var(--b-s2); }
[data-brand="shoddy-v2"] .b-section > h2 { margin: var(--b-s1) 0 0; font-size: clamp(1.6rem, 3.4vw, 2rem); line-height: 1.2; }
[data-brand="shoddy-v2"] .b-section p { max-width: var(--b-measure); }
/* A section whose contents need the page width: everything runs wide, and the label, heading and note above are centred over it. */
[data-brand="shoddy-v2"] .b-section--wide > * { grid-column: 1 / -1; }
[data-brand="shoddy-v2"] .b-section--wide > :is(.b-label, h2, h2 + .b-meta) { text-align: center; justify-self: center; }

/* A long list somebody looks things up in, in groups. On a desk the group's name sits in a side column and stays in view
   while its rows scroll past; on a phone it sticks to the top. Only for look-up lists: see "Layout".
   <div class="b-lookup"><header class="b-lookup-head"><h3>Group</h3><p class="b-meta">…</p></header><div>rows…</div></div> */
[data-brand="shoddy-v2"] .b-lookup { border-top: 1px solid var(--b-line); padding-top: var(--b-s3); }
[data-brand="shoddy-v2"] .b-lookup + .b-lookup { margin-top: var(--b-s4); }
[data-brand="shoddy-v2"] .b-lookup-head { position: sticky; top: 0; z-index: 1; background: var(--b-bg); padding-block: var(--b-s1); }
[data-brand="shoddy-v2"] .b-lookup-head > * { margin: 0; }
@media (min-width: 62rem) {
  [data-brand="shoddy-v2"] .b-lookup { display: grid; grid-template-columns: 14rem minmax(0, 1fr); column-gap: var(--b-s4); align-items: start; }
  [data-brand="shoddy-v2"] .b-lookup-head { top: var(--b-s2); padding-block: 0; }
  [data-brand="shoddy-v2"] .b-lookup-head > * + * { margin-top: var(--b-s1); }
}

/* ---------- Belonging: a section's own rows ---------- */

/* A section's children: a set of rows that each hold several things (a decision, a sheet, a question with its answer).
   <ol class="b-items">
     <li class="b-item"><span class="b-hand-num">1</span>
       <header class="b-item-head"><h3>Name</h3> MARK or JOT</header>
       <p>…</p> <div class="b-choices">…</div> <label class="b-field">…</label>
     </li>
   </ol>
   The set stands a big step below the section's opening words. Rows are a big step apart with a hairline between;
   the parts of one row are a small step apart. So what belongs together is always closer than what does not. */
[data-brand="shoddy-v2"] .b-items { list-style: none; margin: 0; padding: 0; }
[data-brand="shoddy-v2"] .b-section > .b-items { margin-top: var(--b-s4); }
[data-brand="shoddy-v2"] .b-item { position: relative; padding-block: var(--b-s4); border-top: 1px solid var(--b-line); }
[data-brand="shoddy-v2"] .b-item:last-child { padding-bottom: 0; }
[data-brand="shoddy-v2"] .b-item > * + * { margin-top: var(--b-s2); }
[data-brand="shoddy-v2"] .b-item > :is(.b-choices, .b-field, .b-links, .b-gauges) { margin-top: var(--b-s3); }
[data-brand="shoddy-v2"] .b-item-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--b-s1) var(--b-s3); }
[data-brand="shoddy-v2"] .b-item-head > :is(h3, h4) { margin: 0; font-size: 1.25rem; line-height: 1.4; }
[data-brand="shoddy-v2"] .b-item-head > :is(.b-mark, .b-jot, [data-draw]) { flex: none; }
/* The row's number: hung in the left margin on a desk, sitting above the name on anything narrower */
[data-brand="shoddy-v2"] .b-item > .b-hand-num { display: block; }
[data-brand="shoddy-v2"] .b-item > .b-hand-num + * { margin-top: var(--b-s1); }
@media (min-width: 62rem) {
  [data-brand="shoddy-v2"] .b-item > .b-hand-num { position: absolute; left: -3.25rem; top: calc(var(--b-s4) - .15rem); width: 2.25rem; text-align: right; }
  [data-brand="shoddy-v2"] .b-item > .b-hand-num + * { margin-top: 0; }
}

/* Inside a look-up group the group's own hairline is enough: the first row draws none */
[data-brand="shoddy-v2"] .b-lookup .b-item:first-child { border-top: 0; padding-top: 0; }

/* Pick one: the options are printed, and the pen rings the one chosen. Works as buttons or as radio inputs.
   <div class="b-choices" role="group" aria-label="Your decision"><button class="b-choice" aria-pressed="true">Keep</button>…</div>
   <label class="b-choice"><input type="radio" name="q1">Keep</label> */
[data-brand="shoddy-v2"] .b-choices { display: flex; flex-wrap: wrap; align-items: center; gap: var(--b-s1) var(--b-s3); }
[data-brand="shoddy-v2"] .b-choice {
  position: relative; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .35rem; cursor: pointer;
  background: none; border: 0; border-radius: 0; font: 600 .95rem/1.4 var(--b-font-label); color: var(--b-text-muted);
  text-decoration: underline 1px var(--b-edge); text-underline-offset: .35em;
}
[data-brand="shoddy-v2"] .b-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
[data-brand="shoddy-v2"] .b-choice:has(input:focus-visible) { outline: 2px solid var(--b-accent); outline-offset: 3px; }
@media (hover: hover) { [data-brand="shoddy-v2"] .b-choice:hover { color: var(--b-text); } }
[data-brand="shoddy-v2"] .b-choice:is([aria-pressed="true"], [aria-checked="true"], :has(input:checked)) { color: var(--b-text); text-decoration: none; }
[data-brand="shoddy-v2"] .b-choice:is([aria-pressed="true"], [aria-checked="true"], :has(input:checked))::after {
  content: ""; position: absolute; inset: .15rem -.7rem; pointer-events: none; background: var(--b-accent); rotate: -1.5deg;
  -webkit-mask: var(--b-pen-ring) center / 100% 100% no-repeat; mask: var(--b-pen-ring) center / 100% 100% no-repeat;
}
/* A choice that cannot be pressed (saving is off, the sheet is finished): no underline, and the ring goes to pencil */
[data-brand="shoddy-v2"] .b-choice:is(:disabled, [aria-disabled="true"], :has(input:disabled)) { cursor: default; text-decoration: none; color: var(--b-text-muted); }
[data-brand="shoddy-v2"] .b-choice:is(:disabled, [aria-disabled="true"], :has(input:disabled))::after { background: var(--b-edge); }
[data-brand="shoddy-v2"] .b-choice:has(input:disabled) input { cursor: default; }
/* A scale (0 to 10): the options sit closer and are each as wide as they are tall */
[data-brand="shoddy-v2"] .b-choices--scale { gap: var(--b-s1); }
[data-brand="shoddy-v2"] .b-choices--scale > .b-choice { min-width: 2.75rem; justify-content: center; }
[data-brand="shoddy-v2"] .b-choices--scale > .b-choice::after { inset: .15rem -.15rem; }
[data-brand="shoddy-v2"] .b-choice:nth-child(even)::after { rotate: 1.2deg; scale: -1 1; }
[data-brand="shoddy-v2"] .b-choice:nth-child(3n)::after { rotate: -.4deg; scale: 1 -1; }
[data-brand="shoddy-v2"] { --b-pen-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cpath d='M14 8C40 2 89 3 95 18C98 33 62 38 30 36C7 34 2 22 8 11C12 5 24 3 38 6' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }

/* A row of pen-underlined links, each tall enough to press. <p class="b-links"><a class="b-penline">Results</a>…</p> */
[data-brand="shoddy-v2"] .b-links { display: flex; flex-wrap: wrap; gap: 0 var(--b-s3); font: 600 .95rem/1.4 var(--b-font-label); }
[data-brand="shoddy-v2"] button.b-penline { padding: 0; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
[data-brand="shoddy-v2"] .b-links > .b-penline { display: inline-flex; align-items: center; min-height: 2.75rem; }
[data-brand="shoddy-v2"] .b-links > .b-penline::after { bottom: calc(1.375rem - .7em - .42em); }

/* A short field name is a small-capitals label; a question somebody reads stays the kit's bold line */
[data-brand="shoddy-v2"] .b-field > .b-label { display: block; }
/* Several short fields side by side (three filters). One column on a phone. <div class="b-fields"><label class="b-field">…</label>…</div> */
[data-brand="shoddy-v2"] .b-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--b-s2) var(--b-s3); }
[data-brand="shoddy-v2"] .b-fields > .b-field { margin-top: 0; }
/* The masthead: the nameplate centred over the navigation. <header class="b-masthead"><a class="b-wordmark">…</a><nav class="b-nav">…</nav></header> */
[data-brand="shoddy-v2"] .b-masthead { text-align: center; padding-top: var(--b-s3); }
[data-brand="shoddy-v2"] .b-masthead > .b-nav { margin-top: var(--b-s2); }
[data-brand="shoddy-v2"] select.b-input { min-height: 2.75rem; }
[data-brand="shoddy-v2"] textarea.b-input--tall { min-height: 12rem; }
/* A button that cannot be pressed yet: pencil, not ink */
[data-brand="shoddy-v2"] .b-btn:is(:disabled, [aria-disabled="true"]) { cursor: default; background: transparent; color: var(--b-text-muted); border-color: var(--b-line); }
/* A quieter paragraph: why a question is asked, a note under an answer */
[data-brand="shoddy-v2"] .b-soft { color: var(--b-text-soft); }

/* The foot of the page: a colophon. One or two quiet lines saying what this page is and where it came from, then the lights.
   <footer class="b-foot"><p class="b-meta">…</p><button class="b-lights" data-lights>Lights off</button></footer> */
[data-brand="shoddy-v2"] .b-foot { margin-top: var(--b-s5); padding-block: var(--b-s4) var(--b-s5); }
[data-brand="shoddy-v2"] .b-foot > * { max-width: var(--b-measure); margin-inline: auto; }
[data-brand="shoddy-v2"] .b-foot > * + * { margin-top: var(--b-s2); }
[data-brand="shoddy-v2"] .b-foot > .b-lights { display: block; margin-top: var(--b-s3); }
/* The lights switch: words, not a button. It is the least important thing on the page. */
[data-brand="shoddy-v2"] .b-lights {
  min-height: 2.5rem; padding: 0 .5rem; background: none; border: 0; cursor: pointer; color: var(--b-text-muted);
  font: var(--b-label-weight) var(--b-label-size)/1.5 var(--b-font-label); letter-spacing: var(--b-label-tracking); text-transform: uppercase;
  text-decoration: underline 1px var(--b-edge); text-underline-offset: .4em;
}
@media (hover: hover) { [data-brand="shoddy-v2"] .b-lights:hover { color: var(--b-accent); } }

/* The row of steps is left out on a phone when it sits above a form somebody fills in there */
@media (max-width: 48rem) { [data-brand="shoddy-v2"] .b-steps.b-steps--desk { display: none; } }

/* Navigation links are big enough to press */
[data-brand="shoddy-v2"] .b-nav a { display: inline-flex; align-items: center; min-height: 2.5rem; }

/* Double-spaced reading: a full line between paragraphs */
[data-brand="shoddy-v2"] .b-prose > * + * { margin-top: 1.5em; }

/* Pen drawings: paper lifted to white, so multiply leaves only the ink. Chalk when the lights are off. */
[data-brand="shoddy-v2"] .b-drawing { mix-blend-mode: multiply; }
[data-brand="shoddy-v2"][data-stage="lights-off"] .b-drawing,
[data-brand="shoddy-v2"] [data-stage="lights-off"] .b-drawing { filter: invert(1) sepia(.2) brightness(.92); mix-blend-mode: screen; }

/* Words written onto the page */
[data-brand="shoddy-v2"] .b-ink { animation: shoddy2-ink-in .45s ease-out both; }
@keyframes shoddy2-ink-in { from { opacity: 0; filter: blur(1.5px); } }
/* "It saved": the block turns to solid ink for a few seconds, then settles back to paper. Put it on the message's block when the save lands. */
[data-brand="shoddy-v2"] .b-flash { animation: shoddy2-flash 4s ease-out; }
@keyframes shoddy2-flash { 0%, 75% { background: var(--b-text); color: var(--b-bg); box-shadow: 0 0 0 var(--b-s2) var(--b-text); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { [data-brand="shoddy-v2"] .b-flash { animation: none; } }

/* App parts. Red marks only what is wrong, so a finished tick and a star rating are ink. */
[data-brand="shoddy-v2"] .b-tick[aria-pressed="true"], [data-brand="shoddy-v2"] .is-done > .b-tick { background: var(--b-text); border-color: var(--b-text); color: var(--b-bg); }
[data-brand="shoddy-v2"] .b-stars { color: var(--b-text); }

/* ---------- The drawn parts (shapes from sketch.js) ---------- */

/* Handwriting: margin notes, tab names and big numbers. Never anything read at length. */
[data-brand="shoddy-v2"] .b-note { font: 500 1.3rem/1.2 var(--b-font-hand); color: var(--b-text-muted); letter-spacing: 0; text-transform: none; }
[data-brand="shoddy-v2"] .b-note--gap { color: var(--b-gap); }
[data-brand="shoddy-v2"] .b-note--wrong { color: var(--b-accent); }
/* A note that is filled in later ("saved") keeps its line while empty, so the page does not jump */
[data-brand="shoddy-v2"] .b-note:empty { display: block; min-height: 1.2em; }
[data-brand="shoddy-v2"] .b-hand-num { font: 500 1.9rem/1 var(--b-font-hand); color: var(--b-accent); }

/* Every drawn line: no fill, round ends, drawn in the colour of the words around it */
[data-brand="shoddy-v2"] :is(.b-mark, .b-gauge, .b-arrow, .b-scrib svg) { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }

/* A tick, a cross, a dash, a ring or a slash. The cross is red (wrong). The ring is pencil (not yet); the same ring in pink (gap) says something is missing. */
[data-brand="shoddy-v2"] .b-mark { display: inline-block; width: 1.25rem; height: 1.25rem; flex: none; stroke-width: 1.9; vertical-align: -.25em; }
[data-brand="shoddy-v2"] :is(.b-mark--wait, .b-mark--na) { color: var(--b-text-muted); }
[data-brand="shoddy-v2"] .b-mark--gap { color: var(--b-gap); }
[data-brand="shoddy-v2"] .b-mark--no { color: var(--b-accent); }
/* A result: a mark and its words on one line. <p class="b-result"><svg class="b-mark">…</svg><span>Words</span></p> */
[data-brand="shoddy-v2"] .b-result { display: flex; gap: .7rem; align-items: flex-start; line-height: 1.5; }
[data-brand="shoddy-v2"] .b-result--inline { display: inline-flex; gap: .4rem; }
[data-brand="shoddy-v2"] .b-result > .b-mark, [data-brand="shoddy-v2"] .b-result > [data-draw] { flex: none; margin-top: .15rem; }

/* A count scribbled into a box */
[data-brand="shoddy-v2"] .b-gauge { display: inline-block; width: 11rem; max-width: 100%; height: auto; stroke-width: 1.3; overflow: visible; vertical-align: middle; }
/* A row per gauge: name, gauge, number. <ul class="b-gauges"><li><span class="b-meta">Name</span>GAUGE<span class="b-num">28 of 34</span></li></ul> */
[data-brand="shoddy-v2"] .b-gauges { list-style: none; margin: 0; padding: 0; }
[data-brand="shoddy-v2"] .b-gauges > li { display: grid; grid-template-columns: var(--b-gauge-name, 8.5rem) 11rem auto; gap: .8rem; align-items: center; padding: .3rem 0; }
[data-brand="shoddy-v2"] .b-gauges .b-num { font: 600 .9rem var(--b-font-label); }

/* Arrows between steps */
[data-brand="shoddy-v2"] .b-arrow { display: inline-block; width: 3.2rem; height: auto; stroke-width: 1.6; vertical-align: middle; color: var(--b-text-muted); }
[data-brand="shoddy-v2"] .b-arrow--down { width: 1.4rem; }

/* A quick double stroke, in red pen, under the words that matter */
[data-brand="shoddy-v2"] .b-scrib { position: relative; white-space: nowrap; }
[data-brand="shoddy-v2"] .b-scrib svg { position: absolute; left: -2%; bottom: -.3em; width: 104%; height: .42em; color: var(--b-accent); stroke-width: 2; }
[data-brand="shoddy-v2"] .b-scrib path { vector-effect: non-scaling-stroke; }

/* A jotting: a few words in red pen, marked by hand (a ring, an oblong, a stroke, two, a squiggle or an arrow). Made by jot() in sketch.js. */
[data-brand="shoddy-v2"] .b-jot { position: relative; display: inline-block; padding: 0 .1em; font: 500 1.5rem/1.15 var(--b-font-hand); letter-spacing: 0; text-transform: none; white-space: nowrap; color: var(--b-accent); }
[data-brand="shoddy-v2"] .b-jot-pen { position: absolute; inset: -.28em -.6em; width: calc(100% + 1.2em); height: calc(100% + .56em); overflow: visible; pointer-events: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
[data-brand="shoddy-v2"] :is(.b-jot--under, .b-jot--double, .b-jot--squiggle) > .b-jot-pen { inset: -.1em -.2em -.42em; width: calc(100% + .4em); height: calc(100% + .52em); }
[data-brand="shoddy-v2"] .b-jot-arrow { display: inline-block; width: 1.5em; height: auto; margin-right: .3em; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* Room for the ring or oblong when a jotting ends a row */
[data-brand="shoddy-v2"] :is(.b-jot--ring, .b-jot--box) { margin-inline: .6em; }

/* A link underlined by the pen: one loose stroke in place of the type-set underline. For short links in a row of details. */
[data-brand="shoddy-v2"] .b-penline { position: relative; text-decoration: none !important; white-space: nowrap; }
[data-brand="shoddy-v2"] .b-penline::after {
  content: ""; position: absolute; left: -3%; right: -3%; bottom: -.42em; height: .45em; background: currentColor;
  -webkit-mask: var(--b-pen-stroke) center / 100% 100% no-repeat; mask: var(--b-pen-stroke) center / 100% 100% no-repeat;
}
[data-brand="shoddy-v2"] { --b-pen-stroke: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M1 4.6c15-2.3 31-2.8 48-1.7 18 1.1 34 .5 50-1.5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
@media (hover: hover) { [data-brand="shoddy-v2"] .b-penline:hover { color: var(--b-accent); } }

/* A count in a drawn ring: a big handwritten number with a pen circle round it, and a small label beneath.
   <a class="b-ringed"><span class="b-ringed-num">JOT</span><span class="b-meta">lessons</span></a>, JOT being jot('149', 'ring') */
[data-brand="shoddy-v2"] .b-ringed { display: inline-grid; justify-items: center; gap: .2rem; text-decoration: none; }
[data-brand="shoddy-v2"] .b-ringed-num { display: grid; place-items: center; min-height: 4.5rem; }
[data-brand="shoddy-v2"] .b-ringed-num .b-jot { font-size: 2.2rem; min-width: 1.7em; text-align: center; padding: .25em .15em; }
[data-brand="shoddy-v2"] .b-ringed-num .b-jot-pen { inset: -.1em -.35em; width: calc(100% + .7em); height: calc(100% + .2em); }

/* A box drawn twice, slightly off, like a pen going round again */
[data-brand="shoddy-v2"] .b-sketch { position: relative; padding: var(--b-s3) var(--b-s4) var(--b-s4); }
[data-brand="shoddy-v2"] .b-sketch::before, [data-brand="shoddy-v2"] .b-sketch::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border: 1.5px solid var(--b-text); border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}
[data-brand="shoddy-v2"] .b-sketch::after { inset: 3px -2px -3px 2px; border-width: 1px; border-color: var(--b-edge); border-radius: 15px 225px 15px 255px / 255px 15px 225px 15px; }
[data-brand="shoddy-v2"] .b-sketch--dashed::before { border-style: dashed; border-color: var(--b-edge); }
[data-brand="shoddy-v2"] .b-sketch--dashed::after { display: none; }
/* A small drawn box: one step in a row of steps, or a stub */
[data-brand="shoddy-v2"] .b-sketch--small { display: grid; gap: .1rem; padding: .9rem 1.5rem; min-width: 11rem; }
/* A row of small boxes joined by arrows. Stacks on a phone, and the arrows turn to point down. */
[data-brand="shoddy-v2"] .b-steps { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--b-s2); }
/* The dashed pencil line across the foot of a drawn box */
[data-brand="shoddy-v2"] .b-sketch-foot { margin-top: var(--b-s3); padding-top: var(--b-s2); border-top: 1px dashed var(--b-edge); }
@media (max-width: 48rem) {
  [data-brand="shoddy-v2"] .b-sketch { padding: var(--b-s3) var(--b-s2); }
  [data-brand="shoddy-v2"] .b-sketch--small { padding: .9rem 1.5rem; }
  [data-brand="shoddy-v2"] .b-steps { flex-direction: column; }
  [data-brand="shoddy-v2"] .b-steps .b-arrow:not(.b-arrow--down) { rotate: 90deg; width: 2.4rem; }
  [data-brand="shoddy-v2"] .b-gauges > li { grid-template-columns: 6.5rem minmax(0, 1fr) auto; }
  [data-brand="shoddy-v2"] .b-gauges .b-gauge { width: 100%; }
}
/* The wobble needs the filter sketch.js adds to the page. Without it the boxes are still drawn, only steadier. */
:root:has(#b-rough) :is([data-brand="shoddy-v2"] .b-sketch)::before,
:root:has(#b-rough) :is([data-brand="shoddy-v2"] .b-sketch)::after,
:root:has(#b-rough) :is([data-brand="shoddy-v2"] .b-tab)::after { filter: url(#b-rough); }

/* Tabs are written by hand, with a red stroke under the one you are on */
[data-brand="shoddy-v2"] .b-tabs { gap: var(--b-s1) 2rem; }
[data-brand="shoddy-v2"] .b-tab {
  position: relative; min-height: 2.5rem; padding: 0 0 .25rem; border: 0; border-radius: 0;
  font: 500 1.55rem/1.2 var(--b-font-hand); letter-spacing: 0; text-transform: none; color: var(--b-text-muted);
}
[data-brand="shoddy-v2"] .b-tab[aria-current], [data-brand="shoddy-v2"] .b-tab[aria-selected="true"] { color: var(--b-text); background: none; }
[data-brand="shoddy-v2"] .b-tab[aria-current]::after, [data-brand="shoddy-v2"] .b-tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: -3%; right: -3%; bottom: .2rem; height: 2px; background: var(--b-accent); rotate: -.7deg;
}
[data-brand="shoddy-v2"] .b-tab .b-count { font: 400 .8rem var(--b-font-label); }
