/* Contexall hosted sign-in pages. One standard look; only the logo, company name and background image vary. */

@font-face {
  font-family: "Anek Latin";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("anek-latin-latin-400.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;
}
@font-face {
  font-family: "Anek Latin";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("anek-latin-latin-ext-400.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Anek Latin";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("anek-latin-latin-600.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;
}
@font-face {
  font-family: "Anek Latin";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("anek-latin-latin-ext-600.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Anek Latin";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("anek-latin-latin-700.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;
}
@font-face {
  font-family: "Anek Latin";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("anek-latin-latin-ext-700.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("jetbrains-mono-latin-500.woff2") format("woff2");
}

:root {
  --ink: #16181d;
  --muted: #5b6270;
  --line: #e3e5ea;
  --field: #c9cdd5;
  --page: #f4f5f7;
  --card: #ffffff;
  --cta: #ff6600;
  --cta-hover: #e85d00;
  --cta-ring: rgba(255, 102, 0, 0.28);
  --cta-text: #c2410c;
  --danger: #b42318;
  --ok-bg: #e6f4ec;
  --ok: #0f6b3a;
  --warn-bg: #fef3e6;
  --warn: #9a4a00;
  --navy: #0b1e2d;
  --font: "Anek Latin", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
}

h1,
h2,
p,
ul,
ol,
dl,
dd,
fieldset {
  margin: 0;
}

a {
  color: var(--ink);
  text-decoration-color: var(--cta);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--cta-text);
}

:focus-visible {
  outline: 3px solid var(--cta);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Parts that only work with JavaScript (passkeys, copy) are hidden until the script has run. */
html:not(.js) .js-only {
  display: none;
}
html.js .no-js {
  display: none;
}

/* --- Shell: phone layout by default, brand panel beside the form from 960px --------------------------------- */

.shell {
  min-height: 100vh;
  display: flex;
}

.brand {
  display: none;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 20px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--card);
}

.logo-fallback {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: var(--navy);
}

.content {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
  font-size: 14px;
  color: var(--muted);
}

.footer a {
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.langs {
  display: flex;
  gap: 4px;
}

.langs a {
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
}

.langs a[aria-current="true"] {
  background: var(--line);
  color: var(--ink);
  font-weight: 600;
}

@media (min-width: 960px) {
  .brand {
    display: block;
    position: relative;
    width: 560px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--navy);
    color: #fff;
  }

  .brand-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Darkens any customer photo enough for white text (shade 0.7). */
  .brand-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 30, 45, 0.55) 0%, rgba(11, 30, 45, 0.95) 100%);
  }

  .brand-inner {
    position: relative;
    height: 100%;
    min-height: 100vh;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .brand-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 18px;
  }

  .brand .logo,
  .brand .logo-fallback {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .brand .logo-fallback {
    background: rgba(255, 255, 255, 0.16);
  }

  .brand-hero {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .brand-hero h2 {
    font-size: 40px;
    line-height: 1.15;
    font-weight: 700;
  }

  .brand-hero p {
    font-size: 17px;
    line-height: 1.55;
    max-width: 400px;
    color: rgba(255, 255, 255, 0.92);
  }

  .brand-foot {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
  }

  .main {
    padding: 48px;
    justify-content: center;
  }

  .topbar,
  .footer .protected {
    display: none;
  }

  .footer {
    margin-top: 0;
    justify-content: center;
  }
}

/* --- Card and text --------------------------------------------------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 960px) {
  .card {
    padding: 40px;
    gap: 24px;
  }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kicker {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.kicker-caps {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
}

.lead {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.lead strong,
.muted strong {
  color: var(--ink);
}

.muted {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

/* --- Forms ----------------------------------------------------------------------------------------------------- */

form {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label,
legend {
  font-size: 14px;
  font-weight: 600;
}

fieldset {
  border: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

legend {
  padding: 0;
  margin-bottom: 10px;
}

.input {
  height: 48px;
  width: 100%;
  border: 1px solid var(--field);
  border-radius: 10px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
}

.input:focus,
.digit:focus {
  outline: none;
  border: 2px solid var(--cta);
  box-shadow: 0 0 0 3px var(--cta-ring);
}

.input[aria-invalid="true"] {
  border: 2px solid var(--danger);
}

.digits {
  display: flex;
  gap: 8px;
}

/* Six boxes always fit the card: up to 56px wide, narrower on small screens. */
.digit {
  width: 0;
  height: 58px;
  min-width: 0;
  max-width: 56px;
  flex: 1 1 0;
  border: 1px solid var(--field);
  border-radius: 10px;
  text-align: center;
  font: inherit;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  background: var(--card);
}

.digits[aria-invalid="true"] .digit {
  border: 2px solid var(--danger);
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

/* Drawn by hand: the browser's own checkbox picks a dark tick on orange. The tick is white, made with borders
   (an SVG data URL would need img-src data: in the CSP). */
.check input {
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  display: grid;
  place-content: center;
  border: 2px solid var(--field);
  border-radius: 5px;
  background: var(--card);
  cursor: pointer;
}

.check input::before {
  content: "";
  width: 6px;
  height: 11px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  visibility: hidden;
}

.check input:checked {
  background: var(--cta);
  border-color: var(--cta);
}

.check input:checked::before {
  visibility: visible;
}

.check input[aria-invalid="true"] {
  border-color: var(--danger);
}

/* --- Buttons --------------------------------------------------------------------------------------------------- */

.btn {
  height: 48px;
  width: 100%;
  border-radius: 10px;
  padding: 0 16px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--field);
  background: var(--card);
  color: var(--ink);
}

.btn:hover {
  border-color: var(--muted);
  color: var(--ink);
}

.btn-primary {
  border: 0;
  background: var(--cta);
  color: #fff;
}

.btn-primary:hover {
  background: var(--cta-hover);
  color: #fff;
}

.btn-danger {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: #fff5f4;
}

.btn-small {
  width: auto;
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.link-button {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--cta);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* --- Messages -------------------------------------------------------------------------------------------------- */

.error {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--danger);
}

.error svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cta-text);
  background: #fff0e6;
}

/* For a multicolour logo: no tint behind it. */
.icon-badge-neutral {
  background: transparent;
}

.hint {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 15px;
  line-height: 1.45;
}

.notice {
  font-size: 14px;
  color: var(--ok);
  background: var(--ok-bg);
  border-radius: 10px;
  padding: 10px 12px;
}

/* --- Enrolment --------------------------------------------------------------------------------------------------- */

.option {
  border: 2px solid var(--cta);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.option-head svg {
  flex-shrink: 0;
  color: var(--cta);
}

.option-title {
  font-size: 16px;
  font-weight: 600;
}

.badge-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--cta-text);
}

.steps {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.steps > li {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-title {
  font-size: 15px;
  font-weight: 600;
}

/* Phones get the deep link into the authenticator app, computers the QR code to scan with a phone. */
.qr {
  display: none;
  width: 180px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}

.qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

@media (hover: hover) and (pointer: fine) {
  .qr {
    display: block;
  }
  html .phone-only {
    display: none;
  }
}

@media (hover: none), (pointer: coarse) {
  html .desktop-only {
    display: none;
  }
}

details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

summary {
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.manual {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.manual ol {
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.keyrow {
  display: flex;
  gap: 8px;
  align-items: center;
}

.key {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 1px;
  background: var(--page);
  padding: 10px 12px;
  border-radius: 8px;
}

.codes {
  list-style: none;
  margin: 0;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  background: var(--page);
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 15px;
}

.row {
  display: flex;
  gap: 10px;
}

.row > * {
  flex: 1;
}

.split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.split form {
  gap: 0;
}

/* --- Invitation, sessions, limits, handoff ------------------------------------------------------------------------ */

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  background: var(--page);
  border-radius: 12px;
  font-size: 14px;
}

.facts div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.numbered {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.devices {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.device {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.device svg {
  flex-shrink: 0;
  color: var(--muted);
}

.device-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.device-name {
  font-size: 15px;
  font-weight: 600;
}

.device-meta {
  font-size: 13px;
  color: var(--muted);
}

.device form {
  gap: 0;
}

.pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--ok);
  background: var(--ok-bg);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
}

.icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--warn-bg);
  color: var(--warn);
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown {
  font-size: 32px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bullets {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.bullets li {
  display: flex;
  gap: 10px;
}

.bullets li::before {
  content: "•";
  color: var(--ink);
}

.bullets strong {
  color: var(--ink);
}

/* The hidden attribute always wins over a component's display (error messages, unsupported passkeys). */
[hidden] {
  display: none;
}
