/* Storefront policy pages. Layout only — every colour and font comes from the active theme's
   custom properties (with the --c-* fallbacks that themes/base/static/storefront/commerce.css
   sets up), so a policy page looks native in every theme.

   Spacing rules on headings and paragraphs start `body .policy-layout`: every theme resets `p` and
   `h1`–`h4` to `margin: 0` at (0,1,2), which beats a one-class rule, so the gaps below were
   written and never applied — the title sat on its meta line and each heading on its paragraph. */

.policy-layout { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) { .policy-layout { grid-template-columns: 16rem 1fr; } }

.policy-nav { position: sticky; top: 1rem; display: grid; gap: 0.25rem; }
body .policy-layout .policy-nav h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-muted); margin-bottom: 0.5rem; }
.policy-nav a { display: block; padding: 0.5rem 0.75rem; border-radius: var(--c-radius-sm); text-decoration: none; color: inherit; border-left: 3px solid transparent; }
.policy-nav a:hover { background: var(--c-soft); }
.policy-nav a[aria-current="page"] { background: var(--c-soft); border-left-color: var(--c-accent); font-weight: 600; }
.policy-nav a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

body .policy-layout p.policy-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 0.5rem 0 1.75rem; font-size: 0.875rem; color: var(--c-muted); }

.policy-doc { max-width: 46rem; line-height: 1.7; }
body .policy-layout .policy-doc > * + * { margin-top: 1rem; }
body .policy-layout .policy-doc h2 { font-size: 1.15rem; margin-top: 2rem; line-height: 1.35; }
.policy-doc ul, .policy-doc ol { padding-left: 1.25rem; display: grid; gap: 0.4rem; }
.policy-doc hr { border: 0; border-top: 1px solid var(--c-line); margin: 1.5rem 0; }
.policy-doc a { color: var(--c-accent); }
.policy-doc table { width: 100%; border-collapse: collapse; }
.policy-doc th, .policy-doc td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--c-line); }

.policy-index { display: grid; gap: 1rem; max-width: 46rem; }
.policy-index a { display: block; padding: 1rem 1.25rem; border: 1px solid var(--c-line); border-radius: var(--c-radius); text-decoration: none; color: inherit; }
.policy-index a:hover { border-color: var(--c-line-strong); }
.policy-index a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.policy-index strong { display: block; font-size: 1.05rem; }
.policy-index span { color: var(--c-muted); font-size: 0.875rem; }

/* Footer block. Plain anchors so it reads correctly in a theme that never loads this file;
   this rule only tidies the spacing where it is loaded. */
.footer-policies { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
