/* Shared RiffBright/FretBright styles. Plain CSS; no utility generator.
   Fonts are loaded by each site. Keep common components and responsive layouts here. */

:root {
  color-scheme: dark;
  --font-body: "Lato", sans-serif;
  --font-heading: "Patua One", Georgia, serif;

  --color-rb-primary: #00a8e8;
  --color-rb-primary-soft: #4fc7f2;
  --color-rb-primary-bright: #78d6f7;
  --color-rb-red: #ff1640;
  --color-rb-purple: #bb43ff;
  --color-rb-orange: #ff6a16;
  --color-rb-green: #8dbe1d;
  --color-rb-gray: #cccccc;
  --color-rb-sand: #c7ac92;
  --color-rb-navy: #283965;
  --color-rb-dark: #212121;
  --color-rb-black: #010101;
  --color-rb-panel: #050b0f;
  --color-rb-text: #ffffff;
  --color-rb-muted: #adb5bd;
  --color-rb-error: #ff6b6b;
  --color-rb-success: var(--color-rb-green);

  --rb-surface: rgb(255 255 255 / 4%);
  --rb-border: rgb(255 255 255 / 16%);
  --rb-radius: 0.75rem;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-rb-text);
  background: var(--color-rb-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-rb-text);
}

p, label {
  color: var(--color-rb-muted);
}

strong, b {
  font-weight: 700;
}

a {
  color: var(--color-rb-primary-bright);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-rb-text);
}

:focus-visible {
  outline: 2px solid var(--color-rb-primary-bright);
  outline-offset: 3px;
}

button, input, select, textarea {
  font: inherit;
}

/* Text controls only: preserve native checkboxes, radios, sliders and buttons. */
:where(input:not([type]), input[type="text"], input[type="email"],
  input[type="password"], input[type="search"], input[type="tel"],
  input[type="url"], input[type="number"], input[type="date"],
  input[type="datetime-local"], input[type="time"], select, textarea) {
  max-width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  color: var(--color-rb-text);
  background: var(--color-rb-dark);
}

/* Keep native date calendars light, with unavailable dates visibly shaded. */
input[type="date"] {
  color-scheme: light;
}

input::placeholder, textarea::placeholder {
  color: var(--color-rb-muted);
  opacity: 1;
}

input, select, textarea {
  accent-color: var(--color-rb-primary);
}

[aria-invalid="true"] {
  border-color: var(--color-rb-error);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  color: var(--color-rb-black);
  background: var(--color-rb-primary);
  cursor: pointer;
}

.btn:hover {
  color: var(--color-rb-black);
  background: var(--color-rb-primary-bright);
}

.btn-outline {
  border-color: var(--rb-border);
  color: var(--color-rb-text);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--color-rb-primary-bright);
  color: var(--color-rb-primary-bright);
  background: transparent;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  border-color: var(--rb-border);
  color: var(--color-rb-muted);
  background: var(--rb-surface);
  cursor: not-allowed;
}

/* aria-disabled communicates state; callers must also prevent activation. */
.card { padding: 1.5rem; }
.card, .panel, .comparison-panel {
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  background: var(--rb-surface);
}

/* Apply to the highlighted word within the brand name or heading. */
.brand-accent {
  color: var(--color-rb-primary);
}

