/* Deterministic Review — fixed aperture band + sentence anchors (DOC-805740E67D67).
   Light theme. The band is a fixed reading line the text slides under. */
#gce-review-band {
  position: fixed;
  left: 0; right: 0;
  top: 50%;               /* the fixed reading line = the aperture's CENTER, at mid-screen
                             (operator 2026-08-23: center of aperture at middle of screen,
                             equal text above and below). Text is eased so the lit span
                             straddles this line; the frame is drawn centered on it. */
  z-index: 9997;
  pointer-events: none;
}
#gce-review-band .rb-line {
  height: 0; border-top: 2px dashed rgba(37, 99, 235, .45);
  box-shadow: 0 0 0 9999px rgba(0,0,0,0);   /* no dim; the band is a guide, not a mask */
}
/* the sentence currently in the band, on each side — a VISIBLE aperture FRAME
   (operator 2026-08-21 "the aperture is missing"): a ring that sizes to the current
   sentence and holds at the fixed line, so you can see the aperture, not just a tint. */
/* The lit sentences are just a soft TINT (the read text). The visible aperture is ONE
   frame drawn around the whole lit span (see #gce-review-aperture) — operator 2026-08-22:
   "i'm missing the aperture" — a multi-sentence span drawn as per-sentence boxes read as a
   cluster, not a window. Tint inside + one frame around = a single clear reading window. */
.gce-sen.gce-sen-band, .gce-sen-block.gce-sen-band {
  /* Fallback MUST match every other read mark. This one said #fef9c3 (opaque pale
     yellow) while the other 18 uses of --gce-read-mark-c say rgba(250,204,21,.38)
     (translucent amber, and also PALETTE[0] in the 🎨 swatch). The variable is only
     set once the operator cycles the swatch, so until then the lit read text was a
     visibly different yellow from the scout's marks -- operator 2026-09-02: "yellow
     highlight is slighlly inconsistent". One value, everywhere. */
  /* THE LIGHT IS THE WINDOW, NOT THE WORDS (operator 2026-09-02: "just pain the whole inside
     of the apperature"). Per-sentence tinting is what created something to mis-sync: a
     highlight painted on the text, a frame drawn from a different reference line, and the two
     visibly disagreeing. The frame now carries the reading light (see .gce-review-aperture)
     and the text simply passes through it, so there is nothing left to line up.
     The .gce-sen-band CLASS still marks which sentences are being read -- the scout, the
     spine emit and the fit-to-frame trim all key on it. Only the paint moved. */
  background: transparent;
  border-radius: 3px;
  scroll-margin: 0;
}
/* THE APERTURE — one reading WINDOW per column, drawn around the whole lit span, held at
   the fixed horizon. A crisp accent frame + soft halo + lift so it is unmistakable. */
.gce-review-aperture {
  position: fixed;
  z-index: 9996;                 /* above the text, below the band line (9997) + controls */
  pointer-events: none;
  /* The reading light. Same --gce-read-mark-c the 🎨 swatch drives and every other read mark
     uses, so the colour stays one value across the app; it is simply painted on the WINDOW
     now instead of on individual sentences. */
  background: var(--gce-read-mark-c, rgba(250,204,21,.38));
  border: 2.5px solid #2563eb;
  border-radius: 8px;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, .10), 0 6px 22px rgba(37, 99, 235, .28);
  transition: top .18s ease, height .18s ease, left .18s ease, width .18s ease;
}
/* PER-APERTURE CONTROL CLUSTER (operator 2026-08-23, "full cluster per window"): ⏸ − ＋ ✎ ✨
   pinned to each window's top-right edge. The frame is pointer-events:none; the cluster
   re-enables pointer events so its buttons are clickable. Light theme, pill, floats on the
   top border so it never covers the lit text. */
.gce-ap-controls {
  position: absolute; top: -15px; right: 8px;
  display: flex; gap: 1px; align-items: center;
  pointer-events: auto;
  background: #fff; border: 1px solid #d1d5db; border-radius: 999px;
  padding: 2px 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.gce-ap-controls button {
  border: 0; background: transparent; cursor: pointer; font: inherit;
  font-size: 13px; line-height: 1; padding: 3px 6px; border-radius: 999px; color: #111827;
}
.gce-ap-controls button:hover { background: #f3f4f6; }
.gce-ap-controls button:disabled { opacity: .35; cursor: default; }
/* the gap marker shown on the side that has no counterpart for this row */
.gce-review-gap {
  margin: 4px 0; padding: 4px 10px;
  font: 600 12px system-ui; color: #7c2d12;
  background: #ffedd5; border: 1px solid #fdba74; border-radius: 8px;
  display: inline-block;
}
/* the paced-walk control bar */
#gce-review-controls {
  position: fixed; top: 64px; right: 16px; z-index: 9998;
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #d1d5db; border-radius: 999px;
  padding: 5px 10px; box-shadow: 0 2px 8px rgba(0,0,0,.12); font: 600 12px system-ui; color: #111827;
}
#gce-review-controls button {
  border: 1px solid #d1d5db; background: #f8fafc; color: #111827;
  border-radius: 7px; padding: 3px 9px; cursor: pointer; font-size: 12px;
}
#gce-review-controls button:hover { border-color: #2563eb; color: #2563eb; }
#gce-review-controls .rc-pos { min-width: 84px; text-align: center; color: #374151; }
#gce-review-controls .rc-close { border-color: #e5e7eb; color: #9ca3af; }

