/* =========================================================
   teknoir-theme - login landing page
   The showcase hero: three doors meet in the mark and lead into sign-in
   ========================================================= */

/* ---------------------------------------------------------
   1. Tokens
   --------------------------------------------------------- */

:root {
  /* Palette of the platform showcase (showcase/teknoir-platform.src.html). */
  --tn-void:#101010;      /* page */
  --tn-panel:#171717;     /* card and door tiles */
  --tn-bone:#E0DED9;      /* brand off-white: all primary text */
  --tn-bone-2:#bebcb7;    /* body copy */
  --tn-ash:#a3a3a3;       /* secondary text */
  --tn-rule:#2c2c2c;      /* hairlines */
  --tn-rule-2:#3a3a3a;    /* control and tile borders */
  --tn-input:#121212;     /* input wells */
  --tn-blue-ink:#8DA6E8; --tn-orange-ink:#f3a37f; --tn-purple-ink:#D08BC0;
  --tn-accent:#3B61BF; --tn-accent-hover:#4C72D0; --tn-accent-ink:#8CA7F2; --tn-focus:#9DB4F7;
  --tn-yellow:#E0AD1B; --tn-orange:#ED6D36; --tn-purple:#9B357D; --tn-blue:#3B61BF;
    --tn-font:"Proxima Nova", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tn-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

@font-face {
  font-family: "Proxima Nova";
  src: url("../fonts/ProximaNova-Regular.woff2") format("woff2"),
       url("../fonts/ProximaNova-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Proxima Nova";
  src: url("../fonts/ProximaNova-RegularIt.woff2") format("woff2"),
       url("../fonts/ProximaNova-RegularIt.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Proxima Nova";
  src: url("../fonts/ProximaNova-Medium.woff2") format("woff2"),
       url("../fonts/ProximaNova-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Proxima Nova";
  src: url("../fonts/ProximaNova-MediumIt.woff2") format("woff2"),
       url("../fonts/ProximaNova-MediumIt.woff") format("woff");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Proxima Nova";
  src: url("../fonts/ProximaNova-SemiboldIt.woff2") format("woff2"),
       url("../fonts/ProximaNova-SemiboldIt.woff") format("woff");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

/* ---------------------------------------------------------
   2. Base
   --------------------------------------------------------- */

html,
.login-pf body,
.tn-body {
  background: var(--tn-void) !important;
  background-image: none !important;
}

.tn-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
  color: var(--tn-bone);
  font-family: var(--tn-font);
  -webkit-font-smoothing: antialiased;
  --keycloak-card-top-color: transparent;
}

.tn-body :focus-visible {
  outline: 2px solid var(--tn-focus);
  outline-offset: 2px;
}

/* Inputs inside a form control show focus on the control border instead.
   Transparent rather than none, so forced-colors mode still draws a ring. */
.tn-body .pf-v5-c-form-control input:focus-visible {
  outline: 2px solid transparent;
}

/* ---------------------------------------------------------
   3. PatternFly remap
   --------------------------------------------------------- */

.tn-body {
  --pf-v5-global--BackgroundColor--100: transparent;
  --pf-v5-global--primary-color--100: var(--tn-accent);
  --pf-v5-global--primary-color--200: var(--tn-accent-hover);
  --pf-v5-global--link--Color: var(--tn-accent-ink);
  --pf-v5-global--link--Color--hover: #B3C4F7;
  --pf-v5-global--FontFamily--text: var(--tn-font);
  --pf-v5-global--FontFamily--heading: var(--tn-font);
  --pf-v5-global--Color--100: var(--tn-bone);
  --pf-v5-global--Color--200: var(--tn-ash);
  --pf-v5-global--FontWeight--bold: 500;
}

.tn-body .pf-v5-c-button {
  --pf-v5-c-button--m-primary--BackgroundColor: var(--tn-accent);
  --pf-v5-c-button--m-primary--hover--BackgroundColor: var(--tn-accent-hover);
  --pf-v5-c-button--m-primary--focus--BackgroundColor: var(--tn-accent-hover);
  --pf-v5-c-button--m-primary--Color: #fff;
  --pf-v5-c-button--BorderRadius: 6px;
  --pf-v5-c-button--m-secondary--Color: var(--tn-accent-ink);
  --pf-v5-c-button--m-secondary--hover--Color: #B3C4F7;
  --pf-v5-c-button--m-secondary--focus--Color: #B3C4F7;
  --pf-v5-c-button--m-secondary--active--Color: #B3C4F7;
  --pf-v5-c-button--m-secondary--after--BorderColor: var(--tn-accent-ink);
}

.tn-body .pf-v5-c-button.pf-m-primary {
  min-height: 40px;
  font-weight: 500;
}

/* Tile titles and icons take their colour from primary-color--100, which is
   the dark action blue here; use the lighter accent ink instead. */

.tn-body .pf-v5-c-tile {
  --pf-v5-c-tile--hover__title--Color: var(--tn-accent-ink);
  --pf-v5-c-tile--focus__title--Color: var(--tn-accent-ink);
  --pf-v5-c-tile--m-selected__title--Color: var(--tn-accent-ink);
  --pf-v5-c-tile--hover__icon--Color: var(--tn-accent-ink);
  --pf-v5-c-tile--focus__icon--Color: var(--tn-accent-ink);
  --pf-v5-c-tile--m-selected__icon--Color: var(--tn-accent-ink);
}

.tn-body .pf-v5-c-form-control {
  --pf-v5-c-form-control--BackgroundColor: var(--tn-input);
  border-radius: 6px;
  min-height: 40px;
}

.tn-body .pf-v5-c-form-control::before {
  border-color: var(--tn-rule-2);
  border-radius: 6px;
}

.tn-body .pf-v5-c-form-control::after {
  border-radius: 6px;
}

/* The password eye button is the end of one pill: square the inner corners of
   the input so the two controls meet without a seam. */

.tn-body .pf-v5-c-input-group__item.pf-m-fill > .pf-v5-c-form-control,
.tn-body .pf-v5-c-input-group__item.pf-m-fill > .pf-v5-c-form-control::before,
.tn-body .pf-v5-c-input-group__item.pf-m-fill > .pf-v5-c-form-control::after {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.tn-body .pf-v5-c-form-control:focus-within::before {
  border-color: var(--tn-focus);
}

.tn-body .pf-v5-c-form-control:not(.pf-m-error):focus-within::after {
  border-bottom-color: var(--tn-focus);
}

.tn-body .pf-v5-c-button.pf-m-control {
  background: var(--tn-input);
  color: var(--tn-ash);
}

.tn-body .pf-v5-c-button.pf-m-control::after {
  border-color: var(--tn-rule-2) var(--tn-rule-2) var(--pf-v5-global--BorderColor--200);
  border-start-start-radius: 0;
  border-end-start-radius: 0;
  border-start-end-radius: 6px;
  border-end-end-radius: 6px;
}

.tn-body .pf-v5-c-form__label-text {
  color: var(--tn-ash);
  font-size: 13px;
}

/* The remember/reset row must wrap as one line of chips, not four lines. */

.tn-body .pf-v5-c-input-group + .pf-v5-c-form__helper-text > .pf-v5-c-helper-text {
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
}

.tn-body .pf-v5-c-check__label {
  font-size: 14px;
  white-space: nowrap;
}

.tn-body .pf-v5-c-helper-text__item a {
  white-space: nowrap;
}

/* The theme is dark whatever the OS setting, but v2 picks the social-provider
   icon filter from prefers-color-scheme: apply the dark-mode filter always. */

.tn-body #kc-social-providers svg:not(.google) {
  filter: invert(54%) sepia(96%) saturate(2028%) hue-rotate(174deg) brightness(99%) contrast(97%);
}

/* ---------------------------------------------------------
   4. Base-only pages (defensive CSS for templates inherited
      from base/login: device code, error, info, page expired,
      logout confirm)
   --------------------------------------------------------- */

.tn-body input.pf-v5-c-form-control {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  background: var(--tn-input);
  color: var(--tn-bone);
  border: 1px solid var(--tn-rule-2);
  border-radius: 6px;
}

.tn-body input.pf-v5-c-form-control:focus {
  outline: 2px solid var(--tn-focus);
  outline-offset: 2px;
}

.tn-body input[type=submit].pf-v5-c-button {
  width: 100%;
  min-height: 40px;
}

.tn-body .instruction,
.tn-body #kc-info-message,
.tn-body #kc-error-message {
  color: var(--tn-ash);
}

.tn-body #kc-info-message a,
.tn-body #instruction1 a,
.tn-body #kc-error-message a {
  color: var(--tn-accent-ink);
}

/* Base-page spacing: the device-code label, the logout instruction and the
   footer band follow the same rhythm as the v2 form. */

.tn-body #kc-user-verify-device-user-code-form .pf-v5-c-form__label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--tn-ash);
}

.tn-body #kc-logout-confirm .instruction {
  margin: 0 0 16px;
}

