/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* --secondary-color-opaque (below) is --secondary-color's own tone
   composited over white (text never reveals the translucency since it's
   only ever painted once against the page's white background, but
   anything painted over a colored background - a marker line on a
   gradient bar, an axis tick label over a colored chart - needs the same
   tone forced fully opaque first, or whatever's underneath bleeds through
   the missing alpha). Computed via CSS relative color syntax from
   --body-color and --secondary-color-alpha directly, so it stays correct
   if either one ever changes - no hand-recomputation needed. (Previously
   hardcoded as a literal #6E617A: production assets compiled through
   sassc-rails/LibSass choked on `rgb(from ...)` even wrapped in Sass
   string interpolation. Sass is gone now, so the browser evaluates this
   natively.) */

:root {
  /* Brand palette - the only theme colors this app actually overrides. */
  --color-primary: #ef06e9;
  --color-primary-rgb: 239, 6, 233;
  --color-secondary: #00fcff;
  --color-secondary-rgb: 0, 252, 255;
  --color-primary-bg-subtle: #fccdfb;
  --color-secondary-bg-subtle: #ccfeff;

  /* Status colors - stock Bootstrap defaults (never overridden by this
     app's $theme-colors), restored here since $theme-colors replaced
     rather than merged with Bootstrap's map, silently dropping the
     compiled .alert-danger/.text-bg-info/etc utility classes entirely
     (the views kept using them regardless). See the final migration
     report for the full list of classes this affected. */
  --color-success: #198754;
  --color-success-text-emphasis: #0a3622;
  --color-success-bg-subtle: #d1e7dd;
  --color-success-border-subtle: #a3cfbb;
  --color-info: #0dcaf0;
  --color-info-text-emphasis: #055160;
  --color-info-bg-subtle: #cff4fc;
  --color-info-border-subtle: #9eeaf9;
  --color-warning: #ffc107;
  --color-warning-text-emphasis: #664d03;
  --color-warning-bg-subtle: #fff3cd;
  --color-warning-border-subtle: #ffe69c;
  --color-danger: #dc3545;
  --color-danger-text-emphasis: #58151c;
  --color-danger-bg-subtle: #f8d7da;
  --color-danger-border-subtle: #f1aeb5;
  --color-light: #f8f9fa;
  --color-gray-600: #6c757d;

  /* Body/typography */
  --body-font-family: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --monospace-font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --body-font-size: 1rem;
  --body-line-height: 1.5;
  --body-color: #3D2C4D;
  --body-color-rgb: 61, 44, 77;
  --body-bg: #ffffff;
  --secondary-color-alpha: 0.75;
  --secondary-color: rgb(from var(--body-color) r g b / var(--secondary-color-alpha));
  --secondary-color-opaque: rgb(
    from var(--body-color)
    calc(r * var(--secondary-color-alpha) + 255 * (1 - var(--secondary-color-alpha)))
    calc(g * var(--secondary-color-alpha) + 255 * (1 - var(--secondary-color-alpha)))
    calc(b * var(--secondary-color-alpha) + 255 * (1 - var(--secondary-color-alpha)))
  );
  --heading-color: #261A33;
  --link-color: #ef06e9;
  --link-hover-color: #bf05ba;
  --code-color: #d63384;
  --mark-bg: #fff3cd;

  /* Borders / radii / shadows - stock Bootstrap defaults, untouched by
     this app's theme overrides. */
  --border-width: 1px;
  --border-color: #dee2e6;
  --border-color-translucent: rgba(0, 0, 0, 0.175);
  --border-radius: 0.375rem;
  --border-radius-sm: 0.25rem;
  --border-radius-lg: 0.5rem;
  --border-radius-pill: 50rem;
  --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --focus-ring-color: rgba(239, 6, 233, 0.25);

  /* Pre-existing custom tokens, unchanged. */
  --trait-color: #ef06e9;
  --trait-color-complementary: #00fcff;

  /* Shared five-stop magenta-to-turquoise gradient - single source of
     truth for the Score Range Bar / histogram slices below, referenced
     identically from _skill.html.erb's inline gradient-slice styles via
     var(--trait-gradient-stops) instead of duplicating the literal
     stop list in Ruby. */
  --trait-gradient-stops: #ef06e9 0%, #d51feb 13%, #9462f1 42%, #2eccfa 82%, #00fcff 100%;
}

/* ---- Base layer (Reboot equivalent) ----
   Only the elements actually used across the app's views - see the
   migration survey for what was checked. */

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

body {
  margin: 0;
  font-family: var(--body-font-family);
  font-size: var(--body-font-size);
  font-weight: 400;
  line-height: var(--body-line-height);
  color: var(--body-color);
  background-color: var(--body-bg);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

hr {
  margin: 1rem 0;
  color: inherit;
  border: 0;
  border-top: var(--border-width) solid;
  opacity: 0.25;
}

h1, h2, h3, h4, h5, h6, .h4, .h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--heading-color);
}

/* Fluid sizing kept as the exact calc() expression Bootstrap compiles to
   (rather than resolved to one value) - the real Gotenberg render
   viewport during PDF generation isn't confirmed, so this guarantees
   identical sizing at every viewport width regardless. clamp(min, fluid,
   max) replaces the old calc()+@media breakpoint pair with one rule -
   the fluid expression is tuned so it equals exactly `max` at 1200px
   width, so clamping there reproduces the breakpoint override exactly;
   `min` is the fluid expression's own value at a 0-width viewport,
   never actually reached in practice but required by clamp()'s syntax. */
h1 { font-size: clamp(1.375rem, 1.375rem + 1.5vw, 2.5rem); }
h2 { font-size: clamp(1.325rem, 1.325rem + 0.9vw, 2rem); }
h3 { font-size: clamp(1.3rem, 1.3rem + 0.6vw, 1.75rem); }
h4, .h4 { font-size: clamp(1.275rem, 1.275rem + 0.3vw, 1.5rem); }

h5 { font-size: 1.25rem; }
h6, .h6 { font-size: 1rem; }

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

ol, ul {
  padding-left: 2rem;
}
ol, ul, dl {
  margin-top: 0;
  margin-bottom: 1rem;
}
ol ol, ul ul, ol ul, ul ol {
  margin-bottom: 0;
}

dt { font-weight: 700; }
dd { margin-bottom: 0.5rem; margin-left: 0; }

blockquote { margin: 0 0 1rem; }

b, strong { font-weight: bolder; }

small, .small { font-size: 0.875em; }

mark {
  padding: 0.1875em;
  color: var(--body-color);
  background-color: var(--mark-bg);
}

sub, sup {
  position: relative;
  font-size: 0.75em;
  line-height: 0;
  vertical-align: baseline;
}
sub { bottom: -0.25em; }
sup { top: -0.5em; }