/* LOCKED REVIEW COLUMNS (operator 2026-08-21): during a read #sections becomes a
   fixed-height row and the two active panes are equal side-by-side columns, each
   showing only its document, scrolling under the fixed band. Removed on close so
   the normal page layout returns. Replaces the fragile per-frame height mutation. */
#sections.gce-review-cols {
  display: flex !important;
  gap: 14px;
  align-items: stretch;
  height: var(--rev-col-h, calc(100vh - 120px)) !important;
  overflow: hidden !important;
}
/* the destructive hide is gated on BOTH the class AND the active-review body flag,
   so a lingering class alone can never hide a freshly-seated doc (operator 2026-08-21) */
body.gce-reviewing #sections.gce-review-cols > .section { display: none !important; }
/* SPECIFICITY (operator 2026-08-21 "docs disappear in reading mode"): the column
   show-rules MUST out-specify the hide above (which carries body.gce-reviewing). All
   three carry body.gce-reviewing too so they win — else the hide nukes the columns
   themselves and the center goes blank. This was the reading-mode regression. */
body.gce-reviewing #sections.gce-review-cols > .section.gce-review-col {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}
/* reading view: show the document, hide the editor chrome for the duration */
body.gce-reviewing #sections.gce-review-cols > .section.gce-review-col > *:not(.frame-preview) { display: none !important; }
body.gce-reviewing #sections.gce-review-cols > .section.gce-review-col .frame-preview {
  display: block !important;
  flex: 1 1 auto !important;
  min-height: 0;
  height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden;
}

/* during a read, hide the leftover doc-stack tray + wall column heads (operator
   2026-08-21 "ui a bit broken": they showed above the columns, misleading) */
body.gce-reviewing #gce-stack-tray,
body.gce-reviewing .gce-colhead { display: none !important; }

/* ───── COLUMN COLOUR = SCOUT COLOUR (operator 2026-09-02) ─────
   "now scout sees left colum as blue / middle grren / not sure but i think the right is
    orange perhaps we need some coloring on the colums themseels so the user knows at a
    glance which colum is which to match to scout out put"
   The scout already colours its per-column chips from _ATTR_COL in gce-scout-margin.js:
     col 1 #2563eb (blue) · col 2 #16a34a (green) · col 3 #d97706 (amber)
   These are the SAME three values, so a column and its scout output read as one thing.
   Kept to a top edge + a corner index so the document itself is not tinted (the read
   highlight is the only colour that should sit on the text). */
body.gce-reviewing #sections.gce-review-cols > .section.gce-review-col[data-rev-col="0"] { --rev-col-c: #2563eb; }
body.gce-reviewing #sections.gce-review-cols > .section.gce-review-col[data-rev-col="1"] { --rev-col-c: #16a34a; }
body.gce-reviewing #sections.gce-review-cols > .section.gce-review-col[data-rev-col="2"] { --rev-col-c: #d97706; }
body.gce-reviewing #sections.gce-review-cols > .section.gce-review-col[data-rev-col] {
  border-top: 3px solid var(--rev-col-c, #d1d5db);
  border-radius: 6px 6px 0 0;
  /* A RESERVED STRIP for the badge. Measured after centring it: the badge sat over 2 text
     elements in every column -- centring moved it off the clear left margin and onto the
     document. An absolutely-positioned label can never be trusted not to cover content, so
     the column reserves the space instead and the text starts below it. */
  padding-top: 24px;
}
/* THE COLUMN BADGE (operator 2026-09-02: "the colum 1 2 3 labels dont fit nicely at top of
   colums ... we need this to be nice and symetrical and polished").
   It was a corner pill at top:4px/left:8px -- three labels of differing text length, hard
   against the left edge, reading as debug output rather than part of the wall.
   Now: CENTRED on each column (so the three are symmetrical), a fixed min-width so every
   badge is the same size whatever it says, outlined in that column's own colour to tie it to
   the 3px top edge, and seated in the sheet's top margin so it never sits on text. */
body.gce-reviewing #sections.gce-review-cols > .section.gce-review-col[data-rev-col]::before {
  content: "■ " attr(data-rev-col-label);
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%); z-index: 7;
  min-width: 34px; text-align: center;
  font: 600 9.5px/15px system-ui; letter-spacing: .06em;
  color: var(--rev-col-c, #6b7280);
  background: #fff;
  border: 1px solid var(--rev-col-c, #d1d5db);
  border-radius: 999px;
  padding: 0 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  pointer-events: none;   /* a label, never a click target */
}

/* ───── A DOCUMENT THAT HAS FINISHED READING (operator 2026-09-02) ─────
   "when the document runs out the aperatures close one at a time till the last document
   closes". Its window is already hidden by the reader; this makes the state visible on the
   wall so the operator can see WHICH documents are done rather than guessing why one window
   vanished. Muted top edge + a quiet label, nothing that moves. */
body.gce-reviewing #sections.gce-review-cols > .section.gce-review-col[data-rev-done] {
  border-top-color: #d1d5db;
}
/* Finished: the SAME footprint -- one glyph plus the number -- so a column completing its
   read never nudges the layout. Colour carries the state, not length. */
body.gce-reviewing #sections.gce-review-cols > .section.gce-review-col[data-rev-done]::before {
  content: "✓ " attr(data-rev-col-label);
  color: #9ca3af;
  border-color: #d1d5db;
}
