:root {
    --bg1: #eaf7f3;
    --bg2: #edf3fa;
    --card: #ffffff;
    --text: #0c2f52;
    --muted: #496783;
    --line: #c8d9ea;
    --accent: #0cba91;
    --accent-strong: #004284;
    --ok-bg: #e2f9f4;
    --ok-text: #006a54;
    --err-bg: #ffeaea;
    --err-text: #9a2d24;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-soft: rgba(255, 255, 255, 0.72);
    --focus-ring: rgba(12, 186, 145, 0.24);
    --shadow-soft: 0 22px 42px rgba(1, 56, 112, 0.16);
    --shadow-card: 0 14px 28px rgba(2, 63, 123, 0.1);
    --page-gutter-x: 24px;
    --page-gutter-y: 24px;
    --footer-art-overlap: clamp(20px, 4.8vw, 72px);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background:
        radial-gradient(circle at 12% 10%, rgba(12, 186, 145, 0.28), transparent 40%),
        radial-gradient(circle at 88% 0%, rgba(0, 66, 132, 0.2), transparent 42%),
        radial-gradient(circle at 50% 78%, rgba(0, 66, 132, 0.08), transparent 50%),
        linear-gradient(160deg, var(--bg1), var(--bg2));
    padding: 0;
}

.body-footer-art {
    display: block;
    position: relative;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-top: calc(var(--footer-art-overlap) * -1);
    pointer-events: none;
    z-index: 1;
}

.page {
    width: min(1200px, calc(100% - (var(--page-gutter-x) * 2)));
    margin: var(--page-gutter-y) auto;
    border: 1px solid rgba(9, 74, 125, 0.18);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(247, 251, 255, 0.72));
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 2;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.language-bar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 250, 246, 0.94));
    border-bottom: 1px solid rgba(9, 74, 125, 0.1);
}

.top {
    padding: 0 32px 34px;
}

.garland {
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: block;
}

.garland-wrap {
    height: 38px;
    margin: -5px -32px 18px;
    overflow: hidden;
    border-radius: 0;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0b6e9f;
}

h1 {
    margin: 0 auto;
    font-size: clamp(2.1rem, 4.3vw, 3.15rem);
    line-height: 1.06;
    letter-spacing: -0.02em;
    font-weight: 800;
    text-align: center;
    color: #083967;
}

.subtitle {
    margin: 10px auto 0;
    max-width: 44ch;
    color: #1a4f79;
    line-height: 1.35;
    font-size: clamp(1.05rem, 2.2vw, 1.34rem);
    font-weight: 700;
    text-align: center;
}

.intro {
    margin: 12px auto 0;
    max-width: 69ch;
    color: var(--muted);
    line-height: 1.7;
    font-size: 1.03rem;
    font-weight: 600;
    text-align: center;
}

.lang-switch {
    margin: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 0;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
}

.lang-select-wrap {
    display: none;
}

.hero-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.hero-card {
    border: 1px solid #bdd5ea;
    background: #ffffff;
    border-radius: 16px;
    padding: 15px 15px;
    box-shadow: var(--shadow-card);
    transition: transform .18s ease, box-shadow .18s ease;
    position: relative;
}

.hero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(2, 63, 123, 0.16);
}

.hero-card h3 {
    margin: 0;
    font-size: 1rem;
    color: #073c74;
}

