/* The frame every product page shares (README, "Product pages"): the masthead across the top, then the page's
 * content in a column centred across the page and starting at its top (owner, 2026-10-21), on a light grey surface.
 * The content itself is jud-* components; nothing here styles one. */

html, body { margin: 0; }
/* On <body>, not on the page's own element: a drawer, modal or menu a page appends to <body> sits outside it, and
 * would otherwise draw in the browser's serif. */
body {
  color: var(--jds-gray-1000);
  font-family: var(--jds-font-family-brand), system-ui, sans-serif;
}

.product-page {
  box-sizing: border-box;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--jds-gray-50);
}

.product-page__main {
  box-sizing: border-box;
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
}

.product-page__column {
  width: 100%;
  max-width: 480px;
}

/* A stack of the content's own blocks (fields, buttons, links), 24px apart. */
.product-page__stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.product-page__stack[data-gap="sm"] { gap: 12px; }

.product-page__center { align-self: center; }

/* The app shell (shared/app-shell.tsx; Figma 41739:317084): the top (jud-main-nav, or on a focused page the masthead
 * and a task bar) across the full width, then the body below it. A page drawn inside it owns its own gutters; the app shell
 * only places the parts.
 * - The body is capped at the app shell's one max width (shared/app-shell-width.css) and centred, as the masthead's and the main
 *   nav's rows are, so their edges line up. The content has no cap of its own: it takes what the rail leaves, or the
 *   whole body with no rail. The rail is a row item as wide as jud-side-bar draws itself, so the content flows around
 *   whatever width it has.
 * - With a side bar, 1024px and over (shared/breakpoint.ts), while it is jud-side-bar's grey box (Figma's Admin normal page, 44160:87502): a white page; the
 *   rail and a white panel holding the page and the footer, each 8px from the edge and 8px apart; the panel 12px round
 *   with a 1px gray-200 border (Figma's layout rules, 41876:196437).
 * - Below 1024px (Figma's Tablet and Mobile, 41796:188844 and 41796:189972) the rail is a drawer and the page runs edge to edge with no panel, as a
 *   focused page's does at every width.
 * - The body is its own layer, under the top: whatever a page lifts (a popover at 30) stays inside it, so it passes under
 *   jud-main-nav's sticky row as the page scrolls. */
.app-shell {
  box-sizing: border-box;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--jds-gray-0);
}

.app-shell__body {
  box-sizing: border-box;
  flex: 1;
  display: flex;
  width: 100%;
  max-width: var(--jud-app-shell-max-width);
  min-height: 0;
  margin-inline: auto;
  isolation: isolate;
}
/* The rail is a stretched row item, so its height is definite and jud-side-bar's 100% fills it to the panel's foot. */
.app-shell__rail { flex: none; }
.app-shell__column { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-shell__main { flex: 1; min-width: 0; }

/* A task's steps (Figma's Task panel, recipe 4, 44160:86653) and the page beside them. The steps are a box as the page's
 * panel is (12px round, a 1px gray-200 border), 8px from the edge and from the page: above the page below 1024px; from
 * 1024px beside it, as tall as it, the steps inside held 24px below the top bar as the page scrolls and scrolled on their
 * own when taller than the screen. With a side bar too they sit between it and the page: Figma has no drawing of the
 * two together. They hold the page 8px from each edge; from 1024px, with a side bar, the side bar's padding holds. */
.app-shell__body:has(> .app-shell__steps) { flex-direction: column; padding: 8px; }
.app-shell__body:has(> .app-shell__steps) > .app-shell__column {
  border: 1px solid var(--jds-gray-200);
  border-radius: 12px;
}
.app-shell__steps {
  box-sizing: border-box;
  margin-bottom: 8px;
  padding: 16px;
  border: 1px solid var(--jds-gray-200);
  border-radius: 12px;
}
@media (min-width: 1024px) {
  .app-shell__body:has(> .app-shell__rail) {
    gap: 8px;
    padding: 0 8px 8px;
  }
  .app-shell__body:has(> .app-shell__rail) > .app-shell__column {
    border: 1px solid var(--jds-gray-200);
    border-radius: 12px;
    background: var(--jds-gray-0);
  }
  .app-shell__body:has(> .app-shell__steps) { flex-direction: row; gap: 8px; }
  .app-shell__steps { flex: 0 0 280px; margin-bottom: 0; padding: 24px 16px; }
  .app-shell__steps-list {
    position: sticky;
    top: calc(var(--jud-main-nav-stuck-height, 0px) + 24px);
    max-height: calc(100vh - var(--jud-main-nav-stuck-height, 0px) - 48px);
    overflow-y: auto;
  }
}

/* A task's action bar (Figma's Action bar, in the Panel's Bottom bar): white, a 1px gray-200 line over it, the start
 * group at the left and the end group at the right. It is the last thing in the page's column before the footer, held
 * at the foot of the screen while the page above it scrolls, so at the end of the page it sits under the last field and
 * covers nothing. A field focused under it is scrolled clear of it. */
.app-shell__actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
  border-top: 1px solid var(--jds-gray-200);
  background: var(--jds-gray-0);
}
.app-shell__actions-group { display: flex; flex-wrap: wrap; gap: 16px; }
.app-shell__actions-group:last-child { margin-left: auto; }
html:has(.app-shell__actions) { scroll-padding-bottom: calc(20px + 48px + 20px + 1px + 16px); }

