:root {
    --bg: #f5efe5;
    --bg-strong: #efe3d2;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: rgba(255, 255, 255, 0.94);
    --surface-border: rgba(81, 56, 34, 0.08);
    --text: #201812;
    --muted: #6a5a4e;
    --accent: #0f766e;
    --accent-strong: #115e59;
    --accent-soft: rgba(15, 118, 110, 0.1);
    --gold: #b7791f;
    --danger-soft: rgba(185, 28, 28, 0.09);
    --shadow: 0 20px 60px rgba(61, 39, 18, 0.12);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 28%),
        radial-gradient(circle at right center, rgba(183, 121, 31, 0.12), transparent 20%),
        linear-gradient(180deg, #fbf7f1 0%, var(--bg) 45%, #f1e7da 100%);
}

code {
    color: var(--accent-strong);
}

.page-shell {
    position: relative;
    overflow: hidden;
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(20px);
    pointer-events: none;
    z-index: 0;
}

.orb-a {
    width: 280px;
    height: 280px;
    top: -60px;
    right: -80px;
    background: rgba(15, 118, 110, 0.12);
}

.orb-b {
    width: 340px;
    height: 340px;
    bottom: -120px;
    left: -80px;
    background: rgba(183, 121, 31, 0.14);
}

.container,
.hero-card,
.form-card,
.info-card,
.summary-card {
    position: relative;
    z-index: 1;
}

.language-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.language-switcher {
    display: inline-flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(32, 24, 18, 0.08);
    box-shadow: 0 10px 24px rgba(61, 39, 18, 0.08);
}

.language-switcher-btn {
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: transparent;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.language-switcher-btn.is-active {
    background: var(--accent);
    color: #fff;
}

.hero-card,
.form-card,
.info-card,
.summary-card {
    backdrop-filter: blur(18px);
    background: var(--surface);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 2rem;
    border-radius: var(--radius-xl);
}

.eyebrow {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(32, 24, 18, 0.06);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-title {
    margin: 1rem 0 0.7rem;
    font-family: "Cinzel", serif;
    font-size: clamp(2.2rem, 4vw, 4.1rem);
    line-height: 0.98;
    font-weight: 700;
}

.hero-copy,
.placeholder-copy,
.section-heading p,
.field-help,
.info-copy,
.submit-copy,
.summary-item dd {
    color: var(--muted);
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.badge-chip {
    padding: 0.65rem 0.95rem;
    border-radius: 999px;
    background: var(--surface-strong);
    border: 1px solid rgba(32, 24, 18, 0.08);
    font-weight: 700;
    font-size: 0.92rem;
}

.summary-card,
.info-card {
    border-radius: var(--radius-lg);
}

.summary-card {
    padding: 1.3rem;
    height: 100%;
    background:
        linear-gradient(160deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.9)),
        var(--surface);
}

.summary-header,
.summary-grid,
.submit-panel {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.summary-header {
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 800;
}

.summary-status {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.8rem;
}

.summary-grid {
    flex-wrap: wrap;
}

.summary-item {
    width: calc(50% - 0.5rem);
    margin: 0;
}

.summary-item dt {
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.summary-item dd {
    margin-bottom: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
}

.form-card {
    padding: 1.1rem;
    border-radius: var(--radius-xl);
}

.access-guard {
    position: relative;
    overflow: hidden;
}

.access-guard>* {
    transition: filter 220ms ease, opacity 220ms ease;
}

.access-guard.is-locked>* {
    filter: blur(8px);
    opacity: 0.75;
    pointer-events: none;
    user-select: none;
}

.access-guard::after {
    content: none;
}

.access-guard.is-locked::after {
    content: attr(data-guard-message);
    position: absolute;
    inset: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(32, 24, 18, 0.08);
    color: var(--text);
    text-align: center;
    font-size: 1rem;
    font-weight: 800;
    z-index: 2;
}

.section-block {
    padding: 1.3rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    border: 1px solid rgba(32, 24, 18, 0.06);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-heading h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
}

.section-heading p {
    margin: 0.35rem 0 0;
}

.section-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), #14b8a6);
    color: #fff;
    font-weight: 800;
}

.field-card {
    padding: 1rem;
    height: 100%;
    border-radius: var(--radius-md);
    background: rgba(245, 239, 229, 0.6);
    border: 1px solid rgba(32, 24, 18, 0.06);
}

.field-card.has-error {
    border-color: rgba(185, 28, 28, 0.35);
    background: rgba(185, 28, 28, 0.05);
}

.form-label {
    font-size: 0.92rem;
    font-weight: 800;
    margin-bottom: 0.55rem;
}

.required-mark {
    color: #b91c1c;
}

.form-control,
.form-select {
    border-radius: 14px;
    border: 1px solid rgba(32, 24, 18, 0.12);
    min-height: 3rem;
    padding: 0.8rem 0.95rem;
    font-size: 0.98rem;
    background-color: #fffdf9;
}

.form-control:focus,
.form-select:focus,
.choice-card input:focus {
    border-color: rgba(15, 118, 110, 0.5);
    box-shadow: 0 0 0 0.24rem rgba(15, 118, 110, 0.12);
}

.form-control.is-invalid,
.was-validated .form-control:invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 0.18rem rgba(220, 38, 38, 0.12);
}

textarea.form-control {
    min-height: 140px;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
}

.choice-card {
    display: block;
    position: relative;
    cursor: pointer;
}

.choice-card input {
    position: absolute;
    opacity: 0;
    inset: 0;
}

.choice-content {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    height: 100%;
    min-height: 3.4rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: #fffdf9;
    border: 1px solid rgba(32, 24, 18, 0.1);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.choice-card input:checked+.choice-content {
    background: var(--accent-soft);
    border-color: rgba(15, 118, 110, 0.45);
    transform: translateY(-1px);
}

.choice-card.is-invalid .choice-content {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.06);
}

.choice-card.is-invalid .choice-indicator {
    border-color: #dc2626;
}

.choice-indicator {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(32, 24, 18, 0.28);
    border-radius: 50%;
    flex: 0 0 auto;
}

.choice-card input[type="checkbox"]+.choice-content .choice-indicator {
    border-radius: 0.28rem;
}

.choice-card input:checked+.choice-content .choice-indicator {
    background: var(--accent);
    border-color: var(--accent);
}

.checklist-box {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(183, 121, 31, 0.08);
    border: 1px solid rgba(183, 121, 31, 0.14);
}

.checklist-title,
.info-title,
.submit-title {
    font-size: 0.96rem;
    font-weight: 800;
}

.file-drop {
    padding: 1.1rem;
    border: 1px dashed rgba(15, 118, 110, 0.35);
    border-radius: var(--radius-md);
    background: rgba(15, 118, 110, 0.04);
}

.upload-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
}

