@charset "UTF-8";
/* ===========================================================================
   Proposed Mahalingeswarar Hindu Temple and Community Centre
   Public stylesheet

   Mobile-first. No frameworks, no external fonts, no @import — the strict
   Content-Security-Policy in .htaccess blocks external resources, and every
   rule lives here so no inline style attribute is ever needed.

   COLOUR CONTRAST
   All text/background pairs below were checked against WCAG 2.1 AA
   (4.5:1 body text, 3:1 large text and UI boundaries).

     Bright saffron #E07A1F on cream is only 2.9:1 and MUST NOT carry text.
     It is used for borders, rules and decorative fills only.
     --saffron-dark #A34A08 is the text-safe saffron (5.9:1 on white).
   =========================================================================== */

/* ---------------------------------------------------------------------------
   1. Design tokens
   --------------------------------------------------------------------------- */

:root {
    /* Brand */
    --cream:        #FDF8F0;
    --cream-deep:   #F6EEE0;
    --saffron:      #E07A1F;   /* decorative only — never behind text */
    --saffron-dark: #A34A08;   /* text-safe: 5.9:1 on white */
    --maroon:       #7A1F2B;   /* 9.7:1 on cream, 10.2:1 with white text */
    --maroon-deep:  #5A141E;
    --gold:         #C9A227;   /* decorative only */
    --gold-soft:    #E8D9A0;

    /* Neutrals */
    --ink:          #2B2118;   /* body text, 14.8:1 on cream */
    --ink-soft:     #55483C;   /* secondary text, 7.4:1 on cream */
    --line:         #E2D6C4;
    --white:        #FFFFFF;

    /* Status */
    --error:        #B3261E;
    --error-bg:     #FDECEA;
    --success:      #1B5E20;
    --success-bg:   #E8F5E9;
    --info-bg:      #EEF4FA;
    --info-line:    #4A7CA8;

    /* Spacing scale */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.5rem;
    --sp-6: 2rem;
    --sp-7: 3rem;
    --sp-8: 4rem;

    --radius:    10px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 2px rgba(43, 33, 24, 0.06),
                 0 2px 6px rgba(43, 33, 24, 0.05);
    --shadow-md: 0 2px 4px rgba(43, 33, 24, 0.07),
                 0 8px 20px rgba(43, 33, 24, 0.07);

    --font-body: system-ui, -apple-system, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Tamil", sans-serif;
    --font-head: Georgia, "Times New Roman", "Noto Serif", serif;

    --wrap: 1140px;
}

/* ---------------------------------------------------------------------------
   2. Reset and base
   --------------------------------------------------------------------------- */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 5rem; /* clears the sticky header on anchor jumps */
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    /* Long Tamil and Malayalam words must not force horizontal scrolling. */
    overflow-wrap: break-word;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--maroon);
    line-height: 1.25;
    margin: 0 0 var(--sp-4);
    font-weight: 700;
}

h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.85rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.05rem); }
h3 { font-size: clamp(1.12rem, 1rem + 0.5vw, 1.32rem); }
h4 { font-size: 1.05rem; }

p  { margin: 0 0 var(--sp-4); }
ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.35rem; }
li { margin-bottom: var(--sp-2); }

a {
    color: var(--saffron-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}
a:hover { color: var(--maroon); }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: var(--sp-6) 0;
}

/* Focus: visible on every interactive element, in one place, never removed. */
:focus-visible {
    outline: 3px solid var(--saffron-dark);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Screen-reader-only text that remains focusable. */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: var(--sp-4);
    top: -100px;
    z-index: 200;
    background: var(--maroon);
    color: var(--white);
    padding: var(--sp-3) var(--sp-5);
    border-radius: 0 0 var(--radius) var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: top 0.15s ease-in-out;
}
.skip-link:focus { top: 0; color: var(--white); }

/* ---------------------------------------------------------------------------
   3. Layout
   --------------------------------------------------------------------------- */

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--sp-4);
}

.section {
    padding-block: var(--sp-7);
}
.section--tint  { background: var(--cream-deep); }
.section--white { background: var(--white); }