.hero-card p {
    margin: 7px 0 0;
    color: #3f5f7f;
    font-size: 0.9rem;
    line-height: 1.45;
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    border-radius: 0;
    color: var(--text);
    padding: 13px 9px;
    font: inherit;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.1;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
    min-height: 56px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.lang-btn:last-child {
    border-right: 0;
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.lang-btn:hover,
.lang-btn:focus-visible {
    background: #eaf5ff;
    outline: none;
}

.lang-btn.active:hover,
.lang-btn.active:focus-visible {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.content {
    padding: 32px 30px 36px;
}

.content-head h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.5vw, 1.9rem);
    color: #063f78;
    letter-spacing: -0.01em;
}

.content-head p {
    margin: 8px 0 0;
    color: #476887;
    font-weight: 600;
}

.status {
    margin: 16px 0;
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 700;
    border: 1px solid transparent;
}

.status.ok { background: var(--ok-bg); color: var(--ok-text); border-color: #bfe8dc; }
.status.err { background: var(--err-bg); color: var(--err-text); border-color: #f1c2bf; }

form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-panel {
    margin-top: 16px;
    padding: 22px;
    border: 1px solid #b4cfe7;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 14px 26px rgba(2, 63, 123, 0.09);
}

.form-panel h3 {
    margin: 0;
    font-size: 1.27rem;
    color: #063f78;
}

.success-panel {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid #bfe2d8;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(226, 249, 244, 0.95), rgba(255, 255, 255, 0.9));
}

.success-panel h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #006a54;
}

.success-panel p {
    margin: 7px 0 16px;
    color: #2e5f57;
    font-weight: 600;
}

.success-summary {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.success-summary div {
    border: 1px solid #c9e5dc;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    padding: 10px 12px;
}

.success-summary dt {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #2e6f65;
}

.success-summary dd {
    margin: 5px 0 0;
    font-weight: 700;
    color: #0a3d67;
    word-break: break-word;
}

.success-summary .full {
    grid-column: 1 / -1;
}

.success-actions {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.back-to-form-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #96cfc0;
    border-radius: 11px;
    padding: 10px 14px;
    text-decoration: none;
    font-weight: 800;
    color: #0a3f69;
    background: #fff;
    transition: .15s ease;
}

.back-to-form-btn:hover,
.back-to-form-btn:focus-visible {
    outline: none;
    background: #ecfaf6;
    border-color: #0cba91;
}

.form-intro {
    margin: 8px 0 18px;
    color: #476887;
    font-weight: 600;
}

.full { grid-column: 1 / -1; }

label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #123a64;
}

.req { color: #bc2b21; }

input:not([type="radio"]):not([type="checkbox"]), select {
    width: 100%;
    border: 1px solid #bfd4e8;
    border-radius: 11px;
    padding: 13px 13px;
    font: inherit;
    background: #fff;
    font-size: 0.98rem;
    color: #113a62;
    min-height: 48px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

input:not([type="radio"]):not([type="checkbox"]):hover,
select:hover {
    border-color: #9fbde0;
}

input:not([type="radio"]):not([type="checkbox"]):focus,
select:focus {
    outline: none;
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.choice {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #bfd4e8;
    border-radius: 999px;
    padding: 9px 13px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.choice input { width: auto; margin: 0; }
.choice input {
    width: 20px;
    height: 20px;
    min-height: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    appearance: auto;
    -webkit-appearance: radio;
    accent-color: #0cba91;
    flex: 0 0 auto;
}

.choice:hover {
    border-color: #90b8df;
    background: #f3f9ff;
}

.choice:has(input:checked) {
    border-color: #0cba91;
    background: #eefcf8;
    box-shadow: 0 0 0 2px rgba(12, 186, 145, 0.14);
}

.choice:focus-within {
    border-color: #0cba91;
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.contact-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.contact-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: #0cba91;
}

.submit-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

.form-fhb-logo {
    display: block;
    width: auto;
    height: 58px;
    max-width: 260px;
    object-fit: contain;
    margin-left: auto;
}

button[type="submit"] {
    border: 0;
    border-radius: 11px;
    padding: 12px 18px;
    min-width: 220px;
    color: #fff;
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    background: linear-gradient(-45deg, #ff9900, var(--accent-strong), var(--accent), #ff9900);
    background-size: 320% 320%;
    animation: submit-gradient 18s ease infinite;
    box-shadow: 0 12px 24px rgba(0, 66, 132, 0.25);
    min-height: 48px;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(0, 66, 132, 0.28);
    filter: saturate(1.08);
}

button[type="submit"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--focus-ring), 0 12px 24px rgba(0, 66, 132, 0.25);
}

@keyframes submit-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    button[type="submit"] {
        animation: none;
        background-position: 50% 50%;
    }
}

.hint { color: var(--muted); font-size: 0.93rem; }

html[dir="rtl"] .language-bar {
    direction: ltr;
}

html[dir="rtl"] .lang-switch,
html[dir="rtl"] .choices,
html[dir="rtl"] .submit-row {
    justify-content: flex-start;
}

html[dir="rtl"] .hint {
    text-align: right;
}

.submit-row .hint {
    font-weight: 600;
    color: #44637e;
}

.site-footer {
    width: 100%;
    margin-top: 0;
    padding: 26px 14px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #272727;
    color: #ffffff;
}

.footer-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px 42px;
}

.footer-logo {
    display: block;
    width: auto;
    height: 64px;
    object-fit: contain;
}

.footer-logo--dil {
    height: 64px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 22px;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border-bottom: 1px solid transparent;
    padding: 2px 0;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    border-bottom-color: #8fd7c5;
    outline: none;
    color: #d9fff4;
}

.legal-backlink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 2px 0 20px;
    padding: 11px 18px;
    min-height: 46px;
    border: 1px solid rgba(9, 74, 125, 0.16);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(237, 245, 253, 0.94));
    box-shadow: 0 10px 20px rgba(2, 63, 123, 0.1);
    color: #0b5d84;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, color .15s ease, background .15s ease;
}

.legal-header-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.legal-header-row h1 {
    margin: 0;
}

.legal-backlink--ghost {
    visibility: hidden;
    pointer-events: none;
}

.legal-backlink:hover,
.legal-backlink:focus-visible {
    color: #083967;
    border-color: rgba(12, 186, 145, 0.44);
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(231, 248, 243, 0.96));
    box-shadow: 0 12px 22px rgba(2, 63, 123, 0.14);
    transform: translateY(-1px);
    outline: none;
}

.page--legal .top {
    padding-bottom: 24px;
}

.legal-intro {
    margin: 14px auto 0;
    max-width: 72ch;
    color: var(--muted);
    line-height: 1.7;
    font-size: 1rem;
}

.legal-layout {
    display: grid;
    gap: 18px;
}

.legal-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(9, 74, 125, 0.12);
    border-radius: 20px;
    padding: 24px 24px 22px;
    box-shadow: var(--shadow-card);
}

