/* PHYSICS Builder Kit v1.39: the look. The PHYSICS look from physicswv.com, for every PHYSICS builder.
   Colors, fonts and details are the website's (design-build-live/physics-website, read 2026-10-11): PHYSICS blue for
   titles, links and the active item; PHYSICS orange for calls to action, badges and the line under a page title; a light
   blue-grey page with white cards; Outfit for headings and buttons, Source Sans 3 for text (Google Fonts, the same files
   the website loads; the Captain's OK, 2026-10-11). The website has no dark mode: the dark one here is made from the same
   blue and orange. Every color, font, size and space is a --kit- variable; light and dark follow the device, and
   <html data-theme="light"> or data-theme="dark" sets one (the start line, setupPage, sets light: the website's look). Adopt the whole look with <body class="kit-page">; the pieces
   (kit-btn, kit-field, kit-section, the color picker, the download screen, the header ...) also work on a page that keeps
   its own base style. Text colors are checked by the tests to read clearly (4.5 to 1 or more) in both modes. */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600&family=Source+Sans+3:wght@400;600&display=swap');

:root {
  color-scheme: light dark;
  --kit-bg: #f7fafc;
  --kit-panel: #ffffff;
  --kit-ink: #2d3748;
  --kit-body: #4a5568;
  --kit-muted: #657287;
  --kit-line: #e2e8f0;
  --kit-accent: #1e5aaf;
  --kit-accent-ink: #ffffff;
  --kit-accent-hover: #184a91;
  --kit-accent-soft: #ebf3ff;
  --kit-hover: #edf2f7;
  --kit-orange: #e85a1b;
  --kit-action: #cc4d15;
  --kit-action-ink: #ffffff;
  --kit-action-hover: #b5430f;
  --kit-warn-bg: #fff7ed;
  --kit-warn-ink: #9c4221;
  --kit-err-bg: #fff5f5;
  --kit-err-ink: #c53030;
  --kit-ok-bg: #f0fff4;
  --kit-ok-ink: #276749;
  --kit-view: #e8e6e0;
  --kit-backdrop: rgba(26, 32, 44, 0.55);
  --kit-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  --kit-shadow-lift: 0 8px 22px rgba(30, 90, 175, 0.16);
  /* the website's footer band, the same in both modes */
  --kit-footer-bg: #2d3748;
  --kit-footer-ink: #cbd5e0;
  --kit-footer-link: #90cdf4;
  --kit-footer-quiet: #a0aec0;

  --kit-font: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --kit-font-display: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --kit-font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --kit-text-xs: 12px;
  --kit-text-s: 13px;
  --kit-text-m: 15px;
  --kit-text: 16px;
  --kit-text-l: 18px;
  --kit-text-xl: 28px;
  --kit-leading: 1.55;

  --kit-space-1: 4px;
  --kit-space-2: 8px;
  --kit-space-3: 12px;
  --kit-space-4: 16px;
  --kit-space-5: 24px;
  --kit-space-6: 32px;

  --kit-radius: 14px;
  --kit-radius-m: 8px;
  --kit-radius-s: 6px;
  --kit-radius-pill: 999px;

  --kit-swatch-w: 46px;
  --kit-swatch-h: 36px;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --kit-bg: #0f1623;
  --kit-panel: #172131;
  --kit-ink: #edf2f7;
  --kit-body: #cbd5e0;
  --kit-muted: #a0aec0;
  --kit-line: #2b3a50;
  --kit-accent: #7fb0f5;
  --kit-accent-ink: #0b1626;
  --kit-accent-hover: #a3c7fa;
  --kit-accent-soft: #1d2d47;
  --kit-hover: #1f2b3e;
  --kit-orange: #f0773b;
  --kit-action: #cc4d15;
  --kit-action-ink: #ffffff;
  --kit-action-hover: #b5430f;
  --kit-warn-bg: #3a2a14;
  --kit-warn-ink: #fbd38d;
  --kit-err-bg: #3b1d1f;
  --kit-err-ink: #feb2b2;
  --kit-ok-bg: #163222;
  --kit-ok-ink: #9ae6b4;
  --kit-view: #232c3a;
  --kit-backdrop: rgba(0, 0, 0, 0.65);
  --kit-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  --kit-shadow-lift: 0 8px 22px rgba(0, 0, 0, 0.5);
  --kit-footer-bg: #2d3748;
  --kit-footer-ink: #cbd5e0;
  --kit-footer-link: #90cdf4;
  --kit-footer-quiet: #a0aec0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --kit-bg: #0f1623;
    --kit-panel: #172131;
    --kit-ink: #edf2f7;
    --kit-body: #cbd5e0;
    --kit-muted: #a0aec0;
    --kit-line: #2b3a50;
    --kit-accent: #7fb0f5;
    --kit-accent-ink: #0b1626;
    --kit-accent-hover: #a3c7fa;
    --kit-accent-soft: #1d2d47;
    --kit-hover: #1f2b3e;
    --kit-orange: #f0773b;
    --kit-action: #cc4d15;
    --kit-action-ink: #ffffff;
    --kit-action-hover: #b5430f;
    --kit-warn-bg: #3a2a14;
    --kit-warn-ink: #fbd38d;
    --kit-err-bg: #3b1d1f;
    --kit-err-ink: #feb2b2;
    --kit-ok-bg: #163222;
    --kit-ok-ink: #9ae6b4;
    --kit-view: #232c3a;
    --kit-backdrop: rgba(0, 0, 0, 0.65);
    --kit-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    --kit-shadow-lift: 0 8px 22px rgba(0, 0, 0, 0.5);
    --kit-footer-bg: #2d3748;
    --kit-footer-ink: #cbd5e0;
    --kit-footer-link: #90cdf4;
    --kit-footer-quiet: #a0aec0;
  }
}

