/* Every control a page uses: buttons, sign-in buttons, fields, chips, switch, notices, panels and small parts.
   No page invents its own control. States a page cannot hold still (hover, focus) also exist as .is-hover and
   .is-focus so the kit can show them. Load after base.css. */

/* ---------------------------------------------------------------- panel */
.panel {
  background: var(--panel); border-radius: var(--r-l); border: 1px solid var(--line);
  box-shadow: var(--shadow-panel); padding: var(--s6);
}
@media (max-width: 599.98px) { .panel { padding: 20px; } }

/* ---------------------------------------------------------------- focus: one ink ring, 2 px outside every control (R19).
   Real focus comes from :focus-visible in base.css; .is-focus is the same look, held still for the kit. */
.is-focus { outline: var(--ring); outline-offset: 2px; }

/* ---------------------------------------------------------------- buttons: secondary first, so .btn wins where both apply */
.btn-2, .btn-ms, .btn-google, .btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s3);
  min-width: 44px; border: 0; margin: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  -webkit-tap-highlight-color: transparent; user-select: none;
  transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease, color .2s ease;
}
.btn-2, .btn-ms, .btn-google {
  height: 52px; padding: 0 var(--s5); border-radius: 999px;
  background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--edge);
  font-family: var(--text); font-size: 17px; font-weight: 600; letter-spacing: -.005em;
}
/* 2026-11-16 (the mobile pass): every :hover look of the site sits in @media (hover: hover). A touch screen keeps an
   element "hovered" after a tap until the next tap elsewhere (iOS Safari), so a closed menu's button would keep the ring
   of an open one and a chip let go would keep its edge; a mouse sees exactly what it saw before. The kit's .is-hover
   (the look held still for the kit page) stays outside the query. phone.test.mjs holds every page to it. */
.btn-2.is-hover, .btn-ms.is-hover, .btn-google.is-hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
@media (hover: hover) { .btn-2:hover, .btn-ms:hover, .btn-google:hover { box-shadow: inset 0 0 0 1.5px var(--ink); } }
.btn-2.sm { height: 44px; padding: 0 18px; font-size: 16px; }

.btn {
  height: 58px; padding: 0 var(--s6); border-radius: 999px;
  background: var(--blue); color: var(--white); box-shadow: var(--shadow-primary);
  font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.015em;
}
.btn.is-hover { background: var(--blue-h); }
@media (hover: hover) { .btn:hover { background: var(--blue-h); } }
.btn:active { transform: translateY(1px); }
@media (max-width: 599.98px) { .btn { width: 100%; } }
/* R271 (C-I2): under 600 px a label that does not fit its box wraps to two centred lines and the button grows; the
   kit's heights (58, 52 and 44 px) are its minimums, so a label that fits sits as before, one line at that height.
   (The sign-in buttons wrap at every width, below; a dialog's buttons too.) Never set a button's height in a page. The
   line height stays the one the button inherits: a tighter one would re-place every one-line label by a fraction of a
   pixel. */
@media (max-width: 599.98px) {
  .btn, .btn-2, .btn-2.sm { height: auto; padding-block: var(--s2); white-space: normal; text-align: center; text-wrap: balance; }
  .btn { min-height: 58px; }
  .btn-2 { min-height: 52px; }
  .btn-2.sm { min-height: 44px; }
}

/* disabled, and "waiting" (looks disabled, still answers a click: Continue before the form is valid). A link cannot be
   [disabled]: it carries aria-disabled="true" and the page's click guard stops it (R36); it looks the same, and
   pointer-events stay on so the guard, not the stylesheet, is what refuses the click. */
.btn[disabled], .btn[aria-disabled="true"], .btn.is-waiting { background: var(--line); color: var(--muted); box-shadow: none; }
.btn-2[disabled], .btn-2[aria-disabled="true"], .btn-2.is-waiting,
.btn-ms:not(.btn):is([disabled], [aria-disabled="true"]), .btn-google:not(.btn):is([disabled], [aria-disabled="true"]) { color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); background: var(--off); }
:is(.btn, .btn-2, .btn-ms, .btn-google, .chip, .switch, .kbd-copy, .input):is([disabled], [aria-disabled="true"]) { cursor: not-allowed; }
.btn:is([disabled], [aria-disabled="true"]) .logo, :is(.btn-ms, .btn-google):is([disabled], [aria-disabled="true"]) svg { opacity: .55; }
.is-waiting { cursor: pointer; }

/* busy: a spinner before the label, and no second press (on the controls only: a busy region stays usable) */
:is(.btn, .btn-2, .btn-ms, .btn-google, .chip, .switch, .kbd-copy)[aria-busy="true"] { pointer-events: none; }
.btn[aria-busy="true"]::before, .btn-2[aria-busy="true"]::before, .btn-ms[aria-busy="true"]::before, .btn-google[aria-busy="true"]::before {
  content: ''; flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite;
}
.btn[aria-busy="true"] { background: var(--blue-h); }
[aria-busy="true"] .logo, .btn-ms[aria-busy="true"] > svg, .btn-google[aria-busy="true"] > svg { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* text link: ink, underlined, never blue. .link is the standalone action link (R21): a 44 px tap target with the
   underline on its text. A plain a inside a sentence stays inline and keeps the browser's underline. */
.link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 6px;
  color: var(--ink); font-weight: 600; cursor: pointer;
  text-decoration: underline 1.5px var(--edge-strong); text-underline-offset: .24em; text-decoration-skip-ink: auto;
  transition: text-decoration-color .2s ease;
}
.link.is-hover { text-decoration-color: var(--ink); }
@media (hover: hover) { .link:hover { text-decoration-color: var(--ink); } }
button.link { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-weight: 600; }

/* ---------------------------------------------------------------- sign-in buttons: provider logo, 20 px; on a white chip inside the primary.
   A provider label never clips: it fits, or wraps to two centred lines and the button grows (I2). */
.btn-ms, .btn-google { height: auto; min-height: 52px; padding-block: var(--s2); white-space: normal; text-align: center; }
.btn.btn-ms, .btn.btn-google { height: auto; min-height: 58px; padding: var(--s2) 20px var(--s2) var(--s3); gap: 10px; }
.btn-ms .btn-label, .btn-google .btn-label { min-width: 0; line-height: 1.15; text-wrap: balance; }
.btn-ms svg, .btn-google svg { width: 20px; height: 20px; flex: none; }
.logo { display: grid; place-items: center; flex: none; }
.btn .logo { width: 28px; height: 28px; border-radius: 50%; background: var(--white); }

