/* Theme variables. The look is "studio light" (see DECISIONS.md): white
   panels on a pale ground, thin borders, and a monospace face for numbers
   and measurements, in the site's own colors: navy ink, coral, teal and
   yellow. */
:root {
  --bg: #F1F4F3; --ink: #16233A; --muted: #566476;
  /* A faint grid on the page's ground, behind everything. */
  --grid: rgba(22, 35, 58, .035);
  --paper: #fff; --line: #DCE2DF;
  /* Text fields and selects: white with a firmer border, so they read as
     something to fill in, not as disabled. */
  --field: #fff; --field-line: #BFC9C5;
  /* --accent is the coral of the logo, for marks, sliders, focus and
     selection. --coral is a deeper red that small text can be read in. */
  --accent: #FF5A4F; --coral: #D23B2B;
  /* The track behind a row of tabs. */
  --seg: #E4E9E7;
  --sun: #FFC83D; --teal: #0F8A7B; --sky: #4DB6FF;
  --danger-bg: #FFE3E0;
  /* Behind a warning that isn't a problem, such as an enlarged picture. */
  --warn-bg: #FFF1C7;
  /* Behind artwork (cards, the design preview, the picker): a pale tile
     in light mode; light "paper" in dark mode, so black line art shows. */
  --art: #F1F4F3;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: Geist, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111A22; --ink: #E8EEF3; --muted: #9AA8B6; --grid: rgba(255, 255, 255, .028);
    --paper: #1C2833; --line: #2B3946; --danger-bg: #3A2226; --warn-bg: #3A3220;
    --field: #111A22; --field-line: #46586A;
    --accent: #FF6F65; --coral: #FF8A7A; --seg: #0C141B; --teal: #5FD3C4;
    --art: #DCE3E0;
  }
}
/* The meta tag lets native controls (checkboxes, radios, scrollbars)
   follow the system. A theme picked in the footer has to override that
   too, or a phone in dark mode draws dark checkboxes on the light site. */
:root[data-theme="light"] { color-scheme: light }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111A22; --ink: #E8EEF3; --muted: #9AA8B6; --grid: rgba(255, 255, 255, .028);
  --paper: #1C2833; --line: #2B3946; --danger-bg: #3A2226; --warn-bg: #3A3220;
  --field: #111A22; --field-line: #46586A;
  --accent: #FF6F65; --coral: #FF8A7A; --seg: #0C141B; --teal: #5FD3C4;
  --art: #DCE3E0;
}

*, *::before, *::after { box-sizing: border-box }
[x-cloak] { display: none !important }
input:disabled, select:disabled, textarea:disabled { background: var(--bg); color: var(--muted); cursor: not-allowed }
/* Components set display on their own; hidden must still win. */
[hidden] { display: none !important }
html { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px) }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background-color: var(--bg); color: var(--ink);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 28px 28px;
  font: 400 15px/1.5 Geist, system-ui, sans-serif;
}
h1, h2, h3, .logo { margin: 0; font-family: var(--display); letter-spacing: -.02em; font-weight: 700 }
/* Numbers and measurements are set in the monospace face. */
output, .stats, .dims, .dl, .save-status, .fit-status, .panel-label output, .hero-facts, .eyebrow, .sheet-tile .muted, .sheet-card .muted { font-family: var(--mono); font-size: 12px }
a { color: inherit; text-decoration: none }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 }
.muted { color: var(--muted) }

.wrap { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column }
main { flex: 1; padding-top: 28px }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line) }
.site-header-in { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px }
.logo { font-weight: 800; font-size: 20px; white-space: nowrap }
.logo i {
  display: inline-block; width: 14px; height: 14px; margin: 0 9px 0 3px;
  background: #FF5A4F; border: 2px solid #fff; border-radius: 50% 50% 50% 4px;
  outline: 1px dashed var(--ink); outline-offset: 2px;
}
.site-header nav { margin-left: auto; display: flex; gap: 6px; align-items: center }
.site-header nav > a:not(.btn) { padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 14px }
.site-header nav > a:not(.btn):hover { background: var(--bg) }
.search { flex: 1; max-width: 460px }
.search input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--field-line); border-radius: 8px;
  background: var(--field); color: var(--ink); font: inherit; font-size: 14px;
}

.menu { position: relative }
.avatar-btn { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; display: block }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 600; text-transform: uppercase;
}
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; min-width: 200px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 12px 32px rgba(20,22,28,.14);
}
.menu-who { margin: 0; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px }
.menu-who strong { display: block; font-weight: 600 }
.menu-who span { color: var(--muted); font-size: 14px }
.menu-panel form { margin: 0 }
.menu-item {
  display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--ink);
  font: 500 15px Geist, sans-serif; padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.menu-item:hover { background: var(--bg) }
a.menu-item { box-sizing: border-box }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 8px; border: 0; cursor: pointer;
  font: 600 14px Geist, sans-serif;
}
.btn.pri { background: var(--ink); color: var(--paper) }
.btn.pri:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent)) }
.btn.sec { background: var(--paper); color: var(--ink); border: 1px solid var(--field-line) }
.btn.sec:hover { border-color: var(--ink) }
.btn.block { width: 100% }
.btn:disabled { opacity: .45; cursor: default }
.btn.pri:disabled { opacity: 1; background: var(--seg); color: var(--muted) }
.btn.danger { color: var(--coral); border-color: var(--coral) }
.text-link { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px }
.text-link:hover { text-decoration-color: var(--accent) }
.link-btn { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: 44px; margin-bottom: 40px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px }
.eyebrow { margin: 0 0 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--coral); font-weight: 500 }
.hero h1 { font-size: clamp(36px, 5.2vw, 58px); line-height: 1; font-weight: 800; letter-spacing: -.035em }
.hero h1 + p { max-width: 48ch; color: var(--muted); font-size: 17px; margin: 18px 0 24px }
.cta { display: flex; gap: 10px; flex-wrap: wrap }
.cta .btn { padding: 12px 20px; font-size: 15px }
.hero-facts { display: flex; gap: 6px 20px; flex-wrap: wrap; margin: 20px 0 0; color: var(--muted) }
.hero-sheet { margin: 0; justify-self: center; width: 100%; max-width: 340px }
.hero-sheet .sheet-tile { background: var(--bg) }
/* How it works: three steps under the designs on the home page. */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; padding-bottom: 64px }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: grid; gap: 6px; align-content: start }
.step b { font: 500 12px var(--mono); color: var(--coral) }
.step h3 { font-size: 16px }
.step p { margin: 0; color: var(--muted) }
.step h2 { font-size: 16px }
/* Home: a callout for Silhouette owners, pointing to test sheets. Navy in
   either theme, so it stands apart from the white panels around it. */
