/**
 * Juli brand layer.
 *
 * Re-skins the Neon theme's existing classes with the Juli palette and
 * typeface, across both the auth pages and the signed-in shell. It adds no
 * new components: every selector mirrors one the theme already ships, bar
 * the mobile drawer, which the theme only ever drove with jQuery.
 * Load it last, after neon-*.css and custom.css.
 *
 * Palette and type are lifted from the Flutter app so the two products
 * agree. Keep in sync with:
 *   mobile_flutter/lib/core/themes/juli/color_pallete.dart
 *   mobile_flutter/lib/core/themes/juli/light_theme.dart
 *   mobile_flutter/pubspec.yaml  (family: Futura)
 */

/* ---------------------------------------------------------------- fonts -- */

/* Futura PT, from mobile_flutter/assets/fonts. The Flutter manifest declares
   both faces under one family without weights; on the web Book is the 400 and
   Medium the 500. */
@font-face {
  font-family: "Futura PT";
  src: url("../fonts/FuturaPT-Book.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Futura PT";
  src: url("../fonts/FuturaPT-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------- tokens -- */

:root {
  /* ColorPalette.redLight — brand mark, splash, header band. */
  --juli-coral: #ff6961;
  /* ColorPalette.redMiddle — the coral's pressed/hover step. */
  --juli-coral-dark: #e03126;

  /* ColorPalette.green — light_theme's primaryActionButtonColor. */
  --juli-mint: #00d6b2;
  --juli-mint-dark: #00bfa0;
  /* ColorPalette.greenSecondary — success surfaces. */
  --juli-mint-soft: #a3f1e4;

  /* ColorPalette.red / .redDark — error surfaces. */
  --juli-red: #fe3333;
  --juli-red-dark: #a21f17;

  --juli-black: #000000;
  --juli-white: #ffffff;
  /* ColorPalette.greyDark — muted copy, placeholders, focused input border. */
  --juli-grey-dark: #6f6f6f;
  /* ColorPalette.greyMiddle — resting input border. */
  --juli-grey-mid: #c6c6c6;
  /* ColorPalette.greyLight — hairlines, progress track. */
  --juli-grey-light: #ececec;
  /* ColorPalette.grey — the tinted surface the sidebar and inert fields sit on. */
  --juli-grey: #f8f8f8;

  --juli-font: "Futura PT", "Noto Sans", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  /* Matches the pill radii the Flutter app uses for primary actions. */
  --juli-radius-pill: 28px;
  --juli-radius-field: 10px;
}

/* ---------------------------------------------------------------- canvas -- */

.login-page {
  background: var(--juli-white);
  color: var(--juli-black);
  font-family: var(--juli-font);
}

.login-page .login-content a {
  color: var(--juli-grey-dark);
}

/* ------------------------------------------------------------ coral band -- */

.login-page .login-header {
  background: var(--juli-coral);
  padding: 104px 0 92px;
}

.login-page .login-header.login-caret:after {
  border-color: var(--juli-coral) transparent transparent transparent;
}

.login-page .login-header .description {
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  margin-top: 18px;
}

/* The juli wordmark ships at its natural 476x450; the width/height attributes
   on the <img> hold the ratio so nothing reflows while it loads. */
.login-page .login-header .logo img {
  display: block;
  width: 88px;
  height: auto;
  margin: 0 auto;
}

/* ---------------------------------------------------------------- fields -- */

.login-page .login-form {
  padding-top: 44px;
}

.login-page .login-form .form-group .input-group {
  background: var(--juli-white);
  border: 1px solid var(--juli-grey-mid);
  padding-top: 8px;
  padding-bottom: 8px;
  border-radius: var(--juli-radius-field);
}

/* :focus-within earns the focus ring on every auth page; only the login page
   tracks focus in React and sets .focused itself. */
.login-page .login-form .form-group .input-group.focused,
.login-page .login-form .form-group .input-group:focus-within {
  border-color: var(--juli-grey-dark);
}

.login-page .login-form .form-group .input-group.validate-has-error {
  border-color: var(--juli-red);
}

.login-page .login-form .form-group .input-group .input-group-addon {
  color: var(--juli-grey-dark);
  background: transparent;
}

/* The theme divides the icon from the input with a grey hairline. It read as
   grime inside an otherwise white field, so it goes. */
.login-page .login-form .form-group .input-group .input-group-addon:after {
  display: none;
}

/* Left transparent on purpose: the white comes from .input-group, so the
   input can't square off its rounded corners.
   16px is deliberate: it matches the weight the rest of the page reads at,
   and it's the threshold below which iOS Safari zooms the page on focus. */
.login-page .login-form .form-group .input-group .form-control {
  background: transparent;
  color: var(--juli-black);
  font-family: var(--juli-font);
  font-size: 16px;
  font-weight: 400;
  height: auto;
}

/* Placeholders inherit the input's font, but the family is restated here so a
   UA default can't slip back in on any engine. ColorPalette.greyDark is the
   app's own inputPlaceholder token. */
.login-page .login-form .form-group .input-group .form-control::-webkit-input-placeholder {
  color: var(--juli-grey-dark);
  font-family: var(--juli-font);
  font-weight: 400;
}

.login-page .login-form .form-group .input-group .form-control::-moz-placeholder {
  color: var(--juli-grey-dark);
  font-family: var(--juli-font);
  font-weight: 400;
  opacity: 1;
}

.login-page .login-form .form-group .input-group .form-control:-ms-input-placeholder {
  color: var(--juli-grey-dark);
  font-family: var(--juli-font);
  font-weight: 400;
}

.login-page .login-form .form-group .input-group .form-control::placeholder {
  color: var(--juli-grey-dark);
  font-family: var(--juli-font);
  font-weight: 400;
}

/* Chrome paints autofilled fields with its own grey-blue, and it does so from
   an internal UA rule that plain `background` can't touch — an inset shadow
   large enough to flood the box is the only reliable repaint. Both the
   standard :autofill and the -webkit- alias are listed because Chrome still
   matches the prefixed one; they're in separate rules so a browser that knows
   only one doesn't drop the whole selector list. */
.login-page .login-form .form-group .input-group .form-control:-webkit-autofill,
.login-page .login-form .form-group .input-group .form-control:-webkit-autofill:hover,
.login-page .login-form .form-group .input-group .form-control:-webkit-autofill:focus,
.login-page .login-form .form-group .input-group .form-control:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--juli-white) inset !important;
  box-shadow: 0 0 0 1000px var(--juli-white) inset !important;
  -webkit-text-fill-color: var(--juli-black) !important;
  caret-color: var(--juli-black);
}

.login-page .login-form .form-group .input-group .form-control:autofill,
.login-page .login-form .form-group .input-group .form-control:autofill:hover,
.login-page .login-form .form-group .input-group .form-control:autofill:focus,
.login-page .login-form .form-group .input-group .form-control:autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--juli-white) inset !important;
  box-shadow: 0 0 0 1000px var(--juli-white) inset !important;
  -webkit-text-fill-color: var(--juli-black) !important;
  caret-color: var(--juli-black);
  /* Firefox tints with a background-image rather than a colour, and ignores
     the inset-shadow trick — these two are what clear it there. */
  background-image: none !important;
  background-color: var(--juli-white) !important;
}

