/* GENERATED by scripts/sync-parent-brand.mjs from the canonical Avantwerk brand kit. */

/* Authelia owns authentication behaviour; this output adapts the Legal Admin presentation only. */

/* ============================================================================
   AVANTWERK — BRAND TOKENS
   The single source of truth for Avantwerk's visual identity.
   Drop this into any Avantwerk surface (site, app, deck, email) and use the
   var(--aw-*) tokens — never hard-code a hex or a font name again.

   Rules and reasoning: BRAND.md. Precedence and file map: README.md.
   Amended 2026-09-02 — added the canonical client-credit measurements used by
   the shared footer generator and visual gate. BRAND.md owns meaning.
   ============================================================================ */

:root {
  /* ---- Colour: monochrome base + one blue accent. No other hues. ---- */
  --aw-bg:            #FFFFFF; /* page background */
  --aw-bg-soft:       #FAFAFA; /* alternating band / recessed surface */
  --aw-bg-card:       #F5F5F5; /* card / chip fill */
  --aw-fg:            #0A0A0A; /* primary text (near-black, not pure) */
  --aw-fg-muted:      #525252; /* body, secondary text, the mono sub-label */
  --aw-fg-quiet:      #A3A3A3; /* ORNAMENT ONLY — 2.3:1 on white, fails AA for text.
                                  Section numbers, meta, the closing mark. Nothing
                                  a reader must actually read. See BRAND.md §3. */
  --aw-fg-subtle:     #737373; /* quiet TEXT — 4.7:1 on white; AA for normal text */
  --aw-border:        #E5E5E5; /* hairlines, card edges, the lockup divider */
  --aw-border-strong: #171717; /* emphasis edges */
  --aw-accent:        #2563EB; /* THE Avantwerk blue — mark, links, CTA, active state */
  --aw-accent-hover:  #1D4ED8; /* accent, pressed/hover */
  --aw-accent-soft:   #9DBBFF; /* accent on a dark ground only (dark chrome, cookie bar links) */
  --aw-lockup-dark-divider: #3F3F46; /* full-lockup hairline on dark chrome only */
  --aw-lockup-dark-label:   #A1A1AA; /* full-lockup mono sub-label on dark chrome only */
  --aw-status-error:  #B42318; /* product/form semantics only; never marketing decoration */
  --aw-status-success:#18794E;
  --aw-status-warning:#8A4B08;
  --aw-status-info:   #1D4ED8;
  --aw-status-soft:   #F5F5F5;

  /* ---- The mark's diagonal, as a mask. ONE definition of the geometry; every
     surface that draws the glyph masks a coloured box with this, so the colour
     stays var(--aw-accent) and the shape can never drift file to file.
     19.05° off vertical, cut 21.87% of the painted-ink-height square — measured off the capital
     A of Inter Tight 700. See BRAND.md §2. ---- */
  --aw-mark-cut: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M0 0H100V100H0ZM21.805 100 L43.671 100 L78.195 0 L56.329 0Z'/%3E%3C/svg%3E");
  --aw-mark-size: 0.73828125em; /* exact Avantwerk ink height: 1512 / 2048 font units */
  --aw-mark-min:  12px;   /* 12.55px at the 17px nav reference; 12px is the hard floor */
  --aw-mark-asset-size: var(--aw-mark-size); /* cropped SVG viewport: box equals visible square */
  --aw-mark-asset-start: 0em; /* no hidden SVG padding to compensate */
  --aw-mark-asset-gap: 0.6em; /* visible square to wordmark */
  --aw-mark-optical-y: 0.0107421875em; /* down 22 / 2048: matches the wordmark's lower overshoot */
  --aw-mark-quiet-size: 16px; /* closing signature; still quiet, but legible as a mark at the footer edge */

  /* ---- Type: three self-hosted families, nothing else. ---- */
  --aw-font-display: "Inter Tight", -apple-system, system-ui, sans-serif;
  --aw-font-body:    "Inter", -apple-system, system-ui, sans-serif;
  --aw-font-mono:    "JetBrains Mono", "IBM Plex Mono", Menlo, monospace;

  /* ---- Type scale (fluid; clamp keeps it responsive — never add a
     mobile-only font-size on top of these). ---- */
  --aw-step-hero:    clamp(2.6rem, 6.2vw, 4.75rem);   /* home hero */
  --aw-step-h1:      clamp(2.25rem, 5vw, 3.75rem);    /* page hero */
  --aw-step-h2:      clamp(2rem, 4vw, 2.875rem);      /* section title */
  --aw-step-figure:  clamp(2.75rem, 5.5vw, 4.25rem);  /* big metric */
  --aw-step-lede:    1.1875rem;                       /* hero / section lede */
  --aw-step-body:    1.0625rem;                       /* section body */
  --aw-step-note:    0.75rem;                         /* mono note */
  --aw-step-caption: 0.6875rem;                       /* mono eyebrow / label / sub-label */

  /* ---- Client-site credit: the only Avantwerk identity element on a client-owned site. ---- */
  --aw-client-credit-gap:             10px;
  --aw-client-credit-label-size:      11px; /* fixed inside a client-owned root */
  --aw-client-credit-label-weight:    500;
  --aw-client-credit-label-tracking:  0.2em;
  --aw-client-credit-wordmark-height: 18px;

  --aw-lh-display:   0.98;
  --aw-lh-lede:      1.6;
  --aw-lh-note:      1.7;
  --aw-measure-lede: 640px;  /* lede max width */
  --aw-measure-note: 330px;  /* mono note max width — this is what enforces the 2-line cap */

  /* ---- Layout. Breakpoints are documented values, used in @media below;
     CSS custom properties cannot be used in media queries. ---- */
  --aw-measure:       1080px; /* page measure */
  --aw-gutter:        40px;   /* >= 1024 */
  --aw-gutter-md:     32px;   /* 768 - 1023 */
  --aw-gutter-sm:     20px;   /* < 768 */
  --aw-section-step:  56px;   /* section padding, >= 768 */
  --aw-section-step-sm: 40px; /* < 768 */
  --aw-touch-min:     44px;   /* any touch layout (<= 1023) */
  --aw-touch-row:     52px;   /* nav sheet row */
  --aw-touch-btn:     48px;   /* mobile button */

  /* ---- Motion + shape ---- */
  --aw-radius:      6px;   /* buttons, chips */
  --aw-radius-card: 10px;  /* cards, frames */
  --aw-ease:        120ms ease; /* colour changes */
  --aw-ease-move:   200ms ease; /* transforms — 120ms reads as a glitch on movement */
  --aw-field-height: 44px;
  --aw-field-border: var(--aw-border-strong);
  --aw-cookie-max: 1080px;
  --aw-screenshot-radius: var(--aw-radius-card);
  --aw-track-tight: -0.04em;  /* display tracking */
  --aw-track-body:  -0.005em; /* body tracking */
}

