/* Component styles, one section per UI pattern, on the tokens of tokens.css
   only (docs/design-language.md): no raw colour, length, radius, font family
   or weight. Layer order is declared by reset.css. */
@layer components {
  /* Base: the type, link colour and focus mark every page inherits. */
  body {
    font-family: var(--font-sans);
    font-size: var(--text-body);
    line-height: var(--leading-body);
    color: var(--color-ink);
    background: var(--color-surface);
  }
  a {
    color: var(--color-accent);
    &:hover {
      color: var(--color-accent-hover);
    }
  }
  :focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-offset);
  }

  /* Layout shell: <body class="shell"> holds the sidebar, when signed in,
     and the content. The sidebar stays in view while the page scrolls;
     without it the content takes the full width. */
  .shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    &:has(> .sidebar) {
      grid-template-columns: var(--size-sidebar) minmax(0, 1fr);
    }
  }
  .sidebar {
    position: sticky;
    inset-block-start: 0;
    display: flex;
    flex-direction: column;
    block-size: var(--size-viewport);
    overflow-y: auto;
    /* Keeps a focus ring scrolled to an edge inside the sidebar. */
    scroll-padding-block: var(--space-2);
    background: var(--color-surface-alt);
    border-inline-end: var(--border-hairline);
  }
  /* The sidebar's foot: "A minha conta" over "Sair". */
  .sidebar-foot {
    display: grid;
    gap: var(--space-1);
    margin-block-start: auto;
    padding: var(--space-6);
    border-block-start: var(--border-hairline);
  }

  /* Building switcher: a <details> whose <summary> names the condominium in
     view; open, it lists every condominium as nav links. */
  .switcher {
    margin: var(--space-7) var(--space-6) var(--space-6);
    background: var(--color-surface);
    border: var(--border-hairline);
    border-radius: var(--radius-control);
    & > summary {
      display: flex;
      align-items: center;
      gap: var(--space-4);
      min-block-size: var(--size-switcher);
      padding: var(--space-4) var(--pad-control);
      border-radius: var(--radius-control);
      font-weight: var(--weight-semibold);
      cursor: pointer;
      & > span {
        flex: 1;
        min-inline-size: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      & > svg {
        flex: none;
        inline-size: var(--size-icon);
        block-size: var(--size-icon);
        fill: none;
        stroke: var(--color-ink-muted);
        stroke-width: var(--icon-stroke);
        stroke-linecap: round;
        stroke-linejoin: round;
      }
    }
    & > nav {
      display: grid;
      gap: var(--space-1);
      padding: var(--space-2);
      border-block-start: var(--border-hairline);
    }
  }

  /* Section nav: one column in the sidebar; more, side by side, once the
     sidebar stacks above the content. */
  .section-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(calc(var(--size-sidebar) / 2), 1fr));
    gap: var(--space-1);
    padding: var(--space-4) var(--space-6);
  }
  .nav-label {
    grid-column: 1 / -1;
    padding: 0 var(--pad-control) var(--space-3);
    font-size: var(--text-caption);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--color-ink-muted);
  }
  /* On <a> and on the logout <button>. A long label wraps, anywhere if it
     has no break, and the link grows rather than overflowing the sidebar.
     The current item has aria-current "page" (the section in view) or
     "true" (its condominium). */
  .nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    inline-size: 100%;
    min-block-size: var(--size-button);
    padding: var(--space-1) var(--pad-control);
    border: var(--border-hairline);
    border-color: transparent;
    border-radius: var(--radius-control);
    color: var(--color-ink-muted);
    text-decoration: none;
    overflow-wrap: anywhere;
    cursor: pointer;
    &:hover {
      background: var(--color-surface-alt-hover);
      color: var(--color-ink);
    }
    &:is([aria-current="page"], [aria-current="true"]) {
      border-color: var(--color-line);
      background: var(--color-surface);
      color: var(--color-accent);
      font-weight: var(--weight-medium);
    }
  }

  /* "Todos os condomínios": the Portfolio link at the foot of the sidebar,
     above the sidebar's foot, which then drops its own top margin. */
  .all-condos {
    margin-block-start: auto;
    padding: var(--space-6) var(--space-6) 0;
    border-block-start: var(--border-hairline);
    & + .sidebar-foot {
      margin-block-start: 0;
      border-block-start: 0;
      padding-block-start: var(--space-1);
    }
  }

  /* Top bar: the breadcrumbs, at the full height of the header. */
  .topbar {
    display: flex;
    align-items: center;
    min-block-size: var(--size-header);
    padding: var(--space-4) var(--pad-page);
    border-block-end: var(--border-hairline);
  }
  .crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4);
    overflow-wrap: anywhere;
    & a {
      color: var(--color-ink-muted);
      text-decoration: none;
      &:hover {
        text-decoration: underline;
      }
    }
    /* The root crumb, the product name, after the Condo icon (#239). */
    & .crumbs-root {
      display: inline-flex;
      align-items: center;
      gap: var(--space-4);
    }
    & [aria-hidden="true"] {
      color: var(--color-ink-subtle);
    }
    & [aria-current="page"] {
      font-weight: var(--weight-medium);
    }
  }

  .page {
    display: flex;
    flex-direction: column;
    gap: var(--space-9);
    padding: var(--pad-page) var(--pad-page) var(--space-9);
  }
  .page-title {
    font-size: var(--text-title);
    line-height: var(--leading-heading);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-title);
  }

  /* Narrow viewports (not in the artboards, which are desktop): the sidebar
     stacks above the content and scrolls with the page, and the page's
     side padding narrows. */
  @media (width < 720px) {
    .shell:has(> .sidebar) {
      grid-template-columns: minmax(0, 1fr);
    }
    .sidebar {
      position: static;
      block-size: auto;
      border-inline-end: 0;
      border-block-end: var(--border-hairline);
    }
    .topbar, .page {
      padding-inline: var(--space-7);
    }
  }

  /* Sign-in form (and the sign-up, link and waitlist forms): one column no
     wider than --size-form, each label over its field (a hint under it), the
     error line first, the submit button then the link to the other form
     last. A field's focus mark is the filter box's: an accent border and
     --focus-field. A checkbox (signin-check) sits before its text on one
     line, in regular weight, ticked in the accent. */
  .signin {
    display: grid;
    gap: var(--space-4);
    max-inline-size: var(--size-form);
    & > input + label, & > select + label, & > .signin-hint + label {
      margin-block-start: var(--space-4);
    }
    & > label {
      font-weight: var(--weight-medium);
    }
    & > .signin-check {
      display: flex;
      align-items: baseline;
      gap: var(--space-4);
      font-weight: var(--weight-regular);
      & > input {
        inline-size: var(--size-icon-small);
        block-size: var(--size-icon-small);
        accent-color: var(--color-accent);
      }
    }
    & > input, & > select {
      min-block-size: var(--size-control);
      padding: 0 var(--pad-control);
      border: var(--border-hairline);
      border-radius: var(--radius-control);
      background: var(--color-surface);
      &:focus-visible {
        outline: 0;
        border-color: var(--color-accent);
        box-shadow: var(--focus-field);
      }
    }
    & > button {
      margin-block-start: var(--space-7);
      min-block-size: var(--size-button);
      padding: 0 var(--pad-control);
      border-radius: var(--radius-control);
      background: var(--color-accent);
      color: var(--color-surface);
      font-weight: var(--weight-medium);
      text-align: center;
      cursor: pointer;
      &:hover {
        background: var(--color-accent-hover);
      }
    }
  }
  .signin-error {
    color: var(--color-danger);
  }
  .signin-notice {
    color: var(--color-success);
  }
  .signin-hint, .signin-link {
    color: var(--color-ink-muted);
  }

  /* Table (dataTable): a hairline above and under every row, cells padded
     horizontally only, so each row's min height is its height. Hovering a
     row tints it and underlines its link. A table wider than its column
     scrolls sideways in its own region, never the page; dates, ids and
     figures never break mid-value. A per-row debt cell (tableColumn's Debt)
     is at 500 in the row's ink, never the danger colour. A voided row
     (rowTable's Voided) is in muted ink, AA on the ground and on the hover
     tint. Totals rows (rowTable's Total) sit in the foot, over the last
     row's hairline, 500, their label in muted ink. */
  .table-scroll {
    overflow-x: auto;
  }
  .data-table {
    inline-size: 100%;
    border-collapse: collapse;
    border-block-start: var(--border-hairline);
    & th, & td {
      block-size: var(--size-row);
      padding: 0 var(--pad-cell);
      border-block-end: var(--border-hairline);
      text-align: start;
    }
    & th {
      font-size: var(--text-meta);
      font-weight: var(--weight-medium);
      color: var(--color-ink-muted);
      white-space: nowrap;
    }
    & .num {
      text-align: end;
      white-space: nowrap;
    }
    & .nowrap {
      white-space: nowrap;
    }
    & td.num {
      font-family: var(--font-mono);
      font-variant-numeric: var(--font-figures);
    }
    & a {
      font-weight: var(--weight-medium);
      text-decoration: none;
    }
    & td.debt {
      font-weight: var(--weight-medium);
    }
    & tr.voided {
      color: var(--color-ink-muted);
    }
    & tfoot td {
      block-size: var(--size-row-total);
      font-weight: var(--weight-medium);
      &:first-child {
        color: var(--color-ink-muted);
      }
    }
    & tbody tr:hover {
      background: var(--color-surface-hover);
      & a {
        text-decoration: underline;
      }
    }
  }
  .empty-value {
    color: var(--color-ink-subtle);
  }
  .table-empty, .facts-empty {
    color: var(--color-ink-muted);
  }

  /* Filter form (filterForm): its fields, then the Filtrar button, in one row
     that wraps; each field's label beside its control, muted. A select's
     focus mark is the filter box's: an accent border and --focus-field; a
     date or month field (filterDate, filterMonth) is drawn as a select;
     actionForm is the same form, submitting elsewhere, by GET or POST; its
     email and text fields (emailField, textField) are drawn as a select. */
  .filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4) var(--space-9);
    & > button {
      min-block-size: var(--size-button);
      padding: 0 var(--pad-control);
      border-radius: var(--radius-control);
      background: var(--color-accent);
      color: var(--color-surface);
      font-weight: var(--weight-medium);
      cursor: pointer;
      &:hover {
        background: var(--color-accent-hover);
      }
    }
  }
  .filter-field {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    color: var(--color-ink-muted);
    & > select, & > input[type="date"], & > input[type="month"], & > input[type="email"], & > input[type="text"] {
      min-block-size: var(--size-button);
      padding: 0 var(--pad-control);
      border: var(--border-hairline);
      border-radius: var(--radius-control);
      background: var(--color-surface);
      color: var(--color-ink);
      &:focus-visible {
        outline: 0;
        border-color: var(--color-accent);
        box-shadow: var(--focus-field);
      }
    }
    & > input[type="checkbox"] {
      inline-size: var(--size-icon);
      block-size: var(--size-icon);
      accent-color: var(--color-accent);
    }
  }

  /* Hinted field (hintedSelect): the field over its hint, meta-sized and
     muted. */
  .field-stack {
    display: grid;
    gap: var(--space-2);
  }
  .field-hint {
    font-size: var(--text-meta);
    color: var(--color-ink-muted);
  }

  /* Account switcher (accountSwitcher): the bank accounts' links in one row
     that wraps, each a .nav-link (its hover and current look), as wide as
     its label. */
  .account-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    & .nav-link {
      inline-size: auto;
    }
  }

  /* Fact list (factList): each term in a column of its own width, muted,
     beside its value; a long value wraps in its column. */
  .facts {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: var(--space-3) var(--space-9);
    & > div {
      display: contents;
    }
    & dt {
      color: var(--color-ink-muted);
    }
    & dd {
      overflow-wrap: anywhere;
    }
  }

  /* Page section (pageSection): a titled part of a page, its title over its
     content. */
  .page-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }
  .section-title {
    font-weight: var(--weight-semibold);
  }

  /* Code block (codeBlock): text to copy, in mono on the alt ground inside
     a hairline. One click selects all of it (user-select: all); a long line
     wraps anywhere, so it never widens the page. */
  .code-block {
    padding: var(--space-4) var(--pad-control);
    border: var(--border-hairline);
    border-radius: var(--radius-control);
    background: var(--color-surface-alt);
    font-family: var(--font-mono);
    font-size: var(--text-body);
    line-height: var(--leading-body);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    -webkit-user-select: all;
    user-select: all;
  }

  /* Email body (communicationBody): an email's plain text as sent, its
     lines kept, on the alt ground inside a hairline; a long line wraps
     anywhere, so it never widens the page. */
  .message-body {
    padding: var(--space-4) var(--pad-control);
    border: var(--border-hairline);
    border-radius: var(--radius-control);
    background: var(--color-surface-alt);
    font-family: var(--font-sans);
    font-size: var(--text-body);
    line-height: var(--leading-body);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  /* Step list (stepList): numbered steps, their numbers muted in tabular
     figures; a step's code block sits under its sentence. */
  .steps {
    display: grid;
    gap: var(--space-4);
    padding-inline-start: var(--space-9);
    & > li {
      padding-inline-start: var(--space-2);
      &::marker {
        color: var(--color-ink-muted);
        font-variant-numeric: var(--font-figures);
      }
      & > .code-block {
        margin-block-start: var(--space-3);
      }
    }
  }

  /* Action row (actionRow): buttons in one row that wraps. */
  .actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
  }

  /* Button (buttonLink, helpPopover): --size-button high, 500, outlined in
     --color-line-strong on the ground; the primary one is the sign-in
     button's accent fill. A link button is not underlined. */
  .button {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--size-button);
    padding: 0 var(--pad-control);
    border: var(--border-hairline);
    border-color: var(--color-line-strong);
    border-radius: var(--radius-control);
    background: var(--color-surface);
    color: var(--color-ink);
    font-weight: var(--weight-medium);
    text-decoration: none;
    cursor: pointer;
    &:hover {
      background: var(--color-surface-hover);
      color: var(--color-ink);
    }
  }
  .button-primary {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: var(--color-surface);
    &:hover {
      border-color: var(--color-accent-hover);
      background: var(--color-accent-hover);
      color: var(--color-surface);
    }
  }

  /* Danger button (confirmDialog): a .button in the danger colour, tinted
     on hover. */
  .button-danger {
    border-color: var(--color-danger);
    color: var(--color-danger);
    &:hover {
      background: var(--color-danger-soft);
      color: var(--color-danger);
    }
  }

  /* Confirm dialog (confirmDialog): a modal centred over the page (the
     dialog's own placement), no wider than --size-measure; its ground,
     border, radius and shadow as the help popover's; its buttons in a row
     last. */
  .confirm-dialog {
    max-inline-size: var(--size-measure);
    padding: var(--space-7);
    border: var(--border-hairline);
    border-radius: var(--radius-dialog);
    background: var(--color-surface);
    color: var(--color-ink);
    box-shadow: var(--shadow-overlay);
    &[open] {
      display: grid;
      gap: var(--space-6);
    }
    &::backdrop {
      background: var(--color-backdrop);
    }
  }

  /* Notice line (noticeLine): the outcome of the form that led to the page,
     in the sign-in notice's success colour; a failed one is .signin-error. */
  .notice {
    color: var(--color-success);
  }

  /* Signed-in line (signedInLine): one muted line that wraps, the email in
     the ink, Sair a link-coloured, underlined button. */
  .signed-in-as {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    color: var(--color-ink-muted);
    & strong {
      color: var(--color-ink);
      font-weight: var(--weight-semibold);
    }
    & button {
      color: var(--color-accent);
      text-decoration: underline;
      cursor: pointer;
    }
  }

  /* Help popover (helpPopover): a note centred over the page (the popover's
     own placement), no wider than --size-form, on the ground with the
     overlay shadow over the backdrop; its Fechar button last. */
  .help-popover {
    max-inline-size: var(--size-form);
    padding: var(--space-7);
    border: var(--border-hairline);
    border-radius: var(--radius-dialog);
    background: var(--color-surface);
    box-shadow: var(--shadow-overlay);
    &:popover-open {
      display: grid;
      gap: var(--space-6);
      justify-items: start;
    }
    &::backdrop {
      background: var(--color-backdrop);
    }
  }

  /* Headline count line (debtHeadlineLine): body text, muted; its figures in
     tabular mono, the debt figure in the danger colour at 500. */
  .headline {
    font-size: var(--text-body);
    color: var(--color-ink-muted);
  }
  .headline-figure {
    font-family: var(--font-mono);
    font-variant-numeric: var(--font-figures);
  }
  .headline-debt {
    color: var(--color-danger);
    font-weight: var(--weight-medium);
  }

  /* Live values (#13): the staleness line (liveNote), meta-sized and muted;
     the fragment a stream patches (liveFragment) lays out as if absent, so
     its children keep the page's gap. */
  .live-note {
    font-size: var(--text-meta);
    color: var(--color-ink-muted);
  }
  .live-fragment {
    display: contents;
  }

  /* Print (debtContent, #50): per-unit debt never prints. On screen its
     wrapper lays out as if absent and the notice is hidden; in print the
     wrapper is hidden and the notice shows in its place. */
  .debt-content {
    display: contents;
  }
  .print-notice {
    display: none;
    color: var(--color-ink-muted);
  }
  @media print {
    .debt-content {
      display: none;
    }
    .print-notice {
      display: block;
    }
  }

  /* Landing page (landingPage, #158): a header with the brand and Entrar,
     then the hero and the sections in one column no wider than
     --size-content, then the footer. Below 720px the sides narrow to
     --space-7, as the app's page does. */
  .landing-header, .landing-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4) var(--pad-page);
  }
  .landing-header {
    min-block-size: var(--size-header);
    border-block-end: var(--border-hairline);
  }
  /* The brand, the product name after the Condo icon (#241). */
  .landing-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-title);
  }
  .landing-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-10);
    max-inline-size: var(--size-content);
    margin-inline: auto;
    padding: var(--pad-page);
  }
  /* The landing page's main (#170) is full width: its hero and sections are
     bands, each padded so its content keeps the --size-content column, on
     alternating grounds. */
  .landing-main:has(> .landing-hero) {
    gap: 0;
    max-inline-size: none;
    padding: 0;
  }
  .landing-hero, .landing-section {
    padding-block: var(--pad-band);
    padding-inline: max(var(--pad-page), calc((100% - var(--size-content)) / 2));
  }
  .landing-hero, .landing-band-warm {
    background: var(--color-landing-warm-soft);
  }
  .landing-band-cool {
    background: var(--color-landing-cool-soft);
  }
  .landing-hero {
    display: flex;
    flex-direction: column;
    gap: var(--space-7);
    & h1 {
      font-size: var(--text-display);
      line-height: var(--leading-display);
      font-weight: var(--weight-semibold);
      letter-spacing: var(--tracking-title);
    }
    & p {
      max-inline-size: var(--size-measure);
      font-size: var(--text-lead);
      color: var(--color-ink-muted);
    }
  }
  .landing-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    & h2 {
      font-size: var(--text-title);
      line-height: var(--leading-heading);
      font-weight: var(--weight-semibold);
      letter-spacing: var(--tracking-title);
    }
    & > p {
      max-inline-size: var(--size-measure);
    }
  }
  /* A section title (landing and policy) opens with a short warm rule. */
  .landing-section > h2::before, .policy > h2::before {
    content: "";
    display: block;
    inline-size: var(--size-rule);
    block-size: var(--size-rule-weight);
    margin-block-end: var(--space-4);
    border-radius: var(--radius-mark);
    background: var(--color-landing-warm);
  }
  /* Product shot (productShot): a screenshot framed as a window, as wide as
     the column; its width and height attributes reserve its box. */
  .product-shot {
    display: block;
    margin-block-start: var(--space-6);
    & > img {
      display: block;
      inline-size: 100%;
      block-size: auto;
      border: var(--border-hairline);
      border-radius: var(--radius-dialog);
      background: var(--color-surface);
      box-shadow: var(--shadow-overlay);
    }
  }
  .landing-footer {
    border-block-start: var(--border-hairline);
    font-size: var(--text-meta);
    color: var(--color-ink-muted);
  }
  @media (width < 720px) {
    .landing-header, .landing-footer, .landing-main, .landing-hero, .landing-section {
      padding-inline: var(--space-7);
    }
    .landing-hero, .landing-section {
      padding-block: var(--space-10);
    }
  }

  /* Feature list (featureList): points in a grid of columns at least
     --size-feature wide, one column on a phone; each a semibold title over
     its muted text, under a hairline. */
  .features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(var(--size-feature), 100%), 1fr));
    gap: var(--space-9);
    & > li {
      display: flex;
      flex-direction: column;
      gap: var(--space-2);
      padding-block-start: var(--space-6);
      border-block-start: var(--border-hairline);
    }
    & h3 {
      font-weight: var(--weight-semibold);
    }
    & p {
      color: var(--color-ink-muted);
    }
  }

  /* Coming soon (comingSoon): a line no wider than --size-measure, its
     badge first, over a muted note. */
  .coming-soon {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-inline-size: var(--size-measure);
    & > p {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: var(--space-4);
    }
  }
  .coming-soon-note {
    color: var(--color-ink-muted);
  }

  /* Badge (badge, only on the landing page): a short label, meta-sized at
     500, in the landing's warm colour on its tint, --size-badge high. */
  .badge {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--size-badge);
    padding: 0 var(--pad-badge);
    border-radius: var(--radius-tag);
    background: var(--color-landing-warm-soft);
    color: var(--color-landing-warm);
    font-size: var(--text-meta);
    font-weight: var(--weight-medium);
    white-space: nowrap;
  }

  /* Draft banner (draftBanner): across the top of the page, at body size and
     600 in the warning ink on its soft ground, edged in the warning colour,
     so it never reads as small print. The edge is a gradient stop in the
     background, not a border-inline-start: a one-sided border on a rounded
     box is painted through a rounded clip whose corner anti-aliasing the
     GPU raster varies from paint to paint (#201), while a rounded
     background is drawn the same each time. */
  .draft-banner {
    padding: var(--space-6) var(--space-7);
    padding-inline-start: calc(var(--space-2) + var(--space-7));
    border-radius: var(--radius-control);
    background: linear-gradient(to right, var(--color-warning) var(--space-2), var(--color-warning-soft) 0);
    color: var(--color-warning);
    font-weight: var(--weight-semibold);
  }

  /* Warning list (warningList, #243): each warning a box on the warning's
     soft ground, edged in its colour as the draft banner is, its title 600
     in the warning ink over its lines in body ink. */
  .warnings {
    display: grid;
    gap: var(--space-4);
  }
  .warning {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-6) var(--space-7);
    padding-inline-start: calc(var(--space-2) + var(--space-7));
    border-radius: var(--radius-control);
    background: linear-gradient(to right, var(--color-warning) var(--space-2), var(--color-warning-soft) 0);
    & > a {
      justify-self: start;
    }
  }
  .warning-title {
    color: var(--color-warning);
    font-weight: var(--weight-semibold);
  }

  /* Switcher warning badge (navCount, #261): a condominium entry's warning
     count at the end of its row, meta-sized at 500 in the warning ink on its
     soft ground, --size-badge high. */
  .nav-count {
    display: inline-flex;
    align-items: center;
    flex: none;
    min-block-size: var(--size-badge);
    margin-inline-start: auto;
    padding: 0 var(--pad-badge);
    border-radius: var(--radius-tag);
    background: var(--color-warning-soft);
    color: var(--color-warning);
    font-size: var(--text-meta);
    font-weight: var(--weight-medium);
    white-space: nowrap;
  }

  /* Policy (privacyPage): a document's text in one column no wider than
     --size-measure: a display title, section titles with room above them,
     paragraphs, and bulleted lists. A table in it keeps the table's own
     width. */
  .policy {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    & > h1 {
      font-size: var(--text-display);
      line-height: var(--leading-display);
      font-weight: var(--weight-semibold);
      letter-spacing: var(--tracking-title);
    }
    & > h2 {
      margin-block-start: var(--space-9);
      font-size: var(--text-title);
      line-height: var(--leading-heading);
      font-weight: var(--weight-semibold);
      letter-spacing: var(--tracking-title);
    }
    & > p, & > ul {
      max-inline-size: var(--size-measure);
    }
    & > ul {
      padding-inline-start: var(--space-8);
      list-style: disc;
      & > li + li {
        margin-block-start: var(--space-2);
      }
    }
    & strong {
      font-weight: var(--weight-semibold);
    }
  }

  /* Error pages (403/404/500): the sentence under the status code. */
  .error-notice {
    color: var(--color-ink-muted);
  }
}
