/* ==========================================================================
   Photofan theme
   Fonts: IRANSans (header) + Badr (body)
   Design: golden hero, brick-red accents, RTL Persian
   ========================================================================== */

/* Fonts
   Files live inside the theme: assets/fonts/Badr and assets/fonts/IRANSans,
   so the theme stays self-contained when the site moves to the server. */
@font-face {
    font-family: "IRANSans";
    src: url("assets/fonts/IRANSans/IRANSans.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "IRANSans";
    src: url("assets/fonts/IRANSans/IRANSans_Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "IRANSans";
    src: url("assets/fonts/IRANSans/IRANSans_Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Badr";
    src: url("assets/fonts/Badr/w_Badr.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Badr";
    src: url("assets/fonts/Badr/w_Badr%20Semi%20Bold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Badr";
    src: url("assets/fonts/Badr/w_Badr%20Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Badr";
    src: url("assets/fonts/Badr/w_Badr%20Italic.ttf") format("truetype");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* Design tokens */
:root {
    --color-yellow: #dfbb24;
    --color-red: #ac1f23;
    --color-red-dark: #8f191d;
    --color-ink: #1e1e1e;
    --color-surface: #f8f8f8;
    --color-white: #ffffff;
    --color-rule: rgba(30, 30, 30, 0.45);
    --color-rule-soft: rgba(30, 30, 30, 0.12);

    --font-header: "IRANSans", "Segoe UI", Tahoma, sans-serif;
    --font-body: "Badr", "IRANSans", Tahoma, sans-serif;

    --container: 1160px;
    --gutter: clamp(20px, 5vw, 40px);
    --header-height: 104px;
    --header-height-mobile: 80px;
}

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

html {
    direction: rtl;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    background-color: var(--color-yellow);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
}

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

:focus-visible {
    outline: 3px solid var(--color-ink);
    outline-offset: 3px;
}

.container {
    width: min(100% - (2 * var(--gutter)), var(--container));
    margin-inline: auto;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

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

/* Skip link */
.skip-link {
    position: absolute;
    inset-block-start: -120px;
    inset-inline-start: 16px;
    z-index: 1000;
    padding: 10px 18px;
    background: var(--color-ink);
    color: var(--color-white);
    font-family: var(--font-header);
    font-size: 14px;
    text-decoration: none;
    border-radius: 4px;
    transition: inset-block-start 0.2s ease;
}

.skip-link:focus {
    inset-block-start: 12px;
}

/* Header */
.site-header {
    position: relative;
    z-index: 50;
    background-color: var(--color-surface);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-block-size: var(--header-height);
}

.site-header__main {
    display: flex;
    align-items: center;
    gap: clamp(14px, 1.7vw, 22px);
    min-width: 0;
}

.site-brand {
    display: inline-flex;
    flex: 0 0 auto;
    text-decoration: none;
}

.site-brand img {
    width: 48px;
    height: auto;
}

.site-header__rule {
    flex: 0 0 auto;
    width: 1px;
    height: 28px;
    background-color: var(--color-rule);
}

/* Navigation */
.site-nav__list {
    display: flex;
    align-items: center;
    gap: clamp(1.1rem, 2.9vw, 2.375rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav__item {
    position: relative;
}

.site-nav__item + .site-nav__item::before {
    content: "";
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: calc(clamp(1.1rem, 2.9vw, 2.375rem) / -2);
    width: 1px;
    height: 14px;
    background-color: var(--color-rule);
    transform: translateY(-50%);
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-block-size: 44px;
    color: var(--color-ink);
    font-family: var(--font-header);
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.18s ease;
}

.site-nav a:hover {
    color: var(--color-red);
}

.site-header__actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 12px;
}

.login-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-block-size: 32px;
    padding-inline: 14px;
    background-color: #000000;
    color: var(--color-white);
    border-radius: 999px;
    font-family: var(--font-header);
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.18s ease;
}

.login-pill:hover {
    background-color: var(--color-red);
}

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.nav-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    margin-block: 3px;
    background-color: var(--color-ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-open .nav-toggle__bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.site-header.is-open .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}

.site-header.is-open .nav-toggle__bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-block-size: calc(100vh - var(--header-height));
    min-block-size: calc(100svh - var(--header-height));
    padding-block: clamp(2.5rem, 10vh, 5rem) clamp(2rem, 5vh, 3rem);
    background-color: var(--color-yellow);
}

.hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero__title {
    margin: 0 0 clamp(1.75rem, 5.4vh, 3.125rem);
    line-height: 0;
}

.hero__title img {
    width: min(706px, 92vw);
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-inline-size: min(315px, 100%);
    min-block-size: 60px;
    margin-block-end: clamp(2.5rem, 10vh, 5.8rem);
    padding: 0.75rem clamp(1.5rem, 6vw, 2.5rem);
    background-color: var(--color-red);
    color: var(--color-white);
    border: 0;
    font-family: var(--font-body);
    font-size: 37px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.18s ease;
}

.hero__cta:hover {
    background-color: var(--color-red-dark);
}

.hero__cta:active {
    transform: translateY(1px);
}

/* Inner pages */
.page {
    min-block-size: calc(100vh - var(--header-height));
    min-block-size: calc(100svh - var(--header-height));
    padding-block: clamp(2rem, 6vw, 4.5rem);
    background-color: var(--color-yellow);
}

.page__inner {
    padding: clamp(1.5rem, 4vw, 3rem);
    background-color: var(--color-surface);
    box-shadow: 0 24px 60px rgba(30, 30, 30, 0.08);
}

.page__inner > :first-child {
    margin-block-start: 0;
}

.page__inner > :last-child {
    margin-block-end: 0;
}

/* About page (about.php) */
.intro {
    min-block-size: calc(100vh - var(--header-height));
    min-block-size: calc(100svh - var(--header-height));
    padding-block: clamp(2rem, 4.6vw, 3.375rem) clamp(4rem, 9vh, 7rem);
    background-color: var(--color-yellow);
}

.intro__frame {
    position: relative;
    width: min(100% - (2 * var(--gutter)), calc(var(--container) + 44px));
    margin-inline: auto;
}

/* The vertical red rule runs along the inline-start edge of the frame. */
.intro__frame::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    inline-size: 3px;
    background-color: var(--color-red);
}

.intro__logo {
    line-height: 0;
    text-align: center;
}

.intro__logo img {
    display: inline-block;
    inline-size: clamp(190px, 21vw, 286px);
    height: auto;
}

.intro__article {
    margin-inline-start: 44px;
    margin-block-start: clamp(1.5rem, 3.5vw, 3rem);
}

.intro__heading {
    position: relative;
    margin: 0;
    color: var(--color-red);
    font-family: var(--font-body);
    font-size: clamp(2rem, 3.75vw, 3.1875rem);
    font-weight: 700;
    line-height: 1.15;
    text-align: start;
}

/* Left-pointing triangle attached to the rule, level with the heading. */
.intro__heading::after {
    content: "";
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: -44px;
    inline-size: 32px;
    block-size: 56px;
    background-color: var(--color-red);
    clip-path: polygon(100% 0, 100% 100%, 0 50%);
    transform: translateY(-50%);
}

.intro__text {
    margin-block-start: clamp(1rem, 1.6vw, 1.5rem);
    font-size: clamp(1.05rem, 2.06vw, 1.75rem);
    line-height: 1.61;
    text-align: start;
}

.intro__text p {
    margin: 0;
}

.intro__cta {
    display: flex;
    align-items: center;
    gap: 8px;
    inline-size: max-content;
    max-inline-size: 100%;
    margin-block-start: clamp(1.75rem, 2.9vw, 2.4rem);
    padding: 6px 14px;
    background-color: var(--color-red);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.76vw, 1.5rem);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.18s ease;
}

.intro__cta:hover:not(:disabled) {
    background-color: var(--color-red-dark);
}

.intro__cta:active:not(:disabled) {
    transform: translateY(1px);
}

.intro__cta:disabled {
    opacity: 0.72;
    cursor: progress;
}

.intro__cta-arrow {
    flex: 0 0 auto;
    width: 26px;
    height: 13px;
}

/* Terms page: numbered sections and bullet lists */
.intro__subheading {
    margin: clamp(2rem, 3.4vw, 2.9rem) 0 clamp(0.4rem, 0.5vw, 0.5rem);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: inherit;
    font-weight: 700;
    line-height: 1.3;
    text-align: start;
}

.intro__text > .intro__subheading:first-child {
    margin-block-start: 0;
}

.intro__list {
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: start;
}

.intro__list li::before {
    content: "";
    display: inline-block;
    inline-size: 8px;
    block-size: 8px;
    margin-inline-end: 1.15em;
    border-radius: 50%;
    background-color: currentColor;
    vertical-align: middle;
}

/* Terms page: continue (red) and back (black) actions, aligned to the article edge */
.intro__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-block-start: clamp(1.75rem, 2.9vw, 2.4rem);
}

.intro__actions .intro__cta {
    margin-block-start: 0;
}

.intro__cta--back {
    background-color: #000000;
}

.intro__cta--back:hover {
    background-color: #333333;
}

/* About-us page (about-us.php) — separate from the registration path */
.about {
    max-inline-size: 62rem;
}

.about__heading {
    max-inline-size: 30ch;
    text-wrap: balance;
}

/* Second line of the about-us heading always sits on its own line. */
.about__heading-line {
    display: block;
}

.about__body {
    margin-block-start: clamp(1.5rem, 2.6vw, 2.5rem);
    font-size: clamp(1.05rem, 1.35vw, 1.35rem);
    line-height: 1.95;
}

.about__body p {
    margin: 0;
}

.about__body p + p {
    margin-block-start: 1.4em;
}

/* The opening paragraph sits on a white sheet, like the site's other cards. */
.about__lead {
    padding: clamp(1.35rem, 2.6vw, 2.1rem) clamp(1.35rem, 2.9vw, 2.4rem);
    background-color: var(--color-white);
    border-block-start: 4px solid var(--color-red);
    box-shadow: 0 20px 45px rgba(30, 30, 30, 0.14);
    font-size: clamp(1.12rem, 1.55vw, 1.5rem);
    font-weight: 600;
    line-height: 1.9;
}

.about__accent {
    color: var(--color-red);
    font-weight: 700;
    white-space: nowrap;
}

/* Contact page (contact-us.php) */
.contact {
    max-inline-size: 62rem;
}

.contact__lead {
    margin-block-start: clamp(1rem, 1.6vw, 1.5rem);
    font-size: clamp(1.05rem, 1.35vw, 1.3rem);
    line-height: 1.9;
}

.contact__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(1rem, 1.8vw, 1.5rem);
    margin-block-start: clamp(1.75rem, 3vw, 2.5rem);
}

/* Address cards reuse the site's white-sheet + red top edge language. */
.contact__card {
    padding: clamp(1.25rem, 2.2vw, 1.9rem);
    background-color: var(--color-white);
    border-block-start: 4px solid var(--color-red);
    box-shadow: 0 20px 45px rgba(30, 30, 30, 0.14);
}

.contact__card-title {
    margin: 0 0 clamp(0.9rem, 1.4vw, 1.2rem);
    color: var(--color-red);
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 1.7vw, 1.55rem);
    font-weight: 700;
    line-height: 1.3;
}

.contact__card-body {
    font-style: normal; /* <address> is italic by default */
}

.contact__row {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 10px;
    align-items: start;
    margin: 0;
    font-size: clamp(1rem, 1.25vw, 1.15rem);
    line-height: 1.9;
    text-align: start;
}

.contact__row + .contact__row {
    margin-block-start: 0.9rem;
    padding-block-start: 0.9rem;
    border-block-start: 1px solid var(--color-rule-soft);
}

.contact__icon {
    inline-size: 22px;
    block-size: 22px;
    margin-block-start: 0.35em;
    color: var(--color-red);
}

.contact__label {
    color: var(--color-ink);
}

.contact__phone {
    color: var(--color-ink);
    font-weight: 700;
    text-decoration: none;
    border-block-end: 2px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.contact__phone:hover {
    color: var(--color-red);
    border-block-end-color: var(--color-red);
}

.contact__phone:focus-visible {
    outline: 3px solid var(--color-ink);
    outline-offset: 3px;
}

/* Social profiles: round red buttons with white glyphs. */
.contact__social {
    margin-block-start: clamp(1.5rem, 2.6vw, 2.25rem);
    padding: clamp(1.25rem, 2.2vw, 1.9rem);
    background-color: var(--color-white);
    border-block-start: 4px solid var(--color-red);
    box-shadow: 0 20px 45px rgba(30, 30, 30, 0.14);
}

.contact__social-title {
    margin: 0 0 clamp(1rem, 1.8vw, 1.5rem);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.social__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(0.9rem, 1.6vw, 1.3rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.social__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.social__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 46px;
    block-size: 46px;
    border-radius: 50%;
    background-color: var(--color-red);
    color: var(--color-white);
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.social__icon svg {
    inline-size: 22px;
    block-size: 22px;
}

a.social__item:hover .social__icon {
    background-color: var(--color-red-dark);
    transform: translateY(-2px);
}

a.social__item:focus-visible .social__icon {
    outline: 3px solid var(--color-ink);
    outline-offset: 3px;
}

/* Events page (events.php): a poster gallery on the yellow backdrop. */
.events {
    max-inline-size: 62rem;
}

.events__lead {
    margin-block-start: clamp(1rem, 1.6vw, 1.5rem);
    font-size: clamp(1.05rem, 1.35vw, 1.3rem);
    line-height: 1.9;
}

.events__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(1.25rem, 2.6vw, 2rem);
    margin: clamp(1.5rem, 2.6vw, 2.5rem) 0 0;
    padding: 0;
    list-style: none;
}

.events__item {
    inline-size: min(100%, 280px);
}

/* Each poster is a white matted card that opens the event page. */
.event-card {
    display: flex;
    flex-direction: column;
    gap: clamp(0.9rem, 1.5vw, 1.2rem);
    block-size: 100%;
    padding: clamp(0.9rem, 1.4vw, 1.25rem);
    background-color: var(--color-white);
    border-block-start: 4px solid var(--color-red);
    box-shadow: 0 20px 45px rgba(30, 30, 30, 0.14);
    color: var(--color-ink);
    text-decoration: none;
}

a.event-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

a.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 55px rgba(30, 30, 30, 0.2);
}

a.event-card:focus-visible {
    outline: 3px solid var(--color-ink);
    outline-offset: 3px;
}

.event-card__poster {
    display: block;
    inline-size: 100%;
    block-size: auto;
    margin: 0;
}

/* Same-size stand-in until the client's poster file is added. */
.event-card__poster--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 4;
    border: 2px dashed var(--color-rule);
    background-color: var(--color-surface);
}

.event-card__poster-note {
    color: var(--color-red);
    font-family: var(--font-header);
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    font-weight: 700;
}

/* Caption under the poster: «دوره اول» at the right, the date at the left. */
.event-card__meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.event-card__title {
    color: var(--color-red);
    font-family: var(--font-body);
    font-size: clamp(1.15rem, 1.6vw, 1.4rem);
    font-weight: 700;
    line-height: 1.4;
    text-align: start;
}

.event-card__date {
    color: rgba(30, 30, 30, 0.7);
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.15vw, 1.05rem);
    font-weight: 500;
    line-height: 1.4;
    text-align: end;
    white-space: nowrap;
}

/* On wide screens the single card sits a little further right, as in the mock-up. */
@media (min-width: 600px) {
    .events__item {
        transform: translateX(28px);
    }
}

a.event-card:hover .event-card__title {
    color: var(--color-red-dark);
}

/* Questionnaire page (questionnaire.php) */
.intro__lead {
    max-inline-size: 68ch;
}

.survey__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
    margin: clamp(1.1rem, 1.9vw, 1.5rem) 0 0;
    padding: 0;
    list-style: none;
    color: rgba(30, 30, 30, 0.72);
    font-size: clamp(0.95rem, 1.18vw, 1.075rem);
    line-height: 1.5;
}

