/* The Cookie Club: the policy pages (/terms/, /refund-and-returns-policy/, /delivery-policy/,
   /privacy/) and the list of them (/shop/policies/): src/policies.mjs. Made for reading something long.
     .pl-hero     the policy's name, what it's about in a line, and when it last changed
     .pl-toc      "On this page": the headings, beside the text on a wide screen and folded away above
                  it on a narrow one (assets/js/policy.js marks the part being read)
     .pl-text     the wording, in a column narrow enough to read, with a lawyer's clauses set in under
                  one another (.pol-c1, .pol-c2, .pol-c3)
     .pl-cards    the other policies
   Loaded by these pages only, after fresh.css and fresh-shop.css (the hero and breadcrumbs are theirs). */

.pl-hero .f-crumbs ol { margin-bottom: clamp(0.9rem, 2vw, 1.4rem); }
.chrome-new .pl-hero h1 { margin: 0; max-width: 16ch; font-size: clamp(2.6rem, 1.9rem + 3.8vw, 4.6rem); line-height: 0.94; color: var(--field-head); text-wrap: balance; }
.pl-hero .s-hero-sub { max-width: 46ch; }
.chrome-new .pl-hero .policy-date { margin: 14px 0 0; font-size: 0.95rem; font-weight: 800; color: var(--field-ink); }

