/* Row by Row — shared site styles. Tokens match the "Site — Pastel" Figma page. */
:root {
  --bg: #faf2ff; --surface: #ffffff; --surface-2: #faeeff; --ink: #291838; --muted: #625c7c;
  --line: #ecdcff; --line-2: #f3e8ff; --violet: #983bee; --violet-ink: #ffffff; --violet-deep: #702aaf;
  --lav: #f3deff; --mint: #d2f5e6; --peri: #dce8ff; --blue: #1f4fae; --green: #1e6e50; --check: #3cb482;
  --footer: #542282; --footer-ink: #faf2ff; --deco-1: #c378ff; --deco-2: #5ad2a0; --deco-3: #6ea0ff; --deco-4: #dea0ff;
  --ok: #1e6e50; --ok-bg: #d2f5e6; --warn: #7a4a00; --warn-bg: #fff3d6; --bad: #9e2119; --bad-bg: #fbe0de;
  --hl: #fff3d6; --hl-line: #c79a00;
  --f-head: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;
  --lh: 1.55; --radius: 32px; --shadow: 0 10px 30px rgba(84, 34, 130, .08);
  color-scheme: light;
}
/* dark theme: chosen in Settings, or following the device when set to "Match device" */
:root[data-theme="dark"] {
  --bg: #160f24; --surface: #21182f; --surface-2: #2c2140; --ink: #eeeafb; --muted: #b9b2d6;
  --line: #3a3456; --line-2: #2f2a49; --violet: #c58cff; --violet-ink: #1a1030; --violet-deep: #e0c2ff;
  --lav: #322a5a; --mint: #183f31; --peri: #1d2b4d; --blue: #a9c4ff; --green: #8fdcb8;
  --footer: #2a1145; --deco-1: #3d2160; --deco-2: #15302a; --deco-3: #1d2b4d; --deco-4: #3a2050; --check: #5ad2a0;
  --ok: #8fdcb8; --ok-bg: #183f31; --warn: #f2c57a; --warn-bg: #3d3014; --bad: #ff9a94; --bad-bg: #4a1d1d;
  --hl: #3d3014; --hl-line: #f2c57a; --shadow: none; color-scheme: dark; --link: var(--violet);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #160f24; --surface: #21182f; --surface-2: #2c2140; --ink: #eeeafb; --muted: #b9b2d6;
    --line: #3a3456; --line-2: #2f2a49; --violet: #c58cff; --violet-ink: #1a1030; --violet-deep: #e0c2ff;
    --lav: #322a5a; --mint: #183f31; --peri: #1d2b4d; --blue: #a9c4ff; --green: #8fdcb8;
    --footer: #2a1145; --deco-1: #3d2160; --deco-2: #15302a; --deco-3: #1d2b4d; --deco-4: #3a2050; --check: #5ad2a0;
    --ok: #8fdcb8; --ok-bg: #183f31; --warn: #f2c57a; --warn-bg: #3d3014; --bad: #ff9a94; --bad-bg: #4a1d1d;
    --hl: #3d3014; --hl-line: #f2c57a; --shadow: none; color-scheme: dark; --link: var(--violet);
  }
}
:root[data-theme="hc-light"] {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #ffffff; --ink: #000000; --muted: #1f1f1f;
  --line: #000000; --line-2: #000000; --violet: #3a1fb0; --violet-ink: #ffffff; --violet-deep: #2a148a;
  --lav: #ffffff; --mint: #ffffff; --peri: #ffffff; --blue: #002f8a; --green: #00512e;
  --footer: #000000; --deco-1: transparent; --deco-2: transparent; --deco-3: transparent; --deco-4: transparent;
  --ok: #00512e; --ok-bg: #ffffff; --warn: #5c3300; --warn-bg: #ffffff; --bad: #8a0b05; --bad-bg: #ffffff;
  --hl: #fff3a6; --hl-line: #000; --shadow: none;
}
:root[data-theme="hc-dark"] {
  --bg: #000000; --surface: #000000; --surface-2: #000000; --ink: #ffffff; --muted: #e6e6e6;
  --line: #ffffff; --line-2: #ffffff; --violet: #cbbfff; --violet-ink: #000000; --violet-deep: #e2dbff;
  --lav: #000000; --mint: #000000; --peri: #000000; --blue: #bcd3ff; --green: #9ff0c8;
  --footer: #000000; --footer-ink: #ffffff; --deco-1: transparent; --deco-2: transparent; --deco-3: transparent; --deco-4: transparent;
  --ok: #9ff0c8; --ok-bg: #000; --warn: #ffd27a; --warn-bg: #000; --bad: #ffaaa5; --bad-bg: #000;
  --hl: #3a3000; --hl-line: #ffd27a; --shadow: none; color-scheme: dark; --link: var(--violet);
}
/* color vision: checks, warnings and problems stay apart; every status also carries a symbol and a word */
:root[data-cv="rg"] { --ok: #0b3f8f; --ok-bg: #dce8ff; --warn: #7a3e00; --warn-bg: #ffe1c2; --bad: #1e1838; --bad-bg: #e4e0ef; }
:root[data-cv="by"] { --ok: #1e6e50; --ok-bg: #d2f5e6; --warn: #7a1e5c; --warn-bg: #f8ddee; --bad: #9e2119; --bad-bg: #fbe0de; }
:root[data-cv="mono"] { --ok: #222; --ok-bg: #f2f2f2; --warn: #000; --warn-bg: #c9c9c9; --bad: #000; --bad-bg: #ffffff; --status-border: 2px; }
:root[data-theme="dark"][data-cv="rg"], :root[data-theme="hc-dark"][data-cv="rg"] { --ok: #a9c4ff; --ok-bg: #1d2b4d; --warn: #ffb36b; --warn-bg: #3d2610; --bad: #ffffff; --bad-bg: #3a3456; }
:root[data-theme="dark"][data-cv="mono"], :root[data-theme="hc-dark"][data-cv="mono"] { --ok: #ddd; --ok-bg: #2a2a2a; --warn: #fff; --warn-bg: #555; --bad: #fff; --bad-bg: #000; }

/* reading settings */
:root[data-text="125"] { font-size: 125%; }
:root[data-text="150"] { font-size: 150%; }
:root[data-text="200"] { font-size: 200%; }
:root[data-font="atkinson"] { --f-body: "Atkinson Hyperlegible", system-ui, sans-serif; }
:root[data-spacing="relaxed"] { --lh: 1.8; }
:root[data-spacing="loose"] { --lh: 2.1; }
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
:root[data-big="1"] .btn, :root[data-big="1"] .tab, :root[data-big="1"] .nav-links a { min-height: 3.25rem; padding-inline: 1.4rem; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); max-width: 100%; overflow-x: clip; }
body { font-family: var(--f-body); font-size: 1.0625rem; line-height: var(--lh); overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--link, var(--violet-deep)); }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: .5rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* layout */
.wrap { max-width: 1248px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }
.page { position: relative; overflow: hidden; min-height: 100vh; display: flex; flex-direction: column; }
.page > main { flex: 1; position: relative; z-index: 1; }
.deco { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.deco.a { width: 560px; height: 560px; right: -180px; top: -220px; border: 110px solid var(--deco-1); }
.deco.b { width: 300px; height: 300px; left: -160px; top: 560px; background: var(--deco-2); }
.deco.c { width: 320px; height: 320px; right: -130px; top: 1060px; border: 75px solid var(--deco-3); }
.deco.d { width: 90px; height: 90px; left: 43%; top: 1210px; background: var(--deco-4); }
@media (max-width: 760px) { .deco.a { width: 320px; height: 320px; border-width: 60px; right: -160px; top: -140px; } .deco.c, .deco.d { display: none; } .deco.b { width: 180px; height: 180px; left: -110px; top: 520px; } }
.stack { display: flex; flex-direction: column; gap: var(--gap, 1rem); }
.row { display: flex; flex-wrap: wrap; gap: var(--gap, .75rem); align-items: center; }
.grid { display: grid; gap: var(--gap, 1.5rem); grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
@media (max-width: 960px) { .grid { --cols: 2 !important; } }
@media (max-width: 640px) { .grid { --cols: 1 !important; } }

/* nav (matches the Nav component) */
.nav-wrap { position: relative; z-index: 5; padding: 1.5rem clamp(12px, 2.8vw, 40px) 0; }
.nav { display: flex; align-items: center; gap: 1rem 1.25rem; flex-wrap: wrap; background: var(--surface); border-radius: 999px; padding: .75rem .75rem .75rem 1.5rem; box-shadow: 0 8px 30px rgba(84,34,130,.08); max-width: 1360px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: .7rem; font: 600 1.6rem/1 var(--f-head); color: var(--ink); text-decoration: none; }
/* RowbyRow logo. --logo-ball is the yarn, "by" and the stitch line; --logo-line is the wraps and the letters */
:root { --logo-ball: #c378ff; --logo-accent: var(--logo-ball); --logo-line: #1e1838; }
:root[data-accent="peri"]:not([data-theme^="hc"]) { --logo-ball: #8fb0ff; --logo-accent: #5f86f0; --logo-line: #17213d; }
:root[data-accent="mint"]:not([data-theme^="hc"]) { --logo-ball: #7fdbb4; --logo-accent: #2fae7f; --logo-line: #14302a; }
:root[data-accent="peach"]:not([data-theme^="hc"]) { --logo-ball: #ffb08f; --logo-accent: #f07a4a; --logo-line: #3a1d12; }
:root[data-theme="dark"] { --logo-line: #ffffff; --logo-accent: var(--logo-ball); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --logo-line: #ffffff; --logo-accent: var(--logo-ball); } }
:root[data-theme^="hc"] { --logo-ball: var(--violet); --logo-line: var(--ink); }
.logo { gap: .55rem; }
.logo .mark { width: 2.75rem; height: auto; aspect-ratio: 106 / 88; flex: none; overflow: visible; }
.logo .mark .ball { fill: var(--logo-ball); }
.logo .mark .wraps path { fill: var(--logo-line); }
.logo .mark .loop { fill: none; stroke: var(--logo-line); stroke-width: 5; stroke-linecap: round; }
.logo .wm { color: var(--logo-line); position: relative; padding-bottom: .32em; line-height: 1; }
.logo .wm em { color: var(--logo-accent); font-style: italic; }
/* stitch line: whole stitches only, last one sits under the final "w" (the trailing gap hangs past the word) */
.logo .wm::after { content: ""; position: absolute; left: 0; right: -.2em; bottom: 0; height: .11em; min-height: 2px;
  background: linear-gradient(90deg, var(--logo-accent) 0 67.7%, transparent 67.7%) 0 0 / .62em 100%; background-repeat: round no-repeat; }
.footer .logo { --logo-line: #ffffff; --logo-accent: var(--logo-ball); }
.nav-links { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1 1 auto; justify-content: center; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 500; padding: .55rem .9rem; border-radius: 999px; min-height: 2.75rem; display: inline-flex; align-items: center; }
.nav-links a:hover { background: var(--surface-2); }
.nav-links a[aria-current="page"] { background: var(--lav); color: var(--violet-deep); }
:root[data-theme="dark"] .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: .75rem; position: relative; }
.avatar { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--ink); color: var(--bg); border: 0; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.menu { position: absolute; right: 0; top: calc(100% + .6rem); width: 16rem; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: .5rem; box-shadow: 0 14px 36px rgba(30,24,56,.18); z-index: 20; }
.menu a { display: block; padding: .7rem .9rem; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.menu a:hover, .menu a[aria-current="page"] { background: var(--surface-2); }
.menu .who { padding: .7rem .9rem; border-bottom: 1px solid var(--line-2); margin-bottom: .25rem; font-weight: 600; }
.nav .nav-toggle { display: none; }
@media (max-width: 1180px) {
  .nav { border-radius: 24px; }
  .nav .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav-links { display: none; order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; }
  .nav.open .nav-links { display: flex; }
  .nav-actions .btn.primary { display: none; }
}

/* type */
.eyebrow { font: 500 .8125rem/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--violet-deep); margin: 0; }
.eyebrow.chip { display: inline-flex; align-self: flex-start; background: var(--mint); color: var(--green); border-radius: 999px; padding: .4rem .9rem; }
:root[data-theme="dark"] .eyebrow { color: var(--violet); }
h1, .h1 { font: 600 clamp(2.25rem, 5vw, 3.5rem)/1.1 var(--f-head); margin: 0; text-wrap: balance; }
h2, .h2 { font: 600 clamp(1.5rem, 3vw, 2rem)/1.2 var(--f-head); margin: 0; text-wrap: balance; }
h3, .h3 { font: 600 1.1875rem/1.35 var(--f-body); margin: 0; }
.lead { font-size: 1.25rem; color: var(--muted); max-width: 56rem; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .9375rem; }
.tiny { font-size: .8125rem; }
p { margin: 0; }
.mono { font-family: var(--f-mono); }

/* components */
.card { background: var(--surface); border: 1px solid var(--line-2); border-radius: 32px; padding: clamp(1.25rem, 2.5vw, 2rem); display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.card.soft { background: var(--surface-2); border-color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .7rem 1.4rem; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--violet); }
.btn.primary { background: var(--violet); border-color: var(--violet); color: var(--violet-ink); box-shadow: 0 8px 20px color-mix(in srgb, var(--violet) 28%, transparent); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.secondary { border-color: color-mix(in srgb, var(--violet) 40%, transparent); color: var(--violet-deep); background: var(--surface); }
:root[data-theme="dark"] .btn.secondary, :root[data-theme="hc-dark"] .btn.secondary { color: var(--violet); }
:root[data-theme="dark"] .btn.secondary { color: var(--violet); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 2.5rem; padding: .4rem 1rem; font-size: .9375rem; }
.btn[disabled] { opacity: .5; cursor: default; }
.tabs { display: flex; gap: .5rem; flex-wrap: wrap; }
.tab { border: 2px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .55rem 1.1rem; min-height: 2.75rem; font-weight: 600; cursor: pointer; }
.tab[aria-selected="true"], .tab[aria-pressed="true"], .tab[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.label { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .2rem .75rem; font-size: .875rem; font-weight: 600; background: var(--lav); color: var(--violet-deep); white-space: nowrap; }
:root[data-theme="dark"] .label { color: var(--ink); }
.label.mint { background: var(--mint); color: var(--green); }
.label.peri { background: var(--peri); color: var(--blue); }
.badge { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .25rem .8rem; font-weight: 600; font-size: .875rem; border: var(--status-border, 0) solid currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.ok::before { content: "✓"; }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.warn::before { content: "!"; }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.bad::before { content: "×"; }
label.field { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .9375rem; min-width: 0; }
input[type=text], input[type=number], input[type=search], input[type=email], input[type=password], select, textarea {
  background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: .65rem .85rem; min-height: 2.9rem; width: 100%; font-weight: 400; }
textarea { line-height: 1.7; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 25%, transparent); }
.table-wrap { overflow-x: auto; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 1rem; }
table.tbl th { text-align: left; font: 500 .75rem/1.3 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: .65rem .75rem; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.tbl td { padding: .7rem .75rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.tbl tr.hi td { background: var(--surface-2); }
.placeholder-img { border-radius: 16px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .875rem; aspect-ratio: 5 / 3; }
.notice { background: var(--surface-2); border-radius: 16px; padding: 1rem 1.25rem; }

/* footer (matches the Footer component) */
.footer { background: var(--footer); color: var(--footer-ink); border-radius: 56px 56px 0 0; margin-top: 5rem; position: relative; z-index: 1; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; padding-block: 2.5rem; }
.footer .logo { color: var(--footer-ink); }
.footer a { color: var(--footer-ink); }
.footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .9375rem; }

/* stitch key pop-up */
.sk-fab { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 40; display: inline-flex; align-items: center; gap: .55rem; background: var(--ink); color: var(--bg); border: 0; border-radius: 999px; padding: .85rem 1.3rem; font-weight: 600; cursor: pointer; box-shadow: 0 8px 24px rgba(30,24,56,.25); min-height: 3.25rem; }
.sk-pop { position: fixed; right: 1.5rem; bottom: 5.5rem; z-index: 40; width: min(24rem, calc(100vw - 2rem)); max-height: 70vh; overflow: auto; background: var(--surface); border: 2px solid var(--violet); border-radius: 20px; box-shadow: 0 16px 40px rgba(30,24,56,.22); padding: 1.25rem; display: flex; flex-direction: column; gap: .9rem; }
.sk-pop dl { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: .35rem .75rem; margin: 0; }
.sk-pop dt { font-weight: 700; font-size: 1.125rem; }
.sk-pop dd { margin: 0; }
.icon-btn { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); flex: none; }
.seg { display: flex; gap: .4rem; }
.seg button { flex: 1; min-height: 2.75rem; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* typefaces kept on the site itself (all SIL Open Font License) */
@font-face { font-family: "OpenDyslexic"; src: url(fonts/opendyslexic-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "OpenDyslexic"; src: url(fonts/opendyslexic-latin-700-normal.woff2) format("woff2"); font-weight: 500 800; font-display: swap; }
@font-face { font-family: "Lexend"; src: url(fonts/lexend-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lexend"; src: url(fonts/lexend-latin-600-normal.woff2) format("woff2"); font-weight: 500 800; font-display: swap; }
@font-face { font-family: "Literata"; src: url(fonts/literata-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Literata"; src: url(fonts/literata-latin-600-normal.woff2) format("woff2"); font-weight: 500 800; font-display: swap; }
:root[data-font="lexend"] { --f-body: "Lexend", system-ui, sans-serif; }
:root[data-font="dyslexic"] { --f-body: "OpenDyslexic", "Comic Sans MS", sans-serif; --f-head: "OpenDyslexic", sans-serif; --f-mono: "OpenDyslexic", ui-monospace, monospace; }
:root[data-font="serif"] { --f-body: "Literata", Georgia, serif; }

/* color theme: each choice recolors the whole site (background, cards, lines, text tint, footer, circles and buttons).
   High-contrast themes keep their own colors. */
:root[data-accent="peri"]:not([data-theme^="hc"]) { --bg: #f1f5ff; --surface-2: #eaf0ff; --ink: #17213d; --muted: #56607c; --line: #d4defa; --line-2: #e6edff; --violet: #3557c9; --violet-deep: #22409e; --lav: #dce8ff; --footer: #22357a; --deco-1: #8fb0ff; --deco-2: #5ad2a0; --deco-3: #b9a4ff; --deco-4: #9fd0ff; --shadow: 0 10px 30px rgba(34, 53, 122, .08); }
:root[data-accent="mint"]:not([data-theme^="hc"]) { --bg: #effaf5; --surface-2: #e3f6ed; --ink: #14302a; --muted: #4f6b62; --line: #c9ecdc; --line-2: #dff3ea; --violet: #1d7a58; --violet-deep: #145c42; --lav: #d2f5e6; --footer: #145c42; --deco-1: #7fdbb4; --deco-2: #c9b3ff; --deco-3: #8fc4ff; --deco-4: #a6ecd0; --shadow: 0 10px 30px rgba(20, 92, 66, .08); }
:root[data-accent="peach"]:not([data-theme^="hc"]) { --bg: #fff5ef; --surface-2: #ffeee4; --ink: #3a1d12; --muted: #7a5c50; --line: #f6d9c9; --line-2: #fbe7dc; --violet: #c0502a; --violet-deep: #96391a; --lav: #ffe3d4; --footer: #7d2f17; --deco-1: #ffb08f; --deco-2: #5ad2a0; --deco-3: #ffcf8f; --deco-4: #f7a3b8; --shadow: 0 10px 30px rgba(125, 47, 23, .08); }
:root[data-theme="dark"][data-accent="peri"] { --bg: #0f1526; --surface: #18203a; --surface-2: #222d4a; --ink: #e8eeff; --muted: #aeb8d6; --line: #33405f; --line-2: #273250; --violet: #9db6ff; --violet-deep: #c4d4ff; --lav: #1d2b4d; --footer: #111c3d; --deco-1: #1a2544; --deco-2: #15302a; --deco-3: #2a2350; --deco-4: #1d3350; --shadow: none; }
:root[data-theme="dark"][data-accent="mint"] { --bg: #0d1a16; --surface: #15261f; --surface-2: #1d3a32; --ink: #e3f7ee; --muted: #a8cbbd; --line: #2c5446; --line-2: #22433a; --violet: #7fdbb4; --violet-deep: #b6efd5; --lav: #183f31; --footer: #0f2f25; --deco-1: #15302a; --deco-2: #241e44; --deco-3: #1d2b4d; --deco-4: #1b3a30; --shadow: none; }
:root[data-theme="dark"][data-accent="peach"] { --bg: #1c120e; --surface: #2a1c16; --surface-2: #3b2a24; --ink: #fbeee8; --muted: #d6b9ad; --line: #5a3a2e; --line-2: #46302a; --violet: #ffad8a; --violet-deep: #ffd0bb; --lav: #46271c; --footer: #3a1a10; --deco-1: #3a2219; --deco-2: #15302a; --deco-3: #3d2c14; --deco-4: #40202a; --shadow: none; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"][data-accent="peri"] { --bg: #0f1526; --surface: #18203a; --surface-2: #222d4a; --ink: #e8eeff; --muted: #aeb8d6; --line: #33405f; --line-2: #273250; --violet: #9db6ff; --violet-deep: #c4d4ff; --lav: #1d2b4d; --footer: #111c3d; --deco-1: #1a2544; --deco-2: #15302a; --deco-3: #2a2350; --deco-4: #1d3350; --shadow: none; }
  :root[data-theme="auto"][data-accent="mint"] { --bg: #0d1a16; --surface: #15261f; --surface-2: #1d3a32; --ink: #e3f7ee; --muted: #a8cbbd; --line: #2c5446; --line-2: #22433a; --violet: #7fdbb4; --violet-deep: #b6efd5; --lav: #183f31; --footer: #0f2f25; --deco-1: #15302a; --deco-2: #241e44; --deco-3: #1d2b4d; --deco-4: #1b3a30; --shadow: none; }
  :root[data-theme="auto"][data-accent="peach"] { --bg: #1c120e; --surface: #2a1c16; --surface-2: #3b2a24; --ink: #fbeee8; --muted: #d6b9ad; --line: #5a3a2e; --line-2: #46302a; --violet: #ffad8a; --violet-deep: #ffd0bb; --lav: #46271c; --footer: #3a1a10; --deco-1: #3a2219; --deco-2: #15302a; --deco-3: #3d2c14; --deco-4: #40202a; --shadow: none; }
}

/* Site color: keep the secondary tints (chips, blobs, feature cards) in the chosen color family too */
:root[data-accent="peri"]:not([data-theme^="hc"]) { --deco-2: #b9ccff; --deco-3: #6f94f5; --deco-4: #d4e0ff; --mint: #e3ecff; --green: #22409e; --peri: #d4e0ff; --blue: #22409e; }
:root[data-accent="mint"]:not([data-theme^="hc"]) { --deco-2: #a6ecd0; --deco-3: #5cc9a0; --deco-4: #c4f2df; --peri: #d6f3ea; --blue: #1d6b55; }
:root[data-accent="peach"]:not([data-theme^="hc"]) { --deco-2: #ffd2bd; --deco-3: #f79a76; --deco-4: #ffe1d2; --mint: #ffe8dc; --green: #96391a; --peri: #ffe0d1; --blue: #96391a; }
:root[data-theme="dark"][data-accent="peri"] { --deco-2: #1d2b4d; --deco-3: #22305a; --deco-4: #1a2544; --mint: var(--lav); --peri: var(--surface-2); --green: var(--violet-deep); --blue: var(--violet-deep); }
:root[data-theme="dark"][data-accent="mint"] { --deco-2: #1b3a30; --deco-3: #15302a; --deco-4: #123026; --mint: var(--lav); --peri: var(--surface-2); --green: var(--violet-deep); --blue: var(--violet-deep); }
:root[data-theme="dark"][data-accent="peach"] { --deco-2: #40261c; --deco-3: #3a2219; --deco-4: #33201a; --mint: var(--lav); --peri: var(--surface-2); --green: var(--violet-deep); --blue: var(--violet-deep); }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"][data-accent="peri"] { --deco-2: #1d2b4d; --deco-3: #22305a; --deco-4: #1a2544; --mint: var(--lav); --peri: var(--surface-2); --green: var(--violet-deep); --blue: var(--violet-deep); }
  :root[data-theme="auto"][data-accent="mint"] { --deco-2: #1b3a30; --deco-3: #15302a; --deco-4: #123026; --mint: var(--lav); --peri: var(--surface-2); --green: var(--violet-deep); --blue: var(--violet-deep); }
  :root[data-theme="auto"][data-accent="peach"] { --deco-2: #40261c; --deco-3: #3a2219; --deco-4: #33201a; --mint: var(--lav); --peri: var(--surface-2); --green: var(--violet-deep); --blue: var(--violet-deep); }
}


/* low vision: darker secondary text and thick outlines */
:root[data-cv="low"] { --muted: var(--ink); --line: var(--ink); --line-2: var(--muted); --status-border: 2px; }
:root[data-cv="low"] .card, :root[data-cv="low"] .btn, :root[data-cv="low"] .tab, :root[data-cv="low"] input, :root[data-cv="low"] select, :root[data-cv="low"] textarea { border-width: 2px !important; border-color: var(--ink) !important; }

/* big text: wrap things the way a narrower screen would, so 150% and 200% stay tidy */
:root[data-text="150"] .grid, :root[data-text="200"] .grid { --cols: 2 !important; }
:root[data-text="200"] .grid { --cols: 1 !important; }
:root[data-text="150"] .nav, :root[data-text="200"] .nav { border-radius: 24px; }
:root[data-text="150"] .nav .nav-toggle, :root[data-text="200"] .nav .nav-toggle { display: inline-flex; margin-left: auto; }
:root[data-text="150"] .nav-links, :root[data-text="200"] .nav-links { display: none; order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; }
:root[data-text="150"] .nav.open .nav-links, :root[data-text="200"] .nav.open .nav-links { display: flex; }
:root[data-text="150"] .nav-actions .btn.primary, :root[data-text="200"] .nav-actions .btn.primary { display: none; }
:root[data-text="200"] .logo { font-size: 1.3rem; }
:root[data-text="200"] h1, :root[data-text="200"] .h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
:root[data-text="200"] .wrap { max-width: 100%; }
:root[data-text="200"] .sk-fab span { display: none; }

/* single column layout */
:root[data-layout="single"] .grid { --cols: 1 !important; }

/* ---------- prototype pieces shared across pages ---------- */
.btn.lg { min-height: 3.4rem; padding: .85rem 1.6rem; font-size: 1.0625rem; }
.display { font: 600 clamp(2.6rem, 5.4vw, 4.75rem)/1.06 var(--f-head); letter-spacing: -.01em; }
.display em { font-style: normal; color: var(--violet); }
.h2-lg { font: 600 clamp(1.75rem, 3vw, 2.5rem)/1.12 var(--f-head); }
.h3-serif { font: 600 clamp(1.4rem, 2vw, 1.75rem)/1.2 var(--f-head); margin: 0; }
.body-lg { font-size: 1.1875rem; }
.page-head { padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.page-head .lead { max-width: 52rem; }

/* home hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem 3rem; align-items: center; padding-top: clamp(2rem, 5vw, 5.5rem); }
.hero-copy { display: flex; flex-direction: column; gap: 1.5rem; }
.hero-copy .lead { font-size: 1.25rem; max-width: 36rem; }
.hero-art { position: relative; justify-self: center; width: min(100%, 470px); padding-bottom: 2.5rem; }
.photo-card { margin: 0; background: var(--surface); border-radius: 36px; padding: 22px 22px 26px; transform: rotate(4deg); box-shadow: 0 20px 50px rgba(84,34,130,.16); }
.photo-card img { display: block; width: 100%; height: auto; border-radius: 24px; background: var(--lav); aspect-ratio: 426 / 420; object-fit: cover; }
.photo-card figcaption { display: flex; flex-direction: column; padding: 1rem .25rem 0; }
.photo-card figcaption strong { font: 600 1.375rem/1.25 var(--f-head); }
.photo-card figcaption span { color: var(--muted); font-weight: 500; font-size: .9375rem; }
.verified-pill { position: absolute; left: -2.5rem; bottom: .5rem; transform: rotate(-4deg); background: var(--mint); color: var(--green); border: 1.5px solid var(--check); border-radius: 999px; padding: .45rem 1rem; font: 500 .8125rem/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 8px 20px rgba(30,110,80,.15); }
.round-card { position: absolute; right: -3.5rem; bottom: -1rem; width: 250px; transform: rotate(-6deg); background: var(--violet); color: var(--violet-ink); border-radius: 24px; padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: .35rem; font-family: var(--f-mono); font-weight: 500; box-shadow: 0 12px 30px color-mix(in srgb, var(--violet) 35%, transparent); }
.round-card .k { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.round-card .v { font-size: 1.125rem; }
.round-card .c { font-size: .875rem; opacity: .9; }
@media (max-width: 1100px) { .round-card { right: -1rem; } .verified-pill { left: 0; } }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); } .hero-art { margin-top: 1rem; } }
:root[data-text="150"] .hero, :root[data-text="200"] .hero { grid-template-columns: minmax(0, 1fr); }

/* checked-rounds band */
.verify-band { background: var(--surface); border-radius: 40px; padding: clamp(1rem, 2vw, 1.25rem); display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 2rem 3rem; align-items: center; box-shadow: 0 10px 40px rgba(84,34,130,.07); }
.verify-band > .stack { padding: 1rem clamp(.5rem, 2vw, 2rem) 1rem 0; }
.round-list { list-style: none; margin: 0; padding: 1.25rem; background: var(--lav); border-radius: 28px; display: flex; flex-direction: column; gap: .75rem; }
.round-list li { background: var(--surface); border-radius: 16px; padding: .85rem 1rem; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "k n t" "v n t"; gap: .15rem 1.25rem; align-items: center; font-family: var(--f-mono); font-weight: 500; }
.round-list li.now { box-shadow: 0 8px 24px rgba(84,34,130,.12); }
.round-list .k { grid-area: k; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.round-list .v { grid-area: v; font-size: 1.0625rem; }
.round-list .n { grid-area: n; font-size: .8125rem; color: var(--muted); }
.round-list .tick { grid-area: t; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--check); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 600 .9rem/1 var(--f-body); }
.round-list .now .tick { background: var(--violet); }
@media (max-width: 900px) { .verify-band { grid-template-columns: minmax(0, 1fr); } .verify-band > .stack { padding: .5rem 1rem 1rem; } }
:root[data-text="150"] .verify-band, :root[data-text="200"] .verify-band { grid-template-columns: minmax(0, 1fr); }

/* feature cards */
.feature { border-radius: 32px; padding: 1.75rem 1.75rem 2rem; display: flex; flex-direction: column; gap: 1rem; color: var(--ink); text-decoration: none; min-height: 100%; transition: transform .15s ease; }
.feature:hover { transform: translateY(-3px); }
.feature p { color: var(--muted); font-size: 1.0625rem; }
.feature .dot { width: 3.25rem; height: 3.25rem; border-radius: 50%; }
.feature.lav { background: var(--lav); } .feature.lav .dot { background: var(--deco-1); }
.feature.peri { background: var(--peri); } .feature.peri .dot { background: var(--deco-3); }
.feature.mint { background: var(--mint); } .feature.mint .dot { background: var(--deco-2); }

/* generate */
.h1-lg { font: 600 clamp(2.25rem, 4.4vw, 3.5rem)/1.1 var(--f-head); }
.h2-card { font: 600 clamp(1.5rem, 2.2vw, 1.875rem)/1.2 var(--f-head); margin: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .875rem; font-weight: 600; }
.steps li:not(.arrow) { display: inline-flex; gap: .35rem; align-items: center; border-radius: 999px; padding: .2rem .7rem; background: var(--surface); color: var(--ink); }
.steps li.done { background: var(--lav); color: var(--violet-deep); }
.steps li.cur { background: var(--violet); color: #fff; }
.steps .arrow { color: var(--muted); }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; text-align: left; background: var(--surface); border: 2px solid var(--line-2); border-radius: 22px; padding: 1.4rem 1.4rem 1.5rem; cursor: pointer; color: var(--ink); }
.choice svg { width: 1.6rem; height: 1.6rem; fill: none; stroke: var(--violet); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .4rem; }
.choice strong { font-size: 1.125rem; font-weight: 600; }
.choice span { color: var(--muted); font-size: .9375rem; }
.choice[aria-checked="true"] { border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 14%, transparent); }
.gen-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .gen-grid { grid-template-columns: minmax(0, 1fr); } }
:root[data-text="150"] .gen-grid, :root[data-text="200"] .gen-grid, :root[data-layout="single"] .gen-grid { grid-template-columns: minmax(0, 1fr); }
.drop { display: flex; align-items: center; justify-content: center; min-height: 15rem; border: 2px dashed var(--deco-4); border-radius: 18px; background: var(--surface-2); cursor: pointer; overflow: hidden; position: relative; }
.drop.over { border-color: var(--violet); background: var(--lav); }
.drop img { width: 100%; max-height: 22rem; object-fit: contain; background: #111; }
.drop-txt { display: flex; flex-direction: column; gap: .35rem; align-items: center; text-align: center; padding: 1.5rem; }
.drop:focus-within { outline: 3px solid var(--violet); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.flabel { font-weight: 600; font-size: .9375rem; }
.gauge { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.gauge input { width: 5rem; }
.check { display: flex; gap: .65rem; align-items: center; font-size: .9375rem; color: var(--muted); }
.check input { width: 1.3rem; height: 1.3rem; accent-color: var(--violet); flex: none; }
.build-bar { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 1rem 1rem 1rem 1.5rem; border-radius: 24px; }
.arrow-link { font-weight: 600; color: var(--violet); text-decoration: none; }
.mini-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; padding: .75rem .75rem 1rem; display: flex; flex-direction: column; gap: .6rem; color: var(--ink); text-decoration: none; align-items: flex-start; }
.mini-card .ph { width: 100%; aspect-ratio: 2 / 1; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #625c7c; font-size: .875rem; }
.mini-card strong { font-weight: 600; }
.mini-card:hover { border-color: var(--violet); }
body:not([data-page="home"]) .deco.a { border: 0; background: var(--lav); opacity: .75; width: 520px; height: 520px; top: -260px; right: -120px; }
body:not([data-page="home"]) .deco.b { background: var(--mint); opacity: .8; width: 260px; height: 260px; left: -150px; top: 340px; }
body:not([data-page="home"]) .deco.c, body:not([data-page="home"]) .deco.d { display: none; }
.gauge { white-space: nowrap; } .gauge input { width: 4.25rem; padding-inline: .6rem; }

/* settings */
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 1.5rem 2rem; align-items: start; }
.preview-col { position: sticky; top: 1rem; }
@media (max-width: 960px) { .settings-layout { grid-template-columns: minmax(0, 1fr); } .preview-col { position: static; order: -1; } }
:root[data-text="150"] .settings-layout, :root[data-text="200"] .settings-layout, :root[data-layout="single"] .settings-layout { grid-template-columns: minmax(0, 1fr); }
:root[data-text="150"] .preview-col, :root[data-text="200"] .preview-col, :root[data-layout="single"] .preview-col { position: static; order: -1; }
fieldset.card { margin: 0; } fieldset.card > legend { float: left; width: 100%; padding: 0; margin-bottom: .25rem; } fieldset.card > legend + * { clear: both; }
.set-card { gap: 1.1rem; }
.set-group { display: flex; flex-direction: column; gap: .55rem; }
.set-group h3 { font-size: 1rem; font-weight: 600; }
.set-card .tab[aria-checked="true"] { background: var(--lav); border-color: var(--violet); color: var(--ink); }
.set-card .tab { border-color: var(--line); font-weight: 600; }
.opt { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: .8rem 1rem; cursor: pointer; color: var(--ink); min-width: 0; }
.opt strong { font-size: 1.0625rem; font-weight: 600; }
.opt span { font-size: .875rem; color: var(--muted); }
.opt[aria-checked="true"] { background: var(--surface-2); border-color: var(--violet); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 14%, transparent); }
.sw { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; font-style: normal; }
.sw .badge { font-size: .75rem; padding: .15rem .55rem; }
.sw[data-cv="default"] { --ok: #1e6e50; --ok-bg: #d2f5e6; --warn: #7a4a00; --warn-bg: #fff3d6; --bad: #9e2119; --bad-bg: #fbe0de; --status-border: 0; }
.sw[data-cv="rg"] { --ok: #0b3f8f; --ok-bg: #dce8ff; --warn: #7a3e00; --warn-bg: #ffe1c2; --bad: #ffffff; --bad-bg: #1e1838; --status-border: 0; }
.sw[data-cv="by"] { --ok: #1e6e50; --ok-bg: #d2f5e6; --warn: #7a1e5c; --warn-bg: #f8ddee; --bad: #9e2119; --bad-bg: #fbe0de; --status-border: 0; }
.sw[data-cv="mono"] { --ok: #222; --ok-bg: #fff; --warn: #000; --warn-bg: #c9c9c9; --bad: #fff; --bad-bg: #111; --status-border: 2px; }
.sw[data-cv="low"] { --ok: #0f4a33; --ok-bg: #fff; --warn: #5c3300; --warn-bg: #fff; --bad: #7a0f09; --bad-bg: #fff; --status-border: 2px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: .35rem; background: none; border: 0; cursor: pointer; font-size: .875rem; color: var(--muted); padding: 0; }
.swatch i { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--c); border: 3px solid transparent; box-shadow: 0 0 0 2px var(--surface); }
.swatch[aria-checked="true"] i { border-color: var(--violet); }
.swatch[aria-checked="true"] { color: var(--ink); font-weight: 600; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--line-2); cursor: default; }
.set-row > div { display: flex; flex-direction: column; } .set-row strong { font-weight: 600; } .set-row span { font-size: .9rem; color: var(--muted); }
label.set-row { cursor: pointer; }
.link-btn { background: none; border: 0; color: var(--violet); font-weight: 600; cursor: pointer; padding: .4rem; }
.switch { appearance: none; -webkit-appearance: none; width: 3rem; height: 1.7rem; border-radius: 999px; background: var(--surface); border: 2px solid var(--muted); position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--muted); transition: transform .15s; }
.switch:checked { background: var(--violet); border-color: var(--violet); }
.switch:checked::after { background: #fff; transform: translateX(1.3rem); }
.preview-card { border-top: 10px solid var(--lav); }
.preview-card p { margin: 0; }
.label.bad { background: var(--bad-bg); color: var(--bad); } .label.warn { background: var(--warn-bg); color: var(--warn); }

/* library and filters */
.filter-card { padding: 1rem 1.25rem 1.25rem; gap: .9rem; border-radius: 24px; }
.search-pill { display: flex; align-items: center; gap: .6rem; background: var(--surface-2); border-radius: 999px; padding: 0 1rem; }
.search-pill svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.search-pill input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding-inline: 0; }
.filter-card .tab { padding: .35rem .95rem; min-height: 2.4rem; font-size: .9375rem; }
.filter-card .tab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pill-select { width: auto !important; min-height: 2.4rem !important; border-radius: 999px !important; padding: .3rem 2rem .3rem .95rem !important; font-size: .9375rem; font-weight: 600 !important; }
.sep { color: var(--muted); }
.lib-card { padding: .85rem .85rem 1.1rem; gap: .7rem; border-radius: 24px; }
.lib-card .ph { aspect-ratio: 3 / 2; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #625c7c; font-size: .875rem; }
.lib-card > :not(.ph) { margin-inline: .35rem; }

/* convert */
em.accent { font-style: normal; color: var(--violet); }
.jump .tab { text-decoration: none; padding: .4rem 1rem; min-height: 2.4rem; font-size: .9375rem; }
.jump .tab[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.cv-out { display: block; min-height: 14rem; white-space: pre-wrap; background: var(--lav); border: 2px solid var(--deco-4); border-radius: 12px; padding: .75rem .9rem; line-height: 1.7; font-weight: 400; }
#terms .tabs .tab { padding: .35rem 1rem; min-height: 2.4rem; }
.tbl.two td:nth-child(3), .tbl.two th:nth-child(3) { border-left: 2px solid var(--line-2); padding-left: 1.25rem; }
.swatch-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .swatch-grid { grid-template-columns: minmax(0, 1fr); } }
.swatch-fig { margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.swatch-fig canvas { width: 100%; height: auto; border-radius: 18px; background: var(--surface-2); }
.card.tint { border: 0; } .card.tint.lav { background: var(--lav); } .card.tint.mint { background: var(--mint); }
.card.tint input { background: var(--surface); }
.unit-row { display: flex; align-items: center; gap: .5rem; font-weight: 400; } .unit-row input { width: 6rem; }

/* learn */
.search-pill.solo { max-width: 34rem; background: var(--surface); border: 2px solid var(--line); }
.key-grid { flex: 999 1 30rem; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .6rem; align-content: start; }
.key { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; text-align: left; border-radius: 12px; padding: .65rem .85rem; cursor: pointer; min-height: 3.75rem; border: 2px solid var(--line); background: var(--surface); color: var(--ink); }
.key strong { font-size: 1.125rem; font-weight: 600; } .key span { font-size: .8125rem; color: var(--muted); }
.key[aria-pressed="true"] { border-color: var(--violet); background: var(--surface-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 14%, transparent); }
.key-detail { flex: 1 1 18rem; display: flex; flex-direction: column; gap: .7rem; background: var(--lav); border-radius: 20px; padding: 1.4rem; }
.key-detail > p:nth-child(2) { font: 600 3.25rem/1 var(--f-head); }
.key-detail h3 { font-size: 1.125rem; }
#tCrochet, #tKnit { padding: .35rem 1rem; min-height: 2.4rem; }
.guide-grid details { padding: 1rem 1.1rem; gap: .5rem; border-radius: 18px; align-self: start; }
.guide-grid summary { cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; list-style: none; }
.guide-grid summary::-webkit-details-marker { display: none; }
.guide-grid summary strong { font-weight: 600; font-size: 1.0625rem; }
.guide-grid summary::after { content: "Read the guide ↓"; font-size: .8125rem; color: var(--violet); font-weight: 600; }
.guide-grid details[open] summary::after { content: "Close ↑"; }
@media (max-width: 1100px) { .guide-grid { --cols: 2 !important; } }
.bar { height: .55rem; background: var(--line-2); border-radius: 999px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--violet); }
.web-card { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; background: var(--lav); }
.web-card .stack { max-width: 40rem; }
@media (max-width: 640px) {
  .hero-art { padding-bottom: 0; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
  .round-card { position: relative; right: auto; bottom: auto; margin-top: .25rem; transform: rotate(-3deg); }
  .verified-pill { position: relative; left: auto; bottom: auto; transform: rotate(-2deg); z-index: 1; }
  .app-head .head-actions .btn { min-height: 2.6rem; padding: .45rem 1rem; font-size: .9375rem; }
}
.lib-card, .mini-card { position: relative; }
img.ph { display: block; width: 100%; height: auto; object-fit: cover; background: #111; }
.lib-card img.ph { aspect-ratio: 3 / 2; }
.mini-card img.ph { aspect-ratio: 2 / 1; object-fit: cover; }
.ph-note { position: absolute; top: 1.4rem; left: 1.4rem; margin: 0 !important; background: rgba(20,14,36,.7); color: #fff; font: 500 .7rem/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: .35rem .55rem; border-radius: 999px; }
.lib-card img.ph, .mini-card img.ph { object-fit: contain; background: #111111; }
#swCraft .tab[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); } #swCraft .tab { padding: .35rem 1rem; min-height: 2.4rem; }

/* knit check page */
.app-head2 { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; padding-block: 2rem 1.25rem; }
.crumbs { font-size: .9375rem; color: var(--muted); } .crumbs a { color: var(--muted); text-decoration: none; }
.check-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.check-grid > aside { position: sticky; top: 1rem; }
.krow.kshow { border-color: var(--violet); background: var(--lav); }
.krow .ktxt { cursor: zoom-in; }
/* knit 3D live build */
.k3 { background: #141018; color: #f4eefa; border-radius: 22px; padding: 1rem 1rem .9rem; display: flex; flex-direction: column; gap: .7rem; }
.k3-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; font-family: "Roboto Mono", ui-monospace, monospace; font-size: .85rem; }
.k3-head strong { font-family: Fraunces, Georgia, serif; font-size: 1.35rem; font-weight: 600; margin-right: .2rem; }
.k3-head span { color: #cdb9e6; }
.k3-stage { position: relative; height: clamp(320px, 52vh, 520px); border-radius: 14px; overflow: hidden; }
.k3-canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.k3-tags { position: absolute; inset: 0; pointer-events: none; }
.k3-tag { position: absolute; left: 0; top: 0; font: 600 .75rem/1 "Roboto Mono", monospace; color: #141018; background: var(--c); padding: .28rem .45rem; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.k3-ctl { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.k3-ctl input[type=range] { flex: 1 1 8rem; accent-color: #c378ff; }
.k3-pill { font: 600 .8rem/1 "Roboto Mono", monospace; color: #f4eefa; background: transparent; border: 1.5px solid #5c4a70; border-radius: 999px; padding: .5rem .8rem; cursor: pointer; }
.k3-pill:hover, .k3-pill:focus-visible { border-color: #c378ff; }
.k3-pill.on { background: #f4eefa; color: #141018; border-color: #f4eefa; }
.k3-marks { background: #221a2b; border-radius: 14px; padding: .75rem .9rem; display: flex; flex-direction: column; gap: .4rem; font-size: .95rem; }
.k3-marks p { margin: 0; }
.k3-mrow { display: flex; flex-wrap: wrap; gap: .4rem; }
.k3-chip { display: inline-flex; align-items: center; gap: .35rem; font: 600 .8rem/1 "Roboto Mono", monospace; background: #2e2438; border-radius: 999px; padding: .35rem .6rem; }
.k3-chip i { width: .75rem; height: .75rem; border-radius: 50%; border: 3px solid var(--c); }
.k3-next { color: #ffe27a; }
.k3-key { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin: 0; color: #cdb9e6; }
.k3-key span { display: inline-flex; align-items: center; gap: .35rem; }
.k3-key i { width: .8rem; height: .8rem; border-radius: 3px; background: #c39bf0; }
.k3-key .kb { border-radius: 50%; height: .5rem; background: #b58fe0; } .k3-key .kd { background: #9b6fd0; } .k3-key .ki { background: #dcc0ff; } .k3-key .ky { background: transparent; border: 2px solid #c39bf0; border-radius: 50%; }
@media (max-width: 960px) { .check-grid { grid-template-columns: minmax(0, 1fr); } }
:root[data-text="150"] .check-grid, :root[data-text="200"] .check-grid, :root[data-layout="single"] .check-grid { grid-template-columns: minmax(0, 1fr); }
.krows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.krow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem 1rem; padding: .55rem .8rem; border-radius: 12px; border: 2px solid transparent; }
.krow label { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; }
.krow input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--violet); flex: none; }
.krow.done .ktxt { color: var(--muted); }
.krow .kcount { color: var(--violet); font-weight: 600; white-space: nowrap; }
.krow .badge { grid-column: 1 / -1; justify-self: start; margin-left: 1.9rem; white-space: normal; }
.krow.bad { background: var(--bad-bg); } .krow.warn { background: var(--warn-bg); }
.knote { color: var(--muted); font-size: .9375rem; padding: .1rem .8rem .3rem 2.7rem; }

/* accounts */
.menu-btn { display: block; width: 100%; text-align: left; padding: .7rem .9rem; border-radius: 10px; color: var(--ink); background: none; border: 0; font: inherit; font-weight: 500; cursor: pointer; border-top: 1px solid var(--line-2); margin-top: .25rem; }
.menu-btn:hover { background: var(--surface-2); }
.avatar span { font-weight: 700; font-size: 1.05rem; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: .85rem 1.25rem; border-radius: 14px; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: min(32rem, calc(100vw - 2rem)); transition: opacity .4s; }
.toast.gone { opacity: 0; }
.auth-wrap { max-width: 30rem; margin: 0 auto; }
.auth-card { gap: 1.1rem; }
.auth-card .tabs .tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.form-msg { border-radius: 12px; padding: .75rem 1rem; font-size: .9375rem; }
.form-msg.ok { background: var(--ok-bg); color: var(--ok); } .form-msg.bad { background: var(--bad-bg); color: var(--bad); } .form-msg.info { background: var(--surface-2); }
.pw-wrap { position: relative; } .pw-wrap button { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--violet); font-weight: 600; cursor: pointer; padding: .4rem .6rem; }
.hint { font-weight: 400; font-size: .85rem; color: var(--muted); }
.acc-edit { display: flex; flex-direction: column; gap: .75rem; padding: .25rem 0 1rem; } .acc-edit[hidden] { display: none; }
.lib-card img.ph.cover { object-fit: cover; }
.check span { flex: 1; } .check a { color: var(--violet); }

/* pop-up dialog (privacy notes on sign-up) */
.rbr-dialog{border:0;border-radius:18px;padding:0;width:min(560px,calc(100vw - 32px));max-height:min(80vh,640px);background:var(--surface,#fff);color:var(--ink,#1e1838);box-shadow:0 20px 60px rgba(20,10,40,.35)}
.rbr-dialog::backdrop{background:rgba(20,12,40,.45)}
.rbr-dialog[open]{display:flex;flex-direction:column}
.rbr-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.1rem 1.25rem .6rem}
.rbr-dialog-head h2{margin:0}
.rbr-dialog-x{border:0;background:transparent;color:inherit;font-size:1.8rem;line-height:1;width:44px;height:44px;border-radius:50%;cursor:pointer}
.rbr-dialog-x:hover,.rbr-dialog-x:focus-visible{background:var(--lav,#efe6ff)}
.rbr-dialog-body{overflow:auto;padding:0 1.25rem}
.rbr-dialog-body ul{padding-left:1.2rem;margin:0;display:grid;gap:.6rem}
.rbr-dialog-foot{display:flex;justify-content:flex-end;padding:1rem 1.25rem 1.15rem}

/* Color vision modes recolor the whole site (they take over from Site color). Light first, then dark with higher specificity. */
:root[data-cv="rg"]:not([data-theme^="hc"]) { --bg: #f2f6ff; --surface: #ffffff; --surface-2: #e9f0ff; --ink: #14213d; --muted: #4e5b78; --line: #cfdcf7; --line-2: #e3ebfb; --violet: #1f55c0; --violet-deep: #163f94; --lav: #dbe6ff; --footer: #163f94; --deco-1: #8fb0ff; --deco-2: #ffc48a; --deco-3: #6f94f5; --deco-4: #ffe0bf; --mint: #ffe8d1; --green: #8a4300; --peri: #dbe6ff; --blue: #163f94; --check: #1f55c0; --logo-ball: #6f94f5; --logo-accent: #1f55c0; --logo-line: #14213d; }
:root[data-cv="by"]:not([data-theme^="hc"]) { --bg: #fff3f6; --surface: #ffffff; --surface-2: #ffe8ee; --ink: #3a1426; --muted: #7a5565; --line: #f5d0dc; --line-2: #fbe2ea; --violet: #b3245f; --violet-deep: #8a1748; --lav: #ffdbe6; --footer: #7a1440; --deco-1: #ff9fbf; --deco-2: #8fd8d2; --deco-3: #e86a95; --deco-4: #ffc9da; --mint: #d6f2ef; --green: #0f5f58; --peri: #ffdbe6; --blue: #8a1748; --check: #0f7f75; --logo-ball: #ff8fb3; --logo-accent: #b3245f; --logo-line: #3a1426; }
:root[data-cv="mono"]:not([data-theme^="hc"]) { --bg: #f4f4f4; --surface: #ffffff; --surface-2: #ececec; --ink: #111111; --muted: #444444; --line: #bdbdbd; --line-2: #dcdcdc; --violet: #222222; --violet-deep: #000000; --lav: #e2e2e2; --footer: #222222; --deco-1: #d0d0d0; --deco-2: #e0e0e0; --deco-3: #bdbdbd; --deco-4: #e8e8e8; --mint: #e6e6e6; --green: #111111; --peri: #e2e2e2; --blue: #111111; --check: #333333; --hl: #e6e6e6; --hl-line: #000000; --logo-ball: #9a9a9a; --logo-accent: #222222; --logo-line: #111111; }
:root:root[data-theme="dark"][data-cv="rg"] { --bg: #0f1526; --surface: #18203a; --surface-2: #222d4a; --ink: #e8eeff; --muted: #aeb8d6; --line: #33405f; --line-2: #273250; --violet: #9db6ff; --violet-deep: #c4d4ff; --lav: #1d2b4d; --footer: #111c3d; --deco-1: #1a2544; --deco-2: #3d2610; --deco-3: #22305a; --deco-4: #33220f; --mint: #3d2610; --green: #ffb36b; --peri: #222d4a; --blue: #c4d4ff; --check: #9db6ff; --logo-ball: #8fb0ff; --logo-accent: #8fb0ff; --logo-line: #ffffff; --shadow: none; }
:root:root[data-theme="dark"][data-cv="by"] { --bg: #1c0e14; --surface: #2a1720; --surface-2: #3b2230; --ink: #fde9f0; --muted: #d8b3c3; --line: #5c3346; --line-2: #472838; --violet: #ff8fb3; --violet-deep: #ffc2d5; --lav: #4a1f33; --footer: #3d0f22; --deco-1: #3d1a2a; --deco-2: #143330; --deco-3: #4a1f33; --deco-4: #33141f; --mint: #143330; --green: #8fe0d8; --peri: #3b2230; --blue: #ffc2d5; --check: #8fe0d8; --logo-ball: #ff8fb3; --logo-accent: #ff8fb3; --logo-line: #ffffff; --shadow: none; }
:root:root[data-theme="dark"][data-cv="mono"] { --bg: #111111; --surface: #1c1c1c; --surface-2: #262626; --ink: #f2f2f2; --muted: #c4c4c4; --line: #4a4a4a; --line-2: #333333; --violet: #e6e6e6; --violet-deep: #ffffff; --lav: #2e2e2e; --footer: #000000; --deco-1: #262626; --deco-2: #2b2b2b; --deco-3: #333333; --deco-4: #222222; --mint: #2b2b2b; --green: #f2f2f2; --peri: #2b2b2b; --blue: #ffffff; --check: #dddddd; --hl: #333333; --hl-line: #ffffff; --logo-ball: #bdbdbd; --logo-accent: #e6e6e6; --logo-line: #ffffff; --shadow: none; }
@media (prefers-color-scheme: dark) {
  :root:root[data-theme="auto"][data-cv="rg"] { --bg: #0f1526; --surface: #18203a; --surface-2: #222d4a; --ink: #e8eeff; --muted: #aeb8d6; --line: #33405f; --line-2: #273250; --violet: #9db6ff; --violet-deep: #c4d4ff; --lav: #1d2b4d; --footer: #111c3d; --deco-1: #1a2544; --deco-2: #3d2610; --deco-3: #22305a; --deco-4: #33220f; --mint: #3d2610; --green: #ffb36b; --peri: #222d4a; --blue: #c4d4ff; --check: #9db6ff; --logo-ball: #8fb0ff; --logo-accent: #8fb0ff; --logo-line: #ffffff; --shadow: none; }
  :root:root[data-theme="auto"][data-cv="by"] { --bg: #1c0e14; --surface: #2a1720; --surface-2: #3b2230; --ink: #fde9f0; --muted: #d8b3c3; --line: #5c3346; --line-2: #472838; --violet: #ff8fb3; --violet-deep: #ffc2d5; --lav: #4a1f33; --footer: #3d0f22; --deco-1: #3d1a2a; --deco-2: #143330; --deco-3: #4a1f33; --deco-4: #33141f; --mint: #143330; --green: #8fe0d8; --peri: #3b2230; --blue: #ffc2d5; --check: #8fe0d8; --logo-ball: #ff8fb3; --logo-accent: #ff8fb3; --logo-line: #ffffff; --shadow: none; }
  :root:root[data-theme="auto"][data-cv="mono"] { --bg: #111111; --surface: #1c1c1c; --surface-2: #262626; --ink: #f2f2f2; --muted: #c4c4c4; --line: #4a4a4a; --line-2: #333333; --violet: #e6e6e6; --violet-deep: #ffffff; --lav: #2e2e2e; --footer: #000000; --deco-1: #262626; --deco-2: #2b2b2b; --deco-3: #333333; --deco-4: #222222; --mint: #2b2b2b; --green: #f2f2f2; --peri: #2b2b2b; --blue: #ffffff; --check: #dddddd; --hl: #333333; --hl-line: #ffffff; --logo-ball: #bdbdbd; --logo-accent: #e6e6e6; --logo-line: #ffffff; --shadow: none; }
}
:root[data-cv="rg"] .footer .logo, :root[data-cv="by"] .footer .logo, :root[data-cv="mono"] .footer .logo { --logo-line: #ffffff; --logo-accent: var(--logo-ball); }
.cv-takeover { display: none; } :root[data-cv="rg"] .cv-takeover, :root[data-cv="by"] .cv-takeover, :root[data-cv="mono"] .cv-takeover { display: block; }
:root[data-cv="rg"] [data-key="accent"], :root[data-cv="by"] [data-key="accent"], :root[data-cv="mono"] [data-key="accent"] { opacity: .45; }

/* help page */
.help-mail { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.15rem; border-radius: 20px; background: var(--surface-2); border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; }
.help-mail:hover, .help-mail:focus-visible { border-color: var(--violet); }
.help-mail span { color: var(--muted); font-size: .9375rem; }
.help-mail em { font-style: normal; color: var(--violet-deep); font-weight: 600; word-break: break-all; }
.faq details { border-top: 1px solid var(--line); padding: .25rem 0; }
.faq details:first-child { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: .8rem 0; min-height: 2.75rem; list-style-position: inside; }
.faq details p { margin: 0 0 1rem; color: var(--muted); }
@media (max-width: 640px) { .help-contact { --cols: 1 !important; } }

/* legal pages */
.legal > * { max-width: 48rem; }
.legal h2 { font-family: var(--f-head); font-size: 1.375rem; margin: 2rem 0 .5rem; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 1.0625rem; margin: 1.25rem 0 .35rem; }
.legal p, .legal li { color: var(--ink); line-height: var(--lh); }
.legal ul { padding-left: 1.25rem; display: grid; gap: .45rem; margin: .5rem 0 1rem; }
.rbr-dialog-body h2 { font-family: var(--f-head); font-size: 1.125rem; margin: 1.25rem 0 .35rem; }
.rbr-dialog-body h2:first-child { margin-top: 0; }
.rbr-dialog-body h3 { font-size: 1rem; margin: 1rem 0 .3rem; }
.rbr-dialog-body ul { padding-left: 1.2rem; margin: .4rem 0 .8rem; display: grid; gap: .4rem; }

/* admin review queue */
.review-list { display: grid; gap: 1rem; }
.review-item { display: grid; grid-template-columns: 160px 1fr; gap: 1rem; padding: 1rem; border: 1.5px solid var(--line); border-radius: 20px; background: var(--surface); }
.review-item img, .review-ph { width: 160px; height: 160px; border-radius: 14px; object-fit: cover; background: #15101f; }
@media (max-width: 640px) { .review-item { grid-template-columns: 1fr; } .review-item img, .review-ph { width: 100%; height: auto; aspect-ratio: 1; } }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
