/* -------------------------------------------------------------
   Global & Base styles
   ------------------------------------------------------------- */
/* @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap"); */

/* ------------------------------------------------------------------
   Design tokens – define once, reuse everywhere
------------------------------------------------------------------ */
:root {
  /* Greys */
  --grey-05: #f7f7f7;
  --grey-10: #ececec;
  --grey-20: #d9d9d9;
  --grey-30: #bdbdbd;

  /* Brand / semantic */
  --green-20: #d4f5d8;
  --green-80: #1f8d3c;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  padding-top: 48px; /* navbar offset */
  background: #f5f5f5;
  font-family: "Poppins", sans-serif;
  color: #555;
}

hr {
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1rem 0;
}

.hidden {
  display: none !important;
} /* utility */

/* -------------------------------------------------------------
      Typography helpers
      ------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  margin: 1.5rem 0;
  line-height: 1.3;
  color: #333;
}

#sustainability-form h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 2rem;
}
#sustainability-form h2 {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}
#sustainability-form h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #444;
}
#sustainability-form h4 {
  font-size: 1rem;
}

#sustainability-form h1,
#sustainability-form h2,
#sustainability-form h3 {
  color: #333;
  margin: 1.5rem 0;
  line-height: 1.3;
}

/* first heading in a step – remove top margin */
.form-step h1:first-child,
.form-step h2:first-child,
.form-step h3:first-child {
  margin-top: 0;
}

/* -------------------------------------------------------------
      Navbar
      ------------------------------------------------------------- */
.navbar {
  position: fixed;
  inset: 0 0 auto 0; /* top full‑width */
  z-index: 1000;
  display: flex;
  align-items: center;
  height: 48px; /* thinner */
  padding: 0.4rem 1.2rem;
  background: #fff;
  color: #333;
  border-bottom: 1px solid #eaeaea;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.navbar-logo {
  height: 48px;
  margin-right: 4rem;
  border-radius: 4px;
}
.navbar-title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  padding-top: 2px;
}

/* -------------------------------------------------------------
      Main form wrapper
      ------------------------------------------------------------- */
