/*
    assets/css/pages-shop.css

    The static pages -- /pages/*.php and /policies/*.php -- brought in line
    with the rest of the restyle. Added 2026-08-21.

    These are thin shells: header, one <section class="wrapper ..."> holding a
    content partial, footer. The partials are prose an admin wrote years ago
    -- an <h2> title, <h3> steps, paragraphs, lists and <span class="image">
    figures -- and there are twenty of them. Restyling the markup would mean
    editing twenty files of hand-written content; styling the shell means one
    file and nothing to break.

    THE .page-shell CLASS EXISTS BECAUSE THE IDS DO NOT DISTINGUISH THEM.
    These sections are variously #about, #installation, #models, #tested and
    -- on nine of the policies -- #main, which is also the product page's
    wrapper. There was no selector that caught the static pages and missed
    /oz41. The class was added to the twenty page shells that include both
    template/header.php and template/footer.php; the seven content-only
    partials in those folders were correctly skipped.

    Loaded last in template/css.php.
*/

/* ------------------------------------------------------------ container */

.page-shell > .inner {
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 1.5em;
    padding-right: 1.5em;
}

.page-shell {
    padding-bottom: 78px;
}

/* ---------------------------------------------------------- page title */

/*
No page carries an <h1> -- the title of every one of them is the first <h2>
in the content partial. Rather than add an h1 to twenty files of prose, the
first h2 is styled AS the page title and the rest keep the section-heading
size below it. Worth revisiting: one <h1> per page is the right markup, and
these pages currently have none.
*/
.page-shell > .inner > h2:first-child,
.page-shell > .inner > *:first-child > h2:first-child {
    margin: 0 0 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: clamp(27px, 3.4vw, 42px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.035em;
    color: var(--ink);
    text-transform: none;
}

/* ------------------------------------------------------------- headings */

.page-shell h2,
.page-shell h3,
.page-shell h4 {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
    text-transform: none;
}

.page-shell h2 {
    margin: 46px 0 14px;
    font-size: clamp(21px, 2.2vw, 27px);
    line-height: 1.2;
}

.page-shell h3 {
    margin: 34px 0 12px;
    font-size: 17px;
    line-height: 1.35;
}

.page-shell h4 {
    margin: 26px 0 10px;
    font-size: 15px;
}

/* --------------------------------------------------------------- prose */

/*
A READING MEASURE. These pages run the full 1180px container, so a paragraph
of warranty terms was crossing about 150 characters -- roughly twice what is
comfortable to read, and the reason the policy pages felt like a wall. Capped
on the text elements rather than the container, so images and tables can
still use the full width.
*/
.page-shell p,
.page-shell li {
    /* Type only. The width cap is --oz-measure below -- `ch` gave a different
       width per element, which is the bug that block documents. */
    color: var(--ink-soft);
    font-size: 15.5px;
    line-height: 1.78;
}

/*
    THE READING MEASURE, KEPT BUT DISABLED.

    .page-shell prose was capped to 640px and centred, added 2026-08-21 because
    the policy pages were running ~150 characters a line. Disabled 2026-08-22
    after the owner flagged it on how-to-order, installation and
    testing-and-gadgets: it narrowed the heading and copy into a centred box
    while the card grid below kept the full width, which reads as a bug on
    every page that has a grid.

    Left commented rather than deleted so it is one uncomment away if a
    narrower column is ever wanted -- but note that on its own it is NOT
    enough. .page-shell h2/h3/h4/p/ol each set `margin:` as a SHORTHAND further
    down, and a shorthand resets the horizontal margins to 0, so re-enabling
    max-width without also giving those shorthands `auto` centres the callout
    boxes and leaves every heading and paragraph pinned left.

    The better fix, if it comes up again: narrow the CONTAINER on the pages
    that need it, rather than narrowing text inside a wide one.

    --oz-measure stays defined above; .install-guides still uses it.
*/
.page-shell p,
.page-shell h2,
.page-shell h3,
.page-shell h4,
.page-shell hr,
.page-shell ul,
.page-shell ol,
.page-shell blockquote,
.page-shell .installation-disclaimer,
.page-shell .curved,
.page-shell .install-guides {
    /* max-width: var(--oz-measure); */
    margin-left: auto;
    margin-right: auto;
}

.page-shell p {
    margin: 0 0 1.2em;
}

.page-shell ul,
.page-shell ol {
    margin: 0 0 1.4em;
    padding-left: 1.4em;
}

.page-shell li {
    margin-bottom: .55em;
}

.page-shell a {
    color: var(--blue);
}

.page-shell strong {
    color: var(--ink);
    font-weight: 700;
}

/* --------------------------------------------------------------- figures */

/*
The partials wrap every screenshot in <span class="image"> with a fancybox
link. They were full-bleed and unframed, so a screenshot of the cart ran edge
to edge in the middle of a sentence.
*/
.page-shell .image,
.page-shell span.image {
    display: block;
    max-width: 820px;
    margin: 22px 0 30px;
}

.page-shell .image img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
}