/* ---- the page ---- */
.kit-page, .kit-page *, .kit-page *::before, .kit-page *::after,
.kit-section, .kit-section *, .kit-dialog, .kit-dialog *, .kit-downloads, .kit-downloads *, .kit-header, .kit-header-bar *, .kit-footer, .kit-footer * { box-sizing: border-box; }
.kit-page [hidden], .kit-section [hidden], .kit-dialog [hidden], .kit-downloads [hidden], .kit-header [hidden], [class*="kit-"][hidden] { display: none !important; }
.kit-page {
  margin: 0;
  background: var(--kit-bg);
  color: var(--kit-body);
  font: var(--kit-text)/var(--kit-leading) var(--kit-font);
}
/* plain headings on a kit page; zero weight (:where), so any class (kit-title, kit-h2, a builder's own) wins */
:where(.kit-page) :where(h1, h2, h3, h4) { font-family: var(--kit-font-display); font-weight: 600; color: var(--kit-ink); line-height: 1.25; }
/* the website's menu (#site-nav, Uhura's nav.js) keeps its own style: the page-wide rules step around it, at no extra
   weight (:where), and it gets the website's own page settings to inherit, so it draws as it does on physicswv.com */
:where(#site-nav) { color: #4a5568; font-size: 16px; line-height: normal; text-align: left; }
.kit-page a:where(:not(#site-nav *)), .kit-section a, .kit-dialog a, .kit-downloads a { color: var(--kit-accent); }
.kit-page a:where(:not(#site-nav *)):hover, .kit-section a:hover, .kit-dialog a:hover, .kit-downloads a:hover { color: var(--kit-accent-hover); }
.kit-page button:where(:not(#site-nav *)), .kit-page input, .kit-page select, .kit-page textarea,
.kit-section button, .kit-section input, .kit-section select, .kit-downloads button:not(.kit-btn) { font: inherit; color: inherit; }

/* a page title the website's way: PHYSICS blue, an orange line under it */
.kit-title {
  display: inline-block; margin: 0 0 var(--kit-space-4); padding-bottom: 10px; border-bottom: 3px solid var(--kit-orange);
  font: 600 var(--kit-text-xl)/1.2 var(--kit-font-display); color: var(--kit-accent);
}

/* ---- the PHYSICS header and footer (createHeader, createFooter in header.js): the website's top and bottom ---- */
/* The menu (#site-nav) is the website's own nav.js, with its own style; the kit never restyles it. */
.kit-header { display: block; }
/* the website's "topbar": white in both modes, as on physicswv.com (the wordmark is drawn for white) */
.kit-header-band { background: #fff; text-align: center; padding: 14px 0; border-bottom: 1px solid #e2e8f0; }
.kit-header-home { display: inline-block; vertical-align: top; border-radius: var(--kit-radius-m); }
.kit-header-home img { display: block; height: 64px; width: auto; max-width: 100%; }
/* v1.5: the wordmark on the builder's line, before the name (the Captain: the white band was wasted space) */
.kit-header-bar.with-logo { padding-top: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--kit-line); }
.kit-header-bar > .kit-header-home { flex: none; align-self: center; }
.kit-header-bar > .kit-header-home img { height: 52px; }
/* the wordmark is drawn for white: on a dark page it sits on a white tile */
:root[data-theme="dark"] .kit-header-bar > .kit-header-home { background: #fff; padding: 4px 8px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kit-header-bar > .kit-header-home { background: #fff; padding: 4px 8px; } }
/* the builder's line, on the website's page column (a full-width app can set max-width: none) */
.kit-header-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--kit-space-3) var(--kit-space-4);
  max-width: 1100px; margin: 0 auto; padding: 30px 24px 0;
}
.kit-header-name { display: flex; align-items: center; flex-wrap: wrap; gap: var(--kit-space-3); min-width: 0; }
/* the builder's name is the page title, the website's way: blue, the orange line under it */
.kit-header-title {
  margin: 0; padding-bottom: 10px; border-bottom: 3px solid var(--kit-orange);
  font: 600 var(--kit-text-xl)/1.2 var(--kit-font-display); color: var(--kit-accent);
}
.kit-header-extra { display: flex; align-items: center; gap: var(--kit-space-2); margin-left: auto; flex-wrap: wrap; }
.kit-header-extra:empty { display: none; }
.kit-header-extra:empty + .kit-header-back { margin-left: auto; }
.kit-header a.kit-header-back { font: 600 var(--kit-text-m)/1.2 var(--kit-font-display); color: var(--kit-accent); text-decoration: none; padding: 8px 10px; border-radius: var(--kit-radius-m); white-space: nowrap; }
.kit-header a.kit-header-back:hover { background: var(--kit-hover); color: var(--kit-accent-hover); }
.kit-header-home:focus-visible, .kit-header-back:focus-visible { outline: 2px solid var(--kit-accent); outline-offset: 2px; }
@media (max-width: 540px) {
  .kit-header-title, .kit-title { font-size: 24px; }
  /* on a phone the band and the builder's line take less of the screen, so the builder's own work shows sooner
     (Figure Forge v38: the band was a fifth of a phone screen) */
  .kit-header-band { padding: 8px 0; }
  .kit-header-home img { height: 46px; }
  .kit-header-bar > .kit-header-home img { height: 34px; }
  .kit-header-bar.with-logo { padding-top: 10px; padding-bottom: 4px; }
  .kit-header-bar { padding: 14px 16px 0; gap: 8px 12px; }
  .kit-header-title { padding-bottom: 6px; }
}
/* sign-in in the header (setupPage, on build.physicswv.com): "Sign in", or who is signed in and "Sign out" */
.kit-header-account { display: flex; align-items: center; gap: var(--kit-space-2); min-width: 0; font: var(--kit-text-m)/1.3 var(--kit-font); color: var(--kit-muted); }
.kit-header-back[hidden] + .kit-header-account, .kit-header-extra:empty + .kit-header-back[hidden] + .kit-header-account { margin-left: auto; }
.kit-account-who { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kit-header-account .kit-linkbtn { font: 600 var(--kit-text-m)/1.2 var(--kit-font-display); text-decoration: none; padding: 8px 10px; border-radius: var(--kit-radius-m); white-space: nowrap; }
.kit-header-account .kit-linkbtn:hover { background: var(--kit-hover); color: var(--kit-accent-hover); }
/* v1.23: "My account" beside Sign out; on a phone the box takes its own row and the email gives way (an ellipsis), never
   the two links */
.kit-account-who { flex: 0 1 auto; min-width: 0; }
.kit-header-account a.kit-linkbtn { color: var(--kit-accent); }
.kit-header-account .kit-linkbtn { flex: none; }
@media (max-width: 540px) {
  .kit-header-account { gap: 4px; max-width: 100%; }
  .kit-account-who { max-width: none; }
  .kit-header-account .kit-linkbtn { padding: 8px 6px; }
}

/* the Captain's builder switches (v1.8, set in the Portal; switches.js puts them on <html>). A builder marks its own
   controls with one attribute: data-kit-switch="quotes" (hidden when Quotes is off) or data-kit-switch="downloads"
   (its contents give way to a plain line when Downloads is off). The server's download check is the real lock. */
:root[data-kit-quotes="off"] [data-kit-switch="quotes"] { display: none !important; }
:root[data-kit-downloads="off"] [data-kit-switch="downloads"] > * { display: none !important; }
:root[data-kit-downloads="off"] [data-kit-switch="downloads"]::before {
  content: "Downloads aren't available yet."; display: block; font: var(--kit-text-m)/1.5 var(--kit-font); color: var(--kit-muted);
}
/* v1.19: print orders show only while the builder's Orders switch is on (switches.js puts data-kit-orders="on" on <html>) */
:root:not([data-kit-orders="on"]) [data-kit-switch="orders"] { display: none !important; }

/* the website's dark footer band */
.kit-footer {
  margin-top: var(--kit-space-6); padding: 24px; text-align: center;
  background: var(--kit-footer-bg); color: var(--kit-footer-ink); font: 14.4px/1.6 var(--kit-font);
}
.kit-footer p { margin: 0; }
.kit-footer strong { font-weight: 600; }
.kit-footer a, .kit-page .kit-footer a { color: var(--kit-footer-link); text-decoration: none; }
.kit-footer a:hover, .kit-page .kit-footer a:hover { color: var(--kit-footer-link); text-decoration: underline; }
.kit-footer a:focus-visible { outline: 2px solid var(--kit-footer-link); outline-offset: 2px; }
/* the builder's own lines: the website's small print (its license line and version) */
.kit-footer-extra { margin: 12px auto 0; max-width: 780px; font-size: 12.5px; color: var(--kit-footer-quiet); }
.kit-footer-extra:empty { display: none; }
.kit-footer-extra > * + * { margin-top: 10px; }

/* ---- a card with a title, the website's way (v1.4, from Figure Forge v38): a white card on the page color, its title
   PHYSICS blue in Outfit with the orange line under it. Put a builder's sections in kit-card and their titles in
   kit-card-title; the kit's own boxes inside a card (download screen, color picker) drop their own card. ---- */
.kit-card {
  background: var(--kit-panel); color: var(--kit-body); border: 1px solid var(--kit-line); border-radius: var(--kit-radius);
  box-shadow: var(--kit-shadow); padding: 16px 18px 18px; margin: 0 0 12px;
}
.kit-card-title {
  display: block; width: fit-content; margin: 0 0 12px; padding-bottom: 6px; border-bottom: 3px solid var(--kit-orange);
  font: 600 19px/1.2 var(--kit-font-display); color: var(--kit-accent);
}
/* a card that folds (v1.12, Deck Box v23): <details class="kit-card"><summary class="kit-card-title">; the title keeps
   the browser's open/closed arrow (display: block above would take it away) */
summary.kit-card-title { display: list-item; list-style-position: inside; cursor: pointer; }
details.kit-card:not([open]) > summary.kit-card-title { margin-bottom: 0; }
/* every card folds on its title (v1.20, BU-007; fold.js, started by setupPage; Deck Box v40's folding, lifted): the same
   arrow as the <details> card, open to start; folded, only the title shows */
.kit-card > .kit-fold-title { display: list-item; list-style: disclosure-open inside; cursor: pointer; }
.kit-card.kit-folded > .kit-fold-title { list-style-type: disclosure-closed; margin-bottom: 0; }
.kit-card.kit-folded > :not(.kit-fold-title) { display: none !important; }
.kit-fold-title:focus-visible { outline: 2px solid var(--kit-accent); outline-offset: 2px; }
.kit-card .kit-downloads { border: 0; box-shadow: none; padding: 0; background: none; }
.kit-card .kit-downloads-title { display: none; }
.kit-card .kit-section { box-shadow: none; }
@media (max-width: 540px) { .kit-card { padding: 14px 14px 16px; } }

/* ---- the File download card (v1.11, the Captain, 2026-10-12: "the download card should be contained, titled file
   download, then options within that card"; one look for every builder). ONE card per builder page, titled
   "File download"; every way to download is an option inside it: a heading, one line about it, its own settings, its
   buttons. Plain markup (docs/builder-layout.md), nothing to load. The Downloads switch goes on .kit-download-body, so
   with Downloads off the title stays and the options give way to "Downloads aren't available yet." ---- */
.kit-download-card .kit-download-option { margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--kit-line); }
.kit-download-card .kit-download-option:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.kit-download-card .kit-download-head { margin: 0 0 4px; font: 600 var(--kit-text-l)/1.25 var(--kit-font-display); color: var(--kit-ink); }
.kit-download-card .kit-download-about { margin: 0 0 10px; font-size: var(--kit-text-m); color: var(--kit-body); }
.kit-download-card .kit-download-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.kit-download-card .kit-note { color: var(--kit-body); }
/* v1.13: what a download costs, or why it is not on the account (access.js, a hint from the Portal; the press still
   decides). A dimmed button is inert: it cannot be pressed or reached by the keyboard. */
[data-kit-dimmed] { opacity: .45; filter: grayscale(.5); cursor: not-allowed; }
.kit-access-note { margin: 0 0 8px; font-size: var(--kit-text-m); color: var(--kit-body); }
.kit-access-note.none { color: var(--kit-warn-ink); }
/* v1.16: download tokens (tokens.js; Spock's order, Portal v113.61). Under Paid, signed in: the balance and "Buy tokens" at
   the foot of the File download card; buying opens a box with the packs, and the state picker with the shop's notice
   when the account has not confirmed US residence. */
.kit-tokens { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--kit-line); }
.kit-tokens-balance { margin: 0; flex: 1 1 auto; font-size: var(--kit-text-m); color: var(--kit-ink); }
.kit-tokens .kit-tokens-said { flex: 1 0 100%; margin: 0; }
.kit-tokens-dialog { width: min(92vw, 420px); }
.kit-tokens-dialog .kit-note { margin: 0 0 12px; }
.kit-tokens-us .kit-field select { width: 100%; }
.kit-tokens-packs { display: flex; flex-direction: column; gap: 8px; }
.kit-tokens-packs .kit-btn { width: 100%; }
.kit-tokens-msg { margin: 12px 0 0; }

/* the v1.0 top bar, still here for any page that uses it */
.kit-top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--kit-space-4); flex-wrap: wrap;
  padding: 10px var(--kit-space-4); border-bottom: 1px solid var(--kit-line); background: var(--kit-panel);
}
.kit-brand { font: 600 var(--kit-text-l)/1.2 var(--kit-font-display); color: var(--kit-ink); }
.kit-ver { font-family: var(--kit-font); font-weight: 400; color: var(--kit-muted); font-size: var(--kit-text-xs); margin-left: var(--kit-space-1); }
.kit-badge {
  display: inline-block; font: 600 11px/1 var(--kit-font-display); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--kit-action-ink); background: var(--kit-action); border-radius: var(--kit-radius-pill); padding: 4px 9px;
  white-space: nowrap; vertical-align: 2px;
}
.kit-panel {
  background: var(--kit-panel); border: 1px solid var(--kit-line); border-radius: var(--kit-radius);
  box-shadow: var(--kit-shadow); padding: var(--kit-space-5);
}
.kit-h2 {
  font: 600 var(--kit-text-s)/1.3 var(--kit-font-display); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--kit-muted); margin: 0 0 var(--kit-space-2);
}
.kit-foot {
  padding: 10px var(--kit-space-4); border-top: 1px solid var(--kit-line); background: var(--kit-panel);
  font-size: var(--kit-text-xs); color: var(--kit-muted); display: flex; justify-content: space-between; gap: var(--kit-space-3); flex-wrap: wrap;
}

/* ---- buttons ---- */
.kit-btn {
  display: inline-block; background: var(--kit-panel); color: var(--kit-ink); border: 1px solid var(--kit-line);
  border-radius: var(--kit-radius-m); padding: 9px 14px; cursor: pointer; font: 600 var(--kit-text-m)/1.2 var(--kit-font-display);
  text-decoration: none;
}
.kit-btn:hover { border-color: var(--kit-accent); color: var(--kit-accent); background: var(--kit-hover); }
.kit-btn.primary { background: var(--kit-accent); color: var(--kit-accent-ink); border-color: var(--kit-accent); }
.kit-btn.primary:hover { background: var(--kit-accent-hover); border-color: var(--kit-accent-hover); color: var(--kit-accent-ink); }
/* the one call to action on a screen, in PHYSICS orange */
.kit-btn.action { background: var(--kit-action); color: var(--kit-action-ink); border-color: var(--kit-action); }
.kit-btn.action:hover { background: var(--kit-action-hover); border-color: var(--kit-action-hover); color: var(--kit-action-ink); }
.kit-btn.wide { width: 100%; padding: 11px; }
.kit-btn:disabled { opacity: 0.55; cursor: default; }
.kit-btn:disabled:hover { border-color: var(--kit-line); color: var(--kit-ink); background: var(--kit-panel); }
.kit-btn.primary:disabled:hover { border-color: var(--kit-accent); color: var(--kit-accent-ink); background: var(--kit-accent); }
.kit-btn.action:disabled:hover { border-color: var(--kit-action); color: var(--kit-action-ink); background: var(--kit-action); }
/* Delete my account (v1.21): the one red button, the final press after DELETE is typed */
.kit-btn.kit-delete-final, .kit-btn.kit-delete-final:hover, .kit-btn.kit-delete-final:disabled:hover { background: var(--kit-err-ink); color: var(--kit-err-bg); border-color: var(--kit-err-ink); }
.kit-btn.kit-delete-final:hover:not(:disabled) { filter: brightness(0.9); }
/* a button's second line of words, smaller (Deck Box's "Lid STL prints top-down"; v1.20): lighter on blue, full white on
   orange, where a dimmed note would read under 4.5 to 1 */
.kit-btn small { font-weight: 400; opacity: 0.85; }
.kit-btn.action small { opacity: 1; }
.kit-linkbtn { background: none; border: 0; padding: 0; color: var(--kit-accent); text-decoration: underline; cursor: pointer; font: inherit; }
.kit-chip {
  background: var(--kit-panel); color: var(--kit-ink); border: 1px solid var(--kit-line); border-radius: var(--kit-radius-pill);
  padding: 5px 12px; cursor: pointer; font: 600 var(--kit-text-xs)/1.2 var(--kit-font-display);
}
.kit-chip:hover { border-color: var(--kit-accent); color: var(--kit-accent); }
.kit-chip.on, .kit-chip[aria-pressed="true"] { background: var(--kit-accent-soft); color: var(--kit-accent); border-color: var(--kit-accent); }
.kit-btn:focus-visible, .kit-chip:focus-visible, .kit-linkbtn:focus-visible, .kit-swatch:focus-visible, .kit-section-head:focus-visible {
  outline: 2px solid var(--kit-accent); outline-offset: 2px;
}

/* ---- fields ---- */
.kit-field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.kit-field > span { font: 600 var(--kit-text-m)/1.3 var(--kit-font); color: var(--kit-ink); }
/* text boxes and menus only: a tick box keeps its own small shape */
.kit-field input:not([type="checkbox"]):not([type="radio"]), .kit-field textarea, .kit-field select,
.kit-pfilter input[type="search"], .kit-pfilter select {
  font: inherit; color: var(--kit-ink); background: var(--kit-panel); border: 1px solid var(--kit-line);
  border-radius: var(--kit-radius-m); padding: 8px 10px; width: 100%; min-width: 0;
}
.kit-field input:not([type="checkbox"]):not([type="radio"]):focus, .kit-field textarea:focus, .kit-field select:focus,
.kit-pfilter input[type="search"]:focus, .kit-pfilter select:focus {
  outline: 2px solid var(--kit-accent); outline-offset: 0; border-color: var(--kit-accent);
}
.kit-save-card .kit-save-copy { margin: 2px 0 0; }
.kit-save-field {
  display: block; box-sizing: border-box; width: 100%; margin: 8px 0 0; font: inherit; color: var(--kit-ink); background: var(--kit-panel);
  border: 1px solid var(--kit-line); border-radius: var(--kit-radius-m); padding: 8px 10px;
}
.kit-save-field[hidden] { display: none; }
.kit-save-field:focus { outline: 2px solid var(--kit-accent); outline-offset: 0; border-color: var(--kit-accent); }
/* v1.17 (BU-003): saved designs on the customer's account. In the Save your design card: the name, Save to my account,
   Save as new and "My saved designs" (saved.js); the same list on the account page, /kit/account/. */
.kit-save-account-part { margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--kit-line); }
.kit-save-account-part .kit-field { margin-bottom: 8px; }
.kit-save-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kit-save-signin-open { margin: 8px 0 0; }
.kit-saved-box { margin: 12px 0 0; }
.kit-saved-box > summary { cursor: pointer; font: 600 var(--kit-text-m)/1.3 var(--kit-font); color: var(--kit-ink); padding: 4px 0; }
.kit-saved-box .kit-saved-all { margin: 10px 0 0; font-size: var(--kit-text-s); }
.kit-saved .kit-saved-state { margin: 8px 0 0; }
.kit-saved .kit-saved-signin { margin: 8px 0 0; }
.kit-saved-list { list-style: none; margin: 8px 0 0; padding: 0; }
.kit-saved-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--kit-line); }
.kit-saved-item:first-child { border-top: 0; }
.kit-saved-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 200px; }
.kit-saved-name { font-weight: 600; color: var(--kit-ink); overflow-wrap: anywhere; }
.kit-saved-about { font-size: var(--kit-text-s); color: var(--kit-body); }
.kit-saved-acts, .kit-saved-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kit-saved-edit { flex: 1 1 100%; }
.kit-saved-confirm { flex: 1 1 100%; color: var(--kit-ink); }
.kit-saved-acts .kit-btn, .kit-saved-edit .kit-btn { padding: 6px 12px; }
/* a link dressed as a button (the account page's Open) reads like the page's own buttons */
.kit-page a.kit-btn { font: inherit; }
.kit-saved-newname {
  flex: 1 1 200px; min-width: 0; font: inherit; color: var(--kit-ink); background: var(--kit-panel);
  border: 1px solid var(--kit-line); border-radius: var(--kit-radius-m); padding: 6px 10px;
}
.kit-saved-newname:focus { outline: 2px solid var(--kit-accent); outline-offset: 0; border-color: var(--kit-accent); }
.kit-saved .kit-saved-said { margin: 8px 0 0; }
/* v1.18 (BU-004): the library. The account page's groups; a finished design's row; the Download License line on the File
   download card and its "I agree" box; the Finish row under Paid (library.js). */