#sustainability-form {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* progress indicator (if used) */
.form-progress {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

/* -------------------------------------------------------------
      Step container & navigation
      ------------------------------------------------------------- */
.form-step {
  display: none;
  flex-direction: column;
  min-height: 500px;
  background: #fff;
  padding: 2rem;
  border-radius: 6px;
  margin: -1rem; /* override parent padding */
}
.form-step.active {
  display: flex;
}

.form-buttons {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.agree-all-container {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
/* -------------------------------------------------------------
      Buttons
      ------------------------------------------------------------- */
button,
.link-btn,
.edit-btn {
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  transition: all 0.2s ease;
}

button {
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: #ececec;
  color: #333;
}
button:hover {
  background: #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

button[type="submit"] {
  background: #4a4a4a;
  color: #fff;
}
button[type="submit"]:hover {
  background: #363636;
}

.link-btn,
.edit-btn {
  background: none;
  color: #007bff;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}

/* -------------------------------------------------------------
      Form controls (inputs, selects, textarea)
      ------------------------------------------------------------- */
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: #444;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background: #f9f9f9;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  background: #fff;
  border-color: #aaa;
  outline: none;
  box-shadow: 0 0 0 3px rgba(170, 170, 170, 0.1);
}

/* company grid (compact edit form) */
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem 2rem;
}
.company-grid .form-group {
  display: flex;
  flex-direction: column;
}

/* -------------------------------------------------------------
   Card-summary & Edit blocks
   ------------------------------------------------------------- */
.card-summary {
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  padding: 1.5rem;
  margin-top: 40px;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-rows: 1fr;
  min-height: 380px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: auto 0;
}

/* Summary items styling */
.summary-list > div {
  padding: 0.6rem 0;
  border-bottom: 1px solid #eee;
}

.summary-list > div:first-child {
  grid-column: 1 / -1;
  border-bottom: 2px solid #ddd;
  margin-bottom: 0.5rem;
}

.summary-list > div:last-child {
  border-bottom: 0;
}

.summary-list dt,
.summary-list dd {
  padding: 0.4rem 0.5rem;
  margin: 0;
}

/* Edit form styling */
.summary-list .form-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #eee;
}

.summary-list .form-group.full-span {
  grid-column: 1 / -1;
  border-bottom: 2px solid #ddd;
  padding-bottom: 0.8rem;
  margin-bottom: 0.5rem;
}

.summary-list input,
.summary-list select {
  background: white;
  border: 1px solid #ddd;
  padding: 0.3rem 0 !important;
  margin: 0;
}

.summary-list input:focus,
.summary-list select:focus {
  background: #fff;
  border-color: #aaa;
}

/* Utility classes */
.hidden {
  display: none !important;
}

.form-buttons {
  margin-top: auto;
  padding-top: 1.5rem;
}

/* -------------------------------------------------------------
      Comparison / Questions area
      ------------------------------------------------------------- */
.category-heading {
  font-size: 1.1rem;
  font-weight: 500;
  color: #444;
  margin: 2rem 0 1rem;
  padding-left: 1rem;
  border-left: 4px solid #ccc;
}

/* scroll‑help text */
.scroll-instructions {
  font-size: 0.85rem;
  color: #666;
  margin: -0.5rem 0 0.5rem;
}

/* Change‑response link */
.change-response {
  margin-left: 0.4rem;
  font-size: 0.8rem;
  text-decoration: underline;
  color: #007bff;
  cursor: pointer;
}
.change-response:hover {
  text-decoration: none;
}

/* Mark‑all / group containers */
.agree-group-container,
.agree-all-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.agree-group-container {
  margin-top: 0.5rem;
}
.agree-group-label,
.agree-all-label {
  margin-left: 0.5rem;
  font-size: 0.95rem;
  color: #333;
}

/* -------------------------------------------------------------
      Tables
      ------------------------------------------------------------- */
.response-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-family: "Arial", sans-serif;
  font-size: 0.8rem;
}
.response-table th,
.response-table td {
  border: 1px solid #ddd;
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: middle;
}
.response-table th {
  background: #f7f7f7;
  font-weight: 600;
}

/* radio alignment */
.response-table label {
  display: inline-flex;
  margin-right: 1rem;
}
.response-table input[type="radio"] {
  vertical-align: middle;
  margin-right: 0.25rem;
}

/* -------------------------------------------------------------
      Toggle switches
      ------------------------------------------------------------- */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #ccc;
  border-radius: 24px;
  transition: 0.4s;
}
.slider:before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background: #fff;
  border-radius: 50%;
  transition: 0.4s;
}
.switch input:checked + .slider {
  background: #2196f3;
}
.switch input:checked + .slider:before {
  transform: translateX(16px);
}

/* -------------------------------------------------------------
      Popovers / Tooltip
      ------------------------------------------------------------- */
.popover {
  position: relative;
  margin-left: 0.5rem;
  cursor: pointer;
  color: #007bff;
}
.popover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: 120%;
  transform: translateX(-50%);
  width: 220px;
  padding: 6px 10px;
  text-align: center;
  background: #333;
  color: #fff;
  font-size: 0.8rem;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  white-space: pre-wrap;
  transition: opacity 0.3s;
  z-index: 10;
}
.popover:hover::after {
  opacity: 1;
}

/* -------------------------------------------------------------
      Floating TOC
      ------------------------------------------------------------- */
.content-with-toc {
  position: relative;
  display: flex;
  gap: 2rem;
}
.scrollable-toggles-container {
  flex: 1;
  max-width: calc(100% - 20px);
}

.floating-toc {
  position: absolute;
  top: 1rem;
  right: -200px;
  width: 200px;
  padding: 1rem;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}
.floating-toc.visible,
.floating-toc:hover,
.floating-toc:has(input:checked) {
  opacity: 1;
  visibility: visible;
}