/* ------------------------------------------------------------------- CTA -- */

/* Mint pill with a near-black label. White on #00d6b2 is only 1.87:1; black
   is 11.2:1, so the label reads and the button stays on-palette. */
.login-page .login-form .form-group .btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--juli-mint);
  border: 1px solid var(--juli-mint);
  color: var(--juli-black);
  font-family: var(--juli-font);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  padding: 14px 24px;
  border-radius: var(--juli-radius-pill);
}

.login-page .login-form .form-group .btn-login i {
  float: none;
  font-size: 16px;
}

.login-page .login-form .form-group .btn-login:hover,
.login-page .login-form .form-group .btn-login:active,
.login-page .login-form .form-group .btn-login:focus {
  background: var(--juli-mint-dark);
  border-color: var(--juli-mint-dark);
  color: var(--juli-black);
}

.login-page .login-form .form-group .btn-login[disabled],
.login-page .login-form .form-group .btn-login[disabled]:hover {
  background: var(--juli-mint);
  border-color: var(--juli-mint);
  opacity: 0.55;
}

/* ----------------------------------------------------------------- links -- */

.login-page .login-bottom-links {
  padding-top: 28px;
  padding-bottom: 30px;
}

/* .link is the secondary route ("Forgot your password?", "Back to sign in");
   a bare anchor is the primary one ("Create an account"). */