.tn-body .pf-v5-c-login__main-footer-band {
  --pf-v5-c-login__main-footer-band--BorderTopColor: var(--tn-rule);
  --pf-v5-c-login__main-footer-band--PaddingTop: 16px;
  --pf-v5-c-login__main-footer-band--PaddingRight: 0;
  --pf-v5-c-login__main-footer-band--PaddingLeft: 0;
  --pf-v5-c-login__main-footer-band-item--PaddingTop: 0;
  text-align: left;
  font-size: 13px;
  color: var(--tn-ash);
}

/* ---------------------------------------------------------
   5. Backdrop: the showcase hero's glow and grid
   --------------------------------------------------------- */

.tn-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.tn-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(640px 420px at 70% 34%, rgba(59, 97, 191, .20), transparent 70%),
    radial-gradient(520px 360px at 82% 64%, rgba(155, 53, 125, .16), transparent 70%),
    radial-gradient(520px 320px at 58% 52%, rgba(237, 109, 54, .10), transparent 70%);
}

.tn-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(900px 560px at 68% 42%, #000, transparent 75%);
  mask-image: radial-gradient(900px 560px at 68% 42%, #000, transparent 75%);
}

/* On the landing the page goes on into the showcase: the glow and grid
   belong to the hero only and fade out below it. */

.tn-landing .tn-backdrop {
  position: absolute;
  height: max(100vh, 900px);
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
}

/* Card-only pages: one quiet glow behind the card. */

.tn-body:not(.tn-landing) .tn-backdrop::before {
  background:
    radial-gradient(520px 360px at 50% 30%, rgba(59, 97, 191, .16), transparent 70%),
    radial-gradient(420px 280px at 58% 52%, rgba(155, 53, 125, .10), transparent 70%);
}

.tn-body:not(.tn-landing) .tn-backdrop::after {
  -webkit-mask-image: radial-gradient(640px 420px at 50% 34%, #000, transparent 75%);
  mask-image: radial-gradient(640px 420px at 50% 34%, #000, transparent 75%);
}

/* ---------------------------------------------------------
   6. Frame: top bar, shell, card
   --------------------------------------------------------- */

.tn-topbar {
  position: relative;
  z-index: 2;
  flex: none;
  height: 80px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  padding: 0 32px;
  max-width: 1320px;
  margin: 0 auto;
}

/* Landing: the top bar stays while the showcase scrolls by; full-bleed
   background through clip-path, content aligned with the hero. */

/* Keycloak's base sets body to 100% height; a sticky bar cannot leave its
   containing block, so on the long landing the body grows with its content. */

.tn-body.tn-landing {
  height: auto;
}

.tn-landing .tn-topbar,
.tn-landing .pf-v5-c-login__header.tn-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  gap: 28px;
}

/* The bar's background runs edge to edge while its content stays aligned
   with the hero; a hairline shows once the page has scrolled. */

.tn-landing .tn-topbar::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: rgba(16, 16, 16, .82);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid transparent;
}

.tn-landing.tn-scrolled .tn-topbar::before {
  border-bottom-color: var(--tn-rule);
}

/* At the very top the hero's glow shows through; the bar fills in as soon
   as the page scrolls, so nothing slides under a see-through logo. */

#tn-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.tn-landing.tn-js:not(.tn-scrolled) .tn-topbar::before {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.tn-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 15px;
}

