/* design tokens: written by scripts/design-tokens.py from design/tokens.json */
:root {
  color-scheme: light dark;
  --sky-night: #0a0f2e;
  --sky-indigo: #2a2160;
  --sky-mauve: #6a3f72;
  --sky-glow: #ff9678;
  --sky-speck: #ffecde;
  --ribbon-peach: #ffba96;
  --ribbon-rose: #f58caf;
  --ribbon-lavender: #b9a5ff;
  --bg: #f7f6fa;
  --surface: #ffffff;
  --text: #1f1d33;
  --muted: #6a6481;
  --border: #e3e0eb;
  --border-strong: #8a85a3;
  --accent: var(--sky-mauve);
  --wordmark: var(--sky-indigo);
  --on: #117555;
  --off: #a43d29;
  --barcode-check-ground: #f6f3ec;
  --barcode-check-ink: #161b22;
  --barcode-check-accent: #0e7a4a;
  --barcode-check-on-accent: #ffffff;
  --idml-export-ground: #15203b;
  --idml-export-ink: #f6f1e7;
  --idml-export-accent: #f2a93b;
  --idml-export-on-accent: #15203b;
  --barcode-sensei-paper: #fbf9f4;
  --barcode-sensei-card: #ffffff;
  --barcode-sensei-sand: #f3eee3;
  --barcode-sensei-ink: #1d1b18;
  --barcode-sensei-quiet: #5e5a52;
  --barcode-sensei-line: #e9e4d9;
  --barcode-sensei-edge: #8a8374;
  --barcode-sensei-pen: #c8321c;
  --barcode-sensei-on-pen: #ffffff;
  --font-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-barcode-sensei-display: Fraunces, Georgia, "Times New Roman", serif;
  --font-barcode-sensei-text: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-barcode-sensei-hand: Caveat, "Segoe Print", "Bradley Hand", cursive;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--sky-night);
    --surface: #13173a;
    --text: #ece9f5;
    --muted: #a7a2c0;
    --border: #2a2d55;
    --border-strong: #6c6893;
    --accent: var(--ribbon-lavender);
    --wordmark: var(--ribbon-peach);
    --on: #7cd2ae;
    --off: var(--sky-glow);
  }
}
/* end of design tokens */

/* Barcode Sensei's fonts, from Fontsource's packages in static/fonts/ (README). Fraunces' files
   carry its optical size as well as its weight, so a heading takes the display cut at large sizes.
   Figtree's latin-ext file loads only for a page with a letter in its range, and its rules keep
   their package's order, since for a character in both ranges the browser tries the later first. */
@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
}
@font-face {
  font-family: Fraunces;
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/fraunces-latin-opsz-italic.woff2") format("woff2");
}
@font-face {
  font-family: Figtree;
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/fonts/figtree-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: Figtree;
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: Caveat;
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/fonts/caveat-latin-600-normal.woff2") format("woff2");
}

/* One theme, light, over the token block's: the page is a sheet of paper, and a barcode needs
   white under it, whatever the reader's system says. */
:root { color-scheme: light; }

* { box-sizing: border-box; }

/* Otherwise a rule that sets display, like the canvas's, shows what is hidden. */
[hidden] { display: none !important; }

/* The scrollbar shows even with nothing to scroll, since the barcode is drawn for the panel's width
   and would be redrawn on and on as one came and went. */
html { overflow-y: scroll; }

body {
  margin: 0;
  background: var(--barcode-sensei-paper);
  color: var(--barcode-sensei-ink);
  font: 17px/1.5 var(--font-barcode-sensei-text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a { color: var(--barcode-sensei-ink); text-underline-offset: 0.15em; }
a:hover { color: var(--barcode-sensei-quiet); }
:focus-visible { outline: 2px solid var(--barcode-sensei-ink); outline-offset: 2px; }
h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-barcode-sensei-display);
  font-size: 3.25rem;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-barcode-sensei-display);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
}

/* At main's width and sides, so the name stands over the page's heading. Where the name and the
   links don't fit on one line, as on a phone, the links go on a line under it. */
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
  max-width: 72.5rem;
  margin: 0 auto;
  padding: 20px 2rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--barcode-sensei-ink);
  font-family: var(--font-barcode-sensei-display);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand .seal { flex: none; width: 36px; height: 36px; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--barcode-sensei-ink);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
/* The last, to the account page, drawn as the design's pill. */
.nav .account { padding: 0 20px; border: 1.5px solid var(--barcode-sensei-ink); border-radius: 999px; }