/* Light sections retain the live site's blue palette without a second stylesheet. */
.brand-light, .brand-white {
  color-scheme: light;
  --color-rb-text: #111827;
  --color-rb-muted: #4b5563;
  --color-rb-primary-bright: #0369a1;
  --rb-surface: rgb(255 255 255 / 35%);
  --rb-border: rgb(209 213 219 / 70%);
  color: var(--color-rb-text);
  background: var(--panel-background, #cce8f5);
}
.brand-white { --panel-background: #fff; }
.brand-light .brand-accent { color: var(--color-rb-primary-bright); }

/* Hero supporting typography follows riffbright.com; H1 is configured separately. */
.hero-description, .hero-detail {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: rgb(255 255 255 / 86%);
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 900;
  color: var(--color-rb-primary);
}
.hero-caption {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 900;
  color: rgb(255 255 255 / 78%);
}
.hero-copy > .btn { font-family: var(--font-body); font-size: 1rem; font-weight: 900; }
.hero-note > svg { color: var(--color-rb-primary); }
.hero-detail { max-width: 25rem; font-size: 0.875rem; line-height: 1.375; }

/* Optional featured-media treatment. Works with images and videos.
   Use media-frame alone for a plain frame; add media-backdrop to its wrapper.
   Override --media-accent and --media-backdrop-opacity on the wrapper as needed. */
.media-backdrop {
  --media-accent: var(--color-rb-red);
  position: relative;
  isolation: isolate;
}
.media-backdrop::before {
  content: "";
  pointer-events: none;

    position: absolute;
    inset: -8% -18%;
    z-index: 0;
    border-radius: 2.25rem;
    background:
      radial-gradient(circle at 15% 18%, rgb(from var(--media-accent) r g b / 0.8) 0 1.45rem, transparent 1.6rem),
      radial-gradient(circle at 21% 28%, rgb(from var(--media-accent) r g b / 0.5) 0 0.55rem, transparent 0.68rem),
      radial-gradient(circle at 11% 38%, rgb(from var(--media-accent) r g b / 0.42) 0 0.72rem, transparent 0.86rem),
      radial-gradient(circle at 88% 18%, rgb(from var(--media-accent) r g b / 0.62) 0 1.25rem, transparent 1.42rem),
      radial-gradient(circle at 81% 28%, rgb(from var(--media-accent) r g b / 0.38) 0 0.58rem, transparent 0.72rem),
      radial-gradient(circle at 18% 82%, rgb(from var(--media-accent) r g b / 0.52) 0 1.15rem, transparent 1.32rem),
      radial-gradient(circle at 28% 88%, rgb(from var(--media-accent) r g b / 0.34) 0 0.48rem, transparent 0.62rem),
      radial-gradient(circle at 83% 82%, rgb(from var(--media-accent) r g b / 0.48) 0 1.45rem, transparent 1.62rem),
      radial-gradient(circle at 72% 88%, rgb(from var(--media-accent) r g b / 0.34) 0 0.65rem, transparent 0.8rem),
      conic-gradient(from 32deg at 50% 52%, transparent 0 11%, rgb(from var(--media-accent) r g b / 0.3) 12% 15%, transparent 16% 39%, rgb(from var(--media-accent) r g b / 0.24) 40% 43%, transparent 44% 70%, rgb(from var(--media-accent) r g b / 0.26) 71% 74%, transparent 75% 100%);
    filter: blur(0.35px) drop-shadow(0 0 20px rgb(from var(--media-accent) r g b / 0.45));
    mask-image: radial-gradient(ellipse at center, black 0 42%, rgba(0, 0, 0, 0.86) 58%, transparent 82%);
    opacity: var(--media-backdrop-opacity, 0.72);
}
.media-frame {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid rgb(from var(--media-accent, var(--color-rb-red)) r g b / 24%);
  box-shadow: 0 0 48px rgb(from var(--media-accent, var(--color-rb-red)) r g b / 24%);
}
.media-frame > :is(img, video) { display: block; width: 100%; }

/* Reserve the portrait frame before media loads; poster and playback share it. */
.media-frame--portrait {
  aspect-ratio: 9 / 16;
  width: min(100%, 23rem);
  max-height: min(62svh, 38rem);
  margin-inline: auto;
  background: #02070b;
}
.media-frame--portrait > :is(img, video) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 47.999rem) {
  .media-frame--portrait { width: min(100%, 18rem); max-height: 46svh; }
}

/* Featured sections use near-black, distinct from the charcoal header. */
.panel-dark { background: var(--color-rb-panel); }

/* Comparison panels and availability badges follow the live site. */
.comparison-panel {
  overflow: hidden;
  background: rgb(from var(--color-rb-panel) r g b / 80%);
}
.comparison thead, .comparison-mobile h2 {
  background: rgb(from var(--color-rb-primary) r g b / 10%);
}
.comparison th { font-family: var(--font-body); font-size: 0.875rem; font-weight: 900; text-transform: uppercase; }
.comparison th:first-child { width: 42%; }
.comparison td { color: rgb(255 255 255 / 82%); }
.badge-alert {
  display: block;
  width: fit-content;
  margin: 0.5rem auto 0;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgb(from var(--color-rb-red) r g b / 45%);
  border-radius: 999px;
  color: var(--color-rb-red);
  font: 900 0.75rem/1 var(--font-body);
  text-transform: uppercase;
}
.comparison-mobile .badge-alert { margin-inline: 0; }

/* Shared component layouts and responsive behavior. */
.grid { display: grid; gap: 1.5rem; }
/* Shared layout, form, navigation and page components. */

html { scroll-behavior: smooth; }
[hidden], .hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
img, video { display: block; max-width: 100%; height: auto; }
svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
button { cursor: pointer; }
section[id] { scroll-margin-top: 7rem; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }
h1, h2, h3, p { margin: 0 0 1rem; }
hr { border: 0; border-top: 1px solid var(--rb-border); margin: 2rem 0; }

/* Common section containers. */
.page, .section { padding: 4rem 1.5rem; }
.page > article, .page > section, .section > div, .site-footer > div {
  max-width: 72rem;
  margin-inline: auto;
}
.section-heading { text-align: center; margin-bottom: 2rem; }
.section-heading > p:first-child { color: var(--color-rb-primary); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem; }

/* Navigation. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 1.5rem;
  background: var(--color-rb-dark);
  border-bottom: 1px solid var(--rb-border);
}
.site-header > div:first-child, .site-header > div > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.site-header > div > a { text-decoration: none; }
.site-header img { width: auto; height: 3rem; }
.site-header > div > a > div { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--font-heading);
  color: var(--color-rb-text);
  font-size: 1.125rem;
}
.site-header sup { margin-left: 0.25rem; font: 700 0.65rem var(--font-body); }
.brand-tagline { font-size: 0.75rem; color: var(--color-rb-muted); }
.site-header ul { list-style: none; padding: 0; margin: 0; }
.desktop-nav { display: none; }
.nav-link { display: block; padding: 0.75rem; font-size: 0.875rem; font-weight: 700; text-decoration: none; }
.nav-link[data-nav-active="true"] { color: var(--color-rb-primary); }
[data-mobile-menu-button] { border: 0; background: transparent; color: var(--color-rb-text); }
.mobile-nav { margin-top: 1rem; border-top: 1px solid var(--rb-border); }

/* Hero and benefits. */
.hero {
  background:
    linear-gradient(180deg, rgb(0 0 0 / 8%) 0%, rgb(0 0 0 / 30%) 64%, rgb(0 0 0 / 72%) 100%),
    radial-gradient(circle at 80% 16%, rgb(0 168 232 / 22%), transparent 30%),
    linear-gradient(135deg, #05080c 0%, #071018 48%, #020305 100%);
  background-color: #02070b; overflow: hidden; }
.split-layout { display: grid; align-items: center; gap: 2rem; }
.hero h1 > span:last-child { display: block; }
.hero h1 {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 2.45rem;
  line-height: 0.98;
  letter-spacing: normal;
  text-transform: none; max-width: 26rem; }
.hero-copy > p { max-width: 34rem; }
.hero-note { display: flex; align-items: start; gap: 0.75rem; margin-top: 1.5rem; }
.hero-note p { margin-bottom: 0.5rem; }
.icon-line { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.hero-media { order: -1; }
.benefits { border-top: 1px solid var(--rb-border); margin-top: 3rem; padding-top: 2rem; }
.benefits > div > div { display: flex; gap: 1rem; }
.benefits svg { width: 2.5rem; height: 2.5rem; color: var(--color-rb-primary); }
.benefits h2 { font: 700 1.125rem var(--font-body); }

/* Signup; scripts continue to toggle the shared hidden state. */
.signup { border-block: 1px solid var(--rb-border); }
.signup > div { max-width: 56rem; }
.form-grid > div > div { margin-bottom: 1rem; }
.form-field { display: flex; align-items: stretch; }
.form-field > span { display: flex; align-items: center; padding-right: 0.75rem; }
.form-field input { width: 100%; min-width: 0; }
.form-label { display: block; margin-bottom: 0.5rem; }
.form-control { width: 100%; }
.form-consent { display: flex; align-items: start; gap: 0.75rem; }
.form-consent input { margin-top: 0.25rem; flex-shrink: 0; }
.section-description { text-align: center; margin-top: 2rem; }
.form-status { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; margin-bottom: 1.5rem; border: 1px solid; border-radius: var(--rb-radius); }
.form-status.success { color: var(--color-rb-success); }
.form-status.error { color: var(--color-rb-error); }
.spinner { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Image/text layouts, prose, closing copy and reusable accordions. */
.split-layout--sidebar { align-items: start; }
.split-layout--sidebar img { width: 12rem; margin-inline: auto; }
.prose-accent strong { color: var(--color-rb-primary-bright); }
.section-closing { max-width: 42rem; margin: 3rem auto 0; text-align: center; }
.accordion-section { padding-block: 5rem; }
.accordion-section > div { max-width: 64rem; }
.accordion-section h2 { margin-bottom: 0.5rem; }
.accordion-section > div > p { text-align: center; font-size: 1.125rem; font-style: italic; margin-bottom: 2.5rem; }
.accordion-section hr { margin: 0 0 3rem; }
.accordion { max-width: 48rem; margin: 0 auto 3rem; display: grid; gap: 1rem; }
.accordion-item { padding: 1rem; border: 1px solid var(--rb-border); border-radius: 0.5rem; background: var(--rb-surface); box-shadow: 0 1px 2px rgb(0 0 0 / 5%); }
.accordion-item[open] { background: rgb(255 255 255 / 60%); }
.accordion-item summary { display: flex; gap: 1rem; cursor: pointer; list-style: none; }
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary > span:first-child { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 2rem; height: 2rem; margin-top: 0.125rem; border-radius: 50%; background: var(--color-rb-primary); color: var(--color-rb-dark); font-size: 0.875rem; font-weight: 700; }
.accordion-item summary > span:last-child { display: flex; flex: 1; min-width: 0; align-items: start; justify-content: space-between; gap: 0.75rem; font-size: 1.125rem; font-weight: 700; line-height: 1.375; }
.accordion-chevron { flex-shrink: 0; margin-top: 0.25rem; color: var(--color-rb-primary-bright); }
.accordion-item[open] .accordion-chevron { transform: rotate(180deg); }
.accordion-answer { margin: 0.75rem 0 0 3rem; color: var(--color-rb-muted); font-size: 0.875rem; line-height: 1.625; }
.accordion-answer p { margin-bottom: 0.75rem; }
.accordion-answer p:last-child { margin-bottom: 0; }
.accordion-answer a { font-weight: 700; }

/* Team portraits retain their content, without individual palettes or effects. */
.profile-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.quote { font-style: italic; }
.quote-mark, .member-name, .team-title span { color: var(--color-rb-primary-bright); }
.portrait-wrap { width: 12rem; height: 12rem; margin: 1rem 0; }
.portrait-image { width: 100%; height: 100%; object-fit: contain; }
.profile-card > div:last-child { margin-top: auto; }

/* Journey stages and video. */
.journey-path__media { display: grid; gap: 0.75rem; }
.journey-path__media--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.journey-path__media img { width: 100%; max-height: 32rem; object-fit: contain; border-radius: var(--rb-radius); }
.journey-path__media-fallback { padding: 2rem; background: var(--rb-surface); }
.journey-path__eyebrow, .journey-path__count { color: var(--color-rb-primary-bright); font-weight: 700; }
.journey-path__controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.journey-path__indicator { margin: 0; }
.journey-path__button[data-journey-final-cta="true"] { background: var(--color-rb-primary); color: var(--color-rb-black); }
.media-player { max-width: 24rem; margin-inline: auto; }
.media-play { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--color-rb-black); color: var(--color-rb-text); }
.media-player img, .media-player video { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; }
.media-play > span { position: absolute; inset: 0; display: grid; place-items: center; }
.media-play > span > span { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--color-rb-primary); color: var(--color-rb-black); }
.desktop-video-link { display: none; }

/* Reference, comparison, legal and error pages. */
.page > article > section { margin-top: 3rem; }
.panel { overflow: hidden; }
.reference-grid > div > div:last-child, .logo-reference > div { padding: 1.5rem; }
.reference-grid [style*="background-color"] { min-height: 5rem; }
.logo-reference img { width: 15rem; margin-inline: auto; }
.brand-guide code { overflow-wrap: anywhere; }
.comparison-table { display: none; margin-top: 2rem; }
.comparison table { width: 100%; border-collapse: collapse; }
.comparison th, .comparison td { padding: 1rem; text-align: center; border-bottom: 1px solid var(--rb-border); }
.comparison th:first-child, .comparison td:first-child { text-align: left; }
.comparison-mobile > section { margin-top: 1.5rem; padding: 1rem; }
.comparison-mobile > section > div > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.75rem; border-top: 1px solid var(--rb-border); }
.comparison [aria-label="Included"] { color: var(--color-rb-primary-bright); font-size: 1.5rem; }
.legal-page > section { max-width: 56rem; }
.prose { color: var(--color-rb-muted); font-size: 1.125rem; line-height: 1.8; }
.legal-icon { display: inline-flex; vertical-align: middle; margin-right: 0.35em; }
.centered-page { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.centered-page img { width: 8rem; margin: 0 auto 2rem; }

/* Shared footer: original compact, muted treatment. */
.site-footer {
  --color-rb-text: rgb(255 255 255 / 70%);
  --color-rb-muted: var(--color-rb-text);
  --rb-border: rgb(255 255 255 / 10%);
  padding: 3rem 1.5rem 1.5rem;
  color: var(--color-rb-text);
  background: #2a2a2a;
}
.site-footer > div { max-width: 64rem; }
.footer-columns { gap: 2.5rem; }
.site-footer h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font: 700 0.875rem/1.25rem var(--font-heading);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.site-footer h4 svg { width: 1rem; height: 1rem; }
.site-footer p { font-size: 0.875rem; line-height: 1.5rem; margin-bottom: 1.5rem; }
.site-footer nav, .social-links { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.site-footer nav { row-gap: 0.25rem; font-size: 0.75rem; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover, .site-footer a[aria-current="page"] { color: var(--color-rb-primary-soft); }
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--rb-border);
  border-radius: 50%;
}
.social-links a:hover { border-color: rgb(from var(--color-rb-primary-soft) r g b / 40%); }
.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--rb-border);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}
.footer-bottom > div { margin-top: 0.5rem; font-size: 0.6875rem; }
@media (max-width: 24rem) {
  .site-header { padding-inline: 0.75rem; }
  .brand-tagline { max-width: 11rem; }
  .journey-path__controls { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation: none; }
}
.centered-page--full { min-height: 100vh; text-align: initial; }
.centered-page--full form { width: min(100%, 28rem); }
.centered-page--full label { display: grid; gap: 0.5rem; margin-block: 1.5rem; }
@media (min-width: 40rem) { .hero h1 { font-size: 2.6rem; } }

@media (min-width: 48rem) {
  .footer-columns > :nth-child(2) { text-align: center; }
  .footer-columns > :nth-child(2) h4, .footer-columns .social-links { justify-content: center; }
  .footer-columns > :nth-child(3) { text-align: right; }
  .footer-columns > :nth-child(3) h4 { justify-content: flex-end; }
  .hero-description { font-size: 1.125rem; }
  .hero-eyebrow, .hero-detail { font-size: 1rem; }
  .hero-caption { font-size: 0.875rem; } .hero h1 { font-size: 2.9rem; }
  .desktop-nav { display: flex; }
  [data-mobile-menu-button], .mobile-nav { display: none; }
  .split-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-media { order: 0; }
  .grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--two, .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-layout--sidebar { grid-template-columns: 12rem 1fr; }
  .comparison-table { display: block; }
  .comparison-mobile, .mobile-video-link { display: none; }
  .desktop-video-link { display: inline-flex; }
  .media-player { max-width: 64rem; }
  .media-player img, .media-player video { aspect-ratio: 16 / 9; }
}
@media (min-width: 64rem) {
  .hero-description { font-size: 1.25rem; line-height: 1.625; }
  .hero-eyebrow, .hero-detail { font-size: 1.125rem; } .hero h1 { font-size: 3.1rem; } }
@media (min-width: 75rem) {
  .card-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 80rem) { .hero h1 { font-size: 3.55rem; } }

/* Dashboard navigation. */
.dashboard-shell.split-layout--sidebar {
  gap: 0;
}
.dashboard-sidebar,
.dashboard-menu-dialog {
  background: var(--color-rb-panel);
  border-inline-end: 1px solid var(--rb-border);
}
.dashboard-sidebar .site-header > div,
.dashboard-menu-dialog .site-header > div,
.dashboard-toolbar > div {
  min-height: 2.5rem;
  justify-content: flex-start;
  gap: 0.5rem;
}
.dashboard-sidebar .site-header,
.dashboard-menu-dialog .site-header {
  padding-inline: 0.75rem;
}
.dashboard-sidebar .brand-name,
.dashboard-menu-dialog .brand-name {
  margin-inline-end: auto;
}
.dashboard-shell .site-header svg { width: 2rem; height: 2rem; }
.dashboard-shell .dashboard-menu-button {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: var(--rb-radius);
}
.dashboard-toolbar nav[aria-label="Current location"] {
  min-width: 0;
  overflow-wrap: anywhere;
}
.dashboard-account {
  position: relative;
  flex: 0 0 auto;
  margin-inline-start: auto;
}
.dashboard-account .dashboard-account-avatar { border-radius: 50%; }
.dashboard-account-actions {
  position: absolute;
  inset-block-start: calc(100% + 0.5rem);
  inset-inline-end: 0;
  width: min(17rem, calc(100vw - 3rem));
  padding: 0.75rem;
  overflow-wrap: anywhere;
  background: var(--color-rb-panel);
}
.dashboard-account-identity {
  padding: 0.5rem 0.75rem;
  border-block-end: 1px solid var(--rb-border);
}
.dashboard-account-identity p { margin: 0; font-size: 0.875rem; }
.dashboard-account-actions > .btn { width: 100%; margin-block-start: 0.5rem; }
.dashboard-menu-dialog {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(19rem, 100%);
  max-width: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border-block: 0;
  border-inline-start: 0;
  color: var(--color-rb-text);
  overflow: auto;
  overscroll-behavior: contain;
}
.dashboard-menu-dialog::backdrop {
  background: rgb(from var(--color-rb-black) r g b / 55%);
}
@media (min-width: 48rem) {
  .dashboard-shell.split-layout--sidebar {
    grid-template-columns: 16rem minmax(0, 1fr);
  }
  .dashboard-sidebar {
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow-y: auto;
  }
}

/* ==========================================================================
   Keycloak login — PatternFly 5
   Scoped to PatternFly login markup and Keycloak IDs; site rules above stay intact.
   Load after PatternFly. The importing theme must load Lato and Patua One fonts.
   ========================================================================== */
.pf-v5-c-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  font-family: var(--font-body);
  color: var(--color-rb-text);
  background: var(--color-rb-dark);
}
.pf-v5-c-login__container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  width: min(100%, 68.75rem);
  min-width: 0;
}
.pf-v5-c-login__main {
  flex: 0 1 28rem;
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  background: var(--color-rb-panel);
  color: var(--color-rb-text);
}
.pf-v5-c-login .pf-v5-c-card,
.pf-v5-c-login__main-body {
  border-radius: var(--rb-radius);
  background: var(--color-rb-panel);
  color: var(--color-rb-text);
}
.pf-v5-c-login__main-header,
.pf-v5-c-login__main-body,
.pf-v5-c-login__main-footer {
  padding: 1.5rem 2rem;
}
.pf-v5-c-login__main-header { text-align: center; }
.pf-v5-c-login .pf-v5-c-title,
#kc-page-title {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  color: var(--color-rb-text);
}
.pf-v5-c-login .pf-v5-c-form__label,
.pf-v5-c-login .pf-v5-c-form__label-text,
.pf-v5-c-login .pf-v5-c-check__label,
.pf-v5-c-login__main-header p {
  font-family: var(--font-body);
  color: var(--color-rb-text);
}
.pf-v5-c-login .pf-v5-c-form__label-required { color: var(--color-rb-error); }