.kit-saved-account .kit-saved-head { margin: 16px 0 4px; font: 600 var(--kit-text-m)/1.3 var(--kit-font-display); color: var(--kit-ink); }
.kit-saved-account .kit-saved-head:first-child { margin-top: 0; }
.kit-archived-box { margin: 14px 0 0; }
.kit-archived-box > summary { cursor: pointer; font-weight: 600; color: var(--kit-body); padding: 4px 0; }
.kit-license { margin: 14px 0 0; }
.kit-license p { margin: 0; font-size: var(--kit-text-s); color: var(--kit-body); }
.kit-license p + p { margin-top: 2px; }
.kit-license-dialog, .kit-finish-dialog { width: min(92vw, 440px); }
.kit-license-dialog .kit-note, .kit-finish-dialog .kit-note { margin: 0 0 12px; }
.kit-license-readline { margin: 0 0 14px; }
.kit-license-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kit-license-msg { margin: 12px 0 0; }
.kit-finish { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--kit-line); }
.kit-finish-text { margin: 0; flex: 1 1 auto; font-size: var(--kit-text-m); color: var(--kit-ink); }
.kit-finish .kit-finish-said { flex: 1 0 100%; margin: 0; }
.kit-finish + .kit-tokens { margin-top: 8px; padding-top: 0; border-top: 0; }
.kit-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.kit-check input { margin: 0; accent-color: var(--kit-accent); flex: none; }