.legal-card h2 {
    margin: 0 0 12px;
    font-size: 1.3rem;
    color: #063f78;
}

.legal-card h3 {
    margin: 18px 0 10px;
    font-size: 1rem;
    color: #0b507c;
}

.legal-card p,
.legal-card li,
.legal-card address {
    color: #3f5f7f;
    line-height: 1.7;
    font-style: normal;
}

.legal-card p {
    margin: 0 0 12px;
}

.legal-card ul {
    margin: 0 0 12px 18px;
    padding: 0;
}

.legal-card li + li {
    margin-top: 6px;
}

.legal-card a {
    color: #004284;
}

.legal-card a:hover,
.legal-card a:focus-visible {
    color: #0c8b78;
    outline: none;
}

.legal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.legal-note {
    margin: 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(12, 186, 145, 0.1), rgba(0, 66, 132, 0.08));
    border: 1px solid rgba(12, 186, 145, 0.16);
    color: #345572;
    font-weight: 600;
}

.footer-links a[aria-current="page"] {
    border-bottom-color: #8fd7c5;
    color: #d9fff4;
}

@media (max-width: 760px) {
    :root {
        --page-gutter-x: 10px;
    }

    body {
        align-items: stretch;
        padding: 0;
    }

    .body-footer-art {
        width: 100%;
        align-self: center;
    }

    .page {
        border-radius: 20px;
    }

    .top { padding: 0 18px 18px; }
    .content { padding: 22px 16px 22px; }
    .hero-grid { grid-template-columns: 1fr; }
    form { grid-template-columns: 1fr; }
    .form-panel { padding: 16px 14px; }
    .success-panel { padding: 14px; }
    .success-summary { grid-template-columns: 1fr; }

    .lang-switch {
        display: none;
    }

    .lang-select-wrap {
        display: block;
    }

    .lang-select {
        width: 100%;
        border: 0;
        border-bottom: 1px solid var(--line);
        border-radius: 0;
        appearance: none;
        -webkit-appearance: none;
        background-color: #fff;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23677f99' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 16px;
        color: var(--text);
        font: inherit;
        font-weight: 700;
        font-size: 0.96rem;
        min-height: 48px;
        padding: 0 42px 0 16px;
        outline: none;
    }

    .lang-select:focus {
        box-shadow: inset 0 0 0 2px rgba(12, 186, 145, 0.25);
    }

    .garland-wrap {
        height: 34px;
        margin: -7px -18px 16px;
    }

    .intro {
        font-size: 1.01rem;
        line-height: 1.62;
    }

    .subtitle {
        margin-top: 8px;
        font-size: 1.02rem;
    }

    label {
        font-size: 0.97rem;
    }

    .submit-row { flex-direction: column; align-items: stretch; gap: 9px; }
    .choices { flex-direction: column; gap: 10px; }
    .choice { width: 100%; }
    .form-fhb-logo {
        height: 54px;
        margin: 8px auto 0;
        align-self: center;
    }

    button[type="submit"],
    .back-to-form-btn {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }

    .site-footer {
        margin-top: 0;
        gap: 12px;
        padding: 18px 12px 12px;
    }

    .footer-logos {
        gap: 12px 22px;
    }

    .footer-logo {
        width: auto;
        height: 46px;
    }

    .footer-logo--dil {
        height: 46px;
    }

    .legal-card {
        padding: 18px 16px 16px;
        border-radius: 16px;
    }

    .legal-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .legal-intro {
        font-size: 0.98rem;
        line-height: 1.65;
    }

    .legal-header-row {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 0;
    }

    .legal-header-row h1 {
        margin: 0 auto;
    }

    .legal-backlink {
        width: 100%;
        margin: 0 0 18px;
        padding: 12px 16px;
    }

    .legal-backlink--ghost {
        display: none;
    }
}