/* A page whose content is not already a column of its own (the record page; the fill page's .container is one) sits
 * 24px from the top and the page column's gutter from each side, as wide as the body lets it be. */
.app-shell__page-column { padding: 24px var(--jud-page-column-gutter); }

.app-shell__footer {
  padding: 16px 24px;
  font-size: var(--jds-font-size-12);
  color: var(--jds-gray-600);
}

/* A task page's column (Figma App Shell recipe "6 · Task focus page", 44160:87293): wider than the 480px form column,
 * so a summary and a list of steps read across it. */
.product-page__column[data-width="task"] { max-width: 800px; }

/* The task page's action bar: the way back at the start, the next thing to do at the end; they stack when narrow. */
.product-page__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.product-page__actions-end { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: 12px; }
/* fill's strip: a destructive action is set apart from the buttons after it (Before: the bar's "destructive separated"
 * gap). The strip stamps each button's host with its slot; a host draws no box, so its ::after is one more flex item,
 * 12px wide, with the strip's gap either side of it: 36px in all. Narrow, the space goes, as it did Before. */
@media (min-width: 1024px) {
  [data-strip-slot="escalate"]:not(:last-child)::after { content: ""; width: 12px; }
}
/* fill's strip, except in the record head: its actions stay one group on one row — narrow, they wrap their labels (as
 * Before did) rather than split. */
[data-action-strip]:not(.record-head *) .product-page__actions-end { flex-wrap: nowrap; }
/* queue-item's head: its actions wrap as one group (the rule above leaves it out). Each button starts from its
 * narrowest (its label wrapped) and grows no wider than its label needs, so a row breaks only where even the narrowest
 * no longer fit, and where there is room each button keeps its own width: three fit at 400px, as they did Before. */
.record-head [data-bar-slot] { flex: 1 1 0; max-width: max-content; }

/* fill: the form's bottom bar (Figma App Shell recipe "6 · Task focus page", 44160:87293) — white, over a rule, its
 * buttons inset from the card's edge. */
.bottom-bar {
  border-top: 1px solid var(--jds-gray-200);
  padding: 16px 24px;
}

/* queue-item and public-case, the record page (Figma App Shell recipe "8 · Admin · case", 44160:87743): the record's
 * head — the breadcrumb, then its name, status badge and one line under them, with its actions at the end of the row
 * (.product-page__actions) — across the page over a rule; then the record's tabs down the side and the record beside
 * them, one column below 1024px or with no tabs. The page's one heading is the record's name. */