/* ---- Self-hosted fonts (GDPR: no third-party font request, visitor IP never
   leaves the server). The .woff2 files ship in each surface's /fonts/ dir —
   Inter 400/500/600/700, Inter Tight 500/600/700/800, JetBrains Mono 400/500,
   latin + latin-ext subsets. Point `src:` at wherever you vendor them.
   A Google Fonts <link> is a compliance defect, not a shortcut. ---- */

/* ---- Base defaults every Avantwerk surface inherits. ---- */
body {
  font-family: var(--aw-font-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--aw-fg);
  background: var(--aw-bg);
  font-feature-settings: "tnum" 1, "kern" 1, "ss01" 1;
  letter-spacing: var(--aw-track-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Focus: one rule for everything interactive. Never `outline: none`
   without a replacement — a keyboard user then cannot see where they are. ---- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--aw-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- The Avantwerk mark: wordmark in Inter Tight 700, preceded by the blue
   square cut by one diagonal. That glyph IS the logo — do not restyle it. ---- */
.aw-mark {
  font-family: var(--aw-font-display);
  font-weight: 700;
  font-size: 1.0625rem; /* nav reference: 17px type, 12.55px visible mark */
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--aw-fg);
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  white-space: nowrap;
}
.aw-mark::before {
  content: "";
  display: inline-block;
  flex: none;
  width: var(--aw-mark-size);
  height: var(--aw-mark-size);
  background: var(--aw-accent);
  -webkit-mask: var(--aw-mark-cut) center / contain no-repeat;
          mask: var(--aw-mark-cut) center / contain no-repeat;
  margin-right: var(--aw-mark-asset-gap);
  transform: translateY(var(--aw-mark-optical-y));
}

/* ---- Forms and status. Labels and messages are authored by the owning
   surface; these classes only own presentation and machine-readable states. ---- */
.aw-field { display: grid; gap: 7px; }
.aw-label { font-size: 0.875rem; font-weight: 600; color: var(--aw-fg); }
.aw-input {
  width: 100%; min-height: var(--aw-field-height); box-sizing: border-box;
  border: 1px solid var(--aw-field-border); border-radius: var(--aw-radius);
  background: var(--aw-bg); color: var(--aw-fg); font: inherit; padding: 10px 12px;
}
.aw-input::placeholder { color: var(--aw-fg-subtle); }
.aw-input:disabled { background: var(--aw-bg-card); color: var(--aw-fg-subtle); cursor: not-allowed; }
.aw-field__message { color: var(--aw-fg-subtle); font-size: 0.8125rem; line-height: 1.45; }
.aw-field[data-status="error"] .aw-input, .aw-input[aria-invalid="true"] { border-color: var(--aw-status-error); }
.aw-field[data-status="error"] .aw-field__message { color: var(--aw-status-error); }
.aw-status { border-left: 3px solid var(--aw-status-info); background: var(--aw-status-soft); padding: 12px 14px; }
.aw-status[data-status="success"] { border-color: var(--aw-status-success); }
.aw-status[data-status="warning"] { border-color: var(--aw-status-warning); }
.aw-status[data-status="error"] { border-color: var(--aw-status-error); }

/* Consent presentation for the existing market-site .cookie-* markup. Legal owns
   categories, defaults and wording; brand owns this single visual primitive. */
.cookie-banner { position: fixed; z-index: 1000; inset: auto 0 0; border-top: 1px solid var(--aw-border);
  background: var(--aw-bg); color: var(--aw-fg); padding: 20px var(--aw-gutter-sm); }
.cookie-banner[hidden] { display: none; }
.cookie-inner { max-width: var(--aw-cookie-max); margin: 0 auto; display: grid;
  grid-template-columns: minmax(0,1fr) auto; gap: 20px; align-items: center; }
.cookie-msg { margin: 0; color: var(--aw-fg); font: inherit; font-size: 0.8125rem; line-height: 1.55; }
.cookie-msg a { color: var(--aw-accent); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-btn { min-height: var(--aw-touch-btn); border: 1px solid var(--aw-border-strong); border-radius: var(--aw-radius);
  background: transparent; color: var(--aw-fg); font: inherit; font-size: 0.8125rem; font-weight: 600;
  padding: 12px 21px; cursor: pointer; transition: color var(--aw-ease), border-color var(--aw-ease); }
.cookie-btn:hover { color: var(--aw-accent); border-color: var(--aw-accent); }

/* Product evidence is framed, never beautified: no shadow, no device chrome. */
.aw-screenshot { display: block; width: 100%; box-sizing: border-box; margin: 0; border: 1px solid var(--aw-border);
  border-radius: var(--aw-screenshot-radius); background: var(--aw-bg); overflow: hidden; }
.aw-screenshot > :where(img, video) { display: block; width: 100%; height: auto; }
/* Mark-only SVG assets use a cropped 20x20 viewport: their element box is the
   visible square, exactly like the CSS primitive. Clear space belongs to the
   placement around a lockup, never as invisible pixels inside the mark asset. */
.aw-mark--asset::before { display: none; }
.aw-mark__glyph {
  display: block;
  flex: none;
  width: var(--aw-mark-asset-size);
  height: var(--aw-mark-asset-size);
  margin-left: var(--aw-mark-asset-start);
  margin-right: var(--aw-mark-asset-gap);
  transform: translateY(var(--aw-mark-optical-y));
}
/* On a dark ground the mark takes the soft blue — true accent measures 2.9:1
   on dark chrome, under the 3.0:1 floor for UI graphics. */
.aw-mark--on-dark { color: var(--aw-bg-soft); }
.aw-mark--on-dark::before { background: var(--aw-accent-soft); }
.aw-mark--on-dark .aw-mark__label {
  color: var(--aw-lockup-dark-label);
  border-color: var(--aw-lockup-dark-divider);
}

/* The product sub-label. Mono 500 at caption size in muted grey behind an
   --aw-border hairline. Never dimmed with opacity — that drags the divider
   grey with it and drops the label below the smallest documented step. */
.aw-mark__label {
  align-self: center;
  font-family: var(--aw-font-mono);
  font-style: normal;
  font-weight: 500;
  font-size: var(--aw-step-caption);
  line-height: 1;
  color: var(--aw-fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-left: 11px;
  margin-left: 11px;
  border-left: 1px solid var(--aw-border);
}
/* Below 420px the lockup drops the sub-label rather than shrinking — shrinking
   pushes the glyph under --aw-mark-min. */
@media (max-width: 419px) {
  .aw-mark__label { display: none; }
}

/* The quiet closing signature: glyph alone, bottom-right of a footer baseline
   row. One of exactly three sanctioned recolours (BRAND.md §2.2). */
.aw-mark-quiet {
  display: block;
  width: var(--aw-mark-quiet-size);
  height: var(--aw-mark-quiet-size);
  background: var(--aw-fg-quiet);
  -webkit-mask: var(--aw-mark-cut) center / contain no-repeat;
          mask: var(--aw-mark-cut) center / contain no-repeat;
}

/* ---- The one primary button. Blue fill, white text, 6px radius. ---- */
.aw-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px; /* for a spinner — NOT for an arrow. No glyphs in labels. */
  background: var(--aw-accent);
  color: var(--aw-bg);
  font-family: var(--aw-font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 13px 22px;
  border-radius: var(--aw-radius);
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--aw-ease);
  letter-spacing: var(--aw-track-body);
}
.aw-btn:hover { background: var(--aw-accent-hover); }

/* ---- The one secondary button. Outlined, pairs with the blue primary.
   Padding is 12px 21px, NOT 13px 22px: the 1px border has to come out of the
   padding or this button renders 2px taller than the primary beside it. ---- */
.aw-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--aw-bg);
  color: var(--aw-fg);
  font-family: var(--aw-font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 12px 21px;
  border-radius: var(--aw-radius);
  border: 1px solid var(--aw-border);
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--aw-ease), background var(--aw-ease);
  letter-spacing: var(--aw-track-body);
}
.aw-btn-secondary:hover { border-color: var(--aw-fg); background: var(--aw-bg-soft); }

