:root {
    --desktop-padding: 1em;
    --mobile-padding: 0.5em;

    --radio-border: #9ca3af;
    --radio-checked: #2563eb;
    --radio-focus: #93c5fd;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, "Helvetica Neue", Arial,
                 "Noto Sans", "Liberation Sans", sans-serif;
}
html {
    font-size: 16px; /* never smaller for apps */
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.55;
    color:
}

.main-nav {
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.nav-brand a {
    font-weight: bold;
    text-decoration: none;
    color: #222;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Mobile */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;       
        top: 3em;            
        right: -100%;         
        width: 200px;          
        height: calc(100% - 3em);
        display: flex;
        flex-direction: column;
        transition: right 0.3s ease;
        background: #fff;      
        padding-right: 5px;
        text-align: right;
        border-left: 5px solid lightblue; 
        z-index: 1000;   
        padding: 1em;      
    }

    .nav-links.is-open {
        right: 0;              
    }
}

main, footer, nav {
    padding-block: 1rem;
}

.visits-section, .item-list {
    max-height: 250px;
    max-width: 100%;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.list-item.clickable {
    background-color: lightgray;
}

.list-item.clickable:hover {
    background-color: whitesmoke;
}

.visit-chip, .list-item {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  padding: 0.25em 1em;
  border-radius: 1em;
  text-decoration: none;
  color: black;
}

.visit-chip.none {
    background-color: lightgray;
}

.visit-chip.started {
    background-color: lightblue;
}

.visit-chip.completed {
    background-color: lightgreen;
}

.section {
    position: relative
}

.section-btn {
    position: absolute;
    top: 0;
    right: 1em;
    text-decoration: none;
    color: blue;
    font-weight: bold;
    background-color: lightblue;
    border: 1px solid blue;
    padding: 0.25em 1em;
    border-radius: 1em;
}

.section-btn:hover {
    color: whitesmoke;
    background-color: darkblue;
}

.item-list {
    display: flex;
    flex-direction: column;
    gap: 1em;
    max-height: 50vh;
    overflow: auto;
}

form > p {
    flex-direction: column;
    display: flex;
}

.btn-section {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
  font-size: 0.6rem;
}

a.button, button {
  all: unset;
  text-decoration: none;
  color: darkblue;
  background-color: lightblue;
  padding: 0.5em 1em;
  border-radius: 5px;
  font-size: 0.8em;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: black;
}

a.button:hover, button:hover {
    opacity: 0.8;
}

a.button.delete-btn, button.delete-btn {
    color: darkred;
    background-color: rgb(243, 171, 171);
}

h1, h2, h3, h4 {
    position: relative;
}

.heading-label {
  position: absolute;
  top: -1.5em;
  left: 0;
  font-size: 0.8rem;
  opacity: 0.8;
  color: gray;
  text-transform: uppercase;
}

.section-chip {
  margin-block: 0.5em;
  border-bottom: 1px solid lightgray;
  padding-block: 0.5em;
  border-top: 1px solid lightgray;
  border-left: 10px solid lightgray;
  border-bottom: 1px solid lightgray;
  padding-left: 1em;
}

.move-btns > a, .move-btns > div {
  width: 20px;
  height: 100%;
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
  flex: 1;
  text-decoration: none;
  color: black;
}

.move-btns > a:hover, .move-btns > div:hover {
    opacity: 0.8;
    background-color: whitesmoke;
}

.move-btns > div.placeholder {
    cursor:not-allowed;
    background-color: gray;
}

.move-btns {
  display: flex;
  align-items: center;
  background-color: lightgray;
  border-radius: 5px;
  border: 1px solid gray;
  width: 50px;
  overflow: hidden;
}

.move-btns:first-child {
    border-right: 0.5px solid gray;
}

.question-chip {
    font-size: 0.9rem;
    border-top: 0.5px solid lightgray;
    border-left: 5px solid lightgray;
    border-bottom: 0.5px solid lightgray;
    padding-left: 0.5em;
    margin-block: 0.5em;
    padding-block: 0.5em;
}

.question-chip > .question-labels {
    font-size: 0.8em;
    opacity: 0.8;
    display: flex;
    flex-wrap: nowrap;
    gap: 1em;
    margin-block: 0.5em;
}

.scale-radio {
    display: flex;
    justify-content: space-between;
    margin-block: 0.5em;
}

.scale-radio__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    background-color: whitesmoke;
    border-left: 1px solid lightgray;
    border-block: 1px solid lightgray;
    position: relative;
}