.silhouette-callout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 32px; align-items: center; padding: 32px 36px; margin-bottom: 40px; background: #16233A; color: #E8EEF3; border: 1px solid var(--line); border-radius: 12px }
.silhouette-callout .eyebrow { color: var(--sun); margin-bottom: 12px }
.silhouette-callout h2 { font-size: clamp(26px, 3.2vw, 32px); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; color: #fff }
.callout-lead { color: #B8C4CF; max-width: 54ch; margin: 12px 0 20px }
.callout-facts { margin: 14px 0 0; font-family: var(--mono); font-size: 12px; color: #9AA8B6 }
.btn.sun { background: var(--sun); color: #16233A; padding: 12px 20px; font-size: 15px }
.btn.sun:hover { background: #FFD566 }
.callout-art { margin: 0; display: grid; gap: 12px; justify-items: center }
.callout-card { width: 100%; background: #fff; border-radius: 10px; padding: 16px; transform: rotate(-2deg); box-shadow: 0 16px 40px rgba(0, 0, 0, .35) }
.silhouette-callout .test-grid-key { justify-content: center; color: #B8C4CF }
.silhouette-callout :focus-visible { outline-color: var(--sun) }
@media (max-width: 820px) {
  .silhouette-callout { grid-template-columns: minmax(0, 1fr); padding: 24px }
}

/* The test sheet page (/test-sheet): what a test sheet is, how it works,
   kiss and through cuts, and the person's saved materials. */
.test-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-bottom: 24px }
.test-hero-art { margin: 0; display: grid; gap: 12px }
.test-grid-frame { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 18px }
.test-grid-art { display: block; width: 100%; height: auto; border-radius: 4px }
.test-grid-key { margin: 0; display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted) }
.test-grid-key span { display: inline-flex; align-items: center; gap: 6px }
.test-grid-key i { width: 11px; height: 11px; border-radius: 3px; flex: none }
.key-light { border: 1.5px dashed #9AA8B6 }
.key-kiss { background: #D7EFEB; border: 1.5px solid #0F8A7B }
.key-through { background: #FFE3E0; border: 1.5px solid #D23B2B }
.test-steps { padding-bottom: 24px }
.section-head { display: grid; gap: 4px }
.section-head h2 { font-size: 22px }
.section-head p { margin: 0 }
.kinds { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 28px; display: grid; gap: 18px; margin-bottom: 32px }
.kinds-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px }
.kind { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 16px }
.kind svg { display: block; width: 150px; height: auto; color: var(--muted); font-family: Geist, sans-serif }
.kind h3 { font-size: 16px; margin-bottom: 4px }
.kind p { margin: 0; font-size: 14px }
.materials { display: grid; gap: 14px; margin-bottom: 24px; scroll-margin-top: 20px }
.material-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px }
.material { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 10px; align-content: start }
.material h3 { font-size: 16px }
.material dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; font-size: 14px }
.material dt { color: var(--muted) }
.material dd { margin: 0 }
.cut-numbers { font-family: var(--mono); font-size: 13px }
.material-add { border: 1.5px dashed var(--field-line); border-radius: 12px; padding: 18px; display: grid; justify-items: center; align-content: center; gap: 6px; text-align: center; min-height: 140px }
.material-add:hover { border-color: var(--ink) }
.material-add .plus { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center }
.material-add .plus svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round }
.material-add .muted { font-size: 13px }
.test-needs { margin: 0 0 64px; font-size: 13px }
@media (max-width: 560px) {
  .kinds { padding: 18px }
  .kind { grid-template-columns: minmax(0, 1fr) }
  .kind svg { width: 100%; max-width: 240px }
}

/* Browse */
.bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 18px }
.bar h2 { font-size: 22px }
.browse { padding-bottom: 64px }
.page-title { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.03em; font-weight: 800; line-height: 1.1 }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 22px }
.chips a { flex: none; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; font-weight: 500 }
.chips a:hover { border-color: var(--ink) }
.chips a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink) }
/* Browsing designs: the title and the designs/sheets switch on one row,
   then categories in a panel beside the grid. */
.browse-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px }
.browse-layout { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 24px; align-items: start }
.filters { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px }
.filters .chips { flex-direction: column; gap: 2px; overflow: visible; padding: 0; margin: 0 }
.filters .chips a { border: 0; background: none; padding: 7px 10px }
.filters .chips a:hover { background: var(--bg) }
.filters .chips a[aria-current="page"] { background: var(--ink); color: var(--paper) }
.panel-label { font: 600 11px Geist, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; display: flex; justify-content: space-between; gap: 8px }
.panel-label output { letter-spacing: 0; text-transform: none; font-weight: 400 }
/* The selected sticker's name, in the panel's heading: plain text, cut
   short with "…" when long. */
.panel-label #item-name { font: 500 13px Geist, sans-serif; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column }
/* Artwork boxes (.thumb, .canvas, .mini .t) keep their shape whatever the
   picture's: min-height 0 stops a very tall picture from stretching the
   box, and the one grid cell has a definite size, so the picture's
   max-height: 100% (or the SVG's height) scales it down to fit. */
.thumb, .canvas, .mini .t { min-height: 0; grid-template: minmax(0, 1fr) / minmax(0, 1fr) }
.thumb {
  aspect-ratio: 1/.8; display: grid; place-items: center; padding: 18px; background-color: var(--art);
}
.thumb img { max-width: 100%; max-height: 100%; object-fit: contain }
/* Text on the artwork's light well stays dark in either theme. */
.thumb-wait, .canvas .stage-note { color: #566476; font-size: 14px }
.info { padding: 12px 14px 14px }
.info h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em }
.by { color: var(--muted); font-size: 13px }
.by a:hover, .info h3 a:hover { text-decoration: underline }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px }
.badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 8px }
.muted-badge { background: var(--bg); color: var(--muted) }
.yours-badge { background: color-mix(in srgb, var(--teal) 18%, transparent); color: var(--ink); vertical-align: 2px }
.warn-badge { background: var(--danger-bg); color: var(--ink) }
.stats { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 14px; color: var(--muted) }
.star-form { margin: 0 }
.star {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: inherit;
  font: inherit; cursor: pointer; padding: 4px 6px; margin-left: -6px; border-radius: 8px;
}
.star:hover { background: var(--bg) }
.star[aria-pressed="true"] { color: var(--coral); font-weight: 600 }
.star:disabled { cursor: progress }
.free-badge { background: var(--sun); color: #16233A; vertical-align: 2px }
/* A row of tabs: a gray track with the chosen one raised in white. */
.tabs { display: inline-flex; gap: 2px; background: var(--seg); padding: 2px; border-radius: 8px; flex-wrap: wrap }
.tabs a, .tabs button { color: var(--muted); font: 500 13px Geist, sans-serif; padding: 7px 12px; border-radius: 6px; border: 0; background: none; cursor: pointer }
.tabs a:hover, .tabs button:hover { color: var(--ink) }
.tabs a[aria-current="page"], .tabs button[aria-selected="true"], .tabs button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(20,22,28,.16) }
.see-all { text-align: center; margin: 28px 0 0 }
.pager { display: flex; gap: 10px; justify-content: center; margin-top: 28px }
.empty {
  background: var(--paper); border: 1px dashed var(--line); border-radius: 12px;
  padding: 40px 20px; text-align: center; color: var(--muted);
}
.empty p { margin: 0 }
.empty-title { color: var(--ink); font-weight: 600; font-size: 18px; margin-bottom: 4px !important }

/* Panels and forms */
.panel {
  max-width: 460px; margin: 40px auto 64px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px; padding: 28px;
}
.panel h1 { font-size: 26px; letter-spacing: -.02em; margin-bottom: 8px }
.panel > .muted { margin: 0 0 20px }
.providers { display: grid; gap: 10px }
.alert { background: var(--danger-bg); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px }
.dev-login { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--line); display: grid; gap: 8px }
.dev-login h2 { font-size: 18px }
.dev-login p { margin: 0 0 6px; font-size: 14px }
.dev-login label { font-weight: 600; font-size: 14px }
.dev-login input {
  padding: 11px 16px; border: 1px solid var(--field-line); border-radius: 8px;
  background: var(--field); color: var(--ink); font: inherit;
}
.dev-login .btn { margin-top: 6px }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 14px }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line) }
.code-input { font-family: var(--mono); font-size: 22px !important; letter-spacing: .3em }
.hint.code-help { margin-top: 16px }