a {
  color: var(--link-color);
  text-decoration: underline;
}
a:hover { color: var(--link-hover-color); }

pre, code, kbd, samp {
  font-family: var(--monospace-font-family);
  font-size: 1em;
}
pre {
  display: block;
  margin-top: 0;
  margin-bottom: 1rem;
  overflow: auto;
  font-size: 0.875em;
}
pre code { font-size: inherit; color: inherit; word-break: normal; }
code { font-size: 0.875em; color: var(--code-color); word-wrap: break-word; }
a > code { color: inherit; }

img, svg { vertical-align: middle; }

table { caption-side: bottom; border-collapse: collapse; }

label { display: inline-block; }

button { border-radius: 0; }
button:focus:not(:focus-visible) { outline: 0; }

input, button, select, optgroup, textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
button, select { text-transform: none; }
[role="button"] { cursor: pointer; }
select { word-wrap: normal; }
select:disabled { opacity: 1; }
button, [type="button"], [type="reset"], [type="submit"] {
  -webkit-appearance: button;
}
button:not(:disabled), [type="button"]:not(:disabled), [type="reset"]:not(:disabled), [type="submit"]:not(:disabled) {
  cursor: pointer;
}
::-moz-focus-inner { padding: 0; border-style: none; }

textarea { resize: vertical; }

fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 0.5rem;
  line-height: inherit;
  font-size: clamp(1.275rem, 1.275rem + 0.3vw, 1.5rem);
}

[hidden] { display: none !important; }

/* ---- Grid (container/row/col) ----
   Kept generic (not invented per-view) since every view uses it purely
   structurally. Matches Bootstrap's default 12-col grid, 1.5rem gutter. */
.grid-container {
  width: 100%;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 576px) { .grid-container { max-width: 540px; } }
@media (min-width: 768px) { .grid-container { max-width: 720px; } }
@media (min-width: 992px) { .grid-container { max-width: 960px; } }
@media (min-width: 1200px) { .grid-container { max-width: 1140px; } }
@media (min-width: 1400px) { .grid-container { max-width: 1320px; } }

.grid-container-fluid {
  width: 100%;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
  margin-right: auto;
  margin-left: auto;
}

.grid-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.75rem;
  margin-left: -0.75rem;
}
.grid-row > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}

.grid-col { flex: 1 0 0%; }
.grid-col-auto { flex: 0 0 auto; width: auto; }
.grid-col-4 { flex: 0 0 auto; width: 33.33333333%; }
.grid-col-8 { flex: 0 0 auto; width: 66.66666667%; }
@media (min-width: 768px) {
  .grid-col-md-4 { flex: 0 0 auto; width: 33.33333333%; }
  .grid-col-md-8 { flex: 0 0 auto; width: 66.66666667%; }
}

/* ---- Forms ---- */
.form-field { position: relative; }
.form-field > .form-input,
.form-field > .form-select {
  height: calc(3.5rem + calc(var(--border-width) * 2));
  min-height: calc(3.5rem + calc(var(--border-width) * 2));
  line-height: 1.25;
  padding: 1rem 0.75rem;
}
.form-field > .form-input::placeholder { color: transparent; }
.form-field > label {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  max-width: 100%;
  height: 100%;
  padding: 1rem 0.75rem;
  overflow: hidden;
  color: rgba(var(--body-color-rgb), 0.65);
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  border: var(--border-width) solid transparent;
  transform-origin: 0 0;
  transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}
.form-field > .form-input:focus ~ label,
.form-field > .form-input:not(:placeholder-shown) ~ label,
.form-field > .form-select ~ label {
  transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}
.form-field > .form-input:focus,
.form-field > .form-input:not(:placeholder-shown) {
  padding-top: 1.625rem;
  padding-bottom: 0.625rem;
}

.form-field-label {
  display: inline-block;
  margin-bottom: 0.5rem;
}

.form-input {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--body-color);
  appearance: none;
  background-color: var(--body-bg);
  background-clip: padding-box;
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--border-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-input:focus {
  color: var(--body-color);
  background-color: var(--body-bg);
  border-color: #f783f4;
  outline: 0;
  box-shadow: 0 0 0 0.25rem var(--focus-ring-color);
}
.form-input:disabled {
  background-color: #e9ecef;
  opacity: 1;
}

.form-select {
  display: block;
  width: 100%;
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--body-color);
  appearance: none;
  background-color: var(--body-bg);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--border-radius);
}
.form-select:focus {
  border-color: #f783f4;
  outline: 0;
  box-shadow: 0 0 0 0.25rem var(--focus-ring-color);
}
.form-select-sm {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  padding-left: 0.5rem;
  font-size: 0.875rem;
  border-radius: var(--border-radius-sm);
}

/* ---- Buttons ---- */
.button {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--body-color);
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: var(--border-width) solid transparent;
  border-radius: var(--border-radius);
  background-color: transparent;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.button:disabled { pointer-events: none; opacity: 0.65; }

.button-primary {
  color: #000;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}
.button-primary:hover {
  color: #000;
  background-color: #f12bec;
  border-color: #f11feb;
}
.button-primary:active {
  color: #000;
  background-color: #f238ed;
  border-color: #f11feb;
}
.button-primary:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(203, 5, 198, 0.5);
}

.button-outline-primary {
  color: var(--color-primary);
  background-color: transparent;
  border-color: var(--color-primary);
}
.button-outline-primary:hover {
  color: #000;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.button-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: var(--border-radius-sm);
}

.button-close {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  padding: 0.25em;
  color: #000;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414'/%3e%3c/svg%3e") center / 1em auto no-repeat;
  border: 0;
  border-radius: 0.375rem;
  opacity: 0.5;
}
.button-close:hover { opacity: 0.75; }