.section__intro {
    max-width: 62ch;
    margin-bottom: var(--sp-6);
    color: var(--ink-soft);
    font-size: 1.06rem;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--saffron-dark);
    margin-bottom: var(--sp-2);
}

@media (min-width: 700px) {
    .section { padding-block: var(--sp-8); }
    .wrap { padding-inline: var(--sp-5); }
}

/* ---------------------------------------------------------------------------
   4. Header and navigation
   --------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    min-height: 4.25rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    text-decoration: none;
    color: var(--maroon);
    padding-block: var(--sp-2);
}
.brand:hover { color: var(--maroon-deep); }

.brand__logo {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
}

.brand__text { display: flex; flex-direction: column; justify-content: center; }
.brand__name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.02rem;
    /* Slightly looser than before: the name is now a single element that wraps
       to two lines on narrow screens, and 1.15 set the lines too tight. */
    line-height: 1.25;
}

/* Retained for the admin area and any future use; the public header now shows
   the name on its own, with no strapline. */
.brand__tag {
    font-size: 0.72rem;
    color: var(--ink-soft);
    letter-spacing: 0.02em;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--maroon);
    font: inherit;
    font-weight: 600;
    padding: var(--sp-3) var(--sp-4);
    min-height: 44px;
    cursor: pointer;
}
.nav-toggle__bars {
    display: block;
    position: relative;
    width: 20px; height: 2px;
    background: currentColor;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 20px; height: 2px;
    background: currentColor;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }

.site-nav {
    display: none;
    width: 100%;
}
.site-nav.is-open {
    display: block;
    padding-bottom: var(--sp-4);
}

.site-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}
.site-nav__list li { margin: 0; }

.site-nav__link {
    display: block;
    padding: var(--sp-3) var(--sp-2);
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius);
    min-height: 44px;
}
.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
    background: var(--cream-deep);
    color: var(--maroon);
}

.site-nav .btn { margin-top: var(--sp-2); width: 100%; }

@media (min-width: 900px) {
    .nav-toggle { display: none; }
    .site-nav { display: block; width: auto; }
    .site-nav__list { flex-direction: row; align-items: center; gap: var(--sp-1); }
    .site-nav__link { padding: var(--sp-2) var(--sp-3); }
    .site-nav .btn { margin-top: 0; margin-left: var(--sp-3); width: auto; }
    .brand__logo { width: 48px; height: 48px; }
    .brand__name { font-size: 1.1rem; }
}

/* ---------------------------------------------------------------------------
   5. Buttons
   --------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    min-height: 48px;
    padding: var(--sp-3) var(--sp-5);
    border: 2px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
    background: var(--maroon);
    border-color: var(--maroon);
    color: var(--white);
}
.btn--primary:hover {
    background: var(--maroon-deep);
    border-color: var(--maroon-deep);
    color: var(--white);
}

.btn--accent {
    background: var(--saffron-dark);
    border-color: var(--saffron-dark);
    color: var(--white);
}
.btn--accent:hover { background: #8A3E06; border-color: #8A3E06; color: var(--white); }

.btn--ghost {
    background: transparent;
    border-color: var(--maroon);
    color: var(--maroon);
}
.btn--ghost:hover { background: var(--maroon); color: var(--white); }

.btn--light {
    background: var(--white);
    border-color: var(--white);
    color: var(--maroon);
}
.btn--light:hover { background: var(--cream-deep); border-color: var(--cream-deep); }

.btn--block { width: 100%; }
.btn--lg { font-size: 1.08rem; min-height: 54px; padding-inline: var(--sp-6); }
.btn--sm { min-height: 38px; padding: var(--sp-2) var(--sp-3); font-size: 0.9rem; }

.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---------------------------------------------------------------------------
   6. Hero
   --------------------------------------------------------------------------- */

.hero {
    background: var(--maroon);
    color: var(--white);
}

.hero__grid { display: grid; gap: var(--sp-6); padding-block: var(--sp-7); }

.hero h1 { color: var(--white); margin-bottom: var(--sp-3); }

.hero__address {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gold-soft);
    margin-bottom: var(--sp-4);
}

