:root {
    --sf-primary: #0b3b8f;
    --sf-primary-hover: #082e70;
    --sf-text: #17233b;
    --sf-muted: #5d6b82;
    --sf-border: #d8e0ec;
    --sf-bg: #f5f8fc;
    --sf-danger: #b42318;
    --sf-success: #087443;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--sf-text);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--sf-bg); font-family: inherit; color: inherit; }
.sf-page { padding: 28px 16px; min-height: 100vh; }
.sf-page.is-embedded { padding: 4px; background: transparent; min-height: 0; }
.sf-card {
    width: min(720px, 100%);
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--sf-border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 28px rgba(30, 53, 87, .08);
}
.is-embedded .sf-card { box-shadow: none; }
.is-compact .sf-card { padding: 20px; }
.sf-page.is-compact.is-embedded { padding: 0; background: #fff; }
.is-compact.is-embedded .sf-card { border: 0; border-radius: 0; padding: 8px; }
.is-compact .sf-header h1, .is-compact .sf-success h1 { font-size: 24px; }
.is-compact .sf-header > p, .is-compact .sf-step-description { margin-bottom: 16px; }
.is-compact .sf-grid { gap: 12px; }
.is-compact .sf-step h2 { margin-bottom: 12px; }
.is-compact .sf-type-wrap, .is-compact .sf-progress { margin-bottom: 16px; }
.is-compact .sf-actions { margin-top: 18px; }
.sf-promotion { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--sf-border); color: var(--sf-muted); font-size: 14px; line-height: 1.5; }
.sf-promotion p { margin: 8px 0; }
.sf-promotion a { color: var(--sf-primary); text-underline-offset: 2px; overflow-wrap: anywhere; }
.sf-header h1, .sf-success h1 { font-size: 28px; line-height: 1.2; margin: 0 0 10px; }
.sf-header > p, .sf-step-description { color: var(--sf-muted); line-height: 1.55; margin: 0 0 28px; }
.sf-type-wrap { margin-bottom: 26px; }
.sf-type-wrap label, .sf-field > label, .sf-radio-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.sf-required { color: var(--sf-danger); }
.sf-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.sf-field { grid-column: span 12; min-width: 0; }
.sf-width-6 { grid-column: span 6; }
.sf-field input:not([type=checkbox]):not([type=radio]),
.sf-field textarea,
.sf-field select,
.sf-type-wrap select {
    display: block;
    width: 100%;
    border: 1px solid #aeb9c9;
    border-radius: 7px;
    background: #fff;
    padding: 12px 13px;
    font: inherit;
    color: inherit;
    min-height: 46px;
}
.sf-field textarea { resize: vertical; }
.sf-field input:focus,
.sf-field textarea:focus,
.sf-field select:focus,
.sf-type-wrap select:focus {
    outline: 3px solid rgba(11, 59, 143, .14);
    border-color: var(--sf-primary);
}
.sf-field input[type=file] { padding: 7px; }
.sf-field input[type=file]::file-selector-button {
    border: 0;
    border-radius: 5px;
    background: #e8eef7;
    color: var(--sf-primary);
    padding: 8px 11px;
    margin-right: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}
.sf-field small, .sf-type-wrap small { display: block; color: var(--sf-muted); margin-top: 6px; line-height: 1.4; }
.sf-step h2 { font-size: 18px; margin: 0 0 20px; }
.sf-content { grid-column: span 12; color: var(--sf-muted); line-height: 1.6; font-size: 14px; }
.sf-content a { color: var(--sf-primary); text-underline-offset: 2px; }
.sf-content-info { background: #f1f6ff; padding: 14px; border-radius: 8px; color: #29456e; }
.sf-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; line-height: 1.5; }
.sf-check input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; accent-color: var(--sf-primary); }
.sf-radio-group { display: grid; gap: 10px; }
.sf-radio-group label { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 15px; font-weight: 400; line-height: 1.4; cursor: pointer; }
.sf-radio-group input { width: 20px; height: 20px; flex: 0 0 auto; margin: 0; accent-color: var(--sf-primary); }
.sf-progress { margin: 8px 0 28px; }
.sf-progress-label { color: var(--sf-muted); font-size: 14px; margin-bottom: 7px; }
.sf-progress-track { height: 9px; border-radius: 999px; background: #e2e6ec; overflow: hidden; }
.sf-progress-track span { height: 100%; display: block; background: var(--sf-primary); border-radius: inherit; transition: width .2s ease; }
.sf-progress-pct-20 { width: 20%; }
.sf-progress-pct-25 { width: 25%; }
.sf-progress-pct-33 { width: 33%; }
.sf-progress-pct-40 { width: 40%; }
.sf-progress-pct-50 { width: 50%; }
.sf-progress-pct-60 { width: 60%; }
.sf-progress-pct-67 { width: 67%; }
.sf-progress-pct-75 { width: 75%; }
.sf-progress-pct-80 { width: 80%; }
.sf-progress-pct-100 { width: 100%; }
.sf-actions { display: flex; justify-content: flex-end; gap: 14px; margin-top: 30px; }
.sf-button {
    border: 0;
    border-radius: 7px;
    padding: 12px 24px;
    min-height: 46px;
    max-width: 100%;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
    cursor: pointer;
    touch-action: manipulation;
}
.sf-button-next, .sf-button-submit { background: var(--sf-primary); color: #fff; }
.sf-button-next:hover, .sf-button-submit:hover { background: var(--sf-primary-hover); }
.sf-button-back { background: #e8eef7; color: var(--sf-primary); }
.sf-button:focus-visible { outline: 3px solid rgba(11, 59, 143, .3); outline-offset: 2px; }
.sf-button:disabled { opacity: .65; cursor: wait; }
.sf-alert { background: #fff0ef; border: 1px solid #f3b5af; color: var(--sf-danger); padding: 13px 15px; border-radius: 8px; margin: 0 0 22px; }
.sf-success { text-align: center; padding: 25px 0; }
.sf-success-icon { width: 64px; height: 64px; display: grid; place-items: center; background: #e7f8ef; color: var(--sf-success); border-radius: 50%; font-size: 32px; margin: 0 auto 20px; }
.sf-success p { color: var(--sf-muted); line-height: 1.6; }
.sf-notice { background: #eef5ff; padding: 13px; border-radius: 8px; }
.sf-notice.is-good { background: #e9f8f0; color: var(--sf-success); }
.sf-reference { margin-top: 24px; }
.sf-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
[hidden] { display: none !important; }

@media (max-width: 600px) {
    .sf-page { padding: 0; }
    .sf-card { border-radius: 0; border-left: 0; border-right: 0; padding: 24px 18px; min-height: 100vh; }
    .is-embedded .sf-card { min-height: 0; }
    .sf-width-6 { grid-column: span 12; }
    .sf-header h1, .sf-success h1 { font-size: 23px; }
    .sf-actions { justify-content: space-between; flex-wrap: wrap; }
    .sf-button { flex: 1 1 120px; padding: 11px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .sf-progress-track span { transition: none; }
}
