
  .sg-cookie {
    position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(8px);
    width: min(640px, calc(100vw - 32px));
    background: var(--paper); border: 1px solid var(--line-strong);
    border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(28, 24, 16, 0.45);
    padding: 22px 24px; z-index: 9000;
    font-family: var(--sans);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
  }
  .sg-cookie.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
  .sg-cookie h3 { font-family: var(--display); font-weight: 400; font-size: 19px; color: var(--ink); margin: 0 0 6px; letter-spacing: -0.01em; }
  .sg-cookie p { font-size: 13.5px; line-height: 1.6; color: var(--muted); margin: 0; }
  .sg-cookie p a { color: var(--cedar); text-decoration: underline; text-underline-offset: 2px; }
  .sg-cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
  .sg-cookie-btn {
    font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer;
    padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line-strong);
    background: transparent; color: var(--ink); transition: all 0.2s ease;
  }
  .sg-cookie-btn:hover { border-color: var(--ink); }
  .sg-cookie-btn.primary { background: var(--ink); color: var(--cream); border-color: var(--ink); }
  .sg-cookie-btn.primary:hover { background: var(--cedar-deep); border-color: var(--cedar-deep); }
  .sg-cookie-btn.link { border: none; padding: 11px 6px; color: var(--cedar); text-decoration: underline; text-underline-offset: 2px; margin-left: auto; }
  .sg-cookie-btn.link:hover { color: var(--cedar-deep); }
  /* preferences panel */
  .sg-cookie-prefs { display: none; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
  .sg-cookie.show-prefs .sg-cookie-prefs { display: block; }
  .sg-cookie.show-prefs .sg-cookie-btn.link { display: none; }
  .sg-pref-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .sg-pref-row:last-child { border-bottom: none; }
  .sg-pref-text b { display: block; font-size: 13.5px; color: var(--ink); font-weight: 600; margin-bottom: 3px; }
  .sg-pref-text small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
  .sg-pref-locked { font-size: 12px; font-weight: 600; color: var(--sage); white-space: nowrap; padding-top: 2px; }
  /* toggle */
  .sg-toggle { position: relative; width: 42px; height: 24px; flex-shrink: 0; margin-top: 1px; }
  .sg-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
  .sg-toggle span { position: absolute; inset: 0; background: var(--cream-2); border: 1px solid var(--line-strong); border-radius: 999px; transition: background 0.2s ease; }
  .sg-toggle span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 3px rgba(28,24,16,0.3); transition: transform 0.2s ease; }
  .sg-toggle input:checked + span { background: var(--sage); border-color: var(--sage); }
  .sg-toggle input:checked + span::after { transform: translateX(18px); }
  .sg-toggle input:focus-visible + span { outline: 2px solid var(--cedar); outline-offset: 2px; }
  @media (max-width: 520px) {
    .sg-cookie { bottom: 12px; padding: 20px; }
    .sg-cookie-actions { gap: 8px; }
    .sg-cookie-btn { flex: 1 1 auto; text-align: center; }
    .sg-cookie-btn.link { flex-basis: 100%; margin-left: 0; text-align: center; }
  }
  @media (prefers-reduced-motion: reduce) {
    .sg-cookie { transition: opacity 0.2s ease, visibility 0.2s; transform: translateX(-50%); }
    .sg-cookie.is-open { transform: translateX(-50%); }
  }

  /* cookie notice: big "Got it" that fills the row, "What we store" as a matching outline button */
  .sg-cookie .sg-cookie-actions { display: flex; flex-wrap: nowrap; gap: 10px; align-items: stretch; margin-top: 18px; }
  .sg-cookie #sgCookieAccept { flex: 1 1 auto; padding: 15px 24px; font-size: 15px; font-weight: 700; letter-spacing: .01em; }
  .sg-cookie #sgCookieManage { flex: 0 0 auto; margin-left: 0; padding: 15px 22px; font-size: 14px; border: 1.5px solid rgba(28,24,16,.42) !important; border-radius: 999px !important; background: transparent; text-decoration: none; color: var(--ink); -webkit-appearance: none; appearance: none; }
  .sg-cookie #sgCookieManage:hover { border-color: var(--ink); color: var(--ink); }
  .sg-cookie.show-prefs #sgCookieManage { display: none; }
  @media (max-width: 1024px) {
    .sg-cookie .sg-cookie-actions { flex-wrap: wrap; }
    .sg-cookie #sgCookieAccept, .sg-cookie #sgCookieManage { flex: 1 1 100%; text-align: center; }
  }