.hero__lead {
    font-size: 1.08rem;
    /* Slightly warmed white keeps 11:1 contrast while softening the glare. */
    color: #F4E9E6;
    max-width: 56ch;
}

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    margin-block: var(--sp-5);
}

/* The planning notice is a legal accuracy statement, so it is set at normal
   body size with a visible border — never as small grey print. */
.hero__notice {
    display: flex;
    gap: var(--sp-3);
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--gold);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: var(--sp-4);
    margin: 0;
    font-size: 0.98rem;
    color: #F7EFEA;
}

.hero__media { margin: 0; }

.hero__media img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    /* 16:9 matches the source photograph. A 4:3 frame would crop the sides and
       cut the ends off the building. */
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

@media (min-width: 700px) {
    .hero__actions { flex-direction: row; flex-wrap: wrap; }
    .hero__actions .btn { flex: 0 1 auto; }
}

@media (min-width: 950px) {
    .hero__grid {
        grid-template-columns: 1.05fr 0.95fr;
        align-items: center;
        gap: var(--sp-7);
        padding-block: var(--sp-8);
    }
}

/* ---------------------------------------------------------------------------
   7. Cards and grids
   --------------------------------------------------------------------------- */

.grid { display: grid; gap: var(--sp-4); }

@media (min-width: 620px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 620px)  { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 800px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.card__icon {
    width: 44px; height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--cream-deep);
    border: 2px solid var(--saffron);
    margin-bottom: var(--sp-3);
    font-size: 1.35rem;
    line-height: 1;
}

.card h3 { margin-bottom: var(--sp-2); }
.card p  { margin-bottom: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* Feature list with tick markers */
.tick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.tick-list li {
    position: relative;
    padding-left: 2rem;
    margin: 0;
}
.tick-list li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.55em;
    width: 0.65rem; height: 0.65rem;
    border-radius: 50%;
    background: var(--saffron);
    box-shadow: 0 0 0 3px rgba(224, 122, 31, 0.18);
}

@media (min-width: 760px) {
    .tick-list--2col { grid-template-columns: repeat(2, 1fr); column-gap: var(--sp-6); }
}

/* Callout used for the "no guarantee" statement */
.callout {
    background: var(--info-bg);
    border-left: 4px solid var(--info-line);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: var(--sp-4) var(--sp-5);
    margin-block: var(--sp-5);
}
.callout p:last-child { margin-bottom: 0; }
.callout--warn { background: #FFF7E6; border-left-color: var(--saffron-dark); }

/* Aggregate statistics (public summary + admin dashboard) */
.stat-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 800px) {
    .stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 240px));
        width: fit-content;
        margin-inline: auto;
    }
}

.stat {
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 4px solid var(--saffron);
    border-radius: var(--radius);
    padding: var(--sp-4);
    text-align: center;
}
.stat__value {
    display: block;
    font-family: var(--font-head);
    font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
    font-weight: 700;
    color: var(--maroon);
    line-height: 1.1;
}
.stat__label {
    display: block;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-top: var(--sp-1);
}

/* ---------------------------------------------------------------------------
   8. Forms
   --------------------------------------------------------------------------- */

.form-shell {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--sp-5);
}
@media (min-width: 760px) { .form-shell { padding: var(--sp-6); } }

fieldset {
    border: 0;
    border-top: 2px solid var(--line);
    padding: var(--sp-5) 0 0;
    margin: 0 0 var(--sp-6);
}
fieldset:first-of-type { border-top: 0; padding-top: 0; }

legend {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--maroon);
    padding: 0;
    margin-bottom: var(--sp-2);
}

.legend-hint {
    color: var(--ink-soft);
    font-size: 0.94rem;
    margin-bottom: var(--sp-4);
}

.field { margin-bottom: var(--sp-4); }

.field label,
.field .field__label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--sp-2);
}

