/* #elPagès web kit: shared base. Each site's site.css defines the tokens used here. */
@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-sans); font-size: 1.0625rem; line-height: 1.6;
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100dvh; display: flex; flex-direction: column;
}
main { flex: 1; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.022em; margin: 0 0 .5em; text-wrap: balance; font-weight: 650; }
p { margin: 0 0 1em; text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
a, button, input, select, textarea, label, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.i { width: 1.15em; height: 1.15em; flex: none; }
.num, .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }
.wrap-narrow { width: 100%; max-width: 760px; margin-inline: auto; padding-inline: 16px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ header */
.site-head { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.site-head.scrolled { border-bottom-color: var(--line); }
.head-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.02em; font-size: 1.05rem; white-space: nowrap; }
.brand svg { width: 30px; height: 30px; }
.head-nav { margin-left: auto; display: none; gap: 4px; }
.head-nav a, .menu-panel a { text-decoration: none; padding: 8px 12px; border-radius: var(--r-s); color: var(--muted); font-size: .95rem; transition: color .2s, background .2s; }
.head-nav a:hover, .head-nav a[aria-current] { color: var(--ink); background: var(--surface-2); }
.menu { margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-s); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary .i { width: 24px; height: 24px; }
.menu-panel { position: absolute; right: 0; top: 52px; min-width: 230px; display: grid; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); }
.menu-panel a { color: var(--ink); padding: 12px 14px; }
@media (min-width: 900px) { .head-nav { display: flex; } .menu { display: none; } }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: var(--r-btn); border: 1px solid transparent; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .18s cubic-bezier(.16,1,.3,1), background .2s, border-color .2s, color .2s; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-solid:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.linklike { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ------------------------------------------------------------------ forms */
.field { display: grid; gap: 8px; }
.field > label, .field > .label { font-size: .9rem; font-weight: 600; color: var(--ink); }
.field .help { font-size: .82rem; color: var(--muted); margin: 0; }
.input { position: relative; display: flex; align-items: center; }
.input input, .input select, select.select {
  width: 100%; min-height: 50px; padding: 0 14px; background: var(--field); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-s); transition: border-color .2s, box-shadow .2s; appearance: none; }
.input select, select.select { padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.input input:focus, .input select:focus, select.select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.input .unit { position: absolute; right: 14px; color: var(--muted); pointer-events: none; font-size: .95rem; }
.input input.has-unit { padding-right: 44px; }
input[type="number"] { -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: calc(var(--r-s) + 4px); border: 1px solid var(--line); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { display: grid; place-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--r-s); cursor: pointer; font-size: .92rem; font-weight: 600; color: var(--muted); transition: background .2s, color .2s; white-space: nowrap; }
.seg input:checked + label { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 0 0 1px var(--line); }
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 2px 0 0; flex: none; }
.error-text { color: var(--danger); font-size: .85rem; margin: 0; }

/* ------------------------------------------------------------------ prose & tables */
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin-top: 2.2em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose a:not(.btn) { color: var(--accent-text); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.5em; border: 1px solid var(--line); border-radius: var(--r-m); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: 12px 14px; vertical-align: top; }
thead th { background: var(--surface-2); font-weight: 650; font-size: .85rem; color: var(--muted); }
tbody tr + tr td { border-top: 1px solid var(--line); }
td.r, th.r { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------------------ legal */
.legal { padding-block: 56px 80px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal h2 { font-size: 1.25rem; margin-top: 2em; }
.legal-lead { font-size: 1.15rem; color: var(--muted); }
.legal a:not(.btn) { color: var(--accent-text); }
.legal-dl { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; margin: 0 0 1.5em; }
.legal-dl div { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 12px; padding: 12px 16px; }
.legal-dl div + div { border-top: 1px solid var(--line); }
.legal-dl dt { color: var(--muted); font-size: .9rem; }
.legal-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.cookie-table td:first-child { white-space: nowrap; }

/* ------------------------------------------------------------------ ads */
.ad { margin: 40px auto; max-width: 970px; min-height: 120px; padding-inline: 16px; }
.ad-label { display: block; font-size: .7rem; color: var(--muted); margin-bottom: 4px; text-align: center; }

/* ------------------------------------------------------------------ footer */
.site-foot { margin-top: 96px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: .92rem; color: var(--muted); }
.foot-grid { display: grid; gap: 32px; padding-block: 48px 32px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1.4fr 1fr; } }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-foot a, .site-foot .linklike { color: var(--ink); text-decoration: none; font-size: .92rem; }
.site-foot a:hover, .site-foot .linklike:hover { text-decoration: underline; }
.foot-net li { display: grid; gap: 1px; }
.foot-net span { font-size: .82rem; }
.foot-name { font-weight: 700; color: var(--ink); font-size: 1.05rem; margin-bottom: .4em; }
.foot-h { font-weight: 650; color: var(--ink); margin-bottom: .8em; }
.foot-disclaimer { font-size: .82rem; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 18px 28px; border-top: 1px solid var(--line); font-size: .82rem; }

/* ------------------------------------------------------------------ consent */
.consent { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: 12px; max-width: 460px; padding: 20px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r-m); box-shadow: var(--shadow);
  transform: translateY(16px); opacity: 0; transition: transform .35s cubic-bezier(.16,1,.3,1), opacity .25s; font-size: .93rem; }
.consent.open { transform: none; opacity: 1; }
@media (min-width: 640px) { .consent { left: 24px; bottom: 24px; } }
.consent-t { font-weight: 700; margin-bottom: .35em; }
.consent a { color: var(--accent-text); }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

/* ------------------------------------------------------------------ reveal */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); transition-delay: calc(var(--i, 0) * 70ms); }
  .js [data-reveal].in { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ 404 */
.nf { padding-block: 64px 40px; }
.nf-code { font-family: var(--f-mono); font-size: clamp(5rem, 22vw, 13rem); line-height: .9; letter-spacing: -0.06em; margin: 0; color: var(--accent); }
.nf-links { display: grid; gap: 10px; margin-top: 32px; max-width: 520px; }
.nf-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-m); text-decoration: none; background: var(--surface); transition: border-color .2s, transform .2s; }
.nf-links a:hover { border-color: var(--accent); transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print { .site-head, .site-foot, .consent, .ad { display: none !important; } }