/* ---------------------------------------------------------------- fields */
.field { display: grid; gap: var(--s2); min-width: 0; }
.field > label, .field > .label { font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.input {
  width: 100%; min-width: 0; height: 54px; padding: 0 var(--s4); margin: 0;
  border: 1.5px solid var(--edge-strong); border-radius: var(--r-m); background-color: var(--panel);
  font-family: var(--text); font-size: 17px; color: var(--ink);
  transition: border-color .15s ease;
}
.input::placeholder { color: var(--muted); opacity: 1; }
.input.is-hover { border-color: var(--edge-hover); }
@media (hover: hover) { .input:hover { border-color: var(--edge-hover); } }
/* focused: an ink edge plus the ring (a select focused by mouse shows it too: it says which control is open) */
.input:focus, .input.is-focus { border-color: var(--ink); outline: var(--ring); outline-offset: 2px; }
.input[disabled] { background-color: var(--off-field); color: var(--muted); border-color: var(--line); }
.field.bad .input { border-color: var(--bad); }
select.input {
  appearance: none; padding-right: var(--s7); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5l5 5 5-5' fill='none' stroke='%230e1b2c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--s4) center; background-size: 20px;
}
select.input[disabled] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5l5 5 5-5' fill='none' stroke='%235c6878' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.input.code { font-size: 20px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.input.code::placeholder { letter-spacing: .06em; }
/* R283 (d): 16 characters fit the field's content box at 360 and 320 px in a face as wide as 0.6 em (a phone's mono
   face; Linux draws the field in Instrument Sans, about 0.65 em at 600). Smaller type only where the field is narrow,
   never under 16 px; height, padding and weight stay. */
@media (max-width: 389.98px) { .input.code { font-size: 18px; } }
@media (max-width: 359.98px) { .input.code, .input.code::placeholder { font-size: 16px; letter-spacing: 0; } }
.err { display: flex; gap: var(--s2); align-items: flex-start; font-size: 15px; line-height: 1.4; font-weight: 500; color: var(--bad); }
.err::before { content: ''; flex: none; width: 18px; height: 18px; margin-top: 1px; background: currentColor; -webkit-mask: var(--i-bad) center / contain no-repeat; mask: var(--i-bad) center / contain no-repeat; }
.err:empty { display: none; }
/* R278: an error line followed by its action (account-page.js failLine: p.err, then button.btn-2.sm "Try again"; or a
   .link): the action on its own line under the words, at its own width, 12 px below them. The host is a plain block. */
.err + :is(.btn-2, .link) { display: flex; width: fit-content; margin-top: var(--s3); }

/* the date field (plan 2 Task 6, moved here from activity.css, C-I6): input.input[type=date] reads as the text field.
   Its value at the left (some browsers centre it), the browser's calendar button in the field's ink at a quieter
   strength, and the pointer on it. An empty date shows the browser's "mm/dd/yyyy" in the placeholder's muted colour, so
   it never reads as a chosen date: the page keeps data-blank on an empty date field (activity.js). */
input[type="date"].input { display: block; }
input[type="date"].input::-webkit-date-and-time-value { text-align: left; }
input[type="date"].input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .7; }
@media (hover: hover) { input[type="date"].input::-webkit-calendar-picker-indicator:hover { opacity: 1; } }
input[type="date"].input[data-blank]:not(:focus)::-webkit-datetime-edit { color: var(--muted); }

/* R278: a field and its one button on one line (an access code and Apply): div.field > label + div.field-row >
   (input.input + button.btn-2) + p.help. The field takes the room the button leaves, and may be narrower than its own
   intrinsic width; the button keeps its own width and the field's 54 px height. Where the row cannot give the field
   260 px beside the button (a phone), the button goes under the field at its own width: one track. */
.field-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); min-width: 0; }
.field-row > .input { flex: 1 1 260px; width: auto; }
.field-row > .btn-2 { flex: none; height: auto; min-height: 54px; }

/* ---------------------------------------------------------------- chips (several: aria-pressed; one: role=radio) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: var(--s2); height: 44px; min-width: 44px; padding: 0 18px; margin: 0;
  border: 0; border-radius: 999px; background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--edge-strong);
  font-family: var(--text); font-size: 16px; font-weight: 500; cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent; transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.chip.is-hover { box-shadow: inset 0 0 0 1.5px var(--edge-hover); }
@media (hover: hover) { .chip:hover { box-shadow: inset 0 0 0 1.5px var(--edge-hover); } }
.chip[aria-pressed="true"], .chip[role="radio"][aria-checked="true"] { background: var(--ink); color: var(--white); box-shadow: inset 0 0 0 1.5px var(--ink); }
.chip[disabled] { color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); background: var(--off); }

/* ---------------------------------------------------------------- switch: the button is the tap target (52 x 44); the 52 x 32 track is
   drawn inside, and the focus ring follows the track. Name it for what it controls (aria-label or aria-labelledby, R20);
   the words beside it say the state and describe it (aria-describedby), never name it. */