.req {
    color: var(--error);
    font-weight: 700;
    /* Colour alone never carries meaning; a text equivalent sits alongside. */
}
.optional {
    font-weight: 400;
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.hint {
    display: block;
    font-size: 0.88rem;
    color: var(--ink-soft);
    margin-top: var(--sp-1);
    margin-bottom: var(--sp-2);
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="search"],
select,
textarea {
    width: 100%;
    font: inherit;
    color: var(--ink);
    background: var(--white);
    border: 2px solid #C9BBA6;
    border-radius: var(--radius);
    padding: var(--sp-3);
    min-height: 48px;
}

textarea { min-height: 8rem; resize: vertical; line-height: 1.55; }

select {
    /* Native arrow is kept: no background-image, so CSP stays clean. */
    padding-right: var(--sp-3);
}

input:hover, select:hover, textarea:hover { border-color: var(--ink-soft); }

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: var(--error);
    background: var(--error-bg);
}

.field-row { display: grid; gap: var(--sp-4); }
@media (min-width: 640px) {
    .field-row--2 { grid-template-columns: repeat(2, 1fr); }
    .field-row--3 { grid-template-columns: repeat(3, 1fr); }
}

/*
 * Align side-by-side fields regardless of hint length.
 *
 * Two fields in a row each stack label / hint / input / error. If one hint
 * wraps to a second line, or one field has an error and the other does not,
 * the inputs end up at different heights and the row looks broken.
 *
 * Subgrid makes both fields share the row track sizing of their parent, so
 * labels line up with labels and inputs with inputs, whatever the content.
 * Where subgrid is unsupported the fields simply stack as before, which is
 * why every field in a paired row is also given a hint of its own.
 */
@supports (grid-template-rows: subgrid) {
    @media (min-width: 640px) {
        .field-row--2,
        .field-row--3 {
            /* label, hint, input, error */
            grid-template-rows: auto auto auto auto;
            align-items: start;
        }
        .field-row--2 > .field,
        .field-row--3 > .field {
            display: grid;
            grid-template-rows: subgrid;
            grid-row: span 4;
            margin-bottom: 0;
        }
    }
}

/* Choice controls -------------------------------------------------------- */

.choice-list { display: grid; gap: var(--sp-2); }
@media (min-width: 700px) {
    .choice-list--cols { grid-template-columns: repeat(2, 1fr); }
    .choice-list--cols3 { grid-template-columns: repeat(3, 1fr); }
}

.choice {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-3);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    min-height: 48px;
    transition: border-color 0.12s ease, background-color 0.12s ease;
}
.choice:hover { border-color: var(--saffron); background: #FFFBF6; }

.choice input[type="radio"],
.choice input[type="checkbox"] {
    flex: 0 0 auto;
    width: 22px; height: 22px;
    margin: 1px 0 0;
    accent-color: var(--maroon);
    cursor: pointer;
}

.choice__text { flex: 1; }
.choice__note { display: block; font-size: 0.87rem; color: var(--ink-soft); }

/* Selected state uses a border weight change as well as colour.
   The .is-selected class is applied by app.js as a fallback for browsers
   without :has() support; both selectors produce the same appearance. */
.choice:has(input:checked),
.choice.is-selected {
    border-color: var(--maroon);
    background: #FCF6F7;
}

/* Rating scale ----------------------------------------------------------- */

.rating-scale { display: grid; gap: var(--sp-2); }
@media (min-width: 860px) { .rating-scale { grid-template-columns: repeat(5, 1fr); } }

.rating-option {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    min-height: 52px;
    text-align: left;
}
@media (min-width: 860px) {
    .rating-option { flex-direction: column; text-align: center; gap: var(--sp-2); }
}
.rating-option:hover { border-color: var(--saffron); }
.rating-option:has(input:checked),
.rating-option.is-selected {
    border-color: var(--maroon);
    background: #FCF6F7;
    box-shadow: inset 0 0 0 1px var(--maroon);
}
.rating-option__number {
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--maroon);
}
.rating-option__label { font-size: 0.92rem; font-weight: 600; }

/* Conditional block ------------------------------------------------------ */

.conditional {
    border-left: 4px solid var(--saffron);
    background: var(--cream-deep);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: var(--sp-4);
    margin-top: var(--sp-4);
}
.conditional[hidden] { display: none; }

