/* =============================================================================
   Cookie consent - the site's own panel language: ink panel with the olive
   light in one corner, bone type, olive only for the switch that is on.
   "Reject" and "Accept" are the same button on purpose.
   Uses the tokens both pages define (--ink-2, --bone, --olive, --rule-d ...).
   ============================================================================= */
.consent{
  position:fixed;left:24px;bottom:24px;z-index:1150;
  width:min(440px,calc(100vw - 48px));max-height:calc(100vh - 48px);overflow:auto;
  padding:24px 24px 20px;border-radius:16px;
  color:var(--bone);
  background:radial-gradient(420px 180px at 100% -30px,rgba(204,211,118,.12),transparent 70%),var(--ink-2);
  border:1px solid var(--rule-d);
  box-shadow:0 30px 70px -24px rgba(0,0,0,.75);
  opacity:0;transform:translateY(16px);
  transition:opacity .42s cubic-bezier(.16,1,.3,1),transform .42s cubic-bezier(.16,1,.3,1);
  scrollbar-width:thin;scrollbar-color:rgba(204,211,118,.5) transparent;
}
.consent.is-in{opacity:1;transform:none}
.consent.is-out{opacity:0;transform:translateY(12px);transition-duration:.3s}

.consent__title{font-family:'Inter Tight',sans-serif;font-style:italic;font-weight:500;font-size:28px;line-height:1;letter-spacing:-.04em;margin:0 40px 14px 0}
.consent__thin{font-weight:300}
.consent__title b{font-weight:900}
.consent__text{font-size:14px;line-height:1.6;color:var(--bone-2);margin:0}
.consent__links{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0 0;color:var(--bone-3);font-size:13px}
.consent__links a{
  font:inherit;color:var(--bone-2);padding:4px 0;
  text-decoration:underline;text-underline-offset:3px;text-decoration-color:rgba(250,250,247,.35);
  transition:color .2s ease;
}
.consent__links a:hover{color:var(--olive);text-decoration-color:currentColor}

/* ---- preferences ---- */
.consent__prefs{margin-top:16px;border-top:1px solid var(--rule-d)}
.consent__row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--rule-d);cursor:pointer}
.consent__row:first-child{cursor:default}
.consent__rowTxt{display:flex;flex-direction:column;gap:3px;min-width:0}
.consent__rowTxt b{font-weight:600;font-size:14px}
.consent__rowTxt small{font-size:12.5px;line-height:1.45;color:var(--bone-3)}
.consent__always{flex:none;font-family:'JetBrains Mono',monospace;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--olive)}
.consent__switch{
  flex:none;appearance:none;-webkit-appearance:none;margin:0;
  width:42px;height:24px;border-radius:999px;position:relative;cursor:pointer;
  background:rgba(250,250,247,.14);border:1px solid rgba(250,250,247,.2);
  transition:background .25s ease,border-color .25s ease;
}
.consent__switch::before{
  content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;
  background:var(--bone);transition:transform .25s cubic-bezier(.16,1,.3,1),background .25s ease;
}
.consent__switch:checked{background:var(--olive);border-color:var(--olive)}
.consent__switch:checked::before{transform:translateX(18px);background:var(--ink)}
.consent__switch:focus-visible{outline:2px solid var(--olive);outline-offset:3px}

/* ---- actions: reject and accept are equals ---- */
.consent__acts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:18px}
.consent-btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;padding:12px 16px;border-radius:999px;cursor:pointer;
  font-family:'JetBrains Mono',monospace;font-size:11px;font-weight:500;letter-spacing:.14em;text-transform:uppercase;
  color:var(--bone);background:transparent;border:1px solid var(--ghost,rgba(250,250,247,.5));
  transition:background .22s ease,color .22s ease,border-color .22s ease,transform 160ms cubic-bezier(.16,1,.3,1);
}
.consent-btn:hover{background:var(--bone);border-color:var(--bone);color:var(--ink)}
.consent-btn:active{transform:scale(.97)}
.consent-btn:focus-visible{outline:2px solid var(--olive);outline-offset:3px}
.consent-btn--quiet{grid-column:1 / -1;min-height:40px;border-color:transparent;color:var(--bone-2);text-decoration:underline;text-underline-offset:3px;text-decoration-color:rgba(250,250,247,.3)}
.consent-btn--quiet:hover{background:transparent;border-color:transparent;color:var(--olive)}
/* With the preferences open, "save" becomes a full button of its own. */
.consent.is-prefs .consent-btn--quiet{border-color:var(--olive);color:var(--olive);text-decoration:none}
.consent.is-prefs .consent-btn--quiet:hover{background:var(--olive);color:var(--ink)}

/* ---- the map, before consent ---- */
.consent-map{
  position:absolute;inset:0;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:10px;
  padding:24px;color:var(--bone);
  background:repeating-linear-gradient(to bottom,transparent 0 2px,rgba(255,255,255,.025) 2px 3px),var(--ink);
}
.consent-map__title{font-style:italic;font-weight:700;font-size:18px;letter-spacing:-.02em;margin:0}
.consent-map__text{font-size:13.5px;line-height:1.55;color:var(--bone-2);max-width:34ch;margin:0 0 6px}

/* ---- phones: a sheet along the bottom edge ---- */
@media (max-width:640px){
  .consent{
    left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));
    width:auto;max-height:calc(100vh - 24px);max-height:calc(100svh - 24px);
    padding:20px 18px 16px;
  }
  .consent__title{font-size:24px;margin-bottom:10px}
  .consent__text{font-size:13.5px}
}
@media (prefers-reduced-motion: reduce){
  .consent,.consent.is-out{transform:none}
}