/* The links are a tour of the page below, numbered like its sections, so
   "Console" does not read as the way into the console. */

.tn-nav a {
  color: var(--tn-ash);
  font-size: 14px;
  text-decoration: none;
}

.tn-nav-n {
  margin-right: 6px;
  font-size: 11.5px;
  letter-spacing: .12em;
  color: var(--tn-yellow);
}

.tn-nav a:hover {
  color: var(--tn-bone);
}

/* Every Sign in looks like the card's button: the same blue, as a pill. */

.tn-top-signin,
.tn-body .tn-sc .close .tn-sc-signin .btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--tn-accent);
  color: #fff;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: max-width .2s ease, opacity .2s ease, padding .2s ease, margin .2s ease;
  max-width: 160px;
}

.tn-top-signin:hover,
.tn-body .tn-sc .close .tn-sc-signin .btn:hover {
  background: var(--tn-accent-hover);
  color: #fff;
  filter: none;
}

/* With script, the bar's button shows only once the card has scrolled away;
   until then it takes no room, so the nav ends flush with the card. */

.tn-js:not(.tn-card-away) .tn-top-signin {
  max-width: 0;
  padding: 0;
  margin-left: -28px;
  opacity: 0;
  visibility: hidden;
}

html:has(.tn-landing) {
  scroll-behavior: smooth;
  scroll-padding-top: 79px;
}