/* ---- messages ---- */
.kit-note { color: var(--kit-muted); font-size: var(--kit-text-m); margin: 0 0 var(--kit-space-2); }
.kit-warn { background: var(--kit-warn-bg); color: var(--kit-warn-ink); border-radius: var(--kit-radius-m); padding: 9px 12px; margin: 4px 0 10px; font-size: var(--kit-text-m); }
.kit-msg { min-height: 1.2em; margin: 6px 0 0; font-size: var(--kit-text-m); }
.kit-msg.err { color: var(--kit-err-ink); background: var(--kit-err-bg); border-radius: var(--kit-radius-m); padding: 6px 10px; }
.kit-msg.ok { color: var(--kit-ok-ink); background: var(--kit-ok-bg); border-radius: var(--kit-radius-m); padding: 6px 10px; }
.kit-code {
  display: block; font: var(--kit-text-s)/1.5 var(--kit-font-mono); background: var(--kit-bg); color: var(--kit-ink);
  border: 1px solid var(--kit-line); border-radius: var(--kit-radius-s); padding: 8px 10px; margin: 0 0 var(--kit-space-2);
  white-space: pre-wrap; overflow-wrap: anywhere;
}

/* ---- a section that folds (a card, the website's way) ---- */
.kit-section {
  border: 1px solid var(--kit-line); border-radius: var(--kit-radius); padding: 14px 16px 16px; margin: 12px 0 0;
  background: var(--kit-panel); color: var(--kit-body); box-shadow: var(--kit-shadow);
}
.kit-section-head {
  font: 600 var(--kit-text-l)/1.25 var(--kit-font-display); color: var(--kit-ink); margin: 0; cursor: pointer;
  list-style: none; display: flex; align-items: baseline; gap: 6px;
}
.kit-section-head::-webkit-details-marker { display: none; }
.kit-section-head::before { content: '\25B8'; color: var(--kit-orange); font-size: var(--kit-text); flex: none; }
.kit-section[open] > .kit-section-head::before { content: '\25BE'; }
.kit-section[open] > .kit-section-head { margin-bottom: 8px; }
.kit-section-note { color: var(--kit-muted); font: 400 var(--kit-text)/1.25 var(--kit-font); }

