/* Policy pages (Privacy & cookies, Terms & cancellation). Everything site-wide comes from styles.css */

/* A sticky "On this page" list beside a comfortable reading column */
.policy { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.policy-nav { position: sticky; top: 110px; display: grid; gap: 14px; padding: 24px 26px; border-radius: var(--radius); background: var(--surface); }
.policy-nav ol { list-style: none; counter-reset: toc; padding: 0; margin: 0; display: grid; gap: 4px; }
.policy-nav li { counter-increment: toc; }
.policy-nav a { display: flex; gap: 10px; padding: 5px 0; color: var(--ink); text-decoration: none; font-weight: 400; font-size: 0.95rem; }
.policy-nav a::before { content: counter(toc, decimal-leading-zero); font-family: var(--display); color: var(--moss); min-width: 1.6em; }
.policy-nav a:hover { color: var(--forest); text-decoration: underline; }

.policy-body { display: grid; gap: clamp(36px, 5vw, 56px); max-width: 72ch; }
.policy-body section { display: grid; gap: 14px; scroll-margin-top: 110px; }
.policy-body section + section { padding-top: clamp(36px, 5vw, 56px); border-top: 1px solid var(--line); }
.policy-body h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
.policy-body h3 { font-family: var(--body); font-weight: 600; font-size: 1.02rem; margin-top: 6px; }
.policy-body ul { margin: 0; padding-left: 1.2em; display: grid; gap: 10px; }
.policy-body li::marker { color: var(--clay); }
.policy-body strong { font-weight: 500; color: var(--ink); }
.policy-body p .btn { margin-top: 4px; }

/* Rights as a tidy two-column set of tiles */
.policy-body ul.rights { list-style: none; padding: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rights li { background: var(--lilac); border-radius: 10px; padding: 12px 16px; font-size: 0.95rem; }
.rights strong { display: block; }
/* Terms "At a glance": the same four colour-wheel hues as the other four-box sets (90° apart, blues and violets muted) */
.rights.glance li { --h: 30; background: oklch(95.5% calc(0.028 * var(--k, 1)) var(--h)); }
.rights.glance li:nth-child(2) { --h: 120; }
.rights.glance li:nth-child(3) { --h: 210; --k: .55; }
.rights.glance li:nth-child(4) { --h: 300; --k: .55; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rights.glance li { background: oklch(26% calc(0.03 * var(--k, 1)) var(--h)); }
}
:root[data-theme="dark"] .rights.glance li { background: oklch(26% calc(0.03 * var(--k, 1)) var(--h)); }

/* Cookie table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; }
thead th { background: var(--surface); color: var(--ink); font-weight: 500; font-size: 0.8rem; letter-spacing: .08em; text-transform: uppercase; }
tbody tr + tr td { border-top: 1px solid var(--line); }
td:first-child { white-space: nowrap; color: var(--ink); }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.85em; background: var(--surface); padding: 2px 6px; border-radius: 6px; }

/* Details still to be filled in: easy to spot, easy to find */
mark.fill { background: var(--blush); color: var(--clay); border: 1px dashed var(--clay); border-radius: 6px; padding: 0 6px; font-weight: 500; }

@media (max-width: 860px) {
  .policy { grid-template-columns: 1fr; }
  .policy-nav { position: static; }
}
@media (max-width: 560px) {
  .policy-body ul.rights { grid-template-columns: 1fr; }
  /* Each cookie becomes a small labelled card */
  .table-wrap { border: 0; overflow: visible; }
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tbody { display: grid; gap: 12px; }
  tbody tr { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 0; }
  tbody tr + tr td { border-top: 0; }
  td { padding: 8px 16px; }
  td::before { content: attr(data-label); display: block; font-size: 0.72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 2px; }
}
