/* The H (Vikrant, 25 Oct 2026): a small round button, burgundy on the house's paper, a thumb's size, as the Boutique's
   floor still wears it; the Office's own dress is in `designs/shell.css` (7 Nov 2026), since this sheet is shared with the
   floor, which keeps its faces. Five positions in the order the script tries them — bottom-right the standard, then bottom-left, top-right,
   top-left, the right edge's middle — a page declaring its own with the h_slot block and sitrep/h.js moving on when the
   corner is taken. The box opens in the page, never a browser dialog. Colours from house.css only; the frame's faces,
   Lato for its words, and the house's 8px acts (1 Nov 2026: it had kept Manrope and pills after the frame took the
   two faces), in the serif as every act in the house is (2 Nov 2026, the eye: Send in the sans beside a page's serif
   Upload it was two dresses for one thing), the box in the house's hairline, as a card is. */
.h-help { position: fixed; z-index: 60; }
/* A bar fixed or stuck across the foot (the Completion Register's acts, the write-up's Still needed) is under every
   bottom slot: the script measures it and the H stands above it, never on it (the screens review, 26 Oct 2026). */
.h-help[data-slot="br"] { right: 16px; bottom: var(--h-lift, 16px); }
.h-help[data-slot="bl"] { left: 16px; bottom: var(--h-lift, 16px); }
.h-help[data-slot="tr"] { right: 16px; top: var(--h-drop, 76px); }
.h-help[data-slot="tl"] { left: 16px; top: var(--h-drop, 76px); }
.h-help[data-slot="rm"] { right: 16px; top: 50%; transform: translateY(-50%); }
/* On a phone the H stands over the page's column, so a page read to its end keeps its last line above the H: h.js
   measures the room the page leaves at its foot and asks only what it lacks (2 Nov 2026). The iPad and the PC are left
   as they were, a redrawn page keeping its own 72 at the foot. */
@media (max-width: 760px) { main { padding-bottom: var(--h-room, 0px); } }

.h-button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--wine); background: var(--paper); color: var(--wine);
  font: 700 1.05rem var(--plain, "Lato", "Segoe UI", system-ui, sans-serif); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.h-button:hover, .h-button:focus-visible { background: var(--wine); color: var(--wine-on); outline: none; }
/* An open H stays as it was, never filled: the box beside it says it is open, and a filled H outranked the choices it
   opened (2 Nov 2026). */
/* While the page scrolls the H steps aside, so it never passes over the rows going by, and comes back when the page
   rests (31 Oct 2026). An open box, or the button a keyboard is on, stays. */
.h-button { transition: opacity .2s ease; }
.h-help.is-scrolling:not(.is-open) .h-button:not(:focus-visible) { opacity: 0; pointer-events: none; }
/* Dragged off what it covers (4 Nov 2026): the button holds the finger, never the page under it, and the H slides to
   the nearer side when let go. */
.h-button { touch-action: none; }
.h-help.is-settling { transition: left .15s ease, top .15s ease; }
.h-help.is-dragging .h-button { cursor: grabbing; }
@media (prefers-reduced-motion: reduce) { .h-button { transition: none; } }
@media (prefers-reduced-motion: reduce) { .h-help.is-settling { transition: none; } }

/* The box, anchored to the button's own corner: above it at the foot, below it at the head, beside it at the edge. */
.h-box { position: absolute; width: min(320px, calc(100vw - 32px)); display: grid; gap: 8px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 8px 24px rgba(42, 37, 33, .12); }
.h-box[hidden] { display: none; }
.h-help[data-slot^="b"] .h-box { bottom: 52px; }
.h-help[data-slot^="t"] .h-box { top: 52px; }
.h-help[data-slot$="r"] .h-box { right: 0; }
.h-help[data-slot$="l"] .h-box { left: 0; }
.h-help[data-slot="rm"] .h-box { right: 52px; top: 50%; transform: translateY(-50%); }

.h-label { font: 700 .95rem var(--plain, "Lato", "Segoe UI", system-ui, sans-serif); color: var(--ink); }
.h-said { min-height: 44px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface);
  font: 400 1rem var(--plain, "Lato", "Segoe UI", system-ui, sans-serif); color: var(--ink); }
.h-said:focus { outline: none; border-color: var(--wine); }
.h-acts { display: flex; gap: 8px; }
.h-send, .h-not-now { min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--rule); cursor: pointer;
  font: 400 .95rem var(--formal, "Source Serif 4", "Times New Roman", Times, serif); }
.h-send { border-color: var(--wine); background: var(--wine); color: var(--wine-on); }
.h-send[disabled] { opacity: .6; cursor: default; }
.h-not-now { background: var(--surface); color: var(--ink); }
.h-not-now:hover { border-color: var(--ink); }
.h-word { margin: 0; font-size: .9rem; color: var(--soft); }
.h-word[hidden] { display: none; }
.h-word.is-sent { color: var(--fine); }                                                   /* green: all good, the house has it */
.h-word.is-failed { color: var(--wine); }                                                /* burgundy: due — try again */