/* Honeypot: hidden from sight and from assistive technology, but present in
   the DOM so automated submitters fill it in. Not display:none, because some
   bots skip those; off-screen positioning catches more of them. */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: auto;
    width: 1px; height: 1px;
    overflow: hidden;
}

/* Character counter ------------------------------------------------------ */

.char-count {
    display: block;
    text-align: right;
    font-size: 0.83rem;
    color: var(--ink-soft);
    margin-top: var(--sp-1);
}
.char-count.is-near { color: var(--saffron-dark); font-weight: 600; }
.char-count.is-over { color: var(--error); font-weight: 700; }

/* Consent ---------------------------------------------------------------- */

.consent-box {
    border: 2px solid var(--line);
    border-radius: var(--radius);
    padding: var(--sp-4);
    background: var(--cream);
    margin-bottom: var(--sp-4);
}
.consent-box--required { border-color: var(--maroon); }
.consent-box .choice { border: 0; padding: 0; background: transparent; }
.consent-box .choice:hover { background: transparent; }
.consent-box__title {
    font-weight: 700;
    color: var(--maroon);
    margin-bottom: var(--sp-2);
    font-size: 0.98rem;
}

/* Errors ----------------------------------------------------------------- */

.error-summary {
    border: 2px solid var(--error);
    background: var(--error-bg);
    border-radius: var(--radius);
    padding: var(--sp-4) var(--sp-5);
    margin-bottom: var(--sp-6);
}
.error-summary h2 {
    color: var(--error);
    font-size: 1.15rem;
    margin-bottom: var(--sp-2);
}
.error-summary ul { margin: 0; padding-left: 1.25rem; }
.error-summary a { color: var(--error); font-weight: 600; }

/* Inline errors carry a text prefix as well as colour, so the meaning does
   not depend on being able to distinguish red. */
.field-error {
    display: block;
    color: var(--error);
    font-weight: 600;
    font-size: 0.92rem;
    margin-top: var(--sp-2);
}
.field-error::before { content: "Error: "; }

.alert {
    border-radius: var(--radius);
    padding: var(--sp-4) var(--sp-5);
    margin-bottom: var(--sp-5);
    border-left: 4px solid;
}
.alert--error   { background: var(--error-bg);   border-color: var(--error);   color: #7A1A15; }
.alert--success { background: var(--success-bg); border-color: var(--success); color: #14471A; }
.alert--info    { background: var(--info-bg);    border-color: var(--info-line); }
.alert p:last-child { margin-bottom: 0; }

/* Submit row ------------------------------------------------------------- */

.form-actions {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    padding-top: var(--sp-5);
    border-top: 2px solid var(--line);
}
@media (min-width: 620px) {
    .form-actions { flex-direction: row; align-items: center; }
    .form-actions .btn { flex: 0 0 auto; }
}
.form-actions__note { color: var(--ink-soft); font-size: 0.9rem; margin: 0; }

/* ---------------------------------------------------------------------------
   8b. Simplified survey layout
   ---------------------------------------------------------------------------
   Additions only. No colour, token, header, footer or branding rule is changed
   by this block — it tightens spacing and narrows the form so the shortened
   page reads as deliberate rather than empty.
   --------------------------------------------------------------------------- */

/* Shorter hero for the simplified page. */
.hero--compact .hero__grid { padding-block: var(--sp-6); }
@media (min-width: 950px) {
    .hero--compact .hero__grid { padding-block: var(--sp-7); }
}
.hero--compact .hero__actions { margin-block: var(--sp-4); }

/* Reduced vertical rhythm for the short page. */
.section--slim { padding-block: var(--sp-5); }
@media (min-width: 700px) {
    .section--slim { padding-block: var(--sp-6); }
}

/* The form does not need the full page width; a narrower measure is easier to
   complete and keeps the page from looking sparse on a large screen. */
.wrap--narrow { max-width: 820px; }

/* Single paragraph of purpose, set slightly larger than body text. */
.lead-note {
    max-width: 68ch;
    margin: 0 auto;
    font-size: 1.08rem;
    color: var(--ink-soft);
    text-align: center;
}

.section__intro--tight { margin-bottom: var(--sp-4); font-size: 1rem; }

.form-shell--compact { padding: var(--sp-4); }
@media (min-width: 760px) { .form-shell--compact { padding: var(--sp-5); } }

.form-shell--compact fieldset { margin-bottom: var(--sp-5); padding-top: var(--sp-4); }
.form-shell--compact .field { margin-bottom: var(--sp-3); }

/* Numbered step marker in each section legend. */
.legend-step {
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-right: var(--sp-2);
    border-radius: 50%;
    background: var(--maroon);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    vertical-align: middle;
}

/* Inner fieldsets group radio buttons semantically but need no extra chrome. */
.fieldset--bare {
    border: 0;
    padding: 0;
    margin: 0;
}

/* ---------------------------------------------------------------------------
   8c. Confirmation popup (modal)
   --------------------------------------------------------------------------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000; /* above the sticky header (100) */
    display: grid;
    place-items: center;
    padding: var(--sp-4);
    background: rgba(43, 33, 24, 0.6);
}

.modal-card {
    width: 100%;
    max-width: 30rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--sp-7) var(--sp-6);
    text-align: center;
}