/* PF5 can put form-control on the input itself or on a wrapping span. */
.pf-v5-c-login .pf-v5-c-form-control {
  min-width: 0;
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  background: var(--color-rb-dark);
  color: var(--color-rb-text);
}
.pf-v5-c-login .pf-v5-c-form-control::before,
.pf-v5-c-login .pf-v5-c-form-control::after {
  border: 0;
  background: none;
}
.pf-v5-c-login :is(input.pf-v5-c-form-control, textarea.pf-v5-c-form-control, select.pf-v5-c-form-control),
.pf-v5-c-login .pf-v5-c-form-control > :is(input, textarea, select) {
  width: 100%;
  min-width: 0;
  padding: 0.75rem 1rem;
  border-radius: var(--rb-radius);
  font-family: var(--font-body);
  color: var(--color-rb-text);
  background: var(--color-rb-dark);
  caret-color: var(--color-rb-primary);
}
.pf-v5-c-login .pf-v5-c-form-control > :is(input, textarea, select) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.pf-v5-c-login .pf-v5-c-form-control:not(input):not(textarea):not(select) { overflow: hidden; }
.pf-v5-c-login .pf-v5-c-form-control::placeholder,
.pf-v5-c-login .pf-v5-c-form-control input::placeholder,
.pf-v5-c-login .pf-v5-c-form-control textarea::placeholder { color: var(--color-rb-muted); opacity: 1; }
.pf-v5-c-login .pf-v5-c-form-control:focus-within {
  border-color: var(--color-rb-primary-bright);
  outline: 2px solid var(--color-rb-primary-bright);
  outline-offset: 2px;
}
.pf-v5-c-login .pf-v5-c-form-control.pf-m-error,
.pf-v5-c-login .pf-v5-c-form-control[aria-invalid="true"],
.pf-v5-c-login .pf-v5-c-form-control:has([aria-invalid="true"]) {
  border-color: var(--color-rb-error);
}
.pf-v5-c-login .pf-v5-c-form-control.pf-m-success { border-color: var(--color-rb-success); }
.pf-v5-c-login input:autofill {
  color: var(--color-rb-text);
  background: var(--color-rb-dark);
}
.pf-v5-c-login input:-webkit-autofill {
  -webkit-text-fill-color: var(--color-rb-text);
  caret-color: var(--color-rb-primary);
  box-shadow: inset 0 0 0 1000px var(--color-rb-dark);
}
.pf-v5-c-login .pf-v5-c-form-control:disabled,
.pf-v5-c-login .pf-v5-c-form-control.pf-m-disabled {
  color: var(--color-rb-muted);
  opacity: 0.65;
}