/* ---- Badges ---- */
.badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: var(--border-radius);
}
.badge-info { color: #000; background-color: var(--color-info); }
.badge-success { background-color: var(--color-success); }
.badge-danger { background-color: var(--color-danger); }

/* ---- Alerts ---- */
.alert {
  position: relative;
  padding: 1rem;
  margin-bottom: 1rem;
  border: var(--border-width) solid transparent;
  border-radius: var(--border-radius);
}
.alert-danger {
  color: var(--color-danger-text-emphasis);
  background-color: var(--color-danger-bg-subtle);
  border-color: var(--color-danger-border-subtle);
}
.alert-success {
  color: var(--color-success-text-emphasis);
  background-color: var(--color-success-bg-subtle);
  border-color: var(--color-success-border-subtle);
}
.alert-info {
  color: var(--color-info-text-emphasis);
  background-color: var(--color-info-bg-subtle);
  border-color: var(--color-info-border-subtle);
}
.alert-warning {
  color: var(--color-warning-text-emphasis);
  background-color: var(--color-warning-bg-subtle);
  border-color: var(--color-warning-border-subtle);
}

/* ---- Card ---- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--body-color);
  word-wrap: break-word;
  background-color: var(--body-bg);
  background-clip: border-box;
  border: var(--border-width) solid var(--border-color-translucent);
  border-radius: var(--border-radius);
}
.card-body { flex: 1 1 auto; padding: 1rem; }
.card-title { margin-bottom: 0.5rem; }

.stretched-link::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  content: "";
}
.card-header {
  padding: 0.5rem 1rem;
  margin-bottom: 0;
  background-color: rgba(var(--body-color-rgb), 0.03);
  border-bottom: var(--border-width) solid var(--border-color-translucent);
}
.card-header:first-child {
  border-radius: calc(var(--border-radius) - var(--border-width)) calc(var(--border-radius) - var(--border-width)) 0 0;
}
.card-footer {
  padding: 0.5rem 1rem;
  background-color: rgba(var(--body-color-rgb), 0.03);
  border-top: var(--border-width) solid var(--border-color-translucent);
}
.card-footer:last-child {
  border-radius: 0 0 calc(var(--border-radius) - var(--border-width)) calc(var(--border-radius) - var(--border-width));
}

/* ---- List group ---- */
.list-group {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
  border-radius: var(--border-radius);
}
.list-group-item {
  position: relative;
  display: block;
  padding: 0.5rem 1rem;
  color: var(--body-color);
  text-decoration: none;
  background-color: var(--body-bg);
  border: var(--border-width) solid var(--border-color);
}
.list-group-item:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.list-group-item:last-child { border-bottom-right-radius: inherit; border-bottom-left-radius: inherit; }
.list-group-item + .list-group-item { border-top-width: 0; }
.list-group-flush { border-radius: 0; }
.list-group-flush > .list-group-item { border-width: 0 0 var(--border-width); }
.list-group-flush > .list-group-item:last-child { border-bottom-width: 0; }

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin-bottom: 1rem;
  list-style: none;
}
.breadcrumb-item + .breadcrumb-item { padding-left: 0.5rem; }
.breadcrumb-item + .breadcrumb-item::before {
  float: left;
  padding-right: 0.5rem;
  color: var(--secondary-color);
  content: "/";
}
.breadcrumb-item.active { color: var(--secondary-color); }

/* ---- Pagination (Kaminari) ---- */
.pagination {
  display: flex;
  padding-left: 0;
  list-style: none;
}
.page-link {
  position: relative;
  display: block;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  color: var(--link-color);
  text-decoration: none;
  background-color: var(--body-bg);
  border: var(--border-width) solid var(--border-color);
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.page-link:hover {
  z-index: 2;
  color: var(--link-hover-color);
  background-color: var(--color-light);
  border-color: var(--border-color);
}
.page-link:focus {
  z-index: 3;
  color: var(--link-hover-color);
  background-color: #e9ecef;
  outline: 0;
  box-shadow: 0 0 0 0.25rem var(--focus-ring-color);
}
.page-link.active, .active > .page-link {
  z-index: 3;
  color: #fff;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}
.page-link.disabled, .disabled > .page-link {
  color: var(--secondary-color);
  pointer-events: none;
  background-color: #e9ecef;
  border-color: var(--border-color);
}
.page-item:not(:first-child) .page-link {
  margin-left: calc(-1 * var(--border-width));
}
.page-item:first-child .page-link {
  border-top-left-radius: var(--border-radius);
  border-bottom-left-radius: var(--border-radius);
}
.page-item:last-child .page-link {
  border-top-right-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
}
.pagination-sm .page-link {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}
.pagination-sm .page-item:first-child .page-link {
  border-top-left-radius: var(--border-radius-sm);
  border-bottom-left-radius: var(--border-radius-sm);
}
.pagination-sm .page-item:last-child .page-link {
  border-top-right-radius: var(--border-radius-sm);
  border-bottom-right-radius: var(--border-radius-sm);
}

/* ---- Carousel ----
   Only the "dark" variant (black controls/caption, for a light
   background) is ever used in this app, so it's the only variant
   implemented - baked in directly rather than as a separate modifier. */
.carousel { position: relative; }
.carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.carousel-inner::after { display: block; clear: both; content: ""; }
.carousel-item {
  position: relative;
  display: none;
  float: left;
  width: 100%;
  margin-right: -100%;
  backface-visibility: hidden;
  transition: transform 0.6s ease-in-out;
}
.carousel-item.active { display: block; }
.carousel-control-prev, .carousel-control-next {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15%;
  padding: 0;
  color: #fff;
  text-align: center;
  background: none;
  filter: invert(1) grayscale(100);
  border: 0;
  opacity: 0.5;
  transition: opacity 0.15s ease;
  cursor: pointer;
}
.carousel-control-prev:hover, .carousel-control-prev:focus,
.carousel-control-next:hover, .carousel-control-next:focus {
  color: #fff;
  text-decoration: none;
  outline: 0;
  opacity: 0.9;
}
.carousel-control-prev { left: 0; }
.carousel-control-next { right: 0; }
.carousel-control-prev-icon, .carousel-control-next-icon {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: 100% 100%;
}
.carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0'/%3e%3c/svg%3e");
}
.carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e");
}
.carousel-indicators {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 0;
  margin-right: 15%;
  margin-bottom: 1rem;
  margin-left: 15%;
}
.carousel-indicators button {
  box-sizing: content-box;
  flex: 0 1 auto;
  width: 30px;
  height: 3px;
  padding: 0;
  margin-right: 3px;
  margin-left: 3px;
  text-indent: -999px;
  cursor: pointer;
  background-color: #000;
  background-clip: padding-box;
  border: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  opacity: 0.5;
  transition: opacity 0.6s ease;
}
.carousel-indicators button.active { opacity: 1; }
.carousel-caption {
  position: absolute;
  right: 15%;
  bottom: 1.25rem;
  left: 15%;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  color: #000;
  text-align: center;
}

