/* Leggie's draft page (spec section 6): the summary, then the review column,
   then the bill. At 1024px and wider the column sits to the right of the
   bill, sticky, and scrolls on its own; below that it comes first. Marks on
   the bill never use underline, strikethrough or capitals, which carry
   current-law meaning, and nothing here resets the browser's own text
   decoration on the bill's ins, del and u. Only a fix card's Before and
   After text uses ins and del for its own marks, styled as a highlight. */

.draft-review [hidden] { display: none !important; }

/* In-page text links: the page's teal, underlined just below the text,
   darker on hover. */
.draft-review :is(.draft-review-note, .draft-review-empty, .draft-review-lock, .draft-provision-links) a { color: #0f766e; text-decoration: underline; text-underline-offset: 2px; }
.draft-review :is(.draft-review-note, .draft-review-empty, .draft-review-lock, .draft-provision-links) a:hover { color: #115e59; }

/* What the last action did. A saved action's news is neutral; a refused
   action's, the lock's included (data-warning), is amber like the lock line. */
.draft-review-announcement:not(:empty) { margin-bottom: .75rem; padding: .75rem; border: 1px solid #e7e5e4; border-radius: .375rem; background: #fafaf9; color: #1c1917; font-size: .875rem; }
.draft-review-announcement:has(> [data-warning]) { border-color: #fcd34d; background: #fffbeb; color: #451a03; }
/* Words the read-only page took away when the draft locked, under the
   announcement: plain text the reader can select and copy, in the bill's
   type, each under what it was about. Empty, it shows nothing but stays in
   place, so a screen reader hears it when it fills. */
.draft-review-unsent:not(:empty) { margin-bottom: .75rem; padding: .75rem; border: 1px solid #e7e5e4; border-radius: .375rem; background: #fff; color: #1c1917; font-size: .875rem; }
.draft-review-unsent-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.draft-review-unsent-label { color: #57534e; font-size: .75rem; font-weight: 500; }
.draft-review-unsent-words { margin: .125rem 0 0; padding: .375rem .625rem; border-left: 2px solid #d6d3d1; background: #fafaf9; font-family: "Times New Roman", Times, serif; font-size: .9375rem; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }

/* Header controls: plain bordered buttons and native disclosure menus. */
.draft-review-menu { position: relative; }
.draft-review-menu-button { display: inline-flex; align-items: center; gap: .375rem; min-height: 2.5rem; padding: .5rem .75rem; border: 1px solid #d6d3d1; border-radius: .375rem; background: #fff; color: #292524; font-size: .875rem; font-weight: 500; cursor: pointer; list-style: none; }
.draft-review-menu-button:hover, .draft-review-menu[open] > .draft-review-menu-button { background: #fafaf9; }
.draft-review-menu > summary::-webkit-details-marker { display: none; }
.draft-review-menu-list { position: absolute; right: 0; z-index: 40; min-width: 13rem; margin-top: .375rem; padding: .25rem 0; border: 1px solid #e7e5e4; border-radius: .375rem; background: #fff; box-shadow: 0 8px 24px rgb(28 25 23 / .12); font-size: .875rem; }
/* A menu opens from its control's end, under the header's right edge. Where
   its control starts a line at the left, as the controls do under the
   title on a phone, that would run past the screen's left edge, so it opens
   from the control's start instead (final review I7). The page's script
   picks the side that keeps an opening menu on the screen (data-menu-align);
   without it, the draft picker, which starts the first line on a phone,
   opens from its start there. */
@media (max-width: 639.98px) {
  #draft_picker:not([data-menu-align]) > .draft-review-menu-list { left: 0; right: auto; }
}
.draft-review-menu[data-menu-align="start"] > .draft-review-menu-list { left: 0; right: auto; }
.draft-review-menu[data-menu-align="end"] > .draft-review-menu-list { left: auto; right: 0; }
.draft-review-menu-list a { display: block; padding: .5rem .75rem; color: #292524; }
.draft-review-menu-list a:hover { background: #f5f5f4; }
/* The ring sits inside a menu row, clear of the menu's border and the next row. */
.draft-review-menu-list a:focus-visible { outline-offset: -2px; }
.draft-review-menu-list a[aria-current="page"] { font-weight: 600; color: #0f766e; }

/* The summary lines. */
.draft-review-summary { margin-bottom: 1.25rem; max-width: 72ch; }
.draft-review-status { color: #1c1917; font-size: 1rem; }
.draft-review-instruction, .draft-review-lock, .draft-review-feedback { margin-top: .375rem; color: #44403c; font-size: .875rem; }
.draft-review-lock { padding: .625rem .75rem; border: 1px solid #fcd34d; border-radius: .375rem; background: #fffbeb; color: #451a03; }
.draft-review-lock a { font-weight: 600; }
/* A draft that takes no feedback opens with its lock line (Task 13a R4). */
.draft-review-summary > .draft-review-lock:first-child { margin-top: 0; }
.draft-review-lock + .draft-review-status { margin-top: .625rem; }

/* Layout: the column first in the document; beside the bill on a wide screen,
   where it sticks 1rem below the site's 106px header, so its top edge never
   slides under it, and keeps 1rem clear at the foot of the screen. */
.draft-review-grid { display: flex; flex-direction: column; gap: 1.25rem; }
.draft-review-column, .draft-bill-side, .draft-bill-reading { min-width: 0; }
/* The bill takes focus from the column index's "Read the bill", below the
   site's sticky header; a click inside it shows no ring. */
.draft-bill-reading { scroll-margin-top: 7rem; }
.draft-bill-reading:focus { outline: none; }
.draft-bill-reading:focus-visible { outline: 2px solid #0f766e; outline-offset: 4px; border-radius: .5rem; }
@media (min-width: 1024px) {
  .draft-review-grid { display: grid; grid-template-columns: minmax(0, 1fr) 26rem; align-items: start; }
  .draft-review-grid:has(> .draft-review-column[hidden]) { grid-template-columns: minmax(0, 1fr); }
  .draft-review-column { grid-column: 2; grid-row: 1; position: sticky; top: 7.625rem; max-height: calc(100dvh - 8.625rem); overflow-y: auto; overscroll-behavior: contain; }
  /* The bill's side: on a redraft the changes checkbox and legend, then
     the bill (pre-flight D16). */
  .draft-bill-side { grid-column: 1; grid-row: 1; }
}

/* The review column and its groups. Under 640px the column keeps less
   padding, so its cards get more of a phone's width. */
.draft-review-column { padding: 1rem; border: 1px solid #d6d3d1; border-radius: .5rem; background: #fff; overflow-wrap: anywhere; }
@media (max-width: 639.98px) {
  .draft-review-column { padding: .75rem .5rem; }
}
.draft-review-group + .draft-review-group { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid #e7e5e4; }
.draft-review-group { scroll-margin-top: .75rem; }
/* The band on a redraft, above the five groups: what Leggie did with each
   piece of feedback on the draft before. A rule sets it off from Calls,
   spaced as the rule between two groups is: more above it than below, so it
   sits with the heading it introduces. */
.draft-review-band { margin-bottom: 1.25rem; padding-bottom: 1.5rem; border-bottom: 1px solid #e7e5e4; scroll-margin-top: .75rem; }

/* The column's index: one quiet line of in-page links that wraps. */
.draft-review-index { margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 1px solid #e7e5e4; font-size: .8125rem; }
.draft-review-index ul { display: flex; flex-wrap: wrap; column-gap: 1rem; }
.draft-review-index a { display: inline-flex; align-items: center; min-height: 2rem; padding: .25rem 0; color: #0f766e; line-height: 1rem; text-decoration: underline; text-underline-offset: 2px; }
.draft-review-index a:hover { color: #115e59; }
.draft-review-index a:focus-visible { outline: 2px solid #0f766e; outline-offset: 2px; }
.draft-review-group-heading { color: #1c1917; font-size: 1rem; font-weight: 600; scroll-margin-top: 1rem; }
/* A group's heading takes focus from the index: the app's teal ring from
   the keyboard (application.css covers controls, not headings), none after
   a click. */
.draft-review-group-heading:focus-visible { outline: 2px solid #0f766e; outline-offset: 2px; }
.draft-review-group-intro { margin-top: .25rem; color: #57534e; font-size: .8125rem; }
.draft-review-empty { margin-top: .75rem; color: #57534e; font-size: .875rem; }
.draft-review-subgroup { margin-top: 1rem; }
/* A subgroup's heading and a fold's heading are both h3 under a group, so
   they share one size, colour and weight. */
.draft-review-subgroup-heading { color: #44403c; font-size: .8125rem; font-weight: 600; }
.draft-review-cards { display: flex; flex-direction: column; margin-top: .25rem; }

/* Folded groups: Other calls and the checks that passed. */
.draft-review-fold { margin-top: 1rem; }
.draft-review-fold > summary { padding: .25rem 0; cursor: pointer; color: #44403c; font-size: .8125rem; font-weight: 600; }
.draft-review-fold > summary:hover { color: #1c1917; }
/* The fold's heading reads as the summary's own text, beside its marker. */
.draft-review-fold-heading { display: inline; font: inherit; color: inherit; }

/* Cards. */
/* Items sit in the column as rows divided by rules, not as boxes inside the
   column's box. */
.draft-review-card { padding: .875rem 0; border-top: 1px solid #e7e5e4; scroll-margin-top: 1rem; }
.draft-review-cards > .draft-review-card:first-child { border-top: 0; padding-top: .5rem; }
.draft-review-card-heading { color: #1c1917; font-size: .875rem; font-weight: 600; text-wrap: balance; }
.draft-review-card p { text-wrap: pretty; }
.draft-review-card-heading:focus { outline: 2px solid #0f766e; outline-offset: 2px; }
.draft-review-chips { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: .5rem; }
.draft-review-chip { display: inline-flex; align-items: center; padding: .125rem .5rem; border-radius: 9999px; background: #f5f5f4; color: #44403c; font-size: .75rem; font-weight: 500; }
.draft-review-chip--significant { background: #fef3c7; color: #78350f; font-weight: 600; }
.draft-review-chip--scope { background: #e0f2fe; color: #0c4a6e; font-weight: 600; }
/* A band line: who said what as its heading, at the weight of body text so
   a long comment doesn't shout, then the outcome chip beside the summary.
   The heading is a sentence or more of feedback, so it wraps as prose does,
   filling each line, rather than balanced into short lines on a phone. */
.draft-review-card--outcome .draft-review-card-heading { font-weight: 500; text-wrap: pretty; }
/* A band line's Comment is a quiet text action, like the margin's Comment
   link, so the outcome reads first (Task 13b M6); its text lines up with
   the card's, and it stays a 24px target. Its form's Save button keeps the
   button look. */
.draft-review-card--outcome > .draft-review-actions > .draft-review-disclosure > .draft-review-action { min-height: 1.5rem; margin-left: -.375rem; padding: 0 .375rem; border: 0; border-radius: .25rem; background: transparent; color: #0f766e; }
.draft-review-card--outcome > .draft-review-actions > .draft-review-disclosure > .draft-review-action:hover,
.draft-review-card--outcome > .draft-review-actions > .draft-review-disclosure[open] > .draft-review-action { background: #f0fdfa; }
.draft-outcome-result { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .5rem; margin-top: .375rem; color: #1c1917; font-size: .8125rem; }
.draft-outcome-chip { flex: none; }
/* "Show the change" and "Show the provisions" wrap as one phrase. */
.draft-outcome-change a { white-space: nowrap; }
/* Kept is the quiet outcome, but its pill still shows on the card's tint,
   which the neutral chip's fill nearly matches. */
.draft-outcome-chip--kept { background: #e7e5e4; }
.draft-outcome-chip--applied { background: #ccfbf1; color: #134e4a; font-weight: 600; }
.draft-outcome-chip--still-deferred { background: #e0f2fe; color: #0c4a6e; }
.draft-outcome-chip--not-applied { background: #fef3c7; color: #78350f; font-weight: 600; }
.draft-review-call { margin-top: .375rem; color: #1c1917; font-size: .875rem; }
.draft-review-note, .draft-review-response { margin-top: .375rem; color: #44403c; font-size: .8125rem; }
.draft-review-detail { margin-top: .375rem; color: #57534e; font-size: .75rem; }
.draft-review-provenance { margin-top: .375rem; color: #78716c; font-size: .75rem; font-style: italic; }
.draft-provision-links { display: flex; flex-wrap: wrap; gap: .25rem .75rem; margin-top: .5rem; font-size: .75rem; }
.draft-provision-links a { display: inline-block; padding: .25rem 0; line-height: 1rem; }
/* A model act's fill-in point: the bracket as it prints is the heading, in
   the bill's serif face, with its kind as a small muted tag under it. */
.draft-review-fill-in-heading { font-family: "Times New Roman", Times, serif; font-size: 1rem; }
.draft-review-fill-in-kind { margin-top: .125rem; color: #78716c; font-size: .6875rem; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }
.draft-review-fill-in-what { margin-top: .375rem; color: #1c1917; font-size: .875rem; }
.draft-review-fill-in-places { margin-top: .5rem; margin-bottom: 0; color: #57534e; font-size: .75rem; font-weight: 600; }
.draft-review-fill-in-places + .draft-provision-links { margin-top: .125rem; }
.draft-fix-edit { margin-top: .5rem; font-size: .8125rem; }
.draft-fix-edit dt { color: #57534e; font-size: .6875rem; font-weight: 600; letter-spacing: .04em; }
.draft-fix-edit dd { margin: .125rem 0 .375rem; padding: .375rem .5rem; border-left: 2px solid #d6d3d1; background: #fff; color: #1c1917; font-family: "Times New Roman", Times, serif; white-space: pre-wrap; }
/* The words a fix removed (Before) and added (After): a tinted box, never
   underline or strikethrough. The border keeps the mark visible without its
   colour and in forced colours. */
.draft-fix-edit :is(ins, del) { padding: 0 .125rem; border: 1px solid; border-radius: .1875rem; text-decoration: none; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.draft-fix-edit del { border-color: #fda4af; background: #fff1f2; color: #881337; }
.draft-fix-edit ins { border-color: #93c5fd; background: #eff6ff; color: #1e3a8a; }
/* A long finding's rest, folded under its first sentences. */
.draft-review-more > summary { min-block-size: 1.5rem; padding: .25rem 0; color: #0f766e; font-size: .75rem; font-weight: 500; line-height: 1rem; cursor: pointer; }
.draft-review-more > summary:hover { color: #115e59; }
.draft-review-more > summary:focus-visible { outline: 2px solid #0f766e; outline-offset: 2px; }
.draft-review-more > .draft-review-note { margin-top: .125rem; }

/* A call's actions: Confirm, Answer differently and Defer in one row, each
   form opening inline under the row, and Clear beside a recorded response. */
.draft-review-recorded { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .75rem; row-gap: .25rem; margin-top: .375rem; }
.draft-review-recorded > p { margin-top: 0; }
.draft-review-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .5rem; margin-top: .625rem; }
.draft-review-actions > .draft-review-error { flex-basis: 100%; }
.draft-review-inline-form { display: inline; }
.draft-review-action { display: inline-flex; align-items: center; min-height: 2.25rem; padding: .375rem .75rem; border: 1px solid #d6d3d1; border-radius: .375rem; background: #fff; color: #292524; font-size: .8125rem; font-weight: 500; cursor: pointer; list-style: none; }
.draft-review-action:hover { background: #f5f5f4; }
.draft-review-action:focus-visible { outline: 2px solid #0f766e; outline-offset: 2px; }
.draft-review-action--quiet { min-height: 1.75rem; padding: .3125rem .625rem; font-size: .75rem; }
.draft-review-action--save { align-self: flex-start; border-color: #0f766e; color: #0f766e; }
.draft-review-action--save:hover { background: #f0fdfa; }
/* Turbo disables a form's button while the form sends. */
.draft-review-action:disabled { cursor: progress; opacity: .6; }
.draft-review-disclosure > summary::-webkit-details-marker { display: none; }
/* A closed disclosure lays out nothing but its button, so its form, which
   is only as wide as the button until it opens, never runs past the edge. */
.draft-review-disclosure:not([open]) > :not(summary) { display: none; }
.draft-review-disclosure[open] { flex-basis: 100%; }
.draft-review-disclosure[open] > summary { background: #f5f5f4; }
.draft-review-form { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; padding: .75rem; border: 1px solid #e7e5e4; border-radius: .375rem; background: #fff; }
.draft-review-label { color: #292524; font-size: .8125rem; font-weight: 500; }
.draft-review-choices { display: flex; flex-direction: column; gap: .375rem; }
.draft-review-choice { display: flex; align-items: flex-start; gap: .5rem; color: #1c1917; font-size: .8125rem; }
.draft-review-choice input { margin-top: .2rem; accent-color: #0f766e; }
.draft-review-textarea { width: 100%; padding: .5rem; border: 1px solid #a8a29e; border-radius: .375rem; background: #fff; color: #1c1917; font-size: .875rem; }
.draft-review-textarea:focus { outline: 2px solid #0f766e; outline-offset: 1px; }
.draft-review-textarea[aria-invalid="true"] { border-color: #be123c; }
.draft-review-hint { color: #57534e; font-size: .75rem; }
.draft-review-error { color: #9f1239; font-size: .8125rem; font-weight: 500; }

/* Comments, under a card, in Anything else and in the bill's margin. */
.draft-review-comments { display: flex; flex-direction: column; gap: .5rem; margin-top: .625rem; }
.draft-review-comment { padding: .5rem .625rem; border-radius: .375rem; background: #fff; border: 1px solid #e7e5e4; }
.draft-review-comment-byline { color: #78716c; font-size: .75rem; }
.draft-review-comment-body { margin-top: .25rem; color: #1c1917; font-size: .8125rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.draft-review-comment-actions { margin-top: .375rem; gap: .375rem; }
.draft-review-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.draft-review-anything-else > .draft-review-form { margin-top: .75rem; }

/* The page's one provision comment form, above the bill's text, and each
   margin's Comment link. The link is 24px tall with no margin of its own, so
   beside a one-line row it fits the bill's 24.8px line; it keeps a gap
   only under the margin's tags or comments. */
.draft-unit-comment-form { margin-bottom: 1rem; font-family: ui-sans-serif, system-ui, sans-serif; scroll-margin-top: 7rem; }
.draft-margin-comment { display: inline-flex; align-items: center; min-block-size: 1.5rem; margin-top: 0; padding: 0 .375rem; border-radius: .25rem; color: #0f766e; font-weight: 500; text-decoration: none; }
.draft-margin-comment:hover { background: #f0fdfa; }
.draft-unit-margin > ul + .draft-margin-comment { margin-top: .25rem; }
.draft-margin-comment:focus-visible { outline: 2px solid #0f766e; outline-offset: 1px; }

/* The bill: each row is the text and its margin; the margin goes below the
   text under 640px. Text keeps its line breaks and leading spaces, as the
   stored rendering does. */
.draft-reading.leggie-bill { width: min(100%, 62rem); }
.draft-reading-row { display: block; }
.draft-reading-row--blank { height: .85rem; }
.draft-reading-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.draft-reading-row--enacted .draft-reading-text, .draft-reading-row--provision .draft-reading-text, .draft-reading-row--legend .draft-reading-text { margin-bottom: .85rem; }
/* The legend a state prints about its change marks, in the reading view and
   the stored rendering: slightly smaller, muted, with space above. */
.leggie-legend { margin-top: 1rem; color: #57534e; font-size: .9375em; }
.draft-reading-row--measure-number .draft-reading-text, .draft-reading-row--measure-type .draft-reading-text,
.draft-reading-row--measure .draft-reading-text, .draft-reading-row--session .draft-reading-text,
.draft-reading-row--explanation-heading .draft-reading-text { text-align: center; }
/* A model act's bracket links to its entry in the Fill-in points list. It
   keeps the act's own text colour with a faint tint behind it, and shows
   an underline only on hover and focus, so a page of brackets does not read
   as a page of links. A Legislative Note sits a step in from the act's text
   with a thin rule beside it; its italics come from its runs. The page has
   no dark scheme, so these are plain light values like its neighbours. */
.leggie-fill-in { color: inherit; text-decoration: none; background: rgba(15, 118, 110, .09); border-radius: .125rem; }
.leggie-fill-in:hover, .leggie-fill-in:focus-visible { text-decoration: underline; background: rgba(15, 118, 110, .16); }
.leggie-fill-in:focus-visible { outline: 2px solid #0f766e; outline-offset: 1px; }
.state-bill.draft-reading .draft-reading-row--legislative-note > .draft-reading-text { margin-left: 1.5rem; padding-left: .75rem; border-left: 2px solid #d6d3d1; color: #57534e; font-size: .9375em; }
.draft-reading-margin { margin: .25rem 0 .5rem; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .75rem; line-height: 1.4; overflow-wrap: anywhere; }
/* The bill sizes its margin notes and padding to the room it actually has,
   not the window's width, so it stays readable beside the review column. */
.draft-bill-reading { container-type: inline-size; }
.draft-bill-reading .leggie-bill { padding-inline: clamp(1.25rem, 6cqi, 5rem); }
@container (min-width: 38rem) {
  .draft-reading-row { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; column-gap: 1.25rem; align-items: start; }
  .draft-reading-row > .draft-reading-text { grid-column: 1; }
  .draft-reading-row > .draft-reading-margin { grid-column: 2; margin: 0; }
}
.draft-unit-margin:not(:has(*)), .draft-reading-margin:not(:has(.draft-unit-margin > *)) { display: none; }
.draft-unit-margin + .draft-unit-margin { margin-top: .375rem; }
.draft-margin-tags { display: flex; flex-wrap: wrap; gap: .25rem; }
/* A tag is a quiet line of text behind a dot that names its kind by
   colour; the words carry the kind too. */
.draft-margin-tag { display: inline-flex; align-items: baseline; gap: .375rem; min-block-size: 1.5rem; padding: .1875rem 0; color: #57534e; text-decoration: none; }
.draft-margin-tag::before { content: ""; flex: none; width: .375rem; height: .375rem; border-radius: 50%; background: #a8a29e; transform: translateY(-.0625rem); }
.draft-margin-tag:hover { color: #0f766e; text-decoration: underline; text-underline-offset: .15em; }
.draft-margin-tag--call::before { background: #d97706; }
.draft-margin-tag--check::before { background: #e11d48; }
.draft-margin-tag--look::before { background: #0284c7; }
.draft-margin-tag--outcome::before { background: #0d9488; }
.draft-unit-margin .draft-review-comments { margin-top: .375rem; }

/* A provision a call that needs a decision affects: a light warm background
   on its text and a rule at the left of the line, never an underline. */
.draft-reading [data-needs-decision] { background: #fff4dc; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.draft-reading-row:has([data-needs-decision]) > .draft-reading-text { margin-left: -.75rem; padding-left: calc(.75rem - 3px); border-left: 3px solid #d97706; }

/* Changes from the previous draft on a redraft's bill (spec section 6.3,
   R27). Added text is a blue highlight in a solid box and removed text a
   dashed box, in normal case, so neither reads as current law's underline,
   strikethrough or capitals; no draft-mark rule sets text decoration or text
   transform, and the current-law marks inside a highlight keep their own.
   The added box has a border on every side, never on the bottom alone,
   which would read as an underline, so the two marks differ by shape as
   well as colour (Task 13b M4). The colours are tokens with plain light
   values, each text colour at 4.5:1 or more on its background, and the
   added border at 3:1 or more against the page and against its own
   highlight. They don't use light-dark(), which some browsers the app
   admits can't read, leaving no mark at all (final review M7). If the page
   gets a dark scheme, its values go in an
   @supports (color: light-dark(#000, #fff)) override beside a color-scheme
   declaration (#1e3a8a, #60a5fa, #eff6ff, #94a3b8 and #e7e5e4 were chosen
   for one). */
.draft-review {
  --draft-added: #bfdbfe;
  --draft-added-border: #2563eb;
  --draft-added-text: #172554;
  --draft-removed-border: #64748b;
  --draft-removed-text: #44403c;
}
.draft-mark--added { padding: 0 .0625rem; border: 1px solid var(--draft-added-border); border-radius: .125rem; background-color: var(--draft-added); color: var(--draft-added-text); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
/* The space between the words either side of removed text stays before
   the mark, so the mark keeps a little more room after it than before,
   and the next word doesn't touch its box. Current-law words the redraft
   struck (final review I4) sit in the same dashed box, around the bill's
   own strikethrough, which the box leaves alone. */
.draft-mark--removed, .draft-mark--struck { margin: 0 .25rem 0 .125rem; padding: 0 .1875rem; border: 1px dashed var(--draft-removed-border); border-radius: .1875rem; color: var(--draft-removed-text); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
@media (forced-colors: active) {
  .draft-mark--added { forced-color-adjust: none; border-color: CanvasText; background-color: Mark; color: MarkText; }
}
/* Copying the bill takes its text as it reads now (Task 13b M1), as the
   provision dialog's quote does: the words a redraft took out, the label
   of a unit it took out, and every visually hidden cue and word break stay
   off the clipboard. */
.draft-mark--removed, .draft-mark .sr-only, .draft-mark-separator, .draft-removed-label { -webkit-user-select: none; user-select: none; }
/* A unit the redraft took out: a dashed box where it stood, labelled
   "Removed in draft N" above its text. Removed units in a row read as one
   box with one label. */
.draft-reading-row--draft-removed > .draft-reading-text { padding: .375rem .625rem; border: 1px dashed var(--draft-removed-border); border-radius: .25rem; color: var(--draft-removed-text); }
.draft-reading-row--draft-removed .draft-mark--removed { margin: 0; padding: 0; border: 0; }
.draft-removed-label { display: block; margin-bottom: .125rem; color: #57534e; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .75rem; font-weight: 500; }
.draft-reading-row--draft-removed:has(+ .draft-reading-row--draft-removed) > .draft-reading-text { padding-bottom: 0; border-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.draft-reading-row--draft-removed + .draft-reading-row--draft-removed > .draft-reading-text { padding-top: 0; border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.draft-reading-row--draft-removed + .draft-reading-row--draft-removed .draft-removed-label { display: none; }
.draft-reading-row--draft-removed { scroll-margin-top: 7rem; }
/* A run of unchanged provisions, folded to one line that says so. */
.draft-unchanged-run { margin: .25rem 0; }
.draft-unchanged-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .375rem; min-block-size: 1.5rem; padding: .125rem 0; color: #57534e; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .8125rem; font-style: italic; cursor: pointer; }
.draft-unchanged-summary:hover { color: #1c1917; }
.draft-unchanged-summary:focus-visible { outline: 2px solid #0f766e; outline-offset: 2px; }
.draft-unchanged-show { color: #0f766e; font-style: normal; font-weight: 500; }
.draft-unchanged-run[open] > .draft-unchanged-summary .draft-unchanged-show { display: none; }
/* The checkbox and the legend above the bill. The checkbox shows only once
   the page's script runs, because the script does what it says. */
/* The bar above the column and the bill: what the page shows (Review or
   Bill only). The switch shows only once the script runs. */
.draft-view-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem; margin-bottom: .75rem; }
.draft-review--reading .draft-view-bar { max-width: 56rem; margin-inline: auto; }
.draft-view-switch { display: none; padding: .125rem; border: 1px solid #d6d3d1; border-radius: .5rem; background: #f5f5f4; }
.draft-review[data-draft-review-enhanced] .draft-view-switch { display: inline-flex; }
.draft-view-option { min-block-size: 1.75rem; padding: .125rem .75rem; border: 0; border-radius: .375rem; background: transparent; color: #44403c; font-size: .8125rem; font-weight: 500; cursor: pointer; }
.draft-view-option:hover { color: #1c1917; }
.draft-view-option[aria-pressed="true"] { background: #fff; color: #1c1917; box-shadow: 0 1px 2px rgb(28 25 23 / .12); }
.draft-view-option:focus-visible { outline: 2px solid #0f766e; outline-offset: 2px; }

/* Below 1024px the bill comes first and the review column opens as a drawer
   from the right, as Reggie's review does. Without the script, or on a page
   with no button to open it, the column stays in the page above the bill.
   The drawer's own heading, with Close, shows only while it is open. */
.draft-review-opener, .draft-review-drawer-heading { display: none; }
.draft-review-opener { align-items: center; min-height: 2.75rem; padding: .5rem 1rem; border: 0; border-radius: .375rem; background: #234367; color: #fff; font-size: .875rem; font-weight: 500; cursor: pointer; }
.draft-review-opener:hover { background: #1e3a57; }
.draft-review-opener:focus-visible, .draft-review-drawer-close:focus-visible { outline: 2px solid #0f766e; outline-offset: 2px; }
.draft-review-backdrop { position: fixed; inset: 0; z-index: 60; background: rgb(28 25 23 / .45); }
.draft-review-backdrop[hidden] { display: none; }
@media (max-width: 1023.98px) {
  .draft-review[data-draft-review-enhanced] .draft-review-opener { display: inline-flex; }
  .draft-review.draft-review--reading[data-draft-review-enhanced] .draft-review-opener { display: none; }
  .draft-review[data-draft-review-enhanced]:has(.draft-review-opener) .draft-review-column { display: none; }
  .draft-review.draft-review--column-open[data-draft-review-enhanced] .draft-review-column:not([hidden]) {
    display: block; position: fixed; inset: 0 0 0 auto; z-index: 70; width: min(92vw, 28rem); height: 100dvh; max-height: none; margin: 0; padding: 0 1rem 1rem;
    overflow-y: auto; overscroll-behavior: contain; border-width: 0 0 0 1px; border-radius: 0; box-shadow: -8px 0 24px rgb(28 25 23 / .18);
  }
  .draft-review-column:focus { outline: none; }
  .draft-review--column-open .draft-review-drawer-heading {
    display: flex; position: sticky; top: 0; z-index: 1; align-items: center; justify-content: space-between; gap: .75rem;
    margin: 0 -1rem .75rem; padding: .5rem 1rem; border-bottom: 1px solid #e7e5e4; background: #fff;
  }
  .draft-review-drawer-title { margin: 0; color: #1c1917; font-size: 1rem; font-weight: 600; }
  .draft-review-drawer-close { min-height: 2.75rem; padding: .5rem .875rem; border: 1px solid #d6d3d1; border-radius: .375rem; background: #fff; color: #292524; font-size: .875rem; font-weight: 500; cursor: pointer; }
  .draft-review-drawer-close:hover { background: #fafaf9; }
  /* Inside the drawer a card or group lands just under its sticky heading. */
  .draft-review--column-open .draft-review-column :is(.draft-review-card, .draft-review-group, .draft-review-band) { scroll-margin-top: 4rem; }
  /* The Review / Bill only switch is a full-size target on a touch screen. */
  .draft-view-option { min-block-size: 2.75rem; padding-inline: 1rem; }
}
/* On a phone, the header's menus, a card's actions, a fold and the column's
   index links are full-size touch targets. */
@media (max-width: 639.98px) {
  .draft-review-menu-button, .draft-review-action,
  .draft-review-card--outcome > .draft-review-actions > .draft-review-disclosure > .draft-review-action { min-height: 2.75rem; }
  .draft-margin-comment, .draft-margin-tag { min-block-size: 2.75rem; }
  .draft-review-fold > summary { padding-block: .75rem; }
  .draft-review-index a { min-height: 2.75rem; }
}

/* Bill only: the bill alone at a reading width, with no review column, no
   margin, no tint and no comment hint. Turning the review back on restores
   them; nothing is removed from the page. */
.draft-review--reading :is(.draft-review-column, .draft-reading-margin, .draft-reading-hint) { display: none; }
/* The hint's own rule comes later and is as specific, so this one names the wrapper twice. */
.draft-review.draft-review--reading[data-draft-review-enhanced][data-draft-review-editable-value="true"] .draft-reading-hint { display: none; }
.draft-review--reading .draft-review-grid { display: block; }
.draft-review--reading .draft-bill-side { max-width: 56rem; margin-inline: auto; }
.draft-review--reading .draft-reading-row { display: block; }
.draft-review--reading .draft-reading [data-needs-decision] { background: none; }
.draft-review--reading .draft-reading-row:has([data-needs-decision]) > .draft-reading-text { margin-left: 0; padding-left: 0; border-left: 0; }
.draft-review--reading .draft-reading-text [data-anchor] { cursor: auto; }

.draft-changes { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem 1.25rem; margin-bottom: .75rem; color: #44403c; font-size: .8125rem; }
.draft-changes-toggle { display: none; align-items: center; gap: .5rem; min-block-size: 1.5rem; margin: 0; color: #1c1917; font-weight: 500; }
.draft-review[data-draft-review-enhanced] .draft-changes-toggle { display: flex; }
.draft-changes-toggle input { width: 1rem; height: 1rem; accent-color: #0f766e; }
/* The label takes the click too, so it is a 24px target (Task 13b M2). */
.draft-changes-toggle label { display: inline-flex; align-items: center; min-block-size: 1.5rem; cursor: pointer; }
.draft-changes-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.draft-changes-legend li { display: flex; align-items: center; gap: .375rem; }
.draft-changes-swatch { flex: none; width: 1.25rem; height: .875rem; border-radius: .1875rem; }
.draft-changes-swatch--added { border: 1px solid var(--draft-added-border); background-color: var(--draft-added); }
.draft-changes-swatch--removed { border: 1px dashed var(--draft-removed-border); }
/* Changes hidden: the bill reads as this draft's text alone, with every
   fold open and no cue left for a screen reader to announce. An added
   mark's <mark> keeps its highlight role in the markup; the script takes
   the role away while the changes are hidden (final review M9). A struck
   mark loses its box and keeps the bill's own strike. */
.draft-review--changes-hidden .draft-mark--added { padding: 0; border: 0; background-color: transparent; color: inherit; }
.draft-review--changes-hidden .draft-mark--struck { margin: 0; padding: 0; border: 0; color: inherit; }
.draft-review--changes-hidden :is(.draft-mark--removed, .draft-mark-separator, [data-row-kind="draft-removed"], .draft-mark .sr-only, .draft-changes-legend, .draft-unchanged-summary) { display: none; }
/* The band's sentence about the marks (Task 13b M5): only below 1024px,
   where the column covers the bill and its legend as a drawer (or, without
   the script, comes before them), on a page whose bill shows the changes.
   Beside the bill the legend is on screen, so the band doesn't repeat it. */
.draft-band-marks { display: none; }
@media (max-width: 1023.98px) {
  .draft-review:not(.draft-review--changes-hidden):has(.draft-changes-legend) .draft-band-marks { display: block; }
}

/* A card or unit the page just brought into view. */
.draft-review-flash { animation: draft-review-flash 1.6s ease-out; }
@keyframes draft-review-flash {
  from { background-color: #ccfbf1; box-shadow: 0 0 0 2px #14b8a6; }
  to { background-color: transparent; box-shadow: 0 0 0 2px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .draft-review-flash { animation: none; outline: 2px solid #14b8a6; outline-offset: 2px; }
}

/* With JavaScript (the draft-review controller): a unit's text opens its
   comment form when the draft takes feedback, which the line above the bill
   says, and a row that starts several units shows one Comment link, whose
   dialog offers the choice. */
.draft-reading-hint { display: none; margin: 0 0 .75rem; color: #57534e; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .8125rem; }
.draft-review[data-draft-review-enhanced][data-draft-review-editable-value="true"] .draft-reading-hint { display: block; }
.draft-review[data-draft-review-enhanced][data-draft-review-editable-value="true"] .draft-reading-text [data-anchor] { cursor: pointer; }
.draft-review[data-draft-review-enhanced] .draft-reading-margin > .draft-unit-margin:not(:last-child) > .draft-margin-comment { display: none; }
/* So a unit's margin that shows nothing leaves no gap above the next one. */
.draft-review[data-draft-review-enhanced] .draft-unit-margin:not(:has(.draft-margin-tags, .draft-review-comments)) + .draft-unit-margin { margin-top: 0; }
/* On a line whose margin holds no tags or comments, the Comment link shows
   only while the line is hovered or the link has focus. Until then it is
   visually hidden, never display:none, so it stays in the tab order, and on
   a phone the empty margin takes no room. Hover shows it only where the
   margin sits beside the text (640px and wider), and there the link fits
   the line, so nothing below moves under the pointer. Below 640px, where
   the margin goes under the text, and on a screen without hover, only focus
   shows it; tapping the line's text opens the same form. */
@media (hover: hover) and (min-width: 640px) {
  .draft-review[data-draft-review-enhanced][data-draft-review-editable-value="true"] .draft-reading-row:not(:hover) > .draft-reading-margin:not(:has(.draft-margin-tags, .draft-review-comments)) .draft-margin-comment:not(:focus) {
    position: absolute; width: 1px; height: 1px; min-block-size: 0; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }
}
@media not (hover: hover), (max-width: 639.98px) {
  .draft-review[data-draft-review-enhanced][data-draft-review-editable-value="true"] .draft-reading-margin:not(:has(.draft-margin-tags, .draft-review-comments)) .draft-margin-comment:not(:focus) {
    position: absolute; width: 1px; height: 1px; min-block-size: 0; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }
}
.draft-reading [data-anchor] { scroll-margin-top: 7rem; scroll-margin-bottom: 1rem; }
@media (max-width: 1023.98px) {
  .draft-review-card, .draft-review-group, .draft-review-band { scroll-margin-top: 7rem; }
}

/* The provision comment and Redraft dialogs. Each fits the screen with a
   1rem gutter and scrolls inside itself. */
.draft-review-dialog:modal { width: min(34rem, calc(100% - 2rem)); max-width: none; max-height: calc(100% - 2rem); margin: auto; padding: 1rem; overflow: auto; border: 1px solid #d6d3d1; border-radius: .5rem; background: #fff; color: #1c1917; box-shadow: 0 20px 48px rgb(28 25 23 / .25); overflow-wrap: anywhere; }
.draft-review-dialog::backdrop { background: rgb(28 25 23 / .45); }
.draft-unit-dialog:modal .draft-unit-comment-form { margin-bottom: 0; }
.draft-unit-dialog:modal .draft-review-form { margin-top: 0; padding: 0; border: 0; }
/* The provision dialog's title names the unit, and the page quotes the
   unit's text under it, with the bill's own marks, in the bill's type. The
   field's label repeats the title, so it is hidden on screen. */
.draft-unit-dialog-title { margin: 0 0 .5rem; color: #1c1917; font-size: 1rem; font-weight: 600; text-wrap: balance; }
/* A lock that arrives while the dialog is open, amber like the lock line. */
.draft-unit-dialog-lock { margin: 0 0 .75rem; padding: .5rem .625rem; border: 1px solid #fcd34d; border-radius: .375rem; background: #fffbeb; color: #451a03; font-size: .8125rem; }
.draft-unit-quote { margin: 0 0 .75rem; padding: .375rem .625rem; border-left: 2px solid #d6d3d1; background: #fafaf9; color: #1c1917; font-family: "Times New Roman", Times, serif; font-size: .9375rem; line-height: 1.5; }
.draft-unit-comment-form label[for="unit_comment_text"] { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* Without JavaScript, ?comment_on= renders the dialog open as part of the page. */
.draft-unit-dialog[open]:not(:modal) { position: static; inset: auto; width: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; }
.draft-unit-choice { min-inline-size: 0; margin: 0 0 .75rem; padding: 0; border: 0; display: flex; flex-direction: column; gap: .375rem; }
.draft-unit-choice > legend { margin-bottom: .375rem; }

/* Colleagues' feedback waiting for the reader to finish: a note at the foot
   of the screen that never takes a click. Empty, it shows nothing but stays
   in place, so a screen reader hears it when it fills. */
.draft-review-pending { position: fixed; z-index: 45; left: 50%; bottom: 1rem; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2rem); padding: .625rem .875rem; border-radius: .5rem; background: #1c1917; color: #fafaf9; font-size: .875rem; box-shadow: 0 8px 24px rgb(28 25 23 / .25); pointer-events: none; }
.draft-review-pending:empty { padding: 0; box-shadow: none; background: transparent; }
