/* Polara consent banner (S4). The values repeat site/styles/polara-tokens.css,
   because the homepage presentation does not load that file. */
.pc-banner {
  --pc-surface: #FAF9F5;
  --pc-ink: #171C19;
  --pc-ink-muted: #4F6158;
  --pc-rule: rgba(23, 28, 25, .22);
  --pc-button: #10251D;
  --pc-button-hover: #080C0B;
  --pc-on-button: #FFFFFF;
  --pc-accent-ink: #086A52;
  --pc-focus: 2px solid #086A52;
  position: fixed;
  /* Bottom left: the chat launcher sits bottom right. */
  left: 24px;
  bottom: 24px;
  z-index: 2147483000;
  box-sizing: border-box;
  width: min(440px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 18px 20px 16px;
  background: var(--pc-surface);
  color: var(--pc-ink);
  border: 1px solid var(--pc-rule);
  border-radius: 0;
  box-shadow: 0 18px 48px rgba(13, 20, 17, .18);
  font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  letter-spacing: normal;
}
.pc-banner[hidden] { display: none; }
.pc-banner *, .pc-banner *::before, .pc-banner *::after { box-sizing: border-box; }
.pc-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 6px; }
.pc-title {
  margin: 0;
  flex: 1 1 auto;
  font: 600 15px/1.3 'Geist', system-ui, sans-serif;
  letter-spacing: -0.01em;
  color: var(--pc-ink);
  text-transform: none;
}
.pc-title:focus { outline: none; }
.pc-title:focus-visible { outline: var(--pc-focus); outline-offset: 2px; }
.pc-message { margin: 0 0 12px; color: var(--pc-ink); font-size: 13.5px; }
.pc-banner a { color: var(--pc-accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.pc-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 4px 0;
  margin: 0;
  font: 500 13px/1.3 'Geist', system-ui, sans-serif;
  color: var(--pc-accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  white-space: nowrap;
}
.pc-close {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: -6px -8px 0 0;
  padding: 0;
  background: none;
  border: 0;
  color: var(--pc-ink);
  cursor: pointer;
}
.pc-close[hidden] { display: none; }
.pc-actions { display: flex; gap: 8px; }
/* Accept and Reject: the same size, weight and colours (equal prominence). */
.pc-btn {
  appearance: none;
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 10px 14px;
  margin: 0;
  background: var(--pc-button);
  color: var(--pc-on-button);
  border: 1px solid var(--pc-button);
  border-radius: 0;
  font: 600 14px/1.2 'Geist', system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
.pc-btn:hover { background: var(--pc-button-hover); border-color: var(--pc-button-hover); }
.pc-banner button:focus-visible, .pc-banner a:focus-visible, .pc-banner input:focus-visible { outline: var(--pc-focus); outline-offset: 2px; }
.pc-save-row { display: flex; justify-content: flex-end; }
.pc-save-row .pc-save { margin-top: 8px; }
.pc-save[hidden] { display: none; }
.pc-cats { margin: 0 0 12px; border-top: 1px solid var(--pc-rule); }
.pc-cats[hidden] { display: none; }
.pc-cat { padding: 10px 0; border-bottom: 1px solid var(--pc-rule); }
.pc-cat-head { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.pc-cat-head input { width: 18px; height: 18px; margin: 0; accent-color: var(--pc-accent-ink); flex: none; }
.pc-cat-name { flex: 1 1 auto; }
.pc-always { font: 500 11px/1.2 'Geist Mono', ui-monospace, monospace; text-transform: uppercase; letter-spacing: .04em; color: var(--pc-ink-muted); }
.pc-cat-desc { margin: 4px 0 0 28px; font-size: 12.5px; color: var(--pc-ink-muted); }
/* Footer control and the floating fallback on pages without a footer. */
.pc-reopen {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  min-height: 24px;
  font: inherit;
  line-height: 24px;
  vertical-align: baseline;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.pc-reopen-float {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 2147482000;
  padding: 6px 10px;
  background: #FAF9F5;
  color: #171C19;
  border: 1px solid rgba(23, 28, 25, .22);
  font: 500 12px/1.2 'Geist', system-ui, sans-serif;
  text-decoration: none;
}
.pc-visible .pc-reopen-float { display: none; }
@media (max-width: 600px) {
  .pc-banner {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 75vh;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-width: 1px 0 0;
    box-shadow: 0 -8px 28px rgba(13, 20, 17, .16);
  }
  .pc-head { margin-bottom: 4px; }
  .pc-title { font-size: 14px; }
  .pc-message { font-size: 13px; line-height: 1.4; margin-bottom: 10px; }
}
/* Short phone screens: keep the closed banner near a quarter of the height. */
@media (max-width: 600px) and (max-height: 700px) {
  .pc-banner { padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .pc-banner:not(.pc-open) .pc-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pc-head { justify-content: flex-end; margin-bottom: 0; }
  .pc-head .pc-link { padding: 2px 0; }
  .pc-message { font-size: 12px; line-height: 1.35; margin-bottom: 8px; }
  .pc-btn { min-height: 40px; padding: 8px 12px; }
}
/* Homepage only: the hero H1 and CTAs sit bottom left on desktop and at the
   bottom on phones, so the banner moves to the other side of the screen. */
@media (min-width: 601px) {
  .pc-home .pc-banner { left: auto; right: 24px; }
}
/* v24 (22/10): on phones the homepage uses the same bottom sheet as every other page (Luca: the
   banner under the header looked out of place). Rounded top corners and pill buttons, as on the site. */
@media (max-width: 600px) {
  .pc-banner { border-radius: 18px 18px 0 0; padding-top: 16px; max-height: 70svh; }
  .pc-btn { border-radius: 999px; }
}
/* v26 (24/10): larger tap areas without changing the banner's size */
.pc-link, .pc-close, .pc-reopen { position: relative; }
.pc-link::after, .pc-reopen::after { content: ""; position: absolute; inset: -12px -6px; }
.pc-close::after { content: ""; position: absolute; inset: -6px; }
/* phone landscape: the banner took half the height */
@media (max-height: 500px) and (min-width: 601px) {
  .pc-banner { bottom: 12px; padding: 10px 16px; max-height: calc(100vh - 24px); }
  .pc-banner:not(.pc-open) .pc-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pc-head { justify-content: flex-end; margin-bottom: 0; }
  .pc-message { font-size: 12.5px; line-height: 1.35; margin-bottom: 8px; }
}
@media print { .pc-banner, .pc-reopen-float { display: none !important; } }