/* ---- the color picker ---- */
.kit-picker-chip { margin-left: auto; align-self: center; }
.kit-picker-help { margin: 0 0 6px; }
.kit-pfilter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0; }
.kit-pfilter input[type="search"] { flex: 1 1 160px; width: auto; }
.kit-pfilter select { width: auto; flex: 0 1 auto; }
.kit-pfilter .kit-check { font-size: var(--kit-text); flex: none; white-space: nowrap; }
.kit-palette {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--kit-swatch-w), 1fr)); gap: 7px; margin: 6px 0;
  max-height: min(56vh, 520px); overflow-y: auto; padding: 2px 4px 2px 2px;
}
.kit-ghead { grid-column: 1 / -1; margin: 10px 0 0; font: 600 var(--kit-text-m)/1.3 var(--kit-font-display); color: var(--kit-muted); }
.kit-ghead:first-child { margin-top: 2px; }
.kit-palette > .kit-note { grid-column: 1 / -1; }
.kit-swatch {
  height: var(--kit-swatch-h); border-radius: var(--kit-radius-m); border: 2px solid var(--kit-line); cursor: pointer;
  padding: 0; position: relative; background: transparent; min-width: 0;
}
.kit-swatch[aria-checked="true"] { border-color: var(--kit-ink); box-shadow: 0 0 0 2px var(--kit-panel), 0 0 0 4px var(--kit-accent); }
.kit-swatch.new { border-style: dashed; }
.kit-swatch.used::after {
  content: ""; position: absolute; right: 3px; bottom: 3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--kit-panel); border: 1px solid var(--kit-ink);
}
/* a see-through filament: a clear pattern; no color sample: hatched (still offered by name) */
.kit-swatch.clear, .kit-sw.clear { background: repeating-conic-gradient(#e9eef0 0 25%, #c9d3d7 0 50%) 0 0 / 10px 10px; }
.kit-swatch.nosample, .kit-sw.nosample { background: repeating-linear-gradient(45deg, #b9b9b9 0 4px, #e2e2e2 4px 8px); }
.kit-sw { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--kit-ink); flex: none; vertical-align: -3px; }
.kit-inuse { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.kit-inuse-label { font-size: var(--kit-text-m); color: var(--kit-muted); }
.kit-inuse .kit-swatch { width: 34px; height: 26px; }
.kit-spoolnote { margin: 6px 0 0; }
.kit-chosen { margin: 8px 0 0; font-size: var(--kit-text); }
.kit-chosen strong { color: var(--kit-ink); }

/* ---- popups ---- */
.kit-dialog {
  border: 1px solid var(--kit-line); border-radius: var(--kit-radius); background: var(--kit-panel); color: var(--kit-body);
  padding: 16px; max-width: min(92vw, 640px); font: var(--kit-text)/var(--kit-leading) var(--kit-font); box-shadow: var(--kit-shadow-lift);
}
.kit-dialog::backdrop { background: var(--kit-backdrop); }
.kit-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 10px; }
.kit-dialog-head strong { font: 600 var(--kit-text-l)/1.25 var(--kit-font-display); color: var(--kit-ink); }
.kit-photo img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; border-radius: var(--kit-radius-m); background: #f1f1f1; }
.kit-photo a { display: inline-block; margin-top: 10px; }
/* the sign-in popup: Google, or a link by email; never a password */
.kit-signin { width: min(92vw, 420px); }
.kit-signin .kit-btn { width: 100%; }
.kit-signin-or { text-align: center; color: var(--kit-muted); margin: 14px 0 6px; font-size: var(--kit-text-m); }
.kit-signin-email .kit-field { margin-bottom: 8px; }
.kit-signin-said { margin: 12px 0 0; }
.kit-signin-note { margin: 12px 0 0; font-size: var(--kit-text-s); }
.kit-signin-blocked .kit-btn { margin-top: 8px; }
/* the gate (v1.9, Sign-in to use): the dressed page with only the sign-in box, a card in the middle of the page (page.js
   hides the builder and lays the page out; these are only the looks) */
.kit-gate { display: flex; justify-content: center; align-items: flex-start; padding: 40px 16px 56px; background: var(--kit-bg); }
.kit-gate .kit-card { width: min(100%, 440px); margin: 0; font: var(--kit-text)/var(--kit-leading) var(--kit-font); }
.kit-gate .kit-signin .kit-card-title { margin-bottom: 0; }
.kit-gate .kit-signin .kit-note:not(.kit-signin-note) { margin: 0 0 14px; }
.kit-gate-stop .kit-btn { margin-top: 8px; }
@media (max-width: 540px) { .kit-gate { padding: 20px 12px 32px; } }

/* ---- the download screen ---- */
.kit-downloads-title { font: 600 var(--kit-text-l)/1.25 var(--kit-font-display); color: var(--kit-ink); margin: 0 0 var(--kit-space-2); }
.kit-files { list-style: none; margin: 0 0 var(--kit-space-2); padding: 0; border: 1px solid var(--kit-line); border-radius: var(--kit-radius-m); background: var(--kit-panel); }
.kit-file { display: flex; align-items: center; gap: var(--kit-space-3); padding: 10px 12px; border-top: 1px solid var(--kit-line); }
.kit-file:first-child { border-top: 0; }
.kit-file .kit-sw { width: 22px; height: 22px; border-radius: 5px; }
.kit-file-text { flex: 1; min-width: 0; }
.kit-file-name { font: 600 var(--kit-text)/1.3 var(--kit-font-display); color: var(--kit-ink); overflow-wrap: anywhere; }
.kit-file-about { color: var(--kit-muted); font-size: var(--kit-text-m); }
.kit-file-refuse { color: var(--kit-warn-ink); font-size: var(--kit-text-m); }
.kit-file .kit-btn { flex: none; }
.kit-dl-notes .kit-note { margin: 4px 0; }
.kit-dl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--kit-space-3); margin: var(--kit-space-2) 0 0; }
.kit-downloads[aria-busy="true"] .kit-btn { cursor: progress; }
.kit-dl-status:empty { display: none; }
.kit-readme { margin-top: var(--kit-space-3); }
.kit-readme > summary { cursor: pointer; color: var(--kit-accent); font: 600 var(--kit-text-m)/1.3 var(--kit-font-display); }
.kit-readme > .kit-code { margin-top: var(--kit-space-2); }

/* v1.19: the Order card (order.js): the live price with its lines, "Order this print", the deposit, "Order placed" */
.kit-order-about { margin: 0 0 10px; font-size: var(--kit-text-m); color: var(--kit-muted); }
.kit-order-lines { list-style: none; margin: 0; padding: 0; font-size: var(--kit-text-m); }
.kit-order-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--kit-line); color: var(--kit-ink); }
.kit-order-total { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 0; font: 600 var(--kit-text-l)/1.3 var(--kit-font-display); color: var(--kit-ink); }
.kit-order-tax { margin: 2px 0 10px; font-size: var(--kit-text-s); color: var(--kit-muted); }
.kit-order-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kit-order-placed { margin: 10px 0 0; }
.kit-order-dialog .kit-order-money { margin: 0 0 12px; font-size: var(--kit-text-m); color: var(--kit-ink); }
/* v1.27 (Builder Contract v1.10.0, the order terms): the cancel window's words and the "Start printing as soon as possible" tick */
.kit-order-terms { margin: 0 0 10px; font-size: var(--kit-text-s); color: var(--kit-muted); }
.kit-order-dialog .kit-order-money.kit-order-terms { font-size: var(--kit-text-s); color: var(--kit-muted); }
.kit-order-start { display: flex; align-items: flex-start; margin: 0 0 12px; font-size: var(--kit-text-m); color: var(--kit-ink); }
.kit-order-start input { margin-top: 3px; }
/* v1.26 (the Captain's notes from the first live orders, 10/25): the live price in view while orders are on, a small bar over
   the page's bottom-left corner (on a phone, across the bottom, with room kept under the page); and the box back from Square */