.page-shell .image a {
    display: block;
}

/*
DOUBLE-BOXED CARDS ON /pages/compatibility.php.

The figure frame above assumes <span class="image"> means "a screenshot in
the middle of prose". On the compatibility page it means something else: the
vehicle cards are <section class="post"><span class="image"><img
class="cardtype"> ... <div class="content">, and main.css already draws the
card -- white ground, 1px border, 18px bottom radius, shadow -- on the
.content beneath. Framing the image too put a bordered, rounded box inside a
bordered, rounded box.

Inside a card the image is the card's top half, so it takes the card's top
corners and no border of its own.
*/
.page-shell .post .image,
.page-shell .posts .image {
    max-width: none;
    margin: 0;
}

.page-shell .post .image img,
.page-shell .posts .image img {
    border: 0;
    border-radius: 18px 18px 0 0;
    background: none;
}

/* ---------------------------------------------------------------- tables */

/*
The same treatment the product page's package card uses, so a shipping-rates
table on /policies/shipping.php and a specifications table on /oz41 are
recognisably the same object.
*/
.page-shell table {
    width: 100%;

    /*
        NO 900px CAP. It used to be here to match the product page's package
        card, but /policies/shipping.php carries 29 six-column rate tables and
        the cap squeezed every one of them into 900 of the 1132px available --
        measured, and none of them was overflowing, so the narrowing bought
        nothing and cost 232px of column width on the page that needs it most.

        The table is width:100% inside an already-capped .inner, and
        .table-wrapper keeps overflow-x:auto for narrow screens, so there is
        nothing left for a second cap to protect against.
    */
    max-width: none;
    margin: 0 0 28px;
    background: none;
    border: 0;
    border-collapse: collapse;
    font-size: 14px;
}

.page-shell th,
.page-shell td {
    padding: 12px 16px 12px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    line-height: 1.55;
    vertical-align: top;
}

.page-shell thead th,
.page-shell tr:first-child th {
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.page-shell td {
    color: var(--ink);
    font-weight: 600;
}

.page-shell tr:last-child th,
.page-shell tr:last-child td {
    border-bottom: 0;
}

/* ----------------------------------------------------------- exceptions */

/*
#contact is the contact FORM, not prose -- it is .wrapper.split and lays out
in two columns with its own field styling. The measure cap and the figure
frame both make a mess of it, so the prose rules stop at its edge.
*/
.page-shell#contact p,
.page-shell#contact li {
    max-width: none;
}

.page-shell#contact .image,
.page-shell#contact span.image {
    max-width: none;
    margin: 0;
}

@media screen and (max-width: 736px) {
    .page-shell {
        padding-bottom: 48px;
    }

    .page-shell > .inner > h2:first-child,
    .page-shell > .inner > *:first-child > h2:first-child {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .page-shell h2 {
        margin-top: 34px;
    }
}

/* ---------------------------------------------------------------
   /policies/policies.php -- one readable column, not four
   ---------------------------------------------------------------
policies/quick-policies.php lays its text out as four `col-3` columns. That
made sense while it was included UNDER EVERY PRODUCT GRID as a compact
reminder strip -- it was removed from index.php, product/index.php and
product/product.php on 2026-08-20 and now has a page of its own, where four
narrow columns of legal prose is simply unreadable.

SCOPED TO .page-shell ON PURPOSE. The partial still has two other consumers,
orders/index.php and policies/read-policies.php, and both wrap it in a hidden
#dialog-content rather than .page-shell. Editing quick-policies.php itself
would have changed the dialog in the checkout flow too; only the standalone
page is meant to change.

The measure cap matters as much as the column count: full-width legal text at
this container's 1180px is about 160 characters a line, roughly twice what is
comfortable to read.
*/
.page-shell #policies .row {
    display: block;
    margin: 0;
}

.page-shell #policies .row > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    flex: none;
    padding-left: 0;
    padding-right: 0;
}

/* Each former column becomes a block; give them air so the run of <p> does
   not read as one undifferentiated wall. */
.page-shell #policies .row > [class*="col-"] + [class*="col-"] {
    margin-top: 1.75em;
    padding-top: 1.75em;
    border-top: 1px solid var(--line);
}