.upload-action-card {
    padding: 0.95rem;
    border-radius: 16px;
    background: rgba(255, 253, 249, 0.95);
    border: 1px solid rgba(32, 24, 18, 0.08);
}

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

.file-list {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.9rem;
}

.file-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(32, 24, 18, 0.06);
    font-size: 0.86rem;
    font-weight: 700;
}

.sidebar-stack {
    display: grid;
    gap: 1rem;
}

.info-card {
    padding: 1.2rem;
}

.info-list {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--muted);
}

.info-list li+li {
    margin-top: 0.5rem;
}

.tone-muted {
    background: rgba(255, 255, 255, 0.7);
}

.submit-panel {
    align-items: center;
    flex-wrap: wrap;
    padding: 1.2rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.94));
    border: 1px solid rgba(15, 118, 110, 0.12);
}

.btn-accent {
    min-width: 220px;
    border: 0;
    border-radius: 16px;
    padding: 0.95rem 1.25rem;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    color: #fff;
    font-weight: 800;
}

.btn-accent:hover,
.btn-accent:focus {
    color: #fff;
    background: linear-gradient(135deg, #0b4f4c, #0f766e);
}

.btn-outline-accent {
    border: 1px solid rgba(15, 118, 110, 0.35);
    border-radius: 14px;
    color: var(--accent-strong);
    font-weight: 800;
    background: #fff;
}

.btn-outline-accent:hover,
.btn-outline-accent:focus {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
}

.btn-accent-soft {
    border: 1px solid rgba(183, 121, 31, 0.2);
    border-radius: 14px;
    color: #8a5a16;
    font-weight: 800;
    background: rgba(183, 121, 31, 0.12);
}

.btn-accent-soft:hover,
.btn-accent-soft:focus {
    color: #6d460f;
    border-color: rgba(183, 121, 31, 0.35);
    background: rgba(183, 121, 31, 0.18);
}

.btn-label,
.btn-spinner {
    vertical-align: middle;
}

.alert {
    border-radius: 18px;
}

.page-footer {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    padding: 0.5rem 0 1rem;
}

.page-footer-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    text-align: center;
}

.page-footer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 800;
}

.invalid-feedback {
    font-weight: 600;
}

.validation-summary-list {
    padding-left: 1.2rem;
}

.validation-summary-list li + li {
    margin-top: 0.45rem;
}

@media (max-width: 991.98px) {

    .hero-card,
    .form-card {
        padding: 1rem;
    }

    .section-block {
        padding: 1rem;
    }
}

@media (max-width: 767.98px) {
    .summary-item {
        width: 100%;
    }

    .section-heading {
        flex-direction: column;
    }

    .submit-panel {
        align-items: stretch;
    }

    .btn-accent {
        width: 100%;
    }
}