.login-page .login-bottom-links .link {
  color: var(--juli-grey-dark);
}

.login-page .login-bottom-links .link:hover {
  color: var(--juli-black);
}

.login-page .login-bottom-links a {
  color: var(--juli-coral);
  font-weight: 500;
}

.login-page .login-bottom-links a:hover {
  color: var(--juli-coral-dark);
}

/* ------------------------------------------------------- notice / error -- */

.login-page .form-login-error.form-login-error {
  background: var(--juli-red);
  color: var(--juli-white);
  border-radius: var(--juli-radius-field);
}

.login-page .form-login-error.form-login-error h3 {
  background: var(--juli-red-dark);
  color: var(--juli-white);
  font-family: var(--juli-font);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--juli-radius-field) var(--juli-radius-field) 0 0;
}

.login-page .form-login-error.form-login-error p {
  font-size: 12px;
}

/* The theme reds every .form-login-error, so its own success classes never
   actually read as success. These two restore that distinction in mint —
   dark copy, because white on mint fails contrast. */
.login-page .form-login-error.form-register-success,
.login-page .form-login-error.form-forgotpassword-success {
  background: var(--juli-mint-soft);
  color: var(--juli-black);
}

.login-page .form-login-error.form-register-success h3,
.login-page .form-login-error.form-forgotpassword-success h3 {
  background: var(--juli-mint);
  color: var(--juli-black);
}

.login-page .form-login-error.form-register-success a,
.login-page .form-login-error.form-forgotpassword-success a {
  color: var(--juli-black);
  text-decoration: underline;
}

/* ---------------------------------------------------------- signing in -- */

.login-page.logging-in .login-header {
  padding-top: 120px;
  padding-bottom: 28px;
}

.login-page.logging-in .login-progressbar {
  background: var(--juli-grey-light);
  height: 3px;
}

.login-page.logging-in .login-progressbar div {
  background: var(--juli-mint);
  height: 3px;
}

/* The indicator sits below the coral band, on white — so it takes dark copy,
   not the theme's white. */
.login-page .login-progressbar-indicator h3 {
  color: var(--juli-black);
  font-family: var(--juli-font);
  font-weight: 500;
}

.login-page .login-progressbar-indicator span {
  color: var(--juli-grey-dark);
}

/* ------------------------------------------------------------------ a11y -- */

.login-page a:focus-visible,
.login-page .btn-login:focus-visible,
.login-page .form-control:focus-visible {
  outline: 2px solid var(--juli-coral-dark);
  outline-offset: 2px;
}

/* ------------------------------------------------------------ responsive -- */

/* Mirrors the theme's own <=991px block; without it these plain rules would
   win over the theme's media query purely by load order. */
@media (max-width: 991px) {
  .login-page .login-header {
    padding: 56px 0 48px;
  }

  .login-page .login-form {
    padding-top: 30px;
  }

  .login-page.logging-in .login-header {
    padding-top: 34px;
    padding-bottom: 6px;
  }
}