.toc-table {
  width: 100%;
  border-collapse: collapse;
}
.toc-table td {
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
}
.toc-label {
  font-size: 0.95rem;
}
.toc-status {
  width: 40px;
  text-align: right;
}
.status-icon::before {
  content: "";
}
.completed .status-icon::before {
  content: "✔";
  font-size: 1.1rem;
  font-weight: bold;
  color: green;
}

/* -------------------------------------------------------------
      Declaration checkbox
      ------------------------------------------------------------- */
.declaration-checkbox {
  width: 50%;
  margin: 1rem auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.declaration-checkbox input {
  width: 20px;
  margin-right: 0.5rem;
  cursor: pointer;
}
.declaration-checkbox label {
  display: inline-flex;
  align-items: center;
}

/* -------------------------------------------------------------
      Company logo placeholder
      ------------------------------------------------------------- */
.company-logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}
.company-logo {
  max-width: 320px;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}
.company-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: auto;
  background: #f0f0f0;
  color: #666;
  font-size: 0.9rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin: 0 auto 2rem;
}

.score-grid {
  display: grid;
  grid-template-columns: 220px repeat(3, 1fr);
  gap: 0.25rem 0.5rem;
  align-items: center;
}
.score-col.score-header {
  font-weight: 600;
  text-align: center;
}
.score-row {
  font-weight: 500;
}
.score-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.score-badge {
  display: inline-block;
  min-width: 3.5rem;
  margin-left: 0.5rem;
  padding: 0.15em 0.4em;
  border-radius: 0.35em;
  font-size: 0.85em;
  text-align: center;
  font-weight: 600;
}
.score-badge.no-score {
  background: #ccc;
  color: #444;
}
.topic-heading {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* 1. Accordion visuals ------------------------------------------------ */

/* hide all bodies by default */
/* ───────── Accordion visibility & animation ───────── */
.accordion-body {
  overflow: hidden; /* enable clip */
  max-height: 0; /* collapsed   */
  transition: max-height 0.35s ease; /* animate     */
}

/* expanded state – let JS set the correct max-height on click */
.accordion-header[aria-expanded="true"] + .accordion-body {
  max-height: 999px; /* emergency value in case JS doesn’t run */
}

/* ───────── “Mark confirmed” switch (reuse existing switch) ───────── */
.agree-topic-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* shrink the switch a little for the header bar */
.agree-topic-label .switch {
  width: 34px;
  height: 20px;
}
.agree-topic-label .slider:before {
  height: 12px;
  width: 12px;
  left: 4px;
  bottom: 4px;
}
.agree-topic-label .switch input:checked + .slider:before {
  transform: translateX(14px);
}

.accordion-item {
  border: 1px solid var(--grey-20);
  border-radius: 4px;
  margin: 0.75rem 1rem; /* left/right indent like old blocks */
  background: #fff;
}

/* darker chevron colour so it remains visible on light bg */
.accordion-header .chevron {
  color: #555;
}

/* 2. Table spacing inside accordion ---------------------------------- */
.accordion-body {
  padding: 0; /* remove extra white space */
}

.accordion-body .response-table {
  margin: 0; /* no extra top margin */
  border: none; /* rely on row borders only */
}
.accordion-body .response-table th {
  background: var(--grey-05);
}

/* 3. Retire legacy .comparison-table-block box model ------------------ */
.scrollable-toggles-container .comparison-table-block {
  padding: 0;
  margin: 0;
  border: 0;
}

/* 1. the whole bar --------------------------------------------------- */
.accordion-header {
  display: flex; /* put everything on one horizontal line  */
  align-items: center; /* vertical centring of text + badge      */
  gap: 0.75rem; /* space between chevron / label / badge  */
  padding: 0.35rem 0.75rem; /* some breathing-room                    */

  /* optional: give it a consistent height so columns line-up */
  min-height: 2.25rem;
}

/* 2. make the topic title take the remaining width ------------------ */
.accordion-header .topic-label {
  flex: 1 1 auto; /* grow/shrink to fill available space    */
  font-weight: 600;
  white-space: nowrap; /* keep long headings on one line         */
  overflow: hidden; /* crop if still too long                 */
  text-overflow: ellipsis;
}

/* 3. the score badge ------------------------------------------------- */
.score-badge {
  flex: 0 0 auto; /* fixed width – doesn’t stretch          */
  min-width: 3.2rem; /* enough for “100%” + padding            */
  text-align: center;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-variant-numeric: tabular-nums; /* nicer horizontal alignment      */

  /* colours – tweak to taste */
  background: #f0f2f4;
  color: #222;
}
.score-badge.has-score {
  /* only when you have a real %            */
  background: #dfe9ff;
  color: #1142c6;
}

/* 4. the “Mark confirmed” checkbox + label -------------------------- */
.agree-topic-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  flex: 0 0 auto; /* keep it the same size                  */
  white-space: nowrap;
}

