/* knitlab.pro member pages: the page-level rules beyond /design/components.css (the design's reference CSS, a byte copy).
 * Tokens only (/design/tokens.css?v=d4e4a274d9): no raw colour values here. CSP-safe: the pages carry no style attributes. */

.loading { padding: var(--kl-s-6) var(--kl-gutter); color: var(--kl-ink-2); }

/* Landing (S1): the animated knit field of today's landing stays behind the hero; it stops under reduced motion (fabric.js). */
.landing-hero { position: relative; isolation: isolate; padding-block: var(--kl-s-4); overflow: clip; }
.landing-field { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; z-index: -1; pointer-events: none; opacity: .55; }
/* The words stay readable over the field: a soft wash of the page colour behind them (tokens only). */
.landing-text { position: relative; }
.landing-text::before { content: ""; position: absolute; inset: calc(-1 * var(--kl-s-6)); z-index: -1; background: radial-gradient(farthest-side, var(--kl-enamel) 72%, transparent); pointer-events: none; }
.landing-station .viewport__stage > img.fabric { width: calc(var(--mm) * 40); height: auto; max-width: none; }
/* Farsi counts in Persian digits (design-system §4) */
[lang="fa"] .steps li::before { content: counter(step, persian); }
.landing-maintenance p { font-size: var(--kl-fs-small); }

/* Pattern cards: the More menu must not be clipped by the card; the media keeps the card's corners. */
.pcard { overflow: visible; }
.pcard__media { border-start-start-radius: var(--kl-r-panel); border-start-end-radius: var(--kl-r-panel); }
.pcard__img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
/* A pattern's picture drawn from its stored result (thumb.js): the canvas is the card's media box at the device pixel
   ratio, on a ground from the theme's tokens (dark under a pale card, so a plain fabric does not read as a mesh). */
.pcard__media { --kl-thumb-ground: var(--kl-tower-housing); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pcard__media { --kl-thumb-ground: var(--kl-table); } }
:root[data-theme="dark"] .pcard__media { --kl-thumb-ground: var(--kl-table); }
.pcard__thumb { display: block; width: 100%; height: 100%; max-width: none; background: var(--kl-thumb-ground); }
.pcard__photo > svg { width: 48px; height: 48px; color: var(--kl-graph-strong); }

/* Feedback (S20): the photos picked, each a small picture with its name, its size and a remove control. */
.fb-photos { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--kl-s-2); min-width: 0; }
.fb-photo { display: flex; align-items: center; gap: var(--kl-s-3); min-width: 0; }
.fb-photo__img { width: 56px; height: 56px; flex: none; max-width: none; object-fit: cover; border-radius: var(--kl-r-control); background: var(--kl-sunk); }
.fb-photo__meta { flex: 1 1 0; min-width: 0; display: grid; overflow-wrap: anywhere; }
.fb-photo > .btn { flex: none; }

/* Toasts: one sentence, at the bottom, above everything (z-index tokens) */
.toasts { position: fixed; inset-block-end: var(--kl-s-4); inset-inline: var(--kl-s-4); display: grid; justify-items: center; gap: var(--kl-s-2); z-index: var(--kl-z-toast); pointer-events: none; }
.toasts .toast { pointer-events: auto; }

/* True-size calibration (Settings): a bank card's outline drawn at the chosen scale (SVG width/height attributes). */
.truesize { display: grid; gap: var(--kl-s-3); padding-block-start: var(--kl-s-2); }
.truesize__stage { overflow-x: auto; padding-block: var(--kl-s-2); direction: ltr; }
.truesize__card { display: block; max-width: none; }
.truesize__card rect { fill: var(--kl-action-soft); stroke: var(--kl-action); stroke-width: 3; }
.truesize__range { flex: 1 1 200px; min-width: 0; min-height: var(--kl-hit); accent-color: var(--kl-action); margin: 0; }

/* The shared design page /c/<id> (server-rendered, no script) */
.convert-report code, .spec code { font-size: var(--kl-fs-small); }
.share-link { direction: ltr; }
/* The design link in a badge: on the narrowest phones it may break anywhere rather than run past the screen */
.share-address { white-space: normal; max-width: 100%; }
.share-address .share-link { overflow-wrap: anywhere; min-width: 0; }

/* Page helpers of the design's prototypes (docs/design/knitlab-pro-2026-11/prototypes/gallery.css, the ones the pages use) */
.link-card { text-decoration: none; color: inherit; }
.link-card:hover { box-shadow: 0 0 0 2px var(--kl-action); }
.h-body { font-size: var(--kl-fs-body); }
.indent { padding-inline-start: var(--kl-s-5); }
.panel--danger { box-shadow: inset 0 0 0 1px var(--kl-danger); }
.narrow-field { max-width: 360px; }
.fieldset { border: 0; padding: 0; margin: 0; }
.fieldset legend { padding: 0; margin-block-end: var(--kl-s-2); }
/* A button that opens a fold keeps the button's own padding (the plain fold removes a summary's side padding) */
.fold--plain > summary.btn { display: inline-flex; padding-inline: var(--kl-s-4); min-height: var(--kl-hit); }