main { max-width: 72.5rem; margin: 0 auto; padding: 1.75rem 2rem 3rem; }
.lead { max-width: 65ch; margin: 0 0 1.25rem; color: var(--barcode-sensei-quiet); font-size: 1.25rem; }
/* The line under the lead that leads to the type's other page, for one barcode or for many. */
.other { max-width: 65ch; margin: -0.75rem 0 1.25rem; }

/* A card, which alone casts the look's soft shadow of the ink. */
.panel {
  min-width: 0;
  padding: 1.75rem;
  background: var(--barcode-sensei-card);
  border-radius: 20px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--barcode-sensei-ink) 5%, transparent),
    0 16px 40px color-mix(in srgb, var(--barcode-sensei-ink) 8%, transparent);
}

.label { font-weight: 700; }
.field {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--barcode-sensei-edge);
  border-radius: 16px;
  background: var(--barcode-sensei-card);
  color: var(--barcode-sensei-ink);
  font: inherit;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.field:hover, .field:focus { border-color: var(--barcode-sensei-ink); }
/* As a disabled button looks: what doesn't apply to the choice made, such as a roll's start. */
.field:disabled { color: var(--barcode-sensei-quiet); border-color: var(--barcode-sensei-line); }
textarea.field { min-height: 6rem; padding: 14px 18px; resize: vertical; }
.hint { margin: 0; color: var(--barcode-sensei-quiet); font-size: 0.9375rem; }
/* The Digital Link's link, whole. It has no spaces to wrap at, and keeps a field's height while
   there is none. */
.link { display: block; min-height: 52px; padding: 12px 16px; overflow-wrap: anywhere; }
/* At its own width, not the panel's. */
.copy { justify-self: start; }
/* The Size control at about the width the design gives a number, not the panel's. */
.size { justify-self: start; width: auto; min-width: 6.5rem; }
/* A number typed, at the width the design gives one, and a choice at its own width, no wider than
   its panel however long its options. */
.count { justify-self: start; width: 6.5rem; }
.pick { justify-self: start; width: auto; min-width: 0; max-width: 100%; }
/* A GS1 page's fields, side by side where they fit, between the field and the barcode. */
.parts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: 0.75rem 1rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.parts legend { padding: 0; margin-bottom: 0.5rem; }
.part { display: grid; gap: 0.25rem; align-content: start; }
.part-label { font-size: 0.9375rem; }
/* The sentence saying what is wrong: again under the field typed in, since on a phone the page's
   own can be out of sight below it, and under the button that counts a run of SSCCs out. */