/* ================================================================ shell === */
/*
 * The signed-in frame: sidebar, top bar, footer. Same approach as the auth
 * block above — every selector mirrors one the Neon theme already ships.
 *
 * Colour has one job each:
 *   coral fill  -> primary actions (buttons, the monogram)
 *   coral bar   -> where you are (the active nav row's left edge)
 * They never share a shape, so they don't compete for the same signal.
 */

/* Futura is global from here; the auth block's .login-page rule is now
   redundant but harmless. Controls are named explicitly because a UA
   stylesheet, not inheritance, decides their font. */
body.page-body {
  font-family: var(--juli-font);
}

.page-container .form-control,
.page-container .btn,
.page-container input,
.page-container select,
.page-container textarea,
.page-container button {
  font-family: var(--juli-font);
}

/* ------------------------------------------------------------- sidebar -- */

.page-container .sidebar-menu {
  background: var(--juli-grey);
  width: 240px;
  border-right: 1px solid var(--juli-grey-light);
}

.page-container.sidebar-collapsed .sidebar-menu,
.page-container.sidebar-collapsed .sidebar-menu .sidebar-menu-inner {
  width: 64px;
}

.page-container .sidebar-menu .logo-env {
  padding: 22px 18px;
}

.page-container .sidebar-menu .logo-env > div.logo img {
  display: block;
  width: 56px;
  height: auto;
}

/* The collapse / close buttons: theme draws them as dark-bordered chips. */
.page-container .sidebar-menu .logo-env > div.sidebar-collapse a,
.page-container .sidebar-menu .logo-env > div.sidebar-mobile-menu a {
  border: 1px solid var(--juli-grey-light);
  color: var(--juli-grey-dark);
  background: var(--juli-white);
}

.page-container .sidebar-menu .logo-env > div.sidebar-collapse a:hover,
.page-container .sidebar-menu .logo-env > div.sidebar-mobile-menu a:hover {
  background-color: var(--juli-grey-light);
  color: var(--juli-black);
}

/* Per-row hairlines are most of what dates the template. */
.page-container .sidebar-menu #main-menu li {
  border-bottom: 0;
  font-size: 15px;
}

.page-container .sidebar-menu #main-menu li a {
  color: var(--juli-grey-dark);
  font-size: 15px;
  padding: 11px 20px;
}

.page-container .sidebar-menu #main-menu li a:hover {
  background-color: rgba(0, 0, 0, 0.035);
  color: var(--juli-black);
}

/* Active row lifts out of the grey panel in white, with a coral edge. */
.page-container .sidebar-menu #main-menu li.active > a {
  background-color: var(--juli-white);
  color: var(--juli-black);
  font-weight: 500;
  box-shadow: inset 3px 0 0 var(--juli-coral);
}

.page-container .sidebar-menu #main-menu li a i {
  color: var(--juli-grey-dark);
}

.page-container .sidebar-menu #main-menu li.active > a i {
  color: var(--juli-coral);
}

.page-container .sidebar-menu #main-menu li ul {
  border-top: 0;
}

.page-container .sidebar-menu #main-menu li ul > li {
  border-bottom: 0;
}

.page-container .sidebar-menu #main-menu li ul > li > a {
  background-color: transparent;
  padding-left: 47px;
}

.page-container .sidebar-menu #main-menu li ul > li > a:hover {
  background-color: rgba(0, 0, 0, 0.035);
}

/* Collapsed rail: the theme turns each label into a hover flyout, drawn in
   its own charcoal. Restated as a light card. */
.page-container.sidebar-collapsed .sidebar-menu #main-menu > li > a > span:not(.badge) {
  left: 64px;
  background: var(--juli-white);
  border: 1px solid var(--juli-grey-light);
  color: var(--juli-black);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ------------------------------------------------------------- top bar -- */

/* The gutter the whole signed-in page sits in. It wraps the content column
   only — the sidebar is a separate table-cell and keeps its own edges. */
.page-container .main-content {
  background: var(--juli-white);
  padding: 32px 48px;
}