/* How can I help? (25 Oct 2026): the questions in the same box, three boxes answered in one go. */
.h-first, .h-asks form { display: grid; gap: 8px; }
.h-first { gap: var(--in-a-batch, 4px); }
.h-first .h-acts { margin-top: 12px; }   /* the label and its field one batch, the acts the next */
.h-first[hidden], .h-asks[hidden] { display: none; }
.h-questions { display: grid; gap: 10px; }
.h-q { display: grid; gap: 4px; }
.h-q span { font: 400 .95rem var(--plain, "Lato", "Segoe UI", system-ui, sans-serif); color: var(--ink); }
.h-q input { min-height: 44px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface);
  font: 400 1rem var(--plain, "Lato", "Segoe UI", system-ui, sans-serif); color: var(--ink); }
.h-q input:focus { outline: none; border-color: var(--wine); }

/* Fix or Improve (Vikrant, 1 Nov 2026; Wrong and Better until 2 Nov): the box opens on its two choices, side by side and alike, neither the first:
   the house's act, the hairline and the serif, so neither is burgundy. */
.h-choose { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.h-choose[hidden] { display: none; }
.h-pick { min-height: 48px; padding: 0 18px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer;
  font: 400 1rem var(--formal, "Source Serif 4", "Times New Roman", Times, serif); }
.h-pick:hover, .h-pick:focus-visible { border-color: var(--ink); outline: none; }
.h-not-now[disabled] { border-color: var(--rule); color: var(--quiet); cursor: default; }   /* Undo, with nothing marked yet, as the house's act with nowhere to go */

/* The page's manual (the Bank's slice 4; Vikrant, 14 Nov 2026, "The page's manual, then Fix"): on the Office alone, the
   box opens on the page's name, its ways in and Ask the house, then Fix and Improve under a hairline. The words
   wear the house's own section head, row names and chevrons (`house.css`); this sheet only places them. The box takes a
   line's width while it holds a manual, so a question breaks once, not three times, and ends within the window, never
   past the bar. The manual alone scrolls: Fix and Improve stay at the box's foot, every act in sight, in larger type too,
   where the box ran past the window's foot and hid them (the second blind reader, 14 Nov 2026). */
.h-box:not([hidden]):has(> .h-manual:not([hidden]):not(:empty)) { width: min(30rem, calc(100vw - 32px)); max-height: calc(100dvh - 148px);
  display: flex; flex-direction: column; overflow: hidden;
  padding: var(--inside-a-card) var(--inside-a-tile) var(--inside-a-tile); }   /* the house's room inside a tile, and a card's above the title, so the title stands nearer its rows than the box's edge */
.h-box:not([hidden]):has(> .h-manual:not([hidden]):not(:empty)) > :not(.h-manual) { flex: none; }
.h-box > .h-manual:not([hidden]):not(:empty) { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  margin: -4px; padding: 4px; }   /* the room a row's focus ring takes, given back, so the scroll never cuts it */
.h-manual[hidden], .h-manual:empty { display: none; }
.h-manual-page { display: grid; gap: var(--between-batches); padding-bottom: calc(var(--between-batches) / 2); }   /* with the box's own 8, the hairline over Fix stands as far from Ask as from Fix */
.h-manual-page > .batch > * { margin: 0; }
/* The screen's name stays while the manual scrolls under it, so a box scrolled to its answer in larger type still says
   whose manual it is, and the rows passing under it say there is more above (the third blind reader, 14 Nov 2026). Its
   paper reaches half its batches' room below it, given back, so nothing moves while nothing scrolls. Once the manual has
   scrolled, the name casts the box's own shadow on the rows, so a list that starts part way says it does (the fourth). */
.h-manual-page > .batch:first-child { position: sticky; top: -4px; z-index: 1; background: var(--surface);
  padding: 4px 0 calc(var(--between-batches) / 2); margin: -4px 0 calc(var(--between-batches) / -2); }
.h-manual.is-scrolled > .h-manual-page > .batch:first-child { box-shadow: 0 8px 8px -8px rgba(42, 37, 33, .25); }
.h-manual-page > .hl-said { margin: 0; }
/* The ways in, one list: a hairline between rows and none around them, so the list ends in space before Ask, never in a
   line Ask would read as one more row of (the blind reader, 14 Nov 2026). */
.h-manual-rows { margin: calc(var(--between-batches) / -2) 0 0; padding: 0; list-style: none; }   /* the first row's half of its room given back: the title stands its batches' width from the first name, no more */
.h-manual-rows:last-child { margin-bottom: calc(var(--between-batches) / -2); }   /* with no Ask beneath, the last row ends as Ask would, as far from the hairline as Fix stands under it */
.h-manual-rows > li + li { border-top: 1px solid var(--rule); }
.h-manual-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--between-batches); box-sizing: border-box;
  min-height: 48px; padding-block: calc(var(--between-batches) / 2); color: inherit; text-decoration: none; }