/* ---- Modal ---- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1055;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}
.modal.show { display: block; }
.modal-dialog {
  position: relative;
  width: auto;
  margin: 0.5rem;
  pointer-events: none;
}
@media (min-width: 576px) {
  .modal-dialog { max-width: 500px; margin-right: auto; margin-left: auto; }
}
.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 1rem);
}
@media (min-width: 576px) {
  .modal-dialog-centered { min-height: calc(100% - 3.5rem); }
}
@media (min-width: 992px) {
  .modal-xl { max-width: 800px; }
}
@media (min-width: 1200px) {
  .modal-xl { max-width: 1140px; }
}
.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  color: var(--body-color);
  pointer-events: auto;
  background-color: var(--body-bg);
  background-clip: padding-box;
  border: var(--border-width) solid var(--border-color-translucent);
  border-radius: var(--border-radius-lg);
  outline: 0;
}
.modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  padding: 1rem;
  border-bottom: var(--border-width) solid var(--border-color);
  border-top-left-radius: calc(var(--border-radius-lg) - var(--border-width));
  border-top-right-radius: calc(var(--border-radius-lg) - var(--border-width));
}
.modal-header .button-close {
  padding: 0.5rem;
  margin: -0.5rem -0.5rem -0.5rem auto;
}
.modal-title { margin-bottom: 0; line-height: 1.5; }
.modal-body { position: relative; flex: 1 1 auto; padding: 1rem; }

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  opacity: 0.5;
}

body.modal-open { overflow: hidden; }

/* ---- Spinners ---- */
.spinner-border, .spinner-grow {
  display: inline-block;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  vertical-align: -0.125em;
  border-radius: 50%;
}
.spinner-border-sm, .spinner-grow-sm { width: 1rem; height: 1rem; }
.spinner-border {
  border: 0.25em solid currentcolor;
  border-right-color: transparent;
  animation: 0.75s linear infinite spinner-border;
}
.spinner-grow {
  background-color: currentcolor;
  opacity: 0;
  animation: 0.75s linear infinite spinner-grow;
}
@keyframes spinner-border {
  to { transform: rotate(360deg); }
}
@keyframes spinner-grow {
  0% { transform: scale(0); }
  50% { opacity: 1; transform: none; }
}

/* ---- Navbar + user menu dropdown ---- */
.site-navbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
}
.site-navbar-inner {
  display: flex;
  flex-wrap: inherit;
  align-items: center;
  justify-content: center;
  position: relative;
}
.site-navbar-logo-link {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.user-menu { position: relative; }
.user-avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: var(--border-width) solid var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  color: var(--color-secondary);
}
.user-menu-toggle {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}
.user-menu-toggle::after {
  display: inline-block;
  margin-left: 0.255em;
  vertical-align: 0.255em;
  content: "";
  border-top: 0.3em solid;
  border-right: 0.3em solid transparent;
  border-bottom: 0;
  border-left: 0.3em solid transparent;
}
.user-menu-list {
  position: absolute;
  z-index: 1000;
  display: none;
  min-width: 10rem;
  padding: 0.5rem 0;
  margin: 0.125rem 0 0;
  font-size: 0.875rem;
  color: var(--body-color);
  text-align: left;
  list-style: none;
  background-color: var(--body-bg);
  background-clip: padding-box;
  border: var(--border-width) solid var(--border-color-translucent);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  top: 100%;
  right: 0;
  left: auto;
}
.user-menu-list.show { display: block; }
.user-menu-header {
  display: block;
  padding: 0.5rem 1rem;
  margin-bottom: 0;
  font-size: 0.875rem;
  color: var(--color-gray-600);
  white-space: nowrap;
}
.user-menu-item {
  display: block;
  width: 100%;
  padding: 0.25rem 1rem;
  clear: both;
  font-weight: 400;
  color: var(--body-color);
  text-align: inherit;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
}
.user-menu-item:hover, .user-menu-item:focus {
  color: var(--body-color);
  background-color: #f8f9fa;
}

/* --- Custom Global Styles --- */

.mirrored {
  transform: scale(-1, 1);
}

.trait-chart {
  --width: 4rem; /* Relative to the font size of the parent */
  width: var(--width);
  aspect-ratio: 1/1; /* Keeps it square */
  border-radius: 50%;
  position: relative;
  --percent: 50%;
  background: conic-gradient(
    var(--trait-color-complementary) 0% calc(var(--percent) * 1%),
    var(--trait-color) calc(var(--percent) * 1%) 100%
  );
  transform: rotate(calc(-1.8deg * var(--percent, 50%) + 90deg));
  mask: radial-gradient(circle, transparent 35%, black 36%);
  -webkit-mask: radial-gradient(circle, transparent 35%, black 36%);
}

.trait-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* 1. CRITICAL: Re-add border-style so the border-width actually renders! */
  border-style: solid;

  /* 2. The tips of your SVG are exactly 10.38px wide, so 11px is the perfect fit */
  border-width: 0 11px;

  /* Keep your existing SVG URL */
  border-image-source: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 15'%3E%3Cpath fill='none' stroke='%23e2e2e2' stroke-linecap='round' stroke-linejoin='round' stroke-width='0.6' d='M65.69,11.41l1.55-1.04c2.16-1.44,2.16-4.61,0-6.05l-1.58-1.06c-1.79-1.19-3.89-1.83-6.03-1.83H10.08c-2.15,0-4.25.63-6.04,1.82l-1.55,1.04c-2.16,1.44-2.16,4.61,0,6.05l1.58,1.06c1.79,1.19,3.89,1.83,6.03,1.83h49.54c2.15,0,4.25-.63,6.04-1.82Z'/%3E%3C/svg%3E");

  /* 3. Match the slice to the 11px border */
  border-image-slice: 0 11 fill;
  border-image-repeat: stretch;

  /* 4. Keep the reduced padding so the text stays snug to the edges */
  padding: 2px 0;

  min-height: 24px;
  color: #6c757d;
}

.v2-progress-container {
  position: relative;
  width: 100%;

  /* Increased the height up to 16px! */
  height: 14px;

  /* Chops off the SVG's visible overflow, giving you a razor-sharp cut */
  overflow: hidden;
}

/* Ensure the overlay perfectly matches the 16px container size */
.v2-progress-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Share the exact same continuous gradient */
.v2-progress-track,
.v2-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, var(--trait-gradient-stops));
}

.v2-progress-track {
  opacity: 0.25;
}