.survey__meta li {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.survey__meta li::before {
    content: "";
    flex: 0 0 auto;
    inline-size: 7px;
    block-size: 7px;
    background-color: var(--color-red);
    transform: rotate(45deg);
}

.survey {
    margin-block-start: clamp(2rem, 3.8vw, 3.25rem);
    text-align: start;
}

/* Server-side validation summary */
.survey__alert {
    margin-block-end: clamp(1.75rem, 3vw, 2.5rem);
    padding: clamp(1rem, 1.7vw, 1.4rem) clamp(1.1rem, 1.9vw, 1.6rem);
    background-color: var(--color-white);
    border-inline-start: 4px solid var(--color-red);
    box-shadow: 0 12px 32px rgba(30, 30, 30, 0.08);
}

.survey__alert-title {
    margin: 0 0 0.45rem;
    color: var(--color-red);
    font-size: clamp(1.025rem, 1.3vw, 1.15rem);
    font-weight: 700;
    line-height: 1.5;
}

.survey__alert-list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    line-height: 1.65;
}

.survey__alert-list li {
    position: relative;
    padding-inline-start: 17px;
}

.survey__alert-list li::before {
    content: "";
    position: absolute;
    inset-block-start: 0.62em;
    inset-inline-start: 1px;
    inline-size: 6px;
    block-size: 6px;
    border-radius: 50%;
    background-color: currentColor;
}