.part-message { margin: 0; color: var(--barcode-sensei-pen); font-weight: 600; font-size: 0.9375rem; }
/* The SSCC's many page's run, counted out into the box below it, its parts as a GS1 page's. */
.counting { display: grid; gap: 12px; min-width: 0; }
.counting h2 { margin: 0; }
.counting .actions { margin-top: 0; }
/* On the page made for Pro, the parts go in a form the server counts the run out from. */
.run { display: grid; gap: 12px; min-width: 0; }
/* It keeps its line when empty, so nothing around it jumps as a sentence comes and goes. */
.message { min-height: 1.5em; margin: 0.25rem 0 0; color: var(--barcode-sensei-quiet); }
.message.off { color: var(--barcode-sensei-pen); font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.button {
  min-height: 48px;
  padding: 0 24px;
  border: 1.5px solid var(--barcode-sensei-ink);
  border-radius: 999px;
  background: var(--barcode-sensei-card);
  color: var(--barcode-sensei-ink);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
/* The page's own download, of the SVG or of the SVGs' ZIP. */
.button.main { background: var(--barcode-sensei-ink); color: var(--barcode-sensei-card); }
.button:disabled {
  border-color: var(--barcode-sensei-line);
  background: var(--barcode-sensei-card);
  color: var(--barcode-sensei-quiet);
  cursor: default;
}

/* Many barcodes at once: the rows, the file they may come from and the size in a card, and beside
   it from 60rem, or under it, what they come to, how far the work has got, the rows listed and the
   downloads. */
.many { display: flex; flex-direction: column; gap: 32px; }
.many-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 28px;
  background: var(--barcode-sensei-card);
  border-radius: 28px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--barcode-sensei-ink) 5%, transparent),
    0 16px 40px color-mix(in srgb, var(--barcode-sensei-ink) 8%, transparent);
}
/* Each label starts its field's group, and a box its own, the groups 22px apart. */
.many-card > .label:not(:first-child), .many-card > .check { margin-top: 14px; }
.outcome { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (min-width: 60rem) {
  .many { flex-direction: row; align-items: flex-start; }
  .many-card { flex: 1 1 440px; }
  .outcome { flex: 1 1 480px; }
}
/* A row a line, so a long one scrolls rather than wraps and looks like two. */
.lines { white-space: pre; overflow-wrap: normal; overflow-x: auto; }
/* The browser's own file picker, which says its button's words and the file's name in the reader's
   language, its button shaped as a .button. The browser makes it wide enough for a long name, wider
   than a phone's panel, and a grid's item is never narrower than its content unless let. */
.file { justify-self: start; min-width: 0; max-width: 100%; font: inherit; color: var(--barcode-sensei-quiet); }
.file::file-selector-button {
  min-height: 44px;
  margin-right: 1rem;
  padding: 0 24px;
  border: 1.5px solid var(--barcode-sensei-ink);
  border-radius: 999px;
  background: var(--barcode-sensei-card);
  color: var(--barcode-sensei-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.source { margin: 0; }
/* A Pro account's form that saves the box's rows as a list, set apart at the card's end. */
.save { display: grid; gap: 8px; margin-top: 14px; padding-top: 22px; border-top: 1px solid var(--barcode-sensei-line); }
.save .message { min-height: 0; margin: 0; }
.save .actions { margin-top: 0; }
.summary { min-height: 1.5em; margin: 0.25rem 0 0; }
/* What the rows come to, and under it what needs fixing, each taking no room while it says
   nothing. */
.said { display: flex; flex-direction: column; gap: 4px; }
.verdict {
  margin: 0;
  font-family: var(--font-barcode-sensei-display);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.fixing { margin: 0; color: var(--barcode-sensei-quiet); }
.verdict:empty, .fixing:empty { display: none; }
.working { display: grid; gap: 0.25rem; }
/* As thin as a meter, in ink: work under way rather than spend against a limit. */
.progress {
  display: block;
  width: 100%;
  height: 0.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--barcode-sensei-line);
  -webkit-appearance: none;
  appearance: none;
}
.progress::-webkit-progress-bar { border-radius: 999px; background: var(--barcode-sensei-line); }
.progress::-webkit-progress-value { border-radius: 999px; background: var(--barcode-sensei-ink); }
.progress::-moz-progress-bar { border-radius: 999px; background: var(--barcode-sensei-ink); }
/* Label sheets: the sheet, the copies and the label to start at, and each sheet as it prints. On
   the screen the sheets show one a row at 4 px a millimetre, where their labels' words, 3 mm high,
   stand 12 px tall, with the labels' outlines and those already used shaded, in a panel that holds
   a US Letter sheet on a desktop. A roll's labels show at their own size, or narrower where the
   panel is, side by side where there is room. */
.sheets-panel { display: grid; gap: 0.5rem; max-width: 60rem; margin-top: 1.25rem; }
.sheets-panel h2 { margin: 0 0 0.25rem; }
.counts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.counted { display: grid; gap: 0.5rem; }
.check { display: flex; align-items: baseline; gap: 0.5rem; }
.check input { flex: none; margin: 0; accent-color: var(--barcode-sensei-ink); }
.check:has(input:disabled) { color: var(--barcode-sensei-quiet); }
.fit { margin: 0; color: var(--barcode-sensei-pen); font-weight: 600; }
.sheets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.sheets:empty { display: none; }
/* A hairline on the screen at any scale, and about a quarter of a millimetre on paper. */
.outline { fill: none; stroke: var(--barcode-sensei-edge); stroke-width: 1px; vector-effect: non-scaling-stroke; }
/* The sheet is white paper, so the shade is a light one. */
.outline.used { fill: var(--barcode-sensei-quiet); fill-opacity: 0.15; }
@media screen {
  .sheet { display: block; height: auto; border: 1px solid var(--barcode-sensei-line); }
  .sheet.a4 { width: 840px; aspect-ratio: 210 / 297; }
  .sheet.letter { width: 864px; aspect-ratio: 215.9 / 279.4; }
  /* Its width in millimetres is its own, and its height follows from its viewBox. Its frame is an
     outline, which takes no room from its size. */
  .sheet.roll { max-width: 100%; border: 0; outline: 1px solid var(--barcode-sensei-line); }
  .sheets.rolls { display: flex; flex-wrap: wrap; align-items: flex-start; }
  /* A sheet wider than the panel, as on a phone, scrolls in its box rather than the page. On the
     screen alone, since a box that scrolls may not break across printed pages, and not for a roll's
     labels, which fit the panel and whose outlines the box's edges would cut. */
  .sheets:not(.rolls) { overflow-x: auto; }
}
/* The rows that need fixing and those made, each a card. Their rows share one column of numbers,
   as wide as the widest and at least 24px, so every value starts in line. A card of a thousand
   rows scrolls inside itself, so the downloads and the sheets stay in reach. */
.fixes, .made {
  max-height: 35rem;
  overflow-y: auto;
  background: var(--barcode-sensei-card);
  border-radius: 20px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--barcode-sensei-ink) 5%, transparent),
    0 8px 24px color-mix(in srgb, var(--barcode-sensei-ink) 6%, transparent);
}
.fixes { display: flex; flex-direction: column; gap: 10px; padding: 18px 24px 20px; }
.fixes h2 {
  margin: 0;
  color: var(--barcode-sensei-pen);
  font-family: var(--font-barcode-sensei-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}
.rows-list {
  display: grid;
  grid-template-columns: minmax(24px, max-content) minmax(0, 1fr);
  column-gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-variant-numeric: tabular-nums;
}
.rows-list > li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; }
.row-no { color: var(--barcode-sensei-quiet); }
/* As it is, with any line breaks, and wrapped anywhere rather than wider than a phone. */
.value { min-width: 0; letter-spacing: 0.04em; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Its number in line with its value, and the sentence that says what is wrong under both. */
.fixes li { row-gap: 10px; align-items: baseline; font-size: 19px; }
.fixes li + li { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--barcode-sensei-line); }
.fix-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-width: 0; }
.fix-why { grid-column: 1 / -1; margin: 0; color: var(--barcode-sensei-quiet); font-size: 16px; }
/* The teacher's ring round a wrong check digit, which .marked places it by. */
.pen-ring { position: absolute; left: -10px; top: -3px; color: var(--barcode-sensei-pen); pointer-events: none; }
.pen-arrow { flex: none; }
.made { grid-template-columns: minmax(24px, max-content) minmax(0, 1fr) auto; padding: 10px 24px; font-size: 18px; }
.made li { align-items: center; padding: 13px 0; border-bottom: 1px solid var(--barcode-sensei-line); }
.made li:last-child { border-bottom: 0; }
/* A remark follows the value, or goes under it where there is no room. */
.made-value { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; min-width: 0; }
.remark { flex: 1 1 160px; min-width: 0; color: var(--barcode-sensei-quiet); font-size: 16px; }
.made-tick { color: var(--barcode-sensei-ink); }
.outcome .actions { margin-top: 0; }
.outcome .button { min-height: 50px; padding: 0 26px; }

