/* Privacy preferences center — banner/modal/pill styles. Externalized from
 * index.html (PR #1509): an in-body <style> this size forced a pre-paint
 * style recalc on every page and was a top mobile FCP/TBT cost. The consent
 * elements are display:none via a tiny inline rule in the shell until
 * consent.js opens them, so this file is never visibly late. */
:root {
  --aisc-ink: #0a2245;
  --aisc-ink-2: #475569;
  --aisc-ink-3: #94a3b8;
  --aisc-rule: rgba(10,34,69,0.08);
  --aisc-rule-strong: rgba(10,34,69,0.16);
  --aisc-accent: #4338ca;
  --aisc-accent-deep: #312e81;
  --aisc-accent-soft: rgba(67,56,202,0.08);
  --aisc-paper: #ffffff;
}
.aisc-overlay { position: fixed; inset: 0; background: rgba(10,34,69,0.48); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 9998; display: none; opacity: 0; transition: opacity 0.18s ease-out; }
.aisc-overlay.is-open { display: block; opacity: 1; }
@keyframes aisc-slide-up { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes aisc-fade-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); } to { opacity: 1; transform: translate(-50%, -50%); } }

/* Bottom-center banner — discreet but unmistakable */
.aisc-banner { position: fixed; left: 24px; right: 24px; bottom: 24px; max-width: 1100px; margin: 0 auto; background: var(--aisc-paper); border: 1px solid var(--aisc-rule); border-radius: 18px; box-shadow: 0 24px 64px -16px rgba(10,34,69,0.22), 0 4px 12px rgba(10,34,69,0.06); z-index: 9999; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; color: var(--aisc-ink); display: none; overflow: hidden; }
.aisc-banner.is-open { display: block; animation: aisc-slide-up 0.32s cubic-bezier(0.16, 1, 0.3, 1); }
.aisc-banner-inner { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; padding: 22px 28px; }
.aisc-banner-mark { display: flex; align-items: center; gap: 10px; font-family: ui-serif, Georgia, "Times New Roman", serif; font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--aisc-accent-deep); margin-bottom: 6px; }
.aisc-banner-mark::before { content: ""; width: 18px; height: 1.5px; background: var(--aisc-accent); border-radius: 99px; }
.aisc-banner-title { font-family: ui-serif, Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--aisc-ink); margin: 0 0 8px; letter-spacing: -0.01em; }
.aisc-banner-body { font-size: 13.5px; line-height: 1.6; color: var(--aisc-ink-2); margin: 0; max-width: 640px; }
.aisc-banner-body a { color: var(--aisc-accent); text-decoration: none; border-bottom: 1px solid rgba(67,56,202,0.25); transition: border-color 0.15s; }
.aisc-banner-body a:hover { border-bottom-color: var(--aisc-accent); }
.aisc-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.aisc-btn { padding: 11px 20px; font-size: 13px; font-weight: 600; border-radius: 10px; cursor: pointer; border: 1.5px solid transparent; font-family: inherit; letter-spacing: 0.005em; transition: all 0.15s ease-out; white-space: nowrap; }
.aisc-btn.primary { background: var(--aisc-accent); color: white; border-color: var(--aisc-accent); box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 4px 12px -2px rgba(67,56,202,0.32); }
.aisc-btn.primary:hover { background: var(--aisc-accent-deep); border-color: var(--aisc-accent-deep); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 18px -4px rgba(67,56,202,0.4); }
.aisc-btn.ghost { background: transparent; color: var(--aisc-ink); border-color: var(--aisc-rule-strong); }
.aisc-btn.ghost:hover { background: var(--aisc-accent-soft); border-color: var(--aisc-accent); color: var(--aisc-accent-deep); }
.aisc-btn.link { background: transparent; color: var(--aisc-ink-2); border-color: transparent; padding: 11px 12px; font-weight: 500; }
.aisc-btn.link:hover { color: var(--aisc-accent); }

/* Centered preferences modal */
.aisc-modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: calc(100% - 32px); max-width: 640px; max-height: calc(100vh - 64px); background: var(--aisc-paper); border-radius: 20px; box-shadow: 0 40px 80px -16px rgba(10,34,69,0.28), 0 8px 24px rgba(10,34,69,0.08); z-index: 9999; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; color: var(--aisc-ink); display: none; flex-direction: column; overflow: hidden; }
.aisc-modal.is-open { display: flex; animation: aisc-fade-in 0.28s cubic-bezier(0.16, 1, 0.3, 1); }
.aisc-modal-head { padding: 24px 28px 18px; border-bottom: 1px solid var(--aisc-rule); }
.aisc-modal-kicker { font-family: ui-serif, Georgia, "Times New Roman", serif; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--aisc-accent-deep); margin: 0 0 6px; }
.aisc-modal-title { font-family: ui-serif, Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 6px; color: var(--aisc-ink); }
.aisc-modal-sub { font-size: 13.5px; line-height: 1.6; color: var(--aisc-ink-2); margin: 0; }
.aisc-modal-body { padding: 8px 28px; overflow: auto; flex: 1; }
.aisc-modal-foot { padding: 16px 28px 20px; border-top: 1px solid var(--aisc-rule); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: linear-gradient(180deg, transparent 0%, rgba(67,56,202,0.02) 100%); }
.aisc-modal-foot-meta { font-size: 11px; color: var(--aisc-ink-3); font-variant-numeric: tabular-nums; }