/* tick-spot: blank by default, ✓ when .is-confirmed */
.confirm-icon {
  display: inline-block;
  width: 1.4rem; /* keeps space even when empty */
  height: 1.4rem;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.4rem;
  text-align: center;
  font-weight: 700;
  color: #fff; /* hidden until confirmed */
  background: transparent;
  transition: background 0.2s, border 0.2s;
}

.confirm-icon.is-confirmed {
  background: var(--green-80);
  border-color: var(--green-80);
  color: #fff;
}
.confirm-icon.is-confirmed::before {
  content: "✓";
}

/* in header bar keep it compact */
.accordion-header .confirm-icon {
  margin-left: 0.25rem;
}

/* “Confirm all” wrapper */
.category-confirm-wrapper {
  margin: 0.6rem 1rem 1.2rem;
  display: flex;
  justify-content: flex-end;
  font-size: 0.85rem;
}

/* === Normative-range panel =========================================== */
.normative-grid {
  display: grid;
  grid-template-columns: 9rem 1fr; /* Wider first column */
  gap: 4rem 4rem; /* Increased spacing */
  align-items: center;
  padding: 1rem 0; /* Vertical breathing room */
}

.pillar-name {
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #2d3748; /* Darker text for better contrast */
  font-size: 0.95rem;
}

.range-bar {
  position: relative;
  height: 2rem;
  border-radius: 1rem;

  /* tick-marks every 25 % */
  background: repeating-linear-gradient(
        90deg,
        transparent 0 calc(25% - 1px),
        rgba(255, 255, 255, 0.4) 0 25%
      )
      1px 0 / 100% 100%,
    /* softened gradient */
      linear-gradient(
        90deg,
        hsl(4 75% 75%) 0 25%,
        /* soft coral   */ hsl(45 85% 65%) 25% 75%,
        /* warm amber   */ hsl(145 45% 60%) 75% 100% /* mid-mint green */
      );

  overflow: visible;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Tick mark enhancements */
.range-bar::before {
  content: "";
  background: repeating-linear-gradient(
    90deg,
    transparent 0 calc(25% - 1px),
    rgba(255, 255, 255, 0.5) 0 25%
  );
}

.marker {
  width: 4px; /* Thicker marker */
  background: #2d3748; /* Dark gray for better contrast */
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9),
    /* White border effect */ 0 2px 4px rgba(0, 0, 0, 0.2); /* Deeper shadow */
  z-index: 2;
}

.marker-label {
  position: absolute;
  top: -1.5rem; /* Raise label higher */
  background: #2d3748; /* Dark background */
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%) translateY(-2px);
  white-space: nowrap;
  z-index: 2;
}
/* ──────────────────────────────────────────────────────────────
   RANGE-BAR  — visual fixes + 10 % tick-marks
   ────────────────────────────────────────────────────────────── */

/* 1 ▸ give the marker its full-height line */
.range-bar .marker {
  position: absolute;
  top: 0; /* already in your rule, but ensure it’s there   */
  bottom: 0; /* full height                                   */
  width: 1px;
  background: #2d3748;
  transform: translateX(-50%);
  z-index: 1;
}