/* The showcase follows the hero; its close ends with a way back to the card. */

/* The body is the page's flex column; the showcase must not shrink into
   it and scroll on its own (its body rule brings overflow-x: hidden). */

.tn-body .tn-sc {
  position: relative;
  z-index: 1;
  flex: none;
  overflow: visible;
  overflow-x: clip;
  background: transparent;
}

/* One column for the whole page: the showcase's 1240px wrap widens to the
   hero's 1320px. */

.tn-body .tn-sc .wrap {
  max-width: 1320px;
}

.tn-body .tn-sc .close .tn-sc-signin {
  margin: 32px auto 0;
}

.tn-body .tn-sc .close .tn-sc-signin .btn {
  height: 46px;
  padding: 0 26px;
  font-size: 16px;
}

.tn-body .pf-v5-c-login__header {
  display: flex;
  padding: 0;
  background: none;
  border: 0;
  grid-template-columns: none;
  grid-template-areas: none;
  gap: 0;
}

.tn-body .pf-v5-c-login__header.tn-topbar {
  padding: 0 32px;
  max-width: 1320px;
  margin: 0 auto;
}

#kc-header-wrapper {
  font-size: inherit;
  text-transform: none;
  letter-spacing: 0;
  text-align: start;
  line-height: 0;
  padding: 0;
}

.tn-topbar .tn-logo {
  height: 28px;
  width: auto;
  display: block;
}

.tn-shell {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  width: 100%;
}

.tn-body .pf-v5-c-login {
  min-height: 0;
  padding: 0;
  display: block;
  background: none;
}

.tn-body .pf-v5-c-login__container {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "main";
  width: 100%;
  max-width: none;
  padding: 0;
  gap: 0;
}

.tn-shell:not(.tn-shell--landing) {
  box-sizing: border-box;
  padding: clamp(16px, 8vh, 96px) 16px 48px;
}

.tn-shell:not(.tn-shell--landing) .pf-v5-c-login__main {
  width: min(420px, 100%);
  margin: 0 auto;
}

/* The card is the fleet panel of the showcase: yellow top rule, the
   yellow rail from the mark enters it at mid-height. */

.tn-body .pf-v5-c-login__main {
  position: relative;
  width: 100%;
  margin: 0;
  background: var(--tn-panel);
  border: 1px solid var(--tn-rule-2);
  border-radius: 14px;
  padding: 26px 28px 22px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 60px 110px -50px #000,
    0 0 0 1px rgba(0, 0, 0, .5);
}

.tn-body .pf-v5-c-login__main::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: -1px;
  height: 3px;
  border-radius: 2px;
  pointer-events: none;
  background: var(--tn-yellow);
}