.pf-v5-c-login .pf-v5-c-button,
#kc-login {
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--rb-border);
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}
.pf-v5-c-login .pf-v5-c-button::after { border: 0; }
.pf-v5-c-login .pf-v5-c-button.pf-m-primary,
#kc-login {
  border-color: transparent;
  color: var(--color-rb-black);
  background: var(--color-rb-primary);
}
.pf-v5-c-login .pf-v5-c-button.pf-m-primary:hover,
#kc-login:hover { background: var(--color-rb-primary-bright); }
.pf-v5-c-login .pf-v5-c-button.pf-m-secondary,
.pf-v5-c-login .pf-v5-c-button.pf-m-control,
#kc-social-providers .pf-v5-c-button {
  border-color: var(--rb-border);
  background: transparent;
  color: var(--color-rb-text);
}
.pf-v5-c-login .pf-v5-c-button.pf-m-secondary:hover,
.pf-v5-c-login .pf-v5-c-button.pf-m-control:hover,
#kc-social-providers .pf-v5-c-button:hover {
  border-color: var(--color-rb-primary-bright);
  color: var(--color-rb-primary-bright);
}
.pf-v5-c-login .pf-v5-c-button:disabled,
.pf-v5-c-login .pf-v5-c-button[aria-disabled="true"],
#kc-login:disabled {
  color: var(--color-rb-muted);
  border-color: var(--rb-border);
  background: var(--rb-surface);
  cursor: not-allowed;
}
.pf-v5-c-login a,
.pf-v5-c-login .pf-v5-c-button.pf-m-link,
#kc-info-wrapper a { color: var(--color-rb-primary-bright); }
.pf-v5-c-login a:hover,
.pf-v5-c-login .pf-v5-c-button.pf-m-link:hover,
#kc-info-wrapper a:hover { color: var(--color-rb-text); }
.pf-v5-c-login :is(a, button, input, select, textarea):focus-visible,
#kc-login:focus-visible {
  outline: 2px solid var(--color-rb-primary-bright);
  outline-offset: 3px;
}
#kc-social-providers .pf-v5-c-button { width: 100%; white-space: normal; }