.h-manual-row > .batch { display: flex; flex-direction: column; min-width: 0; }
.h-manual-row .hl-name { text-wrap: balance; }   /* as a row's title wraps on Home and Clearance: two even lines, never one word left alone */
.h-manual-row .hl-open { min-height: 0; }   /* a row that is itself the way in: its sign only marks it, in the wine of the Bank's own rows */
.h-manual-row:hover .hl-name, .h-manual-row:focus-visible .hl-name { color: var(--wine); }
.h-manual-row:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
.h-manual-rows + .h-manual-ask { margin-top: 0; }   /* the ways in end, and asking begins: a card's room from the last row's words (its own half of the room and the batches' width), nearer its rows than Fix, where it had stood between the two (the fifth blind reader) */
.h-manual-ask { display: grid; gap: var(--in-a-batch); }
.h-manual-asking { display: flex; gap: 8px; }
.h-manual-asking .h-said { flex: 1 1 0; width: 0; min-width: 0; }   /* the field takes the room the act leaves, never its own twenty letters' width, which in larger type held the box wider than a phone */
/* Ask in the box's quiet dress, as Fix and Improve are: the burgundy Ask was the strongest mark in the box and drew the
   eye past the how-tos it is the fallback for (the blind reader, 14 Nov 2026). */
.h-manual-asking .h-send { min-height: 48px; border-color: var(--rule); background: var(--surface); color: var(--ink); }   /* the box's acts' 48, as Fix and Improve stand; the field stands level with it */
.h-manual-asking .h-send:hover, .h-manual-asking .h-send:focus-visible { border-color: var(--ink); outline: none; }
/* The answer is what the reader asked for, so it reads in ink at a sentence's height; a failure keeps the house's burgundy. */
.h-manual-said { line-height: 1.4; }
.h-manual-said.is-sent { color: var(--ink); }
.h-manual:not([hidden]):not(:empty) + .h-choose { padding-top: var(--between-batches); border-top: 1px solid var(--rule); }
/* On the Office the page beneath the open box is dimmed, at every width, as it is behind the house's search
   (`designs/shell.css`), so what shows beside or below the box never reads as part of it, and a tap on it closes Help
   (the blind readers, 14 Nov 2026: a phone dimmed and a PC did not, two ways of standing over a page). The H stays lit
   above the dim, the way out as it was the way in. The floor's H has no manual and stays as it was. */
.has-office-shell .h-help.is-open::before { content: ''; position: fixed; inset: 0; background: rgba(42, 37, 33, .3); }
.has-office-shell .h-help.is-open .h-button { position: relative; }

/* Improve's marking screen: the window's picture as large as the room allows, the pen's marks on it, and beside it the
   words and the acts in a card of their own. It fills the window over the page it pictures, and the page beneath stays
   still while it is open. On a narrow screen the card goes beneath the picture. */
.h-help.is-taking { visibility: hidden; }
html.h-marking { overflow: hidden; }
.h-mark { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--between-cards, 24px);
  box-sizing: border-box; padding: var(--between-cards, 24px); background: var(--paper); }
.h-mark[hidden] { display: none; }
.h-mark-screen { display: flex; flex-direction: column; min-height: 0; }
.h-mark-picture { flex: 1; min-height: 0; display: flex; align-items: flex-start; justify-content: center; }
.h-mark-canvas { display: block; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 24px rgba(42, 37, 33, .12);
  cursor: crosshair; touch-action: none; }   /* a finger draws on it, never scrolls the page */
.h-mark-canvas[hidden], .h-mark-none[hidden] { display: none; }
.h-mark-none { box-sizing: border-box; width: 100%; margin: 0; padding: 24px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface);
  color: var(--soft); font: 400 1rem var(--plain, "Lato", "Segoe UI", system-ui, sans-serif); text-align: center; }
/* The card stands as tall as the picture beside it (the script says how tall, --picture-h), its top and foot level
   with the picture's, and the words' box takes what the card has to spare: room to write, never a column two-thirds
   empty (2 Nov 2026). */
.h-better { box-sizing: border-box; display: flex; flex-direction: column; gap: var(--in-a-batch, 4px); align-self: start; min-height: var(--picture-h, 0);
  padding: 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); }
.h-mark-title { margin: 0 0 12px; font: 500 1.6rem/1.15 var(--formal, "Source Serif 4", Georgia, serif); color: var(--ink); }
.h-better-said { box-sizing: border-box; flex: 1; width: 100%; min-height: 140px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface);
  font: 400 1rem/1.45 var(--plain, "Lato", "Segoe UI", system-ui, sans-serif); color: var(--ink); resize: none; }
.h-better-said:focus { outline: none; border-color: var(--wine); }
.h-better .h-acts { margin-top: 12px; }
@media (max-width: 760px) {
  .h-mark { grid-template-columns: 1fr; grid-template-rows: minmax(240px, 1fr) auto; gap: 16px; padding: 16px; overflow: auto; }
  .h-better { min-height: 0; }
}

@media print { .h-help, .h-mark { display: none; } }
