@font-face {
  font-family: 'Google Sans Flex'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/public/themes/fonts/google-sans-flex-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: 'Google Sans Flex'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/public/themes/fonts/google-sans-flex-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;
}

/*
  "Google" design of the V2 sign-in pages: Material 3 in a sober, corporate register, not a copy of the Google account
  sign-in (clients took it for Google's own page) and without playful shapes (judged childish). The form sits beside a
  stage: the background image full bleed under a scrim with the welcome in white, or, without image, a tonal panel
  with fine contour lines; tonal filled fields, a wide pill button, round badges, the language in a pill under the
  card. It only overrides portal-login.css (later layer); the client CSS (unlayered) still wins.
  Account brand colours (layer sf-page.brand): the primary drives the M3 primary and its containers; without them every
  value is the design's own.
*/
@layer sf-page.design {
  .lg-body--google { background: #f6f8fc; }
  .lg--google {
    --g-primary: var(--sf-brand-primary, #0b57d0); --g-on-primary: var(--sf-brand-on-primary, #fff);
    --g-primary-ui: var(--sf-brand-primary-ui, var(--g-primary));
    /* links of a neutral primary (no -ink printed): the design blue; invalid without account colours */
    --g-brand-info: color-mix(in srgb, var(--sf-brand-primary) 0%, #0b57d0);
    --g-primary-ink: var(--sf-brand-primary-ink, var(--g-brand-info, var(--g-primary)));
    --g-primary-container: var(--sf-brand-primary-soft-2, #d3e3fd); --g-on-primary-container: var(--sf-brand-on-primary-soft, #041e49);
    --g-secondary-container: var(--sf-brand-primary-soft, #c2e7ff); --g-on-secondary-container: var(--sf-brand-on-primary-soft, #001d35);
    /* tonal neutrals tinted by the primary */
    --g-surface: color-mix(in srgb, var(--g-primary) 4%, #f8f9fc); --g-surface-lowest: #fff;
    --g-surface-container: color-mix(in srgb, var(--g-primary) 6%, #f1f3f7); --g-surface-high: color-mix(in srgb, var(--g-primary) 10%, #eaedf2);
    --g-on-surface: #1b1c1f; --g-on-surface-variant: #44474e; --g-outline: #74777f; --g-outline-variant: #c4c6cf;
    --g-error: #b3261e; --g-error-container: #f9dedc; --g-on-error-container: #410e0b;
    --g-success: #146c2e; --g-success-container: #c4eed0; --g-on-success-container: #072711;
    --g-emph: cubic-bezier(.2, 0, 0, 1);
    --g-shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 3px 1px rgba(0, 0, 0, .15);
    --g-shadow-2: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 6px 2px rgba(0, 0, 0, .15);
    /* fine contour lines drawn from a corner (stage without image, top of the phone layout) */
    --g-lines: color-mix(in srgb, var(--g-on-primary-container) 10%, transparent);
    --lg-font: 'Google Sans Flex', 'Google Sans', Roboto, Arial, sans-serif;
    --lg-ink: var(--g-on-surface); --lg-ink-2: var(--g-on-surface-variant); --lg-muted: var(--g-on-surface-variant);
    --lg-line: var(--g-outline-variant); --lg-line-strong: var(--g-outline);
    --lg-surface: var(--g-surface-lowest); --lg-field: var(--g-surface-container); --lg-field-focus: var(--g-surface-lowest);
    --lg-hover: color-mix(in srgb, var(--g-on-surface) 8%, transparent);
    --lg-accent: var(--g-primary); --lg-on-accent: var(--g-on-primary); --lg-accent-ui: var(--g-primary-ui); --lg-link: var(--g-primary-ink);
    --lg-accent-hover: color-mix(in srgb, var(--g-on-primary) 10%, var(--g-primary));
    --lg-tonal: var(--g-secondary-container); --lg-on-tonal: var(--g-on-secondary-container);
    --lg-tonal-hover: color-mix(in srgb, var(--g-on-secondary-container) 8%, var(--g-secondary-container));
    --lg-signal: var(--g-primary-ui);
    --lg-danger: var(--g-error); --lg-danger-soft: var(--g-error-container); --lg-success: var(--g-success); --lg-success-soft: var(--g-success-container);
    --lg-warn: #7c5800; --lg-warn-soft: #ffdf99;
    --lg-radius: 28px; --lg-radius-field: 12px; --lg-radius-btn: 26px; --lg-field-h: 56px; --lg-btn-h: 52px;
    --lg-card-w: 480px; --lg-card-pad: 40px 36px 36px; --lg-card-shadow: none;
    color: var(--g-on-surface); letter-spacing: 0;
  }
  .lg--google :focus-visible { outline: 3px solid var(--g-primary-ui); outline-offset: 2px; }
  /* the title takes the focus when the view changes (for screen readers): no ring on a heading */
  .lg--google .lg-input:focus-visible, .lg--google .lg-title:focus-visible { outline: 0; }

  /* Background: the tonal surface, lit from the top; the image is shown in the stage when there is one */
  .lg--google .lg-scene, .lg--google .lg-scene-art {
    background: radial-gradient(1100px 520px at 50% -8%, color-mix(in srgb, var(--g-primary) 8%, transparent), transparent 72%), var(--g-surface);
  }
  .lg--google .lg-scene-art > i { display: none; }
  .lg--google .lg-scene-shade { background: none; }

  /* Card: one column under 900px, then the form beside the stage */
  .lg--google.is-centered .lg-layout { padding: 48px 24px 28px; }
  .lg--google.is-centered .lg-box {
    border-radius: 28px; background: var(--g-surface-lowest);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--g-outline-variant) 55%, transparent), 0 1px 2px rgba(16, 24, 40, .05),
      0 28px 60px -32px color-mix(in srgb, var(--g-primary) 40%, rgba(16, 24, 40, .45));
    animation: lg-g-in .5s var(--g-emph) backwards;
  }
  .lg--google .lg-head { margin-bottom: 26px; }
  .lg--google .lg-logo { min-height: 0; margin-bottom: 30px; }
  .lg--google .lg-logo img { max-width: 200px; max-height: 44px; }
  .lg--google .lg-logo-name { font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
  .lg--google .lg-title { font-size: 30px; font-weight: 500; line-height: 38px; letter-spacing: -.01em; }
  .lg--google .lg-title::after { content: none; }
  .lg--google .lg-subtitle { margin-top: 8px; color: var(--g-on-surface-variant); font-size: 15px; line-height: 22px; }
  .lg--google .lg-badge { width: 48px; height: 48px; margin-bottom: 20px; border-radius: 50%; background: var(--g-primary-container); color: var(--g-on-primary-container); }
  .lg--google .lg-badge .lg-ico { width: 23px; height: 23px; }
  .lg--google .lg-badge.is-success { background: var(--g-success-container); color: var(--g-on-success-container); }
  .lg--google .lg-badge.is-warn { background: var(--lg-warn-soft); color: var(--lg-warn); }
  /* the badge beside the title (forgotten password, reset, set, done, links): the views stay short */
  .lg--google .lg-head:has(> .lg-badge) { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 16px; }
  .lg--google .lg-head:has(> .lg-badge) > :not(.lg-badge):not(.lg-title) { grid-column: 1 / -1; }
  .lg--google .lg-head:has(> .lg-badge) > .lg-badge { margin: 0; }
  .lg--google .lg-head:has(> .lg-badge) > .lg-title { font-size: 26px; line-height: 34px; }

  /* Tonal filled fields, the label inside */
  .lg--google .lg-fields { gap: 14px; }
  .lg--google .lg-field { gap: 6px; }
  .lg--google .lg-label {
    position: absolute; top: calc(var(--lg-field-h) / 2); inset-inline-start: 16px; z-index: 1; max-width: calc(100% - 72px); overflow: hidden;
    color: var(--g-on-surface-variant); font-size: 16px; font-weight: 400; line-height: 20px; text-overflow: ellipsis; white-space: nowrap;
    transform: translateY(-50%); pointer-events: none; transition: top .2s var(--g-emph), font-size .2s var(--g-emph), line-height .2s var(--g-emph), color .2s;
  }
  .lg--google .lg-field.is-focus .lg-label, .lg--google .lg-field.is-filled .lg-label, .lg--google .lg-field:has(.lg-input:-webkit-autofill) .lg-label { top: calc(var(--lg-field-h) / 2 - 13px); font-size: 12px; line-height: 16px; }
  .lg--google .lg-field.is-focus .lg-label { color: var(--g-primary-ink); }
  .lg--google .lg-field.is-error .lg-label { color: var(--g-error); }
  .lg--google .lg-input {
    padding: calc(var(--lg-field-h) / 2 - 7px) 16px 4px; border: 0; border-radius: 12px; background: var(--g-surface-container); font-size: 16px;
    transition: background-color .2s, box-shadow .2s;
  }
  .lg--google .lg-input:hover { background: var(--g-surface-high); }
  .lg--google .lg-field.is-focus .lg-input { background: var(--g-surface-lowest); box-shadow: inset 0 0 0 2px var(--g-primary-ui); }
  .lg--google .lg-field.is-error .lg-input { background: color-mix(in srgb, var(--g-error) 6%, var(--g-surface-lowest)); box-shadow: inset 0 0 0 1px var(--g-error); }
  .lg--google .lg-field.is-error.is-focus .lg-input { box-shadow: inset 0 0 0 2px var(--g-error); }
  .lg--google .lg-field.is-password .lg-input { padding-inline-end: 56px; }
  .lg--google .lg-eye { inset-inline-end: 8px; width: 40px; height: 40px; border-radius: 50%; }
  .lg--google .lg-error { padding: 0 16px; font-size: 12.5px; }
  .lg--google .lg-error .lg-ico { width: 15px; height: 15px; margin-top: 1px; }
  .lg--google .lg-captcha-img { border: 0; border-radius: 12px; background: var(--g-surface-container); }

  /* Links as text buttons, the main button wide */
  .lg--google .lg-forgot { margin-top: 10px; }
  .lg--google .lg-link {
    min-height: 40px; margin-inline-end: -14px; padding: 0 14px; border-radius: 20px; color: var(--g-primary-ink); font-weight: 500; letter-spacing: .1px;
    transition: background-color .2s;
  }
  .lg--google .lg-link:hover { background: color-mix(in srgb, var(--g-primary) 8%, transparent); text-decoration: none; }
  .lg--google .lg-actions { margin-top: 26px; }
  .lg--google .lg-actions.is-split > .lg-link { margin-inline: -14px auto; }
  .lg--google .lg-btn { padding: 0 26px; font-size: 15px; font-weight: 500; letter-spacing: .1px; transition: background-color .2s, box-shadow .2s, opacity .15s; }
  .lg--google .lg-btn:active:not(:disabled) { transform: none; }
  .lg--google .lg-btn--primary { box-shadow: none; }
  .lg--google .lg-btn--primary:hover:not(:disabled) { box-shadow: var(--g-shadow-1); }
  .lg--google .lg-btn--tonal { background: var(--g-secondary-container); color: var(--g-on-secondary-container); }
  .lg--google .lg-btn-arrow { width: 19px; height: 19px; }
  .lg--google .lg-alert { border-radius: 14px; }
  .lg--google .lg-alert.is-error { color: var(--g-on-error-container); }
  .lg--google .lg-alert.is-success { color: var(--g-on-success-container); }
  .lg--google .lg-rules { padding: 12px 16px; border-radius: 14px; background: var(--g-surface-container); }
  .lg--google .lg-rules ul { gap: 4px 16px; }
  .lg--google .lg-account { padding: 4px 16px 4px 4px; border: 0; background: var(--g-surface-container); }
  .lg--google .lg-account-avatar { width: 32px; height: 32px; background: var(--g-primary); color: var(--g-on-primary); font-weight: 500; }
  .lg--google .lg-account-email { font-weight: 500; }

  /* Other ways to sign in: outlined pills */
  .lg--google .lg-divider { color: var(--g-on-surface-variant); font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; }
  .lg--google .lg-divider::before, .lg--google .lg-divider::after { background: var(--g-outline-variant); }
  .lg--google .lg-method {
    height: 48px; border: 1px solid var(--g-outline-variant); border-radius: 24px; background: var(--g-surface-lowest); color: var(--g-on-surface); font-size: 15px;
    font-weight: 500; letter-spacing: .1px; transition: background-color .2s, border-color .2s;
  }
  .lg--google .lg-method:hover { border-color: var(--g-outline); background: var(--g-surface-container); }
  .lg--google .lg-method-icon .lg-ico { color: var(--g-primary-ink); }

  /* Footer: the language and the copyright in one pill */
  .lg--google .lg-foot {
    justify-content: center; gap: 4px 12px; flex-wrap: wrap; width: fit-content; max-width: 100%; margin: 18px auto 0; padding: 4px 16px 4px 4px;
    border-radius: 24px; background: color-mix(in srgb, var(--g-surface-lowest) 84%, transparent); color: var(--g-on-surface-variant); font-size: 13px;
  }
  .lg--google.is-centered .lg-foot { color: var(--g-on-surface-variant); }
  .lg--google .lg-lang-btn, .lg--google.is-centered .lg-lang-btn {
    height: 36px; padding: 0 12px 0 10px; border-radius: 18px; background: var(--g-surface-container); -webkit-backdrop-filter: none; backdrop-filter: none;
    color: var(--g-on-surface); font-size: 13px; font-weight: 500;
  }
  .lg--google .lg-lang-btn:hover, .lg--google .lg-lang-btn[aria-expanded='true'], .lg--google.is-centered .lg-lang-btn:hover,
  .lg--google.is-centered .lg-lang-btn[aria-expanded='true'] { background: var(--g-surface-high); }
  .lg--google .lg-lang-menu { padding: 8px; border-radius: 20px; background: var(--g-surface-lowest); box-shadow: var(--g-shadow-2); }
  .lg--google .lg-lang-menu a { min-height: 44px; padding: 0 16px; border-radius: 12px; }
  .lg--google .lg-lang-menu a:hover { background: color-mix(in srgb, var(--g-on-surface) 6%, transparent); }
  .lg--google .lg-lang-menu a[aria-checked='true'] { background: var(--g-secondary-container); color: var(--g-on-secondary-container); font-weight: 500; }
  .lg--google .lg-lang-menu .lg-ico { color: inherit; }

  /* Stage: the image full bleed under a scrim, the welcome in white at the bottom; without image a tonal panel with
     fine contour lines from its corner */
  .lg--google .lg-stage {
    position: relative; overflow: hidden; isolation: isolate; container-type: size; border-radius: 22px; color: var(--g-on-primary-container);
    background: radial-gradient(90% 60% at 0% 0%, color-mix(in srgb, var(--g-surface-lowest) 45%, transparent), transparent 70%), var(--g-primary-container);
  }
  .lg--google .lg-stage::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: repeating-radial-gradient(circle at 100% 0%, transparent 0 31px, var(--g-lines) 31px 32px);
    -webkit-mask-image: radial-gradient(120% 110% at 100% 0%, #000 25%, transparent 78%); mask-image: radial-gradient(120% 110% at 100% 0%, #000 25%, transparent 78%);
  }
  .lg--google .lg-stage-media { position: absolute; inset: 0; z-index: 1; display: none; }
  .lg--google.has-image .lg-stage-media { display: block; }
  .lg--google .lg-stage-media::after {
    content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 14, 28, .1) 0%, rgba(10, 14, 28, 0) 32%, rgba(10, 14, 28, .7) 100%);
  }
  .lg--google .lg-stage-img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; animation: lg-g-fade .9s var(--g-emph) both; }
  .lg--google .lg-stage-a, .lg--google .lg-stage-b, .lg--google .lg-stage-c, .lg--google .lg-stage-clock { display: none; }
  .lg--google .lg-stage-widget { position: absolute; right: 0; bottom: 0; left: 0; z-index: 2; padding: 0 40px 40px; padding: 0 8cqmin 8cqmin; }
  .lg--google .lg-stage-copy::before { content: ''; display: block; width: 32px; height: 3px; margin-bottom: 18px; border-radius: 2px; background: currentColor; opacity: .75; }
  .lg--google .lg-stage-title {
    max-width: 17ch; font-size: 34px; font-size: clamp(26px, 6.2cqmin, 44px); font-weight: 500; line-height: 1.12; letter-spacing: -.02em;
    overflow-wrap: anywhere; text-wrap: balance;
  }
  /* the account name in the brand colour (a heading, not a link: no link blue for a neutral brand) */
  .lg--google .lg-stage-name { color: var(--sf-brand-primary-ink, var(--g-primary)); }
  .lg--google .lg-stage-text { max-width: 36ch; margin: 12px 0 0; opacity: .8; font-size: 16px; font-size: clamp(14px, 2.8cqmin, 17px); line-height: 1.5; }
  .lg--google.has-image .lg-stage { color: #fff; }
  .lg--google.has-image .lg-stage-name { color: inherit; }
  .lg--google.has-image .lg-stage-copy { text-shadow: 0 1px 14px rgba(0, 0, 0, .28); }
  .lg--google.has-image .lg-stage-text { opacity: .88; }

  @media (min-width: 900px) {
    .lg--google.is-centered .lg-panel { max-width: 1080px; }
    .lg--google.is-centered .lg-box {
      display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); grid-template-rows: 1fr auto auto auto 1fr;
      min-height: min(600px, calc(100vh - 140px)); padding: 8px;
    }
    .lg--google.is-centered .lg-card { display: contents; }
    .lg--google.is-centered .lg-head { grid-column: 1; grid-row: 2; padding: 36px 0 0; padding-inline: 48px 52px; }
    .lg--google.is-centered .lg-view { grid-column: 1; grid-row: 3; padding: 0 0 30px; padding-inline: 48px 52px; }
    .lg--google.is-centered .lg-options { grid-column: 1; grid-row: 4; margin: 0; padding: 0 0 36px; padding-inline: 48px 52px; }
    .lg--google.is-centered .lg-stage { display: block; grid-column: 2; grid-row: 1 / -1; min-height: 520px; }
    .lg--google.is-centered .lg-scene-img, .lg--google.is-centered .lg-scene-shade { display: none; }
  }

  /* Left / right: the form on white, the stage as a large window on the other side */
  .lg--google.is-split .lg-panel { box-shadow: none; }
  .lg--google.is-split .lg-panel-inner { max-width: 448px; padding: 52px 40px 28px; }
  .lg--google.is-split .lg-title { font-size: 34px; line-height: 42px; }
  .lg--google.is-split .lg-aside { padding: 16px; background: var(--g-surface-lowest); color: var(--g-on-primary-container); }
  .lg--google.is-split .lg-aside > .lg-clock, .lg--google.is-split .lg-aside-inner { display: none; }
  .lg--google.is-split .lg-stage { display: block; flex: 1 1 auto; border-radius: 28px; animation: lg-g-in .7s .1s var(--g-emph) backwards; }
  .lg--google.is-split .lg-stage-widget { padding: 0 56px 56px; padding: 0 7cqmin 7cqmin; }
  .lg--google.is-split .lg-foot { margin-top: 28px; }
  @media (min-width: 761px) {
    .lg--google.is-split .lg-scene-img, .lg--google.is-split .lg-scene-shade { display: none; }
  }
  /* short windows (laptops at 720 / 768px): a tighter card so that the form fits */
  @media (min-width: 900px) and (max-height: 820px) {
    .lg--google { --lg-field-h: 50px; --lg-btn-h: 48px; }
    .lg--google.is-centered .lg-layout { padding-top: 28px; padding-bottom: 20px; }
    .lg--google.is-centered .lg-box { min-height: 0; }
    .lg--google.is-centered .lg-head { padding-top: 26px; }
    .lg--google.is-centered .lg-options { padding-bottom: 26px; }
    .lg--google .lg-head { margin-bottom: 20px; }
    .lg--google .lg-logo { margin-bottom: 18px; }
    .lg--google .lg-logo img { max-height: 38px; }
    .lg--google .lg-title, .lg--google.is-split .lg-title { font-size: 28px; line-height: 36px; }
    .lg--google .lg-subtitle { margin-top: 6px; font-size: 14.5px; line-height: 21px; }
    .lg--google .lg-fields { gap: 12px; }
    .lg--google .lg-forgot { margin-top: 6px; }
    .lg--google .lg-actions { margin-top: 20px; }
    .lg--google .lg-options { margin-top: 20px; }
    .lg--google .lg-divider { margin-bottom: 14px; }
    .lg--google .lg-methods { gap: 8px; }
    .lg--google .lg-method { height: 44px; }
    .lg--google .lg-foot { margin-top: 14px; }
  }

  .lg--google .lg-dialog { border-radius: 28px; background: var(--g-surface-lowest); }

  @keyframes lg-g-in { from { opacity: 0; transform: translateY(8px); } }
  @keyframes lg-g-fade { from { opacity: 0; } }

  @media (max-width: 760px) {
    .lg--google .lg-title, .lg--google.is-split .lg-title { font-size: 26px; line-height: 34px; }
    .lg--google.is-centered .lg-layout { padding: 0; }
    .lg--google.is-centered .lg-box { border-radius: 0; box-shadow: none; }
    .lg--google .lg-foot, .lg--google.is-split .lg-foot { margin-top: auto; }
    .lg--google .lg-panel-inner > .lg-box { margin-bottom: 26px; }
    /* no image: the top of the phone layout shows the tonal panel and its lines */
    .lg--google .lg-scene-art {
      background: repeating-radial-gradient(circle at 100% 0%, transparent 0 31px, var(--g-lines) 31px 32px), var(--g-primary-container);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .lg--google .lg-stage-img, .lg--google .lg-stage, .lg--google.is-centered .lg-box { animation: none; }
    .lg--google .lg-input, .lg--google .lg-method { transition: none; }
  }
}
