/* FitMyKB site styles (served as a cached file; fonts are inlined in the page). */
/* Theme: sewing-pattern paper (light only). */
:root {
	--paper: #f4efe4; --paper-2: #ebe3d2; --card: #fffcf5; --ink: #1d1a16; --muted: #5a5247; --faint: #6f6759;
	--edge: #1d1a16; --stitch: rgba(29, 26, 22, .38); --grid: rgba(29, 26, 22, .055);
	--tape: #f0b429; --tape-ink: #1d1a16; --thread: #c8412b; --hard: #1d1a16;
	--ok: #2f7d4f; --error: #c8412b; --error-soft: rgba(200, 65, 43, .09);
	--texture: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
	--texture-size: 24px 24px;
	color-scheme: light only;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0; min-height: 100vh; color: var(--ink); background-color: var(--paper);
	background-image: var(--texture); background-size: var(--texture-size);
	font: 16px/1.55 "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
}
a { color: var(--thread); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--thread); outline-offset: 3px; }
.serif { font-family: Fraunces, Georgia, serif; font-variation-settings: "SOFT" 100, "WONK" 1; }
.mono, .tapeline span { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* Measuring tape along the top (and bottom) of the page */
.tapeline {
	height: 30px; overflow: hidden; white-space: nowrap; border-bottom: 2px solid var(--tape-ink); color: var(--tape-ink);
	background:
		repeating-linear-gradient(90deg, var(--tape-ink) 0 1.5px, transparent 1.5px 50px) 0 0 / 100% 14px no-repeat,
		repeating-linear-gradient(90deg, var(--tape-ink) 0 1px, transparent 1px 10px) 0 0 / 100% 7px no-repeat,
		var(--tape);
}
.tapeline span { display: inline-block; width: 100px; padding: 13px 0 0 3px; font-size: 10.5px; font-weight: 600; }
footer .tapeline { border-top: 2px solid var(--tape-ink); }

/* Header */
header.top .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 6px; }
.brand { display: block; color: var(--ink); line-height: 0; }
.brand svg { height: 46px; width: auto; }

