/* Wilhelm Lab S1 door: copied from labl1's demo (state/lab_demo/branding/static/wilhelm_hub.css, read only) at H2b round 2, then the hub-home rules added below. */
/* The demo hub's pages in the Wilhelm tokens.
   Values are those of Wilhelm.aiDNA/what/design_system/tokens.css (generated there; re-read, not edited).
   The logo is shown as supplied, at its own size, on the paper ground. */
@font-face { font-family: 'Source Sans 3'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('fonts/source-sans-3-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-weight: 600; font-style: normal; font-display: swap;
  src: url('fonts/source-sans-3-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-weight: 700; font-style: normal; font-display: swap;
  src: url('fonts/source-sans-3-latin-700-normal.woff2') format('woff2'); }

:root {
  --color-paper: #F2F1EC;
  --color-ink: #13161B;
  --color-ink-muted-solid: #544C46;
  --color-wilhelm-blue: #1B3A5C;
  --color-wilhelm-blue-hover: #0F2540;
  --color-hope-yellow: #E8B547;
  --color-hairline-solid: #B4B0AB;
  --color-paper-grain-solid: #EBEAE6;
  --font-display: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --font-label: 'Source Sans 3', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
}
/* One ground, paper, whatever the machine's colour scheme: the hub's dark switch is hidden and its values held to these. */
:root, [data-bs-theme=light], [data-bs-theme=dark] {
  color-scheme: light;
  --bs-body-bg: #F2F1EC;
  --bs-body-color: #13161B;
  --bs-emphasis-color: #13161B;
  --bs-heading-color: #13161B;
  --bs-secondary-color: #544C46;
  --bs-secondary-bg: #EBEAE6;
  --bs-tertiary-bg: #F2F1EC;
  --bs-border-color: #B4B0AB;
  --bs-link-color: #1B3A5C;
  --bs-link-color-rgb: 27,58,92;
  --bs-link-hover-color: #0F2540;
  --bs-link-hover-color-rgb: 15,37,64;
}
#dark-theme-toggle { display: none !important; }

html, body { background: var(--color-paper) !important; color: var(--color-ink); }
body { font-family: var(--font-label); font-size: 18px; line-height: 1.55; }
h1, h2, h3, .lab-title { font-family: var(--font-display); font-weight: 600; color: var(--color-ink); }
a { color: var(--color-wilhelm-blue); }
a:hover { color: var(--color-wilhelm-blue-hover); }

/* the bar */
.navbar, nav.navbar { background: var(--color-paper) !important; border: 0; border-bottom: 2.25pt solid var(--color-ink);
  border-radius: 0; box-shadow: none; }
.navbar .nav-link, .navbar a { color: var(--color-ink) !important; }
.lab-wordmark { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; color: var(--color-ink) !important;
  text-decoration: none; padding: 6px 4px; letter-spacing: 0.01em; }
.lab-wordmark:hover { color: var(--color-wilhelm-blue) !important; text-decoration: none; }

/* buttons and fields */
.btn-jupyter, .btn-primary, input[type=submit].btn { background: var(--color-wilhelm-blue) !important; border: 1px solid var(--color-wilhelm-blue) !important;
  color: var(--color-paper) !important; border-radius: 2px; font-family: var(--font-label); font-weight: 600; padding: 9px 22px; }
.btn-jupyter:hover, .btn-primary:hover, input[type=submit].btn:hover { background: var(--color-wilhelm-blue-hover) !important; border-color: var(--color-wilhelm-blue-hover) !important; }
.btn:focus-visible, .form-control:focus { outline: 2px solid var(--color-wilhelm-blue); outline-offset: 2px; box-shadow: none; }
.form-control, .form-control:focus { background: var(--color-paper); color: var(--color-ink); border: 1px solid var(--color-ink); border-radius: 2px; font-family: var(--font-label); }

/* the sign-in page, and the waiting page after it */
body:has(.lab-door) .lab-wordmark, body:has(.lab-wait) .lab-wordmark { visibility: hidden; }
.lab-door { max-width: 880px; margin: 56px auto 40px; padding: 0 24px; display: grid; grid-template-columns: 243px 1fr; gap: 48px; align-items: start; }
.lab-door-logo img { display: block; width: 243px; height: 243px; }
.lab-door h1, .lab-wait h1 { font-size: 2.75rem; line-height: 1.1; margin: 0 0 8px; }
.lab-door .lab-programme, .lab-wait .lab-programme { font-family: var(--font-display); font-size: 1.17rem; font-weight: 400; margin: 0; }
.lab-door .lab-owner, .lab-wait .lab-owner { font-family: var(--font-display); font-size: 1.17rem; font-weight: 400; color: var(--color-ink-muted-solid); margin: 0 0 20px; }
.lab-door .lab-rule, .lab-wait .lab-rule { width: 64px; height: 4px; background: var(--color-hope-yellow); margin: 0 0 24px; }
.lab-door form { max-width: 380px; }
.lab-door label { display: block; font-weight: 600; margin: 14px 0 4px; }
.lab-door .login_error { color: var(--color-ink); border-left: 2.25pt solid var(--color-ink); padding-left: 12px; font-weight: 600; margin: 0 0 8px; }
.lab-door .lab-note { color: var(--color-ink-muted-solid); font-size: 0.9rem; margin-top: 28px; border-top: 1px solid var(--color-hairline-solid); padding-top: 12px; }
.lab-door .lab-submit { margin-top: 20px; }
@media (max-width: 760px) { .lab-door { grid-template-columns: 1fr; gap: 24px; } }

/* the waiting page between the sign-in and the lab (templates/spawn_pending.html): the door's column, one line,
   the stock progress bar in the tokens. The lockup is not repeated here; the column stands where the door's does. */
body:has(.lab-wait) #thenavbar { visibility: hidden; }
.text-center:has(> .lab-wait) { text-align: left !important; max-width: 880px; margin: 32px auto 0; padding: 0 24px 0 315px; }
.lab-wait .lab-wait-line { margin: 0 0 16px; }
body:has(.lab-wait) .progress { height: 4px; max-width: 380px; border-radius: 0; background: var(--color-hairline-solid); }
body:has(.lab-wait) .progress-bar { background: var(--color-wilhelm-blue); }
body:has(.lab-wait) .progress-bar.progress-bar-danger { background: var(--color-ink); }
body:has(.lab-wait) #progress-message { display: none; }
body:has(.lab-wait) #progress-details:not([open]) { display: none; }
@media (max-width: 760px) { .text-center:has(> .lab-wait) { padding: 0 24px; } }

/* the authenticator's own pages (sign-up, change of password) inherit the tokens */
#login-main .auth-form-header, .auth-form-header { background: var(--color-wilhelm-blue) !important; color: var(--color-paper) !important;
  border: 0 !important; border-radius: 2px 2px 0 0 !important; font-family: var(--font-display); }
#login-main .auth-form-body, .auth-form-body { background: var(--color-paper); border: 1px solid var(--color-hairline-solid) !important; border-top: 0 !important; border-radius: 0 0 2px 2px !important; }

/* the hub's home page (templates/home.html), in the door's column */
.lab-home { max-width: 880px; margin: 40px auto 8px; padding: 0 24px; }
.lab-home h1 { font-size: 2.25rem; line-height: 1.1; margin: 0 0 8px; }
.lab-home .lab-programme { font-family: var(--font-display); font-size: 1.1rem; margin: 0; }
.lab-home .lab-owner { font-family: var(--font-display); font-size: 1.1rem; color: var(--color-ink-muted-solid); margin: 0 0 16px; }
.lab-home .lab-rule { width: 64px; height: 4px; background: var(--color-hope-yellow); margin: 0 0 20px; }
.lab-home .lab-home-line { margin: 0 0 8px; }