/* Design page */
.crumb { color: var(--muted); font-size: 14px; margin: 6px 0 18px }
.crumb a:hover { color: var(--ink); text-decoration: underline }
.layout { display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px; align-items: start; padding-bottom: 48px }
.stage { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden }
.canvas {
  aspect-ratio: 1/.9; display: grid; place-items: center; padding: 32px; background-color: var(--art);
}
.preview { max-width: 100%; max-height: 100%; object-fit: contain }
.cut-svg { width: 100%; height: 100%; overflow: visible }
.cut-path {
  fill: none; stroke: #16233A; stroke-width: 1.5; stroke-dasharray: 6 4;
  vector-effect: non-scaling-stroke; stroke-linejoin: round;
}
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500 }
.switch input { width: 18px; height: 18px; accent-color: var(--accent) }
.offset { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 200px; font-size: 14px }
.offset input { flex: 1; accent-color: var(--accent); min-width: 100px }
.shape { display: flex; align-items: center; gap: 8px; font-size: 14px }
.shape select { padding: 5px 8px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--field); color: var(--ink); font: inherit }
.offset output { flex: none; width: 6.5ch; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums }
.tool-row { display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; min-height: 28px }
.tool-note { margin: 0; color: var(--muted); min-height: 1.5em }
.stage-note { color: var(--muted); text-align: center; max-width: 32ch }
/* While a design is processing: its picture, blurred, under a spinner. */
.pending-picture { grid-area: 1 / 1; filter: blur(5px); opacity: .5 }
.pending-busy { grid-area: 1 / 1; display: grid; justify-items: center; gap: 10px; margin: 0; padding: 18px 24px; border-radius: 12px; background: color-mix(in srgb, var(--paper) 82%, transparent); text-align: center; font-weight: 600; color: var(--ink) }
.pending-busy small { font-size: 14px; font-weight: 400; color: var(--muted) }
.tools { display: grid; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px }
.dims { color: var(--muted) }
.design-title { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.08; font-weight: 800; letter-spacing: -.03em }
.maker { display: flex; align-items: center; gap: 10px; margin: 12px 0 18px }
.maker .av { width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; text-transform: uppercase; object-fit: cover }
.maker small { display: block; color: var(--muted); line-height: 1.2 }
.nums { display: flex; gap: 10px; align-items: center; margin-bottom: 18px }
.nums .star {
  padding: 9px 16px; margin: 0; border-radius: 8px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font: 500 15px Geist, sans-serif;
}
.nums .star[aria-pressed="true"] { border-color: var(--coral); color: var(--coral); font-weight: 600 }
.dl { display: flex; align-items: center; gap: 6px; padding: 9px 4px; color: var(--muted) }
.free { justify-self: start; background: var(--sun); color: #16233A; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 8px }
.download { display: grid; gap: 12px }
.fmt { display: flex; gap: 8px }
.fmt label { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-weight: 500; display: flex; gap: 8px; align-items: center }
.fmt input { accent-color: var(--accent) }
.fmt label:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) }
.fmt label.unavailable { color: var(--muted); cursor: not-allowed; border-style: dashed }
.more { padding-bottom: 64px }
.more h2 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 14px }
.strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px }
.mini { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 12px; font-size: 14px }
.mini:hover { border-color: var(--ink) }
.mini .t {
  aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 8px; border-radius: 8px; padding: 12px; background-color: var(--art);
}
.mini .t img { max-width: 100%; max-height: 100%; object-fit: contain }
.mini small { color: var(--muted); font-size: 13px }
.box { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 16px; display: grid; gap: 12px }
.box p { margin: 0 }
.box-title { font-weight: 500 }
.desc { max-width: 60ch; white-space: pre-line }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px }
.tags a { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; font-weight: 500 }
.tags a:hover { border-color: var(--ink) }

/* Forms */
.wide-panel { max-width: 640px }
.form { display: grid; gap: 20px }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0 }
.field > label, .field legend { font-weight: 600; font-size: 15px; padding: 0 }
.optional { font-weight: 400; color: var(--muted); font-size: 14px }
.field input[type="text"], .field input[type="email"], .field input:not([type]), .field textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--field-line); border-radius: 12px;
  background: var(--field); color: var(--ink); font: inherit; resize: vertical;
}
.hint { margin: 0; color: var(--muted); font-size: 14px }
.field-error { margin: 0; color: var(--coral); font-size: 14px; font-weight: 500 }
.field-warning { margin: 0; padding: 10px 12px; border: 1px solid var(--sun); border-radius: 10px; background: color-mix(in srgb, var(--sun) 18%, transparent); font-size: 14px }
/* label.drop, so .field > label's zero padding doesn't win. */
label.drop {
  display: grid; place-items: center; gap: 8px; text-align: center; cursor: pointer;
  min-height: 200px; padding: 24px; border: 2px dashed var(--line); border-radius: 12px;
  background: var(--bg);
}
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--ink) }
.drop-text { font-weight: 600 }
/* Once a file is chosen the drop zone becomes a plain frame for it. It
   still takes clicks and drops, to swap the file. */
.drop.has-file { min-height: 0; padding: 16px; border: 1px solid var(--line); background: var(--bg) }
.drop.has-file .drop-text { font-weight: 500; font-size: 14px; color: var(--muted); overflow-wrap: anywhere }
.drop-change { font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px }
/* The picture is shown as large as fits, and its box is exactly its
   canvas (the upload form sets --ratio, width over height). The dashed
   edge and the checkerboard show where the canvas ends and what is
   transparent, so cropping and background removal are visible. */
.drop-stage { position: relative; display: grid; width: min(100%, calc(var(--preview-max, 440px) * var(--ratio, 1))) }
.drop-preview {
  width: 100%; height: auto;
  outline: 1px dashed #8a97a6; outline-offset: 2px; border-radius: 2px;
  background: repeating-conic-gradient(#d9dfe4 0 25%, #fff 0 50%) 0 0 / 16px 16px;
}
.upload-dialog .drop-stage { --preview-max: 240px }
/* Covers the picture while the server makes the cut-out preview. */
.drop-busy {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px;
  border-radius: 2px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(3px);
  color: var(--ink); font-size: 14px; font-weight: 600; cursor: progress;
}
.spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid color-mix(in srgb, var(--ink) 15%, transparent); border-top-color: var(--ink);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s } }
.upload-file > .btn.small { justify-self: start; padding: 8px 16px; font-size: 15px }
/* The cut-out editor: the picture as large as fits, removed parts tinted
   red, and a round outline of the brush that follows the pointer. */