.tn-landing .pf-v5-c-login__main::after {
  content: "";
  position: absolute;
  left: -2px;
  top: calc(50% - 14px);
  width: 3px;
  height: 28px;
  border-radius: 2px;
  background: var(--tn-yellow);
  pointer-events: none;
}

.tn-body .pf-v5-c-login__main-header {
  padding: 0;
  background: none;
  border: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 16px;
}

.tn-body .pf-v5-c-login__main > .pf-v5-c-login__main-body,
.tn-body .pf-v5-c-login__main-footer {
  padding: 0;
  background: none;
  border: 0;
  display: block;
}

.tn-body .pf-v5-c-login__main > .pf-v5-c-login__main-body {
  margin-top: 14px;
}

.tn-card-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tn-yellow);
}

.tn-card-title,
#kc-page-title {
  font-size: 26px;
  font-weight: 500;
  color: var(--tn-bone);
  letter-spacing: -.01em;
  margin: 0;
}

.tn-card-help {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--tn-ash);
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--tn-rule);
  text-wrap: pretty;
}

.tn-card-note {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--tn-purple-ink);
}

.tn-card-help-sub {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--tn-ash);
}

.tn-landing .tn-card-help {
  color: var(--tn-bone-2);
}

/* PatternFly pads the card's first and last child; the card has its own padding. */

.tn-body .pf-v5-c-login__main > :first-child {
  padding-top: 0;
}

.tn-body .pf-v5-c-login__main > :last-child {
  padding-bottom: 0;
}

/* ---------------------------------------------------------
   7. Landing: headline, three doors, the join, the card
   --------------------------------------------------------- */

/* Wide: copy on the left; doors, join and card form one diagram on the
   right, centred on the card. Proof row underneath, as on the showcase. */

.tn-landing {
  --tn-door-w: 196px;
  --tn-join-w: 132px;
  --tn-card-w: 372px;
}

.tn-shell--landing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--tn-door-w) var(--tn-join-w) var(--tn-card-w);
  grid-template-areas:
    "head doors join card"
    "sub  doors join card"
    "proof proof proof proof";
  grid-template-rows: auto auto auto;
  column-gap: 0;
  max-width: 1320px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: clamp(16px, calc((100vh - 80px - 640px) * .4), 22vh) 32px 48px;
  align-content: start;
}

.tn-head { grid-area: head; align-self: end; padding-right: 40px; }
.tn-sub { grid-area: sub; align-self: start; padding-right: 40px; }
.tn-doors { grid-area: doors; align-self: center; }
.tn-join { grid-area: join; align-self: center; }
.tn-shell--landing .pf-v5-c-login { grid-area: card; align-self: center; }
.tn-proof { grid-area: proof; }

.tn-eyebrow {
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--tn-yellow);
}

.tn-headline {
  margin: 0;
  font-size: clamp(40px, 3.8vw, 60px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--tn-bone);
}

