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

html {
    color-scheme: light;
    -webkit-text-size-adjust: 100%;
}

html, body {
    margin: 0;
    min-height: 100%;
}

body.public-form {
    font: 15px/1.55 Inter, "Segoe UI", sans-serif;
    color: #0f172a;
    background-color: #f7f8fa;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.public-form.has-form-bg {
    background-repeat: repeat-y;
    background-position: top center;
    background-size: 100% auto;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #059669; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.top {
    background: #fff;
}

.top-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
}

.top-logo img {
    max-height: 36px;
    max-width: 180px;
    width: auto;
    object-fit: contain;
}

.top-title {
    overflow: hidden;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-mail {
    margin-left: auto;
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
}

.top-mail:hover { color: #059669; }

.wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 12px 24px 72px;
}

.tabs {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 20px 0 24px;
}

.tabs::before {
    content: "";
    position: absolute;
    top: 16px;
    left: 4%;
    right: 4%;
    z-index: 0;
    height: 2px;
    background: #e2e8f0;
}

.tabs button {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 0;
    background: none;
    padding: 0;
    color: #94a3b8;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.step-num {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    background: #fff;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
}

.tabs button.is-active,
.tabs button.is-done { color: #0f172a; }

.tabs button.is-active .step-num,
.tabs button.is-done .step-num {
    border-color: #10b981;
    background: #10b981;
    color: #fff;
}

.sheet {
    position: relative;
    background: none;
    border: 0;
    border-radius: 0;
    padding: 0;
}

.form-busy {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 30;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    background: rgba(247, 248, 250, .88);
    text-align: center;
}

.sheet.is-submitting { pointer-events: none; }
.sheet.is-submitting .form-busy { display: flex; }
.sheet.is-submitting #form-submit {
    opacity: .65;
    cursor: wait;
}

.form-busy p {
    max-width: 22em;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.form-busy-spin {
    width: 32px;
    height: 32px;
    border: 3px solid #d1fae5;
    border-top-color: #10b981;
    border-radius: 50%;
    animation: form-busy-spin .7s linear infinite;
}

@keyframes form-busy-spin {
    to { transform: rotate(360deg); }
}

.meta {
    display: none;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    color: #64748b;
    font-size: 13px;
}

.meta strong {
    color: #0f172a;
    font-size: 15px;
}

.doc-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px 24px;
    margin: 0 0 20px;
}

.doc-head h1 { margin: 0; }

.doc-layout {
    display: grid;
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
    gap: 20px 28px;
    align-items: start;
}

.doc-layout.is-complete {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin-inline: auto;
}

.doc-layout.is-complete .doc-list {
    background: #fff;
    border-color: #a7f3d0;
    padding: 18px 20px;
}

.doc-layout.is-complete .doc-list-title {
    color: #047857;
    margin-bottom: 16px;
    font-size: 14px;
}

.doc-layout.is-complete .doc-list-item {
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ecfdf5;
    color: #065f46;
    font-size: 14px;
    line-height: 1.45;
}

.doc-layout.is-complete .doc-list-items {
    gap: 8px;
}

.doc-layout.is-complete .doc-list-mark {
    width: 26px;
    height: 26px;
    background: #059669;
    color: #fff;
    font-size: 13px;
}

.doc-layout.is-complete .doc-list-state {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: #d1fae5;
    color: #047857;
    opacity: 1;
    font-size: 11px;
}

.doc-layout.is-complete .doc-list-label {
    flex: 1;
}

.doc-list {
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 12px;
    background: #f8fafc;
}

.doc-list-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #64748b;
}

.doc-list-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.doc-list-item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
    padding: 8px 10px;
    border-radius: 8px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.35;
}

.doc-list-item.is-current {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 0 0 1px #cbd5e1;
    font-weight: 650;
}

.doc-list-item.is-done {
    color: #047857;
}