/* Confirmation card after a successful submission */
.survey__done {
    margin-block-start: clamp(1.75rem, 3vw, 2.5rem);
    padding: clamp(1.5rem, 3.2vw, 2.6rem);
    background-color: var(--color-white);
    border-block-start: 4px solid var(--color-red);
    box-shadow: 0 16px 44px rgba(30, 30, 30, 0.1);
    text-align: start;
}

.survey__done-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 54px;
    block-size: 54px;
    margin-block-end: 1rem;
    background-color: var(--color-red);
    color: var(--color-white);
}

.survey__done-title {
    margin: 0 0 0.65rem;
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 700;
    line-height: 1.35;
}

.survey__done-text {
    margin: 0;
    color: rgba(30, 30, 30, 0.78);
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    line-height: 1.85;
}

.survey__done-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: clamp(1.2rem, 2vw, 1.6rem) 0 0;
    padding: 0.9rem 1.15rem;
    background-color: rgba(30, 30, 30, 0.045);
}

.survey__done-meta div {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.survey__done-meta dt {
    color: rgba(30, 30, 30, 0.6);
    font-size: 0.95rem;
}

.survey__done-meta dd {
    margin: 0;
    color: var(--color-ink);
    font-weight: 700;
    letter-spacing: 0.06em;
}

.survey__alert--flash {
    margin: 1.25rem 0 0;
    border-inline-start-color: var(--color-red);
}

.otp__note {
    margin: 1rem 0 0;
    color: rgba(30, 30, 30, 0.6);
    font-size: 0.92rem;
    line-height: 1.7;
    text-align: center;
}

/* Sections */
.survey__group {
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.survey__group + .survey__group {
    margin-block-start: clamp(2.6rem, 5.2vw, 4.5rem);
}

.survey__legend {
    display: flex;
    align-items: center;
    gap: 14px;
    inline-size: 100%;
    margin: 0 0 clamp(1.25rem, 2.2vw, 1.75rem);
    padding: 0;
}

.survey__badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    inline-size: 46px;
    block-size: 46px;
    background-color: var(--color-red);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.survey__legend-title {
    flex: 0 0 auto;
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: clamp(1.5rem, 2.25vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
}

.survey__legend-rule {
    flex: 1 1 auto;
    block-size: 1px;
    background-color: rgba(30, 30, 30, 0.3);
}

.survey__legend-count {
    flex: 0 0 auto;
    color: rgba(30, 30, 30, 0.6);
    font-size: 15px;
    white-space: nowrap;
}

/* Two-column field grid; short fields pair in order (۱|۲، ۳|۴، …) */
.survey__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.15rem, 2.2vw, 1.6rem) clamp(1.25rem, 3.4vw, 2.75rem);
}

.survey__field {
    display: flex;
    flex-direction: column;
    min-inline-size: 0;
}

.survey__label {
    display: block;
    margin-block-end: 8px;
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: clamp(1.025rem, 1.3vw, 1.2rem);
    font-weight: 600;
    line-height: 1.5;
}

.survey__num {
    color: rgba(30, 30, 30, 0.55);
    font-weight: 400;
}

.survey__required {
    color: var(--color-red);
    font-weight: 700;
}

.survey__label-hint {
    color: rgba(30, 30, 30, 0.6);
    font-size: 0.82em;
    font-weight: 400;
}

/* Controls */
.survey__input,
.survey__select,
.survey__textarea {
    inline-size: 100%;
    padding: 10px 15px;
    background-color: var(--color-white);
    color: var(--color-ink);
    border: 2px solid rgba(30, 30, 30, 0.16);
    border-radius: 0;
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.55;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.survey__input,
.survey__select {
    block-size: 52px;
}

.survey__textarea {
    min-block-size: 150px;
    resize: vertical;
}

.survey__input::placeholder,
.survey__textarea::placeholder {
    color: rgba(30, 30, 30, 0.45);
    opacity: 1;
}

.survey__input:hover,
.survey__select:hover,
.survey__textarea:hover {
    border-color: rgba(30, 30, 30, 0.34);
}

.survey__input:focus,
.survey__select:focus,
.survey__textarea:focus,
.survey__input:focus-visible,
.survey__select:focus-visible,
.survey__textarea:focus-visible {
    border-color: var(--color-red);
    outline: none;
    box-shadow: 0 0 0 4px rgba(172, 31, 35, 0.15);
}

.survey__select {
    padding-inline-end: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%231e1e1e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    background-size: 12px 8px;
    cursor: pointer;
}

.survey__input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.survey__input[type="number"]::-webkit-outer-spin-button,
.survey__input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.survey__combo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

.survey__combo > div {
    min-inline-size: 0;
}

.survey__meta-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-block-start: 7px;
}

.survey__hint {
    margin: 0;
    color: rgba(30, 30, 30, 0.62);
    font-size: clamp(0.9rem, 1vw, 0.975rem);
    line-height: 1.6;
}

.survey__count {
    flex: 0 0 auto;
    margin-inline-start: auto;
    color: rgba(30, 30, 30, 0.62);
    font-size: clamp(0.9rem, 1vw, 0.975rem);
    line-height: 1.6;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.survey__count.is-over {
    color: var(--color-red);
    font-weight: 600;
}

.survey__error {
    margin: 7px 0 0;
    color: var(--color-red);
    font-size: clamp(0.92rem, 1.05vw, 1rem);
    font-weight: 600;
    line-height: 1.55;
}

.survey__field.has-error .survey__input,
.survey__field.has-error .survey__select,
.survey__field.has-error .survey__textarea {
    border-color: var(--color-red);
}

/* Consent */
.survey__consent {
    inline-size: fit-content;
    max-inline-size: 100%;
    margin-block-start: clamp(2.4rem, 4.4vw, 3.5rem);
    padding: clamp(1.05rem, 1.9vw, 1.5rem) clamp(1.1rem, 2vw, 1.6rem);
    border-inline-start: 4px solid var(--color-red);
}

.survey__check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--color-ink);
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    font-weight: 600;
    line-height: 1.55;
    cursor: pointer;
}