/* ---------- the list of contents and the wording ---------- */
.pl-grid { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); align-items: start; gap: clamp(2rem, 6vw, 5.5rem); }
.pl-grid.is-plain { grid-template-columns: minmax(0, 1fr); }
.pl-toc { position: sticky; top: calc(var(--head-h) + 20px); max-height: calc(100vh - var(--head-h) - 40px); overflow-y: auto; overscroll-behavior: contain; padding: 20px 20px 16px; border-radius: var(--r-md); background: var(--soft); --accent-ink: var(--accent-deep); }
.pl-toc summary { list-style: none; margin: 0 0 10px; font: 400 1.3rem/1.05 var(--font-display); color: var(--text); }
.pl-toc summary::-webkit-details-marker { display: none; }
.pl-toc ol { list-style: none; display: grid; gap: 2px; margin: 0; padding: 0; }
.chrome-new .pl-toc a { display: block; padding: 7px 10px 7px 12px; border-left: 3px solid transparent; border-radius: 0 10px 10px 0; font-size: 0.95rem; font-weight: 700; line-height: 1.3; color: var(--text-soft); text-decoration: none; }
.chrome-new .pl-toc a:hover { color: var(--text); background: rgba(255, 255, 255, 0.6); }
.chrome-new .pl-toc a[aria-current='true'] { border-left-color: var(--accent); background: #fff; color: var(--text); font-weight: 900; }
.pl-toc a:focus-visible { outline: 3px solid var(--mark); outline-offset: 1px; }

.pl-text { min-width: 0; max-width: 68ch; font-size: 1.08rem; font-weight: 600; line-height: 1.7; color: var(--text-soft); overflow-wrap: break-word; }
.pl-grid.is-plain .pl-text { margin-inline: auto; }
.chrome-new .pl-text h2 { margin: clamp(2.1rem, 4vw, 2.9rem) 0 0.6em; font-size: clamp(1.5rem, 1.3rem + 0.9vw, 1.9rem); line-height: 1.08; scroll-margin-top: calc(var(--head-h) + 20px); text-wrap: balance; }
.chrome-new .pl-text > h2:first-child { margin-top: 0; }
.pl-text p { margin: 0 0 1em; }
.pl-text > p:first-child { font-size: 1.16rem; font-weight: 700; color: var(--text); }
.pl-text ul { display: grid; gap: 8px; margin: 0 0 1.2em; padding-left: 1.3em; }
.pl-text li::marker { color: var(--mark); }
.pl-text strong { color: var(--text); }
.chrome-new .pl-text a { font-weight: 800; color: var(--accent-ink); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.chrome-new .pl-text a:hover { text-decoration-color: var(--mark); }
/* A clause: its letter stands clear of the lines that follow it, and each level sits in from the last. */
.pl-text .pol-c { margin-bottom: 0.7em; padding-left: 2.4em; text-indent: -2.4em; }
.pl-text .pol-c2 { margin-left: 2.4em; }
.pl-text .pol-c3 { margin-left: 4.8em; }

/* ---------- the other policies ---------- */
.chrome-new .pl-more h2 { margin: 0 0 clamp(1.1rem, 2.4vw, 1.6rem); font-size: clamp(1.7rem, 1.4rem + 1.4vw, 2.3rem); line-height: 1; }
.pl-cards { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 18px); margin: 0; padding: 0; }
.pl-cards.policy-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; }
/* (site.css still boxes these list items for the older layout: the card here is the link itself.) */
.pl-more .policy-more { margin: 0; padding: 0; border: 0; }
.pl-cards li, .chrome-new .pl-cards li { padding: 0; border: 0; border-radius: 0; background: none; scroll-margin-top: calc(var(--head-h) + 20px); }
.pl-cards a { display: grid; align-content: start; gap: 6px; height: 100%; padding: clamp(1.1rem, 2.4vw, 1.5rem); border-radius: var(--r-md); background: #fff; text-decoration: none; box-shadow: var(--shadow); transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out); }
.pl-main .pl-cards a { background: var(--soft); box-shadow: none; }
.pl-cards strong { font: 400 1.3rem/1.1 var(--font-display); color: var(--text); }
.pl-cards span { font-weight: 600; line-height: 1.45; color: var(--text-soft); }
.pl-cards a:focus-visible { outline: 3px solid var(--mark); outline-offset: 3px; }
.pl-cards li:target a { box-shadow: 0 0 0 3px var(--mark); }
@media (hover: hover) and (pointer: fine) { .pl-cards a:hover { transform: translateY(-3px); box-shadow: var(--lift); } }
.pl-ask { margin: clamp(1.4rem, 3vw, 2rem) 0 0; font-weight: 700; color: var(--text); }
.chrome-new .pl-ask a { font-weight: 900; color: var(--accent-deep); }

@media (min-width: 901px) {
  /* Beside the text it's always open: the heading is only a heading. */
  .pl-toc summary { pointer-events: none; cursor: default; }
}
@media (max-width: 900px) {
  .pl-grid { grid-template-columns: minmax(0, 1fr); gap: clamp(1.4rem, 4vw, 2rem); }
  .pl-toc { position: static; max-height: none; padding: 0; }
  .pl-toc summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0; padding: 16px 20px; cursor: pointer; border-radius: var(--r-md); }
  .pl-toc summary::after { content: ''; flex: none; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(var(--mark), var(--mark)) center / 14px 3px no-repeat, linear-gradient(var(--mark), var(--mark)) center / 3px 14px no-repeat, #fff; transition: transform 0.2s var(--ease-out); }
  .pl-toc[open] summary::after { transform: rotate(135deg); }
  .pl-toc summary:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; }
  .pl-toc nav { padding: 0 12px 14px; }
  .pl-cards, .pl-cards.policy-list { grid-template-columns: minmax(0, 1fr); }
  .pl-text .pol-c { padding-left: 2.1em; text-indent: -2.1em; }
  .pl-text .pol-c2 { margin-left: 1.3em; }
  .pl-text .pol-c3 { margin-left: 2.6em; }
}
@media (prefers-reduced-motion: reduce) {
  .pl-cards a, .pl-toc summary::after { transition: none; }
}
/* On paper: the wording, and nothing else. */
@media print {
  .pl-body .f-head, .pl-body .f-foot, .pl-body .f-cta, .pl-body .f-drip, .pl-toc, .pl-more, .pl-body .f-crumbs, .pl-body .f-ticker { display: none !important; }
  .pl-body main { margin: 0; }
  .pl-hero { padding: 0 0 12pt; background: none; }
  .pl-main { padding: 0; }
  .pl-grid { display: block; }
  .pl-text { max-width: none; font-size: 11pt; line-height: 1.5; color: #000; }
  .chrome-new .pl-text h2, .chrome-new .pl-hero h1 { color: #000; }
}