.tn-gr {
  white-space: nowrap;
  background: linear-gradient(90deg, var(--tn-blue-ink) 0%, var(--tn-orange) 52%, var(--tn-purple-ink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tn-sub {
  margin: 26px 0 0;
  max-width: 31em;
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.5;
  color: var(--tn-bone-2);
  text-wrap: pretty;
}

.tn-sub b {
  font-weight: 500;
  color: var(--tn-bone);
}

/* Doors: three tiles at a fixed pitch (68px), so the join's rails meet
   their centres whatever the card's height. */

.tn-doors {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tn-door {
  position: relative;
  box-sizing: border-box;
  height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  column-gap: 8px;
  padding: 0 12px 0 22px;
  background: transparent;
  border: 1px solid var(--tn-rule);
  border-radius: 10px;
}

/* The door this sign-in is for (by client): lit; the other two step back. */

.tn-door--active {
  background: var(--tn-panel);
  border-color: color-mix(in srgb, var(--tn-dc) 70%, var(--tn-rule-2));
}

[data-door] .tn-door:not(.tn-door--active) {
  opacity: .6;
  --tn-dc: var(--tn-rule-2);
  --tn-di: var(--tn-ash);
}

[data-door] .tn-rails path[class^="tn-rail-"],
[data-door] .tn-flow path[class^="tn-rail-"] {
  opacity: .25;
}

[data-door="console"] .tn-rails path.tn-rail-console,
[data-door="console"] .tn-flow path.tn-rail-console,
[data-door="cli"] .tn-rails path.tn-rail-cli,
[data-door="cli"] .tn-flow path.tn-rail-cli {
  opacity: 1;
}

.tn-door::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 2px;
  background: var(--tn-dc);
}

.tn-door--console { --tn-dc: var(--tn-blue); --tn-di: var(--tn-blue-ink); }
.tn-door--bot { --tn-dc: var(--tn-orange); --tn-di: var(--tn-orange); }
.tn-door--cli { --tn-dc: var(--tn-purple); --tn-di: var(--tn-purple-ink); }

.tn-door-name {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--tn-bone);
}

.tn-door-text {
  grid-column: 1;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--tn-ash);
}

.tn-door-icon {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--tn-di);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The join: rails from the door centres (28, 96, 164) into the mark at
   (80, 96), the yellow rail from the mark into the card. */

.tn-join {
  position: relative;
  width: var(--tn-join-w);
  height: 192px;
}

.tn-join svg {
  display: block;
  overflow: visible;
}

.tn-join .tn-join-tall {
  display: none;
}

.tn-rails path {
  fill: none;
  stroke-width: 8;
  stroke-linejoin: round;
}

.tn-flow path {
  fill: none;
  stroke: #fff;
  stroke-opacity: .85;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: .4 49.6;
  animation: tn-flow 4.5s linear infinite;
}

.tn-flow .b { animation-delay: -1.4s; }
.tn-flow .c { animation-delay: -2.9s; }
.tn-flow .y { animation-duration: 1.5s; }

@keyframes tn-flow {
  from { stroke-dashoffset: -100; }
  to { stroke-dashoffset: 0; }
}

.tn-join-mark {
  position: absolute;
  left: 58px;
  top: 74px;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 8px;
  background: #161616;
  border: 1px solid var(--tn-rule-2);
  border-radius: 11px;
}

/* Proof row */

.tn-proof {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 32px;
}

.tn-proof li {
  border-top: 1px solid var(--tn-rule);
  padding-top: 16px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--tn-bone-2);
}

.tn-proof-t {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--tn-bone);
}

/* Short laptop screens: the whole hero and the proof row fit above the fold. */

@media (min-width: 1240px) and (max-height: 860px) {
  .tn-topbar,
  .tn-body .pf-v5-c-login__header.tn-topbar {
    height: 64px;
  }

  .tn-shell--landing {
    padding-top: clamp(16px, calc((100vh - 64px - 640px) * .4), 140px);
    padding-bottom: 32px;
  }

  .tn-eyebrow { margin-bottom: 16px; }
  .tn-sub { margin-top: 20px; }
  .tn-proof { margin-top: 40px; }
}

/* Medium: copy above, the diagram as one centred row below it. */

@media (max-width: 1239px) {
  .tn-shell--landing {
    grid-template-columns: var(--tn-door-w) var(--tn-join-w) minmax(300px, var(--tn-card-w));
    grid-template-areas:
      "head head head"
      "doors join card"
      "sub sub sub"
      "proof proof proof";
    justify-content: center;
    padding-top: 16px;
  }

  .tn-landing .tn-topbar,
  .tn-landing .pf-v5-c-login__header.tn-topbar {
    max-width: calc(var(--tn-door-w) + var(--tn-join-w) + var(--tn-card-w) + 64px);
  }

  .tn-head,
  .tn-sub {
    padding-right: 0;
  }

  .tn-head {
    margin-bottom: 36px;
  }

  .tn-sub {
    margin-top: 40px;
  }

  .tn-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 32px;
    margin-top: 48px;
  }
}

/* Narrow: headline, the doors in a row, the rails down into the card. */

@media (max-width: 899px) {
  .tn-nav {
    display: none;
  }

  .tn-top-signin {
    margin-left: auto;
  }
}