.page-container .main-content > hr {
  border-top-color: var(--juli-grey-light);
  margin: 16px 0 20px;
}

/* The theme floats these list items, so the monogram (38px tall) and the bell
   (a 19px glyph in a 20px line box) each land wherever their own box puts
   them, with nothing lining them up. Flex gives them a shared centre. */
.page-container .user-info {
  display: flex;
  align-items: center;
}

.page-container .user-info > li {
  float: none;
}

.page-container .user-info > li > a {
  display: flex;
  align-items: center;
  line-height: 1;
}

.page-container .user-info .profile-info > a {
  color: var(--juli-black);
}

/* The bell is a wayfinding icon, not a headline — it sits back in grey. */
.page-container .user-info .notifications > a,
.page-container .user-info .notifications > a i {
  color: var(--juli-grey-dark);
}

.page-container .user-info .notifications > a:hover i {
  color: var(--juli-black);
}

/* Initials stand in for the theme's stock photo. */
.page-container .user-info .user-monogram {
  display: inline-block;
  width: 38px;
  height: 38px;
  line-height: 38px;
  text-align: center;
  background: var(--juli-coral);
  color: var(--juli-white);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-right: 10px;
  vertical-align: middle;
}

/* Both top-bar dropdowns: light card, hung from the right edge. */
.page-container .user-info .dropdown-menu {
  right: 0;
  left: auto;
  width: 250px;
  min-width: 0;
  background: var(--juli-white);
  border: 1px solid var(--juli-grey-light);
  border-radius: var(--juli-radius-field);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  padding: 4px;
}

.page-container .user-info .dropdown-menu > li {
  border-bottom: 0;
}

.page-container .user-info .dropdown-menu > li > a {
  color: var(--juli-black);
  padding: 9px 12px;
  border-radius: 6px;
}

.page-container .user-info .dropdown-menu > li > a:hover {
  background: var(--juli-grey);
}

.page-container .user-info .notifications.dropdown.open > a {
  background-color: transparent;
}

.page-container .user-info .notifications .dropdown-menu .top p {
  color: var(--juli-grey-dark);
  background: transparent;
  margin: 0;
  padding: 10px 12px;
}

/* Search is present but inert until there is something to search. */
.page-container .search-form-full {
  max-width: 320px;
}

.page-container .search-form-full .form-group .form-control {
  margin-top: 0;
  background: var(--juli-white);
  border: 1px solid var(--juli-grey-mid);
  border-radius: var(--juli-radius-field);
  height: 38px;
  box-shadow: none;
  padding-right: 34px;
}

.page-container .search-form-full .form-group .form-control[disabled] {
  background: var(--juli-grey);
  border-color: var(--juli-grey-light);
  color: var(--juli-grey-dark);
  cursor: not-allowed;
  opacity: 1;
}

.page-container .search-form-full .form-group i {
  color: var(--juli-grey-dark);
}

.page-container .topbar-nav-toggle {
  display: inline-block;
  padding: 8px 10px;
  font-size: 20px;
  line-height: 1;
  color: var(--juli-grey-dark);
}

/* ------------------------------------------------------------- actions -- */

/* White label on the brand coral. Note this is 2.8:1, under the 4.5:1 WCAG AA
   bar — swapping the fill to --juli-coral-dark would take it to 4.5:1 and
   keep the label white, if that ever matters. Hover already sits there. */
.page-container .btn-primary {
  background-color: var(--juli-coral);
  border-color: var(--juli-coral);
  color: var(--juli-white);
  font-weight: 500;
  border-radius: var(--juli-radius-pill);
}

.page-container .btn-primary:hover,
.page-container .btn-primary:focus,
.page-container .btn-primary:active,
.page-container .btn-primary.active,
.page-container .open > .dropdown-toggle.btn-primary {
  background-color: var(--juli-coral-dark);
  border-color: var(--juli-coral-dark);
  color: var(--juli-white);
}