.kinds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.kind {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  height: 100%;
  padding: 1.5rem;
  background: var(--barcode-sensei-card);
  border-radius: 20px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--barcode-sensei-ink) 5%, transparent),
    0 8px 24px color-mix(in srgb, var(--barcode-sensei-ink) 6%, transparent);
  color: var(--barcode-sensei-ink);
  text-decoration: none;
}
/* An outline, which takes no room, so nothing moves. */
.kind:hover { outline: 1.5px solid var(--barcode-sensei-ink); }
.kind:focus-visible { outline: 2px solid var(--barcode-sensei-ink); }
.kind .name { color: var(--barcode-sensei-ink); font-weight: 700; }
.kind .sentence { color: var(--barcode-sensei-quiet); font-size: 0.9375rem; }

/* The home page's title, or a type's page's heading, and the tool that makes the barcode, side by
   side from 71rem. */
.home { display: grid; gap: 48px; padding: 40px 0 88px; }
/* On a type's page the words on its type follow the tool, and their own margin sets them off. */
.home.maker { padding-bottom: 0; }
.welcome { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; min-width: 0; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--barcode-sensei-sand);
  font-size: 15px;
  font-weight: 500;
}
.welcome h1 { margin: 0; font-size: 4.25rem; line-height: 1.04; }
/* A type's heading is longer than the home page's title, so it is smaller. After the home page's
   rule, which is as specific. */