.pf-v5-c-login .pf-v5-c-alert {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  background: var(--rb-surface);
  color: var(--color-rb-text);
  overflow-wrap: anywhere;
}
.pf-v5-c-login .pf-v5-c-alert.pf-m-danger { border-color: var(--color-rb-error); }
.pf-v5-c-login .pf-v5-c-alert.pf-m-success { border-color: var(--color-rb-success); }
.pf-v5-c-login .pf-v5-c-alert.pf-m-warning { border-color: var(--color-rb-orange); }
.pf-v5-c-login .pf-v5-c-alert.pf-m-info { border-color: var(--color-rb-primary); }
.pf-v5-c-login .pf-v5-c-alert__title { color: inherit; }
.pf-v5-c-login .pf-v5-c-alert.pf-m-danger .pf-v5-c-alert__icon,
.pf-v5-c-login .pf-v5-c-helper-text__item.pf-m-error,
#kc-error-message,
#kc-error-message p,
#kc-input-error { color: var(--color-rb-error); }
.pf-v5-c-login .pf-v5-c-alert.pf-m-success .pf-v5-c-alert__icon { color: var(--color-rb-success); }
.pf-v5-c-login .pf-v5-c-alert.pf-m-warning .pf-v5-c-alert__icon { color: var(--color-rb-orange); }
.pf-v5-c-login .pf-v5-c-alert.pf-m-info .pf-v5-c-alert__icon { color: var(--color-rb-primary); }
.pf-v5-c-login__main-footer-band,
.pf-v5-c-login__footer,
#kc-info-wrapper {
  background: transparent;
  color: var(--color-rb-muted);
  text-align: center;
}
.pf-v5-c-login__main-footer-band { padding: 1.5rem; border-top: 1px solid var(--rb-border); }
#kc-info-wrapper { margin-top: 1.25rem; }
.pf-v5-c-login__background {
  flex: 1 1 26rem;
  min-width: 0;
  padding: 2.5rem;
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  color: var(--color-rb-text);
  background: var(--rb-surface);
}
#kc-header {
  color: var(--color-rb-text);
  font-family: var(--font-heading);
  text-align: center;
  margin: 0;
  flex: 0 1 16rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
}
/* Use Keycloak's configured display name as the header identity. */
#kc-header-wrapper {
  display: block;
  padding: 0;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  color: var(--color-rb-text);
}
#kc-page-title::after,
#kc-header::before,
#kc-header::after { content: none; display: none; }

