#application-terms {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(46rem, calc(100% - 2rem));
    max-height: min(48rem, calc(100dvh - 2rem));
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: #24282c;
    box-shadow: 0 16px 56px rgb(0 0 0 / 25%);
}

#application-terms[open] {
    display: flex;
    flex-direction: column;
}

#application-terms::backdrop {
    background: rgb(0 0 0 / 55%);
}

#application-terms .application-terms-header,
#application-terms .application-terms-actions {
    flex: none;
    padding: 1rem clamp(1rem, 4vw, 2rem);
}

#application-terms .application-terms-header {
    border-bottom: 1px solid #ddd;
}

#application-terms-title {
    font-size: 1.4rem;
    line-height: 1.3;
    margin: 0;
}

#application-terms .application-terms-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1.25rem clamp(1rem, 4vw, 2rem);
    font-size: 1rem;
    line-height: 1.65;
}

#application-terms .application-terms-body h2 {
    margin: 1.5rem 0 .5rem;
    font-size: 1.125rem;
    line-height: 1.35;
}

#application-terms .application-terms-body h2:first-child {
    margin-top: 0;
}

#application-terms .application-terms-body p,
#application-terms .application-terms-body ul,
#application-terms .application-terms-body ol {
    margin: 0 0 .85rem;
}

#application-terms .application-terms-body ul,
#application-terms .application-terms-body ol {
    padding-inline-start: 1.5rem;
}

#application-terms .application-terms-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
    margin: 0;
    border-top: 1px solid #ddd;
}

#application-terms .application-terms-actions button {
    min-height: 44px;
    padding: .5rem 1rem;
    border: 1px solid #68747c;
    border-radius: 6px;
    background: #fff;
    color: #24282c;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

#application-terms .application-terms-actions button[value="agree"] {
    border-color: #0055b3;
    background: #0055b3;
    color: #fff;
}

#application-terms :focus-visible {
    outline: 2px solid #0f75bc;
    outline-offset: -2px;
}

#application-terms .application-terms-header {
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    align-items: center;
}

#application-terms .application-terms-close {
    flex: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 6px;
    background: #f1f3f5;
    color: inherit;
    font: inherit;
    font-size: 1.5rem;
    cursor: pointer;
}