.export-dialog.cutout-dialog { max-width: 980px; max-height: calc(100vh - 32px); overflow: auto; display: none; flex-direction: column; gap: 14px }
.export-dialog.cutout-dialog[open] { display: flex }
.cutout-dialog h2 { margin: 0 }
.cutout-tools { display: flex; gap: 12px 20px; align-items: center; flex-wrap: wrap }
.cutout-tools .tabs { display: inline-flex }
.cutout-size { display: flex; gap: 10px; align-items: center; font-weight: 500 }
.cutout-size input { accent-color: var(--accent) }
.cutout-stage {
  position: relative; display: grid; justify-items: center; overflow: hidden; border-radius: 10px;
  background: repeating-conic-gradient(#d9dfe4 0 25%, #fff 0 50%) 0 0 / 16px 16px;
}
.cutout-stage canvas { display: block; max-width: 100%; max-height: calc(100vh - 330px); touch-action: none; cursor: none }
.cutout-cursor {
  position: absolute; pointer-events: none; translate: -50% -50%; border-radius: 50%;
  border: 1px solid #fff; box-shadow: 0 0 0 1.5px #16233A, inset 0 0 0 1.5px #16233A;
}
.cutout-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }
.cutout-gap { flex: 1 }
.upload-details { display: grid; gap: 20px }
/* The upload page puts the picture beside the details when there's room. */
.upload-panel { max-width: 1080px }
.upload-form > .btn { justify-self: start }
@media (min-width: 900px) {
  .upload-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 36px; align-items: start }
  .upload-form .upload-file { position: sticky; top: 16px }
  .upload-form .upload-file .drop { min-height: 360px }
  .upload-form .upload-file .drop.has-file { min-height: 0 }
  .upload-form .upload-details, .upload-form > .btn { grid-column: 2 }
}
.check-chips { display: flex; gap: 8px; flex-wrap: wrap }
.check-chips label { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500 }
.check-chips label:has(input:checked) { border-color: var(--ink); background: var(--bg) }
.check-chips input, .radios input { accent-color: var(--accent) }
.radios { display: grid; gap: 8px }
.radios label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer }
.radios label:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) }
.radios small { display: block; color: var(--muted) }
.form > .btn { justify-self: start }

/* Profile */
.profile-head { display: flex; align-items: center; gap: 16px; padding: 24px 0 28px; flex-wrap: wrap }
.profile-head .avatar { width: 72px; height: 72px; font-size: 28px }
.profile-head p { margin: 4px 0 0 }
.profile-action { margin-left: auto }
.profile-bio { margin: 6px 0 0; max-width: 60ch }
/* A maker's links to their shop and social accounts. */
.maker-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 0 }
.maker-links a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 14px; font-weight: 500 }
.maker-links a:hover { border-color: var(--ink) }
.maker-links a::after { content: " ↗"; color: var(--muted) }

/* Sheet builder (design/sticker-sheet-builder.html) */
/* The builder fills the window under the site header: a top bar, then a
   tool rail, the sheet, and the settings. */
body:has(.builder) .wrap { max-width: none; padding: 0 }
body:has(.builder) main { padding-top: 0; display: flex }
body:has(.builder) .site-footer { display: none }
body:has(.builder) .site-header-in { max-width: none; padding-inline: 16px }
.builder .hint { font-size: 13px }
.builder { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--paper) }
/* One row: the name gives up width so the save status and Download
   button always fit beside it. */
.builder-top { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line) }
.builder-top select { flex: 0 1 auto; min-width: 0 }
.builder-top #sheet-visibility { flex: none }
.builder select, .builder input[type="text"], .sheet-name {
  padding: 8px 12px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit;
}
.sheet-name { flex: 1 1 140px; min-width: 110px; max-width: 260px; font-weight: 600 }
.top-actions { margin-left: auto; flex: none; display: flex; align-items: center; gap: 12px }
.save-status { min-width: 8.5em; text-align: right; white-space: nowrap; font-size: 14px; color: var(--muted) }
/* minmax(0, …) lets the stage be narrower than its widest content (the
   one-line status), which would otherwise push the page wider than a
   phone's screen. */
.builder-app { flex: 1; display: grid; grid-template-columns: 76px minmax(0, 1fr) 300px; min-height: 560px; position: relative }
.builder-right { overflow: auto; border-left: 1px solid var(--line); font-size: 14px }
/* Sheet and Arrange open these beside the tool rail, over the stage. The
   builder sets top to line each up with its button. */
.flyout { position: absolute; left: 84px; top: 8px; z-index: 20; width: 280px; max-height: calc(100% - 16px); overflow: auto; overscroll-behavior: contain; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(22, 35, 58, .16); font-size: 14px }
.flyout[hidden] { display: none }
.tool[aria-expanded="true"] { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line) }
.align-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px }
.align-row .btn { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; font-size: 13px }
.align-row .btn:disabled { opacity: .4; cursor: default }
.size-fields #sheet-apply { grid-column: 1 / -1 }
/* The question asked before the sheet changes size. */
.resize-dialog { max-width: 460px }
.resize-dialog h2 { margin: 0 0 4px }
.resize-options { display: grid; gap: 8px; margin: 14px 0 }
.resize-option { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer }
.resize-option:hover, .resize-option:focus-visible { border-color: var(--ink) }
.resize-option span { color: var(--muted); font-size: 13px }
.align-row svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round }
.panel-section { padding: 14px 16px; border-bottom: 1px solid var(--line) }
.panel-section:last-child { border-bottom: 0 }
.panel-sub { font: 600 11px Geist, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; padding-top: 14px; border-top: 1px solid var(--line) }
.pair-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px }
.builder .field { margin-bottom: 14px; display: grid; gap: 6px }
.builder .field label, .field-label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 500; font-size: 14px }
.builder .field output { color: var(--ink); font-weight: 400 }
.builder .field input[type="range"] { width: 100%; accent-color: var(--accent) }
.builder .field select, .builder .field input[type="text"] { width: 100% }
/* The sheet is as large as fits the stage (the builder sets
   --sheet-ratio, width over height, rulers included). */