/* Hero */
.hero { position: relative; padding: 38px 0 8px; display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 760px) { .hero { padding-top: 48px; } }
.kicker { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; font: 600 12px/1 "IBM Plex Mono", monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.kicker .ic { color: var(--thread); }
.kicker span:not(.ic) + span::before { content: "· "; }
h1 { margin: 0 0 14px; font-size: clamp(38px, 7vw, 68px); line-height: .98; letter-spacing: -.025em; font-weight: 750; }
h1 .underline { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--tape) 75%, transparent) 62% 92%, transparent 92%); padding: 0 .06em; }
.lead { color: var(--muted); font-size: clamp(16px, 2.2vw, 19px); max-width: 590px; margin: 0; }
/* Tool pages: a compact heading, so the tool and its options come first */
.hero.compact { padding: 22px 0 18px; }
.hero.compact h1 { font-size: clamp(28px, 4.6vw, 42px); line-height: 1.05; margin-bottom: 8px; }
.hero.compact .lead { font-size: clamp(15px, 1.8vw, 17px); max-width: none; }  /* one line on laptops and wider */
@media (min-width: 760px) { .hero.compact { padding-top: 28px; } }
.private-note { color: var(--ok) !important; font-weight: 600; }
.checked { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13.5px; color: var(--ok); font-weight: 600; }
.checked .ic svg { width: 15px; height: 15px; }
.exam-table.facts small { display: block; color: var(--faint); font-size: 12.5px; }
.home-exams h2 small { font: 500 13px "IBM Plex Mono", monospace; color: var(--faint); margin-left: 6px; }
.exam-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--stitch); }
.exam-row b { width: 90px; font: 600 12px "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.exam-row a { padding: 5px 11px; border: 1.5px solid var(--edge); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; background: var(--card); }
.exam-row a:hover { background: var(--paper-2); }
.home-exams .more { font-weight: 600; color: var(--ink); }
/* Exam photo & signature: guided steps */
.exam-steps { margin-bottom: 14px; }
.step { margin-bottom: 26px; }
.step-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 600 17px/1.3 Fraunces, Georgia, serif; }
.step-no { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 600 13px "IBM Plex Mono", monospace; }
.step.waiting .step-title { color: var(--faint); }
.step.waiting .step-no { background: var(--paper-2); color: var(--faint); }
.step-wait { margin: 0; padding: 14px 16px; border: 1.5px dashed var(--stitch); border-radius: 10px; color: var(--faint); font-size: 14.5px; }
.exam-search { position: relative; }
.exam-search svg { position: absolute; left: 14px; top: 50%; width: 19px; height: 19px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.exam-search input { width: 100%; padding: 14px 14px 14px 44px; font-size: 16px; border: 2px solid var(--edge); border-radius: 10px; background: var(--card); }
.exam-search input:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tape) 55%, transparent); }
.exam-results { margin-top: 6px; border: 2px solid var(--edge); border-radius: 10px; background: var(--card); overflow: hidden; }
.exam-results button, .exam-results p { display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 14px; border: 0; border-bottom: 1px dashed var(--stitch); background: none; text-align: left; font: 600 15px "Instrument Sans", sans-serif; color: var(--ink); cursor: pointer; margin: 0; }
.exam-results p { color: var(--muted); font-weight: 400; cursor: default; }
.exam-results button:last-child { border-bottom: 0; }
.exam-results button small { font: 500 12px "IBM Plex Mono", monospace; color: var(--faint); white-space: nowrap; }
.exam-results button:hover, .exam-results button.on { background: color-mix(in srgb, var(--tape) 28%, transparent); }
.exam-popular { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.exam-popular > span { font-size: 13.5px; color: var(--muted); margin-right: 2px; }
.chip { padding: 7px 13px; border: 1.5px solid var(--edge); border-radius: 999px; background: var(--card); font: 600 13.5px "Instrument Sans", sans-serif; color: var(--ink); cursor: pointer; }
.chip:hover { background: var(--paper-2); }
.exam-custom { margin-top: 12px; font-size: 13.5px; }
.exam-chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 2px solid var(--edge); border-radius: 10px; background: color-mix(in srgb, var(--tape) 22%, var(--card)); }
.exam-chosen strong { display: block; font-size: 17px; }
.exam-chosen small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.exam-chosen .ic { color: var(--ok); margin-right: 8px; }
.exam-chosen > div { display: flex; align-items: center; }
.btn-ghost { flex: none; padding: 8px 14px; border: 1.5px solid var(--edge); border-radius: 8px; background: var(--card); font: 600 13.5px "Instrument Sans", sans-serif; color: var(--ink); cursor: pointer; }
.btn-ghost:hover { background: var(--paper-2); }
.doc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.doc-cards label { position: relative; cursor: pointer; }
.doc-cards input { position: absolute; opacity: 0; pointer-events: none; }
.doc-card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px; border: 2px solid var(--stitch); border-radius: 12px; background: var(--card); transition: border-color .12s, box-shadow .12s; }
.doc-card svg { width: 26px; height: 26px; color: var(--muted); }
.doc-card b { font-size: 15.5px; }
.doc-card small { font-size: 13px; line-height: 1.4; color: var(--muted); }
.doc-cards label:hover .doc-card { border-color: var(--edge); }
.doc-cards input:checked + .doc-card { border-color: var(--edge); box-shadow: 4px 4px 0 var(--tape); background: color-mix(in srgb, var(--tape) 12%, var(--card)); }
.doc-cards input:checked + .doc-card svg { color: var(--ink); }
.doc-cards input:focus-visible + .doc-card { outline: 2px solid var(--thread); outline-offset: 2px; }
.exam-note { margin: 12px 0 0; font-size: 14px; border-left: 3px solid var(--tape); padding-left: 10px; }
.exam-source { margin: 10px 0 0; font-size: 12.5px; color: var(--faint); }
.exam-source a { color: inherit; }
.toggle { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--stitch); border-radius: 10px; cursor: pointer; margin-bottom: 10px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-ui { flex: none; position: relative; width: 40px; height: 23px; margin-top: 1px; border-radius: 999px; background: var(--paper-2); border: 1.5px solid var(--edge); transition: background .15s; }
.toggle-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--edge); transition: transform .15s; }
.toggle input:checked + .toggle-ui { background: var(--ok); }
.toggle input:checked + .toggle-ui::after { transform: translateX(17px); }
.toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--thread); outline-offset: 2px; }
.toggle b { display: block; font-size: 15px; }
.toggle small { display: block; font-size: 13px; color: var(--muted); }
.exam-sizes { margin: 6px 0 18px; border: 1.5px solid var(--stitch); border-radius: 10px; }
.exam-sizes summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 14px; cursor: pointer; list-style: none; font-size: 14.5px; }
.exam-sizes summary::-webkit-details-marker { display: none; }
.exam-sizes summary > span:first-child { color: var(--muted); }
.exam-sizes summary .edit { margin-left: auto; font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.exam-sizes[open] summary .edit { visibility: hidden; }
.exam-sizes .grid { padding: 4px 14px 14px; }
.check small { color: var(--faint); font-size: 12px; }
.exam-table-wrap { overflow-x: auto; border: 2px solid var(--edge); border-radius: 12px; background: var(--card); }
.exam-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.exam-table th { text-align: left; font: 600 11.5px "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; border-bottom: 2px solid var(--edge); }
.exam-table td { padding: 9px 12px; border-bottom: 1px dashed var(--stitch); vertical-align: top; color: var(--muted); }
.exam-table td:first-child { color: var(--ink); font-weight: 600; min-width: 180px; }
.exam-table .exam-group td { background: var(--paper-2); font: 600 11.5px "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
.import { margin-top: 12px; font-size: 14px; }
.import .link-btn { display: inline-flex; align-items: center; gap: 6px; font: 600 13.5px "Instrument Sans", sans-serif; text-decoration: none; }
.import-row { display: flex; gap: 8px; margin-top: 8px; }
.import-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 1.5px solid var(--edge); border-radius: 8px; background: var(--paper); font-size: 15px; }
#import-status { display: block; margin-top: 6px; color: var(--muted); }
.local-toggle { margin-top: 18px; padding-bottom: 0; color: var(--muted); }
.local-toggle .ic { color: var(--ok); }
.crop-stage { margin-top: 18px; }
.crop-wrap { position: relative; display: inline-block; max-width: 100%; line-height: 0; touch-action: none; user-select: none; overflow: hidden; border-radius: 6px; }  /* keeps the shading on the photo */
.crop-wrap img { max-width: 100%; max-height: 420px; border-radius: 6px; }
.crop-box { position: absolute; border: 2px solid var(--tape); box-shadow: 0 0 0 9999px rgba(29, 26, 22, .45); cursor: move; outline: 1.5px dashed var(--tape-ink); outline-offset: -5px; }
.crop-box .h { position: absolute; width: 16px; height: 16px; background: var(--tape); border: 2px solid var(--tape-ink); border-radius: 50%; }
.crop-box .nw { left: -8px; top: -8px; cursor: nwse-resize; } .crop-box .ne { right: -8px; top: -8px; cursor: nesw-resize; }
.crop-box .sw { left: -8px; bottom: -8px; cursor: nesw-resize; } .crop-box .se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.crop-stage small { display: block; margin-top: 8px; color: var(--faint); font-size: 13px; }
.ic { display: inline-flex; vertical-align: -.15em; }
.ic svg { width: 1.1em; height: 1.1em; }
.sizes button b .ic svg { width: 20px; height: 20px; }
.fitted .ic svg, .deleted .ic svg { width: 14px; height: 14px; }
.drop.compact .private-note { display: none; }
.url-note { display: block; margin-top: 8px; font-size: 13px; }

/* The workbench: a pattern piece with a stitched edge */
.bench { position: relative; background: var(--card); border: 2px solid var(--edge); border-radius: 18px; padding: 22px; box-shadow: 6px 6px 0 var(--hard); }
.bench::before { content: ""; position: absolute; inset: 8px; border: 1.5px dashed var(--stitch); border-radius: 12px; pointer-events: none; }
@media (min-width: 640px) { .bench { padding: 34px; } }

.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; min-height: 200px; padding: 30px 16px; border: 2px dashed var(--edge); border-radius: 12px; background: color-mix(in srgb, var(--paper) 55%, var(--card)); cursor: pointer; transition: background .15s, transform .15s; }
.drop:hover, .drop.over { background: color-mix(in srgb, var(--tape) 16%, var(--card)); }
.drop.over { transform: rotate(-.6deg) scale(1.01); }
.drop .scissors { position: absolute; top: -14px; left: 22px; width: 26px; height: 26px; padding: 2px; background: var(--card); color: var(--ink); }
.drop .spool { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--tape); color: var(--tape-ink); border: 2px solid var(--tape-ink); box-shadow: 3px 3px 0 var(--hard); margin-bottom: 6px; }
.drop .spool svg { width: 26px; height: 26px; }
.drop strong { font-size: 18px; font-family: Fraunces, Georgia, serif; font-weight: 650; font-variation-settings: "SOFT" 100; }
.drop small { color: var(--faint); font-size: 13.5px; }
.drop.compact { min-height: 0; flex-direction: row; padding: 12px 16px; gap: 12px; }
.drop.compact .spool { width: 34px; height: 34px; margin: 0; box-shadow: none; }
.drop.compact .spool svg { width: 17px; height: 17px; }
.drop.compact small, .drop.compact .scissors { display: none; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.files-head { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font: 600 12.5px "IBM Plex Mono", monospace; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.link-btn { border: 0; background: none; color: var(--thread); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.files { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.files li { display: flex; align-items: center; gap: 12px; padding: 7px; border: 1.5px solid var(--edge); border-radius: 10px; background: var(--card); }
.files li:nth-child(odd) { transform: rotate(-.25deg); }
.files li:nth-child(even) { transform: rotate(.25deg); }
.files li.skip { opacity: .45; }
.thumb { flex: none; width: 46px; height: 46px; border-radius: 7px; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; font: 600 10px "IBM Plex Mono", monospace; color: var(--muted); text-transform: uppercase; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.files .meta { flex: 1; min-width: 0; }
.files .name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.files .sub { font: 500 12px "IBM Plex Mono", monospace; color: var(--faint); }
.files .x { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--faint); cursor: pointer; font-size: 20px; line-height: 1; }
.files .x:hover { background: var(--error-soft); color: var(--error); }

/* Options */
.panel { display: none; margin-top: 26px; }
.panel.active { display: block; }
.group { margin-bottom: 24px; }
.label { display: flex; flex-wrap: wrap; gap: 2px 12px; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.label b { font-family: Fraunces, Georgia, serif; font-size: 19px; font-weight: 650; font-variation-settings: "SOFT" 100; }
.label span { font: 500 12px "IBM Plex Mono", monospace; color: var(--faint); }

/* Target sizes as clothing size tags */
.sizes { display: flex; flex-wrap: wrap; gap: 10px; }
.sizes button {
	min-width: 72px; display: grid; justify-items: center; gap: 1px; padding: 8px 12px 7px; cursor: pointer;
	border: 2px solid var(--edge); border-radius: 10px; background: var(--card); color: var(--ink); transition: transform .12s, box-shadow .12s, background .12s;
}
.sizes button b { font-family: Fraunces, Georgia, serif; font-size: 22px; line-height: 1.05; font-weight: 750; font-variation-settings: "SOFT" 100, "WONK" 1; }
.sizes button small { font: 600 11px "IBM Plex Mono", monospace; color: var(--muted); }
.sizes button:hover { transform: translateY(-2px); box-shadow: 2px 3px 0 var(--hard); }
.sizes button[aria-pressed="true"] { background: var(--tape); border-color: var(--tape-ink); color: var(--tape-ink); transform: rotate(-3deg); box-shadow: 3px 3px 0 var(--hard); }
.sizes button[aria-pressed="true"] small { color: var(--tape-ink); }
.custom-kb { display: none; align-items: center; gap: 8px; margin-top: 12px; font: 600 13px "IBM Plex Mono", monospace; }
.custom-kb.show { display: flex; }
.custom-kb input { width: 130px; }

/* Woven labels (radio choices) */
.weave { display: flex; flex-wrap: wrap; gap: 8px; }
.weave input { position: absolute; opacity: 0; pointer-events: none; }
.weave label { cursor: pointer; }
.weave span { display: block; padding: 7px 13px; border: 1.5px solid var(--edge); border-radius: 4px; background: var(--card); font: 600 12.5px "IBM Plex Mono", monospace; letter-spacing: .04em; text-transform: uppercase; transition: background .12s; }
.weave label:hover span { background: var(--paper-2); }
.weave input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 3px color-mix(in srgb, var(--paper) 45%, transparent); }
.weave input:focus-visible + span { outline: 2px solid var(--thread); outline-offset: 2px; }

/* Quality as a measuring tape with a pin */
.range { display: flex; align-items: center; gap: 14px; }
.range output { min-width: 48px; text-align: right; font: 600 14px "IBM Plex Mono", monospace; }
.range.off { pointer-events: none; }
.range.off input { opacity: .35; }
.range.off output { color: var(--muted); }
input[type=range] { flex: 1; appearance: none; -webkit-appearance: none; height: 24px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track {
	height: 18px; border: 1.5px solid var(--tape-ink); border-radius: 3px;
	background: repeating-linear-gradient(90deg, var(--tape-ink) 0 1px, transparent 1px 8px) 0 0 / 100% 6px no-repeat, repeating-linear-gradient(90deg, var(--tape-ink) 0 1.5px, transparent 1.5px 40px) 0 0 / 100% 10px no-repeat, var(--tape);
}
input[type=range]::-moz-range-track {
	height: 18px; border: 1.5px solid var(--tape-ink); border-radius: 3px;
	background: repeating-linear-gradient(90deg, var(--tape-ink) 0 1px, transparent 1px 8px) 0 0 / 100% 6px no-repeat, repeating-linear-gradient(90deg, var(--tape-ink) 0 1.5px, transparent 1.5px 40px) 0 0 / 100% 10px no-repeat, var(--tape);
}
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -3.5px; border-radius: 50%; background: var(--thread); border: 2.5px solid var(--card); box-shadow: 0 0 0 1.5px var(--tape-ink), 2px 3px 0 var(--hard); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--thread); border: 2.5px solid var(--card); box-shadow: 0 0 0 1.5px var(--tape-ink), 2px 3px 0 var(--hard); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.field small { font: 500 11.5px "IBM Plex Mono", monospace; color: var(--faint); }
input[type=number], input[type=text], select {
	width: 100%; padding: 10px 12px; border: 1.5px solid var(--edge); border-radius: 8px; background: var(--paper); font-size: 15px;
}
input[type=number]:focus, input[type=text]:focus, select:focus { outline: none; box-shadow: 3px 3px 0 var(--tape); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d8474' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14.5px; cursor: pointer; align-self: end; padding-bottom: 10px; }
.check input { width: 18px; height: 18px; accent-color: var(--thread); }

.note { font-size: 14px; color: var(--muted); border-left: 3px solid var(--tape); padding: 4px 0 4px 12px; margin: 0 0 20px; }
details.more { border-top: 1.5px dashed var(--stitch); padding-top: 14px; }
details.more summary { cursor: pointer; font: 600 12.5px "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+ "; color: var(--thread); }
details.more[open] summary::before { content: "− "; }
details.more .grid { margin-top: 14px; }

/* Main action */
.go {
	position: relative; width: 100%; margin-top: 24px; display: flex; align-items: center; justify-content: center; gap: 10px;
	border: 2px solid var(--ink); padding: 16px 20px; border-radius: 12px; background: var(--ink); color: var(--paper);
	font: 700 17px "Instrument Sans", sans-serif; letter-spacing: .01em; cursor: pointer; box-shadow: 5px 5px 0 var(--tape); transition: transform .12s, box-shadow .12s;
}
.go::before { content: ""; position: absolute; inset: 5px; border: 1.5px dashed color-mix(in srgb, var(--paper) 45%, transparent); border-radius: 8px; pointer-events: none; }
.go:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--tape); }
.go:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--tape); }
.go:disabled { cursor: progress; opacity: .8; }
.spinner { width: 18px; height: 18px; border: 2.5px solid color-mix(in srgb, var(--paper) 35%, transparent); border-top-color: var(--paper); border-radius: 50%; animation: spin .7s linear infinite; display: none; }
.go.busy .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 10px; border: 1.5px solid var(--edge); border-radius: 3px; overflow: hidden; margin-top: 14px; display: none; background: var(--paper); }
.progress.show { display: block; }
.progress div { height: 100%; width: 0; transition: width .2s; background: repeating-linear-gradient(90deg, var(--tape-ink) 0 1px, transparent 1px 6px) 0 0 / 100% 4px no-repeat, var(--tape); }
.progress.indeterminate div { width: 35%; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.status { margin-top: 12px; font-size: 14.5px; }
.status.error { color: var(--error); background: var(--error-soft); border: 1.5px solid currentColor; padding: 10px 12px; border-radius: 8px; }

/* Result: a sewn-in size label */
.result { display: none; position: relative; margin-top: 26px; padding: 22px 20px 18px; background: var(--paper); border: 2px solid var(--edge); border-radius: 6px; }
.result::before { content: ""; position: absolute; inset: 5px; border: 1.5px dashed var(--stitch); border-radius: 3px; pointer-events: none; }
.fitted { display: inline-flex; align-items: center; gap: 5px; text-transform: uppercase; position: absolute; top: -13px; left: 18px; padding: 3px 10px; background: var(--ok); color: var(--card); font: 600 11.5px "IBM Plex Mono", monospace; letter-spacing: .08em; border-radius: 3px; }
.result.show { display: block; animation: sew .35s ease-out; }
@keyframes sew { from { opacity: 0; transform: translateY(8px) rotate(-1deg); } }
.result-top { position: relative; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.result-preview { width: 90px; height: 90px; border-radius: 6px; object-fit: cover; border: 1.5px solid var(--edge); display: none; transform: rotate(-2deg); }
.result-preview.show { display: block; }
.result-stats { flex: 1; min-width: 200px; }
.result-stats .big { font-family: Fraunces, Georgia, serif; font-size: 34px; font-weight: 750; line-height: 1.05; letter-spacing: -.02em; font-variation-settings: "SOFT" 100, "WONK" 1; }
.result-stats .small { font: 500 13px "IBM Plex Mono", monospace; color: var(--muted); margin-top: 4px; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 10px; font-weight: 700; font-size: 15px; border: 2px solid var(--edge); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--hard); }
.btn.primary { background: var(--tape); border-color: var(--tape-ink); color: var(--tape-ink); box-shadow: 3px 3px 0 var(--hard); }
.btn svg { width: 17px; height: 17px; }
.result-list { position: relative; list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; max-height: 240px; overflow: auto; font: 500 12.5px "IBM Plex Mono", monospace; }
.result-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 2px; border-top: 1px dashed var(--stitch); }
.result-list .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-list .v { flex: none; color: var(--muted); }
.result-list .good { color: var(--ok); font-weight: 600; }