.scale-radio:last-child {
    border-right: 1px solid lightgray;
}

.scale-radio__item:hover {
    background-color: lightgray;
}


.scale-radio__item input[type="radio"] {
    appearance: none;
    width: 100%;
    height: 2.5em;
    border: 0;
    position: relative;
}

.scale-radio__item input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    background-color: #0000ff30;
    width: 100%;
    height: 100%;
    color: blue;
}

.scale-radio__label {
    font-size: 0;
}

.scale-radio__item label {
    font-size: 0;
}

.label-hints, .number-hints {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
    font-size: 0.8rem;
    opacity: 0.8;
}

.progress-wrapper {
    margin: 1.5rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb; /* light gray */
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #2563eb; /* blue */
    width: 0;
    transition: width 0.3s ease;
}

.progress-label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #374151;
    text-align: right;
}
/* Base container: full width on mobile */
.container {
    width: calc(100% - 1rem);
    padding-inline: 0.5rem;   /* horizontal padding */
    margin-inline: auto;
}

/* Desktop and up */
@media (min-width: 1024px) {
    .container {
        max-width: 1100px;  /* adjust to taste */
        padding-inline: 2rem;
    }
}

/* viewport */
.survey-section-list {
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* horizontal track */
.section-tracker {
    display: flex;
    flex-direction: row;
    width: 100%;

    transition: transform 0.4s ease-in-out;
    will-change: transform;
}

/* slides */
.section-tracker > div.fieldset {
    flex: 0 0 100%;
    padding-block: 1em;
    border: 0;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: auto;
}


form.survey-form {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

form.survey-form,
.survey-section-list,
.section-tracker {
    height: 80vh
}

.section-tracker {
    min-height: 0;
}

div.fieldset .question {
    padding-left: var(--desktop-padding);
    border-left: 5px solid lightgray;
    margin-block: 4em;
    padding-block: 2em;
    width: calc(100% - var(--desktop-padding));
}

@media (max-width: 768px) {
    div.fieldset .question {
        padding-left: var(--mobile-padding);
        width: calc(100% - var(--mobile-padding));
    }
    div.fieldset-container {
        padding-inline-end: var(--mobile-padding);
    }
}

@media (min-width: 768px) {
    div.fieldset-container {
        padding-inline-end: 2em;
    }
}

.section-navigation {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: space-between;
}

.fieldset-container small {
    font-size: 12px;
    opacity: 0.9;
    font-style: italic;
}

/* Remove native radio appearance */
input[type="radio"] {
    /* appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none; */

    width: 1em;
    height: 1em;
    border: 2px solid var(--radio-border, #9ca3af);
    background-color: transparent;

    display: inline-grid;
    place-content: center;

    cursor: pointer;
    margin: 0;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease;
}

/* Inner dot */
input[type="radio"]::before {
    content: "";
    width: 100%;
    height: 100%;
    transition: transform 0.15s ease-in-out;
    background-color: var(--radio-checked, #2563eb);
}

/* Checked state */
input[type="radio"]:checked {
    border-color: var(--radio-checked, #2563eb);
}

input[type="radio"]:checked::before {
    transform: scale(1);
}

/* Focus ring (keyboard accessibility) */
input[type="radio"]:focus-visible {
    outline: 2px solid var(--radio-focus, #93c5fd);
    outline-offset: 2px;
}

/* Disabled */
input[type="radio"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Optional: label alignment */
label:has(input[type="radio"]) {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 5;
}

input[type="radio"]:hover {
    border-color: var(--radio-checked);
}
input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
}
input[type="radio"].has-error {
    --radio-border: #dc2626;
    --radio-checked: #dc2626;
}

span.index-number {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  font-size: 0.8em;
  text-align: center;
  opacity: 0.9;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.section-nav-btn:disabled, .section-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ─────────────────────────────
   Feedback navbar
───────────────────────────── */

.scale-feedback {
    margin-bottom: 0.75rem;
    margin-top: 1.5em;
    display: flex;
    justify-content: center;
}

.scale-feedback__bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    width: 90%;
}

.scale-feedback__fill {
    height: 100%;
    width: 0%; /* Managed by JS */
    border-radius: 999px;
    transition: width 0.35s ease;



    /* 2. Fix the background size to the full width of the parent */
    /* We use 'fixed' or a calculation to ensure it doesn't stretch */
    background-attachment: local; 
    background-size: 100vw; /* Or a fixed pixel width like 400px if your scale is fixed */
    
    /* BEST COMPATIBILITY: Use a fixed background-size matching the container */
    /* If your .scale-feedback__container is 100% of its parent: */
    background-size: var(--scale-total-width, 100% ) 100%;
    background-repeat: no-repeat;
}
.scale-feedback__fill[data-value="0"]  { background-color: #ef4444; } /* Pure Red */
.scale-feedback__fill[data-value="1"]  { background-color: #f87171; }
.scale-feedback__fill[data-value="2"]  { background-color: #fb923c; } /* Orange-Red */
.scale-feedback__fill[data-value="3"]  { background-color: #fbbf24; } /* Orange */
.scale-feedback__fill[data-value="4"]  { background-color: #facc15; } /* Yellow-Orange */
.scale-feedback__fill[data-value="5"]  { background-color: #eab308; } /* Golden Yellow */
.scale-feedback__fill[data-value="6"]  { background-color: #a3e635; } /* Lime */
.scale-feedback__fill[data-value="7"]  { background-color: #4ade80; } /* Light Green */
.scale-feedback__fill[data-value="8"]  { background-color: #22c55e; } /* Green */
.scale-feedback__fill[data-value="9"]  { background-color: #16a34a; } /* Deep Green */
.scale-feedback__fill[data-value="10"] { background-color: #2563eb; }

/* Base styling for all form controls */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="search"],
select,
textarea {
    width: calc(100% - 28px);
    padding: 10px 14px;
    font-size: 16px; /* Prevents iOS auto-zoom */
    font-family: inherit;
    color: #1f2937; /* Dark Gray */
    background-color: #ffffff;
    border: 1px solid #d1d5db; /* Light Gray border */
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
    appearance: none; /* Removes default OS styling */
}

/* Specific fix for Select dropdowns to ensure the arrow stays */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    width: 100%;
}

/* Hover State */
input:hover, select:hover, textarea:hover {
    border-color: #9ca3af;
}

/* Focus State (The "Glow" effect) */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #2563eb; /* Primary Blue */
}

/* Disabled State */
input:disabled, select:disabled, textarea:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    color: #9ca3af;
}

input[type="checkbox"],
input[type="radio"] {
    width: 1.15rem;
    height: 1.15rem;
    cursor: pointer;
    accent-color: #2563eb; /* Modern browsers support this for easy coloring */
    vertical-align: middle;
}

input[type="checkbox"] {
    margin-right: 8px;
}

/* Container for each form field */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
}

/* Error styling (Django's .errorlist or .errors) */
.errorlist {
    color: #dc2626;
    font-size: 0.85rem;
    list-style: none;
    padding: 0;
    margin-top: 5px;
}

input.is-invalid {
    border-color: #dc2626;
    background-color: #fef2f2;
}

.form-field {
    margin-block: 1em;
    position: relative;
}

.question > p {
    font-size: 1.2em;
    font-weight: bold;
}

/* Container for the options */
.option-select-item {
    display: inline-block;

}

/* Hide the actual radio circle */
.option-select-item input[type="radio"] {
    display: none;
}

/* Style the label to look like a button */
.option-select-item label {
    display: inline-block;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
    min-width: 120px; /* Optional: keeps buttons consistent */
    box-sizing: border-box; /* Ensures padding doesn't break width */
}

/* Hover effect */
.option-select-item label:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
}

/* Styled state when the hidden radio is checked */
.option-select-item input[type="radio"]:checked + label, /* If input is before label */
.option-select-item label:has(input:checked) {          /* If input is inside label */
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}

.option-select-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
}

.question-result {
    margin-block: 1.5em;
    background-color: whitesmoke;
    border-radius: 1em;
    padding: 1em;
    display: flex;
    flex-wrap: wrap;
    position: relative;
    padding-bottom: 1.5em;
}

.question-result > .text-section {
    flex: 1;
    position: relative;
    min-width: 180px;
}

.question-result > .scale-chart-container {
    flex: 1;
    min-width: 180px;
}

.scale-chart-container > canva {
    max-width: 100%;
}

.scale-chart-container > form {
  background-color: white;
  margin-left: 1em;
  padding: 1em;
  border-radius: 1em;
  color: #2b2b2b;
  font-size: 0.8em;
  max-width: 100%;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: .25rem;
    font-size: .85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.legend-item .line {
    width: 24px;
    height: 0;
    border-top-width: 2px;
    border-top-style: solid;
}

.line.red {
    border-color: #e63946;
}

.line.green {
    border-color: #2a9d8f;
}

.line.dashed {
    border-top-style: dashed;
}

.responders-disclaimer {
  font-size: 0.75em;
  opacity: 0.75;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding-left: 1em;
}

/* ---- Results navbar container ---- */
.results-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw; /* full viewport width */
    max-width: 100vw; /* prevent overflow */
    box-sizing: border-box; /* include padding in width */
    
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);

    padding: 0.5rem 0.75rem 0.75rem;
    z-index: 1000;

    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* ---- Legend text ---- */
.results-navbar small {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    white-space: nowrap;
}

/* ---- Scrollable tabs row ---- */
.results-navbar .tabs {
    display: flex;
    gap: 0.5rem;

    overflow-x: auto;
    overflow-y: hidden;

    padding-bottom: 0.25rem;

    /* Smooth scrolling on iOS */
    -webkit-overflow-scrolling: touch;

    /* Hide scrollbar (optional, modern browsers) */
    scrollbar-width: none;
}
.results-navbar .tabs::-webkit-scrollbar {
    display: none;
}

/* ---- Individual tab ---- */
.result-nav-item {
    flex: 0 0 auto;

    padding: 0.45rem 0.8rem;
    border-radius: 999px;

    background: #f3f4f6;
    color: #111827;

    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;

    cursor: pointer;
    user-select: none;

    transition: background 0.2s ease, color 0.2s ease;
}

/* ---- Hover / active states ---- */
.result-nav-item:hover {
    background: #e5e7eb;
}

.result-nav-item.active {
    background: #2563eb;
    color: #fff;
}

/* Base chip */
.result-nav-item {
    flex: 0 0 auto;

    padding: 0.45rem 0.85rem;
    border-radius: 999px;

    background: #f3f4f6;
    color: #111827;

    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1;

    cursor: pointer;
    user-select: none;
    white-space: nowrap;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease;
}

/* Hover feedback */
.result-nav-item:hover {
    background: #e5e7eb;
}

/* Active chip */
.result-nav-item.active {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

/* Press feedback (mobile friendly) */
.result-nav-item:active {
    transform: scale(0.96);
}
.result-segment {
    display: none;

    opacity: 0;
    transform: translateY(6px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

/* Visible state */
.result-segment[style*="display:"] {
    display: block;
}

/* Activated segment */
.result-segment:not([style*="display: none"]) {
    opacity: 1;
    transform: translateY(0);
}

.category-badge {
  background-color: darkblue;
  color: whitesmoke;
  padding: 0.5em 1em;
  border-radius: 1em;
  margin-left: 1em;
}

.result-segment {
    display: none;
}

.result-segment.active {
    display: block;
}

.success-message {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #90ee9096;
  border-radius: 1em;
  opacity: 0.9;
  color: darkgreen;
  font-weight: bold;
}

.messages {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    margin: 0;
    padding: 0;
    list-style: none;
    pointer-events: none;
}

.messages li {
    min-width: 280px;
    max-width: 420px;
    padding: 14px 18px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;

    /* animation */
    animation: messageFade 6s ease forwards;
}

/* Message types */
.messages li.success { background: #2a9d8f; }
.messages li.error   { background: #e63946; }
.messages li.warning { background: #f4a261; color: #000; }
.messages li.info    { background: #457b9d; }

/* Fade + slide animation */
@keyframes messageFade {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    10% {
        opacity: 1;
        transform: translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
    }
}

.survey-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Each list item is an anchor (card) */
.survey-list .list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 18px;
    border-radius: 12px;

    text-decoration: none;
    color: #1f2933;

    background: #ffffff;
    border: 1px solid #e5e7eb;

    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

/* Hover / focus */
.survey-list .list-item:hover,
.survey-list .list-item:focus-visible {
    background: #f9fafb;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* Text inside */
.survey-list .list-item p {
    margin: 0;
    font-size: 0.95rem;
}

/* Badge */
.survey-list .badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Badge states */
.survey-list .badge.analyzed {
    background: #e6f6f1;
    color: #1b7f6b;
}

/* Optional: non-analyzed state */
.survey-list .badge.pending {
    background: #fff4e5;
    color: #b45309;
}

/* Optional: completed but not analyzed */
.survey-list .badge.completed {
    background: #e0ecff;
    color: #1d4ed8;
}

/* Mobile tweaks */
@media (max-width: 640px) {
    .survey-list .list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .survey-list .badge {
        align-self: flex-start;
    }
}

/* Overlay */
#satisfaction-survey {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Visible state */
#satisfaction-survey.active {
    opacity: 1;
    pointer-events: auto;
}

/* Modal card */
#satisfaction-survey form {
    background: #fff;
    width: 90%;
    max-width: 700px;
    padding: 2rem;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);

    transform: translateY(40px);
    opacity: 0;
    transition:
        transform 0.35s ease,
        opacity 0.35s ease;
}

/* Enter animation */
#satisfaction-survey.active form {
    transform: translateY(0);
    opacity: 1;
}

/* Close button */
#satisfaction-survey .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    background: none;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}

/* Make options feel clickable */
.option-select-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.option-select-item:hover {
    background: #f5f7fa;
}

.form-loader {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

form.register-form-insitu {
    position: relative;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ==============================
   Content pages (FAQ, docs, legal)
   ============================== */

/* Header */

.content-header {
    margin-bottom: 3rem;
}

.content-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
    color: #0f172a; /* slate-900 */
}

/* ==============================
   Manifesto block
   ============================== */

.manifesto {
    margin-top: 1.5rem;
    padding: 1.75rem 2rem;
    background: #f8fafc;
    border-left: 4px solid #2563eb;
    border-radius: 0.375rem;
}

.manifesto-lead {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #0f172a;
}

.manifesto p {
    margin-bottom: 1rem;
    color: #334155; /* slate-700 */
}

.manifesto-points {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0;
}

.manifesto-points li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
    color: #1f2937;
}

.manifesto-icon {
    color: #2563eb;
    font-size: 0.9rem;
    line-height: 1.6;
}

.manifesto-note {
    font-size: 0.95rem;
    color: #64748b; /* slate-500 */
    margin-top: 1.25rem;
}

/* ==============================
   Sections
   ============================== */

.content-section {
    margin-bottom: 3.5rem;
}

/* Section headers */

.content-section h2 {
    font-size: 1.5rem;
    font-weight: 650;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    color: #1e293b; /* slate-800 */
    border-bottom: 1px solid #e5e7eb;
}

/* Questions */

.content-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.75rem;
    margin-bottom: 0.4rem;
    color: #2563eb; /* accent color */
}

/* ==============================
   Text
   ============================== */

.content-section p {
    margin: 0.4rem 0 1rem;
    line-height: 1.7;
    color: #334155; /* slate-700 */
}

/* ==============================
   Lists (fixed color issue)
   ============================== */

.content-section ul,
.content-section ol {
    margin: 1rem 0 1.5rem;
    padding-left: 1.25rem;
    color: #334155; /* ensure same as text */
}

.content-section li {
    margin-bottom: 0.45rem;
    line-height: 1.6;
}

/* ==============================
   Links
   ============================== */

.content-section a,
.manifesto a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.content-section a:hover,
.manifesto a:hover {
    text-decoration: none;
}

/* ==============================
   Subtle separators & rhythm
   ============================== */

.content-section + .content-section {
    margin-top: 4rem;
}

/* Anchor offset (if you link to questions) */
.content-section {
    scroll-margin-top: 6rem;
}


.site-footer {
    margin-top: 4rem;
    padding: 2.5rem 0 1.5rem;
    background-color: #f7f9fb;
    border-top: 1px solid #e3e8ee;
    color: #5b6776;
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
}

.footer-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.footer-description {
    max-width: 420px;
    line-height: 1.5;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #2563eb;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e3e8ee;
    font-size: 0.8rem;
    color: #6b7280;
}


/* --- Hero split layout --- */

.hero-split {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
    margin-top: 3rem;
    margin-bottom: 4rem;
}

.hero-text h1 {
    font-size: 2.4rem;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    color: #111827;
}

.hero-lead {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 1rem;
}

.hero-secondary {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 2rem;
}

.hero-cta-buttons {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.cta-primary {
    background-color: #007BFF;
    color: #fff;
    padding: 0.8rem 1.6rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: bold;
}

.cta-secondary {
    background-color: transparent;
    color: #007BFF;
    padding: 0.8rem 1.6rem;
    border: 2px solid #007BFF;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    background-color: #007BFF;
    color: #fff;
}
/* --- Visual area --- */

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-placeholder {
    width: 100%;
    min-height: 260px;
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        #eef2ff,
        #f8fafc
    );
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    color: #6366f1;
    font-size: 0.9rem;
}

/* --- Footnote section --- */

.hero-footnote {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.85rem;
    color: #6b7280;
    max-width: 720px;
}

/* --- Responsive --- */

@media (max-width: 900px) {
    .hero-split {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }
    .visual-placeholder {
        display: none;
    }
}
