/* ==========================================================================
   GENERATED TOOLS — the page (tools.html) and every tool's screen, G8 B073,
   3 Nov 2026.

   Additions only, on the Office's own system: every colour, size and radius
   is office.css's token (--o-*), which the pro theme points at the light
   sheet, the dark switch at the posts' black, and the classic theme at the
   dark two-tone. No hand-written colour, so light and dark read without a
   dark copy of this file (tools/dark-side.mjs has nothing to write for it).

   A tool's screen (.tl-tool, drawn by tool-render.mjs) is the business's,
   not the Office's chrome: one quiet sheet, rows over cards, the figures
   that matter large, colour only for state and never only colour (each
   state is a word too). The canvas is a container: narrower than 540px a
   table becomes one card per row, each value with its label, and nothing
   runs off the side. The CSP refuses style="": everything is here, by class.
   ========================================================================== */

/* ---------- the page ------------------------------------------------------------ */
#office .tl-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
#office .tl-grid .ms-card { grid-column: auto; }
@media (min-width: 1180px) {
  #office .tl-grid { grid-template-columns: minmax(0, 0.64fr) minmax(0, 1.36fr); grid-template-rows: auto 1fr; grid-template-areas: 'ask preview' 'facts preview'; }
  #office .tl-facts { align-self: start; }
  #office .tl-ask { grid-area: ask; }
  #office .tl-facts { grid-area: facts; }
  #office .tl-preview { grid-area: preview; }
}
#office .tl-ask__h { margin: 0 0 0.5rem; color: var(--o-text); font: 650 var(--o-t-lg)/1.3 var(--display); letter-spacing: -0.01em; text-wrap: balance; }
#office .tl-ask__how { margin: 0 0 1rem; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.55; }
#office .tl-part__h { margin: 0 0 1rem; color: var(--o-text); font: 650 var(--o-t-md)/1.3 var(--body); }
#office .tl-part__h:focus { outline: none; }

/* Which tool of the sample: three plain choices, the one shown underlined. */
#office .tl-picks { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; border-top: 1px solid var(--o-line-2); padding-top: 0.5rem; }
#office .tl-pick { min-height: 44px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--o-dim); font: 600 var(--o-t-sm)/1 var(--body); cursor: pointer; }
#office .tl-pick:hover { color: var(--o-text); }
#office .tl-pick[aria-pressed="true"] { color: var(--o-text); border-bottom-color: var(--o-text); }
#office .tl-pick:focus-visible { outline: 1px solid var(--focus-edge); outline-offset: 2px; border-radius: var(--o-r-sm); }

/* Preview as / State: radio choices drawn as chips; the radio itself stays a radio for keyboards and readers. */
#office .tl-controls { display: grid; gap: 0.75rem; margin: 0 0 1rem; }
#office .tl-seg { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; min-width: 0; margin: 0; padding: 0; border: 0; }
#office .tl-seg__k { float: left; width: 100%; margin: 0 0 0.25rem; padding: 0; color: var(--o-faint); font: 600 var(--o-t-xs)/1.3 var(--body); }
#office .tl-seg__o { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 0 0.75rem; border: 1px solid var(--o-line-2); border-radius: var(--o-r-sm);
  background: var(--o-inset); color: var(--o-dim); font: 600 var(--o-t-sm)/1 var(--body); cursor: pointer; }
#office .tl-seg__o input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
#office .tl-seg__o:hover { color: var(--o-text); border-color: var(--o-line-3); }
#office .tl-seg__o:has(input:checked) { border-color: var(--o-text); color: var(--o-text); box-shadow: inset 0 0 0 1px var(--o-text); }
#office .tl-seg__o:has(input:focus-visible) { outline: 1px solid var(--focus-edge); outline-offset: 2px; }
#office .tl-seg:disabled .tl-seg__o { opacity: 0.55; cursor: not-allowed; }

/* What it is, before it is published. */
#office .tl-facts__dl { display: grid; gap: 1rem; margin: 0 0 1.25rem; }
#office .tl-facts__k { margin: 0 0 0.25rem; color: var(--o-faint); font: 600 var(--o-t-xs)/1.3 var(--body); }
#office .tl-facts__v { margin: 0; color: var(--o-text); font-size: var(--o-t-sm); line-height: 1.55; }
#office .tl-facts__list { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
#office .tl-facts__list strong { font-weight: 650; }
#office .tl-facts__dim { color: var(--o-dim); }
#office .tl-publish { display: grid; gap: 0.5rem; justify-items: start; padding-top: 1rem; border-top: 1px solid var(--o-line-2); }
#office .tl-publish__b { min-height: 44px; }
#office .tl-publish__why { margin: 0; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.5; }