/* the switch's width and the row's gap, once: the description under a row (.switch-desc) is indented by them (M8) */
:root { --switch-w: 52px; --switch-gap: var(--s3); }
.switch-row { display: inline-flex; align-items: center; gap: var(--switch-gap); }
.switch {
  position: relative; flex: none; width: var(--switch-w); height: 44px; padding: 0; margin: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.switch::before { content: ''; position: absolute; left: 0; top: 6px; width: var(--switch-w); height: 32px; border-radius: 16px; background: var(--edge-strong); transition: background-color .2s ease; }
.switch::after { content: ''; position: absolute; left: 3px; top: 9px; width: 26px; height: 26px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(14, 27, 44, .3); transition: transform .2s ease; }
.switch[aria-checked="true"]::before { background: var(--ink); }
/* on: the 26 px knob 3 px from the track's right end */
.switch[aria-checked="true"]::after { transform: translateX(calc(var(--switch-w) - 32px)); }
.switch.is-hover::before { background: var(--edge-hover); }
.switch[aria-checked="true"].is-hover::before { background: var(--body); }
@media (hover: hover) {
  .switch:not([disabled]):hover::before { background: var(--edge-hover); }
  .switch[aria-checked="true"]:not([disabled]):hover::before { background: var(--body); }
}
.switch:focus-visible { outline: none; }
.switch:focus-visible::before, .switch.is-focus::before { outline: var(--ring); outline-offset: 2px; }
.switch.is-focus { outline: none; }
.switch[disabled]::before { background: var(--line); }
/* R261: locked on still reads "on": the on colour at reduced strength (the white knob stands 4.5:1 off it on the panel
   and on the ground, and it sits well apart from the pale locked-off track above) */
.switch[disabled][aria-checked="true"]::before { background: var(--ink); opacity: .6; }
.switch-label { font-size: 16px; font-weight: 500; color: var(--ink); cursor: pointer; }
.switch[disabled] + .switch-label { color: var(--muted); cursor: not-allowed; }
/* a description under a switch row (p.help.switch-desc, the switch's aria-describedby): it starts where the words
   start, past the switch and the row's gap (M8), with the kit's small step above */
.switch-desc { margin: var(--s1) 0 0; padding-left: calc(var(--switch-w) + var(--switch-gap)); text-wrap: pretty; }
/* the sentence form (plan 2 Task 9, R258): the words beside the switch are the sentence that names it (aria-labelledby;
   no state words), long enough to wrap. The row takes the width it is given; the sentence wraps beside the switch,
   never under it, and its first line sits level with the 32 px track: (44 px target - one 24 px line) / 2 = 10 px */
.switch-row.sentence { display: flex; align-items: flex-start; min-width: 0; }
.switch-row.sentence .switch-label { min-width: 0; padding-top: 10px; line-height: 1.5; text-wrap: pretty; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- notices */
.notice { display: flex; gap: var(--s3); align-items: flex-start; padding: 14px var(--s4); border-radius: var(--r-m); color: var(--ink); font-size: 16px; line-height: 1.45; }
.notice::before { content: ''; flex: none; width: 22px; height: 22px; margin-top: 0; background: var(--ink); -webkit-mask: var(--i-info) center / contain no-repeat; mask: var(--i-info) center / contain no-repeat; }
.notice.ok { background: var(--ok-bg); }
.notice.ok::before { background: var(--ok); -webkit-mask-image: var(--i-ok); mask-image: var(--i-ok); }
.notice.bad { background: var(--bad-bg); }
.notice.bad::before { background: var(--bad); -webkit-mask-image: var(--i-bad); mask-image: var(--i-bad); }
.notice.info { background: var(--info-bg); }
.notice.info::before { background: var(--info); }
.notice.warn { background: var(--warn-bg); }
.notice.warn::before { background: var(--warn); -webkit-mask-image: var(--i-warn); mask-image: var(--i-warn); }
.notice-body { display: grid; gap: var(--s3); min-width: 0; flex: 1; }
.notice-text { overflow-wrap: anywhere; }
.notice-acts { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------------------------------------------------------------- small parts */
.spinner { display: inline-block; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--edge); border-top-color: var(--ink); animation: spin .8s linear infinite; vertical-align: middle; }
.spinner.lg { width: 32px; height: 32px; border-width: 3px; }
/* reduced motion: the spinner stands still as a three-quarter ring, whichever way motion was turned off */
html.rm .spinner { border-color: var(--ink); border-right-color: var(--edge); }
@media (prefers-reduced-motion: reduce) { .spinner { border-color: var(--ink); border-right-color: var(--edge); } }
/* the "waiting" dot: a 10 px dot whose ring pulses inside the 24 px box (nothing reaches past it) */
.dot-pulse { position: relative; display: inline-block; flex: none; width: 24px; height: 24px; vertical-align: middle; }
.dot-pulse::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--ink); }
.dot-pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ink); opacity: 0; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.45); opacity: .6; } 100% { transform: scale(1); opacity: 0; } }
.tick { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ok); vertical-align: middle; }
.tick::after { content: ''; width: 14px; height: 14px; background: var(--white); -webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat; }
/* R270 (C-I5): a finished action, written one way: p.done-line with the words, beside or under the control that did it
   ("Saved", "Message sent…"), inside its host div.done-host[role=status][aria-live=polite] (R279: the role is on the
   host, never on the line). The kit's tick (a 20 px disc with its check, in a 24 px box) and the words in --ok, 16 px
   600. A notice box stays for a return from elsewhere. */
.done-line { display: flex; gap: var(--s2); align-items: flex-start; margin: 0; font-size: 16px; font-weight: 600; line-height: 1.45; color: var(--ok); overflow-wrap: anywhere; text-wrap: pretty; }
.done-line::before { content: ''; flex: none; width: 24px; height: 24px; margin-top: calc((1.45em - 24px) / 2); background: currentColor; -webkit-mask: var(--i-ok) center / contain no-repeat; mask: var(--i-ok) center / contain no-repeat; }
.done-line:empty { display: none; }
/* R279 (C-N2): the host sits ready in the page from first paint. Empty, it is out of the flow, so it costs its row no
   room; never display: none, so it is in the accessibility tree before its words come. */
.done-host:empty { position: absolute; }
/* C-M20: the quiet fill box (billing's cancel box). .edged: a box that holds rows (files' other folders), a --line
   hairline inside and less room above and below, the rows bring their own. */
.fill-box { padding: 14px var(--s4); border-radius: var(--r-m); background: var(--sunk); }
.fill-box.edged { padding-block: 4px; box-shadow: inset 0 0 0 1px var(--line); }
/* tap to copy: the code never breaks (I3). Where "Copied" does not fit beside it, the confirmation drops below. */
.kbd-copy {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-height: 44px; max-width: 100%; padding: 6px 14px 6px var(--s4); margin: 0;
  flex-shrink: 0; border: 0; border-radius: var(--r-s); background: var(--sunk); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--edge); cursor: pointer;
  font: 600 17px/1.2 var(--text); letter-spacing: .02em; font-variant-numeric: tabular-nums; text-align: left;
  transition: box-shadow .15s ease;
}
.kbd-copy.is-hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
@media (hover: hover) { .kbd-copy:hover { box-shadow: inset 0 0 0 1.5px var(--ink); } }
.kbd-copy-text { white-space: nowrap; }
.kbd-copy::after { content: ''; flex: none; width: 18px; height: 18px; background: var(--body); -webkit-mask: var(--i-copy) center / contain no-repeat; mask: var(--i-copy) center / contain no-repeat; }
.kbd-copy-done { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; color: var(--ok); letter-spacing: 0; white-space: nowrap; }
.kbd-copy-done::before { content: ''; flex: none; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat; }
.kbd-copy-done:empty { display: none; }
/* copied: the tick replaces the copy icon; with the word shown, the word carries the tick */
.kbd-copy.is-copied::after { background: var(--ok); -webkit-mask-image: var(--i-check); mask-image: var(--i-check); }
.kbd-copy.is-copied:has(> .kbd-copy-done:not(:empty))::after { display: none; }
/* the sentence form (plan 2 Task 12 fix round 1, R265): the text to copy is a sentence (an example message), not a code.
   One rule at every width: the words take the room they are given and wrap there, the copy mark stays at the right,
   level with the first line; "Copied" with its tick covers the words for its two seconds instead of taking a line of
   its own, so nothing moves. In a list the li holding one is a grid cell, so the chip fills its column (and a row of
   them shares one height). li.ex-line: a line among them with nothing to copy, its words lined up with theirs. Home's
   "Things to try", Help's examples and the first-entry step use it (account-page.js exampleItem). */