.survey__check input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    margin: 0;
    opacity: 0;
}

.survey__check-box {
    position: relative;
    flex: 0 0 auto;
    inline-size: 26px;
    block-size: 26px;
    margin-block-start: 0.12em;
    background-color: var(--color-white);
    border: 2px solid var(--color-ink);
}

.survey__check input:checked + .survey__check-box {
    background-color: var(--color-red);
    border-color: var(--color-red);
}

.survey__check-box::after {
    content: "";
    position: absolute;
    inset-block-start: 3px;
    left: 9px;
    inline-size: 5px;
    block-size: 11px;
    border: solid var(--color-white);
    border-width: 0 3px 3px 0;
    opacity: 0;
    transform: rotate(45deg);
}

.survey__check input:checked + .survey__check-box::after {
    opacity: 1;
}

.survey__check input:focus-visible + .survey__check-box {
    outline: 3px solid var(--color-ink);
    outline-offset: 3px;
}

.survey__check-text a {
    color: var(--color-red);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.survey__consent.has-error .survey__check-box {
    border-color: var(--color-red);
    box-shadow: 0 0 0 4px rgba(172, 31, 35, 0.15);
}

/* Actions */
.survey__actions {
    margin-block-start: clamp(2.1rem, 3.8vw, 3rem);
}

.survey__actions .intro__cta {
    border: 0;
    cursor: pointer;
}

.survey__actions .intro__cta svg {
    pointer-events: none;
}

/* Photo upload page (photos.php) */
.photos__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 1.6vw, 18px);
    margin-block-start: clamp(1.5rem, 2.6vw, 2.2rem);
}

