.terms-page {
    max-width: 52rem;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.terms-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.terms-toolbar-actions {
    display: flex;
    gap: 0.5rem;
}

.terms-doc {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 1.15rem;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(7, 21, 54, 0.08);
}

.terms-letterhead {
    position: relative;
    padding: 2rem 1.5rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.terms-letterhead-bar {
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    width: 42%;
    height: 4.5rem;
    background: #0b1f4d;
    clip-path: polygon(18% 0, 100% 0, 100% 100%);
}

.terms-letterhead-bar::after {
    content: "";
    position: absolute;
    top: 0.7rem;
    inset-inline-start: 8%;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    background: #2eb8e6;
}

.terms-letterhead-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.terms-logo { width: 7.5rem; height: auto; display: block; background: none; border: 0; padding: 0; }

.terms-company {
    margin: 0;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.15rem;
}

.terms-program {
    margin: 0.2rem 0;
    font-family: "Jameel Noori Nastaleeq", serif;
    font-size: 1.7rem;
    color: var(--color-primary-dark);
    line-height: 1.8;
}

.terms-doc-title {
    margin: 0;
    color: var(--color-accent-dark);
    font-weight: 700;
}

.terms-intro,
.terms-clause,
.terms-thanks {
    padding: 0 1.5rem;
}

.terms-intro {
    padding-top: 1.5rem;
    line-height: 2.2;
    color: #334155;
}

.terms-clause {
    padding-top: 1.35rem;
    padding-bottom: 0.4rem;
    border-top: 1px solid #e8eef5;
    margin-top: 1.15rem;
}

.terms-clause h2 {
    margin: 0 0 0.75rem;
    font-family: "Jameel Noori Nastaleeq", serif;
    font-size: 1.25rem;
    color: var(--color-primary);
    line-height: 1.9;
}

.terms-clause p,
.terms-thanks p {
    margin: 0 0 0.75rem;
    line-height: 2.15;
    color: #1e293b;
}

.terms-clause ul {
    margin: 0 0 0.5rem;
    padding: 0 1.25rem 0 0;
}

.terms-clause li {
    margin: 0 0 0.45rem;
    line-height: 2.1;
    color: #334155;
}

.terms-oath {
    background: #f4fbfe;
    border-top: 1px solid #c7ebf6;
    margin-top: 1.5rem;
    padding-bottom: 1.25rem;
}

.terms-thanks {
    padding: 1.75rem 1.5rem 2.25rem;
    text-align: center;
    background: #071536;
    color: #fff;
}

.terms-thanks h2 {
    margin: 0 0 1rem;
    font-family: "Jameel Noori Nastaleeq", serif;
    color: #fff;
}

.terms-thanks p { color: #d7e6f7; }
.terms-jazak { color: #f6d889 !important; font-size: 1.2rem; }
.terms-signoff { color: #9bdcf3 !important; }
.terms-signoff a { color: #9bdcf3; }

@media print {
    .public-nav,
    .public-footer,
    .no-print { display: none !important; }
    .terms-page { max-width: none; padding: 0; }
    .terms-doc { box-shadow: none; border: 0; border-radius: 0; }
    .terms-thanks { break-inside: avoid; }
}