/* On a touch layout every target clears 44px; mobile buttons go full-width. */
@media (max-width: 1023px) {
  .aw-btn, .aw-btn-secondary { min-height: var(--aw-touch-min); }
}
@media (max-width: 767px) {
  .aw-btn, .aw-btn-secondary {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: var(--aw-touch-btn);
  }
}
@media (max-width: 767px) {
  .cookie-inner { grid-template-columns: 1fr; }
  .cookie-actions > * { flex: 1 1 100%; }
}

/* ---- The eyebrow: mono, uppercase, tracked-out, tiny blue square before it.
   The 6px square stays SOLID and uncut, deliberately. It is a bullet, not the
   logo — at 6px the diagonal would be 1.2px of counter, which reads as a dirty
   dot rather than a mark. The glyph is cut; the bullet is not. ---- */
.aw-eyebrow {
  font-family: var(--aw-font-mono);
  font-size: var(--aw-step-caption);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--aw-fg-muted);
  display: flex;
  align-items: flex-start; /* wrapped labels still align the bullet to the first line */
  line-height: 1.5;
  gap: 10px;
}
.aw-eyebrow::before {
  content: "";
  display: block;
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--aw-accent);
  margin-top: calc((1lh - 6px) / 2); /* exact centre of the first caption line */
}