.stage-sheet { position: relative; display: flex; flex-direction: column; align-items: center; width: min(640px, 100%, calc((100vh - 230px) * var(--sheet-ratio, .73))) }
.stage-sheet .sheet-svg { max-height: none; max-width: none }
/* The status sits in the stage's bottom-left corner, on one line. */
.fit-slot { position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px) }
.fit-slot .fit-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.tool-rail { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0; border-right: 1px solid var(--line) }
.tool {
  width: 62px; padding: 9px 2px 7px; border: 0; border-radius: 10px; background: none; color: var(--ink); cursor: pointer;
  display: grid; justify-items: center; gap: 4px; font: 500 11px Geist, sans-serif;
}
.tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.tool:hover { background: var(--bg) }
.tool.pri { background: var(--ink); color: var(--paper) }
.tool.pri:hover { background: var(--accent); color: #fff }
.tool:disabled { opacity: .35; cursor: default; background: none }
.tool-gap { width: 36px; height: 1px; background: var(--line); margin: 6px 0 }
.builder-stage, .sheet-view {
  background-color: var(--bg); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 28px 28px;
  display: flex; flex-direction: column; align-items: center; padding: 18px; gap: 12px;
}
.builder-stage { position: relative; padding-bottom: 56px; min-width: 0 }
/* Centered in the stage, but never pushed off its top when the stage is
   shorter than the sheet. */
.stage-sheet { margin-block: auto }
/* For the owner, the drawing fills the stage: the sheet in the middle, the
   rest pasteboard where stickers can be parked. */
.builder .stage-sheet { align-self: stretch; width: auto; flex: 1; min-height: 420px; margin: 0 }
.builder .stage-sheet .sheet-svg { width: 100%; height: 100%; max-width: none; max-height: none; overflow: hidden }
.sheet-item.parked { opacity: .55 }
.sheet-item.parked.selected { opacity: .8 }
/* On a wide screen the builder is exactly the window's height: the
   settings panel and the stage scroll inside it. Otherwise choosing a
   sticker, which makes the panel taller, would make the page taller and
   move the sheet. */
@media (min-width: 821px) {
  body:has(.builder) { height: 100dvh; overflow: hidden }
  body:has(.builder) .wrap, body:has(.builder) main, .builder, .builder-app { min-height: 0 }
  .builder-stage, .builder-right { overflow: auto }
}
/* Rulers along the top and left of the sheet, in millimeters. */
.ruler { pointer-events: none }
.ruler line { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .7 }
.ruler text { font: 3px var(--mono); fill: var(--muted) }
.sheet-view { border-radius: 12px; margin-bottom: 48px; align-items: stretch }
.sheet-view .sheet-svg, .sheet-view .fit-status { align-self: center }
/* The page behind the sheet is --bg, so the notice needs its own paper. */
.sheet-view .view-only { margin: 0; background: var(--paper); border: 1px solid var(--line) }
.fit-status {
  margin: 0; font-weight: 500; padding: 6px 10px; border-radius: 7px;
  background: var(--paper); border: 1px solid var(--line); color: var(--teal); text-align: center;
}
.fit-status.bad { color: var(--coral); border-color: var(--coral) }
.sheet-svg { width: 100%; max-width: 600px; height: auto; max-height: 78vh; overflow: visible }
.sheet-area { fill: #fff; stroke: #D5D9E0; stroke-width: 1; vector-effect: non-scaling-stroke; filter: drop-shadow(0 6px 14px rgba(20, 22, 28, .12)) }
.sheet-svg { touch-action: none; user-select: none }
.sheet-view .sheet-svg { touch-action: auto }
.builder .sheet-item { cursor: grab }
.builder .sheet-item:active { cursor: grabbing }
.sheet-item .sheet-selection { display: none }
.sheet-item.selected .sheet-selection { display: inline }
.sheet-item.problem .sheet-cut { stroke: var(--coral); stroke-width: 2.5; stroke-dasharray: none }
.drop ~ .check { margin-top: 4px }
.field .check, .builder .field .check { display: flex; justify-content: flex-start; gap: 8px; align-items: center; font-size: 14px; font-weight: 400; cursor: pointer }
.field .check input { accent-color: var(--accent) }
.field .check:has(input:disabled) { color: var(--muted); cursor: default }
.sheet-cut { fill: none; stroke: #16233A; stroke-width: 1.5; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke }
/* A PNG or JPEG enlarged past its pixels: a small flag on its corner. */
.enlarged-flag circle { fill: var(--sun); stroke: #16233A; stroke-width: 1; vector-effect: non-scaling-stroke }
.enlarged-flag.blurry circle { fill: var(--accent) }
.enlarged-flag text { fill: #16233A; font-family: var(--display); font-weight: 700 }
.enlarged-flag.blurry text { fill: #fff }
.sheet-selection { fill: none; stroke: #FF5A4F; stroke-width: 2.5; vector-effect: non-scaling-stroke }
.item-hidden { fill: #e6ebe9; stroke: #aab5bf; vector-effect: non-scaling-stroke }
.tray { width: 100%; max-width: 560px; background: var(--paper); border: 1px solid var(--coral); border-radius: 12px; padding: 12px }
.tray h3 { font-size: 15px; margin-bottom: 8px }
.tray-item { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--ink); font: inherit; padding: 6px 8px; border-radius: 8px; cursor: pointer }
.tray-item:hover, .tray-item.selected { background: var(--bg) }
.swatches { display: flex; gap: 6px; flex-wrap: wrap }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--swatch); cursor: pointer; padding: 0 }
.swatch[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px }
.swatch-custom { background: conic-gradient(#ff5a4f, #ffc83d, #12a594, #4db6ff, #7a5cfa, #ff5a4f); -webkit-appearance: none; appearance: none }
.swatch-custom::-webkit-color-swatch-wrapper { padding: 0 }
.swatch-custom::-webkit-color-swatch { border: 0; opacity: 0 }
.swatch-custom::-moz-color-swatch { border: 0; opacity: 0 }
.outline-fields { display: grid; gap: 8px; margin-top: 4px }
.add-to-sheet { display: grid; gap: 8px }
.add-to-sheet select { padding: 10px 12px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit }

.export-dialog {
  max-width: 560px; width: calc(100% - 32px); border: 1px solid var(--line); border-radius: 12px;
  padding: 24px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 64px rgba(20,22,28,.22);
}
.picker-dialog { max-width: 760px; max-height: calc(100vh - 32px); display: none; flex-direction: column; gap: 14px }
.picker-dialog[open] { display: flex }
/* Only the grid gives up height when the dialog is short. */
.picker-dialog > :not(.picker-grid) { flex-shrink: 0 }
.picker-dialog h2 { margin: 0 }
.picker-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap }
.picker-bar input { flex: 1; min-width: 160px; padding: 9px 14px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--field); color: var(--ink); font: inherit }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; overflow: auto; min-height: 180px; max-height: 52vh; padding: 2px; align-content: start }
.picker-grid .hint { grid-column: 1 / -1; align-self: center; text-align: center }
.picker-card { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); cursor: pointer; padding: 8px; display: grid; gap: 6px; font: 500 13px Geist, sans-serif; text-align: center }
.picker-card:hover, .picker-card:focus-visible { border-color: var(--ink) }
.picker-card img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 6px; background: var(--art) }
.picker-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
/* A flag that pops up where something was added, then floats away. */
.poof {
  position: absolute; z-index: 1; pointer-events: none; white-space: nowrap; translate: -50% -50%;
  padding: 6px 14px; border-radius: 8px; background: var(--sun); color: #16233A; border: 0;
  font: 600 13px Geist, sans-serif; box-shadow: 0 6px 16px rgba(20,22,28,.2); animation: poof-fade 1.1s ease-out both;
}
@keyframes poof-fade { 0% { opacity: 0 } 15%, 70% { opacity: 1 } 100% { opacity: 0 } }
@media (prefers-reduced-motion: no-preference) {
  .poof { animation: poof 1.1s cubic-bezier(.2, .9, .3, 1) both }
  @keyframes poof {
    0% { opacity: 0; transform: translateY(10px) scale(.4) rotate(-10deg) }
    18% { opacity: 1; transform: translateY(-6px) scale(1.12) rotate(-4deg) }
    32% { transform: translateY(-10px) scale(1) rotate(-3deg) }
    70% { opacity: 1; transform: translateY(-26px) scale(1) rotate(-3deg) }
    100% { opacity: 0; transform: translateY(-48px) scale(.9) rotate(-1deg) }
  }
}
.upload-dialog { max-width: 620px; max-height: calc(100vh - 32px); overflow: auto }
.upload-dialog .drop { min-height: 150px }
.upload-status { margin: 0; min-height: 1.5em; color: var(--muted) }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end }
.export-dialog::backdrop { background: rgba(17, 26, 34, .45) }
.export-dialog h2 { font-size: 20px; margin-bottom: 8px }
.export-dialog h3 { font-size: 17px; margin: 16px 0 6px }
.export-dialog ol { padding-left: 20px; margin: 0; display: grid; gap: 6px }
.export-status { margin: 0 }
.export-dialog .tabs { margin-top: 10px }
.sheet-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }
/* A small yellow label beside a heading, such as "Recommended". */
.pill { font: 600 12px Geist, sans-serif; letter-spacing: 0; background: var(--sun); color: #16233A; border-radius: 8px; padding: 2px 8px }
.icon-btn { width: 34px; height: 34px; flex: none; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); display: grid; place-items: center; cursor: pointer; padding: 0 }
.icon-btn:hover { color: var(--ink); border-color: var(--ink) }
.icon-btn svg, .btn-arrow { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.test-grid-icon, .mat-art { display: block; flex: none }

/* The print and cut dialog: for Silhouette, cutting from this site first
   and Silhouette Studio folded away; for Cricut, one PNG and three steps. */
.print-dialog { display: none; flex-direction: column; gap: 16px; max-height: calc(100vh - 32px); overflow: auto }
.print-dialog[open] { display: flex }
.print-ready { display: grid; gap: 16px }
.print-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px }
.export-dialog .print-head h2 { margin: 0 }
.export-dialog .print-head form[method="dialog"] { margin: 0 }
.print-summary { margin: 4px 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted) }
.export-status:empty { display: none }
.print-cutter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 600; font-size: 14px }
.export-dialog .print-cutter .tabs { margin: 0 }
.export-dialog.print-dialog h3 { margin: 0; font-size: 17px }
.print-dialog .export-steps { display: grid; gap: 16px }
.print-direct { display: grid; grid-template-columns: 156px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden }
.print-direct-art { background: #9FB3C4; display: grid; place-items: center }
.print-direct-text { padding: 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start }
.export-dialog .print-direct-text h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.print-facts { margin: auto 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted) }
.test-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--bg) }
.test-strip p { margin: 0 }
.test-strip .hint { font-size: 13px }
.test-strip-title { font-weight: 600; font-size: 14px }
.print-studio { border-top: 1px solid var(--line); padding-top: 14px }
.print-studio summary { cursor: pointer; font-weight: 500; font-size: 14px }
.print-studio-body { display: grid; gap: 12px; margin-top: 12px }
.print-studio-body .export-links { margin: 0 }
.print-studio-body ol { font-size: 14px }
.print-studio-body .hint { font-size: 13px }
.print-download { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px }
.print-download > div { flex: 1 1 220px; min-width: 0 }
.export-dialog.print-dialog h3.print-then { font-size: 15px }
.export-dialog .print-num { list-style: none; padding: 0; counter-reset: step; gap: 14px; font-size: 14px }
.print-num li { counter-increment: step; position: relative; min-height: 24px; padding: 2px 0 0 36px }
.print-num li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font: 600 13px Geist, sans-serif; background: var(--bg); color: var(--muted);
}
.print-num .hint { display: block; margin-top: 6px; font-size: 13px }
.copy-row { display: inline-flex; align-items: center; gap: 4px 10px; flex-wrap: wrap }
.copy-value { display: inline-flex; align-items: center; border: 1px solid var(--field-line); border-radius: 8px; overflow: hidden }
.copy-value > span { font: 500 14px var(--mono); padding: 4px 10px }
.copy-btn { border: 0; border-left: 1px solid var(--field-line); background: var(--bg); color: var(--ink); font: 600 13px Geist, sans-serif; padding: 5px 10px; cursor: pointer }
.copy-btn:hover { background: var(--seg) }
.print-cross { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--bg); font-size: 14px }
.print-cross .link-btn { font-weight: 500 }
.print-fits { margin: 0; border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); font-size: 13px }
@media (max-width: 560px) {
  .print-direct { grid-template-columns: minmax(0, 1fr) }
  .print-direct-art { display: none }
  .test-strip { grid-template-columns: auto minmax(0, 1fr) }
  .test-strip .btn { grid-column: 1 / -1; justify-self: start }
}
/* The cutting page: the printed page on the left, the steps on the right,
   filling the window. */
