/* Presentation only, for the pinned, unmodified Authelia frontend. */
@font-face {
  font-family: 'Rubik Variable'; font-style: normal; font-weight: 300 900;
  font-display: block;
  src: url('/identity-theme/fonts/rubik-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  --identity-paper: #f6f6f3; --identity-ink: #121413;
  --identity-soft: #5d625f; --identity-rule: #d6d7d2; --identity-code: #ecece8;
  --identity-font: 'Rubik Variable', 'Avenir Next', 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Source Han Sans SC', 'Microsoft YaHei', sans-serif;
}
:root[data-identity-theme='dark'] {
  --identity-paper: #121413; --identity-ink: #f6f6f3;
  --identity-soft: #a6aba8; --identity-rule: #3b3d39; --identity-code: #242723;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-identity-theme]) {
    --identity-paper: #121413; --identity-ink: #f6f6f3;
    --identity-soft: #a6aba8; --identity-rule: #3b3d39; --identity-code: #242723;
    color-scheme: dark;
  }
}
/* Higher specificity than upstream theme tokens; no authentication selectors or handlers. */
:root, :root[data-identity-theme], :root body[data-theme] {
  --background: var(--identity-paper); --foreground: var(--identity-ink);
  --card: var(--identity-paper); --card-foreground: var(--identity-ink);
  --popover: var(--identity-paper); --popover-foreground: var(--identity-ink);
  --primary: var(--identity-ink); --primary-foreground: var(--identity-paper);
  --secondary: var(--identity-code); --secondary-foreground: var(--identity-ink);
  --muted: var(--identity-code); --muted-foreground: var(--identity-soft);
  --accent: var(--identity-code); --accent-foreground: var(--identity-ink);
  --destructive: var(--identity-ink); --destructive-foreground: var(--identity-paper);
  --success: var(--identity-ink); --success-foreground: var(--identity-paper);
  --warning: var(--identity-ink); --warning-foreground: var(--identity-paper);
  --info: var(--identity-ink); --info-foreground: var(--identity-paper);
  --border: var(--identity-rule); --input: var(--identity-soft); --ring: var(--identity-ink);
  --custom-icon: var(--identity-ink); --custom-loading-bar: var(--identity-ink);
  --divider: var(--identity-rule); --radius: 0rem; --font-sans: var(--identity-font);
}
:root body[data-theme] { color-scheme: inherit; }
:root[data-identity-theme='light'] { color-scheme: light; }
:root body { font-family: var(--identity-font); font-size: 17px; line-height: 1.75; background: var(--identity-paper); color: var(--identity-ink); -webkit-font-smoothing: antialiased; }
:root :is(button, input, select, textarea, label) { font-family: var(--identity-font); }
:root :is(button:not([data-slot='checkbox']), [role='button'], input:not([type='checkbox']):not([type='radio'])) { min-height: 44px; border-radius: 0; }
:root :is(button, [role='button']) { box-shadow: none; }
:root a { text-underline-offset: .25em; }
:root :focus-visible { outline: 2px solid var(--identity-ink); outline-offset: 4px; }
:root ::selection { background: var(--identity-ink); color: var(--identity-paper); }
:root :is(input,textarea) { caret-color: var(--identity-ink); }
:root * { scrollbar-color: var(--identity-soft) var(--identity-paper); }
:root [role='alert'] { border: 1px dashed var(--identity-ink); border-radius: 0; }
.identity-appearance { position: fixed; top: 12px; left: 16px; z-index: 40; }
.identity-theme-trigger { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 8px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--identity-ink); cursor: pointer; }
.identity-theme-trigger:hover { border-bottom-color: var(--identity-ink); }
.identity-theme-dialog { position: fixed; inset: 0; margin: auto; height: fit-content; width: min(24rem, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid var(--identity-ink); border-radius: 0; background: var(--identity-paper); color: var(--identity-ink); overflow-y: auto; overscroll-behavior: contain; }
.identity-theme-dialog::backdrop { background: rgb(18 20 19 / .45); }
.identity-theme-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.identity-theme-dialog h2 { margin: 0; font-size: 28px; font-weight: 600; line-height: 1.2; }
.identity-theme-dialog button:not(.identity-theme-trigger) { padding: 8px 14px; min-height: 44px; border: 1px solid var(--identity-ink); background: var(--identity-paper); color: var(--identity-ink); cursor: pointer; }
.identity-theme-dialog button:hover { background: var(--identity-code); }
.identity-theme-dialog fieldset { margin: 0; padding: 0; border: 0; }
.identity-theme-dialog legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.identity-theme-dialog label { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; border-top: 1px solid var(--identity-rule); cursor: pointer; }
.identity-theme-dialog label:last-child { border-bottom: 1px solid var(--identity-rule); }
.identity-theme-dialog input { appearance: auto; width: 18px; height: 18px; margin: 8px; accent-color: var(--identity-ink); }
.identity-theme-hint { margin: 20px 0 0; font-size: 15px; color: var(--identity-soft); }
@media (prefers-reduced-motion: reduce) {
  :root :is(button,a,input) { transition: none; }
}

/* The native checkbox stays compact; its label and hit area remain easy to use. */
:root [data-slot='checkbox'] { min-width: 24px; min-height: 24px; border-radius: 0; }
:root label[for='remember-checkbox'] { display: inline-flex; align-items: center; min-height: 44px; }

/* Native notifications keep their icon and wording, with the site's ink palette. */
:root [data-slot='toast'] { --toast-ink: var(--identity-ink); --toast-surface: var(--identity-paper); --toast-edge: var(--identity-ink); box-shadow: none; border-style: dashed; }
:root a[href*='authelia.com'] { color: var(--identity-soft); }