.v2-progress-fill {
  opacity: 1;
  /* Optional: gives the bar a beautiful sweeping load animation! */
  transition: clip-path 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.chevron-cutout {
  /* Set this to match the background color of your parent card */
  fill: #ffffff;
}

/* Population-distribution mini bar chart, rendered under every trait/skill
   - the grouped 20-chunk version (see AssessmentsHelper#histogram_chunks)
   is always shown; the full, ungrouped 100-bin version with its percentile
   label is only shown under distributions=true (see the show_distributions
   check around each partial's histogram blocks). Each wrapper carries a
   fixed %-of-row width so the (full-width variant's) percentile label
   below can be positioned as a % of that same box; centered automatically
   by the parent's justify-content-center. .histogram-chart is a fixed
   height (55px - 125% of the 44px chevron svg height) so percentage
   heights on .histogram-bar resolve against a concrete pixel value -
   percentage height inside an auto-height flex parent would otherwise
   collapse to 0.

   Both at 100% (previously 37.5% and 75%, chosen back when neither had
   anything else on the page to align against) so every chart under a
   trait/skill - chevrons/progress bar, Score Range Bar, distributions
   histogram, grouped histogram - shares the exact same left/right edges,
   per direct visual comparison against the chevron row's own extent. */
.histogram-chart-wrapper {
  width: 100%;
}

.histogram-chart {
  width: 100%;
  height: 55px;
  gap: 1px;
}

.histogram-bar {
  position: relative;
  flex: 1 1 0;
  min-width: 1px;
  align-self: flex-end;
  background-color: color-mix(in srgb, var(--trait-color), white 80%);
}

/* Per-bar baseline so near-zero/zero bins still read as a data point rather
   than empty space - sized to each bar's own slot (not the chart as a
   whole), so the 1px gaps between bars carry through to the baseline
   instead of it reading as one continuous line. Positioned off of the
   bar's own box edges, so it renders at the right spot even when the bar
   itself has 0 height. Bars with real height sit on top of their own
   baseline segment, obscuring it. */
.histogram-bar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: #e2e2e2;
}

/* Skill-only: every histogram bar (both the distributions and grouped
   charts - see _skill.html.erb's histogram_bar_layer comment) is built
   from up to two of these, each already carrying its own correctly-
   positioned slice of the shared gradient via an inline style - one
   for the "already reached" portion of the bar (opacity 1, the
   default - no separate class needed for that half), one for the
   "not yet reached" portion (.histogram-bar-muted below). Same
   track/population/fill layering idea as .score-range-segment's own
   children, just two layers here instead of three (histogram bars
   have no separate "no data at all" case the way the bar's own
   inactive tails do - every rendered bar already has real population
   by definition). */
.histogram-bar-gradient-layer {
  position: absolute;
  top: 0;
  bottom: 0;
}

/* Shared muting opacity - used both as a modifier on .histogram-bar-
   gradient-layer above (the "not yet reached" inner layer) and
   directly on a whole .histogram-bar itself, for a bar that's simple
   enough to need only one layer covering its full width (this is the
   COMMON case in practice - only a bar the score's exact position
   happens to fall inside ever needs the two-layer split). */
.histogram-bar-muted {
  opacity: 0.45;
}

/* Trait-only two-tone variant (skills use the shared-gradient classes
   above instead). Bars before the person's own percentile bin use the
   same color as the left (trait-name) chevrons' active fill, bars
   after use the right (complementary-name) chevrons' active fill - so
   the histogram reads as a continuation of the same two-tone language
   as the chevron bars above it, instead of an unrelated uniform pink.
   The percentile bin itself sits right on that boundary and is split
   between both colors at the exact sub-bin fraction where the score
   falls - set inline per-bar (see the split_bar_style lambda in
   _trait.html.erb), not a fixed class here, since the split point
   varies per trait/skill. */
.histogram-bar-left {
  background-color: var(--trait-color);
}

.histogram-bar-right {
  background-color: var(--trait-color-complementary);
}

/* Trait layout: a three-column grid (score/percentile labels left and
   right, with the name row, Score Range Bar, histograms, and tags all
   filling the middle column on their own rows) - see _trait.html.erb's
   own comment above the grid markup. The name row's own labels live in
   the middle column too (flush left/right within it via
   justify-content-between), so the names align with the score-bar's and
   histogram's own edges below them, not the block's outer edges. Label
   columns are a fixed 45px (not auto-sized to content) - just enough
   for short numbers like "5.7"/"40%" - so every trait's columns line up
   the same width regardless of the specific number's own digit count.
   The middle column - and everything inside it, all already width:100%
   of their own parent - takes whatever space is left, the same width
   on every row. */
/* Traits/Skills section header descriptions (simple_format-rendered,
   so each paragraph is a plain <p> carrying Bootstrap's default
   margin-bottom: 1rem) - zeroing just the LAST paragraph's own trailing
   margin, not every paragraph's, so the visible gap BETWEEN paragraphs
   within the description itself is untouched; only the invisible
   margin that was extending past the row's own bottom edge, adding to
   the first trait/skill's own padding-top below and inflating that one
   gap past the same padding-top value used between every other pair of
   traits/skills, is removed. */
.section-description p:last-child {
  margin-bottom: 0;
}

.trait-layout-grid {
  display: grid;
  grid-template-columns: 45px 1fr 45px;
  align-items: center;
  /* 0.3rem (was 0.5rem) - part of the same two-per-page compacting pass
     as .distribution-chart-tall/.explanation-table below and the
     inter-item padding-top in _trait.html.erb/_skill.html.erb; this grid
     has ~5 rows (name, chart, axis, category sentence, tags) so even a
     small per-gap trim adds up across the whole trait/skill. */
  row-gap: 0.3rem;
  column-gap: 0.5rem;
}

.trait-layout-label {
  white-space: nowrap;
}

/* "What Mimi Noticed" section - a compact label/value table (short cue
   label left, comma-joined trait/skill names right) rather than a
   sentence-per-row list, so the section reliably fits on page 1 - see
   _what_mimi_noticed.html.erb's own comment. Label column is a fixed
   140px (not auto-sized to content) so every row's value column starts
   at the same x position regardless of that row's own label length
   ("Your voice" vs "Eyebrows & forehead"). align-items: start (not
   center) since a wrapped multi-line value (a long trait/skill list)
   would otherwise vertically center against its own label, leaving the
   label looking mis-aligned relative to the value's first line. */
.explanation-cue-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: start;
  row-gap: 0.5rem;
  column-gap: 1rem;
}

/* Per-trait/skill explanation table (see _explanation.html.erb) - signal
   name, raw value, and population comparison each get their own column
   instead of running together in a semicolon-joined sentence (an earlier
   version). Value/comparison columns are auto-width and right-aligned so
   they line up down the table regardless of how long each row's own
   signal name is; the signal column (1fr) takes the remaining space.
   The group label (Contributing / Contrasting) spans all three columns
   as its own row, same spanning approach as the category sentence this
   partial sits under.

   font-size 1rem / line-height 1.25 (fs-6/lh-sm) - matches the category
   sentence's own sizing right above this partial's chart ("You are
   considered to be falling into the High range...",
   distribution_sentence_html) (by request, 2026-11-06), same reasoning
   as .distribution-axis-tick-label/.distribution-percentile-inset
   above. Was a much tighter 0.8rem/1.1 before, specifically to fit two
   traits/skills per page (together with .distribution-chart-tall's own
   height, .trait-layout-grid's row-gap, and the inter-item padding-top
   in _trait.html.erb/_skill.html.erb) - that pagination goal may no
   longer hold at this size, some rows may wrap more than before. */