/* ---- Mono / note: the annotation voice. Sentence case, capped at two lines by
   its measure. Running body copy is never set in mono. ---- */
.aw-note {
  font-family: var(--aw-font-mono);
  font-size: var(--aw-step-note);
  line-height: var(--aw-lh-note);
  color: var(--aw-fg-muted);
  max-width: var(--aw-measure-note);
}
.aw-note--bulleted {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: none;
}
.aw-note--bulleted::before {
  content: "";
  display: block;
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--aw-accent);
  margin-top: 8px;
}

/* ---- Lede + closing emphasis. The weight jump on the last sentence is the
   rhetorical move; 500 is too quiet to make it. ---- */
.aw-lede {
  font-size: var(--aw-step-lede);
  line-height: var(--aw-lh-lede);
  color: var(--aw-fg-muted);
  max-width: var(--aw-measure-lede);
}
.aw-lede strong { font-weight: 600; color: var(--aw-fg); }
@media (max-width: 767px) { .aw-lede { font-size: 1rem; } }

/* ---- Card ---- */
.aw-card {
  border: 1px solid var(--aw-border);
  border-radius: var(--aw-radius-card);
  background: var(--aw-bg);
  padding: 30px 32px;
}

/* ---- Emphasis block. Replaces the rounded panel with a coloured left edge —
   that shape is not in this system. Accent lands on the date alone. ---- */