.record-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--jds-gray-200);
}
.record-head[hidden] { display: none; }
.record-head__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.record-head__title { margin: 0; font-size: 28px; line-height: 36px; font-weight: 700; color: var(--jds-gray-1000); }
.record-head__sub { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--jds-gray-700); }
.record-head__sub[hidden] { display: none; }
.record-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 1024px) {
  .record-body:has(> .record-body__tabs:not(:empty)) { grid-template-columns: 200px minmax(0, 1fr); }
}
.record-body__main { min-width: 0; }

/* queue-item, on a queue whose records open in the hearing workspace (fill-page.ts mountWorkspaceLayout; Figma "9 ·
 * Task without steps", 44353:34543): the record's head across the top; the record's tabs, the case context and the
 * live form side by side; the save state, the record's name and the one button along the bottom, which stays in view.
 * One column below 1024px. */
.workspace { display: flex; flex-direction: column; gap: 24px; }
.workspace__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 1024px) {
  .workspace__body { grid-template-columns: 200px 288px minmax(0, 1fr); }
}
.workspace__body > * { min-width: 0; }
.workspace__bottom {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--jds-gray-200);
  background: var(--jds-gray-0);
}
.workspace__ident { margin: 0; font-size: 14px; line-height: 20px; color: var(--jds-gray-700); }
.workspace__submit { margin-inline-start: auto; }

/* public-submitted: "what happens next" — an ordered list of steps, each its label (and the badge saying where the
 * filer is) over its body. */
.submitted-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.submitted-step { display: flex; flex-direction: column; gap: 4px; }
.submitted-step__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.submitted-step__body { margin: 0; color: var(--jds-gray-800); }
.submitted-page__ref-cell { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }

/* public-dashboard: a tray's panel and the form picker's links are small stacks (.product-page__stack); a hidden
 * panel stays hidden over the stack's flex, the links drop the list's bullets, and a row's own links and buttons sit
 * in one wrapping line. */
.dashboard-panel[hidden] { display: none; }
.dashboard-links { margin: 0; padding: 0; list-style: none; }
.dashboard-note { margin: 0; }
.dashboard-row__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* public-apply: the landing's copy beside its aside (instructions and checklist, or the court's notes), one column
 * when narrow. The declaration's two copy columns are markup the server writes (internal/landing's landing.HTML):
 * .apply-copy gives its headings, paragraphs and lists the page's type, its links jud-link's colours, and the aside its
 * smaller size. */
.apply-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 1023.98px) { .apply-columns { grid-template-columns: 1fr; } }
.apply-aside { padding: 16px; border-radius: 8px; background: var(--jds-gray-100); }
.apply-copy { color: var(--jds-gray-900); }
.apply-copy h3 { margin: 0 0 12px; font-size: 18px; line-height: 26px; font-weight: 600; }
.apply-copy p, .apply-copy ul { margin: 0 0 12px; }
.apply-copy ul { padding-inline-start: 20px; }
.apply-copy a { color: var(--jds-blue-600); }
.apply-copy a:hover { color: var(--jds-blue-700); }
.apply-copy[data-size="sm"] { font-size: 14px; line-height: 20px; }
.apply-copy[data-size="sm"] h3 { font-size: 16px; line-height: 24px; }
.apply-acks { margin: 0; padding: 16px; border: 0; border-radius: 8px; background: var(--jds-blue-100); }
.apply-acks legend { float: left; width: 100%; padding: 0; }

/* ect-crc-retrieve: a focus-heir is a tabIndex=-1 wrapper that takes focus after a submit so a keyboard user is landed
 * on the newly-rendered content; `--result` and `--error` are the two reshape arms, distinct suffix classes so a
 * mutation-anchor on one cannot be confused with the other. The outline is drawn ONLY when the heir is reached by
 * keyboard (focus-visible), never on a mouse click into the result body. */
