/* ==========================================================================
   Long-form content pages — privacy policy, FAQ.

   Requires css/design-tokens.css.

   These were rendering as unstyled Bootstrap defaults: one undifferentiated
   grey wall of text with no hierarchy, so nothing told you where a section
   started or how far you had left to read. The job here is structure and
   rhythm, not decoration.
   ========================================================================== */

body.content-page {
    background-color: var(--paper);
    color: var(--ink);
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
}

/* Scoped to the page's own content, never the body: keyed on .content-page
   this rule reached into the shared header and painted the "Get the app"
   label cardamom-on-cardamom. The chrome is out of reach by construction
   now, rather than by an ever-growing :not() list. */
.content-body a:not(.btn-app):not(.btn),
.content-header a:not(.btn-app):not(.btn) {
    color: var(--cardamom);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.content-body a:not(.btn-app):not(.btn):hover,
.content-header a:not(.btn-app):not(.btn):hover {
    color: var(--cardamom-strong);
}

/* --------------------------------------------------------------------------
   Page header
   -------------------------------------------------------------------------- */

.content-header {
    padding: 48px 0 36px;
    border-bottom: 1px solid var(--divider);
    background: linear-gradient(180deg, var(--tile-green) 0%, var(--paper) 100%);
}

.content-header__inner {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-header__kicker {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1rem;
    color: var(--turmeric-text);
}

.content-header__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.9rem);
    line-height: 1.12;
    color: var(--ink);
}

.content-header__meta {
    margin: 12px 0 0;
    font-family: var(--font-data);
    font-size: 0.8rem;
    color: var(--cement-grey);
}

/* --------------------------------------------------------------------------
   Body
   -------------------------------------------------------------------------- */

.content-body {
    max-width: 780px;
    margin: 0 auto;
    padding: 8px 20px 72px;
}

/* A measure this wide is what makes long policy text readable; the default
   full-bleed container ran lines past 120 characters on a laptop. */
.content-body p,
.content-body li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--dark-grey);
}

.content-body h2 {
    margin: 44px 0 12px;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--ink);
}

.content-body h3 {
    margin: 30px 0 10px;
    font-weight: 600;
    font-size: 1.12rem;
    color: var(--ink);
}

.content-body h4 {
    margin: 22px 0 8px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--cardamom);
}

/* A hairline above each top-level section does more for scannability than
   extra whitespace alone, without drawing boxes around everything. */
.content-body h2::before {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    margin-bottom: 14px;
    border-radius: 2px;
    background: var(--turmeric);
}

.content-body ul,
.content-body ol {
    padding-left: 1.25rem;
}

.content-body li {
    margin-bottom: 8px;
}

.content-body strong {
    color: var(--ink);
}

/* Long URLs in a policy shouldn't force a horizontal scrollbar. */
.content-body {
    overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   FAQ entries

   Native <details>/<summary>: keyboard accessible, findable by the browser's
   own in-page search, and working with JavaScript off — none of which a
   div-and-click-handler accordion gets for free.
   -------------------------------------------------------------------------- */

.faq-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.faq-item {
    margin-bottom: 12px;
    border: 1px solid var(--divider);
    border-radius: var(--r-lg);
    background: #fff;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.faq-item > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    color: var(--ink);
    font-size: 1.02rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

/* Suppress the default disclosure triangle in both engines. */
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::marker { content: ""; }

.faq-item > summary:hover {
    background: var(--tile-green);
}

.faq-item > summary:focus-visible {
    outline: 3px solid var(--turmeric);
    outline-offset: -3px;
}

.faq-item__chevron {
    flex-shrink: 0;
    color: var(--cardamom);
    transition: transform 0.2s ease;
}

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

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

.faq-item__a {
    padding: 16px 20px 20px;
}

.faq-item__a > *:first-child { margin-top: 0; }
.faq-item__a > *:last-child  { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
    .faq-item__chevron { transition: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
    .content-header {
        padding: 32px 0 26px;
    }

    .content-body {
        padding: 8px 16px 56px;
    }

    .content-header__inner {
        padding: 0 16px;
    }

    .content-body h2 {
        margin-top: 34px;
        font-size: 1.25rem;
    }

    .faq-item > summary {
        padding: 16px;
        font-size: 0.98rem;
    }

    .faq-item__a {
        padding: 14px 16px 16px;
    }
}