.modal-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto var(--sp-4);
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success);
    font-size: 2rem;
    line-height: 1;
    border: 2px solid var(--success);
}

.modal-title {
    color: var(--maroon);
    margin-bottom: var(--sp-5);
    font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem);
}

.modal-card .btn { min-width: 8rem; }

/* Prevent the page behind the popup from scrolling while it is open.
   app.js adds this class to <body>; the popup still works without it. */
body.modal-open { overflow: hidden; }

/* ---------------------------------------------------------------------------
   9. Thank-you page
   --------------------------------------------------------------------------- */

.reference-panel {
    background: var(--white);
    border: 2px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: var(--sp-6);
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--sp-6);
}
.reference-panel__label {
    display: block;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: var(--sp-2);
}
.reference-panel__value {
    display: block;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: clamp(1.4rem, 1rem + 2vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--maroon);
    word-break: break-all;
}

/* ---------------------------------------------------------------------------
   10. Prose pages (privacy, contact)
   --------------------------------------------------------------------------- */

.prose { max-width: 70ch; }
.prose h2 { margin-top: var(--sp-6); }
.prose h3 { margin-top: var(--sp-5); }
.prose ul { padding-left: 1.35rem; }

/* Unfilled legal placeholders must be impossible to miss before launch. */
.placeholder {
    display: inline-block;
    background: #FFF3CD;
    border: 1px dashed #A8791A;
    border-radius: 4px;
    padding: 0.05em 0.4em;
    font-weight: 700;
    font-size: 0.94em;
    color: #6B4A05;
}

.contact-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
    box-shadow: var(--shadow-sm);
}
.contact-card address { font-style: normal; line-height: 1.7; }

/* ---------------------------------------------------------------------------
   11. Footer
   --------------------------------------------------------------------------- */

.site-footer {
    background: var(--maroon-deep);
    color: #EFE2DE;
    padding-block: var(--sp-7) var(--sp-5);
    margin-top: var(--sp-8);
}
.site-footer h2, .site-footer h3 { color: var(--gold-soft); font-size: 1.05rem; }
.site-footer a { color: var(--gold-soft); }
.site-footer a:hover { color: var(--white); }
.site-footer address { font-style: normal; line-height: 1.8; }

.footer-grid { display: grid; gap: var(--sp-6); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: var(--sp-2); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    margin-top: var(--sp-6);
    padding-top: var(--sp-4);
    font-size: 0.88rem;
    color: #DCC9C4;
}
.footer-bottom p { margin-bottom: var(--sp-2); }

/* ---------------------------------------------------------------------------
   12. Motion and print
   --------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

@media print {
    .site-header, .site-footer, .nav-toggle, .site-nav,
    .form-actions, .skip-link, .no-print { display: none !important; }

    body { background: #fff; color: #000; font-size: 12pt; }
    .card, .form-shell, .stat { box-shadow: none; border: 1px solid #999; }
    a::after { content: " (" attr(href) ")"; font-size: 0.85em; }
    .section { padding-block: 1rem; }
}
