:root {
    --verification-panel: #f8f4eb;
    --verification-muted: rgba(24, 37, 34, 0.66);
    --verification-soft-line: rgba(24, 37, 34, 0.14);
    --verification-danger: #9a432f;
    --verification-warning: #8d5f24;
}

[hidden] {
    display: none !important;
}

.verification-page {
    min-width: 320px;
    min-height: 100dvh;
    background: var(--paper);
}

.verification-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 253, 248, 0.2);
    background: rgba(14, 36, 32, 0.74);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.verification-header__inner {
    display: flex;
    width: min(100% - 40px, 1460px);
    height: 82px;
    align-items: center;
    justify-content: space-between;
    margin-inline: auto;
}

.verification-header .brand__seal {
    color: var(--forest);
    background: var(--paper);
}

.verification-header__back {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 253, 248, 0.58);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.verification-header__back:hover {
    border-color: var(--white);
    transform: translateX(-3px);
}

.verification-main {
    display: grid;
    min-height: 100dvh;
    grid-template-columns: minmax(360px, 0.88fr) minmax(560px, 1.12fr);
}

.verification-story {
    position: sticky;
    top: 0;
    height: 100dvh;
    min-height: 680px;
    overflow: hidden;
    color: var(--white);
    background: var(--forest-deep);
}

.verification-story__image,
.verification-story__veil {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.verification-story__image {
    object-fit: cover;
    object-position: 52% center;
    transform: scale(1.02);
    animation: verification-image-settle 10s ease-out both;
}

@keyframes verification-image-settle {
    to { transform: scale(1); }
}

.verification-story__veil {
    background:
        linear-gradient(180deg, rgba(8, 28, 25, 0.24), rgba(8, 28, 25, 0.82)),
        linear-gradient(90deg, rgba(8, 28, 25, 0.5), rgba(8, 28, 25, 0.08));
}

.verification-story__content {
    position: absolute;
    z-index: 2;
    right: clamp(34px, 5vw, 78px);
    bottom: clamp(92px, 12vh, 150px);
    left: clamp(34px, 5vw, 78px);
}

.verification-story__kicker,
.verification-eyebrow,
.status-kicker {
    margin: 0 0 22px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
}

.verification-story h1 {
    max-width: 700px;
    margin: 0;
    font-family: var(--display);
    font-size: clamp(50px, 5.2vw, 84px);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.verification-story h1 em {
    color: #ead5b7;
    font-weight: 400;
}

.verification-story__content > p:last-child {
    max-width: 500px;
    margin: 30px 0 0;
    color: rgba(255, 253, 248, 0.78);
    font-size: 14px;
    line-height: 1.9;
}

.verification-story__coordinates {
    position: absolute;
    z-index: 2;
    bottom: 30px;
    left: clamp(34px, 5vw, 78px);
    margin: 0;
    font-size: 9px;
    letter-spacing: 0.18em;
    opacity: 0.66;
}

.verification-workspace {
    display: grid;
    min-height: 100dvh;
    place-items: center;
    padding: 130px clamp(30px, 5vw, 86px) 70px;
    background:
        radial-gradient(circle at 82% 18%, rgba(216, 188, 139, 0.18), transparent 34%),
        var(--verification-panel);
}

.verification-panel {
    width: min(100%, 650px);
}

.verification-panel__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 31px;
    border-bottom: 1px solid var(--verification-soft-line);
}

.verification-eyebrow {
    margin-bottom: 10px;
    color: var(--terracotta-deep);
}

.verification-panel__heading h2 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(42px, 4vw, 58px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.04em;
}

.connection-state {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
    color: var(--verification-muted);
    font-size: 11px;
}

.connection-state i {
    width: 7px;
    height: 7px;
    background: var(--sage);
    border-radius: 50%;
}

.connection-state--loading i {
    animation: connection-pulse 1s ease-in-out infinite alternate;
}

.connection-state--online i {
    background: #557768;
}

.connection-state--offline i {
    background: var(--terracotta);
}

@keyframes connection-pulse {
    to { opacity: 0.28; transform: scale(0.74); }
}

.verification-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    padding: 29px 0 32px;
    list-style: none;
}

.verification-steps li {
    position: relative;
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: center;
    color: rgba(24, 37, 34, 0.38);
}

.verification-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 14px;
    left: 28px;
    width: calc(100% - 28px);
    height: 1px;
    background: var(--verification-soft-line);
}

.verification-steps li > span {
    position: relative;
    z-index: 1;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    background: var(--verification-panel);
    border: 1px solid var(--verification-soft-line);
    font-family: var(--display);
    font-size: 13px;
}