.explanation-table {
  display: grid;
  grid-template-columns: 1fr auto auto;
  column-gap: 1rem;
  row-gap: 0.15rem;
  align-items: baseline;
  font-size: 1rem;
  line-height: 1.25;
}

.explanation-table-group {
  grid-column: 1 / -1;
}

.explanation-table-value,
.explanation-table-comparison {
  white-space: nowrap;
  text-align: right;
}

/* Score Range Bar, rendered under every trait's chevrons in place of the
   old text-only "Majority of people score between X and Y" line - see
   the score_range_gradient lambda in _trait.html.erb for the 4-color
   gradient math. Width is 100% (previously 85%) so it shares the
   same left/right edges as the chevron/progress-bar row above it and
   the histograms below it, not just internal consistency between the
   trait and skill versions of this same element. */
.score-range-wrapper {
  width: 100%;
  position: relative;
}

/* Shared by both the trait and skill Score Range Bars - matches
   text-body-secondary's own color (--secondary-color-opaque above - this
   marker sits on top of the bar's own colored segments, so the plain
   translucent variable would let whatever's underneath bleed through;
   confirmed via a real render that a two-layer background pre-blend
   trick doesn't avoid that here, for reasons that weren't fully pinned
   down). Lives in .score-range-wrapper, one level up from
   .score-range-bar itself, specifically so it can bleed past the bar's
   own overflow:hidden and stay visible 2px above/below it. */
.score-range-score-marker {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  margin-left: -1px;
  background-color: var(--secondary-color-opaque);
  border-radius: 1px;
  z-index: 2;
}

/* A flex row of ten segments, each a fixed 10% (flex-basis, no grow or
   shrink) rather than .histogram-chart's `flex: 1 1 0` + real `gap` -
   with only 10 (large) segments, a fixed 1px `gap` eats a big enough
   fraction of the bar's own width to visibly skew each segment's own
   local split percentage - the histogram's 100 (tiny) bars have the
   same skew in principle but it's negligible at that count. Confirmed
   by measuring both against the same real score: a real `gap` here
   put the split ~0.5% (a few px) to the left of the distributions
   chart's own split for the same score. Fixed-10% segments avoid that
   skew entirely, since each segment's own width is exactly 1/10 of
   the container regardless of gap math. */
.score-range-bar {
  position: relative;
  display: flex;
  height: 32px;
  border-radius: 2px;
  overflow: hidden;
}

/* The 1px separator is a border (own box-model layer, always full
   height, never overlapping the segment's own background) rather than
   a real flex `gap` - see .score-range-bar above. Only the first 9 of
   10 segments get one (no trailing separator after the last).
   position: relative anchors .score-range-segment-track/-fill below -
   only used by the skill version (the trait version sets this
   element's own background directly and has no such children), but
   harmless either way. */
.score-range-segment {
  position: relative;
  flex: 0 0 10%;
}
.score-range-segment:not(:last-child) {
  border-right: 1px solid var(--body-bg);
}

/* Skill-only: the Score Range Bar's colored fill uses the same five-
   stop magenta-to-turquoise gradient as .v2-progress-track/-fill
   above it (skills have no complementary color the way traits do) -
   see _skill.html.erb's gradient_slice_style for how each segment
   shows its own slice of that shared gradient so they line up into
   one continuous sweep. Three stacked opacity levels (see the
   partial's own comment for why): track (dim, always visible) is the
   baseline; population (medium) marks the real, non-zero data range;
   fill (full) marks this person's own position within it. */
.score-range-segment-track {
  position: absolute;
  inset: 0;
  opacity: 0.15;
}

.score-range-segment-population {
  position: absolute;
  top: 0;
  bottom: 0;
  opacity: 0.45;
}

.score-range-segment-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  opacity: 1;
}

/* Alternative "everything on the distributions chart" view (behind
   ?distributions=true, replacing the old side-by-side comparison view
   entirely - see _trait.html.erb/_skill.html.erb's own comments on the
   markup). The chart itself reuses the SAME grouped/trimmed histogram
   data already computed for the always-on percentile row elsewhere
   (histogram_chunks) - there's no separate Score Range Bar in this
   view, so the chart's own axis below takes over showing the person's
   exact position instead.

   130px, not the original 165px (still taller than .histogram-chart's
   own 55px default, so the taller distributions view still reads as
   visually distinct from the compact always-on percentile row). Tried
   dropping further (90px, then 65px) as part of a pass aimed at fitting
   two traits/skills per page instead of one, but restored back to 130px
   by request - the other levers in that same pass (inter-item padding-
   top in _trait.html.erb/_skill.html.erb, .trait-layout-grid's own
   row-gap, and .explanation-table's row-gap/font-size below) still
   fit two per page without needing the chart itself shorter than this. */
.distribution-chart-tall {
  width: 100%;
  height: 130px;
  gap: 1px;
}

/* The axis line, plus room below it for each tick's own label text.
   Ticks are positioned via inline `left` (see axis_ticks in
   AssessmentsHelper) rather than evenly spaced - each sits wherever its
   own score value maps to, not at a fixed interval. */
.distribution-axis {
  position: relative;
  height: 20px;
  margin-top: 1px;
  border-top: 1px solid #d8d8d8;
}

.distribution-axis-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.distribution-axis-tick::before {
  content: "";
  width: 1px;
  height: 6px;
  background: #d8d8d8;
}

.distribution-axis-tick-label {
  margin-top: 2px;
  /* fs-6/lh-sm (1rem/1.25) - matches the category sentence's own sizing
     right above this chart ("You are considered to be falling into the
     High range...", distribution_sentence_html) (by request,
     2026-11-06), so the chart's text reads at the same scale as that
     descriptive copy instead of its own smaller, chart-specific size. */
  font-size: 1rem;
  line-height: 1.25;
  color: var(--secondary-color);
  white-space: nowrap;
}

/* The person's own exact score - distinguished from the plain
   round-number gridlines around it with an upward-pointing arrow
   instead of a bare vertical line (that line, inherited from
   .distribution-axis-tick's own ::before, is turned off here by
   request - the arrow alone carries the "make the score position
   impossible to miss" goal .score-range-score-marker elsewhere
   achieves with a line through the bars themselves). */
.distribution-axis-tick-score::before {
  display: none;
}

.distribution-axis-tick-score .distribution-axis-tick-label {
  color: var(--secondary-color-opaque);
}

.distribution-axis-arrow {
  display: block;
  font-size: 0.65rem;
  line-height: 1;
  color: var(--secondary-color-opaque);
}