.aw-emphasis {
  border-top: 1px solid var(--aw-border-strong);
  padding-top: 20px;
}
.aw-emphasis__line {
  font-family: var(--aw-font-display);
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

/* ---- Page shell ---- */
.aw-wrap {
  max-width: var(--aw-measure);
  margin: 0 auto;
  padding: 0 var(--aw-gutter);
}
.aw-section { padding: var(--aw-section-step) 0; border-bottom: 1px solid var(--aw-border); }
@media (max-width: 1023px) { .aw-wrap { padding: 0 var(--aw-gutter-md); } }
@media (max-width: 767px) {
  .aw-wrap { padding: 0 var(--aw-gutter-sm); }
  .aw-section { padding: var(--aw-section-step-sm) 0; }
}

/* ---- Respect the reader's motion setting. ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Presentation-only adapter for Authelia's stable public element IDs.
   Colour, type, focus and shape come from the canonical --aw-* tokens that
   the parent-brand compiler prepends to this file. */
html,
body,
#root {
  color-scheme: light;
  color: var(--aw-fg) !important;
  background: var(--aw-bg) !important;
}

body,
button,
input {
  font-family: var(--aw-font-body) !important;
}

img[src*="logo.png"] {
  width: 240px !important;
  height: auto !important;
  max-width: 78vw !important;
}

#first-factor-stage h5 {
  color: var(--aw-fg) !important;
  font-family: var(--aw-font-display) !important;
  font-weight: 600 !important;
  letter-spacing: var(--aw-track-tight) !important;
}

#username-textfield,
#password-textfield {
  color: var(--aw-fg) !important;
}

#username-textfield + fieldset,
#password-textfield + fieldset {
  border-color: var(--aw-border-strong) !important;
  border-radius: var(--aw-radius) !important;
}

#sign-in-button {
  min-height: var(--aw-field-height) !important;
  border-radius: var(--aw-radius) !important;
  background: var(--aw-accent) !important;
  box-shadow: none !important;
  color: var(--aw-bg) !important;
  font-weight: 600 !important;
  letter-spacing: var(--aw-track-body) !important;
  text-transform: none !important;
}

#sign-in-button:hover {
  background: var(--aw-accent-hover) !important;
}

#reset-password-button,
#language-button {
  color: var(--aw-accent) !important;
  text-transform: none !important;
}

footer a[href*="authelia.com"] {
  color: var(--aw-fg-subtle) !important;
}

/* The privileged realm must identify itself before a credential is entered. */
#first-factor-stage h5::before {
  content: "Legal Admin";
  display: block;
  margin-bottom: 0.5rem;
  color: var(--aw-fg-muted);
  font-family: var(--aw-font-mono);
  font-size: var(--aw-step-caption);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