.photos__slot {
    display: flex;
    align-items: stretch;
    gap: 8px;
    min-inline-size: 0;
    margin: 0;
}

.photos__drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    inline-size: 100%;
    min-block-size: clamp(48px, 5.2vw, 58px);
    padding: 6px 12px;
    background-color: var(--color-white);
    color: var(--color-red);
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.18s ease, background-color 0.18s ease;
}

.photos__drop:hover {
    background-color: #fffdf6;
    box-shadow: 0 8px 22px rgba(30, 30, 30, 0.12);
}

.photos__drop:focus-within {
    outline: 3px solid var(--color-red);
    outline-offset: 2px;
}

.photos__file {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.photos__slot-label {
    color: var(--color-red);
    font-size: clamp(0.88rem, 1.15vw, 1.02rem);
    font-weight: 700;
    line-height: 1.4;
}

.photos__required {
    margin-inline-start: 2px;
}

.photos__slot-name {
    display: block;
    max-inline-size: 100%;
    overflow: hidden;
    color: rgba(30, 30, 30, 0.5);
    font-size: 0.78rem;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photos__slot.is-filled .photos__slot-name {
    color: rgba(30, 30, 30, 0.78);
}

.photos__slot.is-uploading {
    opacity: 0.65;
    pointer-events: none;
}

.photos__save {
    flex: 0 0 auto;
    padding: 0 14px;
    border: 0;
    background-color: var(--color-red);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

html.js .photos__save {
    display: none;
}

.photos__finish {
    margin-block-start: clamp(1.75rem, 2.9vw, 2.4rem);
    text-align: start;
}

.photos__finish .intro__cta {
    border: 0;
    cursor: pointer;
}

.photos__note {
    margin: clamp(2.75rem, 6vw, 5rem) 0 0;
    color: var(--color-red);
    font-size: clamp(1rem, 1.6vw, 1.35rem);
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
}

.photos__note--hint {
    margin-block-start: 0.45rem;
    color: rgba(30, 30, 30, 0.62);
    font-size: clamp(0.82rem, 1.1vw, 0.95rem);
    font-weight: 400;
}

.photos__alert--ok {
    border-inline-start-color: var(--color-red);
}

.photos__alert--error .survey__alert-title {
    color: var(--color-red);
}

/* Photo submission confirmation (photos.php?step=sent) */
.photos--done {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-block: clamp(1rem, 2vh, 1.5rem) calc(clamp(1rem, 2vh, 1.5rem) + 43px);
}

.photos__done {
    inline-size: min(100% - (2 * var(--gutter)), calc(var(--container) + 44px));
    margin-inline: auto;
    text-align: center;
}

.photos__done-logo {
    line-height: 0;
}

.photos__done-logo img {
    display: inline-block;
    inline-size: clamp(230px, 44.5vw, 568px);
    height: auto;
}

.photos__done-text {
    margin-block-start: clamp(1.5rem, 3.55vw, 2.84rem);
}

.photos__done-title,
.photos__done-note {
    margin: 0;
    color: var(--color-red);
    font-family: var(--font-body);
    font-size: clamp(1.25rem, 3.13vw, 2.5rem);
    font-weight: 400;
    line-height: 1.78;
}

/* Questionnaire on tablet and mobile */
@media (max-width: 899px) {
    .survey__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 599px) {
    .survey__legend {
        flex-wrap: wrap;
        row-gap: 8px;
    }

    .survey__legend-rule {
        display: none;
    }

    .survey__legend-count {
        margin-inline-start: auto;
    }

    .photos__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 479px) {
    .survey__combo {
        grid-template-columns: minmax(0, 1fr);
    }

    .survey__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .survey__actions .intro__cta {
        justify-content: space-between;
        inline-size: 100%;
    }
}

/* SMS verification card (questionnaire.php?step=verify)
   The page behind stays visible but blurred; the card carries the code entry,
   its timer and the confirm action. */
body:has(.otp) {
    overflow: hidden;
}

.otp {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(16px, 4vw, 40px);
    overflow-y: auto;
    background-color: rgba(30, 30, 30, 0.2);
    -webkit-backdrop-filter: blur(10px) saturate(0.92);
    backdrop-filter: blur(10px) saturate(0.92);
}

.otp__card {
    inline-size: min(100%, 540px);
    margin: auto;
    padding: clamp(2rem, 4.4vw, 3.25rem) clamp(1.25rem, 3.6vw, 2.75rem);
    background-color: var(--color-red-dark);
    color: var(--color-white);
    text-align: center;
    box-shadow: 0 36px 90px rgba(30, 30, 30, 0.45);
}

.otp__title {
    margin: 0 0 clamp(0.5rem, 1.1vw, 0.75rem);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: clamp(1.45rem, 2.4vw, 1.85rem);
    font-weight: 700;
    line-height: 1.4;
}

.otp__text {
    max-inline-size: 42ch;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(0.98rem, 1.25vw, 1.075rem);
    line-height: 1.85;
}

.otp__phone {
    color: var(--color-white);
    font-weight: 700;
    white-space: nowrap;
}

.otp__form {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.otp__digits {
    display: flex;
    justify-content: center;
    gap: clamp(8px, 1.6vw, 12px);
    margin-block-start: clamp(1.35rem, 2.8vw, 1.9rem);
}

.otp__digit {
    inline-size: clamp(46px, 8.4vw, 64px);
    block-size: clamp(56px, 9.4vw, 70px);
    margin: 0;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 0;
    background-color: var(--color-white);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: clamp(1.5rem, 2.6vw, 1.9rem);
    font-weight: 700;
    line-height: 1;
    text-align: center;
    caret-color: var(--color-red);
    appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.otp__digit:focus {
    outline: none;
    border-color: var(--color-red);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.4);
}

.otp__error {
    max-inline-size: 42ch;
    margin: clamp(1rem, 1.8vw, 1.3rem) auto 0;
    color: var(--color-yellow);
    font-size: clamp(0.95rem, 1.15vw, 1rem);
    font-weight: 600;
    line-height: 1.75;
}

.otp__timer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: clamp(1.1rem, 2.1vw, 1.5rem) 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(0.92rem, 1.15vw, 1rem);
    line-height: 1.65;
}

.otp__clock {
    color: var(--color-white);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.otp__timer.is-expired {
    color: rgba(255, 255, 255, 0.94);
}

.otp__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-block-start: clamp(1.15rem, 2.4vw, 1.75rem);
    padding: 12px 26px;
    border: 0;
    background-color: var(--color-white);
    color: var(--color-red-dark);
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.otp__submit:hover {
    background-color: var(--color-yellow);
    color: var(--color-ink);
}

.otp__submit:active {
    transform: translateY(1px);
}

.otp__submit:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: 3px;
}

.otp__submit .intro__cta-arrow {
    inline-size: 24px;
    block-size: 12px;
}

.otp__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(0.75rem, 1.6vw, 1.15rem);
    margin: clamp(0.9rem, 1.8vw, 1.25rem) 0 0;
}

.otp__resend {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: 2px solid rgba(255, 255, 255, 0.88);
    background-color: transparent;
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: clamp(0.96rem, 1.2vw, 1.06rem);
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.otp__resend:hover:not(:disabled) {
    background-color: var(--color-white);
    color: var(--color-red-dark);
}

.otp__resend:active:not(:disabled) {
    transform: translateY(1px);
}

.otp__resend:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: 3px;
}

.otp__resend:disabled {
    border-color: rgba(255, 255, 255, 0.36);
    color: rgba(255, 255, 255, 0.46);
    cursor: not-allowed;
}

.otp__resend-icon {
    flex: 0 0 auto;
    inline-size: 20px;
    block-size: 20px;
}

.otp__notice {
    max-inline-size: 42ch;
    margin: clamp(0.9rem, 1.8vw, 1.2rem) auto 0;
    color: var(--color-white);
    font-size: clamp(0.95rem, 1.15vw, 1rem);
    font-weight: 600;
    line-height: 1.75;
}

.otp__link {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    line-height: 1.6;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.otp__link:hover {
    color: var(--color-yellow);
}

.otp__link:focus-visible {
    outline: 2px solid var(--color-white);
    outline-offset: 3px;
}

@media (max-width: 479px) {
    .otp__card {
        padding: 30px 18px 26px;
    }

    .otp__digit {
        inline-size: clamp(46px, 15vw, 58px);
    }
}

/* PHPFusion wrappers used by core pages and widgets */
.pf-table__title,
.pf-side__title {
    font-family: var(--font-body);
    font-weight: 700;
    line-height: 1.4;
}

.pf-table__title {
    margin: 0 0 1.25rem;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.pf-table__body > :first-child {
    margin-block-start: 0;
}

.pf-table__body > :last-child {
    margin-block-end: 0;
}

.pf-side {
    padding: 1.25rem;
    margin-block-end: 1.5rem;
    background-color: var(--color-white);
    border: 1px solid var(--color-rule-soft);
}

.pf-side__title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
}

/* PHPFusion notices and basic content inside the theme */
.site-notices {
    padding-block-start: 1rem;
}

.alert {
    padding: 12px 16px;
    margin-block-end: 1rem;
    background-color: var(--color-white);
    border-inline-start: 4px solid var(--color-red);
    font-family: var(--font-body);
}

/* Basic form elements for PHPFusion pages */
.page__inner input[type="text"],
.page__inner input[type="email"],
.page__inner input[type="password"],
.page__inner input[type="search"],
.page__inner input[type="tel"],
.page__inner input[type="url"],
.page__inner input[type="number"],
.page__inner select,
.page__inner textarea {
    width: 100%;
    padding: 10px 12px;
    background-color: var(--color-white);
    border: 1px solid rgba(30, 30, 30, 0.3);
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 16px;
}

.page__inner .btn,
.page__inner button[type="submit"],
.page__inner input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-block-size: 44px;
    padding: 8px 22px;
    background-color: var(--color-red);
    color: var(--color-white);
    border: 0;
    font-family: var(--font-body);
    font-size: 16px;
    cursor: pointer;
}

.page__inner .btn:hover,
.page__inner button[type="submit"]:hover,
.page__inner input[type="submit"]:hover {
    background-color: var(--color-red-dark);
}

/* Tablet and mobile header */
@media (max-width: 899px) {
    .site-header__inner {
        min-block-size: var(--header-height-mobile);
    }

    .hero,
    .page,
    .intro {
        min-block-size: calc(100svh - var(--header-height-mobile));
    }

    .hero__cta {
        font-size: clamp(1.5rem, 5.5vw, 37px);
    }

    .intro__frame::before,
    .intro__heading::after {
        display: none;
    }

    .intro__article {
        margin-inline-start: 0;
    }

    .site-header__main {
        gap: 0;
    }

    .site-brand img {
        width: 42px;
    }

    .site-header__rule {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .login-pill {
        min-block-size: 40px;
        padding-inline: 16px;
        font-size: 13px;
    }

    .site-nav {
        position: absolute;
        inset-block-start: 100%;
        inset-inline: 0;
        z-index: 60;
        display: none;
        padding: 8px var(--gutter) 20px;
        background-color: var(--color-surface);
        border-block-start: 1px solid var(--color-rule-soft);
        box-shadow: 0 18px 40px rgba(30, 30, 30, 0.12);
    }

    .site-header.is-open .site-nav {
        display: block;
    }

    .site-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .site-nav__item + .site-nav__item::before {
        display: none;
    }

    .site-nav__item + .site-nav__item {
        border-block-start: 1px solid var(--color-rule-soft);
    }

    .site-nav a {
        display: flex;
        min-block-size: 48px;
    }
}

/* Desktop exact vertical rhythm from the design */
@media (min-width: 900px) {
    .hero {
        padding-block: clamp(4rem, 15.3vh, 8.875rem) clamp(2rem, 6.5vh, 3.75rem);
    }

    .hero__cta {
        min-block-size: 72px;
    }
}

/* Small phones */
@media (max-width: 420px) {
    .site-header__actions {
        gap: 6px;
    }

    .login-pill {
        min-block-size: 38px;
        padding-inline: 12px;
        font-size: 12px;
    }

    .nav-toggle {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   Administrator sign-in (separate, administrator-only entrance)
   ========================================================================== */
.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-block-size: 100svh;
    padding: clamp(1.5rem, 5vw, 3.5rem) var(--gutter);
    background-color: var(--color-surface);
    background-image:
        radial-gradient(circle at 12% 12%, rgba(223, 187, 36, 0.20), transparent 42%),
        radial-gradient(circle at 88% 82%, rgba(172, 31, 35, 0.13), transparent 46%);
}

.admin-login__card {
    inline-size: min(100%, 430px);
    padding: clamp(1.8rem, 4.5vw, 2.9rem);
    background-color: var(--color-white);
    border-block-start: 6px solid var(--color-red);
    box-shadow: 0 30px 70px rgba(30, 30, 30, 0.16);
}

.admin-login__brand {
    display: flex;
    justify-content: center;
    margin-block-end: 1rem;
}

.admin-login__brand img {
    inline-size: 62px;
    block-size: auto;
}

.admin-login__kicker {
    margin: 0;
    color: var(--color-red);
    font-family: var(--font-header);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-align: center;
}

.admin-login__title {
    margin: 6px 0 0;
    color: var(--color-ink);
    font-family: var(--font-header);
    font-size: clamp(1.4rem, 3.4vw, 1.7rem);
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.admin-login__lead {
    margin: 10px 0 0;
    color: rgba(30, 30, 30, 0.65);
    font-family: var(--font-body);
    font-size: clamp(0.98rem, 1.3vw, 1.06rem);
    line-height: 1.75;
    text-align: center;
}

.admin-login__error {
    margin: 1.15rem 0 0;
    padding: 0.7rem 0.9rem;
    background-color: rgba(172, 31, 35, 0.08);
    border-inline-start: 4px solid var(--color-red);
    color: var(--color-red-dark);
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.65;
}

.admin-login__form {
    display: grid;
    gap: 1rem;
    margin-block-start: 1.4rem;
}

.admin-login__field {
    display: flex;
    flex-direction: column;
    min-inline-size: 0;
}

.admin-login__label {
    margin-block-end: 6px;
    color: var(--color-ink);
    font-family: var(--font-header);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
}

.admin-login__input {
    inline-size: 100%;
    block-size: 48px;
    padding: 8px 14px;
    background-color: var(--color-white);
    color: var(--color-ink);
    border: 2px solid rgba(30, 30, 30, 0.16);
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.5;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.admin-login__input:hover {
    border-color: rgba(30, 30, 30, 0.34);
}

.admin-login__input:focus,
.admin-login__input:focus-visible {
    border-color: var(--color-red);
    outline: none;
    box-shadow: 0 0 0 4px rgba(172, 31, 35, 0.15);
}

.admin-login__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 100%;
    min-block-size: 52px;
    padding-inline: 1rem;
    margin-block-start: 0.35rem;
    background-color: var(--color-red);
    color: var(--color-white);
    border: 0;
    border-radius: 0;
    font-family: var(--font-header);
    font-size: 1.02rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.18s ease;
}

.admin-login__submit:hover:not(:disabled) {
    background-color: var(--color-red-dark);
}

.admin-login__submit:focus-visible {
    outline: 3px solid var(--color-yellow);
    outline-offset: 2px;
}

.admin-login__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.admin-login__note {
    margin: 1.1rem 0 0;
    padding-block-start: 0.9rem;
    border-block-start: 1px solid var(--color-rule-soft);
    color: rgba(30, 30, 30, 0.55);
    font-family: var(--font-header);
    font-size: 0.78rem;
    line-height: 1.7;
    text-align: center;
}

.admin-login__back-wrap {
    margin: 0.7rem 0 0;
    text-align: center;
}

.admin-login__back {
    color: rgba(30, 30, 30, 0.6);
    font-family: var(--font-header);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.16s ease;
}

.admin-login__back:hover {
    color: var(--color-red);
}

/* Site login (pages/login.php)
   The one-time-code card is the same card used after the questionnaire,
   but rendered inline on the page instead of as a modal layer. */
.auth {
    inline-size: min(100%, 620px);
    margin-block-start: clamp(1.75rem, 3vw, 2.5rem);
    margin-inline: auto;
}

.auth__label {
    margin-block-start: clamp(1.25rem, 2.4vw, 1.7rem);
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(0.98rem, 1.25vw, 1.075rem);
    font-weight: 600;
    line-height: 1.6;
    text-align: center;
}

.auth__input {
    inline-size: 100%;
    block-size: 58px;
    margin-block-start: 8px;
    padding: 0 16px;
    border: 2px solid transparent;
    border-radius: 0;
    background-color: var(--color-white);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 1.8vw, 1.45rem);
    font-weight: 700;
    line-height: 1;
    text-align: center;
    direction: ltr;
    letter-spacing: 0.08em;
    caret-color: var(--color-red);
    appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth__input::placeholder {
    color: rgba(30, 30, 30, 0.4);
    opacity: 1;
}

.auth__input:focus {
    outline: none;
    border-color: var(--color-yellow);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.4);
}

.auth__note {
    max-inline-size: 42ch;
    margin: clamp(1.1rem, 2vw, 1.4rem) auto 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: clamp(0.88rem, 1.05vw, 0.96rem);
    line-height: 1.75;
    text-align: center;
}

.auth__change {
    margin: clamp(0.9rem, 1.8vw, 1.25rem) 0 0;
    text-align: center;
}

/* User panel (pages/panel.php)
   A read-only view of the participant's form answers and uploaded photos. */
.panel__hello {
    margin: clamp(1.4rem, 2.6vw, 2rem) 0 0;
    color: var(--color-ink);
    font-size: clamp(1.2rem, 1.9vw, 1.5rem);
    font-weight: 700;
    line-height: 1.6;
}

.panel__alert {
    margin-block-start: clamp(1.2rem, 2vw, 1.6rem);
}

.panel__account {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-block-start: clamp(1.1rem, 2vw, 1.5rem);
    background-color: rgba(30, 30, 30, 0.14);
    border: 1px solid rgba(30, 30, 30, 0.14);
}

.panel__account-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: clamp(0.9rem, 1.8vw, 1.2rem) clamp(0.9rem, 1.8vw, 1.25rem);
    background-color: var(--color-white);
}

.panel__account-label {
    color: rgba(30, 30, 30, 0.55);
    font-size: 0.85rem;
    line-height: 1.5;
}

.panel__account-value {
    color: var(--color-ink);
    font-size: clamp(1.02rem, 1.3vw, 1.15rem);
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.panel__submission {
    margin-block-start: clamp(1.75rem, 3vw, 2.5rem);
    padding: clamp(1.5rem, 3.2vw, 2.6rem);
    background-color: var(--color-white);
    border-block-start: 4px solid var(--color-red);
    box-shadow: 0 16px 44px rgba(30, 30, 30, 0.1);
}

.panel__submission-head {
    padding-block-end: clamp(1rem, 1.8vw, 1.4rem);
    border-block-end: 1px solid rgba(30, 30, 30, 0.12);
}

.panel__submission-title {
    margin: 0;
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
    font-weight: 700;
    line-height: 1.4;
}

.panel__submission-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0.6rem 0 0;
    color: rgba(30, 30, 30, 0.62);
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    line-height: 1.7;
}

.panel__section {
    margin-block-start: clamp(1.5rem, 2.6vw, 2.1rem);
}

.panel__section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--color-red);
    font-family: var(--font-body);
    font-size: clamp(1.15rem, 1.6vw, 1.35rem);
    font-weight: 700;
    line-height: 1.5;
}

.panel__section-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    background-color: var(--color-red);
    color: var(--color-white);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.6;
}