/* Neutralize the original theme's page glow and translucent card treatment. */
body:has(.pf-v5-c-login) {
  background: var(--color-rb-dark);
  color: var(--color-rb-text);
  font-family: var(--font-body);
}
.pf-v5-c-login::before,
.pf-v5-c-login::after { content: none; display: none; }
.pf-v5-c-login .pf-v5-c-card.pf-v5-c-login__main-body {
  background: var(--color-rb-panel);
  border: 0;
  border-radius: var(--rb-radius);
  backdrop-filter: none;
}
.pf-v5-c-login__main { box-shadow: none; }
.pf-v5-c-login .pf-v5-c-form-control,
.pf-v5-c-login .pf-v5-c-form-control input {
  -webkit-text-fill-color: var(--color-rb-text);
}

/* One outline and surface around the entire password input group, including
   the visibility toggle. Child wrappers and inputs supply no second outline. */
.pf-v5-c-login .pf-v5-c-input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  background: var(--color-rb-dark);
}
.pf-v5-c-login .pf-v5-c-input-group__item { min-width: 0; }
.pf-v5-c-login .pf-v5-c-input-group__item.pf-m-fill { flex: 1; }
.pf-v5-c-login .pf-v5-c-input-group .pf-v5-c-form-control {
  flex: 1;
  width: 100%;
  border: 0;
  border-radius: 0;
  outline: none;
  box-shadow: none;
}
.pf-v5-c-login .pf-v5-c-input-group .pf-v5-c-button {
  height: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  border-inline-start: 1px solid var(--rb-border);
  border-radius: 0;
  background: var(--color-rb-dark);
  color: var(--color-rb-text);
  box-shadow: none;
}
.pf-v5-c-login .pf-v5-c-input-group .pf-v5-c-button:hover {
  color: var(--color-rb-primary-bright);
}
.pf-v5-c-login .pf-v5-c-input-group:focus-within {
  border-color: var(--color-rb-primary-bright);
  outline: 2px solid var(--color-rb-primary-bright);
  outline-offset: 2px;
}
.pf-v5-c-login .pf-v5-c-input-group:has(:is([aria-invalid="true"], .pf-m-error)) {
  border-color: var(--color-rb-error);
}
.pf-v5-c-login .pf-v5-c-form-control > :is(input, textarea, select):focus-visible {
  outline: none;
}
.pf-v5-c-login .pf-v5-c-input-group .pf-v5-c-button:focus-visible {
  outline-offset: -4px;
}
@media (max-width: 64rem) {
  .pf-v5-c-login { padding: 1.5rem; align-items: flex-start; }
  .pf-v5-c-login__container { gap: 1.5rem; }
  .pf-v5-c-login__background { display: none; }
}
@media (max-width: 48rem) {
  .pf-v5-c-login { padding: 0.75rem; }
  .pf-v5-c-login__container { flex-direction: column; gap: 1.5rem; }
  #kc-header { flex: none; margin: 1rem auto 0; }
  .pf-v5-c-login__main { flex-basis: auto; max-width: 28rem; margin: 1rem auto; }
  .pf-v5-c-login__main-header,
  .pf-v5-c-login__main-body,
  .pf-v5-c-login__main-footer { padding: 1.25rem; }
  #kc-page-title { font-size: 1.6rem; }
}