.page-container .btn-primary[disabled],
.page-container .btn-primary[disabled]:hover {
  background-color: var(--juli-coral);
  border-color: var(--juli-coral);
  color: var(--juli-white);
  opacity: 0.55;
}

/* --------------------------------------------------------- breadcrumb --- */

.page-container .breadcrumb {
  background: transparent;
  padding-left: 0;
}

.page-container footer.main {
  color: var(--juli-grey-dark);
  border-top: 1px solid var(--juli-grey-light);
  padding-top: 16px;
  margin-top: 32px;
}

/* -------------------------------------------------------- mobile drawer -- */

/* Inert on desktop; only .nav-open at phone widths reveals it. */
.nav-backdrop {
  display: none;
}

/* The theme's own phone rules are written as `.page-body .page-container ...`,
   so these have to match that specificity to land. Neon turns the sidebar into
   a full-width strip and sets #main-menu to display:none, expecting jQuery to
   drop it open — which is why the nav is currently unreachable on a phone. */
@media (max-width: 767px) {
  .page-body .page-container .sidebar-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 1050;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 250ms ease-in-out;
  }

  .page-body .page-container.nav-open .sidebar-menu {
    transform: translateX(0);
  }

  /* Put the menu back; the drawer is what hides it now. */
  .page-body .page-container .sidebar-menu #main-menu {
    display: block;
  }

  .page-body .page-container .sidebar-menu .logo-env {
    padding: 22px 18px;
  }

  /* Collapsing to a rail is meaningless once the sidebar is a drawer. */
  .page-body .page-container .sidebar-menu .logo-env > div.sidebar-collapse {
    display: none;
  }

  .page-body .page-container.nav-open .nav-backdrop {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    background: rgba(0, 0, 0, 0.35);
  }

  .page-body .page-container .main-content {
    padding: 16px;
  }
}

/* ============================================================ type scale === */
/*
 * This Neon build was customised down to a 12px base (Bootstrap 3 ships 14),
 * and Futura's modest x-height makes that read smaller still. Everything here
 * is a straight bump of the theme's own values — roughly +17% on the base,
 * with the rest brought along so nothing ends up out of proportion.
 *
 * Bootstrap 3 hardcodes px throughout, so raising the base alone would leave
 * buttons, fields and headings behind; each is restated. Anything that has no
 * size of its own (.table, .breadcrumb) simply follows the base.
 *
 * Scoped under .page-body, which every page in the app carries, so these beat
 * the theme's bare .btn / .form-control rules on specificity. The auth pages'
 * own field size is more specific still and is left alone.
 */

body.page-body {
  font-size: 14px;
}

.page-body h1,
.page-body .h1 {
  font-size: 34px;
}

.page-body h2,
.page-body .h2 {
  font-size: 28px;
}

.page-body h3,
.page-body .h3 {
  font-size: 24px;
}

.page-body h4,
.page-body .h4 {
  font-size: 18px;
}

.page-body h5,
.page-body .h5 {
  font-size: 15px;
}

.page-body h6,
.page-body .h6 {
  font-size: 13px;
}

/* 16px is the iOS Safari zoom-on-focus threshold, so form fields land there
   rather than at 15 — same reasoning as the auth pages. The theme pins
   .form-control to a 34px box, which 16px text no longer fits. */
.page-body .form-control {
  font-size: 16px;
  height: auto;
  min-height: 38px;
}

.page-body textarea.form-control {
  min-height: 0;
}

.page-body .btn {
  font-size: 14px;
}

.page-body .btn-lg {
  font-size: 16px;
}

.page-body .btn-sm {
  font-size: 13px;
}

.page-body .btn-xs {
  font-size: 12px;
}

.page-body .badge {
  font-size: 12px;
}

.page-body .dropdown-menu {
  font-size: 14px;
}

/* The theme pins this at 12px via `.panel > .panel-heading .panel-title`,
   so the selector has to be matched rather than just .panel-title. */