.kbd-copy.sentence { position: relative; flex-wrap: nowrap; align-items: flex-start; gap: 10px; padding-block: 10px; letter-spacing: 0; line-height: 1.35; }
.kbd-copy.sentence .kbd-copy-text { flex: 1 1 0; min-width: 0; white-space: normal; overflow-wrap: anywhere; text-wrap: pretty; }
.kbd-copy.sentence::after { margin-top: calc((1.35em - 18px) / 2); }
.kbd-copy.sentence .kbd-copy-done:not(:empty) { position: absolute; inset: 1.5px; padding: 0 14px 0 calc(var(--s4) - 1.5px); border-radius: calc(var(--r-s) - 1.5px); background: var(--sunk); }
.kbd-copy.sentence.is-copied:has(> .kbd-copy-done:not(:empty))::after { display: block; }
li:has(> .kbd-copy.sentence) { display: grid; }
.ex-line { display: flex; align-items: center; min-height: 48px; padding: 0 var(--s4); font-size: 17px; line-height: 1.35; color: var(--body); text-wrap: pretty; }
/* C-M23: .flush, a line at the list's own edge, not lined up with chips' words (Help's receipt-photo line under them) */
.ex-line.flush { padding-inline: 0; }

/* ================================================================ plan 2 (Task 3): the account pages' parts. Each is complete
   here (hover, focus, busy, disabled, the phone layout, long text); a page uses them as they are. */

/* ---------------------------------------------------------------- the strong secondary: ink fill, white text. The confirm
   button of a dialog (R163), never blue; anywhere else a page still has its one blue primary at most. */