.kit-order-chip { position: fixed; left: 16px; bottom: 16px; z-index: 40; display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px); padding: 8px 8px 8px 14px; background: var(--kit-panel); color: var(--kit-ink);
  border: 1px solid var(--kit-line); border-radius: var(--kit-radius); box-shadow: var(--kit-shadow-lift); font: var(--kit-text-m)/1.3 var(--kit-font); }
.kit-order-chip-text { display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: baseline; justify-content: start; }
.kit-order-chip-label { color: var(--kit-muted); }
.kit-order-chip-amount { font: 600 var(--kit-text-l)/1.2 var(--kit-font-display); color: var(--kit-ink); }
.kit-order-chip-note { grid-column: 1 / -1; font-size: var(--kit-text-s); color: var(--kit-muted); }
.kit-order-chip .kit-btn { padding: 6px 12px; }
@media (max-width: 540px) {
  .kit-order-chip { left: 0; right: 0; bottom: 0; max-width: none; justify-content: space-between; border-width: 1px 0 0; border-radius: 0; padding: 8px 16px; }
  :root.kit-order-chip-on body { padding-bottom: 64px; }
}
.kit-order-back .kit-order-back-text { margin: 0 0 12px; font-size: var(--kit-text); color: var(--kit-ink); }
.kit-order-back .kit-order-back-text.ok { color: var(--kit-ok-ink); }