/* Category rows with iOS-style toggles */
.aisc-cat { padding: 20px 0; border-top: 1px solid var(--aisc-rule); }
.aisc-cat:first-of-type { border-top: 0; }
.aisc-cat-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.aisc-cat-meta { display: flex; flex-direction: column; gap: 4px; }
.aisc-cat-name { font-size: 14px; font-weight: 700; color: var(--aisc-ink); display: flex; align-items: center; gap: 8px; }
.aisc-cat-name .aisc-pill { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--aisc-ink-3); background: var(--aisc-rule); padding: 2px 7px; border-radius: 99px; }
.aisc-cat-desc { font-size: 12.5px; line-height: 1.55; color: var(--aisc-ink-2); margin: 0; }
.aisc-cat-detail { margin-top: 12px; display: none; }
.aisc-cat-detail.is-open { display: block; }
.aisc-cat-toggle-text { font-size: 11.5px; font-weight: 600; color: var(--aisc-accent); background: transparent; border: 0; padding: 0; margin-top: 8px; cursor: pointer; font-family: inherit; letter-spacing: 0.01em; }
.aisc-cat-toggle-text:hover { color: var(--aisc-accent-deep); }
.aisc-cat-toggle-text::after { content: " ↓"; font-size: 10px; }
.aisc-cat-toggle-text.is-open::after { content: " ↑"; }

/* Vendor table */
.aisc-table { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-top: 6px; background: rgba(67,56,202,0.03); border-radius: 8px; overflow: hidden; }
.aisc-table thead th { padding: 8px 12px; text-align: left; font-weight: 700; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--aisc-ink-3); border-bottom: 1px solid var(--aisc-rule); }
.aisc-table tbody td { padding: 9px 12px; border-bottom: 1px solid var(--aisc-rule); color: var(--aisc-ink-2); vertical-align: top; line-height: 1.5; }
.aisc-table tbody tr:last-child td { border-bottom: 0; }
.aisc-table .aisc-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; color: var(--aisc-ink); }

/* iOS toggle */
.aisc-toggle { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; margin-top: 4px; }
.aisc-toggle input { opacity: 0; width: 0; height: 0; }
.aisc-toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--aisc-rule-strong); border-radius: 99px; transition: background 0.2s; }
.aisc-toggle-slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: white; border-radius: 50%; box-shadow: 0 2px 4px rgba(10,34,69,0.18); transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1); }
.aisc-toggle input:checked + .aisc-toggle-slider { background: var(--aisc-accent); }
.aisc-toggle input:checked + .aisc-toggle-slider::before { transform: translateX(18px); }
.aisc-toggle input:disabled + .aisc-toggle-slider { cursor: not-allowed; opacity: 0.55; }
.aisc-toggle input:focus-visible + .aisc-toggle-slider { box-shadow: 0 0 0 3px rgba(67,56,202,0.22); }

/* Floating "Privacy preferences" link — bottom-left after first choice */
.aisc-reopen { position: fixed; left: 18px; bottom: 18px; padding: 8px 16px; font-size: 11.5px; font-weight: 600; color: var(--aisc-ink); background: var(--aisc-paper); border: 1px solid var(--aisc-rule); border-radius: 99px; cursor: pointer; box-shadow: 0 4px 14px -2px rgba(10,34,69,0.12), 0 1px 3px rgba(10,34,69,0.06); display: none; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; z-index: 9997; transition: all 0.18s ease-out; letter-spacing: 0.005em; align-items: center; gap: 7px; }
.aisc-reopen.is-visible { display: inline-flex; }
.aisc-reopen:hover { transform: translateY(-1px); border-color: var(--aisc-accent); color: var(--aisc-accent-deep); box-shadow: 0 8px 22px -4px rgba(67,56,202,0.22), 0 1px 3px rgba(10,34,69,0.06); }
.aisc-reopen-dot { width: 6px; height: 6px; border-radius: 99px; background: #10b981; }

/* Responsive */
@media (max-width: 820px) {
  .aisc-banner { left: 12px; right: 12px; bottom: 12px; border-radius: 14px; }
  .aisc-banner-inner { grid-template-columns: 1fr; gap: 16px; padding: 18px 20px; }
  .aisc-banner-title { font-size: 19px; }
  .aisc-actions { width: 100%; }
  .aisc-actions .aisc-btn { flex: 1 1 auto; text-align: center; }
  .aisc-modal { border-radius: 16px; }
  .aisc-modal-head, .aisc-modal-foot { padding-left: 22px; padding-right: 22px; }
  .aisc-modal-body { padding-left: 22px; padding-right: 22px; }
  .aisc-modal-title { font-size: 20px; }
}