body:has(.cutpage) .wrap { max-width: none; padding: 0 }
body:has(.cutpage) main { padding-top: 0; display: flex }
body:has(.cutpage) .site-footer { display: none }
body:has(.cutpage) .site-header-in { max-width: none; padding-inline: 16px }
/* Laid out like the builder: a top bar, then the page being printed with
   the steps beside it, filling the window. */
.cutpage { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--paper) }
.cut-top { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap }
.cut-top h1 { font-size: 18px; margin: 0 }
.cut-back { font-weight: 500; font-size: 14px; padding: 7px 12px; border-radius: 8px; background: var(--paper); border: 1px solid var(--field-line); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.cut-back:hover { border-color: var(--ink) }
.cut-device { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; padding: 7px 12px; border-radius: 8px; background: var(--bg); color: var(--muted) }
.cut-device i { width: 9px; height: 9px; border-radius: 50%; background: var(--line) }
.cut-device.on { color: var(--ink) }
.cut-device.on i { background: var(--teal) }
.cut-body { flex: 1; min-height: 480px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: minmax(0, 1fr) }
.cut-stage {
  position: relative; background-color: var(--bg); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 28px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 18px 56px; min-width: 0; min-height: 0;
}
.cut-preview { flex: 1; width: 100%; min-height: 0; overflow: visible }
.cut-paper { fill: #fff; filter: drop-shadow(0 1px 2px rgba(22, 35, 58, .25)) }
.cut-sheet-edge { fill: transparent; stroke: #9aa3b2; stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke }
/* The print-and-cut page's layout: sheets on the page, the marks' clear
   corners, and the mat behind the page. */
/* The status and the mat switch sit in the stage's bottom-left corner,
   where the builder's status is. */
.cut-stage-top { position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px); display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.cut-stage > .fit-status { position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px) }
.cut-stage-top .switch { background: var(--paper); border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px; font-size: 13px }
/* On a wide screen the page is exactly the window's height and the steps
   scroll inside it, as in the builder. */
@media (min-width: 821px) {
  body:has(.cutpage) { height: 100dvh; overflow: hidden }
  body:has(.cutpage) .wrap, body:has(.cutpage) main, .cutpage, .cut-body { min-height: 0 }
}
.cut-corner { fill: rgba(255, 90, 79, .08) }
.lay-sheet { cursor: grab; touch-action: none }
.lay-sheet.selected .cut-sheet-edge { stroke: var(--sky); stroke-width: 2; stroke-dasharray: none }
.lay-sheet.problem .cut-sheet-edge { stroke: var(--coral); stroke-width: 2; stroke-dasharray: none }
.lay-wait { font: 600 6px Geist, sans-serif; fill: #6b7383 }
.cut-mat { fill: #9fb3c4 }
.cut-mat-edge { fill: none; stroke: #5d7286; stroke-width: 1; vector-effect: non-scaling-stroke }
.cut-mat-grid { stroke: #7e94a8; stroke-width: 1; vector-effect: non-scaling-stroke }
.lay-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px }
.lay-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px }
.lay-row.selected { border-color: var(--sky) }
.lay-row.problem { border-color: var(--coral) }
.lay-row .btn { padding: 4px 10px; font-size: 13px }
.cut-panel .lay-row .lay-rotate { width: auto; padding: 4px 6px; font-size: 13px }
.lay-text { min-width: 0; flex: 1 1 10em }
.lay-tools { display: flex; gap: 6px; align-items: center; margin-left: auto }
.lay-scale { display: flex; gap: 2px; align-items: center; font-size: 13px }
.cut-panel .lay-scale input[type="number"] { width: 4.5em; padding: 4px 6px; font-size: 13px }
.lay-row .hint { display: block; font-size: 13px }
.lay-row .lay-enlarged { margin-top: 4px; padding: 2px 6px; border-radius: 6px; background: var(--warn-bg); color: var(--ink) }
.lay-row .lay-enlarged.blurry { background: var(--danger-bg) }
.lay-name { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.cut-line { fill: none; stroke: var(--coral); stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke }
.cut-line.sent { stroke: var(--teal); stroke-dasharray: none }
.cut-panel { border-left: 1px solid var(--line); padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto }
.cut-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px }
.cut-step { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line) }
.cut-step h2 { font-size: 17px; display: flex; align-items: center; gap: 10px }
.cut-step .num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 13px Geist, sans-serif; background: var(--bg); color: var(--muted) }
.cut-step.done .num { background: var(--teal); color: #fff }
.cut-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.cut-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 12px; align-items: center }
.cut-fields label, .cut-dials label { font-size: 14px; font-weight: 500 }
.cut-dials { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px }
.cut-dials label { display: grid; gap: 4px }
.cut-panel select, .cut-panel input[type="number"] { padding: 8px 10px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; min-width: 0; width: 100% }
.cut-row select { width: auto; flex: 1 }
.cut-more summary, .cut-log-box summary { cursor: pointer; font-weight: 500; font-size: 14px }
/* The offer of a test sheet, at the top of the cutting steps for people
   with no saved materials, and the note on whether a preset is tested. */
.test-nudge { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid var(--sun); border-radius: 12px; background: color-mix(in srgb, var(--sun) 14%, var(--paper)) }
.test-nudge p { margin: 0; font-size: 13px }
.test-nudge .test-strip-title { font-size: 14px; margin-bottom: 2px }
.test-nudge-actions { display: flex; gap: 12px; align-items: center; margin-top: 10px }
.test-nudge-actions .btn { padding: 7px 12px; font-size: 13px }
.test-nudge-actions .link-btn { font-size: 13px; color: var(--muted) }
.preset-note { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px }
.pill.untested { background: var(--warn-bg); color: var(--ink) }
.pill.tested { background: color-mix(in srgb, var(--teal) 20%, var(--paper)); color: var(--ink) }
.cut-more .cut-dials { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 8px 0 }
.cut-go { display: grid; gap: 8px; position: sticky; bottom: -16px; margin-top: auto; padding: 10px 0 16px; background: var(--paper) }
.cut-go .btn { padding-top: 14px; padding-bottom: 14px; font-size: 17px }
.cut-progress { height: 6px; border-radius: 8px; background: var(--bg); overflow: hidden }
.cut-progress div { height: 100%; width: 0; background: var(--teal); transition: width .3s }
.cut-log-box .btn { margin: 8px 0 }
.cut-log-box .lab-log { max-height: 220px }
/* The test cut page: the range of settings, then a grid of squares to
   pick the one that worked, and the person's saved materials. */
.tc-range { display: grid; grid-template-columns: max-content repeat(3, minmax(0, 1fr)); gap: 8px 10px; align-items: end }
.tc-range > span { font-size: 14px; font-weight: 600; padding-bottom: 10px }
.tc-range label { display: grid; gap: 4px; font-size: 13px; color: var(--muted) }
.tc-dials { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.hint.bad { color: var(--coral) }
.hint.resolution { margin-top: 6px }
.hint.resolution.warn, .hint.resolution.bad { color: var(--ink); background: var(--warn-bg); padding: 6px 8px; border-radius: 6px }
.hint.resolution.bad { background: var(--danger-bg) }
/* The builder's sheet size: width, height and a button to turn it. */
.size-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: end; margin-top: 8px }
.size-fields #sheet-turn { grid-column: 1 / -1 }
.flyout .switch { margin: 4px 0 8px }
.builder .field .size-fields label { display: grid; justify-content: stretch; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500 }
.size-fields input { padding: 8px 10px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; min-width: 0; width: 100% }
.tc-half { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; opacity: .6 }
.cut-go:has(+ .tc-results) { position: static; margin-top: 0 }
.tc-results { border-bottom: 0; padding-bottom: 0 }
.tc-cells { display: grid; grid-template-columns: max-content repeat(var(--cols, 4), minmax(0, 36px)); gap: 6px; align-items: center }
.tc-head { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center }
.tc-pass { grid-column: 1 / -1; font-size: 14px; font-weight: 600; margin-top: 10px }
.tc-pass:first-child { margin-top: 0 }
.tc-cell { aspect-ratio: 1; border-radius: 7px; border: 1px solid var(--field-line); background: var(--field); cursor: pointer; padding: 0 }
.tc-cell:hover { border-color: var(--ink) }
.tc-cell[aria-pressed="true"] { background: var(--teal); border-color: var(--teal) }
.tc-results .cut-fields input { padding: 8px 10px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; min-width: 0; width: 100% }
.tc-cut-kind { display: flex; gap: 18px; font-size: 14px; font-weight: 500 }
.tc-cut-kind label { display: inline-flex; gap: 6px; align-items: center }
.tc-results .btn { justify-self: start }
.tc-saved { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px }
.tc-saved h2 { font-size: 17px }
.tc-saved-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px }
.tc-saved-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between }
.tc-delete { padding: 4px 10px; font-size: 13px; flex: none }
@media (max-width: 820px) {
  .cut-body { grid-template-columns: 1fr; grid-template-rows: auto; height: auto }
  /* Stacked, the status goes under the page instead of over its corner. */
  .cut-stage { padding-bottom: 18px }
  .cut-stage-top, .cut-stage > .fit-status { position: static; align-self: flex-start; max-width: 100% }
  .cut-go { position: static }
  .cut-panel { border-left: 0; border-top: 1px solid var(--line) }
  .cut-preview { flex: none; height: 60vh }
}
/* A sheet printed for cutting prints alone, at exact size, with no margins. */
.print-sheet { display: none }
@page cutsheet-letter { size: 8.5in 11in; margin: 0 }
@page cutsheet-a4 { size: 210mm 297mm; margin: 0 }
@page cutsheet-letter-landscape { size: 11in 8.5in; margin: 0 }
@page cutsheet-a4-landscape { size: 297mm 210mm; margin: 0 }
@media print {
  body:has(.print-sheet) { background: none }
  body:has(.print-sheet) .wrap { display: block; max-width: none; padding: 0; min-height: 0 }
  body:has(.print-sheet) .site-header, body:has(.print-sheet) .site-footer, body:has(.print-sheet) main > :not(.print-sheet) { display: none }
  .print-sheet { display: block; margin: 0; overflow: hidden }
  .print-sheet.letter { page: cutsheet-letter; width: 215.9mm; height: 279.4mm }
  .print-sheet.a4 { page: cutsheet-a4; width: 210mm; height: 297mm }
  .print-sheet.letter.landscape { page: cutsheet-letter-landscape; width: 279.4mm; height: 215.9mm }
  .print-sheet.a4.landscape { page: cutsheet-a4-landscape; width: 297mm; height: 210mm }
  .print-sheet svg { display: block; width: 100%; height: 100% }
}
.export-links { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px }
.export-dialog form[method="dialog"] { margin-top: 18px; text-align: right }