.btn-2.strong { background: var(--ink); color: var(--white); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-2.strong.is-hover, .btn-2.strong[aria-busy="true"] { background: var(--body); box-shadow: inset 0 0 0 1.5px var(--body); }
@media (hover: hover) { .btn-2.strong:hover { background: var(--body); box-shadow: inset 0 0 0 1.5px var(--body); } }
.btn-2.strong:active { transform: translateY(1px); }
.btn-2.strong:is([disabled], [aria-disabled="true"], .is-waiting) { color: var(--muted); background: var(--off); box-shadow: inset 0 0 0 1.5px var(--line); }

/* ---------------------------------------------------------------- the tick box (R106: OneDrive's round check, moved here from the
   picker unchanged; ink, since blue is the primary's alone). The cell is the 44 px target; the native checkbox fills it
   (keyboard, label and screen reader as a checkbox) and is see-through; the drawn circle sits under it and carries the
   focus ring. Markup: span.tickbox > input.tickbox-in[type=checkbox] (named) + span.tickbox-mark[aria-hidden=true]. An
   empty span.tickbox keeps a row's column when the row has nothing to tick. */
.tickbox { position: relative; display: grid; place-items: center; flex: none; width: 44px; height: 44px; }
.tickbox-in { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tickbox-mark {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; pointer-events: none;
  background: var(--panel); box-shadow: inset 0 0 0 1.5px var(--edge-strong); transition: background-color .15s ease, box-shadow .15s ease;
}
.tickbox-mark::after {
  content: ''; width: 14px; height: 14px; background: var(--white); opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .15s ease;
  -webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat;
}
.tickbox-mark.is-hover { box-shadow: inset 0 0 0 1.5px var(--edge-hover); }
@media (hover: hover) { .tickbox-in:hover + .tickbox-mark { box-shadow: inset 0 0 0 1.5px var(--edge-hover); } }
.tickbox-in:checked + .tickbox-mark { background: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.tickbox-in:checked + .tickbox-mark::after { opacity: 1; transform: none; }
.tickbox-in:focus-visible { outline: none; }
.tickbox-in:focus-visible + .tickbox-mark { outline: var(--ring); outline-offset: 2px; }
/* disabled (in the picker: covered by a picked folder, ticked and not for this row to change) */
.tickbox-in:disabled { cursor: not-allowed; }
.tickbox-in:disabled + .tickbox-mark { background: var(--edge-strong); box-shadow: inset 0 0 0 1.5px var(--edge-strong); }
/* disabled and not ticked (the picker never draws it): the disabled look of the other controls */
.tickbox-in:disabled:not(:checked) + .tickbox-mark { background: var(--off); box-shadow: inset 0 0 0 1.5px var(--line); }

/* ---------------------------------------------------------------- the table (R166): 16 px throughout, the header 600 in the muted
   colour, a hairline between rows, no fills. It fills its box. A long cell wraps between words; words stay whole, so
   a short column (a date) is never squeezed to "Nove mber". .long: a cell that may hold one long unbroken run (a file
   name, a path) breaks anywhere, so it never pushes the table wider; put it on that column's cells. .num: a
   right-aligned column of tabular figures (its th too). .nowrap (R210): a short cell that stays on one line in the wide
   table (a date, a time, a short state; its th too). Cells sit flush with the box's edges. A th in tbody
   (scope="row") is the row's name: ink, 600, laid out as a td (M1). */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; line-height: 1.45; color: var(--ink); }
.tbl th, .tbl td { padding: 14px 16px; text-align: left; vertical-align: top; overflow-wrap: break-word; }
.tbl .long { overflow-wrap: anywhere; }
.tbl :is(th, td):first-child { padding-left: 0; }
.tbl :is(th, td):last-child { padding-right: 0; }
.tbl thead th { padding-top: 0; padding-bottom: 12px; font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--muted); border-bottom: 1px solid var(--edge); }
.tbl td { font-size: 16px; }
.tbl tbody th { font-size: 16px; font-weight: 600; color: var(--ink); }
.tbl tbody tr + tr > :is(td, th) { border-top: 1px solid var(--line); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .nowrap { white-space: nowrap; }
/* .none (R234): an empty value's "—" in the muted colour, span.none inside its cell (a .feed-skip workbook, a result
   with no pill) */
.tbl .none { color: var(--muted); }
.tbl td > .pill { margin-block: -2px; }
/* the wide table's last row sits flush with the box's bottom (stacked, the row's own padding does that, M2) */
@media (min-width: 700px) { .tbl tbody tr:last-child > :is(td, th) { padding-bottom: 0; } }
@media (max-width: 699.98px) { .tbl:not(.tbl-stack) tbody tr:last-child > :is(td, th) { padding-bottom: 0; } }
/* .tbl-stack: under 700 px each row becomes a block of label and value lines. Every td carries data-label (the column's
   name, shown in a label column on the left: a third of the width, at least 6.5em); a td without one (an action) and a
   row header (tbody th) take the whole line, the row header first. The cell stays in normal inline flow (R209): the
   label is a float pulled into the cell's left padding, so words, links, b, time and a pill in one cell run on as one
   text to the right of it; a label longer than its column wraps inside it, and the cell (a flow root) grows to hold it.
   The header row stays for screen readers, out of sight; the table and its parts keep their roles through role
   attributes in the markup (R213). */
@media (max-width: 699.98px) {
  .tbl.tbl-stack, .tbl.tbl-stack tbody, .tbl.tbl-stack tr { display: block; }
  .tbl.tbl-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  /* the body is the query container, so the label column (in cqi) is a third of the table's width wherever it is used */
  .tbl.tbl-stack tbody { container-type: inline-size; }
  .tbl.tbl-stack tbody tr { padding: 14px 0; }
  .tbl.tbl-stack tbody tr:first-child { padding-top: 0; }
  .tbl.tbl-stack tbody tr:last-child { padding-bottom: 0; }
  .tbl.tbl-stack tbody tr + tr { border-top: 1px solid var(--line); }
  .tbl.tbl-stack :is(td, th) { display: block; padding: 3px 0; border-top: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  .tbl.tbl-stack td[data-label] { --tbl-label: max(6.5em, 34cqi); display: flow-root; padding-left: calc(var(--tbl-label) + var(--s4)); }
  /* the label: a float as wide as the column, pulled left over the padding; its margin box is narrower than nothing, so
     it never shortens a line of the value, and the flow-root cell still grows to its height */
  .tbl.tbl-stack td[data-label]::before {
    content: attr(data-label); float: left; width: var(--tbl-label); margin-left: calc(-1 * (var(--tbl-label) + var(--s4)));
    font-weight: 600; color: var(--muted); overflow-wrap: break-word;
  }
  .tbl.tbl-stack td:not([data-label]) { padding-top: var(--s2); }
  .tbl.tbl-stack td > .pill { white-space: normal; }
}

/* ---------------------------------------------------------------- the time cell, td.when (R224): the day and the time of day,
   td.when.nowrap > time[datetime] > span.when-day + " " + span.when-clock. Each part stays whole. In the wide table the
   day sits above the time of day, which is muted. Stacked (and in the feed form) they share one line, "November 5,
   2026 · 7:30 PM": the dot is drawn by CSS in the space between them (so a screen reader hears only the day and the
   time), and where both cannot share a line the time of day goes whole to the next line, its dot clipped away. */
.tbl td.when .when-day, .tbl td.when .when-clock { display: block; white-space: nowrap; }
.tbl td.when .when-clock { color: var(--muted); }
@media (max-width: 699.98px) {
  /* the space between the parts is widened by word-spacing (the parts keep their own); the dot is centred in it */
  .tbl.tbl-stack td.when time { display: block; overflow: hidden; word-spacing: .5em; }
  .tbl.tbl-stack td.when .when-day, .tbl.tbl-stack td.when .when-clock { display: inline; word-spacing: normal; }
  .tbl.tbl-stack td.when .when-clock { position: relative; }
  .tbl.tbl-stack td.when .when-clock::before {
    content: '·' / ''; position: absolute; right: 100%; width: calc(.5em + .28em); text-align: center; color: var(--muted);
  }
}

/* ---------------------------------------------------------------- .tbl-feed (R224, R226): an activity table's compact phone
   form, a modifier of .tbl.tbl-stack. From 700 px it changes nothing. Under 700 px each body row is one block, a grid
   of two columns, and every row has the same three-line rhythm:
     line 1: the sentence (td.feed-lead), across the row, in ink;
     line 2: the first other cell in DOM order (the time), across the row, muted: one line, "day · time of day";
     line 3: the second other cell (the workbook; Activity's action) at the left, muted, and the result (td.feed-end, a
             pill) at the right end, centred on that cell's first line; with no second cell the pill stands alone there;
     then every further cell its own muted line across the row.
   A td.feed-skip (an empty value, "—") is clipped from sight but kept for screen readers. No label is drawn;
   data-label stays on every td (the a11y rule TABLES, and the labelled form when a table is not a feed). Rows: 12 px above and below, a hairline
   between, 2 px between their lines. The DOM order, so the reading order, does not change; the roles stay (R213).
   Everything 16 px (tables at 16 px; the text floor), the secondary lines in --muted at the header's line height. */
@media (max-width: 699.98px) {
  .tbl.tbl-stack.tbl-feed tbody tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s3); row-gap: 2px; align-items: start;
    padding: var(--s3) 0;
  }
  .tbl.tbl-stack.tbl-feed tbody tr:first-child { padding-top: 0; }
  .tbl.tbl-stack.tbl-feed tbody tr:last-child { padding-bottom: 0; }
  /* every cell spans the row by default; the further cells are auto-placed from row 4 on, one line each */
  .tbl.tbl-stack.tbl-feed tbody :is(td, th) { grid-column: 1 / -1; min-width: 0; padding: 0; line-height: 1.35; color: var(--muted); }
  .tbl.tbl-stack.tbl-feed tbody tr > :nth-child(1 of :not(.feed-lead, .feed-end, .feed-skip)) { grid-row: 2; }
  .tbl.tbl-stack.tbl-feed tbody tr > :nth-child(2 of :not(.feed-lead, .feed-end, .feed-skip)) { grid-column: 1; grid-row: 3; }
  .tbl.tbl-stack.tbl-feed tbody :is(td, th)::before { content: none; }
  .tbl.tbl-stack.tbl-feed tbody .feed-lead { grid-column: 1 / -1; grid-row: 1; line-height: 1.45; color: var(--ink); text-wrap: pretty; }
  /* the pill keeps the kit's -2px block margins, so its 26 px sit centred on line 3's first 21.6 px line */
  .tbl.tbl-stack.tbl-feed tbody .feed-end { grid-column: 2; grid-row: 3; display: flex; justify-content: flex-end; }
  .tbl.tbl-stack.tbl-feed tbody .feed-end > .pill { white-space: nowrap; }
  /* a skipped cell is clipped from sight, not removed (fix round 4, H1): it stays in the accessibility tree, so the
     cells after it keep their columns. Absolutely positioned, it is no grid item (no line, no :nth-child change), and
     the row is its containing block, so the 1 px box never reaches past the row. The thead's own pattern. */
  .tbl.tbl-stack.tbl-feed tbody tr { position: relative; }
  .tbl.tbl-stack.tbl-feed tbody .feed-skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---------------------------------------------------------------- T-013: the dense table, its scroll region and the sortable
   header (the admin pages). .tbl.tbl-dense: every cell 10 px by 12 px (density from padding, never smaller type: the
   text stays 16 px), the cells centred on the row; a row holding a .link, a .btn-2.sm or a sort button is exactly as
   tall as that 44 px control (the control reaches into the cell's padding). */
.tbl.tbl-dense :is(thead, tbody) tr > :is(th, td) { padding: 10px 12px; vertical-align: middle; }
.tbl.tbl-dense :is(td, th) > :is(.link, .btn-2.sm, .sort) { margin-block: -10px; }
/* the last row keeps its 10 px below too (the page's tables drop it), so a row with a control stays 44 px */
.tbl.tbl-dense tbody tr:last-child > :is(td, th) { padding-bottom: 10px; }
.tbl.tbl-dense .link { min-width: 44px; justify-content: flex-start; }
/* div.tbl-scroll[role="region"][tabindex="0"][aria-labelledby=<the caption's id>] > table.tbl: a table wider than its box
   scrolls inside this region, never the document. The region is a focus stop (the arrow keys scroll it) with the ink
   ring; its 6 px padding, taken back by a -6 px margin, keeps the rings of the controls inside from being clipped. Inside
   it the table is as wide as its content (cells on one line; a .long cell wraps at 20em), and the first column sticks to
   the left. The side where more is hidden is shaded, in CSS only: on the right by scrolling backgrounds (a cover that
   travels with the content over a shadow that stays at the edge, as even from top to bottom as the column's shade), on the left by the sticky column's ::after, shown
   while the region can scroll back (a scroll-state container query; a browser without one shows no left shade).
   --tbl-bg is what the region sits on (a panel by default; a page on the ground sets var(--ground)). */
.tbl-scroll {
  --tbl-bg: var(--panel);
  overflow-x: auto; padding: 6px; margin: -6px; border-radius: var(--r-m);
  container-type: scroll-state;
  position: relative; /* the containing block of the table's .vh text: without it that text escapes the clip and the document scrolls */
  background:
    linear-gradient(to left, var(--tbl-bg) 30%, transparent) right center / 40px 100% no-repeat local,
    linear-gradient(to left, rgba(14, 27, 44, .16), rgba(14, 27, 44, 0)) right center / 14px 100% no-repeat scroll,
    var(--tbl-bg);
}
.tbl-scroll > .tbl { width: max-content; min-width: 100%; }
.tbl-scroll > .tbl :is(th, td) { white-space: nowrap; }
/* the long first column is capped at 45vw, so on a phone the sticky column never covers more than about 45 % of the view */
.tbl-scroll > .tbl :is(th, td).long { white-space: normal; width: min(20em, 45vw); }
/* a control scrolled into view by Tab stops to the right of that sticky long column, not under it */
.tbl-scroll:has(> .tbl .long:first-child) { scroll-padding-left: min(20em, 45vw); }
.tbl-scroll > .tbl :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: var(--tbl-bg); }
.tbl-scroll > .tbl :is(th, td):first-child::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 100%; width: 12px; pointer-events: none; opacity: 0;
  background: linear-gradient(to right, rgba(14, 27, 44, .14), rgba(14, 27, 44, 0));
}
@container scroll-state(scrollable: left) {
  .tbl-scroll > .tbl :is(th, td):first-child::after { opacity: 1; }
}
/* the sortable header: th[aria-sort] (ascending or descending; absent while the column is not the sort) > button.sort
   with the column's word and span.sort-mark[aria-hidden="true"], a mask drawn from the th's state: up, down, or a quiet
   pair. The button is the header's own text (600, muted; ink while sorted or hovered), 44 px tall, on one line. */
th:has(> .sort) { white-space: nowrap; }
.sort {
  display: inline-flex; align-items: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 4px; margin-inline: -4px;
  border: 0; border-radius: 6px; background: none; font: inherit; color: inherit; white-space: nowrap; cursor: pointer;
}
.sort.is-hover, th[aria-sort] > .sort { color: var(--ink); }
@media (hover: hover) { .sort:hover { color: var(--ink); } }
.sort-mark {
  flex: none; width: 16px; height: 16px; background: currentColor; opacity: .55;
  -webkit-mask: var(--i-sort) center / 16px 16px no-repeat; mask: var(--i-sort) center / 16px 16px no-repeat;
}
th[aria-sort="ascending"] .sort-mark { --i-sort: var(--i-sort-up); opacity: 1; }
th[aria-sort="descending"] .sort-mark { --i-sort: var(--i-sort-down); opacity: 1; }

/* ---------------------------------------------------------------- the status pill (R166): a label, never a button. 16 px 600,
   the kind's ink-dark text and a dot of the same colour on the kind's quiet tint (each at least 4.5:1). Short words
   ("Active", "Past due"); a long one wraps inside the pill. Markup: span.pill.ok (or .bad, .warn, .info, .off). */
.pill {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 2px 11px 2px 9px; border-radius: 13px;
  font-family: var(--text); font-size: 16px; font-weight: 600; line-height: 22px; letter-spacing: 0; vertical-align: middle;
  overflow-wrap: break-word; cursor: default;
}
/* in a wide table a pill keeps to one line (a squeezed column would break it word by word); stacked, it wraps if it must */
.tbl td > .pill { white-space: nowrap; }
.pill::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
/* contrast on the kind's own tint: ok 4.6:1, bad 5.6:1, warn 5.4:1, info 7.6:1, off 5.1:1 */
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.bad { color: var(--bad); background: var(--bad-bg); }
.pill.warn { color: var(--warn); background: var(--warn-bg); }
.pill.info { color: var(--info); background: var(--info-bg); }
/* off (ended, not set up): muted on the quiet fill, with a hairline so it holds its shape on the ground */
.pill.off { color: var(--muted); background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); }
/* R278: the pill whose words may wrap (a long state with its date: "Cancelled, works until December 6, 2026").
   span.pill.pill-wrap > span.pill-text > (span.pill-part + " " + span.pill-part): the words are one box beside the
   dot (pill-text), each part stays whole, so the pill breaks only between them; its dot sits on the first line
   ((22 px line - 7 px dot) / 2 = 7.5 px). On a phone (under 600 px) the pill
   takes one part per line and is as wide as its longest part, never a tinted block across the card. One line where it
   fits on a wider window, the same 26 px as every pill. */