.doc-list-mark {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.doc-list-item.is-current .doc-list-mark {
    background: #0f766e;
    color: #fff;
}

.doc-list-item.is-done .doc-list-mark {
    background: #d1fae5;
    color: #047857;
}

.doc-list-label { min-width: 0; }

.doc-list-req {
    color: #b91c1c;
    margin-left: 2px;
}

.doc-list-state {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
    color: inherit;
    opacity: .75;
}

.doc-main h2 { margin-top: 0; }

.doc-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.doc-field label {
    margin: 0;
}

.who {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 20px;
    margin: 0;
}

.who div {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.who dt {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.who dd {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
}

.form-step { display: none; }

.form-step.is-active {
    display: block;
    padding: 32px 36px 28px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(15, 23, 42, .04);
}

.section-head {
    margin-bottom: 28px;
}

.form-step h1 {
    margin: 0;
    color: #0f172a;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.02em;
}

h2 {
    margin: 28px 0 14px;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
}

.note,
.hint,
.muted {
    margin: 8px 0 0;
    color: #6e7a8a;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
}

[hidden] { display: none !important; }

.form-other {
    margin-top: 8px;
}

.form-other input {
    width: 100%;
}

.text {
    color: #475569;
    line-height: 1.7;
}

.text :where(h1, h2, h3, h4) {
    color: #0f172a;
    font-size: 15px;
    margin: 16px 0 8px;
    border: 0;
    padding: 0;
}

.text :where(p, ul, ol) { margin: 0 0 12px; }
.text :where(ul, ol) { padding-left: 1.2em; list-style: disc; }

.grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px 24px;
}

.grid > * { min-width: 0; }

.col-2,
.col-span-6 { grid-column: span 6; }

.col-span-3 { grid-column: span 3; }

.col-span-2 { grid-column: span 2; }

label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 15px;
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    padding: 0 16px;
}

select {
    appearance: none;
    padding-right: 40px;
    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='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}

textarea {
    height: auto;
    min-height: 110px;
    padding: 12px 16px;
    resize: vertical;
}

input[type="file"] {
    padding: 10px 12px;
    background: #f8fafc;
}

.vesikalik-example {
    margin: 14px 0 0;
    max-width: 180px;
}

.vesikalik-example figcaption {
    margin: 0 0 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.vesikalik-example img {
    display: block;
    width: 73%;
    height: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

input::placeholder,
textarea::placeholder { color: #94a3b8; }

.field-error {
    margin: 8px 0 0;
    color: #b91c1c;
    font-size: 14px;
    font-weight: 600;
}

.is-invalid input,
.is-invalid select,
.is-invalid textarea,
.is-invalid .select2-selection {
    border-color: #dc2626;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .12);
}

.ok {
    width: 100%;
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f8fafc;
}

.ok label {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    column-gap: 10px;
    align-items: start;
    margin: 0;
    font-weight: 600;
    color: #0f172a;
}

.public-form .ok input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    box-sizing: border-box;
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    margin: 3px 0 0 !important;
    padding: 0 !important;
    border: 1.5px solid #94a3b8;
    border-radius: 4px;
    background: #fff;
    font-size: 16px;
    line-height: 1;
    transform: none;
}

.public-form .ok input[type="checkbox"]:checked {
    border-color: #10b981;
    background: #10b981 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.ok a {
    color: #059669;
    text-decoration: underline;
}

.choice {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px 10px;
    margin-top: 6px;
}

.choice label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: auto;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f8fafc;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    flex: 1 1 auto;
    white-space: normal;
}

.choice label span {
    min-width: 0;
    flex: 1 1 auto;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.choice input[type="radio"],
.choice input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: #10b981;
    flex: 0 0 auto;
}

.err {
    background: #fef2f2;
    color: #b91c1c;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.err ul { margin: 0; }

.btns {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 44px;
    padding: 0 22px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.btn[hidden] { display: none !important; }
.btn:disabled { opacity: .4; cursor: default; }

.btn-go {
    margin-left: auto;
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.btn-go:hover { background: #059669; }

.btn-primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }

.card {
    padding: 32px 36px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(15, 23, 42, .04);
}

.card > h1 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
}

.done {
    padding: 32px 36px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(15, 23, 42, .04);
}

.done h1 {
    margin: 0 0 8px;
    font-size: 24px;
}

.done p { margin-top: 8px; color: #475569; }
.done dl {
    margin: 20px 0;
    padding: 16px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    display: grid;
    gap: 12px;
}
.done dl div,
.done dt { color: #94a3b8; font-size: 12px; font-weight: 600; }
.done dd { margin: 2px 0 0; font-size: 16px; font-weight: 700; color: #0f172a; }
.done .btn { margin-top: 4px; }

.msg-ok,
.msg-bad {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
}

.msg-ok { background: #ecfdf5; color: #047857; }
.msg-bad { background: #fef2f2; color: #b91c1c; }

.file-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

.result-ok {
    margin: 0 0 20px;
    padding: 16px 18px;
    border: 1px solid #6ee7b7;
    border-left: 5px solid #059669;
    border-radius: 8px;
    background: #d1fae5;
    color: #065f46;
}

.result-ok-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.result-ok p + p {
    margin-top: 6px;
    font-size: 15px;
    font-weight: 600;
}

select.select2-hidden-accessible {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    pointer-events: none !important;
}

.select2-container { width: 100% !important; }
.public-form .select2-container--default .select2-selection--single {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    height: 48px;
    min-height: 48px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    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='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    outline: none;
}
.public-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    display: block;
    width: 100%;
    line-height: 1.55;
    padding: 0 40px 0 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    color: #0f172a;
}
.public-form .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: inherit;
}
.public-form .select2-container--default .select2-selection--single .select2-selection__clear,
.public-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none;
}
.public-form .select2-container--default.select2-container--focus .select2-selection--single,
.public-form .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .12);
}
.select2-dropdown {
    border-color: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    z-index: 40;
}
.select2-search--dropdown {
    padding: 8px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0 12px;
    outline: none;
}
.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #10b981;
}
.select2-results__option {
    padding: 10px 16px;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #10b981;
}

.form-dialog {
    width: min(720px, calc(100vw - 32px));
    max-height: min(80vh, 720px);
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .18);
}

.form-dialog::backdrop {
    background: rgba(15, 23, 42, .45);
}

.form-dialog-card {
    display: flex;
    flex-direction: column;
    max-height: min(80vh, 720px);
}

.form-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.form-dialog-head h2 {
    font-size: 18px;
    font-weight: 700;
}

.form-dialog-close {
    border: 0;
    background: none;
    padding: 0;
    color: #64748b;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.form-dialog-body {
    padding: 20px;
    overflow: auto;
}

.form-dialog-alert {
    width: min(400px, calc(100vw - 32px));
    max-height: none;
    padding: 36px 28px 28px;
    overflow: visible;
    border-radius: 18px;
    text-align: center;
    animation: form-success-pop .4s cubic-bezier(.22, 1.2, .36, 1);
}

.form-dialog-alert::backdrop {
    background: rgba(15, 23, 42, .48);
    animation: form-success-fade .28s ease-out;
}

.form-success-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-success-icon {
    position: relative;
    width: 84px;
    height: 84px;
    margin: 0 0 20px;
}

.form-success-circle {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 12px 28px rgba(16, 185, 129, .32);
    transform: scale(0);
    animation: form-success-circle .42s cubic-bezier(.22, 1.2, .36, 1) forwards;
}

.form-success-icon svg {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.form-success-check {
    fill: none;
    stroke: #fff;
    stroke-width: 3.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: form-success-check .32s .32s cubic-bezier(.65, 0, .35, 1) forwards;
}

.form-success-page {
    padding: 48px 24px 40px;
}

.answer-view .form-step {
    scroll-margin-top: 16px;
}

.answer-view label,
.answer-view .form-step h1 {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.answer-value {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    padding: 12px 16px;
    color: #0f172a;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.answer-value--wide {
    align-items: flex-start;
    min-height: 110px;
}

.answer-file {
    width: 100%;
    min-height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f8fafc;
    padding: 12px;
}

.answer-file img {
    display: block;
    max-width: 180px;
    height: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.form-success-title {
    max-width: 22em;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -.02em;
    color: #0f172a;
}

.form-success-page .form-success-title {
    max-width: none;
    width: 100%;
    text-align: center;
}

.form-success-ok {
    margin: 28px auto 0;
    min-width: 168px;
    border-radius: 10px;
}

.form-closed-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 8px 12px;
    text-align: center;
}

.form-closed-icon {
    width: 84px;
    height: 84px;
    margin: 0 0 18px;
}

.form-closed-icon svg {
    width: 100%;
    height: 100%;
}

.form-closed-icon circle {
    fill: #f8fafc;
    stroke: #e2e8f0;
    stroke-width: 2;
}

.form-closed-icon path {
    fill: none;
    stroke: #64748b;
    stroke-width: 3.4;
    stroke-linecap: round;
}

.form-closed-kicker {
    margin: 0 0 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.form-closed-text {
    max-width: 28em;
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.45;
}

@keyframes form-success-pop {
    from {
        opacity: 0;
        transform: scale(.84) translateY(14px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes form-success-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes form-success-circle {
    to { transform: scale(1); }
}

@keyframes form-success-check {
    to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .form-dialog-alert,
    .form-dialog-alert::backdrop,
    .form-success-circle,
    .form-success-check {
        animation: none;
    }

    .form-success-circle {
        transform: scale(1);
    }

    .form-success-check {
        stroke-dashoffset: 0;
    }
}

.hp { position: absolute; left: -9999px; opacity: 0; }

@media (max-width: 720px) {
    .top-inner {
        flex-direction: column;
        align-items: center;
        padding: 14px max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
        gap: 6px;
        text-align: center;
    }

    .top-logo {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .top-logo img {
        max-height: 40px;
        max-width: 160px;
    }

    .top-title {
        white-space: normal;
        text-align: center;
    }

    .top-mail {
        margin-left: 0;
        max-width: 100%;
    }

    .wrap {
        padding: 8px max(12px, env(safe-area-inset-right)) 24px max(12px, env(safe-area-inset-left));
    }

    .top-title { font-size: 15px; }

    .tabs {
        margin: 20px 0 16px;
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
        gap: 4px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tabs::-webkit-scrollbar { display: none; }

    .tabs::before {
        top: 14px;
        left: 12px;
        right: 12px;
    }

    .tabs button {
        flex: 1 0 0;
        min-width: 36px;
        gap: 0;
        font-size: 0;
    }

    .step-label { display: none; }

    .step-num {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .meta { display: none; }

    .form-step.is-active,
    .card,
    .done { padding: 18px 14px 20px; }

    .doc-head {
        flex-direction: column;
        gap: 12px;
    }

    .doc-layout {
        grid-template-columns: 1fr;
    }

    .who,
    .who div {
        justify-content: flex-start;
        align-items: flex-start;
    }

    .form-step h1 { font-size: 18px; }

    .section-head { margin-bottom: 18px; }
    .grid { grid-template-columns: 1fr; gap: 14px; }

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

    .choice label {
        width: 100%;
        flex: 1 1 auto;
    }

    .answer-view .tabs {
        margin: 12px 0 14px;
    }

    .answer-value {
        min-height: 46px;
        padding: 12px 14px;
        font-size: 16px;
    }

    .answer-value--wide { min-height: 96px; }

    .answer-file img { max-width: 100%; }
    .col-2,
    .col-span-2,
    .col-span-3,
    .col-span-6 { grid-column: auto; }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    input[type="number"],
    input[type="file"],
    select:not(.select2-hidden-accessible),
    textarea,
    .public-form .select2-container--default .select2-selection--single {
        height: 46px;
        min-height: 46px;
        font-size: 16px;
    }

    textarea { min-height: 96px; }

    input[type="date"],
    input[type="file"] { min-width: 0; max-width: 100%; }

    .public-form .ok input[type="checkbox"] {
        width: 18px !important;
        min-width: 18px !important;
        max-width: 18px !important;
        height: 18px !important;
        min-height: 18px !important;
        max-height: 18px !important;
    }

    .public-form .select2-container--default .select2-selection--single .select2-selection__rendered {
        font-size: 16px;
    }

    .select2-dropdown { max-width: calc(100vw - 24px); z-index: 80; }

    .select2-container--default .select2-search--dropdown .select2-search__field {
        height: 44px;
        min-height: 44px;
        font-size: 16px;
    }

    .select2-results__options { max-height: min(50vh, 320px); }

    .btns {
        position: sticky;
        bottom: 0;
        z-index: 20;
        flex-wrap: nowrap;
        gap: 8px;
        margin: 16px -12px 0;
        padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
        background: #f7f8fa;
        border-top: 1px solid #e5e7eb;
    }

    .btns .btn {
        flex: 1;
        min-width: 0;
        margin-left: 0;
        padding: 0 12px;
    }

    .card .btns {
        margin-left: -14px;
        margin-right: -14px;
        margin-bottom: -20px;
        background: #fff;
    }
}

/* Uyruk=Yabancı: YKS alan title'ına /YÖS ekle (JSON/JS yok) */
.form-label-when {
    display: none;
}

form:has([name="uyruk"][value="Yabancı"]:checked) label:has(.form-label-when) .form-label-default {
    display: none;
}

form:has([name="uyruk"][value="Yabancı"]:checked) label:has(.form-label-when) .form-label-when {
    display: inline;
}