/* Content sections */
section.content { padding: 72px 0 0; }
section.content h2 { font-family: Fraunces, Georgia, serif; font-variation-settings: "SOFT" 100, "WONK" 1; font-size: clamp(28px, 4vw, 38px); font-weight: 700; letter-spacing: -.02em; margin: 0 0 22px; line-height: 1.1; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.piece { position: relative; background: var(--card); border: 2px solid var(--edge); border-radius: 12px; padding: 20px; }
.piece::before { content: ""; position: absolute; inset: 6px; border: 1.5px dashed var(--stitch); border-radius: 7px; pointer-events: none; }
.steps li { counter-increment: step; }
.steps li::after { content: "0" counter(step); position: absolute; top: 12px; right: 16px; font: 750 40px/1 Fraunces, Georgia, serif; font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--tape); -webkit-text-stroke: 1.5px var(--tape-ink); }
.steps li p { margin: 38px 0 0; }
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.features .piece:nth-child(odd) { transform: rotate(-.6deg); }
.features .piece:nth-child(even) { transform: rotate(.5deg); }
.features h3 { margin: 0 0 6px; font: 650 19px Fraunces, Georgia, serif; font-variation-settings: "SOFT" 100; }
.features p { margin: 0; color: var(--muted); font-size: 14.5px; }
.features .tag { display: inline-block; margin-bottom: 12px; padding: 2px 9px; font: 600 11px "IBM Plex Mono", monospace; letter-spacing: .06em; text-transform: uppercase; background: var(--tape); color: var(--tape-ink); border-radius: 3px; }
.faq details { border-bottom: 1.5px dashed var(--stitch); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 1.5px solid var(--edge); border-radius: 50%; font: 600 16px/1 "IBM Plex Mono", monospace; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--tape); color: var(--tape-ink); border-color: var(--tape-ink); }
.faq p { color: var(--muted); margin: 10px 0 0; max-width: 720px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.links a { position: relative; padding: 7px 14px 7px 26px; border: 1.5px solid var(--edge); border-radius: 5px 10px 10px 5px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.links a::before { content: ""; position: absolute; left: 9px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; border: 1.5px solid var(--edge); }
.links a:hover { background: var(--tape); color: var(--tape-ink); border-color: var(--tape-ink); }
footer { margin-top: 80px; }
footer .foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 20px 16px 32px; font: 500 12.5px "IBM Plex Mono", monospace; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Header menu with every tool */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border: 2px solid var(--edge); border-radius: 10px; background: var(--card); font-weight: 700; font-size: 14.5px; box-shadow: 2px 2px 0 var(--hard); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 16px; height: 16px; }
.menu[open] summary { background: var(--tape); color: var(--tape-ink); border-color: var(--tape-ink); }
.menu .drawer { position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; width: min(640px, calc(100vw - 32px)); padding: 18px; background: var(--card); border: 2px solid var(--edge); border-radius: 14px; box-shadow: 6px 6px 0 var(--hard); display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.menu .h4 { margin: 0 0 6px; font: 600 11.5px "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.menu .drawer a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.menu .drawer a:hover, .menu .drawer a[aria-current="page"] { background: color-mix(in srgb, var(--tape) 30%, transparent); }
.menu .drawer svg { width: 16px; height: 16px; flex: none; }
.head-right { display: flex; align-items: center; gap: 10px; }

/* Home: the tool rack */
.rack { margin-top: 36px; }
.rack h2 { font: 600 12.5px "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 30px 0 12px; display: flex; align-items: center; gap: 10px; }
.rack h2::after { content: ""; flex: 1; border-top: 1.5px dashed var(--stitch); }
.rack h2 small { font: inherit; color: var(--faint); letter-spacing: .04em; order: 2; }
/* Balanced rows: each group picks a column count that splits it evenly (4 → 4, 5 → 3+2, 6 → 3+3),
   and cards in a shorter last row stretch, so a row never ends in empty slots. */
.tools { --gap: 14px; --c: var(--cols, 4); display: flex; flex-wrap: wrap; gap: var(--gap); }
.tools > .tool-card { flex: 1 1 calc((100% - (var(--c) - 1) * var(--gap)) / var(--c)); min-width: min(100%, 215px); }
@media (max-width: 960px) { .tools { --c: var(--cols-md, 3); } }  /* tablets: balanced for at most 3 a row (4 → 2+2) */
@media (max-width: 560px) { .tools > .tool-card { flex-basis: 100%; } }  /* phones: one per row */
.tool-card { position: relative; display: block; padding: 18px 18px 16px; background: var(--card); border: 2px solid var(--edge); border-radius: 14px; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; container-type: inline-size; }
.tool-card .inner { display: block; height: 100%; }
.tool-card .text { display: block; }
/* A card that ended up wide sits the icon beside the text instead of looking stretched. */
@container (min-width: 380px) {
	.tool-card .inner { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding-right: 34px; }
	.tool-card .inner .ico { width: 54px; height: 54px; margin: 0; }
	.tool-card .inner .ico svg { width: 26px; height: 26px; }
}
.tool-card .arrow { position: absolute; right: 16px; bottom: 14px; font: 600 16px "IBM Plex Mono", monospace; color: var(--thread); opacity: 0; transform: translateX(-6px); transition: opacity .15s, transform .15s; }
.tool-card:hover .arrow, .tool-card:focus-visible .arrow { opacity: 1; transform: none; }
.tool-card::before { content: ""; position: absolute; inset: 6px; border: 1.5px dashed transparent; border-radius: 9px; pointer-events: none; transition: border-color .15s; }
.tool-card:hover { transform: translate(-2px, -3px) rotate(-.6deg); box-shadow: 5px 6px 0 var(--hard); }
.tool-card:hover::before { border-color: var(--stitch); }
.tool-card .ico { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--tape); color: var(--tape-ink); border: 2px solid var(--tape-ink); margin-bottom: 12px; }
.tool-card .ico svg { width: 21px; height: 21px; }
.tool-card b { display: block; font: 650 19px Fraunces, Georgia, serif; font-variation-settings: "SOFT" 100; margin-bottom: 3px; }
.tool-card .desc { display: block; color: var(--muted); font-size: 14px; line-height: 1.45; }
.tool-card .new { position: absolute; top: 14px; right: 14px; font: 600 10px "IBM Plex Mono", monospace; letter-spacing: .08em; padding: 2px 7px; border-radius: 3px; background: var(--ink); color: var(--paper); }
.crumb { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 12px; font: 600 12.5px "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.crumb a { color: inherit; }

/* Extra inputs used by the editing tools */
textarea { width: 100%; min-height: 70px; padding: 10px 12px; border: 1.5px solid var(--edge); border-radius: 8px; background: var(--paper); font: 500 13.5px "IBM Plex Mono", monospace; color: var(--ink); resize: vertical; }
input[type=color] { width: 100%; height: 42px; padding: 3px; border: 1.5px solid var(--edge); border-radius: 8px; background: var(--paper); cursor: pointer; }
input[type=file].plain { font-size: 13px; padding: 8px; border: 1.5px dashed var(--edge); border-radius: 8px; background: var(--paper); width: 100%; }
input[type=url] { width: 100%; padding: 13px 14px; border: 2px solid var(--edge); border-radius: 10px; background: var(--paper); font-size: 16px; }
input[type=url]:focus, textarea:focus { outline: none; box-shadow: 3px 3px 0 var(--tape); }
.slider { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.slider .row { display: flex; align-items: center; gap: 10px; }
.slider output { min-width: 40px; text-align: right; font: 600 13px "IBM Plex Mono", monospace; color: var(--muted); }
.preview-wrap { display: none; margin-bottom: 22px; text-align: center; background: var(--paper-2); border-radius: 12px; padding: 16px; }
.preview-wrap.show { display: block; }
.preview-wrap img { max-width: 100%; max-height: 320px; transition: filter .1s; }
.preview-wrap small { display: block; margin-top: 8px; font: 500 11.5px "IBM Plex Mono", monospace; color: var(--faint); }
/* Cookie banner (CookieConsent v3), in the site's colours */
#cc-main {
	--cc-font-family: "Instrument Sans", system-ui, sans-serif; --cc-modal-border-radius: 14px; --cc-btn-border-radius: 10px;
	--cc-bg: var(--card); --cc-primary-color: var(--ink); --cc-secondary-color: var(--muted);
	--cc-btn-primary-bg: var(--ink); --cc-btn-primary-color: var(--paper); --cc-btn-primary-border-color: var(--ink);
	--cc-btn-primary-hover-bg: var(--ink); --cc-btn-primary-hover-color: var(--tape); --cc-btn-primary-hover-border-color: var(--ink);
	--cc-btn-secondary-bg: var(--paper-2); --cc-btn-secondary-color: var(--ink); --cc-btn-secondary-border-color: var(--edge);
	--cc-btn-secondary-hover-bg: var(--tape); --cc-btn-secondary-hover-color: var(--tape-ink); --cc-btn-secondary-hover-border-color: var(--tape-ink);
	--cc-separator-border-color: var(--stitch); --cc-toggle-on-bg: var(--ok); --cc-toggle-off-bg: var(--faint); --cc-toggle-readonly-bg: var(--paper-2);
	--cc-cookie-category-block-bg: var(--paper); --cc-cookie-category-block-border: var(--stitch); --cc-cookie-category-block-hover-bg: var(--paper-2);
	--cc-cookie-category-expanded-block-bg: var(--paper); --cc-overlay-bg: rgba(0, 0, 0, .45); --cc-footer-bg: var(--paper); --cc-footer-color: var(--muted);
}
#cc-main .cm, #cc-main .pm { border: 2px solid var(--edge); box-shadow: 6px 6px 0 var(--hard); }
#cc-main .cm__title, #cc-main .pm__title { font-family: Fraunces, Georgia, serif; font-variation-settings: "SOFT" 100; }
.sitemap { display: grid; gap: 22px 18px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding-top: 34px; }
.sitemap .h4 { margin: 0 0 8px; font: 600 11.5px "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sitemap a { display: block; padding: 3px 0; color: var(--ink); text-decoration: none; font-size: 14px; }
.sitemap a:hover { color: var(--thread); text-decoration: underline; }
footer .foot a, footer .foot button { color: inherit; font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
footer .foot nav { display: flex; gap: 14px; flex-wrap: wrap; }
.prose { max-width: 720px; }
.prose h2 { font: 700 26px/1.2 Fraunces, Georgia, serif; font-variation-settings: "SOFT" 100; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--muted); font-size: 16.5px; }
.prose table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1.5px dashed var(--stitch); vertical-align: top; }
.prose th { font: 600 11.5px "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .05em; color: var(--ink); }
.prose code { font: 500 13.5px "IBM Plex Mono", monospace; background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }
.report-link { margin-top: 14px; font: 600 12.5px "IBM Plex Mono", monospace; }
.report-link button { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }
.report { display: none; margin-top: 12px; padding: 16px; border: 1.5px dashed var(--edge); border-radius: 10px; background: var(--paper); }
.report.show { display: grid; gap: 10px; }
.report b { font: 650 17px Fraunces, Georgia, serif; font-variation-settings: "SOFT" 100; }
.report input[type=email] { width: 100%; padding: 10px 12px; border: 1.5px solid var(--edge); border-radius: 8px; background: var(--card); font-size: 15px; }
.report .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.report small { color: var(--faint); font-size: 12.5px; }
.support-line { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--stitch); font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.support { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1.5px solid var(--tape-ink); border-radius: 999px; background: var(--tape); color: var(--tape-ink); font-weight: 700; text-decoration: none; }
.support:hover { box-shadow: 2px 2px 0 var(--hard); text-decoration: none; }
.deleted { display: flex; align-items: center; gap: 6px; margin-top: 12px; font: 600 12px "IBM Plex Mono", monospace; color: var(--ok); }
.share-data textarea { width: 100%; font: 500 12.5px/1.5 "IBM Plex Mono", monospace; padding: 10px; border: 1.5px solid var(--edge); border-radius: 8px; background: var(--card); resize: vertical; }
.check-go { display: block; margin: 12px auto 0; padding: 6px 10px; border: 0; background: none; font: 600 14.5px "Instrument Sans", sans-serif; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.check-report { margin-top: 20px; border: 2px solid var(--edge); border-radius: 14px; background: var(--card); overflow: hidden; }
.check-head { padding: 14px 18px; border-bottom: 2px solid var(--edge); }
.check-head b { display: block; font: 700 19px/1.3 Fraunces, Georgia, serif; }
.check-head small { color: var(--muted); font-size: 13px; }
.check-head.pass { background: color-mix(in srgb, var(--ok) 14%, var(--card)); }
.check-head.warn { background: color-mix(in srgb, var(--tape) 25%, var(--card)); }
.check-head.fix { background: var(--error-soft); }
.check-report ul { list-style: none; margin: 0; padding: 6px 18px; }
.check-report li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--stitch); font-size: 14.5px; }
.check-report li:last-child { border-bottom: 0; }
.check-report li small { color: var(--muted); margin-left: 4px; }
.check-report li em { display: block; font-style: normal; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.check-report .mark { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-weight: 700; font-size: 13px; color: #fff; }
.check-report .ok .mark { background: var(--ok); }
.check-report .warn .mark { background: var(--tape); color: var(--ink); }
.check-report .fail .mark { background: var(--error); }
.check-report .go { margin: 4px 18px 18px; width: calc(100% - 36px); }
/* Guides: the article comes first, then the tool */
main.guide { display: flex; flex-direction: column; }
main.guide > .hero { order: -3; }
main.guide > .content.prose { order: -2; max-width: 760px; }
main.guide > .content.prose h2 { font-size: 22px; }
main.guide > .try-it { order: -1; margin: 10px 0 14px; font-size: 26px; }
main.guide > .bench { order: -1; }
.langs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.langs a { padding: 3px 10px; border: 1.5px solid var(--edge); border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: none; background: var(--card); }
.langs a:hover { background: var(--paper-2); }
.embed-frame { display: block; width: 100%; border: 2px solid var(--edge); border-radius: 12px; background: var(--card); margin-top: 12px; }
/* Partner sign-in: always visible in the header */
.partner-link { display: flex; align-items: center; gap: 7px; padding: 9px 14px; border: 2px solid var(--edge); border-radius: 10px; background: var(--tape); color: var(--ink); font-weight: 700; font-size: 14.5px; text-decoration: none; box-shadow: 2px 2px 0 var(--hard); white-space: nowrap; }
.partner-link:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--hard); }
.partner-link svg { width: 16px; height: 16px; }
.partner-link .when-out { display: flex; align-items: center; gap: 7px; }
.partner-link [hidden] { display: none !important; }
.partner-link.signed { width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 50%; }
.partner-link.signed svg { width: 20px; height: 20px; }
@media (max-width: 520px) { .partner-link:not(.signed), .menu summary { padding: 8px 11px; } }
[data-signed-hide][hidden] { display: none !important; }
.contact-form { display: grid; gap: 14px; max-width: 640px; }
.contact-form textarea, .contact-form select, .contact-form input { width: 100%; }
