/* About, Contact and FAQ (pages/about.html, contact.html, faq.html; the words come from lib/content/*-page.js through
   lib/content/render-content-page.js). The arrangement only: the storefront chrome is storefront-shell.css, and the
   buttons, links and focus ring come from components.css. Colours, spacing, type and radii come from tokens.css. One raw
   value stays: the 960px content measure (tokens.css has no width scale), as on the page not found. */
@layer components.pages {
    :where([data-ui="unified"][data-storefront="content-page"]) .cp-page {
        width: min(960px, calc(100% - var(--space-5)));
        margin-inline: auto;
        padding-block: var(--space-6) var(--space-7);
        color: var(--ui-ink);
        font-size: var(--font-size-base);
        line-height: var(--line-height-loose);
    }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-page a:not(.btn) { color: var(--ui-accent-hover); text-decoration: underline; text-underline-offset: 2px; }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-draft-note {
        margin: 0 0 var(--space-5);
        padding: var(--space-3) var(--space-4);
        background: var(--amber-100);
        border: 1px solid var(--amber-300);
        border-radius: var(--radius-md);
        font-weight: var(--font-weight-semibold);
    }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-todo {
        padding-inline: var(--space-1);
        background: var(--amber-100);
        color: var(--amber-900);
        border-radius: var(--radius-sm);
        font-weight: var(--font-weight-semibold);
    }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-head h1 {
        font-size: clamp(var(--font-size-2xl), var(--font-size-xl) + 2vw, var(--font-size-display));
        line-height: var(--line-height-tight);
        margin: 0 0 var(--space-3);
    }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-intro { margin: 0 0 var(--space-3); color: var(--ui-muted); font-size: var(--font-size-lg); }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-section { margin-top: var(--space-6); }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-section h2 {
        font-size: var(--font-size-xl);
        line-height: var(--line-height-tight);
        margin: 0 0 var(--space-3);
    }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-section p { margin: 0 0 var(--space-3); }
    :where([data-ui="unified"][data-storefront="content-page"]) .cp-list { margin: 0 0 var(--space-3); padding-left: var(--space-5); }
    :where([data-ui="unified"][data-storefront="content-page"]) .cp-list li { margin-bottom: var(--space-1); }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-points {
        list-style: none;
        margin: 0 0 var(--space-4);
        padding: 0;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
        gap: var(--space-3);
    }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-points li,
    :where([data-ui="unified"][data-storefront="content-page"]) .cp-steps li {
        display: flex;
        flex-direction: column;
        gap: var(--space-1);
        padding: var(--space-4);
        background: var(--ui-surface);
        border: 1px solid var(--ui-line);
        border-radius: var(--radius-md);
    }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-steps {
        list-style: none;
        margin: 0;
        padding: 0;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
        gap: var(--space-3);
    }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-step-num {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: var(--space-6);
        height: var(--space-6);
        border-radius: var(--radius-pill);
        background: var(--ui-accent);
        color: var(--ui-surface);
        font-weight: var(--font-weight-bold);
    }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-details { margin: 0; display: grid; gap: var(--space-2); }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-details div {
        display: grid;
        grid-template-columns: minmax(8rem, 12rem) 1fr;
        gap: var(--space-3);
        padding-bottom: var(--space-2);
        border-bottom: 1px solid var(--ui-line);
    }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-details dt { font-weight: var(--font-weight-semibold); }
    :where([data-ui="unified"][data-storefront="content-page"]) .cp-details dd { margin: 0; overflow-wrap: anywhere; }
    :where([data-ui="unified"][data-storefront="content-page"]) .cp-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-photo { margin: 0 0 var(--space-4); }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-photo-box {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 12rem;
        background: var(--ui-tint);
        border: 1px dashed var(--ui-line-strong);
        border-radius: var(--radius-md);
    }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-rating { font-weight: var(--font-weight-semibold); }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-faq {
        border-bottom: 1px solid var(--ui-line);
    }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-faq summary {
        padding-block: var(--space-3);
        font-weight: var(--font-weight-semibold);
        cursor: pointer;
    }

    :where([data-ui="unified"][data-storefront="content-page"]) .cp-faq-answer { padding-bottom: var(--space-2); }

    @media (width <= 560px) {
        :where([data-ui="unified"][data-storefront="content-page"]) .cp-details div { grid-template-columns: 1fr; gap: 0; }
    }

    @media print {
        :where([data-ui="unified"][data-storefront="content-page"]) .cp-actions { display: none; }
    }
}
