/* Cookie banner, preferences window, cookie table and the standing legal pages (/privacy/, /cookies/) of a journal
   whose CMS sets a Google tag or publishes legal pages: the static journal's src/consent.css (the live look), on its
   tokens (paper, ink, rule, seed; no radius, no shadow). consent.js loads this file itself (it never blocks a page's
   first render); a legal page links it in its head for the cookie table. EDPB 03/2022 / CNIL equal prominence:
   «Reject all» and «Accept all» (and «Save choices» / «Accept all» in the window) are the same class, nothing else
   differs; «Manage» is the quieter non-decision. Every control is at least 44px tall. */

.colophon__cookies {
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink);
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: .18em;
}
.colophon__cookies:hover { color: var(--seed); }
.colophon__cookies[hidden] { display: none; }

.consent {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  background: var(--paper); border-top: 3px solid var(--rule);
  padding: .85rem var(--gutter) max(.85rem, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: .6rem;
  font-family: var(--serif);
}
.consent__text { margin: 0; font-size: .95rem; line-height: 1.45; max-width: 46rem; }
.consent__text a { color: var(--ink); text-decoration-color: var(--seed); text-underline-offset: .18em; }
.consent__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.consent__pair { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; flex: 1 1 auto; }
.consent__choice, .consent__quiet {
  min-height: 44px; padding: .55rem .9rem; cursor: pointer;
  font: 500 .78rem/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  border-radius: 0;
}
.consent__choice { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.consent__choice:hover { background: var(--seed); border-color: var(--seed); }
.consent__quiet { background: none; color: var(--ink); border: 0; text-decoration: underline; text-underline-offset: .2em; }
.consent__quiet:hover { color: var(--seed); }
@media (min-width: 768px) {
  .consent { flex-direction: row; align-items: center; justify-content: space-between; gap: 2rem; }
  .consent__actions { flex-wrap: nowrap; flex: none; }
  .consent__pair { flex: none; }
}

.consent-prefs {
  width: min(36rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto;
  margin: auto; padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--paper); color: var(--ink); border: 3px solid var(--rule); border-radius: 0;
}
.consent-prefs::backdrop { background: rgb(21 20 18 / .35); }
.consent-prefs__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.consent-prefs__head h2 { margin: 0; font-family: var(--display); font-weight: 760; font-stretch: 80%; font-size: 1.6rem; line-height: 1.1; }
.consent-prefs__close { width: 44px; height: 44px; margin: -.5rem -.75rem -.5rem 0; background: none; border: 0; cursor: pointer; font-size: 1.1rem; color: var(--ink-soft); }
.consent-prefs__close:hover { color: var(--ink); }
.consent-prefs__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--rule-soft); }
.consent-prefs__label { display: block; font: 500 .78rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.consent-prefs__text { display: block; font-size: .95rem; line-height: 1.45; color: var(--ink-soft); margin-top: .2rem; }
.consent-prefs__row input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; flex: none; accent-color: var(--seed); }
.consent-prefs__cookies { margin: .85rem 0 1.25rem; font-size: .8rem; line-height: 1.35; }
.consent-prefs__cookies summary { cursor: pointer; font: 500 .78rem/2.75 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.cookie-table { width: 100%; border-collapse: collapse; font-size: .8rem; line-height: 1.35; }
.cookie-table th, .cookie-table td { text-align: left; vertical-align: top; padding: .45rem .5rem .45rem 0; border-bottom: 1px solid var(--rule-soft); }
.cookie-table th { font: 500 .66rem/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; border-bottom-color: var(--rule); }
.cookie-table td:first-child { font-family: var(--mono); font-size: .75rem; white-space: nowrap; }
/* Phones and the preferences window: each cookie is a block of labelled lines, never a squeezed five-column grid. */
@media (max-width: 699px) {
  .cookie-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cookie-table tr { display: block; padding: .55rem 0; border-bottom: 1px solid var(--rule-soft); }
  .cookie-table td { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .75rem; padding: .15rem 0; border: 0; }
  .cookie-table td::before { content: attr(data-label); font: 500 .66rem/1.9 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
}
.consent-prefs .cookie-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.consent-prefs .cookie-table tr { display: block; padding: .55rem 0; border-bottom: 1px solid var(--rule-soft); }
.consent-prefs .cookie-table td { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .75rem; padding: .15rem 0; border: 0; }
.consent-prefs .cookie-table td::before { content: attr(data-label); font: 500 .66rem/1.9 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }

/* Standing legal pages (/privacy/, /cookies/): the article template without the margin column. */
.legal .prose > .legal__table { max-width: 52rem; margin: 0 0 1.4em; }
.legal__contents p { font: 500 .78rem/1.8 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.legal__contents a { text-decoration: none; border-bottom: 1px solid var(--rule-soft); }
@media (min-width: 1024px) { .legal { grid-template-columns: minmax(0, 1fr); } .legal .article__head { padding-left: 0; } .legal .prose { grid-column: 1; } }

@media print { .consent, .consent-prefs { display: none; } }