@media (max-width: 759px) {
  html:has(.tn-landing) {
    scroll-padding-top: 59px;
  }

  .tn-topbar,
  .tn-body .pf-v5-c-login__header.tn-topbar {
    height: 60px;
    padding: 0 18px;
  }

  .tn-topbar .tn-logo {
    height: 22px;
  }

  .tn-shell--landing {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "doors" "join" "card" "sub" "proof";
    justify-content: stretch;
    padding: 4px 18px 40px;
  }

  .tn-eyebrow {
    margin-bottom: 12px;
    font-size: 11.5px;
  }

  .tn-headline {
    font-size: min(10vw, 44px);
  }

  .tn-doors {
    flex-direction: row;
    gap: 8px;
  }

  .tn-door,
  .tn-door--active {
    flex: 1 1 0;
    min-width: 0;
    height: auto;
    padding: 0 0 8px;
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
    background: none;
    border: 0;
  }

  .tn-door::before {
    display: none;
  }

  .tn-door-text,
  .tn-door-icon {
    display: none;
  }

  .tn-door-name {
    font-size: 13.5px;
    white-space: nowrap;
    color: var(--tn-bone-2);
  }

  .tn-door--active .tn-door-name {
    color: var(--tn-bone);
  }

  .tn-join {
    width: 100%;
    height: 72px;
  }

  .tn-join .tn-join-wide,
  .tn-landing .pf-v5-c-login__main::after {
    display: none;
  }

  .tn-join .tn-join-tall {
    display: block;
    width: 100%;
    height: 72px;
  }

  .tn-join-tall .tn-rails path {
    stroke-width: 6;
    vector-effect: non-scaling-stroke;
  }

  .tn-join-mark {
    left: 50%;
    top: 24px;
    width: 32px;
    height: 32px;
    margin-left: -16px;
    padding: 5px;
    border-radius: 8px;
  }

  .tn-head {
    margin-bottom: 20px;
  }

  .tn-sub {
    margin: 32px 0 0;
    font-size: 16px;
  }

  .tn-proof {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 32px;
  }
}

@media (max-width: 759px) and (max-height: 760px) {
  .tn-eyebrow { display: none; }
  .tn-headline { font-size: min(8.5vw, 34px); }
  .tn-head { margin-bottom: 14px; }
  .tn-join,
  .tn-join .tn-join-tall { height: 52px; }
  .tn-join-mark { top: 12px; }
}

@media (max-width: 479px) {
  .tn-body .pf-v5-c-login__main {
    padding: 22px 20px 20px;
  }
}

/* Large screens: the diagram grows with the headline (the tile pitch stays,
   so the rails still meet the door centres). */

@media (min-width: 1440px) and (min-height: 900px) {
  .tn-landing {
    --tn-door-w: 216px;
  }

  .tn-door-name { font-size: 16px; }
  .tn-door-text { font-size: 13px; }
}

@media (min-width: 2200px) and (min-height: 1200px) {
  .tn-landing {
    --tn-door-w: 232px;
    --tn-card-w: 420px;
  }

  .tn-topbar,
  .tn-body .pf-v5-c-login__header.tn-topbar,
  .tn-shell--landing {
    max-width: 1640px;
  }

  .tn-headline { font-size: 72px; }
  .tn-sub { font-size: 21px; }
}

/* ---------------------------------------------------------
   8. Touch and motion
   --------------------------------------------------------- */

@media (pointer: coarse) {
  .tn-body .pf-v5-c-form-control,
  .tn-body .pf-v5-c-button.pf-m-primary,
  .tn-body .pf-v5-c-button.pf-m-control,
  .tn-body input[type=submit].pf-v5-c-button {
    min-height: 44px;
  }

  .tn-body .pf-v5-c-helper-text__item a,
  .tn-body .pf-v5-c-check__label {
    display: inline-block;
    padding-block: 12px;
    margin-block: -12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tn-body *,
  .tn-body *::before,
  .tn-body *::after {
    animation: none !important;
    transition: none !important;
  }

  .tn-flow {
    display: none;
  }

  html:has(.tn-landing) {
    scroll-behavior: auto;
  }
}