/* The percentile split (e.g. "40%"/"60%"), overlaid directly inside the
   chart's own plot area rather than a separate row above/below it - 15%
   in from each side (`left: 15%`/`85%`, set inline per call site) and
   in the chart's own lower third vertically (top: 66.67%, by request).
   translate(-50%, -50%) centers the label ON that (x,y) point rather
   than starting text there. Same styling as the axis's own score label
   below it (.distribution-axis-tick-score .distribution-axis-tick-label)
   - same size, same font-weight: 600 (that one via .u-fw-semibold
   instead, but same 600 either way), and forced opaque
   (--secondary-color-opaque, same reasoning as that label too) since
   this sits on top of the bars' own color - the plain translucent CSS
   variable would let whatever bar color is underneath bleed through. */
.distribution-percentile-inset {
  position: absolute;
  top: 66.67%;
  transform: translate(-50%, -50%);
  /* fs-6/lh-sm, same reasoning as .distribution-axis-tick-label above. */
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 600;
  white-space: nowrap;
  color: var(--secondary-color-opaque);
}

/* Cosmetic-only: the underlying markup for locked preview items is already
   placeholder content (random score, fixed 50% fills, no real tags) - this
   blur is just visual polish, not the thing keeping the real numbers out. */
.preview-locked {
  filter: blur(2px);
  -webkit-filter: blur(2px);
  user-select: none;
}

/* Locked score numbers get a heavier blur than the chevrons/progress bar. */
.preview-locked-number {
  filter: blur(3px);
  -webkit-filter: blur(3px);
  user-select: none;
}

/* Locked tag placeholders get the same heavier blur. */
.preview-locked-tag {
  filter: blur(3px);
  -webkit-filter: blur(3px);
  user-select: none;
}

/* "Preview" watermark for the free/blurred PDF: position: fixed repeats it
   on every paginated page during Chromium's print-to-PDF conversion, no
   post-processing needed. */
.preview-watermark {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: grid;
  place-content: center;
  font-size: 160px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5rem;
  color: #000;
  opacity: 0.08;
  transform: rotate(-45deg);
  pointer-events: none;
  user-select: none;
}

@media print {
  * {
      -webkit-print-color-adjust: exact !important; /* Safari & Chrome */
      print-color-adjust: exact !important; /* Firefox & Edge */
  }

  .no-print {
      display: none !important;
  }

  .avoid-page-break {
    break-inside: avoid;
    page-break-inside: avoid; /* Legacy support for older PDF engines */
  }
}

.chevron {
  --s:  .5;  /* "pointiness" */
  --t:   1;  /* "thickness"  */

  /* Chrome has issues with CSS variables inside clip-path
   * Gemini-suggested the following workaround seems to be working
   * https://aistudio.google.com/app/prompts/1NCAJ4-reLYaxcp7cmDMngx5tWimTTUhx */
  --offset: calc((1 - var(--t)) * var(--s));

  /* height: 2em; */
  width: 1.2em;
  aspect-ratio: 3/5;
  background: var(--color-primary-bg-subtle);

  clip-path: polygon(
    0%                                         0%,   /* 1. top left     */
    calc((var(--s) - var(--offset)) * 100%)    0%,   /* 2. top right    */
    calc((1 - var(--offset)) * 100%)          50%,   /* 3. middle right */
    calc((var(--s) - var(--offset)) * 100%)  100%,   /* 4. bottom right */
    0%                                       100%,   /* 5. bottom left  */
    calc((1 - var(--s)) * 100%)               50%    /* 6. middle left  */
  );
}

.chevron-stack {
  position: relative;
  width: 1.2em;
  aspect-ratio: 3/5;
}

.chevron-stack-card {
  width: .96em; /* Let the child's aspect ratio determine width */
}