.maker h1 { font-size: 2.75rem; }
/* Its padding is the room under the words for their line, which is drawn 2px up into them. */
.underlined { position: relative; display: inline-block; padding-bottom: 14px; font-style: italic; font-weight: 500; }
.underline {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 16px;
  fill: none;
  stroke: var(--barcode-sensei-pen);
  stroke-width: 4;
  stroke-linecap: round;
}
.welcome .lead { max-width: 460px; margin: 0; }
.welcome .other { margin: 0; }
/* It points at the tool beside it, so it shows only where the tool is beside it. */
.start-here {
  display: none;
  align-self: flex-end;
  align-items: flex-end;
  gap: 6px;
  margin: 0;
  color: var(--barcode-sensei-pen);
  font-family: var(--font-barcode-sensei-hand);
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  transform: rotate(-3deg);
}
.arrow {
  flex: none;
  width: 110px;
  height: 55px;
  fill: none;
  stroke: var(--barcode-sensei-pen);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tool {
  display: grid;
  gap: 24px;
  width: 100%;
  min-width: 0;
  max-width: 40rem;
  padding: 32px;
  background: var(--barcode-sensei-card);
  border-radius: 28px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--barcode-sensei-ink) 5%, transparent),
    0 16px 40px color-mix(in srgb, var(--barcode-sensei-ink) 8%, transparent);
}
.entry { display: grid; gap: 8px; }
.entry .field { min-height: 58px; padding: 0 18px; font-size: 21px; letter-spacing: 0.04em; }
/* A type's page's field for text and the Digital Link's link keep their own height and padding. */
.entry textarea.field { min-height: 6rem; padding: 14px 18px; }
.entry .field.link { padding: 12px 18px; }
/* A type's page's line under the field: the sentence on what is wrong in the pen, as the message
   says it, and beside a wrong check digit the right one written in, as on a many page. */
.pen-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin: 0;
  color: var(--barcode-sensei-pen);
  font-weight: 600;
}
/* With no ring round a digit before it to clear. */
.pen-line .correction { margin-left: 0; }
/* The Size control with its label and hint, as close together as the field and its own. */
.sizing { display: grid; gap: 8px; }
/* What is it for: the question, the choices and the line that names the type picked. A fieldset's
   legend stands outside its grid, so its margin is the gap under it. */
