/*
 * NEXEY One: the bright look for the sign-in, sign-up, consent and public pages (.nx-auth), the same look as the
 * account pages and developer.nexey.nl. Loaded after css/one-glass.css (includes/auth_style.php) and turns its dark
 * glass light: first the tokens, then the few places that had a dark colour written out.
 */
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(/security/assets/archivo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(/security/assets/archivo-latin.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;
}

html, body { background: #f3f4f8; }

.nx-auth {
  /* the glisse tokens, light */
  --lg-foreground: #0b0d14;
  --lg-muted: #6b7282;
  --lg-glass: #ffffff;
  --lg-glass-active: #ffffff;
  --lg-edge: rgb(11 13 20 / .16);
  --lg-selection: #0b0d14;
  --lg-surface: rgb(255 255 255 / .96);
  --lg-surface-edge: rgb(11 13 20 / .08);
  --lg-shadow: rgb(11 13 20 / .14);
  --lg-highlight: #f3f4f8;
  --lg-separator: rgb(11 13 20 / .1);
  --lg-track: #e2e4ea;
  --lg-rim-shine: .45;
  --nx-font: 'Archivo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nx-display: 'Archivo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
  color: var(--silver);
  background:
    radial-gradient(50vw 40vw at 8% -6%, rgb(var(--accent-rgb) / .16), transparent 70%),
    radial-gradient(46vw 40vw at 100% 0%, rgb(61 107 255 / .12), transparent 70%),
    radial-gradient(60vw 40vw at 50% 110%, rgb(30 168 102 / .07), transparent 70%),
    #f3f4f8;
}
.nx-auth .nx-ring { color: rgb(var(--accent-rgb) / .5); opacity: .35; }

/* the title: the bold display face of the account pages */
.nx-auth .nx-title { font-weight: 800; font-stretch: 112%; letter-spacing: -.035em; color: var(--ice); }

/* the card: white, soft shadow */
.nx-auth .nx-card {
  background-color: #fff;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: 0 1px 2px rgb(11 13 20 / .04), 0 24px 60px -24px rgb(11 13 20 / .22);
}
.nx-auth .nx-logos .nx-badge { border-color: #fff; }
.nx-auth .nx-logos img { box-shadow: 0 0 0 1px rgb(11 13 20 / .08); }

/* fields: white with a thin line, the accent ring on focus */
.nx-auth .nx-field input,
.nx-auth select,
.nx-auth textarea {
  color: var(--ice);
  background-color: #fff;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: inset 0 0 0 1px rgb(11 13 20 / .16);
}
.nx-auth .nx-field input:hover,
.nx-auth select:hover,
.nx-auth textarea:hover { background-color: #fff; box-shadow: inset 0 0 0 1px rgb(11 13 20 / .3); }
.nx-auth .nx-field input:focus,
.nx-auth select:focus,
.nx-auth textarea:focus { background-color: #fff; box-shadow: inset 0 0 0 1.5px var(--accent-ui), 0 0 0 4px color-mix(in srgb, var(--accent-ui) 16%, transparent); }
.nx-auth .nx-field input:-webkit-autofill { box-shadow: 0 0 0 100px #fff inset; -webkit-text-fill-color: var(--ice); }
.nx-auth .nx-field label { color: var(--muted); }
.nx-auth select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7282' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
}
.nx-auth select option { background: #fff; color: #0b0d14; }

/* the code boxes */
.nx-auth .nx-otp-box { color: var(--ice); background-color: #fff; box-shadow: inset 0 0 0 1px rgb(11 13 20 / .16); }
.nx-auth .nx-otp-box.is-active { box-shadow: inset 0 0 0 1.5px var(--accent-ui), 0 0 0 4px color-mix(in srgb, var(--accent-ui) 16%, transparent); }

/* buttons: filled accent, and a quiet ghost */
.nx-auth .nx-btn { box-shadow: 0 10px 26px -12px rgb(var(--accent-rgb) / .9); }
.nx-auth .nx-btn.nx-btn--ghost {
  color: var(--ice);
  background-color: rgb(11 13 20 / .05);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: none;
}
.nx-auth .nx-btn.nx-btn--ghost:hover,
.nx-auth .nx-btn.nx-btn--ghost[data-pressed] { background-color: rgb(11 13 20 / .09); box-shadow: none; }
/* the rim of css/glisse.css: these buttons are 48px high, so the round ends are 24px */
.nx-auth .nx-btn { --lg-rim-r: 24px; }

/* links */
.nx-auth .nx-link { color: var(--ice); text-decoration-color: var(--accent-ui); }
.nx-auth .nx-link:hover { text-decoration-color: var(--ice); }
.nx-auth :focus-visible { outline-color: var(--accent-ui); }

/* the service chooser on the login page */
.nx-auth .dropdown-selected { color: var(--ice); background-color: #fff; box-shadow: inset 0 0 0 1px rgb(11 13 20 / .16); }
.nx-auth .dropdown-selected:hover { background-color: #fff; box-shadow: inset 0 0 0 1px rgb(11 13 20 / .3); }
.nx-auth .dropdown-options { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 1px 2px rgb(11 13 20 / .06), 0 18px 40px -12px rgb(11 13 20 / .25); }
.nx-auth .dropdown-item { color: var(--ice); }
.nx-auth .dropdown-item.active { background: var(--ice); color: #fff; }

/* callouts: soft tints, as on the account pages */
.nx-auth .nx-callout { color: var(--ice); background: #e8eeff; box-shadow: none; }
.nx-auth .nx-callout.nx-callout--danger { color: #8c1a2e; background: #fde8ec; box-shadow: none; }
.nx-auth .nx-callout.nx-callout--danger svg { color: #c4213f; }
.nx-auth .nx-callout.nx-callout--ok { color: #0f5b37; background: #e3f6ec; box-shadow: none; }
.nx-auth .nx-callout.nx-callout--ok svg { color: #127a49; }
.nx-auth .nx-callout p, .nx-auth .nx-callout strong { color: inherit; }

/* the round icon above the title */
.nx-auth .nx-status { color: var(--accent-ui); background: color-mix(in srgb, var(--accent-ui) 12%, transparent); box-shadow: none; }
.nx-auth .nx-status.nx-status--danger { color: #c4213f; background: #fde8ec; }

/* the language picker: the tab bar of the account pages */
.nx-auth .nx-langs:has(> [aria-current]) { background: rgb(11 13 20 / .06); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.nx-auth .nx-langs:has(> [aria-current]) > a { color: var(--muted); }
.nx-auth .nx-langs:has(> [aria-current]) > a:hover { color: var(--ice); }
.nx-auth .nx-langs > [aria-current] { color: var(--ice); background: #fff; box-shadow: 0 1px 3px rgb(11 13 20 / .1); }
.nx-auth .nx-foot, .nx-auth .nx-langs a { color: var(--muted); }

/* sign-up progress, the "or" line, scopes on the consent screen, the toast */
.nx-auth .nx-progress span.is-on { background: var(--accent-ui); }
.nx-auth .nx-or::before, .nx-auth .nx-or::after { background: rgb(11 13 20 / .12); }
/* the data an app gets (linkapp.php, app.php): one row per item with its own icon in the app's colour */
.nx-auth .nx-scopes { gap: 0; padding: .35rem .5rem; background: #fff; border-color: rgb(11 13 20 / .09); }
.nx-auth .nx-scopes li { align-items: center; gap: .85rem; padding: .7rem .35rem; background: none; }
.nx-auth .nx-scopes li + li { border-top: 1px solid rgb(11 13 20 / .07); }
.nx-auth .nx-scopes .nx-scope-ic { display: grid; place-items: center; flex: none; width: 2.3rem; height: 2.3rem; border-radius: .8rem;
  color: var(--accent-ui); background: color-mix(in srgb, var(--accent-ui) 11%, transparent); }
.nx-auth .nx-scopes .nx-scope-ic svg { width: 1.2rem; height: 1.2rem; margin: 0; }
.nx-auth .nx-toast { color: var(--ice); background: #fff; box-shadow: 0 1px 2px rgb(11 13 20 / .06), 0 18px 40px -12px rgb(11 13 20 / .25); }

/* public pages: tables, folding answers and code */
.nx-auth .nx-prose { color: var(--silver); }
.nx-auth .nx-prose h2 { color: var(--ice); }
.nx-auth .nx-prose th, .nx-auth .nx-prose td { border-bottom-color: rgb(11 13 20 / .1); }
.nx-auth .nx-prose th { color: var(--ice); }
.nx-auth .nx-prose details { background: #f3f4f8; box-shadow: none; }
.nx-auth .nx-prose code { background: #f3f4f8; color: var(--ice); }

/* the account chooser (prompt=select_account) */
.nx-auth .nx-account { color: var(--ice); background: #f3f4f8; box-shadow: none; }
.nx-auth .nx-account:hover { background: #e9ebf2; }

/* the last account on this browser, on the sign-in form after signing out (login.php) */
.nx-auth .nx-account--last { cursor: default; margin-bottom: .6rem; }
.nx-auth .nx-account--last:hover { background: #f3f4f8; }
.nx-auth .nx-last-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; margin: 0 0 1rem; }
.nx-auth .nx-choice-new { margin: 1.1rem 0 .9rem; text-align: center; }

/* male / female at signup: two tiles with a radio button inside */
.nx-auth .nx-gender { display: block; margin: 0 0 1rem; border: 0; padding: 0; }
.nx-auth .nx-gender legend { margin-bottom: .5rem; padding: 0; color: var(--ice); font-weight: 600; font-size: .95rem; }
.nx-auth .nx-gender label { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; border-radius: .9rem; background: #f3f4f8;
  color: var(--ice); font-weight: 600; cursor: pointer; }
.nx-auth .nx-gender label:hover { background: #e9ebf2; }
.nx-auth .nx-gender input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--accent-ui); flex: none; }
.nx-auth .nx-gender label:has(input:checked) { box-shadow: inset 0 0 0 2px var(--accent-ui); }

/* checkboxes (sign-up terms, new terms, contact): the switch of the account pages and the developer portal (.sw in
   portal.css). Sized with min-width/min-height, so a "width: auto" elsewhere can no longer squeeze it to a dot. */
.nx-auth input[type="checkbox"] { width: 51px; min-width: 51px; height: 31px; min-height: 31px; flex: none; margin: 0; padding: 0; background-color: #e2e4ea; }
.nx-auth input[type="checkbox"]:checked { background-color: #34c759; }
.nx-auth .nx-check, .nx-auth .nx-accept { display: flex; align-items: center; gap: .8rem; margin: 0 0 1rem; color: var(--silver); font-size: .92rem; line-height: 1.45; cursor: pointer; }
.nx-auth .nx-check a, .nx-auth .nx-accept a { color: var(--ice); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent-ui); text-underline-offset: 3px; }

/* text on the app's colour: white or dark, whichever reads best (--on-accent, includes/auth_style.php) */
.nx-auth .nx-btn:not(.nx-btn--ghost), .nx-auth .nx-btn:not(.nx-btn--ghost):hover { color: var(--on-accent); }
.nx-auth .nx-btn:not(.nx-btn--ghost) .nx-spinner { border-color: color-mix(in srgb, var(--on-accent) 30%, transparent); border-top-color: var(--on-accent); }

/* the app's icon: its first letter on the app's colour, the uploaded icon on top (nx_auth_app_logo) */
.nx-auth .nx-logos .nx-app-logo {
  position: relative; display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden;
  border-radius: 50%; background: var(--app, var(--accent)); color: var(--app-on, #fff);
  font-weight: 800; font-size: 1.3rem; line-height: 1; box-shadow: 0 0 0 1px rgb(11 13 20 / .08);
}
.nx-auth .nx-logos .nx-app-logo img { position: absolute; inset: 0; border: 0; box-shadow: none; background: #fff; }

/* ------------------------------------------------------------ app badges (includes/app_badges.php): chips on the
 * consent screen, a list with explanations on the app's page (app.php). The style of the badges on
 * developer.nexey.nl/portal/join (portal.css .badge): a white pill with a hairline, dark text, only the icon in colour. */
.nx-auth .nx-chip--nexey       { --tone: #eb2880; }
.nx-auth .nx-chip--approved    { --tone: #1ea866; }
.nx-auth .nx-chip--founding    { --tone: #b7791f; }
.nx-auth .nx-chip--eu          { --tone: #3d6bff; }
.nx-auth .nx-chip--no_trackers { --tone: #0e9f8e; }
.nx-auth .nx-chip--open_source { --tone: #7b4ce0; }
.nx-auth .nx-chip--real_people { --tone: #c27a00; }
.nx-auth .nx-chip--age         { --tone: #d92d4a; }
.nx-auth .nx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: .9rem 0 1rem; padding: 0; list-style: none; }
.nx-auth .nx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: rgb(255 255 255 / .8); color: var(--ice); font-size: 13px; font-weight: 650; line-height: 1.3; cursor: help;
  box-shadow: inset 0 0 0 1px rgb(11 13 20 / .09); }
.nx-auth .nx-chip svg { width: 16px; height: 16px; flex: none; color: var(--tone); }
.nx-auth .nx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.nx-auth .nx-prose ul.nx-badge-list { display: grid; gap: .5rem; margin: 0 0 .7rem; padding: 0; list-style: none; }
.nx-auth .nx-prose .nx-badge-list li { margin: 0; }
.nx-auth .nx-badge-list li { display: flex; gap: .8rem; align-items: center; margin: 0; padding: .8rem .9rem; border-radius: .9rem;
  background: rgb(255 255 255 / .8); box-shadow: inset 0 0 0 1px rgb(11 13 20 / .09); }
.nx-auth .nx-badge-ic { display: grid; place-items: center; flex: none; width: 2.2rem; height: 2.2rem; border-radius: 999px; color: var(--tone);
  background: #fff; box-shadow: inset 0 0 0 1px rgb(11 13 20 / .09); }
.nx-auth .nx-badge-ic svg { width: 1.15rem; height: 1.15rem; }
.nx-auth .nx-badge-list strong { display: block; color: var(--ice); }
.nx-auth .nx-badge-list li > div > span { display: block; font-size: .88rem; color: var(--muted); }
.nx-auth .nx-scopes .nx-reason { display: block; margin-top: .3rem; font-style: italic; }
.nx-auth .nx-app-links .nx-link svg { width: 1rem; height: 1rem; vertical-align: -3px; }

/* ------------------------------------------------------------ dark mode: follows the browser or system setting.
 * The same layout, with the dark palette of the account pages (security/assets/portal.css). */
@media (prefers-color-scheme: dark) {
  html, body { background: #0b0d13; }
  .nx-auth {
    --obsidian: #0b0d13;
    --charcoal: #161a23;
    --field: #161a23;
    --line: rgb(255 255 255 / .12);
    --ice: #f2f4f8;
    --silver: #b9bfcc;
    --muted: #8b92a3;
    --danger: #ff5c78;
    --ok: #3ccf86;
    --accent-ui: var(--accent-ui-dark);   /* readable on the dark card for every app colour (includes/auth_style.php) */
    --lg-foreground: #f2f4f8;
    --lg-muted: #8b92a3;
    --lg-glass: #161a23;
    --lg-glass-active: #1f2430;
    --lg-edge: rgb(255 255 255 / .16);
    --lg-selection: #f2f4f8;
    --lg-surface: rgb(22 26 35 / .97);
    --lg-surface-edge: rgb(255 255 255 / .1);
    --lg-shadow: rgb(0 0 0 / .5);
    --lg-highlight: #1f2430;
    --lg-separator: rgb(255 255 255 / .1);
    --lg-track: #2a303d;
    color-scheme: dark;
    background:
      radial-gradient(50vw 40vw at 8% -6%, rgb(var(--accent-rgb) / .2), transparent 70%),
      radial-gradient(46vw 40vw at 100% 0%, rgb(61 107 255 / .14), transparent 70%),
      radial-gradient(60vw 40vw at 50% 110%, rgb(30 168 102 / .07), transparent 70%),
      #0b0d13;
  }
  .nx-auth .nx-card {
    background-color: #161a23;
    border-color: rgb(255 255 255 / .08);
    box-shadow: 0 1px 2px rgb(0 0 0 / .4), 0 24px 60px -24px rgb(0 0 0 / .8);
  }
  .nx-auth .nx-logos .nx-badge { border-color: #161a23; }
  .nx-auth .nx-logos img, .nx-auth .nx-logos .nx-app-logo { box-shadow: 0 0 0 1px rgb(255 255 255 / .12); }

  .nx-auth .nx-field input,
  .nx-auth select,
  .nx-auth textarea,
  .nx-auth .nx-otp-box,
  .nx-auth .dropdown-selected { background-color: #0f1219; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16); }
  .nx-auth .nx-field input:hover,
  .nx-auth select:hover,
  .nx-auth textarea:hover,
  .nx-auth .dropdown-selected:hover { background-color: #0f1219; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .3); }
  .nx-auth .nx-field input:focus,
  .nx-auth select:focus,
  .nx-auth textarea:focus,
  .nx-auth .nx-otp-box.is-active { background-color: #0f1219; box-shadow: inset 0 0 0 1.5px var(--accent-ui), 0 0 0 4px color-mix(in srgb, var(--accent-ui) 22%, transparent); }
  .nx-auth .nx-field input:-webkit-autofill { box-shadow: 0 0 0 100px #0f1219 inset; }
  .nx-auth .nx-field input[type='date'] { color-scheme: dark; }
  .nx-auth select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b92a3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); }
  .nx-auth select option { background: #161a23; color: #f2f4f8; }

  .nx-auth .nx-btn { box-shadow: 0 10px 26px -12px rgb(var(--accent-rgb) / .7); }
  .nx-auth .nx-btn.nx-btn--ghost { background-color: rgb(255 255 255 / .08); }
  .nx-auth .nx-btn.nx-btn--ghost:hover,
  .nx-auth .nx-btn.nx-btn--ghost[data-pressed] { background-color: rgb(255 255 255 / .13); }

  .nx-auth .dropdown-options { background: #1a1e28; box-shadow: 0 0 0 1px rgb(255 255 255 / .1), 0 18px 40px -12px rgb(0 0 0 / .7); }
  .nx-auth .dropdown-item.active { background: #f2f4f8; color: #0b0d13; }

  .nx-auth .nx-callout { color: #c9d4ff; background: rgb(132 162 255 / .13); }
  .nx-auth .nx-callout.nx-callout--danger { color: #ffb3c1; background: rgb(255 92 120 / .14); }
  .nx-auth .nx-callout.nx-callout--danger svg { color: #ff7a90; }
  .nx-auth .nx-callout.nx-callout--ok { color: #9be8c0; background: rgb(60 207 134 / .13); }
  .nx-auth .nx-callout.nx-callout--ok svg { color: #6fe0a6; }
  .nx-auth .nx-status { background: rgb(var(--accent-rgb) / .16); }
  .nx-auth .nx-status.nx-status--danger { color: #ff7a90; background: rgb(255 92 120 / .15); }

  .nx-auth .nx-langs:has(> [aria-current]) { background: rgb(255 255 255 / .07); }
  .nx-auth .nx-langs > [aria-current] { background: #1f2430; box-shadow: 0 1px 3px rgb(0 0 0 / .4); }

  .nx-auth .nx-or::before, .nx-auth .nx-or::after { background: rgb(255 255 255 / .12); }
  .nx-auth .nx-prose details, .nx-auth .nx-prose code, .nx-auth .nx-account { background: #1d222d; }
  .nx-auth .nx-scopes { background: #1a1e28; border-color: rgb(255 255 255 / .09); }
  .nx-auth .nx-scopes li { background: none; }
  .nx-auth .nx-scopes li + li { border-top-color: rgb(255 255 255 / .07); }
  .nx-auth .nx-scopes .nx-scope-ic { background: color-mix(in srgb, var(--accent-ui) 18%, transparent); }
  .nx-auth .nx-account { border-color: transparent; }
  .nx-auth .nx-account:hover { background: #252a36; }
  .nx-auth .nx-account--last:hover { background: #1d222d; }
  .nx-auth .nx-prose th, .nx-auth .nx-prose td { border-bottom-color: rgb(255 255 255 / .1); }
  .nx-auth .nx-toast { background: #1a1e28; box-shadow: 0 0 0 1px rgb(255 255 255 / .1), 0 18px 40px -12px rgb(0 0 0 / .7); }
  .nx-auth input[type="checkbox"] { background-color: #2a303d; }
  .nx-auth input[type="checkbox"]:checked { background-color: #34c759; }
  .nx-auth .nx-logos .nx-app-logo img { background: #161a23; }
  .nx-auth .nx-chip, .nx-auth .nx-badge-list li { background: rgb(22 26 35 / .75); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .09); }
  .nx-auth .nx-badge-ic { background: #161a23; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .09); }
  .nx-auth .nx-chip--nexey       { --tone: #ff6fae; }
  .nx-auth .nx-chip--approved    { --tone: #3ccf86; }
  .nx-auth .nx-chip--eu          { --tone: #84a2ff; }
  .nx-auth .nx-chip--no_trackers { --tone: #40c8b4; }
  .nx-auth .nx-chip--open_source { --tone: #a98bff; }
  .nx-auth .nx-chip--real_people { --tone: #f0b03a; }
  .nx-auth .nx-chip--age         { --tone: #ff5c78; }
  .nx-auth .nx-gender label { background: #1d222d; }
  .nx-auth .nx-gender label:hover { background: #252a36; }
  .nx-auth .nx-gender input:checked + span { color: #f2f4f8; }
}
