/* A pattern on screen, wherever it is shown (the workspace, the Library, a share link): the export window,
   the pattern's tools and windows.
   Split from style.css (16 Nov 2026, C2): each page links css/base.css and its own sheets in <head>, in the order
   base, pattern, marketing, auth, make, library, settings, share, workspace; a rule that came later in style.css still
   comes later where both load. Its dark twin is css/pattern-dark.css (07_scripts/maintenance/site_dark_css.py).
   An !important left says why, on the line before its rule: what it must win over. */

/* =======================
   WORKSPACE STYLES
   ======================= */

.workspace-body #main_right #controls-toolbar button,
.workspace-body #main_right #controls-toolbar select,
.workspace-body #main_right #controls-toolbar #exportMenu>button,
.workspace-body #main_right #controls-toolbar #shapeToolMenu>button {
  padding: 0.3125rem 0.3125rem;
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--font-family-roboto);
  font-weight: 500;
  user-select: none;
  margin: 0.5%;
  border: transparent 0rem solid;
  box-shadow: 0 0rem 0rem transparent;
  border-radius: 0rem;
}

/* --- INSTRUCTIONS POPUP STYLES --- */

/* Within the window: the tabs and the guide link stay, the section between them scrolls (with the tabs on more than
   one row, its 75vh ran the panel past the bottom of the window). */
#instructions.open {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 6.5rem);
  box-sizing: border-box;
}

.instructions-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.instructions-section ul li {
  margin-bottom: 0.625rem;
}

/* --- EXPORT POPUP STYLES --- */

/* Popup sections */
#exportPopupModal .section {
  width: 23.125rem;
}

/* The settings column runs from the window's top and scrolls by itself, and the preview shrinks to fit a short
   window (EXP-13, 4 November 2026: centred in a window shorter than it, the settings column lost its top, Auto-Arrange
   included, and its end, both out of reach of the scroll). The window's height includes its padding: it was 56 px
   over, and its x went off the top of a 700 px window. */
/* Its size (21 Nov 2026, Israa: "make export-popup-content bigger width and height"): up to 1440 by 960 px, never more
   than the screen less 1 rem round it; it was as wide as its columns (1290 px on a 1440 px screen) and 731 px high,
   set in export_pattern.js with !important, which also kept a phone's window from filling the screen. */
#exportPopupModal #export-popup-content {
  align-items: stretch;
  box-sizing: border-box;
  width: min(90rem, calc(100vw - 2rem));
  height: min(60rem, calc(100vh - 2rem));
}

#exportPopupModal .section:not(.preview-section) {
  overflow-y: auto;
  padding-right: 0.5rem;
  /* (From the left, as the rows are: the notes, the sizes' name and the headings took the window's centring, 21 Nov 2026.) */
  text-align: left;
}

#exportPopupModal #export-preview-area svg {
  max-width: 100%;
  max-height: 100%;
}

/* (No wider than the window leaves beside the choices: at 1280 px the window was 1290 px, 21 Nov 2026.) */
#exportPopupModal .section:last-child {
  min-width: min(52.5rem, 100vw - 30rem);
  /* (The preview takes the room the window has beside the choices.) */
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* Headings */
#exportPopupModal h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  border-bottom: 0.0625rem solid #dfe3ea;
  padding-bottom: 0.375rem;
}
/* (Room above each heading after the first: "Export to" and "Options" sat tight under the row before them, 14 Nov 2026.) */
/* !important: over h3's !important (without it the room never came: 21 Nov 2026) */
#exportPopupModal .section > h3:not(:first-of-type) { margin-top: 1.25rem !important; }

/* What the window hides stays hidden: the rows' display: flex below showed "Only the selected pieces (0)" with none
   selected, and "Every graded size" with no grades shown (found filming the how-to videos, 13 Nov 2026). */
/* !important: over #exportPopupModal .row, #exportPopu… */
#exportPopupModal [hidden] {
  display: none !important;
}

/* Form rows */
#exportPopupModal .row,
#exportPopupModal .section>div,
#exportPopupModal .checkbox,
#exportPopupModal .checkbox-group {
  /* margin: 0.625rem 0 0.3125rem; */
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-left: 0.95rem;
}

/* Select */
#exportPopupModal select {
  width: 6.875rem;
  margin-left: auto;
  padding: 0.25rem 0.5rem;
  background: var(--White);
  color: var(--Black);
  /* (--Gray, as the tick boxes: --Dusty-Gray's pale edge was hard to see. 22 Nov 2026, Lucy.) */
  border: 0.0625rem solid var(--Gray);
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

/* The PDF's paper, and how many pages A4 or Letter takes */
#exportPopupModal #export-pdf-paper {
  width: 12.5rem;
}

#exportPopupModal .export-paper-estimate {
  max-width: 20rem;
  margin: 0.25rem 0 0.5rem 1.75rem;
  color: #4a5868;
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: left;
}

/* Checkbox groups */
#exportPopupModal .checkbox-group {
  margin-left: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  /* (As far below the box that ticks them all as they are from each other: DXF sat against All formats.) */
  margin-top: 0.5rem;
}

/* Checkbox row */
/* !important: over #exportPopupModal .section > h3:not… */
#exportPopupModal .checkbox {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0rem;
  margin-top: 0rem !important;
}

/* Checkbox input custom style */
#exportPopupModal input[type="checkbox"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.25rem;
  /* (--Gray, 3.9:1 on white: --Dusty-Gray's edge, 1.3:1, was hard to see on an empty box, 21 Nov 2026.) */
  border: 0.09375rem solid var(--Gray);
  appearance: none;
  outline: none;
  background: var(--White);
  position: relative;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  margin: 0;
  vertical-align: middle;
  box-sizing: border-box;
  padding: 0;
}

/* Checked state: Magic Mint background, white tick */
#exportPopupModal input[type="checkbox"]:checked {
  background: var(--Pure-Blue);
  border-color: var(--Pure-Blue);
}

#exportPopupModal input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 38%;
  width: 0.5rem;
  height: 0.875rem;
  border: solid var(--White);
  border-width: 0 0.1875rem 0.1875rem 0;
  transform: translate(-50%, -50%) rotate(45deg) scale(0.7);
  pointer-events: none;
}

/* Checkbox focus */
#exportPopupModal input[type="checkbox"]:focus {
  outline: 0.0625rem solid var(--Pure-Blue);
}

/* Checkbox label */
/* !important: over h3's !important */
#exportPopupModal h3 {
  font-size: 1.25rem !important;
}

/* !important: over #exportPopupModal .export-paper-est… (and more) */
#exportPopupModal label {
  margin: 0;
  font-size: 1rem !important;
  font-family: var(--font-family-open-sans);
  font-weight: normal !important;
  min-width: 5.625rem;
  cursor: pointer;
  user-select: none;
  text-align: left;
}

/* Preview area */
#exportPopupModal .preview {
  border: 0.0625rem solid var(--bg-light);
  border-radius: 1.25rem;
  padding: 0.3125rem;
  /* height: 52.5rem; */
  display: flex;
  flex-direction: row;
  background: var(--bg-light);
}

#exportPopupModal #export-preview-area {
  flex: 2;
  width: 100%;
  /* Less on a short screen, leaving room for the heading and the Export button. */
  height: min(33.125rem, calc(100vh - 14rem));
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The export window's new parts (15 Nov 2026): the name or brand, the paper's own choices under PDF, the sizes, the
   fabric width typed in, the words under the boxes, and what it is making. */
#exportPopupModal input[type="text"],
#exportPopupModal input[type="number"] {
  margin-left: auto;
  width: 12.5rem;
  min-height: 2rem;
  padding: 0.25rem 0.5rem;
  border: 0.0625rem solid var(--Gray);
  border-radius: 0.25rem;
  background: var(--White);
  color: var(--Black);
  font: inherit;
  font-size: 0.875rem;
}
#exportPopupModal input[type="number"] { width: 6.875rem; }
#exportPopupModal #export-pdf-paper,
#exportPopupModal #export-overlap { width: 13rem; }
/* (Under PDF, indented: the select takes the row's room left, no more.) */
#exportPopupModal .export-pdf-sub :is(#export-pdf-paper, #export-overlap) { flex: 1 1 auto; min-width: 0; width: auto; max-width: 13rem; }
#exportPopupModal .export-pdf-sub label { flex: 0 0 auto; }
/* (A box beside a label that wraps kept its size: it was squeezed thin.) */
#exportPopupModal input[type="checkbox"] { flex: 0 0 auto; }
#exportPopupModal input[aria-invalid="true"] { border-color: #b3261e; }
/* !important: over #exportPopupModal.ws-export-docked… */
#exportPopupModal .export-pdf-sub { margin-left: 2.325rem !important; align-self: stretch; min-width: 0; }
#exportPopupModal select:disabled,
#exportPopupModal input:disabled { opacity: 0.55; cursor: not-allowed; }
#exportPopupModal .export-note {
  margin: 0.375rem 0 0.25rem 0.95rem;
  color: #4a5868;
  font-size: 0.8125rem;
  line-height: 1.4;
}
/* The sizes, a group of their own in a light box (21 Nov 2026, Israa: "make this look better"). */
#exportPopupModal fieldset.export-sizes {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0.75rem 0.875rem 0.875rem;
  border: 1px solid #dfe3ea;
  border-radius: 0.75rem;
  background: #f7f8fb;
}
/* (Floated, so it sits inside the box and not on its edge.) */
#exportPopupModal fieldset.export-sizes legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 0.5rem;
  font-family: var(--font-family-poppins, Poppins, sans-serif);
  font-weight: 600;
  font-size: 0.9375rem;
  color: #1d2a4d;
}
/* !important: over #exportPopupModal.ws-export-docked… (and more) */
#exportPopupModal .export-size-list {
  display: grid !important;
  /* (Two rows of five: the pattern's own size is one of the ten, 23 Nov 2026.) */
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem 0.25rem;
  margin: 0.625rem 0 0 0.25rem !important;
}
/* !important: over #exportPopupModal.ws-export-docked… */
#exportPopupModal .export-size-list .checkbox { margin-left: 0 !important; gap: 0.2rem; }
#exportPopupModal .export-size-list label { min-width: 0; white-space: nowrap; }
#exportPopupModal .export-status {
  min-height: 1.25rem;
  margin: 0.5rem 0 0;
  color: #1d2a4d;
  font-size: 0.875rem;
}
#exportPopupModal #export-ok-btn[aria-busy="true"] { cursor: progress; }

.canvas-toolbar.right {
  position: fixed;
  top: 0rem;
  left: 0.3125rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.625rem;
  padding-bottom: 0.0625rem;
  min-height: 1.875rem;
  z-index: 1001;
  pointer-events: none;
}

.canvas-toolbar.left {
  position: fixed;
  top: 0rem;
  right: 0.625rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.625rem;
  padding-bottom: 0.0625rem;
  min-height: 1.875rem;
  z-index: 1001;
  pointer-events: none;
}

.workspace-body .canvas-toolbar,
.canvas-toolbar {
  user-select: none;
}

.canvas-toolbar .canvas-tool-btn,
.canvas-toolbar button {
  pointer-events: auto;
}

.workspace-body #canvasToolbar,
#canvasToolbar {
  flex-direction: column;
  gap: 0.5rem;
}

#workspace-tabs {
  position: absolute;
  bottom: 0rem;
  left: 0.625rem;
  top: auto;
  right: auto;
  z-index: 9999;
  background: var(--White);
  border-radius: 0.75rem;
  box-shadow: 0 0.125rem 0.75rem var(--Box-Shadow);
  width: 25rem;
}

.workspace-tab-section ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
}

.workspace-tab-section ul li {
  margin-bottom: 0.375rem;
  font-size: 0.95em;
  color: #444;
}

.workspace-tab-section b {
  font-weight: 500;
}

/* =======================
   TRIAL BANNER STYLES
   ======================= */
body.trial-banner-shown #workspace-tabs { bottom: var(--trial-banner-height, 0px); }

/* =======================
   MEDIA QUERIES
   ======================= */

/* Compare with an earlier version (compare_versions.js): what to compare with, under its button. */
.compare-popover { position: fixed; z-index: 10000; width: min(17rem, calc(100vw - 1rem)); max-height: 60vh; overflow-y: auto; padding: 0.75rem; border: 1px solid var(--gray-border, #ddd); border-radius: 0.5rem; background: #fff; box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.14); font-size: 0.85rem; }
.compare-popover > strong { display: block; margin-bottom: 0.4rem; }
/* (Pressed and dragged, its first line moves the popover, tool_hints.js movablePopovers; 21 Nov 2026.) */
.compare-popover > :first-child { cursor: move; touch-action: none; user-select: none; }
.compare-note { margin: 0.2rem 0; color: #5b6582; }
/* What changed, while comparing (compare_versions.js showChanges, M24). */
.compare-popover.compare-changes { width: min(20rem, calc(100vw - 1rem)); z-index: 9999; }

/* The ease check (ease_check_ui.js), in the Compare window's look. */
.compare-popover.fit-check { width: min(20rem, calc(100vw - 1rem)); }
.fit-table { width: 100%; border-collapse: collapse; margin: 0.2rem 0 0.4rem; font-size: 0.8125rem; }
.fit-table th, .fit-table td { padding: 0.2rem 0.3rem; text-align: right; }
.fit-table thead th { color: #5b6582; font-weight: 600; }
.fit-table tbody th { text-align: left; }
.fit-table tr.fit-word td { text-align: left; padding-top: 0; color: #5b6582; font-size: 0.75rem; border-bottom: 1px solid #eef0f5; }
.fit-table tr.fit-word.fit-warn td { color: #8a4b00; }

/* Check my pattern (pattern_check_ui.js). */
.compare-popover.pattern-check { width: min(24rem, calc(100vw - 1rem)); max-height: 70vh; }
.pattern-check .check-kind { margin: 0.55rem 0 0.2rem; font-weight: 600; color: #1d2a4d; font-size: 0.8125rem; }

/* The Export window's spec sheet button (sewing_order.js). */
.export-spec-sheet-btn { flex: 1 1 auto; padding: 0.35rem 0.8rem; border: 1px solid var(--Pure-Blue); border-radius: 0.35rem; background: #fff; color: var(--Pure-Blue); font: inherit; font-weight: 600; cursor: pointer; }
.export-spec-sheet-btn:hover { background: var(--Pure-Blue-light); }
dialog.app-dialog:has(.size-table-box) { width: min(64rem, calc(100vw - 2rem)); }

/* ---- Version history (version_history.js, history_drawer.js; 13 Nov 2026) ----
   Saves grouped by day with what each changed, the autosaves before each folded under it, a small picture, one main
   action (Open or Restore) and the rest under "⋯". The same list in the Library's window and the workspace's drawer. */
.vh-subtitle {
  color: var(--Boulder);
  font-size: 0.875rem;
  margin-top: 0.125rem;
}
.vh-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: var(--font-family-open-sans);
  color: var(--text-secondary);
}
.vh-group + .vh-group {
  margin-top: 0.75rem;
}
.vh-day {
  margin: 0 0 0.25rem;
  padding: 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--Gray);
}
/* Under "Since your last save": what the autosaves are (version_history.js, 14 Nov 2026 sweep, round 2). */
.vh-autosave-note {
  margin: 0 0 0.25rem;
  padding: 0 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--Boulder);
}
.vh-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
}
.vh-row:hover,
.vh-row:focus-within {
  background: var(--bg-light);
}
.vh-row.vh-latest {
  border-color: var(--Dusty-Gray);
}
.vh-row-small {
  grid-template-columns: 1fr auto auto;
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
}
.vh-thumb {
  width: 72px;
  height: 52px;
  border-radius: 0.375rem;
  background: var(--White);
  border: 1px solid var(--Dusty-Gray);
  color: var(--text-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.vh-main {
  min-width: 0;
}
.vh-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.375rem;
  font-size: 0.9375rem;
  color: var(--text-blue);
}
.vh-number {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.vh-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.vh-kind {
  font-size: 0.75rem;
  color: var(--Boulder);
}
.vh-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.0625rem 0.375rem;
  border-radius: 999px;
  background: var(--Pure-Blue-light);
  color: var(--Pure-Blue);
}
.vh-badge-open {
  background: #e7f4ea;
  color: var(--Sew-Ok);
}
.vh-detail {
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  color: var(--Boulder);
  overflow-wrap: anywhere;
}
.vh-time {
  font-size: 0.8125rem;
  color: var(--Boulder);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.vh-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.vh-primary,
.vh-more,
.vh-autosaves-toggle,
.vh-menu-item {
  font: inherit;
  cursor: pointer;
}
.vh-primary {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.3125rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid var(--Pure-Blue);
  background: var(--White);
  color: var(--Pure-Blue);
}
.vh-latest .vh-primary {
  background: var(--Pure-Blue);
  color: var(--White);
}
.vh-primary:hover {
  background: var(--Pure-Blue-light);
}
.vh-latest .vh-primary:hover {
  background: var(--text-blue);
}
.vh-more {
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1;
}
.vh-more:hover,
.vh-more[aria-expanded="true"] {
  border-color: var(--Dusty-Gray);
  background: var(--White);
}
.vh-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 3;
  min-width: 11rem;
  padding: 0.25rem;
  background: var(--White);
  border: 1px solid var(--Dusty-Gray);
  border-radius: 0.5rem;
  box-shadow: 0 6px 18px var(--Box-Shadow);
  display: flex;
  flex-direction: column;
}
.vh-menu-item {
  text-align: left;
  font-size: 0.875rem;
  padding: 0.4375rem 0.625rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--text-blue);
}
.vh-menu-item:hover,
.vh-menu-item:focus-visible {
  background: var(--bg-light);
}
.vh-autosaves {
  margin: 0 0 0.25rem calc(72px + 1.25rem);
}
.vh-autosaves-toggle {
  border: 0;
  background: none;
  padding: 0.125rem 0;
  font-size: 0.8125rem;
  color: var(--Pure-Blue);
}
.vh-autosaves-toggle::before {
  content: "▸ ";
}
.vh-autosaves-toggle[aria-expanded="true"]::before {
  content: "▾ ";
}
.vh-autosaves-list {
  border-left: 2px solid var(--Dusty-Gray);
  margin: 0.25rem 0 0.25rem 0.25rem;
  padding-left: 0.25rem;
}
.vh-empty {
  color: var(--Boulder);
  font-size: 0.875rem;
  padding: 1rem 0.5rem;
}
@media (max-width: 40rem) {
  .vh-row { grid-template-columns: auto 1fr auto; }
  .vh-row .vh-time { grid-column: 2; }
  .vh-autosaves { margin-left: 0.5rem; }
}

/* ---- Panels with less to read (13 Nov 2026) ----
   The workspace's tabs and piece windows: a title, settings in rows with their units inside the boxes, one line of
   help under a setting (the rest under "More"), pictures for choices that are shapes, and the main button at the foot. */
#workspace-tabs {
  width: 26rem;
}
/* !important: over .workspace-tab-section input[type="… (and more) */
.unit-input input {
  width: 5.5rem;
  border: 0 !important;
  outline: none;
  padding: 0.3rem 0.4rem !important;
  text-align: right;
  background: transparent;
  box-shadow: none !important;
  margin: 0 !important;
}

/* The mode waiting for a click on the pattern, said on the canvas (tool_hints.js). Clicks go through it to the pattern
   (14 Nov 2026: it lay over the right back half's neckline, so Choose the edge could never face it); only Stop takes
   one. */
.mode-banner {
  pointer-events: none;
  position: absolute;
  top: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 905;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: calc(100% - 2rem);
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  border-radius: 999px;
  background: var(--text-blue);
  color: var(--White);
  font-family: var(--font-family-open-sans);
  font-size: 0.875rem;
  box-shadow: 0 6px 18px var(--Box-Shadow);
}
.mode-banner-stop {
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: transparent;
  color: var(--White);
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.2rem 0.75rem;
  cursor: pointer;
}
.mode-banner-stop:hover {
  background: rgba(255, 255, 255, 0.15);
}
/* The piece menu from the keyboard (Shift+F10): the item focused is shown. */
/* !important: over body[data-ws-theme^="curves"] #main… */
#pieceOptionsMenu button:focus-visible {
  outline: 2px solid var(--Blue, #0025e6);
  outline-offset: -2px;
  background: #eef2ff !important;
}
/* The canvas's looks: dark (the drawing turned light on dark, its colours kept) and high contrast. */
body[data-canvas-look="dark"] #main_right {
  background-color: #262b36;
  --Grid-Gray: #323846;
}
body[data-canvas-look="dark"] #canvas {
  filter: invert(1) hue-rotate(180deg);
}
body[data-canvas-look="contrast"] #main_right {
  --Grid-Gray: #f0f1f5;
}
body[data-canvas-look="contrast"] #canvas {
  filter: contrast(1.5) saturate(1.4);
}
/* Projector mode: black, nothing but the pattern. */
/* !important: over #main_right */
body.projector-mode #main_right,
body.projector-mode .canvas-container {
  background: #000 !important;
}
body.projector-mode #canvas {
  filter: invert(1) hue-rotate(180deg) contrast(1.2);
}
/* !important: over .hide-mobile's !important */
body.projector-mode #controls-toolbar,
body.projector-mode #canvas-quick-tools,
body.projector-mode #canvas-toolbar,
body.projector-mode #workspace-tabs,
body.projector-mode #infoBtn,
body.projector-mode #chatbot-button,
body.projector-mode .canvas-ruler {
  display: none !important;
}
/* Projector calibration (canvas_aids.js, 15 Nov 2026): its grid over the canvas, the picture mirrored, its panel. */
.projector-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}
body.projector-mirrored #canvas,
body.projector-mirrored .projector-grid { transform: scaleX(-1); }
.projector-panel {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 10001;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(20, 22, 30, 0.92);
  border: 1px solid #3a4150;
  border-radius: 10px;
  color: #e8ebf2;
  font: 14px Arial, sans-serif;
}
body.projector-mode .projector-panel:not([hidden]) { display: flex; }
.projector-panel #projectorSize { min-width: 4.5em; text-align: center; font-variant-numeric: tabular-nums; }

/* The piece menu, grouped with keys (piece_menu.js; the design "Piece menu and selection bar", 13 Nov 2026). */
.piece-menu {
  position: fixed;
  z-index: 9999;
  min-width: 15rem;
  max-width: 19rem;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #e3e3ea;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 6, 70, 0.14);
  padding: 6px;
  display: flex;
  flex-direction: column;
  font-family: var(--font-family-open-sans, "Open Sans", sans-serif);
  color: #000646;
}
.piece-menu-title {
  padding: 6px 10px 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0025e6;
}
.piece-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.piece-menu-item.danger {
  color: #b3261e;
}
.piece-menu-item.danger:hover,
.piece-menu-item.danger:focus-visible {
  background: #fdecea;
  color: #b3261e;
}
.piece-menu-icon {
  width: 18px;
  height: 18px;
  flex: none;
  display: inline-flex;
}
.piece-menu-label {
  flex: 1;
}
.piece-menu-key {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  border: 1px solid #e3e3ea;
  border-radius: 4px;
  padding: 0 5px;
  white-space: nowrap;
}
.piece-menu-arrow {
  color: #a0a4b4;
}
.piece-menu-rule {
  height: 1px;
  background: #ececf1;
  margin: 5px 6px;
}

/* --- The quick tools as one compact bar of icons, in groups (grouped, and A's rail); in the grouped layout the canvas
   tools (move pieces, pan, zoom tool, full screen) as a bar like it, on the right --- */
body[data-ws-theme="grouped"] #main_right #canvas-quick-tools,
body[data-ws-theme="grouped"] #main_right #canvas-toolbar,
body[data-ws-theme="curves-a"] #main_right #canvas-quick-tools {
  gap: 2px;
  padding: 4px;
  top: 10px;
  left: 10px;
  min-height: 0;
  background: var(--White, #fff);
  border: 1px solid #e3e3ea;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 6, 70, 0.08);
  pointer-events: auto;
}
body[data-ws-theme="grouped"] #main_right #canvas-toolbar {
  left: auto;
  right: 10px;
}

/* --- The action tab hanging from the header (A and B): rounded buttons inside it, Save last and blue --- */
/* !important: over body[data-ws-theme="grouped"] #canv… */
body[data-ws-theme^="curves"] #canvas-toolbar { display: none !important; }

/* --- A: the quick tools as a rail down the left, grown out of the header with a curved join --- */
body[data-ws-theme="curves-a"] #main_right #canvas-quick-tools {
  flex-direction: column;
  align-items: center;
  top: calc(-1 * var(--ws-gap, 0px));
  left: 0;
  width: 52px;
  box-sizing: border-box;
  padding: calc(var(--ws-gap, 0px) + 10px) 0 12px;
  border: 0;
  border-radius: 0 0 20px 0;
  box-shadow: none;
}
body[data-ws-theme="curves-a"] #canvas-quick-tools::after {
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  width: 30px;
  height: 30px;
  background: radial-gradient(30px 30px at 100% 100%, transparent 96%, var(--White, #fff) 100%);
  pointer-events: none;
}
/* A: the tabs as a side panel down the right, grown out of the header: Piece, Seams, Size, Measure, Settings. */
/* !important: over body[data-ws-theme="curves-b"] #wor… (and more) */
body[data-ws-theme="curves-a"] #workspace-tabs {
  position: fixed !important;
  top: var(--ws-top, 88px) !important;
  right: 0;
  bottom: 0 !important;
  left: auto !important;
  width: var(--ws-side-w, 340px) !important;
  display: flex;
  flex-direction: column;
  border-radius: 0 !important;
  border-bottom-left-radius: 20px !important;
  box-shadow: none !important;
  transform: none;
  opacity: 1;
  z-index: 900;
}
body[data-ws-theme="curves-a"] #workspace-tabs::before {
  content: "";
  position: absolute;
  top: 0;
  right: 100%;
  width: 30px;
  height: 30px;
  background: radial-gradient(30px 30px at 0 100%, transparent 96%, var(--White, #fff) 100%);
  pointer-events: none;
}
/* The canvas stops above the trial-ending banner while it shows (websocket_utils watchTrialBanner), and the bars at the
   bottom stand on it; a notice floats above them all (it no longer makes room under the canvas, 13 Nov 2026). */
/* (A's zoom tab and B's dock and status bar stand on the canvas's bottom already.) A's side panel and B's Help button
   stop above the banner as the other layouts' do. */
/* !important: over body[data-ws-theme="curves-b"] #wor… */
body.trial-banner-shown[data-ws-theme="curves-a"] #workspace-tabs { bottom: var(--trial-banner-height, 0px) !important; }
/* A's family: the side panel keeps room at its foot for Help, which sits there. Over the panel's contents it took the
   clicks meant for its last switches (Rulers, "Move pieces in whole cm") and hid the end of the Projector hint (14 Nov
   2026); beside the panel it would cover A's zoom tab and One frame's dock. */
/* !important: over the padding-bottom of a rule loaded later */
html.help-menu-on body[data-ws-theme="curves-a"]:not(.ws-side-folded) #workspace-tabs { padding-bottom: calc(3.5rem + 1rem) !important; }

/* --- B: one tab with every action and the menus; the modes and zoom in a dock rising from a status bar --- */
/* !important: over body[data-ws-theme="grouped"] #canv… */
body[data-ws-theme="curves-b"] #canvas-quick-tools { display: none !important; }
/* B: the tabs open as a panel under the action tab, from its menus (their own row hidden). */
body[data-ws-theme="curves-b"] #workspace-tabs { display: none; }

/* The grouped layout: the tabs at the bottom left as a plain bar (13 Nov 2026, Israa: "I dont like the s
   curves it should be the same width as the id="workspace-tabs-content", with the top corners rounded only"; the
   S-curves of that morning gone). The bar and an open tab's panel the same width; the top corners rounded, the panel's
   when a tab is open (it stands on the bar). Above a notice, as the canvas's bottom is. */
body[data-ws-theme="grouped"] #workspace-tabs {
  bottom: var(--trial-banner-height, 0px);
  left: 0.625rem;
  width: 26rem;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

/* ---- The workspace's recommendations 2, 4, 6, 8, 11 and 12 (13 Nov 2026) ---- */

/* 2. The layouts offered the first time (layout_offer.js): four cards in a row on a wide screen. */
dialog.app-dialog.layout-offer { width: min(52rem, calc(100vw - 2rem)); }

/* 12. A dark workspace: with the Dark canvas look the header, bars, tabs, panels and menus are dark too. Their own
   white (--White) and ink (--Black) are swapped where they are drawn, and the colours the layouts set are given
   their dark counterparts. */
body[data-canvas-look="dark"] {
  --ws-dark-bg: #1b1f2a;
  --ws-dark-raised: #242a38;
  --ws-dark-line: #343b4d;
  --ws-dark-ink: #e7eaf3;
  --ws-dark-muted: #a9b1c6;
  --ws-dark-on: #2d3a66;
  --ws-dark-accent: #0025E6;
  /* Words that were blue: the light ink, the blue staying as their fill, line or underline (16 Nov 2026: the blue as
     text read 1.9:1 on the dark bars and panels). */
  --ws-dark-link: #e7eaf3;
  background-color: #12151d;
}
/* !important: over the New design's .outside-main-nav-header-section */
body[data-canvas-look="dark"] .outside-main-nav-header-section { background: var(--ws-dark-bg) !important; border-color: var(--ws-dark-line) !important; }
/* !important: over #chatbot-popup .chatbot-privacy-not… */
body[data-canvas-look="dark"] .outside-main-nav-header-section .nav-link,
body[data-canvas-look="dark"] .outside-main-nav-header-section a:not(.outside-main-nav-logo) { color: var(--ws-dark-ink) !important; }
/* !important: over the New design's .outside-main-nav-logo */
body[data-canvas-look="dark"] .outside-main-nav-logo { color: #ffffff !important; }
body[data-canvas-look="dark"] #controls-toolbar,
body[data-canvas-look="dark"] #canvas-quick-tools,
body[data-canvas-look="dark"] #canvas-toolbar,
body[data-canvas-look="dark"] #workspace-tabs,
body[data-canvas-look="dark"] #parametricPatternPanel,
body[data-canvas-look="dark"] #wsZoom,
body[data-canvas-look="dark"] #wsDock,
body[data-canvas-look="dark"] #wsStatus,
body[data-canvas-look="dark"] .piece-menu,
body[data-canvas-look="dark"] .piece-bar,
body[data-canvas-look="dark"] #instructions,
body[data-canvas-look="dark"] dialog.app-dialog,
body[data-canvas-look="dark"] #main_right.main-right-shifted::after {
  --White: var(--ws-dark-bg);
  --Black: var(--ws-dark-ink);
  --Dark-Blue: var(--ws-dark-ink);
  color: var(--ws-dark-ink);
}
body[data-canvas-look="dark"] dialog.app-dialog,
body[data-canvas-look="dark"] .piece-menu { border-color: var(--ws-dark-line); background: var(--ws-dark-bg); }
/* The workspace's own questions in its dark look (app_dialog.js; 16 Nov 2026, "Open … instead?" on Import): the words
   light; the blue answer's words white (the window's --White is the dark look's, so they went dark on the blue); the
   other answers outlined in the light ink (blue on the dark window was 1.9:1); the keyboard's ring in the light ink. */
body[data-canvas-look="dark"] dialog.app-dialog .app-dialog-text { color: var(--ws-dark-ink); }
body[data-canvas-look="dark"] dialog.app-dialog .btn-primary { color: #ffffff; }
body[data-canvas-look="dark"] dialog.app-dialog .btn-secondary { border-color: #8a93ad; background-color: transparent; color: var(--ws-dark-ink); }
body[data-canvas-look="dark"] dialog.app-dialog .btn-secondary:hover,
body[data-canvas-look="dark"] dialog.app-dialog .btn-secondary:focus { border-color: #c3c9d9; background-color: #262c3b; color: #ffffff; }
/* !important: over base.css's keyboard ring (!important, to win over the rules that took it away), whose blue can't be
   seen on the dark window */
body[data-canvas-look="dark"] dialog.app-dialog .btn-rounded:focus-visible { outline-color: var(--ws-dark-ink) !important; }
/* The Share window in the workspace's dark look (23 Nov 2026, Israa: "Comments" and "Deliver to a client" hard to read):
   its own fixed navy, blue and grey words light, as the site's dark look has them (share-dark.css, pattern-dark.css). */
body[data-canvas-look="dark"] dialog.share-dialog :is(.share-dialog-subhead, .share-dialog-who strong, .share-dialog-comment .share-dialog-who, .share-dialog-comment .share-dialog-text) { color: var(--ws-dark-ink); }
body[data-canvas-look="dark"] dialog.share-dialog .share-dialog-open { color: var(--ws-dark-link); text-decoration-color: var(--ws-dark-accent); }
body[data-canvas-look="dark"] dialog.share-dialog :is(.share-dialog-none, .share-dialog-note) { color: var(--ws-dark-muted); }
body[data-canvas-look="dark"] dialog.share-dialog .share-dialog-comment { border-top-color: var(--ws-dark-line); }
body[data-canvas-look="dark"] dialog.share-dialog .share-dialog-status { color: #7bf49e; }
body[data-canvas-look="dark"] dialog.share-dialog .share-dialog-status[data-tone="error"] { color: #f4817b; }
body[data-canvas-look="dark"] dialog.share-dialog .share-dialog-delete { border-color: var(--ws-dark-line); background: var(--ws-dark-raised); color: #f4817b; }
body[data-canvas-look="dark"] dialog.share-dialog .share-dialog-close { color: var(--ws-dark-ink); }
body[data-canvas-look="dark"] dialog.share-dialog .share-dialog-close:hover { background: var(--ws-dark-raised); }
/* The compact bars (grouped, A's rail). */
body[data-canvas-look="dark"][data-ws-theme="grouped"] #main_right #canvas-quick-tools,
body[data-canvas-look="dark"][data-ws-theme="grouped"] #main_right #canvas-toolbar,
body[data-canvas-look="dark"][data-ws-theme="curves-a"] #main_right #canvas-quick-tools { border-color: var(--ws-dark-line); background: var(--ws-dark-bg); }
body[data-canvas-look="dark"] #workspace-tabs :is(select, input[type="number"], input[type="text"], textarea),
body[data-canvas-look="dark"] #parametricPatternPanel :is(select, input[type="number"], input[type="text"]) {
  background-color: var(--ws-dark-raised);
  color: var(--ws-dark-ink);
  border-color: var(--ws-dark-line);
}
/* !important: over h1's !important */
body[data-canvas-look="dark"] #workspace-tabs :is(.btn-primary, .piece-tool-primary, [class*="btn-primary"]) { color: #fff !important; }
body[data-canvas-look="dark"] .piece-menu-item { color: var(--ws-dark-ink); }
body[data-canvas-look="dark"] .piece-menu-item:hover,
body[data-canvas-look="dark"] .piece-menu-item:focus-visible { background: var(--ws-dark-on); color: #fff; }
body[data-canvas-look="dark"] .piece-menu-key { color: var(--ws-dark-muted); border-color: var(--ws-dark-line); }
body[data-canvas-look="dark"] .piece-menu-rule { background: var(--ws-dark-line); }
/* (Scrollbars, lists and pickers drawn dark too; links and titles light enough to read.) */
body[data-canvas-look="dark"] :is(#workspace-tabs, #parametricPatternPanel, #instructions, .piece-menu, dialog.app-dialog) { color-scheme: dark; }
/* !important: over the New design's .settings-page .settings-sidebar a:… */
body[data-canvas-look="dark"] :is(#workspace-tabs, #parametricPatternPanel, #instructions) :is(a, .link-button, .panel-title) { color: var(--ws-dark-link) !important; text-decoration-color: var(--ws-dark-accent); }

/* ---- What was left from the redesign review (13 Nov 2026, evening: "fix what is left") ---- */
@media (pointer: coarse) {
  .library_page-pattern-buttons-container > button,
  .library_page-more-btn { min-width: 44px; min-height: 44px; }
}

/* ---- Phones (13 Nov 2026, Israa): Make a pattern takes photos of the drawings and keeps them for later
   (script/make/phone_drawings.js); the Library is for looking, downloading and sharing, with no editing. ---- */
/* The export window on a phone: the choices, then a small preview, the width of the screen (the preview column's
   52.5 rem ran off it). Every button on a phone's Library card is 44 px. */
/* !important: over the flex-direction of a rule loaded later (and more) */
@media (max-width: 600px) {
  #exportPopupModal #export-popup-content {
    flex-direction: column !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    padding: 16px !important;
    gap: 14px !important;
    overflow-y: auto;
  }
  #exportPopupModal .section:not(.preview-section) { overflow-y: visible; padding-right: 0; }
  #exportPopupModal .section:last-child { min-width: 0; }
  #exportPopupModal #export-preview-area { height: 220px; }
  /* (19 Nov 2026, Israa: "make sure there are no other spacing issues" in the Library on a phone: the columns kept
     their 370 px, 12 px wider than a 390 px phone's window, so the boxes ran to its edge and it scrolled sideways;
     the × sat 4 px from the edge; Export's row, 100 % wide, was pushed right by the rows' 28 px indent.) */
  #exportPopupModal .section { width: auto; }
  /* !important: over .modal-close's !important */
  #exportPopupModal #export-cancel-btn { top: 8px !important; right: 8px !important; }
}
/* Between a phone and a laptop (a tablet on its side, a small laptop window): the choices keep their width and the
   preview takes what is left (14 Nov 2026: at 1024 px the preview's 52.5 rem squeezed the choices to 110 px, their
   words cut off: "DX", "Measuren unit"). */
@media (min-width: 601px) and (max-width: 1279px) {
  #exportPopupModal #export-popup-content { min-width: calc(100vw - 2rem); }
  #exportPopupModal .section:not(.preview-section) { flex: 0 0 auto; }
  #exportPopupModal .section:last-child { min-width: 0; flex: 1 1 auto; }
}
/* The window at every width (21 Nov 2026, Israa: "I want to avoid overflow in pop ups"): the preview's box and the Export
   row under their heading, not indented as the choices are (they ran 28 px past the window's side; on a phone since 19
   Nov); the unit's whole name ("Centimetr" was cut off). */
#exportPopupModal .preview-section > :is(.preview, .actions) { margin-left: 0; }
#exportPopupModal #export-scale { width: auto; }
/* The choices' rhythm (21 Nov 2026, Israa: "there should be more space between the rows", Measurement unit and the name
   or brand touched): room between the rows, each name level with its box; the name or brand over a box the column's
   width (its name ran to two lines beside it); a note under the words it is about; the spec sheet and Share a link one
   width, on a line each when they don't fit side by side; the sizes' box apart from the buttons. */
#exportPopupModal .section > .row { margin-top: 0.625rem; }
#exportPopupModal .section > .row:has(> :is(select, input[type="text"], input[type="number"])) { align-items: center; }
#exportPopupModal .export-brand-row { flex-wrap: wrap; row-gap: 0.375rem; }
#exportPopupModal .export-brand-row > * { flex: 1 1 100%; }
#exportPopupModal .checkbox-group > .export-note { margin-left: 2.325rem; }
#exportPopupModal #export-arrange-note { margin-left: 2.575rem; }
#exportPopupModal .section > .howto-link-line { padding-left: 0.95rem; }
#exportPopupModal .row:has(> .export-spec-sheet-btn) { flex-wrap: wrap; }
/* (A box among boxes since 23 Nov 2026: the same room under it as under every box.) */
#exportPopupModal #export-grades-row { display: block; margin: 0 0 0.875rem; }
#exportPopupModal fieldset.export-sizes > .checkbox { clear: both; margin-left: 0; }
/* The window in the workspace's dark look (21 Nov 2026, Israa: "why isn't the pop up in dark mode dark as well, why is it
   white"; the sizes' box "a bit too dark"): in Icon bars and Top menus the window stayed white, and in the panel its
   boxes, notes, link and buttons kept their light colours. Its white and ink swapped as the workspace's other windows'
   are; the fields, tick boxes and the sizes' box a raised surface, a little lighter than the window; the notes muted;
   blue words in the light ink, the blue kept as their underline, fill or edge. */
/* (--ds-ink: the headings' colour, base.css's h3.) */
body[data-canvas-look="dark"] #exportPopupModal { --White: var(--ws-dark-bg); --Black: var(--ws-dark-ink); --Dark-Blue: var(--ws-dark-ink); --ds-ink: var(--ws-dark-ink); color: var(--ws-dark-ink); color-scheme: dark; }
body[data-canvas-look="dark"] #exportPopupModal h3 { border-bottom-color: var(--ws-dark-line); }
/* (An edge round the window, so it stands apart from the dark canvas behind it.) */
body[data-canvas-look="dark"] #exportPopupModal #export-popup-content { box-shadow: 0 0 0 1px var(--ws-dark-line), 0 0.25rem 2rem rgba(0, 0, 0, 0.5); }
body[data-canvas-look="dark"] #exportPopupModal :is(select, input[type="text"], input[type="number"]) { border-color: var(--ws-dark-line); background-color: var(--ws-dark-raised); color: var(--ws-dark-ink); }
body[data-canvas-look="dark"] #exportPopupModal input[type="checkbox"]:not(:checked) { border-color: #8a93ad; background: var(--ws-dark-raised); }
body[data-canvas-look="dark"] #exportPopupModal input[type="checkbox"]:checked::after { border-color: #ffffff; }
body[data-canvas-look="dark"] #exportPopupModal :is(.export-note, .export-paper-estimate) { color: var(--ws-dark-muted); }
body[data-canvas-look="dark"] #exportPopupModal :is(fieldset.export-sizes legend, .export-status) { color: var(--ws-dark-ink); }
body[data-canvas-look="dark"] #exportPopupModal fieldset.export-sizes { border-color: var(--ws-dark-line); background: var(--ws-dark-raised); }
/* The preview as in light, on its pale sheet (23 Nov 2026, Israa: "the internal lines and labels also tricky to see on the
   pattern in export in dark mode": the pattern is drawn in the files' dark ink and grey, which a dark preview hid). */
body[data-canvas-look="dark"] #exportPopupModal .preview { border-color: var(--ws-dark-line); background: #f3f5f9; }
body[data-canvas-look="dark"] #exportPopupModal .export-spec-sheet-btn { border-color: #8a93ad; background: transparent; color: var(--ws-dark-ink); }
body[data-canvas-look="dark"] #exportPopupModal .export-spec-sheet-btn:hover { background: #262c3b; color: #ffffff; }
body[data-canvas-look="dark"] #exportPopupModal .btn-primary { color: #ffffff; }
/* !important: over base.css's .howto-link-line a (its blue, !important) */
body[data-canvas-look="dark"] #exportPopupModal .howto-link-line a { color: var(--ws-dark-link) !important; text-decoration-color: var(--ws-dark-accent); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
/* Not on a phone, where the window scrolls as one: the preview takes the height the window leaves it, so Export stays
   inside the window (it ran into the window's foot on a laptop). */
@media (min-width: 601px) {
  #exportPopupModal .preview-section > .preview { flex: 1 1 auto; min-height: 0; }
  #exportPopupModal .preview-section #export-preview-area { height: 100%; min-height: 10rem; }
}
body[data-canvas-look="dark"] .help-menu { background: #1b1f2a; border-color: #343b4d; }
body[data-canvas-look="dark"] .help-menu-item strong { color: #e7eaf3; }
body[data-canvas-look="dark"] .help-menu-item small { color: #a9b1c6; }
body[data-canvas-look="dark"] .help-menu-item:hover,
body[data-canvas-look="dark"] .help-menu-item:focus-visible { background: #242a38; }

/* ==== Layout A: History and Export in the side panel, Seam allowance in its Seams tab, Undo and Redo beside the modes
   (13 Nov 2026, Israa, from the mock-ups she confirmed). workspace_theme.js does the moving. ==== */
body[data-canvas-look="dark"] :is(.ws-seam-switch-hint, .ws-panel-note, .ws-export-lead, .ws-export-bar-words span) { color: #a9b1c6; }
body[data-canvas-look="dark"] :is(.ws-export-title, .ws-export-bar-words strong) { color: #e7eaf3; }
body[data-canvas-look="dark"] .workspace-notice { background: #2a3142; border: 1px solid #3a4256; }
body[data-canvas-look="dark"] .workspace-notice[data-tone="error"] { border-left: 4px solid #e75d55; }

/* The dark look: the side panel's and lists' scrollbars dark too (Firefox drew them light, a white strip down A's
   panel, 14 Nov 2026). */
body[data-canvas-look="dark"] :is(#workspace-tabs-content, #wsPieceListBody, #parametricPatternPanel, #instructions, #historyDrawer) {
  scrollbar-color: #4a5368 #1b1f2a;
}

/* ===== Account and Library round, 15 Nov 2026 (site account helper) ===== */
.app-dialog-choice { display: flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; }
.app-dialog-choice input { width: 18px; height: 18px; margin: 0; }
/* Workspace, 15 Nov 2026 fix round: Snap's choices and Layers (snapping.js, canvas_quick_tools.js toggleLayers). */
.snap-choice { display: flex; align-items: center; gap: 0.5rem; min-height: 2rem; margin: 0.1rem 0; font-size: 0.8125rem; cursor: pointer; }
/* (flex: none: a choice whose words run to two lines squeezed its box smaller, Layers' Markings; 21 Nov 2026.) */
.snap-choice input { flex: none; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--Pure-Blue, #0025e6); }
.layers-popover .check-kind, .snap-choices .check-kind { margin: 0.55rem 0 0.2rem; font-weight: 600; color: #1d2a4d; font-size: 0.8125rem; }
.snap-choices > button, .layers-popover > button { margin-top: 0.4rem; min-height: 2rem; padding: 0.2rem 0.9rem; border: 1px solid var(--Pure-Blue, #0025e6); border-radius: 0.3rem; background: #fff; color: var(--Pure-Blue, #0025e6); font: inherit; cursor: pointer; }
@media (pointer: coarse) { .snap-choice { min-height: 44px; } .snap-choices > button, .layers-popover > button { min-height: 44px; } }

/* ---- Content pages, the landing's real example, Pricing's promises (15 Nov 2026: M7, M33, M34, M44, M45) ----
   News and its articles, Made with Mildbury, Status, Security and the Accessibility statement (content-page.js) share
   these: a plain head (eyebrow, title, one line) and a 52rem reading column. Colours are written out so that
   07_scripts/maintenance/site_dark_css.py gives each its dark twin. */
/* Share links (15 Nov 2026, M37): the owner's window (script/shared/share_link.js), the Library card's line and the shared page
   (share.html). */
dialog.app-dialog.share-dialog { width: min(36rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; }
.share-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.share-dialog-close { min-width: 44px; min-height: 44px; margin: -8px -8px 0 0; border: 0; border-radius: 50%; background: transparent; color: #303850; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.share-dialog-close:hover { background: #f3f3f5; }
.share-dialog-close:focus-visible, .share-dialog-delete:focus-visible, .share-dialog-open:focus-visible { outline: 2px solid #1A2A8F; outline-offset: 2px; }
.share-dialog-note { font-family: var(--font-family-inter); font-size: 0.9375rem; line-height: 1.5; color: #4a5868; margin: 0 0 12px; }
.share-dialog-note:empty { display: none; }
.share-dialog-body { margin: 0 0 8px; }
.share-dialog-url { display: flex; gap: 8px; align-items: center; margin: 4px 0 6px; }
.share-dialog-url .app-dialog-input { flex: 1; min-width: 0; margin: 0; font-size: 0.9375rem; }
.share-dialog-url .btn-rounded, .share-dialog-row .btn-rounded { min-height: 44px; white-space: nowrap; }
.share-dialog-choice { align-items: flex-start; margin: 4px 0 12px; line-height: 1.45; }
.share-dialog-choice input { margin-top: 2px; flex: none; }
.share-dialog-choice.share-dialog-sub { margin-left: 28px; }   /* (Viewers may download it: under its team, 20 Nov 2026) */
.share-dialog-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 8px; }
.share-dialog-open { color: #0025E6; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; min-height: 44px; display: inline-flex; align-items: center; }
.share-dialog-subhead { font-family: var(--font-family-inter); font-size: 1.0625rem; font-weight: 700; color: #000646; margin: 16px 0 6px; }
/* (As long as it is: the window scrolls it with the rest. Its own 18 rem scroll inside the window, which scrolls too on a
   phone or a short screen, was two scrollbars; 21 Nov 2026, Israa: "fix any double scroll".) */
.share-dialog-comments { list-style: none; margin: 0 0 8px; padding: 0; }
.share-dialog-comment { border-top: 1px solid #e1e3ea; padding: 10px 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
.share-dialog-comment .share-dialog-who, .share-dialog-comment .share-dialog-text { grid-column: 1; margin: 0; font-family: var(--font-family-inter); font-size: 0.9375rem; line-height: 1.5; color: #303850; overflow-wrap: anywhere; }   /* (anywhere: a piece's long name pushed Delete past a phone's window, 21 Nov 2026) */
.share-dialog-who strong { color: #000646; }
.share-dialog-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.share-dialog-delete { grid-column: 2; grid-row: 1 / span 2; align-self: start; min-height: 36px; padding: 0 12px; border: 1px solid #c9ccd6; border-radius: 999px; background: #ffffff; color: #B3261E; font-weight: 600; cursor: pointer; }
.share-dialog-none { color: #4a5868; font-family: var(--font-family-inter); padding: 4px 0; }
.share-dialog-status { font-family: var(--font-family-inter); font-size: 0.9375rem; color: #1e6b34; margin: 6px 0 0; min-height: 1.4em; }
.share-dialog-status[data-tone="error"] { color: #B3261E; }
@media (pointer: coarse) { .share-dialog-delete { min-height: 44px; } }
@media (max-width: 480px) { .share-dialog-url { flex-direction: column; align-items: stretch; } }
.share-drawing-svg { display: block; width: 100%; height: auto; max-height: 75vh; }
.share-measure-table { width: 100%; border-collapse: collapse; font-family: var(--font-family-inter); }
.share-measure-table caption { text-align: left; font-weight: 700; color: #000646; padding: 0 0 0.375rem; }
.share-comment-delete { grid-column: 2; grid-row: 1 / span 2; align-self: start; min-height: 44px; padding: 0 14px; border: 1px solid #c9ccd6; border-radius: 999px; background: #ffffff; color: #B3261E; font-family: var(--font-family-inter); font-weight: 600; cursor: pointer; }
.share-comment-delete:focus-visible { outline: 2px solid #1A2A8F; outline-offset: 2px; }

/* --- Plans and billing (15 Nov 2026, billing helper: M28, M30-M33, M41) ------------------------------------------------- */
/* The shared page's drawing (M37): lines a steady width at any size, a scroll box when zoomed in, its tools. */
.share-drawing-svg :is(path, polyline, circle) { vector-effect: non-scaling-stroke; stroke-width: 1.25px; }
body[data-canvas-look="dark"] :is(.preview3d-status, .preview3d-body, .preview3d-missing) { color: var(--ws-dark-muted); }

/* A little space before Show all measurements, so the measurements read as their own group under the lines (23 Nov
   2026, Israa). !important: over #exportPopupModal .checkbox's margin-top. */
#exportPopupModal .checkbox.export-measurements-start { margin-top: 0.875rem !important; }

/* The pattern's own size in the grid: ticked and fixed, its name as the others (not faded like an unavailable choice). */
#exportPopupModal .export-size-list .export-size-own label { opacity: 1; cursor: default; font-weight: 600; }
#exportPopupModal .export-size-list .export-size-own input { cursor: default; }

/* "What's this export for?" at the top of the Export window (23 Nov 2026, Israa): a box like Sizes in the files, the two answers
   one under the other, the chosen one in the brand blue. */
#exportPopupModal fieldset.export-purpose legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 0.5rem;
  font-family: var(--font-family-poppins, Poppins, sans-serif);
  font-weight: 600;
  font-size: 0.9375rem;
  color: #1d2a4d;
}
#exportPopupModal fieldset.export-purpose > .checkbox { clear: both; margin: 0 0 0.375rem; }
#exportPopupModal fieldset.export-purpose input[type="radio"] { flex: none; width: 18px; height: 18px; margin: 0; accent-color: #0025e6; }
#exportPopupModal fieldset.export-purpose input[type="radio"]:checked + label { font-weight: 600; color: #0025e6; }
body[data-canvas-look="dark"] #exportPopupModal fieldset.export-purpose { border-color: var(--ws-dark-line); background: var(--ws-dark-raised); }
body[data-canvas-look="dark"] #exportPopupModal fieldset.export-purpose legend { color: var(--ws-dark-ink); }
body[data-canvas-look="dark"] #exportPopupModal fieldset.export-purpose input[type="radio"]:checked + label { color: var(--ws-dark-ink); }

/* The Export window in boxes, one kind (23 Nov 2026, Israa: "do all of what you recommend" to make it less cluttered):
   What's this export for?, Export to, Sizes in the files, Your fabric, Lines and measurements and On the files each a box
   like Sizes in the files, the same room between them, their headings the same size and no rule under them. */
#exportPopupModal .export-box {
  display: block;
  margin: 0 0 0.875rem;
  padding: 0.75rem 0.875rem 0.75rem;
  border: 1px solid #dfe3ea;
  border-radius: 0.75rem;
  background: #f7f8fb;
  max-width: 100%;
  min-width: 0;
}
#exportPopupModal #export-grades-row > fieldset.export-box { width: 100%; }
/* !important: over h3's !important */
#exportPopupModal .export-box > h3,
#exportPopupModal .export-box legend {
  float: left;
  width: 100%;
  margin: 0 0 0.5rem !important;
  padding: 0 !important;
  border: 0 !important;
  font-family: var(--font-family-poppins, Poppins, sans-serif);
  font-size: 0.9375rem !important;
  font-weight: 600;
  color: #1d2a4d;
}
#exportPopupModal .export-box > :not(h3):not(legend) { clear: both; }
/* The paper's own settings under PDF to print, in from its box. */
#exportPopupModal .export-pdf-subs { margin: 0.125rem 0 0.375rem 1.5rem; padding-left: 0.625rem; border-left: 2px solid #dfe3ea; }
/* Folded parts: Other formats, and Lines and measurements (with what is chosen in it, beside its name). */
#exportPopupModal details.export-more > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  padding: 0.25rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-family-open-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0025e6;
}
#exportPopupModal details.export-more > summary::-webkit-details-marker { display: none; }
#exportPopupModal details.export-more > summary::before { content: "›"; display: inline-block; width: 0.75rem; transition: transform 0.15s; }
#exportPopupModal details.export-more[open] > summary::before { transform: rotate(90deg); }
#exportPopupModal details.export-more > summary:focus-visible { outline: 2px solid #0025e6; outline-offset: 2px; border-radius: 4px; }
#exportPopupModal details.export-lines > summary .export-more-title { font-family: var(--font-family-poppins, Poppins, sans-serif); color: #1d2a4d; }
#exportPopupModal details.export-lines > summary::before { color: #1d2a4d; }
#exportPopupModal .export-more-now { flex-basis: 100%; padding-left: 1.25rem; font-size: 0.8125rem; font-weight: 400; color: #4a5868; }
#exportPopupModal details.export-lines[open] > summary { margin-bottom: 0.5rem; }
#exportPopupModal details.export-lines[open] .export-more-now { display: none; }
@media (prefers-reduced-motion: reduce) { #exportPopupModal details.export-more > summary::before { transition: none; } }
/* By the Export button: what the files will be, and the links to what isn't an export setting. */
#exportPopupModal .actions { flex-direction: column; align-items: center; gap: 0.5rem; }
#exportPopupModal .export-summary { margin: 0; font-size: 0.875rem; color: #4a5868; text-align: center; max-width: 36rem; }
#exportPopupModal .export-also { margin: 0; font-size: 0.875rem; color: #4a5868; }
#exportPopupModal .export-link-btn { padding: 0; border: 0; background: none; color: #0025e6; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
#exportPopupModal .export-link-btn:focus-visible { outline: 2px solid #0025e6; outline-offset: 2px; }
body[data-canvas-look="dark"] #exportPopupModal .export-box { border-color: var(--ws-dark-line); background: var(--ws-dark-raised); }
body[data-canvas-look="dark"] #exportPopupModal :is(.export-box > h3, .export-box legend, details.export-lines > summary .export-more-title, details.export-lines > summary::before) { color: var(--ws-dark-ink); }
body[data-canvas-look="dark"] #exportPopupModal :is(details.export-more > summary, .export-link-btn) { color: var(--ws-dark-link); }
body[data-canvas-look="dark"] #exportPopupModal :is(.export-more-now, .export-summary, .export-also) { color: var(--ws-dark-muted); }
body[data-canvas-look="dark"] #exportPopupModal .export-pdf-subs { border-left-color: var(--ws-dark-line); }
/* (In a box, nothing wider than it: the rows' and groups' own left indent came on top of the box's room, and the paper's
   drop-down and the size grid ran past the column, which scrolled sideways.) */
#exportPopupModal .export-box,
#exportPopupModal .export-box * { box-sizing: border-box; }
/* !important: over #exportPopupModal .checkbox's and .row's margins (and the docked panel's) */
#exportPopupModal .export-box :is(.checkbox, .checkbox-group, .row) { margin-left: 0 !important; max-width: 100%; }
#exportPopupModal .export-box .checkbox-group { display: block; }
#exportPopupModal .export-box .checkbox-group > * + * { margin-top: 0.25rem; }
#exportPopupModal .export-box :is(select, input[type="text"], input[type="number"]) { min-width: 0; max-width: 100%; }
#exportPopupModal .export-pdf-subs .row:has(> select) { flex-wrap: wrap; gap: 0.25rem 0.5rem; }
#exportPopupModal .export-pdf-subs .row select { flex: 1 1 9rem; }
/* !important: over #exportPopupModal .export-size-list's !important */
#exportPopupModal .export-box .export-size-list { margin-left: 0 !important; }
#exportPopupModal .export-on-files .row:has(> :is(select, input[type="text"])) { flex-wrap: wrap; gap: 0.25rem 0.5rem; }
#exportPopupModal .export-on-files #export-brand { flex: 1 1 100%; }
/* !important: over .export-note's and the estimates' own indents */
#exportPopupModal .export-box :is(.export-note, .export-paper-estimate) { margin-left: 0 !important; padding-left: 0; }
#exportPopupModal .export-fabric-part .row:has(> select) { flex-wrap: wrap; gap: 0.25rem 0.5rem; }
#exportPopupModal .export-fabric-part .row select { flex: 1 1 9rem; }