.purpose { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
.purpose legend { margin-bottom: 12px; padding: 0; font-size: 17px; font-weight: 700; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--barcode-sensei-line);
  border-radius: 999px;
  background: var(--barcode-sensei-paper);
  color: var(--barcode-sensei-ink);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.choice:has(:checked) {
  border-color: var(--barcode-sensei-ink);
  background: var(--barcode-sensei-ink);
  color: var(--barcode-sensei-card);
}
/* The pill shows what is picked, so the radio button's circle doesn't: it stays under the pill for
   the keyboard and a screen reader, and the pill takes its focus ring. */
.choice input { position: absolute; margin: 0; opacity: 0; }
.choice:has(:focus-visible) { outline: 2px solid var(--barcode-sensei-ink); outline-offset: 2px; }
/* Windows' high contrast mode drops the ink a picked pill shows by, so there it takes the system's
   Highlight, and its focus ring, which the mode no longer colours, the system's text colour. */
@media (forced-colors: active) {
  .choice:has(:checked) {
    forced-color-adjust: none;
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
    outline-color: CanvasText;
  }
}
.choice-line { display: none; margin: 0; color: var(--barcode-sensei-quiet); font-size: 16px; }
.choice-line b { color: var(--barcode-sensei-ink); font-weight: 700; }
/* page.js knows nothing of the lines: the picked choice's shows by a rule, as "Looks right." does. */
.purpose:has(#choice-ean-13:checked) #choice-ean-13-line,
.purpose:has(#choice-itf-14:checked) #choice-itf-14-line,
.purpose:has(#choice-qr-code:checked) #choice-qr-code-line,
.purpose:has(#choice-code-128:checked) #choice-code-128-line { display: block; }
.result {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
  padding: 22px;
  background: var(--barcode-sensei-sand);
  border-radius: 20px;
}
/* The width inside it is the barcode's room, twice the widest EAN-13 the engine draws at a pixel a
   module, so every one shows at two screen pixels a module, and each choice's sample fits it, and
   each type's but those whose notes go under it (tests/test_rules.py). A wider one scrolls sideways
   inside it: a grid's item is never narrower than its content unless let, so the tool and the
   sand panel are let. */
.drawing {
  flex: none;
  display: grid;
  place-items: center;
  width: 262px;
  padding: 18px 16px 12px;
  background: var(--barcode-sensei-card);
  border-radius: 14px;
  overflow-x: auto;
}
/* page.js shows it at its own size in screen pixels. Where the pixel ratio isn't a whole number and
   the browser resamples it anyway, its modules keep their edges. */
.drawing canvas { display: block; image-rendering: pixelated; }
.notes { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.looks-right {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 16px 6px 10px;
  font-size: 20px;
  font-weight: 700;
}
/* page.js hides the canvas while there is no barcode to show. */
.result:has(canvas[hidden]) .looks-right { display: none; }
.tick {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--barcode-sensei-ink);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ring {
  position: absolute;
  left: -6px;
  top: -7px;
  width: calc(100% + 12px);
  height: calc(100% + 14px);
  fill: none;
  stroke: var(--barcode-sensei-pen);
  stroke-width: 3;
  stroke-linecap: round;
  pointer-events: none;
}
.notes .message { margin: 0; }
.notes .message, .notes .hint, .pen-line { font-size: 16px; }
.notes .actions { gap: 10px; margin-top: 4px; }
/* A type's page whose sample is wider than the white card beside the notes, one in WIDE in
   src/main.py: the card takes the sand panel's width, with the notes under it at every width. */
.result.wide { flex-direction: column; align-items: stretch; }
.wide .drawing { width: auto; }
.also { margin: 0; }
@media (min-width: 71rem) {
  .home { grid-template-columns: minmax(0, 1fr) 572px; align-items: center; gap: 56px; }
  .start-here { display: flex; }
}

/* What each kind of barcode is for: a card a job, as many across as fit, each leading to its type's
   page with the barcode that page downloads of its sample, from static/jobs/. */
.jobs { padding: 24px 0 96px; }
.jobs h2 { margin: 0; font-size: 2.5rem; line-height: 1.1; letter-spacing: -0.015em; }
.jobs-line { margin: 10px 0 0; color: var(--barcode-sensei-quiet); font-size: 19px; }
.job-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}
.job {
  display: block;
  height: 100%;
  padding: 24px;
  background: var(--barcode-sensei-card);
  border-radius: 24px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--barcode-sensei-ink) 5%, transparent),
    0 8px 24px color-mix(in srgb, var(--barcode-sensei-ink) 6%, transparent);
  color: var(--barcode-sensei-ink);
  text-decoration: none;
}
.job:hover { outline: 1.5px solid var(--barcode-sensei-ink); }
.job:focus-visible { outline: 2px solid var(--barcode-sensei-ink); }
.job-drawing { display: flex; align-items: center; height: 60px; margin-bottom: 16px; }
/* At its own size in millimetres, or scaled down to fit, so a code as small as the DataMatrix
   shows small. */
.job-barcode { display: block; max-width: 100%; max-height: 56px; }
.job-title { display: block; color: var(--barcode-sensei-ink); font-size: 19px; font-weight: 700; }
.job-type { display: block; margin-top: 2px; color: var(--barcode-sensei-quiet); font-size: 16px; }
.all-types {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 28px;
  font-size: 17px;
  font-weight: 600;
}
.all-types-arrow {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--barcode-sensei-ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The band that leads to many at once, its words beside a picture of a many page where both fit.
   Its sand reaches the window's edges though the band stands in main: a shadow of sand, cut to
   the band's height, which takes no room and scrolls nothing. */
.band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px 64px;
  padding: 88px 0;
  background: var(--barcode-sensei-sand);
  box-shadow: 0 0 0 100vmax var(--barcode-sensei-sand);
  clip-path: inset(0 -100vmax);
}
.band-words { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.band h2 { margin: 0; font-size: 2.5rem; line-height: 1.1; letter-spacing: -0.015em; }
.band-line { margin: 0; color: var(--barcode-sensei-quiet); font-size: 19px; }
/* A link drawn as the look's button. */
.band .button { display: flex; align-items: center; margin-top: 6px; text-decoration: none; }
.example {
  flex: 1 1 500px;
  min-width: 0;
  padding: 10px 28px;
  background: var(--barcode-sensei-card);
  border-radius: 24px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--barcode-sensei-ink) 5%, transparent),
    0 8px 24px color-mix(in srgb, var(--barcode-sensei-ink) 6%, transparent);
  font-size: 18px;
}
.example-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--barcode-sensei-line);
}
.row-number { flex: none; width: 24px; color: var(--barcode-sensei-quiet); }
.digits { flex: 1 1 0; min-width: 0; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.example .tick { stroke-width: 2.2; }
/* The wrong row's note follows its digits, or goes under them where there is no room. */
.example-row.wrong { flex-wrap: wrap; row-gap: 8px; }
.wrong .digits { flex: none; }
.marked { position: relative; display: inline-block; }
.digit-ring {
  position: absolute;
  left: -10px;
  top: -4px;
  width: 30px;
  height: 36px;
  fill: none;
  stroke: var(--barcode-sensei-pen);
  stroke-width: 2.2;
  stroke-linecap: round;
  pointer-events: none;
}
.correction {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  color: var(--barcode-sensei-pen);
  font-family: var(--font-barcode-sensei-hand);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  transform: rotate(-2deg);
}
.correction-arrow {
  flex: none;
  width: 40px;
  height: 22px;
  fill: none;
  stroke: var(--barcode-sensei-pen);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tally { margin: 0; padding: 16px 0; font-weight: 700; }

/* Three reasons to trust the site, side by side where they fit. */
.reasons { display: flex; flex-wrap: wrap; gap: 40px 48px; padding: 96px 0; }
.reason { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.reason-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--barcode-sensei-sand);
}
.reason-drawing {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--barcode-sensei-ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reason h3 {
  margin: 0;
  font-family: var(--font-barcode-sensei-display);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.reason p { margin: 0; color: var(--barcode-sensei-quiet); }
/* The home page's contact address under them, which their padding sets off, close above the
   footer. */
.contact { max-width: 65ch; margin: 0; }
.contact + .foot { margin-top: 1.75rem; }

/* The pricing page: Free and Pro, side by side where both fit, and the line under them. */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 24px;
}
/* A card, with a panel's soft shadow. Its parts start at its top, so the shorter card keeps them
   16 px apart when the grid stretches both to one height. */
.plan {
  display: grid;
  align-content: start;
  gap: 16px;
  max-width: 40rem;
  padding: 28px;
  background: var(--barcode-sensei-card);
  border-radius: 20px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--barcode-sensei-ink) 5%, transparent),
    0 16px 40px color-mix(in srgb, var(--barcode-sensei-ink) 8%, transparent);
}
.plan h2, .plan p { margin: 0; }
.price { font-family: var(--font-barcode-sensei-display); font-size: 2.5rem; font-weight: 600; line-height: 1.1; }
.per { font-family: var(--font-barcode-sensei-text); font-size: 17px; font-weight: 400; color: var(--barcode-sensei-quiet); }
.features { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.features li { display: flex; gap: 10px; }
/* Centred on the first line of its words, which may wrap. */
.features .tick { margin-top: calc((1.5em - 20px) / 2); stroke-width: 2.2; }
/* A link drawn as the look's button, at its own width. */
.plan .button { display: flex; align-items: center; justify-self: start; text-decoration: none; }
.soon { color: var(--barcode-sensei-quiet); }
/* Pro's checkout to someone signed in: the box, its words wrapping beside it, over the buttons,
   which wrap one above the other where both don't fit. */
.checkout { display: grid; gap: 16px; }
.checkout .actions { margin-top: 0; }
.plans-note { margin: 24px 0 0; color: var(--barcode-sensei-quiet); font-size: 15px; }

/* The account page: its words at the measure of running text, the links to create an account and
   to sign in drawn as the look's buttons in a row, spaced like the rest by the grid's gap, and each
   form a column at its own width, deleting the account set apart below. An address has no spaces
   to wrap at. */
.your-account { display: grid; justify-items: start; gap: 16px; max-width: 65ch; }
.your-account p { margin: 0; }
.your-account .lead { overflow-wrap: anywhere; }
.your-account .actions { margin-top: 0; }
.your-account .button { display: inline-flex; align-items: center; text-decoration: none; }
.your-account form, .delete { display: grid; justify-items: start; gap: 16px; }
.delete { margin-top: 24px; }
.delete h2 { margin: 0; }
/* A Pro account's saved lists, each its name and what it holds, then its buttons. A name may have
   no spaces to wrap at. */
.lists { display: grid; gap: 16px; margin-top: 24px; }
.lists h2 { margin: 0; }
.saved { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.saved li { display: grid; justify-items: start; gap: 8px; }
.saved b { overflow-wrap: anywhere; }

/* Its hairline across main's width, and its words at the measure of running text. */
.foot {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--barcode-sensei-line);
  color: var(--barcode-sensei-quiet);
  font-size: 0.9375rem;
}
.foot p { max-width: 65ch; margin: 0 0 0.5rem; }
.foot .sign {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.75rem;
  color: var(--barcode-sensei-ink);
  font-family: var(--font-barcode-sensei-display);
  font-size: 19px;
  font-weight: 600;
}
.foot .seal { flex: none; width: 28px; height: 28px; }
.legal { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--barcode-sensei-ink);
  font-weight: 500;
}
.nav a:hover, .legal a:hover { color: var(--barcode-sensei-quiet); }

