/* ---------- support: policy pages, help centre, cancel & pause ----------
   Owns three surfaces that all exist for the same reason — a student worrying
   about money. The plans-page assurance line answers it before they pay, the
   cancel flow answers it when they want out, the policy page answers it after. */

/* --- plans: the assurance line, sits under the price note --- */
.plan-assurance {
    font-size: .74rem;
    color: var(--text-muted);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
    line-height: 1.45;
}

.plan-assurance strong {
    color: var(--text);
    font-weight: 600;
}

.link-inline {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.link-inline:hover {
    color: var(--text);
}

/* --- plans: paused-subscription banner --- */
.plan-pause-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 18px 0 4px;
    padding: 14px 18px;
    background: var(--gold-soft);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius);
}

.plan-pause-banner .pause-copy {
    flex: 1 1 320px;
    font-size: .86rem;
}

.plan-pause-banner .pause-copy strong {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--gold);
    margin-bottom: 3px;
}

/* --- cancel flow: pause offered above cancel, deliberately --- */
.cancel-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.cancel-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 13px 15px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font: inherit;
    color: var(--text);
    transition: border-color .15s, background .15s;
}

.cancel-option:hover {
    border-color: var(--border-strong);
    background: var(--bg-raised);
}

.cancel-option.recommended {
    border-color: var(--gold);
    background: var(--gold-soft);
}

.cancel-option b {
    display: block;
    font-size: .95rem;
    margin-bottom: 2px;
}

.cancel-option span {
    display: block;
    font-size: .78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.cancel-footnote {
    margin: 16px 0 0;
    padding-top: 13px;
    border-top: 1px dashed var(--border);
    font-size: .78rem;
    color: var(--text-muted);
}

/* --- long-form policy pages --- */
.doc-wrap {
    max-width: 74ch;
    margin: 0 auto;
    padding: 44px 32px 72px;
}

.doc-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--text-muted);
    margin: 0 0 26px;
}

.doc-wrap h2 {
    font-size: 1.5rem;
    margin: 42px 0 .45em;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.doc-wrap h2:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 28px;
}

.doc-wrap p,
.doc-wrap li {
    color: var(--text);
    font-size: .94rem;
}

.doc-wrap ul,
.doc-wrap ol {
    padding-left: 20px;
}

.doc-wrap li {
    margin-bottom: 7px;
}

.doc-callout {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 20px 0;
}

.doc-callout p:last-child {
    margin-bottom: 0;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: .86rem;
}

.doc-table th,
.doc-table td {
    text-align: left;
    vertical-align: top;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.doc-table th {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    background: var(--bg-raised);
    border-bottom-color: var(--border-strong);
}

.doc-table td:nth-child(2) {
    white-space: nowrap;
    color: var(--text-muted);
}

/* --- help centre: FAQ + contact --- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 24px 0 0;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-raised);
}

.faq-item>summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: .92rem;
    list-style: none;
}

.faq-item>summary::-webkit-details-marker {
    display: none;
}

.faq-item[open]>summary {
    border-bottom: 1px dashed var(--border);
}

.faq-item[open]>summary .chev {
    transform: rotate(90deg);
}

.faq-item>summary .chev {
    flex: none;
    color: var(--accent);
    transition: transform .15s;
}

.faq-answer {
    padding: 14px 16px 16px 42px;
    font-size: .89rem;
    color: var(--text-muted);
}

.faq-answer p {
    margin: 0 0 10px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.support-card {
    margin-top: 40px;
    padding: 24px 26px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.doc-wrap .support-card h2 {
    margin-top: 0;
    border: none;
    padding-top: 0;
    font-size: 1.45rem;
}

.support-email-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 16px 0 6px;
}

/* Selectable on purpose: on a phone with no mail client wired up, a mailto:
   does nothing and copying the address is the only way through. */
.support-email {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .92rem;
    background: var(--bg);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 8px 12px;
    user-select: all;
    color: var(--text);
}

.support-meta {
    font-size: .8rem;
    color: var(--text-muted);
    margin: 14px 0 0;
}

@media (max-width: 720px) {
    .doc-wrap {
        padding: 32px 20px 56px;
    }

    .doc-table,
    .doc-table tbody,
    .doc-table tr,
    .doc-table td {
        display: block;
        width: 100%;
    }

    .doc-table thead {
        display: none;
    }

    .doc-table tr {
        border: 1px solid var(--border);
        border-radius: var(--radius);
        margin-bottom: 10px;
        padding: 4px 0;
    }

    .doc-table td {
        border-bottom: none;
        padding: 6px 12px;
    }

    .doc-table td:first-child {
        font-weight: 600;
    }
}
