/* The shared form fields and buttons: every page uses these classes, none keeps its own copy (the sign-in page's look).
   Checks and their messages come from forms.js. Colours come from the page's tokens when it has them.

   <label class="field">Your email<input class="input" type="email"></label>     a label with its field under it
   .input            text, email, textarea, select          .input.big   onboarding's large setup field   .input.mono  ids, keys
   .btn              the main green button                  .btn.secondary  outlined                     .btn.sm  in cards, tables
   .btn.danger       delete, leave (.solid: the final one)  .btn.link     a button that reads as a link
   ${Loader.html()} inside a .btn (loader.js)             while its request is in flight */

[hidden] { display: none !important; }
.loader { flex: none; height: 16px; width: 23px; overflow: visible; }   /* Casma's processing loop, wherever something is worked on (loader.js) */
.loader.lg { height: 28px; width: 40px; }
.loader path { fill: none; stroke: var(--accent, #0f766e); stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
.loader .bar { transform-box: fill-box; animation: loader-flow 1.5s ease-in-out infinite both; }
@keyframes loader-flow { 0% { transform: translateX(-10px); opacity: 0; } 30% { opacity: 1; } 62% { transform: none; opacity: 1; } 100% { transform: translateX(5px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .loader .bar { animation: none; } }
.btn .loader path { stroke: #fff; }
.btn:disabled .loader path, .btn.secondary .loader path { stroke: var(--muted, #57534e); }
.brand-mark { display: block; height: 1.1em; width: auto; }   /* Casma's symbol in every header (brand/casma-symbol-teal.svg, as is) */
.brand-name { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-weight: 700; color: var(--accent, #0f766e); }
a:has(> .brand-mark) { display: inline-flex; align-items: center; gap: 0.35em; text-decoration: none; }   /* hidden means hidden, whatever display a rule gives the element */

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2, #44403c); }

.input { box-sizing: border-box; width: 100%; min-width: 0; font: inherit; font-size: 16px; font-weight: 400; padding: 13px 14px;
  border: 1px solid var(--line-strong, #d6d3cd); border-radius: 8px; background: var(--card, #ffffff); color: var(--ink, #1c1917); }
textarea.input { min-height: 160px; resize: vertical; }
.input:focus-visible { outline: 2px solid var(--accent, #0f766e); outline-offset: 1px; border-color: var(--accent, #0f766e); }
.input:disabled { background: var(--soft, #f5f5f4); color: var(--muted, #57534e); }
.input.big { font-size: 22px; padding: 16px 18px; border: 2px solid var(--accent, #0f766e); }
.input.mono { font-family: var(--mono, 'IBM Plex Mono', ui-monospace, monospace); }

.btn { box-sizing: border-box; font: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 8px; border: 1px solid transparent; background: var(--accent, #0f766e); color: #fff;
  font-size: 16px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.btn:hover, a.btn:hover { background: var(--accent-ink, #0f5f58); color: #fff; }
.btn:focus-visible { outline: 2px solid var(--accent, #0f766e); outline-offset: 2px; }
.btn.secondary { background: var(--card, #ffffff); border-color: var(--ink, #1c1917); color: var(--ink, #1c1917); font-weight: 500; }
.btn.secondary:hover { background: var(--soft, #f5f5f4); color: var(--ink, #1c1917); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; gap: 8px; }
.btn.danger { background: transparent; border-color: var(--err, #9f1239); color: var(--err, #9f1239); }
.btn.danger:hover { background: #fde8ec; color: var(--err, #9f1239); }
.btn.danger.solid { background: var(--err, #9f1239); color: #fff; }
.btn.danger.solid:hover { background: #7f1d1d; color: #fff; }
.btn:disabled { cursor: not-allowed; background: var(--line-strong, #d6d3cd); border-color: transparent; color: var(--muted, #57534e); }
.btn.secondary:disabled, .btn.danger:disabled { background: var(--soft, #f5f5f4); border-color: var(--line-strong, #d6d3cd); }
.btn.link { display: inline; min-height: 0; padding: 0; border: 0; background: none; color: var(--accent-ink, #0f5f58); font-size: inherit;
  font-weight: 600; text-decoration: underline; white-space: normal; }
.btn.link:hover { background: none; color: var(--accent, #0f766e); }
.btn.link:disabled { background: none; opacity: .5; }