.chevron-stack .chevron {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.chevron-active {
  background: var(--color-primary);
}

.chevron-card {
  width: .96em;
}

.chevron-left {
  transform: scaleX(-1);
}

/* smooshing the chevrons together */
.chevron-card-group-smooshed > * {
  margin-left: -0.4em !important;
}

.chevron-complementary {
  background: color-mix(in srgb, var(--trait-color-complementary), white 75%);
}

.chevron-complementary-active {
  background: var(--trait-color-complementary);
}

.highlight-animation {
  animation: highlight 1s ease-out;
}

@keyframes highlight {
  0% {
    background-color: transparent;
  }
  25% {
    background-color: var(--color-primary-bg-subtle);
  }
  100% {
    background-color: transparent;
  }
}

/* ---- Utility layer ----
   Small, generic, reused-everywhere primitives (spacing/flex/display/
   text) kept as atomic classes rather than invented per-element names -
   see the final migration report for why. Everything else (navbar,
   buttons, cards, forms, badges, alerts, ...) gets a real semantic name
   above instead. Values match Bootstrap's own spacer scale exactly.

   Deliberately placed LAST in the file (after every component rule
   above) rather than using !important: every utility here is a single
   class selector, same specificity as the component classes it's meant
   to override (.card-body, .grid-row, .button-sm, ...), so loading last
   is what lets it win by source order alone. Keep it last if this file
   is ever reorganized - moving it back above the component rules would
   silently flip which side wins (confirmed via a full PDF pixel-diff
   when this was first tried without !important and without the reorder:
   every page showed real pixel drift from component padding/margin
   rules winning instead of the intended utility override). */

.u-d-flex { display: flex; }
.u-d-block { display: block; }
.u-d-inline-block { display: inline-block; }

.u-flex-row { flex-direction: row; }
.u-flex-row-reverse { flex-direction: row-reverse; }
.u-flex-column { flex-direction: column; }
.u-flex-wrap { flex-wrap: wrap; }
.u-flex-nowrap { flex-wrap: nowrap; }
.u-justify-content-start { justify-content: flex-start; }
.u-justify-content-end { justify-content: flex-end; }
.u-justify-content-center { justify-content: center; }
.u-justify-content-between { justify-content: space-between; }
.u-justify-content-evenly { justify-content: space-evenly; }
.u-align-items-start { align-items: flex-start; }
.u-align-items-center { align-items: center; }
.u-align-items-end { align-items: flex-end; }
.u-align-self-end { align-self: flex-end; }
.u-gap-0 { gap: 0; }
.u-gap-1 { gap: 0.25rem; }
.u-gap-2 { gap: 0.5rem; }
.u-gap-3 { gap: 1rem; }
.u-gap-4 { gap: 1.5rem; }

.u-position-relative { position: relative; }
.u-position-absolute { position: absolute; }
.u-start-50 { left: 50%; }
.u-translate-middle-x { transform: translateX(-50%); }

.u-w-50 { width: 50%; }
.u-w-100 { width: 100%; }
.u-h-75 { height: 75%; }
.u-mw-100 { max-width: 100%; }
.u-mh-100 { max-height: 100%; }

.u-m-0 { margin: 0; }
.u-mt-0 { margin-top: 0; }
.u-mb-0 { margin-bottom: 0; }
.u-ms-0 { margin-left: 0; }
.u-me-0 { margin-right: 0; }
.u-mx-0 { margin-left: 0; margin-right: 0; }
.u-my-0 { margin-top: 0; margin-bottom: 0; }
.u-p-0 { padding: 0; }
.u-pt-0 { padding-top: 0; }
.u-pe-0 { padding-right: 0; }
.u-ps-0 { padding-left: 0; }
.u-px-0 { padding-left: 0; padding-right: 0; }
.u-py-0 { padding-top: 0; padding-bottom: 0; }
.u-m-1 { margin: 0.25rem; }
.u-mt-1 { margin-top: 0.25rem; }
.u-mb-1 { margin-bottom: 0.25rem; }
.u-ms-1 { margin-left: 0.25rem; }
.u-me-1 { margin-right: 0.25rem; }
.u-mx-1 { margin-left: 0.25rem; margin-right: 0.25rem; }
.u-my-1 { margin-top: 0.25rem; margin-bottom: 0.25rem; }
.u-p-1 { padding: 0.25rem; }
.u-pt-1 { padding-top: 0.25rem; }
.u-pe-1 { padding-right: 0.25rem; }
.u-ps-1 { padding-left: 0.25rem; }
.u-px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.u-py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.u-m-2 { margin: 0.5rem; }
.u-mt-2 { margin-top: 0.5rem; }
.u-mb-2 { margin-bottom: 0.5rem; }
.u-ms-2 { margin-left: 0.5rem; }
.u-me-2 { margin-right: 0.5rem; }
.u-mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.u-my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.u-p-2 { padding: 0.5rem; }
.u-pt-2 { padding-top: 0.5rem; }
.u-pe-2 { padding-right: 0.5rem; }
.u-ps-2 { padding-left: 0.5rem; }
.u-px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.u-py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.u-m-3 { margin: 1rem; }
.u-mt-3 { margin-top: 1rem; }
.u-mb-3 { margin-bottom: 1rem; }
.u-ms-3 { margin-left: 1rem; }
.u-me-3 { margin-right: 1rem; }
.u-mx-3 { margin-left: 1rem; margin-right: 1rem; }
.u-my-3 { margin-top: 1rem; margin-bottom: 1rem; }
.u-p-3 { padding: 1rem; }
.u-pt-3 { padding-top: 1rem; }
.u-pe-3 { padding-right: 1rem; }
.u-ps-3 { padding-left: 1rem; }
.u-px-3 { padding-left: 1rem; padding-right: 1rem; }
.u-py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.u-m-4 { margin: 1.5rem; }
.u-mt-4 { margin-top: 1.5rem; }
.u-mb-4 { margin-bottom: 1.5rem; }
.u-ms-4 { margin-left: 1.5rem; }
.u-me-4 { margin-right: 1.5rem; }
.u-mx-4 { margin-left: 1.5rem; margin-right: 1.5rem; }
.u-my-4 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.u-p-4 { padding: 1.5rem; }
.u-pt-4 { padding-top: 1.5rem; }
.u-pe-4 { padding-right: 1.5rem; }
.u-ps-4 { padding-left: 1.5rem; }
.u-px-4 { padding-left: 1.5rem; padding-right: 1.5rem; }
.u-py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.u-m-5 { margin: 3rem; }
.u-mt-5 { margin-top: 3rem; }
.u-mb-5 { margin-bottom: 3rem; }
.u-ms-5 { margin-left: 3rem; }
.u-me-5 { margin-right: 3rem; }
.u-mx-5 { margin-left: 3rem; margin-right: 3rem; }
.u-my-5 { margin-top: 3rem; margin-bottom: 3rem; }
.u-p-5 { padding: 3rem; }
.u-pt-5 { padding-top: 3rem; }
.u-pe-5 { padding-right: 3rem; }
.u-ps-5 { padding-left: 3rem; }
.u-px-5 { padding-left: 3rem; padding-right: 3rem; }
.u-py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.u-ms-auto { margin-left: auto; }

.u-text-start { text-align: left; }
.u-text-center { text-align: center; }
.u-text-end { text-align: right; }
.u-text-uppercase { text-transform: uppercase; }
.u-text-break { word-wrap: break-word; word-break: break-word; }
.u-fst-italic { font-style: italic; }
.u-lh-sm { line-height: 1.25; }
.u-font-monospace { font-family: var(--monospace-font-family); }

.u-fw-light { font-weight: 300; }
.u-fw-normal { font-weight: 400; }
.u-fw-medium { font-weight: 500; }
.u-fw-semibold { font-weight: 600; }
.u-fw-bold { font-weight: 700; }

.u-fs-4 { font-size: clamp(1.275rem, 1.275rem + 0.3vw, 1.5rem); }
.u-fs-5 { font-size: 1.25rem; }
.u-fs-6 { font-size: 1rem; }

.u-rounded { border-radius: var(--border-radius); }
.u-rounded-pill { border-radius: var(--border-radius-pill); }
.u-rounded-circle { border-radius: 50%; }

.u-border {
  border: var(--border-width) solid var(--border-color);
}
.u-border-3 { border-width: 3px; }
/* --border-opacity is written to directly (inline style) by
   camcorder_controller.js for its audio-reactive recording border -
   keep this rgba()+opacity-var mechanism intact, not a flat color. */
.u-border-primary {
  --border-opacity: 1;
  border-color: rgba(var(--color-primary-rgb), var(--border-opacity));
}
.u-border-secondary {
  --border-opacity: 1;
  border-color: rgba(var(--color-secondary-rgb), var(--border-opacity));
}

.u-shadow { box-shadow: var(--box-shadow); }

.u-bg-primary { background-color: var(--color-primary); }
.u-bg-secondary { background-color: var(--color-secondary); }
.u-bg-info { background-color: var(--color-info); }
.u-bg-secondary-subtle { background-color: var(--color-secondary-bg-subtle); }
.u-bg-info-subtle { background-color: var(--color-info-bg-subtle); }
.u-bg-light { background-color: var(--color-light); }
.u-bg-white { background-color: #fff; }

.u-text-primary { color: var(--color-primary); }
.u-text-secondary { color: var(--color-secondary); }
.u-text-secondary-emphasis { color: #006566; }
.u-text-white { color: #fff; }
.u-text-light { color: var(--color-light); }
.u-text-muted { color: #8888AA; }
.u-text-body { color: var(--body-color); }
.u-text-body-secondary { color: var(--secondary-color); }
.u-text-body-tertiary { color: rgba(61, 44, 77, 0.5); }
.u-text-decoration-none { text-decoration: none; }
.u-text-small { font-size: 0.875rem; }

.u-ratio-16x9 {
  position: relative;
  width: 100%;
}
.u-ratio-16x9::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}
.u-ratio-16x9 > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

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