/* Sheet lists */
.sheet-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px }
.sheet-card { display: grid; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px; font-size: 14px }
.sheet-card strong { font-size: 17px; font-weight: 600 }
.sheet-card:hover { border-color: var(--ink) }
/* Browsing public sheets: a switch between designs and sheets, a search
   of sheet names, and tiles that draw each sheet. */
.kind-tabs { width: max-content; margin-bottom: 14px }
.bar-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap }
.sheet-search { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; max-width: 460px }
.sheet-search button { white-space: nowrap }
.sheet-search input { flex: 1 1 200px; min-width: 0; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit }
.sheet-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px }
.sheet-tile { display: grid; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 14px }
.sheet-tile:hover { border-color: var(--ink) }
.sheet-tile strong { font-size: 16px; font-weight: 600; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.sheet-thumb { width: 100%; height: auto; border-radius: 6px; background: var(--bg) }
.sheet-thumb-paper { fill: #fff; stroke: #c7d0d8; stroke-width: 1 }
.profile-sheets { margin-bottom: 32px }
.section-title { font-size: 22px; letter-spacing: -.02em; margin: 24px 0 14px }
.notice { background: var(--bg); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px }
.plain-list { padding-left: 18px }
.sign-in-methods { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px }
.sign-in-methods li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; min-width: 0;
}
.sign-in-methods li > span { overflow-wrap: anywhere }
.share-steps { padding-left: 22px; margin: 0 0 8px; display: grid; gap: 8px }
.share-steps ul { padding-left: 18px; margin: 6px 0 0; display: grid; gap: 4px }
.share-page code { font-family: var(--mono); font-size: .9em; background: var(--bg); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere }
.share-key p { margin: 0 0 8px }
.share-key-row { display: flex; gap: 8px }
.share-key-row input {
  flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--field-line); border-radius: 8px;
  background: var(--field); color: var(--ink); font: 13px var(--mono);
}
.btn.small { padding: 6px 14px; font-size: 14px }
.subsection-title { font-size: 17px; margin: 20px 0 6px }
.link-methods { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 20px }
.form select { padding: 11px 14px; border: 1px solid var(--field-line); border-radius: 12px; background: var(--field); color: var(--ink); font: inherit }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line); padding: 22px 0 32px; margin-top: 24px; color: var(--muted); font-size: 14px;
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between;
}