.page-body .panel-title,
.page-body .panel > .panel-heading .panel-title {
  font-size: 16px;
}

.page-body .panel > .panel-heading .panel-title h4 {
  font-size: 16px;
}

/* Field labels sat at the old base and now read light against 16px inputs. */
.page-body .form-group > label,
.page-body .control-label {
  font-size: 14px;
  color: var(--juli-grey-dark);
}

/* ============================================================ wizard step === */
/*
 * Two-column study step: what the step is for on the left, the form and its
 * actions on the right. Bootstrap's grid does the split (see StepLayout.tsx);
 * these carry type and spacing only.
 */

.page-container .wizard-step {
  margin-top: 8px;
}

.page-container .wizard-step-intro {
  padding-right: 40px;
}

/* No heading here on purpose (see StepLayout.tsx), and no lead paragraph
   either — every paragraph reads the same. */
.page-container .wizard-step-intro p {
  color: var(--juli-grey-dark);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 16px;
  max-width: 46ch;
}

.page-container .wizard-step-intro p:last-child {
  margin-bottom: 0;
}

/* The forms bring their own field markup; this only sets the rhythm they sit
   on and keeps the column from stretching to an unreadable width. */
.page-container .wizard-step-form {
  max-width: 620px;
}

@media (max-width: 991px) {
  .page-container .wizard-step-intro {
    padding-right: 0;
    margin-bottom: 28px;
  }
}

/* ========================================================= wizard progress === */
/*
 * The theme lays the step row out as a table of equal cells, but leaves the
 * width auto — so the cells grow to fit their labels, and once the labels are
 * wide enough the row pushes the page into horizontal scroll. (Raising the
 * type scale is what tipped it over.) table-layout: fixed pins each step to
 * 1/n of the width and lets long labels wrap instead.
 */
.page-container .form-wizard > ul {
  table-layout: fixed;
  width: 100%;
}

.page-container .form-wizard > ul > li a {
  white-space: normal;
}

/* The outer circles now sit hard against the ends of the track (see
   circleLeft in StepsBar), so their labels hug the same edge instead of
   centring on a cell midpoint they no longer sit on. */
.page-container .form-wizard > ul > li:first-child a {
  text-align: left;
}

.page-container .form-wizard > ul > li:last-child a {
  text-align: right;
}

/* Track and fill. The theme insets the track by a fixed 70px each side, which
   left the bar looking centred inside its column; it runs the full width now
   and StepsBar positions the fill to match. */
.page-container .form-wizard .steps-progress {
  background: var(--juli-grey-light);
  margin: 0;
}

.page-container .form-wizard .steps-progress .progress-indicator {
  background: var(--juli-grey-dark);
}

/* Still to come. */
.page-container .form-wizard > ul > li a {
  color: var(--juli-grey-dark);
}

.page-container .form-wizard > ul > li a span {
  background: var(--juli-grey-light);
  color: var(--juli-grey-dark);
  box-shadow: 0 0 0 5px var(--juli-grey-light);
}

/* Done — dark grey, matching the filled track behind it. White numerals sit
   at 5.0:1 on this grey. */
.page-container .form-wizard > ul > li.completed a {
  color: var(--juli-grey-dark);
}

.page-container .form-wizard > ul > li.completed a span {
  background: var(--juli-grey-dark);
  color: var(--juli-white);
  box-shadow: 0 0 0 5px var(--juli-grey-dark);
}

/* Where you are. The theme only gave this a white fill and a grey ring, which
   is why step 1 looked no different from the rest. */
.page-container .form-wizard > ul > li.active a,
.page-container .form-wizard > ul > li.current a {
  color: var(--juli-black);
}

.page-container .form-wizard > ul > li.active a span,
.page-container .form-wizard > ul > li.current a span {
  background: var(--juli-coral);
  color: var(--juli-white);
  box-shadow: 0 0 0 5px var(--juli-coral);
}

