* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    line-height: 1.65;
    color: #1b1b1b;
    background: #f7f5f2;
}

:root {
    --app-header-height: 0px;
    --section-sticky-gap: 16px;
}

header,
main,
footer {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

header {
    border-bottom: 1px solid currentColor;
}

footer {
    border-top: 1px solid currentColor;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-top: 0.75rem;
}
.header-nav a {
    color: inherit;
}

.header-nav a[aria-current="page"],
.footer-links a[aria-current="page"] {
    font-weight: 700;
    text-decoration: underline;
}

main {
    display: grid;
    gap: 2rem;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.document-wrapper {
    overflow-x: auto;
}

.document-page {
    width: 8.5in;
    min-width: 8.5in;
    margin: 0 auto 2rem;
    padding: 1in 0.9in;
    background: #ffffff;
    border: none;
    color: #1b1b1b;
    font-family: "Times New Roman", Times, serif;
    font-size: 12pt;
    line-height: 1.45;
}

.document-page .card {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0 0 1.5rem;
}

.document-page .actions {
    margin-top: 1.5rem;
}

h1,
h2,
h3 {
    margin: 0 0 0.75rem;
    line-height: 1.3;
    font-weight: 600;
}

h1 {
    font-size: 2rem;
}

header h1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-link {
    display: inline-flex;
    align-items: center;
}

.logo-link img {
    width: 42px;
    height: 42px;
    display: block;
}

h2 {
    font-size: 1.4rem;
}

h3 {
    font-size: 1.1rem;
}

p {
    margin: 0 0 0.9rem;
}

.card {
    border: 1px solid #d5d1cb;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.two-col {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.pricing-tier-grid .card {
    display: flex;
    flex-direction: column;
}

.pricing-tier-grid .actions {
    margin-top: auto;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.issued-link-actions {
    align-items: center;
}

.issued-link-input {
    flex: 1 1 22rem;
    min-width: 12rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

textarea {
    width: 100%;
    min-height: 140px;
    padding: 0.75rem;
    border: 1px solid #cfcac2;
    font-family: "Courier New", monospace;
}
textarea[disabled] {
    background: #f4f2ee;
}

pre {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
}

.token {
    font-family: "Courier New", monospace;
    white-space: normal;
    word-break: normal;
    display: inline-block;
}

.button {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #1b1b1b;
    text-decoration: none;
}

.button.secondary {
    border-style: dashed;
}

.muted {
    font-size: 0.95rem;
}

.notice {
    border: 1px dashed #8a847b;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.tier-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.tier-disabled .button,
.tier-disabled button,
.tier-disabled input,
.tier-disabled select,
.tier-disabled textarea {
    pointer-events: none;
}

.tier-note {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-left: 0.5rem;
}

.attestation-block {
    border: 1px solid currentColor;
    padding: 1rem;
}

.section-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.section-number {
    font-weight: bold;
    margin-right: 0.5rem;
}

.footer-links {
    display: grid;
    gap: 0.35rem;
}

.footer-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.footer-group-title {
    font-size: 1rem;
    margin-bottom: 0.65rem;
}

.header-cta {
    flex: 0 0 auto;
}

.section-layout {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
}

.section-sidebar {
    position: static;
}

.section-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.section-sidebar-head {
    margin-bottom: 1rem;
}

.section-nav-group {
    margin-bottom: 1rem;
}

.section-nav-title {
    font-weight: 600;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
}

.section-nav-link {
    text-decoration: none;
}

.section-nav-link-active {
    font-weight: 700;
}

.docs-section {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #1b1b1b;
    margin-bottom: 1.5rem;
}

.docs-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .header-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-layout {
        grid-template-columns: 1fr;
    }

    .section-sidebar {
        position: static;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .section-sidebar-nav {
        overflow: visible;
        padding-right: 0;
    }
}


.finished-text-block {
    margin-top: 1rem;
    padding: 1rem;
    border: 2px solid #1b1b1b;
    background: #f7f7f2;
}

.finished-text-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.finished-text {
    margin: 0;
    white-space: pre-wrap;
    font-family: inherit;
    width: 100%;
    min-height: 6rem;
    border: none;
    background: transparent;
    resize: vertical;
}

.issued-title {
    text-align: center;
    font-weight: 800;
    margin: 0 0 1.75rem;
    letter-spacing: 0.01em;
    font-size: 1.35rem;
    text-transform: uppercase;
}

.doc-section {
    border: none;
    border-top: 1px solid #1b1b1b;
    padding: 1rem 0 0;
    margin-bottom: 1.5rem;
    background: transparent;
}

.doc-section-attestation {
    background: transparent;
}

.document-page > .doc-section:first-of-type {
    border-top: none;
    padding-top: 0;
}

.doc-section-title {
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    font-weight: 700;
}

.doc-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
}

.doc-two-col > div {
    min-width: 0;
}

.doc-two-col p {
    margin: 0 0 0.5rem;
    word-break: break-word;
}

.doc-line-stack {
    display: block;
}

.doc-line-value {
    display: block;
    margin-top: 0.15rem;
}

.doc-subtitle {
    margin: 0 0 0.45rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.signature-block {
    padding-top: 0.75rem;
}

.document-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 0.75rem;
    margin-top: 2rem;
    font-size: 0.8rem;
    border-top: 1px solid #1b1b1b;
}

.document-footer-page::after {
    content: "Page 1 of 1";
}

@media print {
    @page {
        margin: 1in;
    }
    body {
        background: #ffffff;
    }
    header,
    footer {
        display: none;
    }
    main {
        padding: 0;
        margin: 0;
    }
    .document-wrapper {
        overflow: visible;
    }
    .document-page {
        width: auto;
        min-width: 0;
        margin: 0;
        padding: 0;
        border: none;
    }
    .doc-section {
        page-break-inside: auto;
    }
    .doc-two-col {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    .doc-two-col > div {
        display: table-cell;
        width: 50%;
        padding-right: 0.2in;
        vertical-align: top;
    }
    .doc-two-col > div:last-child {
        padding-right: 0;
        padding-left: 0.2in;
    }
    .document-footer {
        display: none;
    }
}
.section-sidebar {
    position: sticky;
    top: 1rem;
    height: auto;
    max-height: none;
    overflow: visible;
    display: block;
}

.section-sidebar-nav {
    margin-top: 1rem;
    min-height: auto;
    flex: none;
    overflow: visible;
    scrollbar-gutter: auto;
}