.panel__answers {
    margin: clamp(0.9rem, 1.6vw, 1.2rem) 0 0;
    border-block-start: 1px solid rgba(30, 30, 30, 0.12);
}

.panel__answer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: clamp(0.8rem, 2vw, 1.6rem);
    padding-block: clamp(0.7rem, 1.4vw, 0.95rem);
    border-block-end: 1px solid rgba(30, 30, 30, 0.12);
}

.panel__answer dt {
    color: rgba(30, 30, 30, 0.6);
    font-size: clamp(0.95rem, 1.15vw, 1.05rem);
    font-weight: 600;
    line-height: 1.7;
}

.panel__answer dd {
    margin: 0;
    color: var(--color-ink);
    font-size: clamp(0.98rem, 1.2vw, 1.08rem);
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.panel__answer-num {
    color: rgba(30, 30, 30, 0.42);
    font-weight: 400;
}

.panel__photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(130px, 18vw, 180px), 1fr));
    gap: clamp(0.7rem, 1.6vw, 1.1rem);
    margin: clamp(1rem, 1.8vw, 1.35rem) 0 0;
    padding: 0;
    list-style: none;
}

.panel__photo {
    display: block;
    background-color: rgba(30, 30, 30, 0.045);
    border: 1px solid rgba(30, 30, 30, 0.12);
    color: var(--color-ink);
    text-decoration: none;
    transition: border-color 0.16s ease;
}

.panel__photo:hover {
    border-color: var(--color-red);
}

.panel__photo:focus-visible {
    outline: 3px solid var(--color-red);
    outline-offset: 2px;
}

.panel__photo img {
    display: block;
    inline-size: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.panel__photo-label {
    display: block;
    padding: 8px 10px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
}

.panel__muted {
    margin: 1rem 0 0;
    color: rgba(30, 30, 30, 0.58);
}

.panel__note {
    margin: clamp(1.5rem, 2.6vw, 2.1rem) 0 0;
    color: rgba(30, 30, 30, 0.6);
    font-size: 0.95rem;
    line-height: 1.75;
}

.panel__actions {
    margin-block-start: clamp(1.2rem, 2.2vw, 1.7rem);
}

.panel__actions .intro__cta {
    margin-block-start: 0;
}

@media (max-width: 699px) {
    .panel__account {
        grid-template-columns: minmax(0, 1fr);
    }

    .panel__answer {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }
}

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