.pill.pill-wrap { align-items: flex-start; }
.pill.pill-wrap::before { margin-top: 7.5px; }
.pill-text { min-width: 0; }
.pill-part { white-space: nowrap; }
@media (max-width: 599.98px) { .pill.pill-wrap { width: min-content; } }

/* ---------------------------------------------------------------- the list of rows: one hairline between rows, the text on the
   left, one action on the right (.btn-2.sm or .link); under 600 px the action drops under the text. Markup:
   ul.rows > li.row > (div.row-text > (span.row-title, p.help …)) + (div.row-act > one action). */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--s5); row-gap: var(--s2); padding: 16px 0; }
.row:first-child { padding-top: 0; }
.row:last-child { padding-bottom: 0; }
.row + .row { border-top: 1px solid var(--line); }
.row-text { display: grid; gap: 2px; justify-items: start; min-width: 0; overflow-wrap: anywhere; }
.row-title { font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink); text-wrap: pretty; }
.row-text > .help, .row-text > p { line-height: 1.4; text-wrap: pretty; }
.row-text > .pill { margin-top: 4px; }
/* a block, not a flex box, so a .link inside stays the inline-flex action link (R21) */
.row-act { display: block; min-width: 0; text-align: right; }
@media (max-width: 599.98px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .row-act { text-align: left; }
}