.verification-steps small {
    position: relative;
    z-index: 1;
    width: max-content;
    padding: 0 12px 0 8px;
    background: var(--verification-panel);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.verification-steps li.is-current,
.verification-steps li.is-complete {
    color: var(--forest);
}

.verification-steps li.is-current > span {
    color: var(--white);
    background: var(--forest);
    border-color: var(--forest);
}

.verification-steps li.is-complete > span {
    color: transparent;
    background: var(--sage);
    border-color: var(--sage);
}

.verification-steps li.is-complete > span::after {
    content: "✓";
    position: absolute;
    color: var(--white);
}

.inline-notice {
    margin: 0 0 25px;
    padding: 17px 19px;
    border-left: 3px solid var(--terracotta);
    background: rgba(201, 111, 78, 0.09);
}

.inline-notice--warning {
    border-left-color: var(--sand);
    background: rgba(216, 188, 139, 0.2);
}

.inline-notice strong {
    display: block;
    font-family: var(--display);
    font-size: 18px;
    font-weight: 600;
}

.inline-notice p {
    margin: 4px 0 0;
    color: var(--verification-muted);
    font-size: 12px;
    line-height: 1.7;
}

.text-action {
    margin-top: 9px;
    padding: 0 0 3px;
    color: var(--forest);
    background: transparent;
    border: 0;
    border-bottom: 1px solid currentColor;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.flow-view {
    min-height: 360px;
    animation: flow-view-enter 0.42s cubic-bezier(0.2, 0.68, 0.2, 1) both;
}

@keyframes flow-view-enter {
    from { opacity: 0; transform: translateY(10px); }
}

.flow-view__intro {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 20px;
    margin-bottom: 31px;
}

.flow-view__index {
    padding-top: 7px;
    color: var(--terracotta-deep);
    font-family: var(--display);
    font-size: 13px;
}

.flow-view h3 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(30px, 3vw, 40px);
    font-weight: 500;
    line-height: 1.16;
    letter-spacing: -0.025em;
}

.flow-view__intro p,
.status-copy {
    max-width: 510px;
    margin: 12px 0 0;
    color: var(--verification-muted);
    font-size: 13px;
    line-height: 1.8;
}

.field-label {
    display: block;
    margin-bottom: 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.input-shell {
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    border: 1px solid rgba(24, 37, 34, 0.27);
    background: rgba(255, 253, 248, 0.62);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.input-shell:focus-within {
    border-color: var(--forest);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(23, 52, 47, 0.09);
}

.input-shell__prefix {
    display: grid;
    min-height: 58px;
    place-items: center;
    color: var(--terracotta-deep);
    border-right: 1px solid var(--verification-soft-line);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.input-shell input {
    width: 100%;
    min-height: 58px;
    padding: 0 18px;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 16px;
    letter-spacing: 0.025em;
}

.input-shell--code input {
    font-size: 20px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.12em;
}

.input-shell input::placeholder {
    color: rgba(24, 37, 34, 0.36);
}

.field-help,
.field-error {
    min-height: 20px;
    margin: 8px 0 0;
    color: var(--verification-muted);
    font-size: 10px;
    line-height: 1.6;
}

.field-error {
    color: var(--verification-danger);
}

.primary-action,
.secondary-action {
    width: 100%;
    min-height: 54px;
    margin-top: 22px;
    padding: 0 20px;
    border: 1px solid var(--forest);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: color 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.primary-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--white);
    background: var(--forest);
}

.primary-action:hover:not(:disabled) {
    background: var(--terracotta-deep);
    border-color: var(--terracotta-deep);
    transform: translateY(-2px);
}

.primary-action:active:not(:disabled),
.secondary-action:active:not(:disabled) {
    transform: translateY(1px);
}

.primary-action:disabled,
.secondary-action:disabled {
    cursor: wait;
    opacity: 0.56;
}

.primary-action.is-busy span:last-child {
    animation: action-arrow 0.7s ease-in-out infinite alternate;
}

@keyframes action-arrow {
    to { transform: translateX(5px); opacity: 0.45; }
}

.primary-action--link {
    text-decoration: none;
}

.secondary-action {
    color: var(--forest);
    background: transparent;
}

.secondary-action:hover:not(:disabled) {
    color: var(--white);
    background: var(--forest);
}

.flow-view--status {
    padding-top: 4px;
    text-align: left;
}

.status-symbol {
    position: relative;
    display: grid;
    width: 70px;
    height: 70px;
    margin-bottom: 24px;
    place-items: center;
    color: var(--forest);
    background: rgba(141, 160, 146, 0.22);
    border-radius: 50%;
}

.status-symbol span {
    width: 23px;
    height: 23px;
    border: 1px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: status-spin 1.2s linear infinite;
}

.status-symbol--success {
    color: #426554;
    background: rgba(85, 119, 104, 0.16);
}

.status-symbol--success span,
.status-symbol--error span,
.status-symbol--neutral span {
    width: 24px;
    height: 12px;
    border: 0;
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    border-radius: 0;
    transform: translateY(-3px) rotate(-45deg);
    animation: none;
}

.status-symbol--error {
    color: var(--verification-danger);
    background: rgba(154, 67, 47, 0.12);
}

.status-symbol--error span {
    width: 22px;
    height: 22px;
    border: 0;
    transform: none;
}

.status-symbol--error span::before,
.status-symbol--error span::after {
    content: "";
    position: absolute;
    top: 34px;
    left: 24px;
    width: 22px;
    height: 2px;
    background: currentColor;
}

.status-symbol--error span::before { transform: rotate(45deg); }
.status-symbol--error span::after { transform: rotate(-45deg); }

.status-symbol--neutral {
    color: rgba(24, 37, 34, 0.58);
    background: rgba(24, 37, 34, 0.08);
}

.status-symbol--neutral span {
    width: 25px;
    height: 1px;
    border: 0;
    background: currentColor;
    transform: none;
}

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

.status-kicker {
    margin-bottom: 9px;
    color: var(--terracotta-deep);
}

.status-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 28px;
    border-block: 1px solid var(--verification-soft-line);
}

.status-meta > div {
    display: flex;
    min-height: 76px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.status-meta > div + div {
    padding-left: 24px;
    border-left: 1px solid var(--verification-soft-line);
}

.status-meta span {
    color: var(--verification-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.status-meta strong {
    font-size: 14px;
    font-weight: 600;
}

.tabular-number {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
}

.status-actions {
    margin-top: 4px;
}

.privacy-note {
    display: flex;
    gap: 9px;
    margin: 30px 0 0;
    padding-top: 20px;
    color: rgba(24, 37, 34, 0.48);
    border-top: 1px solid var(--verification-soft-line);
    font-size: 10px;
    line-height: 1.65;
}

@media (max-width: 1050px) {
    .verification-main {
        grid-template-columns: minmax(300px, 0.72fr) minmax(500px, 1.28fr);
    }

    .verification-story h1 {
        font-size: clamp(46px, 6vw, 68px);
    }
}

@media (max-width: 820px) {
    .verification-header {
        position: absolute;
        border-bottom: 0;
        background: linear-gradient(
            180deg,
            rgba(8, 28, 25, 0.72) 0%,
            rgba(8, 28, 25, 0.28) 62%,
            rgba(8, 28, 25, 0) 100%
        );
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .verification-header__inner {
        width: calc(100% - 32px);
        height: 72px;
    }

    .verification-header .brand__copy small {
        display: none;
    }

    .verification-header .brand__copy strong {
        font-size: 17px;
    }

    .verification-header .brand__seal {
        width: 36px;
        height: 36px;
        font-size: 19px;
    }

    .verification-header .brand__seal img {
        object-fit: cover;
        object-position: center;
        transform: scale(1.28);
    }

    .verification-main {
        display: block;
    }

    .verification-story {
        position: relative;
        height: auto;
        min-height: 430px;
    }

    .verification-story__image {
        object-position: 52% 42%;
        transform: none;
        animation: none;
    }

    .verification-story__content {
        right: 24px;
        bottom: 52px;
        left: 24px;
    }

    .verification-story h1 {
        font-size: clamp(43px, 12vw, 62px);
    }

    .verification-story__content > p:last-child,
    .verification-story__coordinates {
        display: none;
    }

    .verification-workspace {
        min-height: calc(100dvh - 430px);
        padding: 47px 24px 46px;
    }
}

@media (max-width: 520px) {
    .verification-header__back {
        font-size: 0;
    }

    .verification-header__back span {
        font-size: 19px;
    }

    .verification-story {
        min-height: 360px;
    }

    .verification-story__kicker {
        margin-bottom: 14px;
    }

    .verification-story h1 {
        font-size: clamp(39px, 12vw, 54px);
    }

    .verification-workspace {
        min-height: calc(100dvh - 360px);
        padding: 39px 18px 42px;
    }

    .verification-panel__heading {
        align-items: flex-end;
        padding-bottom: 25px;
    }

    .verification-panel__heading h2 {
        font-size: 39px;
    }

    .connection-state {
        margin-bottom: 3px;
    }

    .verification-steps {
        padding: 24px 0 28px;
    }

    .verification-steps small {
        font-size: 9px;
    }

    .flow-view {
        min-height: 340px;
    }

    .flow-view__intro {
        grid-template-columns: 31px 1fr;
        gap: 11px;
        margin-bottom: 25px;
    }

    .flow-view h3 {
        font-size: 30px;
    }

    .input-shell {
        grid-template-columns: 52px 1fr;
    }

    .input-shell__prefix,
    .input-shell input {
        min-height: 56px;
    }

    .status-meta {
        grid-template-columns: 1fr;
    }

    .status-meta > div {
        min-height: 64px;
    }

    .status-meta > div + div {
        padding-left: 0;
        border-top: 1px solid var(--verification-soft-line);
        border-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