/* ---------- the canvas: where a tool is drawn ---------------------------------------- */
#office .tl-canvas { container: tool / inline-size; min-width: 0; padding: 1.25rem; border: 1px solid var(--o-line-2); border-radius: var(--o-r-lg); background: var(--o-inset); }
@media (max-width: 480px) { #office .tl-canvas { padding: 1rem; } }

/* ---------- a tool's screen (tool-render.mjs) ------------------------------------- */
#office .tl-tool { display: grid; gap: 1rem; min-width: 0; color: var(--o-text); }
#office .tl-head { display: grid; gap: 0.25rem; }
#office .tl-title { margin: 0; color: var(--o-text); font: 650 var(--o-t-xl)/1.2 var(--display); letter-spacing: -0.015em; }
#office .tl-purpose { margin: 0; max-width: 62ch; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.55; }
#office .tl-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; min-width: 0; }
#office .tl-blocks > :is(.tl-list, .tl-form, .tl-note, .tl-subhead, .tl-status) { grid-column: 1 / -1; }
#office .tl-blocks > .tl-filter { grid-column: 1 / -1; }
#office .tl-subhead { margin: 0.5rem 0 0; font: 650 var(--o-t-md)/1.3 var(--body); }
#office .tl-note { margin: 0; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.55; }
#office .tl-block { min-width: 0; }
#office .tl-block__head { display: grid; gap: 0.25rem; margin: 0 0 0.5rem; }
#office .tl-block__h { margin: 0; font: 650 var(--o-t-md)/1.3 var(--body); }
#office .tl-withheld { margin: 0; color: var(--o-dim); font-size: var(--o-t-xs); line-height: 1.45; }
#office .tl-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* A list: a real table, its rows on the sheet. */
#office .tl-list { padding: 0.25rem 0 0; }
#office .tl-table { width: 100%; border-collapse: collapse; font-size: var(--o-t-sm); }
#office .tl-col { padding: 0 0.75rem 0.5rem 0; border-bottom: 1px solid var(--o-line-2); color: var(--o-faint); font: 600 var(--o-t-xs)/1.3 var(--body); text-align: left; white-space: nowrap; }
#office .tl-col--act { text-align: right; padding-right: 0; }
#office .tl-cell { padding: 0.75rem 0.5rem 0.75rem 0; border-bottom: 1px solid var(--o-line-2); color: var(--o-text); font-weight: 500; text-align: left; vertical-align: middle; }
#office td.tl-cell { white-space: nowrap; }
#office th.tl-cell { font-weight: 650; }
#office .tl-cell--money, #office .tl-cell--number, #office .tl-col--money, #office .tl-col--number { text-align: right; font-variant-numeric: tabular-nums; }
#office .tl-cell--act { padding-right: 0; text-align: right; white-space: nowrap; }
#office .tl-cell__k { display: none; }
#office .tl-cell--choice .tl-cell__v { display: inline-flex; align-items: center; min-height: 24px; padding: 0 0.5rem; border: 1px solid var(--o-line-3); border-radius: var(--o-r-sm); font-size: var(--o-t-xs); font-weight: 600; }
#office .tl-quiet { color: var(--o-dim); font-size: var(--o-t-xs); font-weight: 550; }
#office .tl-btn { min-height: 44px; }
#office .tl-done { margin: 0; color: var(--o-text); font-size: var(--o-t-xs); font-weight: 600; line-height: 1.45; text-align: left; white-space: normal; }
#office .tl-done:focus { outline: 1px solid var(--focus-edge); outline-offset: 2px; border-radius: var(--o-r-sm); }

/* A filter: its label and its choice, on one line where there is room. */
#office .tl-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
#office .tl-label { color: var(--o-dim); font: 600 var(--o-t-sm)/1.3 var(--body); }
#office .tl-need { color: var(--o-faint); font-weight: 500; }
#office :is(.tl-select, .tl-input) { min-height: 44px; min-width: 0; padding: 0 0.75rem; border: 1px solid var(--o-line-3); border-radius: var(--o-r-sm); background: var(--o-plane); color: var(--o-text); font: 500 var(--o-t-sm)/1.2 var(--body); }
#office :is(.tl-select, .tl-input):focus-visible { outline: 1px solid var(--focus-edge); outline-offset: 1px; }
#office .tl-input--n { width: 7.5rem; text-align: right; font-variant-numeric: tabular-nums; }

/* A total or a count: the figure large; a figure not known is said, never drawn as a number. */
#office .tl-figure { padding: 1rem 1rem; border: 1px solid var(--o-line-2); border-radius: var(--o-r); background: var(--o-plane); }
#office .tl-figure__dl { display: grid; gap: 0.25rem; margin: 0; }
#office .tl-figure__k { color: var(--o-dim); font: 600 var(--o-t-xs)/1.3 var(--body); }
#office .tl-figure__v { margin: 0; color: var(--o-text); font: 650 var(--o-t-xl)/1.15 var(--display); font-variant-numeric: tabular-nums; }
#office .tl-figure[data-state="unknown"] .tl-figure__v { color: var(--o-dim); font-size: var(--o-t-lg); }
#office .tl-figure__why { margin: 0; color: var(--o-dim); font-size: var(--o-t-xs); line-height: 1.45; }

/* A form: labelled fields, the counts of an order's lines, one button. */
#office .tl-form { padding: 1rem; border: 1px solid var(--o-line-2); border-radius: var(--o-r); background: var(--o-plane); }
#office .tl-form__f { display: grid; gap: 1rem; margin: 0; }
#office .tl-field { display: grid; gap: 0.5rem; min-width: 0; margin: 0; padding: 0; border: 0; }
#office .tl-field--check { grid-template-columns: auto 1fr; align-items: center; gap: 0.5rem; }
#office .tl-check { width: 24px; height: 24px; margin: 0; accent-color: var(--o-text); }
#office .tl-counts > legend { margin-bottom: 0.5rem; padding: 0; }
#office .tl-counts__lines { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
#office .tl-counts__line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.5rem 0; border-top: 1px solid var(--o-line-2); }
#office .tl-counts__k { min-width: 0; color: var(--o-text); font: 550 var(--o-t-sm)/1.4 var(--body); }
#office .tl-counts__u { color: var(--o-dim); font-size: var(--o-t-xs); }
#office .tl-form__go { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
#office .tl-problems { margin: 0; padding: 0.5rem 1rem; border: 1px solid var(--o-bad); border-radius: var(--o-r-sm); color: var(--o-text); font-size: var(--o-t-sm); line-height: 1.5; list-style: none; }
#office .tl-problems:focus { outline: 1px solid var(--focus-edge); outline-offset: 2px; }

/* What a list or a form is doing: the state in words, its tone a second signal. */
#office .tl-status { margin: 0; padding: 0.75rem 1rem; border: 1px dashed var(--o-line-3); border-radius: var(--o-r-sm); color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.5; }
#office .tl-status--error { border-style: solid; border-color: var(--o-bad); color: var(--o-text); }
#office .tl-status--offline { border-style: solid; border-color: var(--o-warn-ink); color: var(--o-text); }
#office .tl-status--slow { border-style: dotted; }
#office .tl-banner { grid-column: 1 / -1; }
#office .tl-again { margin: 0.5rem 0 0; }

/* ---------- the canvas narrower than 540px: one card per row ------------------------- */
@container tool (max-width: 540px) {
  #office .tl-blocks { grid-template-columns: minmax(0, 1fr); }
  #office .tl-table, #office .tl-table tbody, #office .tl-table tr, #office .tl-table th, #office .tl-table td { display: block; width: 100%; }
  #office .tl-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #office .tl-table tr { padding: 0.5rem 0; border-bottom: 1px solid var(--o-line-2); }
  #office .tl-cell { display: grid !important; grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr); align-items: center; gap: 0.75rem; padding: 0.25rem 0; border: 0; text-align: left; }
  #office .tl-cell--money, #office .tl-cell--number { text-align: left; }
  #office .tl-cell__k { display: block; color: var(--o-faint); font: 600 var(--o-t-xs)/1.3 var(--body); }
  #office .tl-cell__v { justify-self: start; min-width: 0; white-space: normal; }
  #office .tl-cell--act { display: flex !important; justify-content: flex-start; padding-top: 0.5rem; white-space: normal; }
  #office .tl-counts__line { align-items: flex-start; }
  #office .tl-input--n { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { #office .tl-canvas * { transition: none !important; animation: none !important; } }