@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 24px; gap: 28px }
  .browse-layout { grid-template-columns: minmax(0, 1fr) }
  .filters { padding: 8px }
  .filters .panel-label { display: none }
  .filters .chips { flex-direction: row; overflow-x: auto; scrollbar-width: none }
  .browse-head { align-items: center; margin-bottom: 16px }
  .layout { grid-template-columns: 1fr }
  .site-header-in { flex-wrap: wrap }
  .search { order: 3; flex-basis: 100%; max-width: none }
  /* The header becomes three rows: the logo and the account, the search,
     then the links spread across the width. The nav's children are laid
     out as the header's own. */
  .site-header nav { display: contents }
  .site-header .menu, .site-header nav > .btn { margin-left: auto }
  .site-header nav > .nav-link { order: 4; flex: 1; text-align: center; margin-top: -6px }
  .builder-app { grid-template-columns: minmax(0, 1fr) }
  .builder-right { border: 0; border-top: 1px solid var(--line) }
  /* The rail runs across the top, so the panels open under it, full width. */
  .flyout { left: 8px; right: 8px; width: auto; max-height: 70vh }
  .tool-rail { flex-direction: row; justify-content: center; flex-wrap: wrap; padding: 6px; border-right: 0; border-bottom: 1px solid var(--line) }
  .tool-gap { width: 1px; height: 28px; margin: 0 6px }
  .stage-sheet { width: min(640px, 100%) }
  .builder .stage-sheet { width: auto; height: 75vh; flex: none }
}
/* On a phone the top bar is two rows: the sheet's settings, then the save
   status and the Download button across the full width. */
@media (max-width: 640px) {
  .builder-top { flex-wrap: wrap }
  .sheet-name { max-width: none }
  .top-actions { flex: 1 1 100%; justify-content: space-between }
  .save-status { text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis }
  .top-actions .btn { white-space: nowrap }
}
/* The smallest phones: tighter builder so its buttons stay on one line. */
@media (max-width: 400px) {
  .builder-stage { padding: 12px 12px 52px }
  .tool { width: 54px }
}
/* Phones: two design cards a row instead of one tall one, a smaller hero
   sheet that fits a 320 px screen, and less padding around forms. */
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
  .thumb { padding: 12px }
  .info { padding: 10px 12px 12px }
  .info h3 { font-size: 15px }
  .panel { padding: 20px; margin: 16px auto 40px }
  .tabs a, .tabs button { padding: 8px 12px; font-size: 14px }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px }
  .export-dialog { padding: 18px }
  .picker-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px }
}
/* Touch screens: room for a fingertip on small controls. */
@media (pointer: coarse) {
  input[type="range"] { height: 32px }
  label.check, .switch { min-height: 32px }
  .by a, .crumb a, .maker a, a.text-link, .site-footer .link-btn, .site-footer a { display: inline-block; padding: 6px 0 }
}

/* Cutter test page (an experiment, development only) */
.panel.lab { max-width: 760px }
.lab h2 { font-size: 20px; margin: 28px 0 6px }
.lab-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 }
.lab-form { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 20px; margin: 14px 0 }
.lab-form input, .lab-form select { padding: 10px 12px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit }
.lab-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 8px 0 }
.lab-facts dt { font-weight: 600 }
.lab-facts dd { margin: 0 }
.lab-steps { margin: 8px 0; padding-left: 22px; display: grid; gap: 6px }
.lab-log { background: var(--bg); border-radius: 10px; padding: 12px 14px; min-height: 120px; max-height: 420px; overflow: auto; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-all }

/* Admin pages */
/* Shown on every page while an admin views the site as someone else. The
   yellow stays in both themes so it can't be missed. */
.view-as-bar {
  position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px 16px; padding: 8px 20px; background: var(--sun); color: #16233A; font-size: 14px; text-align: center;
}
.view-as-bar form { margin: 0 }
.view-as-bar .btn { background: #16233A; color: #fff }
.admin-nav { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto }
.admin-nav a { flex: none; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; font-weight: 500 }
.admin-nav a:hover { border-color: var(--ink) }
.admin-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink) }
.admin > .page-title { margin-bottom: 16px }
.admin > .hint { margin: 8px 0 0 }
.admin > .notice { background: var(--paper); border: 1px solid var(--line) }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px }
.admin-stat {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 13px;
}
.admin-stat-warn { background: var(--warn-bg) }
.admin-stat-label, .admin-table th { font: 600 11px Geist, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) }
.admin-stat-n { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2 }
.admin-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-top: 12px }
.admin-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-top: 12px; min-width: 0 }
.admin-columns .admin-card { margin-top: 0 }
.admin-card-title { font-size: 17px; margin-bottom: 10px }
.admin-card > .muted { margin: 0 0 12px; font-size: 14px }
.admin-pairs, .admin-log { list-style: none; margin: 0; padding: 0 }
.admin-pairs li, .admin-log li { display: flex; justify-content: space-between; gap: 4px 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px }
.admin-log li { flex-wrap: wrap }
.admin-pairs li:last-child, .admin-log li:last-child { border-bottom: 0 }
.admin-pairs li > span { overflow-wrap: anywhere }
.table-scroll { overflow-x: auto }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px }
.admin-table th { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); white-space: nowrap }
.admin-table td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top }
.admin-table .num { text-align: right }
.admin-table td.num, .admin-pairs .num { font-family: var(--mono); font-size: 13px; white-space: nowrap }
.admin-table time, .admin-log time { white-space: nowrap }
.admin-person { display: flex; align-items: center; gap: 10px; min-width: 180px }
.admin-person .avatar { width: 28px; height: 28px; flex: none; font-size: 13px }
.admin-person:hover strong { text-decoration: underline }
.admin-person-head { padding-top: 0 }
.admin-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px }
.admin-search input {
  flex: 1 1 200px; max-width: 360px; padding: 8px 12px; border: 1px solid var(--field-line); border-radius: 8px;
  background: var(--field); color: var(--ink); font: inherit; font-size: 14px;
}
.signup-chart { display: block; width: 100%; height: auto; margin: 4px 0 0 }
.chart-axis { display: flex; justify-content: space-between; margin: 4px 0 8px; font-family: var(--mono); font-size: 12px }
.chart-bar { fill: var(--teal) }
.chart-hit { fill: transparent }
.chart-slot:hover .chart-bar { fill: var(--ink) }
.chart-base { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke }
.chart-table summary, .admin-setup summary { cursor: pointer; font-size: 14px; color: var(--muted) }
.chart-table .admin-table { margin-top: 8px; max-width: 260px }
.admin-setup { margin-top: 22px }
.passkey-setup { margin-top: 14px }
.admin code, .admin-confirm code { font-family: var(--mono); font-size: .9em; background: var(--bg); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere }
