/* ============================================================
   css/spec-compose.css — the proportions of the Excel master, in CSS.

   Every ratio here is measured, not chosen. From
   PM MASTER_Frame_template 12.23 LS.xlsx, "Design Spec" sheet:

     · a 9-column grid, column 5 acting as the gutter
     · field table: label merged A:C (3/9 = 33%), value D:I (6/9 = 67%)
     · big-left + grid band: big image cols 1–5, references cols 6–9  (5fr / 4fr)
     · across band: three equal thirds (cols 1–3, 4–6, 7–9)
     · ~36 rows to a page, so one master row ≈ 2.78% of the page body

   THE IMAGES ARE THE POINT. On the master, page 1 is a single 30-row image and
   nothing else — 83% of the page. /design-spec renders 92px thumbnails inside
   stacked field tables, which is the inversion Weisha was describing with
   "you need to be very image heavy". Image heights below are set from the
   master's row counts, not from what looks tidy.
   ============================================================ */

:root {
  --sc-page-w: 794px;                 /* A4 at 96dpi */
  --sc-page-h: 1123px;
  --sc-pad: 38px;
  --sc-row: 27.9px;                   /* (1123 - 2*38) / 36 master rows */
  --sc-ink: #252525;
  --sc-line: #d4d0cb;
  --sc-slate: #254859;
  --sc-mid: #487184;
  --sc-clay: #b3a169;
  --sc-clay-text: #73663a;
  --sc-paper: #ffffff;
}

.sc-page {
  width: var(--sc-page-w);
  height: var(--sc-page-h);
  padding: var(--sc-pad);
  background: var(--sc-paper);
  box-shadow: 0 6px 30px rgba(37, 72, 89, .16);
  border-radius: 3px;
  position: relative;
  overflow: hidden;                   /* a printed page cuts; it does not stretch */
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sc-pagemark {
  position: absolute; left: -52px; top: 0;
  font-family: 'DM Mono', ui-monospace, monospace; font-size: 9.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--sc-mid);
  writing-mode: vertical-rl;
}

/* sheet header — master rows 1–2, above the hero */
.sc-head { border-bottom: 2px solid var(--sc-slate); padding-bottom: 8px; flex: 0 0 auto; }
.sc-head h1 { font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 700; line-height: 1.1; margin: 0; }
.sc-meta { font-family: 'DM Mono', ui-monospace, monospace; font-size: 11px; color: var(--sc-mid); margin-top: 3px; }

/* ── bands ─────────────────────────────────────────────────── */
.sc-band { position: relative; flex: 0 0 auto; }
.sc-bh {
  font-family: 'DM Mono', ui-monospace, monospace; font-size: 10px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; color: var(--sc-clay-text);
  border-bottom: 1px solid #eee6d6; padding-bottom: 4px; margin-bottom: 8px;
}
.sc-bh span {
  font-family: inherit; text-transform: none; letter-spacing: 0;
  color: var(--sc-mid); font-weight: 400; margin-left: 8px;
}
.sc-grip {
  position: absolute; left: -18px; top: 2px; width: 14px;
  font-family: 'DM Mono', ui-monospace, monospace; font-size: 12px; line-height: 1;
  letter-spacing: -2px; color: #c8c3ba; cursor: grab; user-select: none; display: none;
}
body.sc-arranging .sc-grip { display: block; }
.sc-band:hover .sc-grip { color: var(--sc-clay-text); }

/* ── IMAGE ROWS ─────────────────────────────────────────────
   Both band shapes are the same primitive now: a wrapping flex row whose
   items carry their OWN width. They used to be a grid of equal columns, which
   made "two pictures side by side at different sizes" — page 1 of every real
   spec sheet — impossible to express.

   The gutter is padding on the items and a negative margin on the row, not
   `gap`, so --wpct is the TRUE fraction of the page. With `gap`, two 50%
   items overflow by exactly one gutter and wrap to separate lines. */
.sc-full, .sc-across { display: flex; flex-wrap: wrap; align-items: flex-start;
  margin: 0 -6px; }
.sc-full > *, .sc-across > * {
  flex: 0 0 var(--wpct, 100%); max-width: var(--wpct, 100%);
  padding: 0 6px; margin-bottom: 12px; box-sizing: border-box;
}

/* ── BIGGRID: master rows 83–104. Big image cols 1–5, its hardware
      references cols 6–9 in two columns. ─────────────────────── */
.sc-biggrid { display: grid; grid-template-columns: 5fr 4fr; gap: 16px; align-items: start; }
.sc-bg-right { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; align-content: start; }
/* One or two reference images take the whole column rather than sharing it.
   The right column is 4 of the biggrid's 9 fractions (~312px of 718), which is
   what the master gives its backing picture (334px of 590). Three or more stay
   two-up: that is frame's four-reference grid, and it is small on the master
   too. */
.sc-bg-right.sc-bg-few { grid-template-columns: 1fr; }
/* The wide-reference row, beneath both columns. Full sheet width, because the
   whole point of moving it out of the column was to make its text readable. */
.sc-bg-wide { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 12px; }

/* ── images ────────────────────────────────────────────────── */
.sc-fig { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.sc-imgwrap { position: relative; display: block; line-height: 0; }
.sc-fig img {
  display: block; width: 100%;
  /* object-fit:contain so nothing the designer photographed is cropped away
     without them asking. The master's cells letterbox the same way. */
  object-fit: contain; background: #fbfaf8;
  border: 1px solid var(--sc-line); border-radius: 3px;
}
/* Heights from the master's row counts — the FALLBACK, used only until an
   image has been measured. 1 master row = var(--sc-row). */
.sc-full  .sc-fig img { height: calc(var(--sc-row) * 28); }   /* 30 rows less caption */
.sc-across .sc-fig img { height: calc(var(--sc-row) * 9); }   /* 11 rows less caption */

/* MEASURED: the picture keeps its own proportions, so a landscape photo is
   short and a portrait is tall, exactly as they sit in the workbook. This is
   what stops a wide drawing being letterboxed into a 9-row slot with white
   space above and below it. Wins over every fixed height above, including
   .sc-big, because it is strictly more specific and comes later. */
/* ⚠ EVERY fixed-height class needs its own .sc-ar pairing. These selectors are
   the SAME specificity as the .sc-big / .sc-small rules below, so source order
   decides — and those come later. .sc-big was paired here; .sc-small was not,
   so a measured small reference image stayed locked at 4.6 rows and was
   letterboxed into a short box whatever its real shape. Weisha's backing
   picture drew 312x128 where its own proportions make it 312x255, which is
   what made it read as missing beside the workbook. */
.sc-fig.sc-ar img, .sc-fig.sc-ar.sc-big img, .sc-fig.sc-ar.sc-small img {
  height: auto; aspect-ratio: 1 / var(--ar);
  /* Never taller than one page. Must stay in step with MAX_IMG_ROWS in
     js/spec-compose.js: the composer counts rows to decide page breaks, and if
     it thinks a picture is 40 rows while the page draws it as 30, every break
     after it is wrong. A picture too tall for a page is letterboxed rather
     than clipped — the page has overflow:hidden, so clipping it would hide
     the picture AND the controls that could resize it. */
  max-height: calc(var(--sc-row) * 30);
}
.sc-fig.sc-big img     { height: calc(var(--sc-row) * 20); }  /* 22-row band */
.sc-fig.sc-small img   { height: calc(var(--sc-row) * 4.6); } /* the 6-row grid cells */
.sc-fig figcaption {
  font-family: 'DM Mono', ui-monospace, monospace; font-size: calc(9px * var(--nz, 1)); color: var(--sc-mid);
  padding-top: 3px; text-align: center; line-height: 1.35;
}
.sc-note { font-size: calc(11px * var(--nz, 1)); line-height: 1.45; color: var(--sc-ink); padding-top: 4px; }
.sc-marks { position: absolute; inset: 0; pointer-events: none; }
.sc-marks svg { width: 100%; height: 100%; display: block; }

/* ── TABLE: master rows 37–53. Label A:C (33%), value D:I (67%). ── */
.sc-table { display: grid; grid-template-columns: 33% 1fr; column-gap: 14px; }
.sc-table > div {
  padding: 3px 6px; font-size: 11.5px; line-height: 1.35;
  border-top: 1px solid #ece9e4;
}
.sc-table > div:nth-child(1), .sc-table > div:nth-child(2) { border-top: none; }
.sc-k { color: var(--sc-mid); background: #f7f5f2; font-weight: 500; }
.sc-v { color: var(--sc-ink); font-weight: 500; }
.sc-na { color: #c2bdb4; font-style: italic; font-weight: 400; }
.sc-table-tight > div { font-size: 10.5px; padding: 2px 5px; }
.sc-chip {
  display: inline-block; font-family: 'DM Mono', ui-monospace, monospace; font-size: 10px;
  background: #f3efe2; border: 1px solid #e5dcca; border-radius: 4px; padding: 1px 6px;
}

/* An overfull page says so rather than letting it be discovered in the PDF. */
.sc-overflow {
  position: absolute; left: 0; right: 0; bottom: 4px; text-align: center;
  font-family: 'DM Mono', ui-monospace, monospace; font-size: 9.5px; color: #B4452A;
}

/* ── intake: editing on the sheet itself ─────────────────────
   "you can add text to a image" — Renee, 8/29. The caption and the note are
   contenteditable in place rather than behind a dialog, because typing where
   you can see it is what Excel gives them and a modal is not. Placeholders
   only exist while editing; nothing empty ever prints. */
[contenteditable][data-edit] { outline: none; border-radius: 3px; }
[contenteditable][data-edit]:hover { background: #fbf7ec; box-shadow: 0 0 0 1px #ece3cd; }
[contenteditable][data-edit]:focus { background: #fff; box-shadow: 0 0 0 2px var(--sc-clay); }
/* ⚠ Placeholders are an EDITING AFFORDANCE, NOT SHEET CONTENT. Shown always,
   they printed "caption..." and "instruction for the factory..." under every
   single image, and the sheet read as a blank form rather than a spec — which
   is exactly what it looked like on Renee's first real run. An empty caption
   contributes nothing to a spec sheet and must show nothing.
   So: reveal on hover of the figure, or while focused. The empty box keeps a
   line of height so there is still something to click. */
[contenteditable][data-edit]:empty::before { content: ''; }
[contenteditable][data-edit]:empty { min-height: 1.1em; }
/* ⚠ .sc-noteonly TOO, not just .sc-fig. A new text block is born empty, and
   the placeholder was scoped to figures -- so pressing "+ Text" produced a
   blank 1.1em box with nothing in it and no hint, on a white sheet. The block
   was really there; there was simply nothing to see, which reads as a button
   that does nothing. Renee, 9/2: "those buttons still dont work." */
.sc-fig:hover [contenteditable][data-edit]:empty::before,
.sc-noteonly:hover [contenteditable][data-edit]:empty::before,
body.sc-arranging .sc-item:hover [contenteditable][data-edit]:empty::before,
[contenteditable][data-edit]:focus:empty::before {
  content: attr(data-ph); color: #bdb7ae; font-style: italic;
}
.sc-fig { position: relative; }
.sc-del {
  position: absolute; top: 4px; left: 4px; z-index: 3; display: none;
  font: inherit; font-size: 11px; line-height: 1; padding: 3px 6px; cursor: pointer;
  background: rgba(255,255,255,.94); color: #B4452A;
  border: 1px solid var(--sc-line); border-radius: 5px;
}
body.sc-intake .sc-fig:hover .sc-del { display: block; }

/* The role selector — "what is this picture?". An editing control, so it is
   hover-only and never part of the sheet, same rule as the remove button. */
.sc-role {
  position: absolute; top: 4px; right: 4px; z-index: 3; display: none;
  font-family: 'DM Sans', sans-serif; font-size: 10px; max-width: 62%;
  padding: 2px 4px; border: 1px solid var(--sc-line); border-radius: 5px;
  background: rgba(255,255,255,.94); color: var(--sc-slate);
}
body.sc-intake .sc-fig:hover .sc-role { display: block; }
/* Out of the way of the mark-up button, which owns the same corner. */
body.marking .sc-fig .sc-role { display: none !important; }

/* An editable construction value. Same affordance as the caption: invisible
   until you go near it, so the sheet still reads as a sheet. */
.sc-v[contenteditable] { cursor: text; }
.sc-v[contenteditable]:hover { background: #fbf7ec; box-shadow: inset 0 0 0 1px #ece3cd; }
.sc-v[contenteditable]:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--sc-clay); }

/* A suggested role for an image imported from a workbook. An editing
   affordance, so it never prints — and it is a BUTTON, because accepting it is
   a decision the designer takes, not one the import took for them. */
.sc-sugg {
  display: none; margin-top: 4px; width: 100%; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 10.5px; line-height: 1.3;
  padding: 4px 7px; text-align: left;
  background: #fbf7ec; color: var(--sc-clay-text);
  border: 1px dashed var(--sc-clay); border-radius: 5px;
}
.sc-sugg b { font-weight: 500; }
.sc-sugg:hover { background: #f6efdc; }
body.sc-intake .sc-sugg { display: block; }

/* The printed page number. Absolute, inside the page's own bottom padding, so
   it never takes part in the flow and cannot change where a band breaks. */
.sc-pagefoot {
  position: absolute; left: var(--sc-pad); right: var(--sc-pad); bottom: 14px;
  display: flex; justify-content: space-between; gap: 12px;
  font-family: 'DM Mono', ui-monospace, monospace; font-size: 8.5px;
  letter-spacing: .04em; color: var(--sc-mid);
  border-top: 1px solid #ece9e4; padding-top: 5px;
}
/* The standing instruction to the factory — red, as the master prints it. */
.sc-pagefoot .sc-footnote { color: #C00000; letter-spacing: 0; text-align: right; }

/* The printed header: design number · product · Designer / PM. In the top
   margin, like the footer is in the bottom one, so the printable box the
   items are placed against does not move by a pixel. */
.sc-pagehead {
  position: absolute; left: var(--sc-pad); right: var(--sc-pad); top: 12px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-family: 'DM Sans', system-ui, sans-serif; font-size: 9.5px; color: var(--sc-ink);
  border-bottom: 1px solid #ece9e4; padding-bottom: 4px;
}
.sc-pagehead .l { font-weight: 700; font-size: 11px; white-space: nowrap; }
.sc-pagehead .c { flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-pagehead .r { font-size: 8.5px; color: var(--sc-mid); white-space: nowrap; }
.sc-pagehead span:empty { min-width: 1px; }
/* The design team's own workbook note, on the sheet as it is on /design-spec. */
.sc-k .ktip { color: var(--sc-clay-text); cursor: help; font-size: 10px; }
.sc-k .ktip:hover, .sc-k .ktip:focus { color: #B4452A; outline: none; }

/* A workbook instruction that belongs to no particular picture. It is content,
   so it prints — no frame, no caption slot, just the words. */
.sc-noteonly {
  border-left: 3px solid var(--sc-clay); background: #fbf7ec;
  padding: 7px 10px; border-radius: 0 4px 4px 0;
}
.sc-noteonly .sc-note { padding-top: 0; }
/* An empty standalone block needs a big enough target to aim at -- 1.1em of
   nothing on a white page is not something anyone can find or click. */
.sc-noteonly .sc-note:empty { min-height: 1.6em; }
/* A free text block carries its own size as a multiplier on the base 11px, so
   one written BIG stays big on the approver's copy and in the factory's file —
   the size is content, not a canvas preference. */
.sc-noteonly { line-height: 1.4; }
/* THE WORDS TAKE THE BLOCK'S COLOUR AND SPACING. The formatting is written on
   the wrapper (textStyle on .sc-noteonly); the base .sc-note rule set its own
   colour, so a block coloured blue, or turned white on a dark bar, stayed ink
   on every surface while its record said otherwise. Inherit, so the wrapper
   decides and an unformatted block still reads in the page's ink. */
.sc-noteonly .sc-note { font-size: calc(11px * var(--nz, 1)); line-height: inherit; color: inherit; }

/* The band is the positioning context for its own controls (.cvb-ctl, styled
   on the canvas page). Bottom padding keeps them off the last row of content. */
.sc-band { position: relative; }
body.sc-arranging .sc-band { padding-bottom: 22px; }

/* A band that has been told to start a page. The rule is drawn ABOVE it and
   only while arranging: on the printed sheet the break IS the page ending, so
   a line saying so would be noise. */
body.sc-arranging .sc-band.sc-brk::before {
  content: 'starts a new page';
  position: absolute; left: 0; right: 0; top: -9px;
  font-family: 'DM Mono', ui-monospace, monospace; font-size: 8px;
  letter-spacing: .08em; text-transform: uppercase; color: #B4452A;
  border-top: 1px dashed #B4452A; padding-top: 2px;
}

/* A photo you can reorder by dragging. Only in the additional band, and only
   while arranging — everywhere else an image's place is its role's, so a grab
   cursor there would promise something that cannot happen. */
body.sc-arranging .sc-band[data-band="additional"] .sc-fig.cv-draggable { cursor: grab; }
body.sc-arranging .sc-band[data-band="additional"] .sc-fig.cv-draggable:hover {
  outline: 1px dashed var(--sc-clay); outline-offset: 3px;
}
body.sc-arranging .sc-fig.drag { opacity: .55; cursor: grabbing; }
body.dragging { cursor: grabbing; user-select: none; }

/* The reorder hint sits left of the buttons, not among them — it is a label,
   and reading as a fourth button would invite a click that does nothing. */
.cvb-ctl .cvb-hint { margin-left: 0; margin-right: auto; font-style: italic; }

/* ══ FREE PLACEMENT ══════════════════════════════════════════
   Every item is absolutely placed inside the page's content box. The page
   keeps overflow:hidden — a printed page still cuts — so the editor's job is
   to stop anything being dropped where it would be cut, rather than to let
   the page grow and hide the problem until it prints. */
.sc-page.sc-free { display: block; }
/* THE positioning context. Exactly the content box, so an item's percentages
   are percentages of the printable area and nothing else. */
.sc-freebox { position: absolute; left: var(--sc-pad); top: var(--sc-pad);
  right: var(--sc-pad); bottom: var(--sc-pad);
  /* Its own stacking context: Send to back can give a picture or a line a
     negative z-index, which must mean "under everything on this page", never
     "under the white of the page itself". z-index as well as isolation,
     because the PDF is drawn by html2canvas, which knows the one and not the
     other. */
  isolation: isolate; z-index: 0; }
/* The page's own lines: one <svg> per line, over the whole content box,
   above every item. The svg itself lets clicks through; only the stroke is
   hit, so a leader can be picked up without stealing the page. */
.sc-pageline { position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  overflow: visible; pointer-events: none;
  /* On top of every item (items sit at z+10). The canvas always showed lines
     here; the preview and the PDF used 5, under any picture with a z, so an
     arrow drawn on top came out behind the picture (9/25). A line with its own
     z (Bring to front / Send to back) carries an inline z-index instead. */
  z-index: 900; }
.sc-pageline line, .sc-pageline polygon, .sc-pageline ellipse, .sc-pageline polyline { pointer-events: visibleStroke; }
.sc-pageline polygon { pointer-events: visibleFill; }
/* A RECTANGLE OR AN ELLIPSE IS GRABBED ANYWHERE INSIDE IT, filled or not --
   the way a box is picked up in Canva. `all` hit-tests the interior whatever
   the paint. (rect and polyline were not in the list above at all, so a drawn
   square inherited pointer-events:none from the svg and could not be touched:
   "you can't really move the square around", Ryan 9/8.) */
.sc-pageline rect, .sc-pageline ellipse { pointer-events: all; }
/* The invisible wide twin of a thin line, drawn only on the canvas, so a
   hairline can be picked up without aiming at four pixels. */
.sc-pageline .sc-hit { pointer-events: stroke; }
body.sc-arranging .sc-pageline line:hover, body.sc-arranging .sc-pageline ellipse:hover,
body.sc-arranging .sc-pageline polygon:hover { cursor: pointer; filter: drop-shadow(0 0 2px #B4452A); }
.sc-item {
  position: absolute;
  /* left/top/width come from the item; height is never set, because an image's
     height is its own proportions and a table's is its rows. */
}
.sc-page.sc-free .sc-item { box-sizing: border-box; }
/* An item asked to draw its own box. Padding is inside the border because the
   width is a percentage of the page: putting it outside would make a boxed
   item wider than the same item unboxed, and every neighbour would shift the
   moment someone ticked Box. */
.sc-item.sc-boxed { border: 1px solid var(--sc-rule, #b9b2a4); padding: 6px 8px; }

/* An image item told exactly how tall to be — an imported workbook layout.
   The box wins and the picture is fitted inside it, never stretched: Excel
   squashes some anchors, and matching its SPACING matters more than matching
   its distortion. contain, so nothing is cropped either. */
.sc-item.sc-boxh { overflow: hidden; }
.sc-item.sc-boxh .sc-fig { height: 100%; margin: 0; }
.sc-item.sc-boxh .sc-imgwrap { display: block; height: 100%; }
/* FILL, not contain: a picture given a box from the workbook is drawn to that
   box the way Excel draws it — Excel stretches a picture to its anchor and
   does not keep its proportions (the hamper's oak swatch prints square on
   page 7 from a portrait file). Letterboxing it was "correct" and wrong. */
.sc-item.sc-boxh .sc-imgwrap img { width: 100%; height: 100%; object-fit: fill; }
/* A FIT BOX NOT YET MEASURED (10/1, the Dynasty page 1). The box is a maximum:
   the picture keeps its own shape inside it, centred, its caption under it.
   Drawn only until the surface knows the file's proportions -- then the
   composer places it at fitBox()'s width with no box at all, so marks sit on
   the picture exactly. */
.sc-item.sc-fitbox { overflow: hidden; container-type: size; }
.sc-item.sc-fitbox .sc-fig { align-items: center; }
.sc-item.sc-fitbox .sc-imgwrap { width: fit-content; max-width: 100%; }
.sc-item.sc-fitbox .sc-fig img { width: auto; max-width: 100%; height: auto; max-height: calc(100cqh - 18px); }
/* NO FRAME ON A FREE-PLACED PICTURE. The cream ground and hairline are the
   composed sheet's furniture; on a page laid out from a workbook they hide
   whatever a picture overlaps — the back-view drawing on the hamper's page 4
   lost its lower half under the callout picture's white box, where Excel
   shows both because the PNG is transparent. */
.sc-page.sc-free .sc-fig img { background: transparent; border: none; border-radius: 0; }
/* A CROPPED PICTURE: the wrapper is the window (its aspect is the kept part's),
   the image is positioned inside it by inline style from the composer. Later
   than every sizing rule above so the inline geometry is what draws. */
.sc-imgwrap.sc-crop { overflow: hidden; display: block; }
/* max-height too (10/5, Sera's MCS-26-00176 page 7): a crop enlarges the whole
   file inside the window, often to several pages tall, and the "never taller
   than one page" cap on .sc-fig.sc-ar img squashed it -- the window then showed
   blank paper. The window itself is what must fit the page, and it does. */
.sc-fig .sc-imgwrap.sc-crop img { position: absolute; max-width: none; max-height: none; border: none; border-radius: 0; background: transparent; object-fit: fill; }
.sc-imgwrap.sc-crop .sc-marks { inset: auto; }
/* A hand-placed note is where the designer put it; it does not need a rule
   and a cream ground to say it is an instruction. The explicit Box tool and
   the highlight colours still work on top -- both are set on the item or on
   the note itself, so they win over this. */
.sc-item.sc-plainnote .sc-noteonly {
  border-left: 0; background: none; padding: 0; border-radius: 0;
}
.sc-item.sc-boxed > .sc-band { padding-bottom: 0; }
/* A boxed text block fills its box with the highlight rather than painting a
   coloured strip around the words -- which is what makes a header bar. */
.sc-item.sc-boxed .sc-noteonly { margin: -6px -8px; padding: 6px 8px; }
.sc-item > .sc-band { padding-bottom: 0; }
.sc-item .sc-fig { width: 100%; }

/* Editing affordances — arrange mode only, never printed. */
body.sc-arranging .sc-page.sc-free .sc-item { cursor: grab; }
body.sc-arranging .sc-page.sc-free .sc-item:hover { outline: 1px dashed var(--sc-clay); outline-offset: 2px; }
body.sc-arranging .sc-page.sc-free .sc-item.drag { opacity: .6; cursor: grabbing; }
.sc-item .sc-grab {
  position: absolute; right: -4px; top: 50%; width: 10px; height: 34px;
  margin-top: -17px; border-radius: 3px; background: #B4452A; opacity: 0;
  cursor: ew-resize; z-index: 5;
}
body.sc-arranging .sc-page.sc-free .sc-item:hover .sc-grab { opacity: .85; }
@media print { .sc-grab { display: none !important; } }

/* ══ PRINT / EXPORT ══════════════════════════════════════════
   Everything here exists only so a person can EDIT the sheet. On paper, and in
   the copy a factory receives, none of it is content. js/design-spec.js also
   strips these from the PDF clone — html2canvas rasterises the live DOM and
   never runs a print rule, so the CSS alone would have been a fix that changed
   nothing. Both, deliberately. */
@media print {
  .sc-chip, .ktip, .mchat, .cv-w, .cv-tz, .cv-ttools, .cvb-ctl, .sc-grab, .sc-grip,
  .cv-boxtools, .sc-grabv,
  .sc-sugg, .cv-markbtn, .sc-del, .sc-role, .sc-pagemark, .sc-overflow {
    display: none !important;
  }
  .sc-page { box-shadow: none; break-inside: avoid; page-break-inside: avoid; }
  [data-edit]:empty::before { content: none !important; }
}
/* The 💬 chip on the composed sheet: an affordance, so it is quiet and it is
   never part of the printed page. */
.sc-chip { display: block; margin-top: 3px; }

/* Why a band moved to this page. Only ever rendered on the editable canvas
   (bandHtml gates on ctx.editable), so it cannot reach a factory's sheet or a
   PDF export. Quiet, not an error: nothing is wrong, the page was just full. */
.sc-moved{
  font: 400 10.5px/1.45 'Inter', system-ui, sans-serif;
  color:#6b6258; background:#fdf8ec; border:1px solid #e8ddc2;
  border-radius:5px; padding:4px 7px; margin:3px 0 6px;
}