/* ---- Delete my account (v1.21, Builder Contract v1.8.4): the account page's last card, folded to start; what happens,
   then the box with the typed word ---- */
.kit-delete-what p { margin: 6px 0; }
.kit-delete-balance { font-weight: 600; color: var(--kit-ink); }
.kit-delete-list { margin: 6px 0 10px; padding-left: 20px; }
.kit-delete-list li, .kit-delete-kept li { margin: 4px 0; }
.kit-delete-confirm { margin: 12px 0 0; padding: 12px 14px; border: 1px solid var(--kit-err-ink); border-radius: var(--kit-radius-m); background: var(--kit-err-bg); }
.kit-delete-confirm .kit-note { color: var(--kit-ink); margin-top: 0; }
.kit-delete-confirm .kit-field { max-width: 280px; margin-bottom: 0; }
.kit-delete-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.kit-delete-kept-head { margin: 14px 0 4px; font: 600 var(--kit-text-l)/1.25 var(--kit-font-display); color: var(--kit-ink); }
.kit-delete-kept { margin: 0 0 14px; padding-left: 20px; }
.kit-delete-said:empty { display: none; }

/* v1.36: H3C mixed color */
.kit-h3c .kit-swatch { border-width: 1px; }
.kit-h3c-now { margin-top: 6px; }
.kit-h3c-blend { display: inline-block; width: 22px; height: 70px; vertical-align: middle; border-radius: var(--kit-radius-s); border: 1px solid var(--kit-line); }
