/* The flash message: one look for every error, warning and success message
   on this site.

   Asked for 2026-12-05: "The error messages are small and hard to see. Put
   them in red and in a bootstrap style flash message. Do this for any error
   messages sitewide. Also add warning if orange and success in green.",
   then "warnings in the warning color", then "Also I want the messages at
   the top of the section that throws them."

   THE SHAPE is Bootstrap's alert: a padded box, rounded, with a line all the
   way round it and a thicker bar down its left side. The writing is the
   page's ordinary font at 0.95rem, not the 0.78rem monospace line these
   messages used before, which is exactly what made them hard to read.

   THE COLOURS are this project's own dark prime colours, settled on
   2026-11-27 and already enforced by a test in site_monitor. The red is the
   exact red of the delete button on the Gold Mine page.

     error    #e0553f
     warning  #a16207
     success  #166534

   THE FACE IS DELIBERATELY NOT FILLED. A real Bootstrap alert has a pale
   washed fill behind it, and those pale washes are banned by name in
   CLAUDE.md. So the colour is the writing and the border instead, which is
   the same outline rule the Gold Mine delete button and the Site Monitor
   badges already follow.

   WHY THE OLD CLASS NAMES ARE LISTED HERE TOO. This site deliberately keeps
   each page self-contained, so its messages grew three different class names
   over time: `.error-text` on most pages, `.msg error` / `.msg ok` on the
   Easy Life Sites pages, and `.report-notice.error` on a couple more. Giving all of
   them the same look here means one file decides how a message looks,
   instead of sixty pages each deciding for themselves. A new page should use
   `.flash` with `.flash-error`, `.flash-warning` or `.flash-success`.

   NOTHING HERE SETS `display`. Several pages hide their own message until
   there is something to say, by setting `display: none` on it and switching
   it back on themselves. Setting `display` here would override that and show
   an empty box on every page load. */

.flash,
.error-text,
.msg.error,
.msg.ok,
.msg.warn,
.report-notice.error {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 5px;
  background: #ffffff;
  border: 1px solid currentColor;
  border-left-width: 4px;
  font-family: var(--font-stack, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
}

.flash-error,
.error-text,
.msg.error,
.report-notice.error { color: #e0553f; }

.flash-warning,
.msg.warn { color: #a16207; }

.flash-success,
.msg.ok { color: #166534; }

/* A message that sits at the bottom of its card in the markup is pulled to
   the top of it, because that is where the owner asked for it: "I want the
   messages at the top of the section that throws them." A card that opts in
   by becoming a flex column gets this for free, in the order the reader
   wants, without its markup being rearranged.

   `order: -1` alone would also jump the card's own heading, so the heading
   is pinned ahead of it. */
.flash-at-top { display: flex; flex-direction: column; }
.flash-at-top > h2,
.flash-at-top > h3,
.flash-at-top > h4 { order: -2; }
.flash-at-top > .flash,
.flash-at-top > .error-text,
.flash-at-top > .msg { order: -1; }