/* ======================================================== replaced controls === */
/*
 * checkbox-replace / radio-replace, whose color-primary is the theme's
 * charcoal. Resting borders sit in grey and only pick up coral once ticked,
 * so a long list of options doesn't read as already-answered.
 */
.page-body .checkbox-replace.color-primary .cb-wrapper,
.page-body .radio-replace.color-primary .cb-wrapper {
  border-color: var(--juli-grey-mid);
}

.page-body .checkbox-replace.color-primary.checked .cb-wrapper,
.page-body .radio-replace.color-primary.checked .cb-wrapper {
  border-color: var(--juli-coral);
}

.page-body .checkbox-replace.color-primary .cb-wrapper .checked,
.page-body .radio-replace.color-primary .cb-wrapper .checked {
  background: var(--juli-coral);
}

/* The option's own text; .cb-wrapper is the box itself. */
.page-body .neon-cb-replacement > label:not(.cb-wrapper) {
  color: var(--juli-black);
  font-weight: 400;
}

/* ==================================================== secondary actions === */
/*
 * .btn-default shipped as a pale grey that reads as disabled. Standalone
 * secondary actions — Back to home, Add another paragraph, Add schedule,
 * Cancel, Edit — take the palette's greyDark with a white label (5.0:1).
 *
 * Toolbars are put back to the theme's light treatment below: the rich-text
 * B/I/U row and the table's Copy / CSV / Print are the same .btn-default, but
 * inside .btn-group. Darkening those turns quiet editor chrome into a row of
 * heavy blocks. Table pagination is unaffected — it uses .paginate_button.
 */
.page-container .btn-default {
  background-color: var(--juli-grey-dark);
  border-color: var(--juli-grey-dark);
  color: var(--juli-white);
  font-weight: 500;
  border-radius: var(--juli-radius-pill);
}

.page-container .btn-default:hover,
.page-container .btn-default:focus,
.page-container .btn-default:active {
  background-color: var(--juli-black);
  border-color: var(--juli-black);
  color: var(--juli-white);
}

.page-container .btn-default[disabled],
.page-container .btn-default[disabled]:hover {
  background-color: var(--juli-grey-dark);
  border-color: var(--juli-grey-dark);
  color: var(--juli-white);
  opacity: 0.45;
}

/* Toolbar buttons keep the theme's light chrome. A plain descendant selector
   rather than :not(.btn-group .btn-default) — same result, and it doesn't
   lean on Selectors-4 complex :not(). */
.page-container .btn-group .btn-default,
.page-container .btn-group .btn-default:hover,
.page-container .btn-group .btn-default:focus,
.page-container .btn-group .btn-default:active {
  background-color: #f5f5f6;
  border-color: #e4e4e4;
  color: var(--juli-grey-dark);
  font-weight: 400;
  border-radius: 3px;
}

.page-container .btn-group .btn-default:hover {
  background-color: var(--juli-grey-light);
  color: var(--juli-black);
}

/* ========================================================= status chips === */
/*
 * The theme draws .label as a filled, padded, rounded box — which reads as a
 * button. A coloured dot plus plain text says "state", not "action".
 */
.page-container .label {
  display: inline-block;
  padding: 0;
  background: none;
  border-radius: 0;
  color: var(--juli-grey-dark);
  font-size: 13px;
  font-weight: 500;
  vertical-align: middle;
  text-shadow: none;
}

.page-container .label:before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--juli-grey-mid);
  margin-right: 7px;
  vertical-align: middle;
}

.page-container .label-success:before {
  background: var(--juli-mint);
}

.page-container .label-info:before {
  background: #969bde; /* ColorPalette.purple */
}

.page-container .label-warning:before {
  background: #ffdc81; /* ColorPalette.yellow */
}

.page-container .label-danger:before {
  background: var(--juli-red);
}

/* =========================================================== form hints === */

/* Field hints were mid-grey and hard to read next to the inputs they explain. */
.page-container .help-block {
  color: var(--juli-black);
}