/* 2 ▸ move tick-marks to ::before so they can span the whole width */
.range-bar::before {
  content: "";
  position: absolute;
  inset: 0; /* full size of the bar               */
  border-radius: inherit; /* keep ticks inside rounded ends     */
  pointer-events: none;

  /* tick every 10 % (1-px line, faint) */
  background: repeating-linear-gradient(
    90deg,
    transparent 0 calc(10% - 1px),
    /* gap        */ rgba(255, 255, 255, 0.25) calc(10% - 1px) 10%
      /* slim tick  */
  );
}

/* Shared scale row --------------------------------------------------- */
.bar-scale {
  position: relative; /* establishes a containing block  */
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #718096;
  pointer-events: none;
  height: 1em; /* so ::before can fill the line   */
}

/* create the five tick-points with a helper grid */
.bar-scale::before {
  content: "";
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 25%) 0; /* 0|25|50|75|100             */
}

/* style every label the same first … */
.bar-scale span {
  position: absolute; /* we’ll place them manually       */
  top: 0;
  transform: translateX(-50%); /* centre on its anchor            */
}

/* … then anchor each one with nth-child ----------------------------- */
.bar-scale span:nth-child(1) {
  left: 0%;
  transform: none;
  text-align: left;
}
.bar-scale span:nth-child(2) {
  left: 25%;
}
.bar-scale span:nth-child(3) {
  left: 50%;
}
.bar-scale span:nth-child(4) {
  left: 75%;
}
.bar-scale span:nth-child(5) {
  left: 95%;
  transform: none;
  text-align: right;
}

/* wrapper keeps bar + ruler + topic badges together ----------------- */
.range-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.3rem; /* space between layers            */
}

/* five-slot topic strip under each bar ------------------------------ */
.topic-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.25rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
}

.topic-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  text-align: center;
}

/* pill-shaped badge -------------------------------------------------- */
.topic-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem; /* room for the word                     */
  border-radius: 1rem; /* pill shape                            */
  font-size: 0.7rem;
  font-weight: 600;
  background: #edf2f7; /* neutral background                    */
  color: inherit; /* text colour comes from rating class   */
  white-space: nowrap; /* keep word on one line                 */
}

/* rating colours (text only) --------------------------------------- */
.rating-excellent {
  color: hsl(145 45% 35%);
} /* green  */
.rating-good {
  color: hsl(45 80% 38%);
} /* amber  */
.rating-fair {
  color: hsl(4 65% 45%);
} /* coral  */
.rating-poor {
  color: hsl(4 65% 45%);
} /* same coral, adjust if desired */

.range-wrapper .topic-label {
  font-size: 0.65rem;
  line-height: 1.1; /* tighter lines so two-line labels fit */
  white-space: normal; /* allow wrapping                        */
  word-break: break-word;
  text-align: center;
}

.topic-heading {
  margin: 0.2rem 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #4a5568;
}

/* single-column grid: each pillar forms a vertical stack */
.normative-grid.single-col {
  display: grid;
  grid-template-columns: 1fr; /* single, full-width column          */
  gap: 1.25rem; /* space between pillar blocks        */
}

/* pillar heading --------------------------------------------------- */
.pillar-heading {
  margin: 0.2rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  color: #2d3748;
}

/* centre the bar / scale / list ----------------------------------- */
.range-wrapper.centred {
  display: flex;
  flex-direction: column;
  align-items: center; /* horizontally centre child elements */
  gap: 0.35rem;
  width: 100%;
}

/* topic heading under the bar                                       */
.topic-heading {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a5568;
  letter-spacing: 0.03em;
  margin: 1.5rem 0 0.35rem;
  text-align: center;
}

/* make the bar & ruler stretch the full card width ------------------ */
.range-wrapper.centred .range-bar,
.range-wrapper.centred .bar-scale {
  width: 100%;
  max-width: 640px; /* optional cap: remove if you want edge-to-edge */
}

/* correct 100 % label placement ------------------------------------- */
.bar-scale span:nth-child(5) {
  left: 100%;
  transform: none;
  text-align: right;
}
