.svn-ma {
    --svn-blue: #10124d;
    --svn-sky: #39acf4;
    --svn-ink: #17364d;
    --svn-muted: #607b8e;
    --svn-line: #dbe8ef;
    --svn-soft: #eef8fd;
    --svn-success: #157347;
    color: var(--svn-ink);
    font-family: inherit;
    margin: 0 auto 3rem;
    max-width: 1080px;
}

/* Theme section padding (100px/80px) only above the form; other pages keep it. */
.post-section:has(.svn-ma) { padding-top: clamp(1.25rem, 3vw, 2rem); }

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

.svn-ma__hero {
    background: linear-gradient(135deg, var(--svn-blue), #17638f);
    border-radius: 24px 24px 0 0;
    color: #fff;
    overflow: hidden;
    padding: clamp(1.25rem, 3.5vw, 2.25rem) clamp(1.1rem, 4vw, 2.5rem);
    position: relative;
}

.svn-ma__hero::after {
    background: rgb(57 172 244 / 22%);
    border-radius: 50%;
    content: "";
    height: 18rem;
    position: absolute;
    right: -6rem;
    top: -10rem;
    width: 18rem;
}

.svn-ma__hero h2 {
    color: #fff;
    hyphens: auto;
    overflow-wrap: break-word;
    font-size: clamp(1.75rem, 3.6vw, 2.6rem);
    line-height: 1.1;
    margin: .25rem 0 .6rem;
    position: relative;
    z-index: 1;
}

.svn-ma__hero .svn-ma__lead {
    color: #fff;
    font-size: clamp(1rem, 1.6vw, 1.1rem);
    line-height: 1.6;
    margin: 0;
    max-width: 760px;
    position: relative;
    z-index: 1;
}

.svn-ma__hero .svn-ma__eyebrow {
    color: #8fd6ff;
    line-height: 1.4;
    margin: 0;
    position: relative;
    z-index: 1;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.svn-ma__process {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

.svn-ma__process li {
    align-content: start;
    align-items: center;
    background: rgb(255 255 255 / 8%);
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: 14px;
    display: grid;
    gap: .45rem .6rem;
    grid-template-columns: auto minmax(0, 1fr);
    margin: 0;
    padding: .85rem .9rem;
}

.svn-ma__process-number {
    align-items: center;
    background: #fff;
    border-radius: 50%;
    color: var(--svn-blue);
    display: flex;
    flex: 0 0 auto;
    font-size: .9rem;
    font-weight: 800;
    height: 1.9em;
    justify-content: center;
    line-height: 1;
    width: 1.9em;
}

.svn-ma__process h3 {
    color: #fff;
    hyphens: auto;
    font-size: 1rem;
    line-height: 1.3;
    margin: 0;
}

.svn-ma__hero .svn-ma__process p {
    color: #fff;
    grid-column: 1 / -1;
    font-size: .9rem;
    line-height: 1.45;
    margin: 0;
}

.svn-ma__process strong { color: #fff; font-weight: 700; }

.svn-ma__app {
    background: #fff;
    border: 1px solid var(--svn-line);
    border-radius: 0 0 24px 24px;
    box-shadow: 0 20px 50px rgb(16 18 77 / 10%);
    min-height: 250px;
    padding: clamp(1rem, 4vw, 2.75rem);
}

.svn-ma__loading {
    align-items: center;
    display: flex;
    gap: .8rem;
    justify-content: center;
    min-height: 180px;
}

.svn-ma__loading span {
    animation: svn-ma-spin .8s linear infinite;
    border: 3px solid var(--svn-line);
    border-top-color: var(--svn-sky);
    border-radius: 50%;
    height: 28px;
    width: 28px;
}

@keyframes svn-ma-spin { to { transform: rotate(360deg); } }

.svn-ma__steps {
    display: grid;
    gap: .35rem;
    grid-template-columns: repeat(6, 1fr);
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
}

.svn-ma__steps li {
    align-items: center;
    color: var(--svn-muted);
    display: flex;
    flex-direction: column;
    font-weight: 700;
    gap: .35rem;
    min-width: 0;
    position: relative;
}

.svn-ma__steps li::before {
    background: var(--svn-line);
    content: "";
    height: 2px;
    left: -50%;
    position: absolute;
    top: 17px;
    width: 100%;
    z-index: 0;
}

.svn-ma__steps li:first-child::before { display: none; }

.svn-ma__steps span {
    align-items: center;
    background: #fff;
    border: 2px solid var(--svn-line);
    border-radius: 50%;
    display: flex;
    height: 36px;
    justify-content: center;
    position: relative;
    width: 36px;
    z-index: 1;
}

.svn-ma__steps .active,
.svn-ma__steps .done { color: var(--svn-blue); }

.svn-ma__steps .active span {
    background: var(--svn-sky);
    border-color: var(--svn-sky);
    color: #07133a;
}

.svn-ma__steps .done span {
    background: var(--svn-blue);
    border-color: var(--svn-blue);
    color: #fff;
}

.svn-ma__panel {
    animation: svn-ma-in .24s ease-out;
    scroll-margin-top: 2rem;
}

@keyframes svn-ma-in {
    from { opacity: 0; transform: translateY(8px); }
}

.svn-ma [hidden] { display: none !important; }

.svn-ma__panel > h3 {
    color: var(--svn-blue);
    font-size: clamp(1.45rem, 3vw, 2rem);
    margin: 0 0 .6rem;
}

.svn-ma__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.25rem;
}

.svn-ma__field {
    display: flex;
    flex-direction: column;
    font-weight: 700;
    gap: .38rem;
}

.svn-ma__field input,
.svn-ma__field select {
    appearance: none;
    background: #fff;
    border: 1px solid #abc3d2;
    border-radius: 10px;
    color: var(--svn-ink);
    font: inherit;
    min-height: 49px;
    padding: .72rem .8rem;
    width: 100%;
}

.svn-ma__field input:focus,
.svn-ma__field select:focus {
    border-color: var(--svn-sky);
    box-shadow: 0 0 0 3px rgb(57 172 244 / 22%);
    outline: 0;
}

.svn-ma__field input[readonly] { background: var(--svn-soft); }

.svn-ma__field { position: relative; }
.svn-ma__field-msg,
.svn-ma__field-hint { font-size: .9rem; font-weight: 600; line-height: 1.4; margin: 0; }
.svn-ma__field-msg { color: #b42318; }
.svn-ma__field-msg::before { content: "⚠ "; }
.svn-ma__field-msg--ok { color: var(--svn-success); font-weight: 600; }
.svn-ma__field-msg--ok::before { content: none; }
.svn-ma__field-hint { color: var(--svn-muted); font-weight: 400; }
.svn-ma__field-hint:empty { display: none; }
.svn-ma__field-hint--loading::before {
    animation: svn-ma-spin .8s linear infinite;
    border: 2px solid var(--svn-line);
    border-radius: 50%;
    border-top-color: var(--svn-sky);
    content: "";
    display: inline-block;
    height: .8em;
    margin-right: .4em;
    vertical-align: -.05em;
    width: .8em;
}

.svn-ma__field input[aria-invalid="true"],
.svn-ma__field input[aria-invalid="true"]:focus {
    background: #fff8f7;
    border-color: #c62828;
    box-shadow: 0 0 0 2px #c62828;
}

.svn-ma__suggest {
    background: #fff;
    border: 1px solid #abc3d2;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgb(16 18 77 / 16%);
    left: 0;
    position: absolute;
    right: 0;
    top: calc(100% - .2rem);
    z-index: 30;
}

.svn-ma__suggest ul {
    list-style: none;
    margin: 0;
    max-height: min(18rem, 50vh);
    overflow-y: auto;
    padding: .3rem;
}

.svn-ma__suggest li {
    align-items: center;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    font-weight: 600;
    gap: .5rem;
    justify-content: space-between;
    min-height: 44px;
    padding: .55rem .7rem;
}

.svn-ma__suggest li small { color: var(--svn-muted); font-weight: 400; }
.svn-ma__suggest li:hover,
.svn-ma__suggest li[aria-selected="true"] { background: var(--svn-soft); color: var(--svn-blue); }
.svn-ma__suggest-note {
    border-top: 1px solid var(--svn-line);
    color: var(--svn-muted);
    font-size: .75rem;
    font-weight: 400;
    margin: 0;
    padding: .35rem .8rem .45rem;
}

.svn-ma__tariffs {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.25rem;
}

.svn-ma__tariff { cursor: pointer; position: relative; }

.svn-ma__tariff input {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.svn-ma__tariff > span {
    border: 2px solid var(--svn-line);
    border-radius: 14px;
    display: grid;
    gap: .35rem;
    height: 100%;
    padding: 1.15rem;
    transition: .18s ease;
}

.svn-ma__tariff input:checked + span {
    background: var(--svn-soft);
    border-color: var(--svn-sky);
    box-shadow: 0 8px 24px rgb(57 172 244 / 16%);
}

.svn-ma__tariff input:focus-visible + span {
    outline: 3px solid rgb(57 172 244 / 35%);
    outline-offset: 2px;
}

.svn-ma__tariff strong { color: var(--svn-blue); font-size: 1.05rem; }
.svn-ma__tariff b { color: var(--svn-success); font-size: 1.35rem; }
.svn-ma__tariff small,
.svn-ma__tariff em { color: var(--svn-muted); font-style: normal; }

.svn-ma__family {
    background: var(--svn-soft);
    border: 1px solid var(--svn-line);
    border-radius: 14px;
    margin: 1rem 0;
    padding: 1rem;
}

.svn-ma__family-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.svn-ma__family h4 { color: var(--svn-blue); margin: 0; }

.svn-ma__family-head button,
.svn-ma__add {
    background: transparent;
    border: 0;
    color: #a12a2a;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.svn-ma__add {
    color: var(--svn-blue);
    padding: .7rem 0;
}

.svn-ma__bank-status {
    align-self: end;
    background: var(--svn-soft);
    border-radius: 10px;
    grid-column: 1 / -1;
    min-height: 46px;
    padding: .75rem 1rem;
}

.svn-ma__bank-status:empty { display: none; }

.svn-ma__consents { display: grid; gap: .8rem; margin-top: 1.25rem; }

.svn-ma__consents label {
    align-items: flex-start;
    border: 1px solid var(--svn-line);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    gap: .8rem;
    padding: 1rem;
}

.svn-ma__consents input {
    accent-color: var(--svn-sky);
    flex: 0 0 auto;
    height: 21px;
    margin-top: 2px;
    width: 21px;
}

.svn-ma__consents span { display: grid; gap: .4rem; }
.svn-ma__consents small { color: var(--svn-muted); line-height: 1.55; }
.svn-ma__consents a { color: #075f99; font-weight: 700; }

.svn-ma__review {
    display: grid;
    gap: .9rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.25rem;
}

.svn-ma__review > div,
.svn-ma__review-note {
    background: var(--svn-soft);
    border-radius: 12px;
    margin: 0;
    padding: 1rem;
}

.svn-ma__review h4 { color: var(--svn-blue); margin: 0 0 .45rem; }
.svn-ma__review p,
.svn-ma__review ul { line-height: 1.55; margin: 0; }
.svn-ma__review-note { grid-column: 1 / -1; }

.svn-ma__actions {
    border-top: 1px solid var(--svn-line);
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.25rem;
}

.svn-ma__button {
    background: var(--svn-blue);
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    min-height: 48px;
    padding: .72rem 1.35rem;
}

.svn-ma__button:hover { background: #252a78; }
.svn-ma__button:focus-visible { outline: 3px solid var(--svn-sky); outline-offset: 3px; }
.svn-ma__button:disabled { cursor: wait; opacity: .65; }
.svn-ma__button--quiet { background: #e7f1f6; color: var(--svn-blue); }

.svn-ma__error,
.svn-ma__notice,
.svn-ma__paused,
.svn-ma__success {
    border-radius: 14px;
    line-height: 1.6;
    padding: 1.15rem;
}

.svn-ma__error,
.svn-ma__notice--error {
    background: #fff1f1;
    border: 1px solid #eab3b3;
    color: #7c1f1f;
    margin-top: 1rem;
}

.svn-ma__paused,
.svn-ma__success {
    background: var(--svn-soft);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
}

.svn-ma__paused > span,
.svn-ma__success > span {
    align-items: center;
    background: var(--svn-sky);
    border-radius: 50%;
    color: var(--svn-blue);
    display: inline-flex;
    font-size: 1.5rem;
    font-weight: 900;
    height: 54px;
    justify-content: center;
    width: 54px;
}

.svn-ma__paused h3,
.svn-ma__success h3 { color: var(--svn-blue); margin: 1rem 0 .5rem; }

@media (max-width: 700px) {
    .svn-ma { margin-left: -.3rem; margin-right: -.3rem; }
    .post-section:has(.svn-ma) { padding-top: 1rem; }
    .svn-ma__hero { border-radius: 18px 18px 0 0; padding: 1.25rem 1.1rem; }
    .svn-ma__process { gap: .5rem; grid-template-columns: 1fr; margin-top: 1rem; }
    .svn-ma__process li { padding: .7rem .8rem; }
    .svn-ma__app { border-radius: 0 0 18px 18px; padding: 1rem; }
    .svn-ma__steps { grid-template-columns: repeat(6, minmax(36px, 1fr)); overflow-x: auto; padding-bottom: .35rem; }
    .svn-ma__steps small { display: none; }
    .svn-ma__grid,
    .svn-ma__tariffs,
    .svn-ma__review { grid-template-columns: 1fr; }
    .svn-ma__review-note { grid-column: auto; }
    .svn-ma__actions { align-items: stretch; flex-direction: column-reverse; }
    .svn-ma__button { width: 100%; }
}

@media (min-width: 701px) and (max-width: 980px) {
    .svn-ma__process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .svn-ma__app { padding: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
    .svn-ma__loading span,
    .svn-ma__field-hint--loading::before,
    .svn-ma__panel { animation: none; }
    .svn-ma__tariff > span { transition: none; }
}

@media (forced-colors: active) {
    .svn-ma__process li { border-color: CanvasText; }
    .svn-ma__tariff input:checked + span,
    .svn-ma__field input:focus,
    .svn-ma__field select:focus { outline: 3px solid CanvasText; }
    .svn-ma__field input[aria-invalid="true"] { outline: 3px dashed CanvasText; }
    .svn-ma__suggest li[aria-selected="true"] { outline: 2px solid Highlight; }
}
