@font-face {
    font-family: Vazirmatn;
    src: url("/assets/vazirmatn.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

:root {
    font-family: Vazirmatn, Tahoma, sans-serif;
    color: #14283b;
    background: #edf2f5;
    color-scheme: light;
    font-synthesis: none;
    --ink: #14283b;
    --muted: #4a6072;
    --border: #c9d5de;
    --accent: #efb955;
    --selected: #fdf6e9;
    --selected-edge: #af7825;
    --error: #9c2a28;
}

* { box-sizing: border-box; }

body { margin: 0; }

body.internship {
    --accent: #89c8ef;
    --selected: #eaf5fc;
    --selected-edge: #40779e;
}

.shell {
    max-inline-size: 760px;
    margin-inline: auto;
    padding: 22px 24px 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-block-end: 14px;
}

.brand img {
    flex: none;
    object-fit: contain;
    padding: 6px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 5px #14283b16;
}

.internship .brand img { padding: 0; }

.brand strong {
    display: block;
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.4;
}

.brand p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: .79rem;
    line-height: 1.5;
}

.intro {
    padding: clamp(24px, 5vw, 42px);
    border-radius: 19px;
    background: linear-gradient(115deg, #1d3853, #112338 73%);
    color: #fff;
    box-shadow: 0 9px 22px #12283a14;
}

.internship .intro { background: linear-gradient(115deg, #204563, #112338 74%); }

.accent {
    height: 4px;
    width: 32px;
    border-radius: 3px;
    background: var(--accent);
    margin-block-end: 10px;
}

h1, h2, p { margin-block-start: 0; }

h1 {
    font-size: clamp(1.65rem, 5.3vw, 2.45rem);
    line-height: 1.5;
    margin-block-end: 4px;
    font-weight: 850;
    text-wrap: balance;
}

.intro p {
    margin-block-end: 0;
    color: #e0eaf2;
    font-size: .95rem;
    line-height: 1.8;
}

.panel {
    background: #fff;
    border: 1px solid #dce5eb;
    border-radius: 17px;
    padding: clamp(16px, 4vw, 25px);
    margin-block-start: 13px;
    box-shadow: 0 2px 4px #10283f05;
}

.panel h2 {
    font-size: 1.12rem;
    font-weight: 850;
    margin-block-end: 13px;
}

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

.wide { grid-column: 1 / -1; }

.field > label, .choices legend {
    display: block;
    margin-block-end: 5px;
    font-size: .94rem;
    font-weight: 700;
}

.optional {
    margin-inline-start: 4px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 400;
}

.field input, .field textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 10px 12px;
    background: #fbfcfd;
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    line-height: 1.55;
}

.field textarea { resize: vertical; }
.field input[dir="ltr"] { text-align: right; }
::placeholder { color: #62778a; opacity: 1; }

.hint {
    font-size: .84rem;
    color: var(--muted);
    line-height: 1.75;
    margin-block-end: 8px;
}

.choices { border: 0; min-inline-size: 0; padding: 0; margin: 0; }

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

.choice-grid.detailed { grid-template-columns: 1fr; }

.choice {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fbfcfd;
    cursor: pointer;
}

.choice:has(input:checked) {
    background: var(--selected);
    border-color: var(--selected-edge);
}

.choice input {
    flex: none;
    inline-size: 19px;
    block-size: 19px;
    margin: 0;
    accent-color: #1c4868;
    cursor: pointer;
}

.choice strong, .choice small { display: block; }
.choice strong { font-size: .88rem; font-weight: 650; }
.choice small { font-size: .78rem; color: var(--muted); line-height: 1.55; }
.detailed .choice { padding-block: 9px; }

:where(input, textarea, a, button):focus-visible {
    outline: 2px solid #21638e;
    outline-offset: 3px;
}

[aria-invalid="true"] { border-color: var(--error) !important; }
.error { margin: 5px 0 0; font-size: .84rem; color: var(--error); }

.error-summary {
    background: #fff1ef;
    border: 1px solid #e2a8a2;
    color: var(--error);
    padding: 12px 16px;
    border-radius: 10px;
    margin-block-start: 13px;
}

.error-summary ul { margin-block: 4px 0; padding-inline-start: 20px; }
.error-summary ul:empty { display: none; }
.error-summary a { color: inherit; }

.submit-area { margin-block-start: 15px; }
.submit-area .hint { margin-block-end: 7px; }

button, .secondary {
    font: inherit;
    font-weight: 780;
    min-height: 49px;
    border-radius: 10px;
}

button {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    background: #142d45;
    color: #fff;
    border: 1px solid #142d45;
    padding: 10px 36px;
    cursor: pointer;
}

button:hover { background: #214663; }
button span { position: absolute; inset-inline-end: 16px; font-size: 1.1rem; }

.success { text-align: center; padding-block: 30px; }
.success h2 { margin-block-end: 5px; font-size: 1.3rem; }
.success p { margin-block-end: 15px; color: var(--muted); }

.success-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    margin: 0 auto 10px;
    background: #e5f5ee;
    color: #196047;
    font-size: 1.4rem;
}

.receipt {
    display: table;
    margin: 0 auto 18px;
    border: 1px dashed #9ab2c5;
    border-radius: 8px;
    padding: 8px 15px;
    font: 700 .96rem monospace;
    background: #f2f7fa;
    user-select: all;
}

.secondary {
    display: inline-flex;
    align-items: center;
    padding-inline: 16px;
    color: #174561;
    border: 1px solid var(--border);
    text-decoration: none;
}

footer {
    font-size: .78rem;
    color: var(--muted);
    text-align: center;
    padding: 17px 0 6px;
}

footer a { color: inherit; text-underline-offset: 3px; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (max-width: 520px) {
    .shell { padding: 14px 12px 10px; }
    .fields { grid-template-columns: 1fr; gap: 12px; }
    .choice-grid:has(input[name="services"]) { grid-template-columns: 1fr; }
}

@media (forced-colors: active) {
    .choice:has(input:checked) { border-color: Highlight; }
}