.page-shell #policies p {
    line-height: 1.6;
}

.page-shell #policies p strong {
    display: inline-block;
    margin-bottom: .15em;
}

/*
    RATE TABLES: VALUES CENTRED, THE LABEL COLUMN LEFT.

    /policies/shipping.php is 29 tables of
    Product | Parcel | Weight | Length | Width | Height. The five value columns
    are short ("1 satchel", "0.7kg", "25.5cm") and read far better centred
    under their headings.

    THE FIRST COLUMN IS DELIBERATELY EXCLUDED. It holds the product name --
    "2x OZ15 Gutter Mount Stainless Steel Bracket" -- and centring a ragged
    multi-word label under a heading makes the column edge impossible to scan.
    A blanket `table.alt tbody tr td { text-align: center }` would do exactly
    that.

    Headers follow their own column so the heading and its values share an
    axis.
*/
.page-shell table.alt thead th:not(:first-child),
.page-shell table.alt tbody td:not(:first-child) {
    text-align: center;
}

/*
    TYPE UNIFORMITY IN LONG-FORM COPY.

    Measured on /policies/return-and-refund.php: <b> rendered at weight 600 in
    #444 while <strong> rendered at 700 in --ink, so the same emphasis looked
    like two different things depending on which tag the copy happened to use
    (9 strong, 1 b). <small> used #444 too, a third grey against the body's
    own --ink-soft.

    The copy lives in $lang['returns'] and the policies partials, so it cannot
    be normalised by editing one template -- it has to be normalised here.
*/
.page-shell b {
    font-weight: 700;
    color: var(--ink);
}

.page-shell small {
    color: var(--ink-soft);
}

/* ------------------------------------------------- installation guide links

   The "Guides for specific brackets" list on pages/installation.php.

   Deliberately NOT built from .posts/.post: those carry the card treatment
   from main.css plus the column widths from products.css, and this is a short
   list of links, not a grid of photo cards. Reusing them here is what produced
   the double-boxed look the page had before -- a card wrapper around content
   that is already a card.
*/
.install-guides {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.08);
    padding: 1.5em;
    margin: 0 0 2em;
}

.install-guides h3 {
    margin: 0 0 .4em;
    color: #0a1928;
    font-size: 1.2em;
    line-height: 1.3;
    font-weight: 700;
}

.install-guides > p {
    color: #555;
    line-height: 1.6;
    margin: 0 0 1em;
}

/* The card is capped to --oz-measure with the prose; the link row inside it
   takes the card, not the measure again. */
.page-shell .install-guides ul {
    max-width: none;
}

.install-guides ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.install-guides li {
    margin: 0;
    padding: 0;
}

.install-guides li::before {
    content: none;
}

.install-guides a {
    display: inline-flex;
    align-items: center;
    gap: .6em;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: .7em 1em;
    text-decoration: none;
    color: #0a1928;
    line-height: 1.3;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.install-guides a:hover {
    border-color: #1976d2;
    box-shadow: 0 5px 18px rgba(15,34,49,.10);
    transform: translateY(-1px);
}

.install-guides a i {
    color: #1976d2;
}

@media screen and (max-width: 736px) {
    .install-guides a {
        width: 100%;
    }
}

/* ------------------------------------------------------------ downloads list

   pages/downloads.php. A list of file links, not prose, so it opts out of the
   bullet styling and takes the card treatment per row instead.
*/
.downloads-list {
    list-style: none;
    margin: 0 0 2em;
    padding: 0;
}

.downloads-list li {
    margin: 0 0 10px;
    padding: 0;
}

.downloads-list li::before {
    content: none;
}

.downloads-list a {
    display: flex;
    align-items: flex-start;
    gap: .85em;
    background: #fff;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 12px;
    padding: .9em 1.1em;
    text-decoration: none;
    color: var(--ink, #0a1928);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.downloads-list a:hover {
    border-color: var(--blue, #1976d2);
    box-shadow: 0 5px 18px rgba(15,34,49,.10);
    transform: translateY(-1px);
}

.downloads-list a i {
    color: var(--blue, #1976d2);
    font-size: 1.15em;
    line-height: 1.5;
    flex: none;
}

.downloads-item-text {
    display: flex;
    flex-direction: column;
    gap: .15em;
}

.downloads-item-text strong {
    font-weight: 700;
    line-height: 1.35;
}

.downloads-item-text small {
    color: var(--ink-soft, #555);
    font-size: 13.5px;
    line-height: 1.55;
}