.ect-crc-retrieve__focus-heir { outline: none; }
.ect-crc-retrieve__focus-heir:focus-visible {
  outline: var(--jud-focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* The Q/A section inside a jud-description-list cell — the gateway's dismissal-details bundle rendered as a stack of
 * {Q, A} rows. Each pair is a block (not inline), so the Q and the A read on their own lines; the stack is tight so
 * the whole list reads as a dense column, not spread apart. */
.ect-crc-retrieve__qa {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
}
.ect-crc-retrieve__qa-pair {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ect-crc-retrieve__qa-pair > dt { font-weight: 600; margin: 0; }
.ect-crc-retrieve__qa-pair > dd { margin: 0; }

/* The raw-<pre> fallback for a dismissal-details value the regex cannot split: inherit the surrounding type (so it
 * reads as the sibling text, not the browser's monospace default) and wrap long lines rather than scroll. */
.ect-crc-retrieve__qa-raw {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* changesets-view: the raw request the agent sent, shown whole, wrapped, never scrolled. */
.changeset-raw {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--jds-gray-200);
  border-radius: 6px;
  background: var(--jds-gray-50);
  color: var(--jds-gray-800);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* record-layout: a RecordLayout being filled in: the open page, its title over its blocks, two to a row; a text or a
 * button takes the whole row. Its steps and its closing buttons are the app shell's. */
.record-layout__panel {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
}
/* scrolled to, with what a failed step said under it, 24px below the task bar: the page's scroll-padding-top
 * (jud-main-nav) already keeps it below the bar */
.record-layout__title { margin: 0; font-size: var(--jds-font-size-32); line-height: 40px; font-weight: 700; scroll-margin-top: 24px; }
.record-layout__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.record-layout__cell[data-span="full"] { grid-column: 1 / -1; }
/* a field takes two rows, its label's and its box's, which the field beside it shares (shared/field-rows.css): their
 * labels start level and so do their boxes */
.record-layout__cell[data-span="half"] { display: grid; grid-row: span 2; grid-template-rows: subgrid; --jud-field-rows: subgrid; }
.record-layout__cell[data-span="half"] > * { grid-row: 1 / -1; }
/* columns: two or three cards side by side, as tall as the tallest; one over the other below the tablet line */
.record-layout__columns { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 24px; }
/* a table's cell: as wide as Figma's input cell's box (192px, less its 16px each side), so a narrow screen scrolls the
 * table in its own box, as Figma's phone drawing does, rather than squeezing the box */
.record-layout__table-cell { min-width: 160px; }
.record-layout__text { margin: 0; color: var(--jds-gray-800); white-space: pre-line; }
.record-layout__heading { display: flex; flex-direction: column; gap: 24px; }
/* a list filled in an item at a time: its label, its items, and Add item under them */
.record-layout__items { display: flex; flex-direction: column; gap: 16px; }
/* a drawer is narrow: its fields one over the other */
.record-layout__drawer > .record-layout__grid { grid-template-columns: minmax(0, 1fr); }
/* a button sits at the right of its row, where a page's way on is */
.record-layout__cell--button { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; }
/* the buttons that do not go on: beside one that does, they sit at the left */
.record-layout__buttons { display: flex; flex-wrap: wrap; gap: 16px; }
.record-layout__buttons:not(:last-child) { margin-right: auto; }
/* below the tablet line: the action bar keeps 16px around its buttons, and a record layout's blocks are one to a row */
@media (max-width: 1023.98px) {
  .app-shell__actions { padding: 16px; }
  .record-layout__panel { padding: 24px 16px; }
  .record-layout__grid { grid-template-columns: minmax(0, 1fr); }
  .record-layout__columns { grid-auto-flow: row; }
}
/* records-centre: the landing page's sign-ins, the dashboard's buttons and a placeholder page's word, in one column
 * centred across the page and starting 48px below the masthead, as the frame above */
.records-centre { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 48px 16px; }
/* records-sign-ins: Singpass's sign-in above Corppass's, one under the other */
.records-sign-ins { display: flex; flex-direction: column; align-items: center; gap: 24px; }
/* records-dashboard: the dashboard with records and drafts listed, its buttons above the lists */
.records-dashboard { box-sizing: border-box; display: flex; flex-direction: column; gap: 24px; max-width: 800px; margin: 0 auto; padding: 48px 16px; }
.records-dashboard__buttons { display: flex; flex-wrap: wrap; gap: 16px; }