/* ---------------------------------------------------------------- long text: textarea.input.area, the field's border and focus,
   at least 140 px tall, taller only by the user's hand (never wider) */
.input.area { display: block; height: auto; min-height: 140px; padding: 14px var(--s4); line-height: 1.5; resize: vertical; overflow-wrap: break-word; }

/* ---------------------------------------------------------------- the pager: Previous and Next (.btn-2.sm), the page line between
   them. Markup: nav.pager[aria-label] > button.btn-2.sm "Previous" + p.pager-line + button.btn-2.sm "Next". At the ends
   the button that cannot move is [disabled]; while a page loads the pressed one is busy. */
/* two equal side columns: the page line stays centred when a button's label or spinner changes its width. A side column
   is never narrower than its button (a button's min-width would otherwise let the column shrink under it and the
   button cover the line). Under 600 px the line takes its own row above the buttons, so a long one ("Page 12 of 140")
   is never squeezed between them. */
.pager { display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); align-items: center; column-gap: var(--s3); row-gap: var(--s2); }
.pager > :first-child { justify-self: start; }
.pager > :last-child { justify-self: end; }
.pager-line { margin: 0; text-align: center; font-size: 16px; line-height: 1.35; color: var(--body); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 599.98px) {
  .pager { grid-template-columns: repeat(2, minmax(max-content, 1fr)); }
  .pager > .pager-line { grid-column: 1 / -1; grid-row: 1; }
}

/* ---------------------------------------------------------------- the confirm dialog (dialog.js, R163, R167): an opaque white box
   on a dimmed page, at most 440 px, the title, the body, the error line and the two buttons, Cancel then Confirm. Under
   600 px the buttons take the full width, one under the other; a long label wraps, never clips. It eases in (200 ms)
   unless motion is reduced; it leaves at once. */
.dlg {
  width: 100%; max-width: 440px; padding: 28px; margin: 0;
  border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); color: var(--ink); box-shadow: var(--shadow-panel);
}
dialog.dlg { width: calc(100% - 32px); max-height: calc(100% - 32px); margin: auto; overflow: auto; overscroll-behavior: contain; }
/* the box takes focus from a press on its padding (tabindex -1, M4); it shows no ring of its own, its buttons do */
dialog.dlg:focus, dialog.dlg:focus-visible { outline: none; }
/* R214: while a dialog is open the page behind holds still (dialog.js sets these on html). A classic scroll bar keeps
   its gutter, so the page does not move sideways when the bar goes. */
html.dlg-lock { overflow: hidden; }
html.dlg-lock.dlg-gutter { scrollbar-gutter: stable; }
/* the dimmed page: the ink (#0e1b2c) at 45%, written out as --shadow-panel writes its ink (a ::backdrop cannot read
   the tokens in every browser, and color-mix() is reported as color(srgb …), which the test suites do not parse) */
dialog.dlg::backdrop { background: rgba(14, 27, 44, .45); }
.dlg-title {
  margin: 0; font-family: var(--display); font-size: 24px; font-weight: 750; line-height: 1.15; letter-spacing: -.03em; color: var(--ink);
  text-wrap: balance; overflow-wrap: anywhere;
}
.dlg-body { margin: 10px 0 0; font-size: 17px; line-height: 1.5; color: var(--body); text-wrap: pretty; overflow-wrap: anywhere; }
.dlg-err { margin-top: var(--s4); overflow-wrap: anywhere; }
.dlg-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s3); margin-top: var(--s5); }
.dlg-acts > .btn-2 { max-width: 100%; height: auto; min-height: 52px; padding-block: var(--s2); white-space: normal; line-height: 1.2; text-align: center; }
/* T-013: the dialog's fields (a reason, a number, a typed match), kit fields between the body and the error line; the
   number's polite line takes no room while it is empty and stays in the accessibility tree (the R279 host form) */