/* The legal pages' text, and the words under a type's or a many page's tool, at the measure the
   design gives running text. */
.prose { max-width: 65ch; }
.prose h2 { margin: 1.75rem 0 0.5rem; }
.prose p, .prose ul { margin: 0 0 0.75rem; }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.5rem; }
/* A type's page's words on its type, and a many page's on making many of it, set off from the
   tool, each question a heading in the display face just above its answer. */
.about { margin-top: 2.5rem; }
.about h3 {
  margin: 1.25rem 0 0.25rem;
  font-family: var(--font-barcode-sensei-display);
  font-weight: 600;
  line-height: 1.2;
}

@media (max-width: 42rem) {
  .bar { padding: 8px 1rem 0; }
  .brand { font-size: 20px; }
  .brand .seal { width: 30px; height: 30px; }
  /* So the account's pill fits on the links' row on a page 390 px wide. */
  .nav { column-gap: 16px; }
  main { padding: 1.25rem 1rem 3rem; }
  h1 { font-size: 2.125rem; }
  .lead { font-size: 1.125rem; }
  .panel { padding: 1rem; }
  .many-card { padding: 20px; }
  .verdict { font-size: 28px; }
  .fixes { padding: 18px 20px 20px; }
  .made { padding: 10px 20px; }
  .home { gap: 20px; padding: 16px 0 28px; }
  .welcome { gap: 14px; }
  .pill { min-height: 32px; padding: 0 12px; font-size: 14px; }
  .welcome h1 { font-size: 2.75rem; line-height: 1.06; }
  .maker h1 { font-size: 2rem; }
  .underlined { padding-bottom: 10px; }
  .underline { height: 12px; }
  .tool {
    gap: 20px;
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 1px 2px color-mix(in srgb, var(--barcode-sensei-ink) 5%, transparent),
      0 12px 32px color-mix(in srgb, var(--barcode-sensei-ink) 8%, transparent);
  }
  .entry .field { padding: 0 16px; }
  .purpose { gap: 10px; }
  .purpose legend { margin-bottom: 10px; }
  .choice { padding: 0 16px; }
  .choice-line { font-size: 15px; }
  .result { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; }
  .drawing { width: auto; padding: 16px 16px 10px; }
  /* The barcode brings its own quiet zone, so on a type's page its room goes to the bars: on a
     page 390 px wide the sides leave 294 px, which holds the longest Data Matrix, 584 screen pixels
     at a pixel ratio of 2, and a GS1-128 of 286 modules at two screen pixels each. */
  .maker .result { padding-left: 12px; padding-right: 12px; }
  .maker .drawing { padding-left: 0; padding-right: 0; }
  .notes { align-items: center; text-align: center; }
  .looks-right { font-size: 19px; }
  .notes .message, .notes .hint, .pen-line { font-size: 15px; }
  .notes .actions { flex-direction: column; align-self: stretch; }
  .notes .button { min-height: 54px; font-size: 18px; }
  .jobs { padding: 16px 0 56px; }
  .jobs h2 { font-size: 1.875rem; }
  .band { padding: 48px 0; }
  .band h2 { font-size: 1.875rem; }
  .example { padding: 10px 20px; }
  .reasons { padding: 56px 0; }
  .plan { padding: 20px; }
  .price { font-size: 1.875rem; }
}

/* Printed, a page with sheets laid out shows them alone, each a page of its paper's size with no
   margins, which it names, at its own size in millimetres; any other page prints as it shows. A
   roll's label names the page roll, whose rule many-page.js adds at the size of the label picked. */
@page a4 { size: 210mm 297mm; margin: 0; }
@page letter { size: 8.5in 11in; margin: 0; }

@media print {
  body:has(.sheet) { background: none; }
  body:has(.sheet) > :not(main), body:has(.sheet) main > :not(.sheets-panel),
  body:has(.sheet) .sheets-panel > :not(.sheets) { display: none; }
  body:has(.sheet) main, body:has(.sheet) .sheets-panel {
    display: block; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none;
    box-shadow: none;
  }
  .sheets { display: block; margin: 0; }
  .sheet { display: block; break-after: page; }
  .sheet:last-child { break-after: auto; }
  .sheet.a4 { page: a4; }
  .sheet.letter { page: letter; }
  .sheet.roll { page: roll; }
  .sheets:not(.outlined) .outline { display: none; }
  .outline.used { fill: none; }
}