.dlg-field { margin-top: var(--s5); }
.dlg-field + .dlg-field { margin-top: var(--s4); }
.dlg-field > .input.dlg-num { max-width: 160px; }
.dlg-line:empty { position: absolute; }
@media (max-width: 599.98px) {
  .dlg { padding: var(--s5); }
  .dlg-title { font-size: 22px; }
  .dlg-acts { display: grid; grid-template-columns: minmax(0, 1fr); }
  .dlg-acts > .btn-2 { width: 100%; }
}
dialog.dlg[open] { animation: dlg-in .2s cubic-bezier(.2, .8, .2, 1); }
dialog.dlg[open]::backdrop { animation: dlg-fade .2s ease-out; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes dlg-fade { from { opacity: 0; } }
/* reduced motion: base.css stills every element; the backdrop is not an element, so it is named here */
html.rm dialog.dlg[open], html.rm dialog.dlg[open]::backdrop { animation: none; }
@media (prefers-reduced-motion: reduce) { dialog.dlg[open], dialog.dlg[open]::backdrop { animation: none; } }

/* ---------------------------------------------------------------- icons (masks; coloured by the element's background) */
:root {
  --i-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2-4.3-4.3 1.4-1.4 2.9 2.9 6.1-6.1 1.4 1.4z'/%3E%3C/svg%3E");
  --i-bad: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1 5h2v7h-2zm0 9h2v2h-2z'/%3E%3C/svg%3E");
  --i-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1 8h2v8h-2zm0-4h2v2h-2z'/%3E%3C/svg%3E");
  --i-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 1 21h22zm-1 7h2v6h-2zm0 8h2v2h-2z'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
  /* T-013: the sort marks: up (ascending), down (descending), and the quiet pair of a column that can be sorted */
  --i-sort-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6l6.5 9h-13z'/%3E%3C/svg%3E");
  --i-sort-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 18l-6.5-9h13z'/%3E%3C/svg%3E");
  --i-sort: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3.5l5 6.5H7zm0 17l-5-6.5h10z'/%3E%3C/svg%3E");
  --i-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 1H4a2 2 0 0 0-2 2v14h2V3h12zm3 4H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zm0 16H8V7h11z'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- R272 (C-I7): a Windows contrast theme (forced colours). The
   browser drops every box-shadow and paints every background in the theme's own colours, so the edges drawn with
   box-shadow, the switch drawn with backgrounds and the icons drawn as masks over a background would vanish. Here they
   are drawn in the theme's system colours instead: a real 1.5 px edge on every button, chip and copy chip (the fields
   keep their border); the switch as a ButtonText outline on Canvas, filled with Highlight when on; the icons in the
   text colour. forced-color-adjust: none keeps the browser from repainting exactly these parts. The frame's and the
   account sheet's own parts are in frame.css and account.css. */
@media (forced-colors: active) {
  .btn, .btn-2, .btn-ms, .btn-google, .chip, .kbd-copy { border: 1.5px solid ButtonText; }
  .fill-box.edged { box-shadow: none; outline: 1px solid CanvasText; outline-offset: -1px; }
  :is(.btn, .btn-2, .btn-ms, .btn-google, .chip):is([disabled], [aria-disabled="true"], .is-waiting) { border-color: GrayText; color: GrayText; }
  .chip[aria-pressed="true"], .chip[role="radio"][aria-checked="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .switch { forced-color-adjust: none; }
  .switch::before { background: Canvas; border: 2px solid ButtonText; }
  .switch::after { background: ButtonText; box-shadow: none; }
  .switch[aria-checked="true"]::before { background: Highlight; border-color: Highlight; }
  .switch[aria-checked="true"]::after { background: HighlightText; }
  .switch.is-hover::before { background: Canvas; border-color: Highlight; }
  .switch[aria-checked="true"].is-hover::before { background: Highlight; }
  @media (hover: hover) {
    .switch:not([disabled]):hover::before { background: Canvas; border-color: Highlight; }
    .switch[aria-checked="true"]:not([disabled]):hover::before { background: Highlight; }
  }
  .switch[disabled]::before { background: Canvas; border-color: GrayText; opacity: 1; }
  .switch[disabled]::after { background: GrayText; }
  .switch[disabled][aria-checked="true"]::before { background: GrayText; border-color: GrayText; opacity: 1; }
  .switch[disabled][aria-checked="true"]::after { background: Canvas; }
  .switch[disabled] + .switch-label { color: GrayText; }
  .switch:focus-visible::before, .switch.is-focus::before { outline-color: CanvasText; }
  .tickbox-mark { forced-color-adjust: none; background: Canvas; border: 1.5px solid ButtonText; }
  .tickbox-mark::after { background: HighlightText; }
  .tickbox-in:checked + .tickbox-mark { background: Highlight; border-color: Highlight; }
  .tickbox-in:disabled + .tickbox-mark { border-color: GrayText; }
  .tickbox-in:disabled:checked + .tickbox-mark { background: GrayText; }
  .tickbox-in:focus-visible + .tickbox-mark, .tickbox-mark.is-focus { outline-color: CanvasText; }
  /* the icons: in the colour of the text they stand beside */
  .notice::before, .err::before, .done-line::before, .pill::before, .dot-pulse::before, .kbd-copy-done::before { forced-color-adjust: none; background: CanvasText; }
  .kbd-copy::after, .kbd-copy.is-copied::after { forced-color-adjust: none; background: ButtonText; }
  .dot-pulse::after { forced-color-adjust: none; border-color: CanvasText; }
  .tick { forced-color-adjust: none; background: CanvasText; }
  .tick::after { background: Canvas; }
  .spinner { forced-color-adjust: none; border-color: GrayText; border-top-color: CanvasText; }
  /* a notice and a pill keep their shape: a hairline where the tint was (outline: nothing moves) */
  .notice { outline: 1px solid CanvasText; outline-offset: -1px; }
  .pill { outline: 1px solid CanvasText; outline-offset: -1px; }
  /* T-013: the scroll region keeps an edge, the sort button the edge of a button, its mark the text colour; the sticky
     column stays opaque over the cells that scroll under it */
  .tbl-scroll { border: 1px solid CanvasText; }
  .sort { border: 1.5px solid ButtonText; }
  .sort-mark { forced-color-adjust: none; background: ButtonText; }
  .tbl-scroll > .tbl :is(th, td):first-child { background: Canvas; }
  /* the choice list's arrow is an ink picture: the theme's own arrow instead */
  select.input { background-image: none; appearance: auto; }
}
