/* Privacy Policy page content styles — Scoped strictly to #policy */
:root {
  --page: #f2f4f5;
  --surface: #ffffff;
  --surface-soft: #f6faf9;
  --green-soft: #e8f8ee;
  --navy: #0a314d;
  --heading: #125074;
  --text: #274b5f;
  --muted: #587181;
  --line: rgba(10, 49, 77, .13);
  --green: #3fbe70;
  --green-deep: #269b58;
  --hero-gray: #e7eaec;
  --shadow: 0 24px 70px rgba(7, 39, 60, .10);
  --focus: #ffd36a;
}

#policy {
  background: var(--page);
  color: var(--text);
  font-family: "Poppins", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

#policy * {
  box-sizing: border-box;
}

#policy a {
  color: inherit;
}

#policy button {
  font: inherit;
  cursor: pointer;
}

#policy :focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Hero Section */
#policy .hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-gray);
  border-bottom: 1px solid var(--line);
}
#policy .hero::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -210px;
  bottom: -235px;
  border: 54px solid rgba(10, 49, 77, .055);
  border-radius: 50%;
}
#policy .hero__inner {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), 1180px);
  margin-inline: auto;
  padding-block: 78px 84px;
}
#policy .eyebrow {
  margin: 0 0 14px;
  color: var(--green-deep);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
#policy .hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.55rem, 7vw, 5.25rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .98;
}
#policy .hero p:last-child {
  max-width: 690px;
  margin: 24px 0 0;
  color: var(--text);
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.75;
}

/* Page Layout */
#policy .page-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  width: min(calc(100% - 40px), 1180px);
  margin-inline: auto;
  padding-block: 48px 88px;
}

/* Desktop Sidebar Index */
#policy .policy-index {
  position: sticky;
  top: 130px;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 35px rgba(7, 39, 60, .06);
}
#policy .policy-index h2 {
  margin: 0 0 14px;
  color: var(--heading);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
#policy .policy-index ol {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: section;
}
#policy .policy-index li {
  counter-increment: section;
}
#policy .policy-index a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding: 7px 8px;
  border-radius: 9px;
  color: var(--muted);
  font-size: .77rem;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
  transition: all .15s ease;
}
#policy .policy-index a::before {
  content: counter(section, decimal-leading-zero);
  color: var(--green-deep);
  font-size: .65rem;
  font-weight: 800;
}
#policy .policy-index a:hover {
  color: var(--heading);
  background: var(--green-soft);
}

/* Mobile Accordion Index */
#policy .mobile-index {
  display: none;
}

/* Policy Content Paper */
#policy .policy-paper {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
#policy .paper-accent {
  height: 5px;
  background: linear-gradient(90deg, var(--green), #19809a);
}
#policy .policy-content {
  padding: 52px clamp(28px, 6vw, 68px) 60px;
}

/* Intro Note */
#policy .intro-note {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 12px;
  padding: 20px 22px;
  background: var(--green-soft);
  border-radius: 14px;
}
#policy .intro-note svg {
  width: 27px;
  height: 27px;
  margin-top: 2px;
  color: var(--green-deep);
}
#policy .intro-note p {
  margin: 0;
  font-size: .91rem;
  line-height: 1.65;
}

/* Policy Sections */
#policy .policy-section {
  scroll-margin-top: 140px;
  padding-block: 40px;
  border-bottom: 1px solid var(--line);
}
#policy .policy-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
#policy .section-title {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 0 0 22px;
  color: var(--heading);
  font-size: clamp(1.35rem, 3vw, 1.82rem);
  line-height: 1.25;
  letter-spacing: -.025em;
}
#policy .section-title .number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: .75rem;
  font-weight: 800;
}
#policy .policy-section p {
  margin: 0 0 16px;
}
#policy .policy-section p:last-child {
  margin-bottom: 0;
}
#policy .policy-section ul {
  display: grid;
  gap: 11px;
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
}
#policy .policy-section li {
  position: relative;
  padding-left: 26px;
}
#policy .policy-section li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .77em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(63, 190, 112, .18);
}

/* Contact Card */
#policy .contact-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
  margin-top: 22px;
  padding: 24px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
}
#policy .contact-item {
  min-width: 0;
}
#policy .contact-item span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
#policy .contact-item strong,
#policy .contact-item a {
  color: var(--heading);
  font-size: .88rem;
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
#policy .contact-item--wide {
  grid-column: 1 / -1;
}

/* Lawful Bases Table */
#policy .lawful-table {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
#policy .table-row {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
}
#policy .table-row + .table-row {
  border-top: 1px solid var(--line);
}
#policy .table-row > div {
  min-width: 0;
  padding: 17px 19px;
  font-size: .83rem;
  line-height: 1.6;
}
#policy .table-row > div + div {
  border-left: 1px solid var(--line);
}
#policy .table-head {
  background: #0f4565;
  color: #fff;
  font-weight: 700;
}
#policy .table-body:nth-child(odd) {
  background: var(--surface-soft);
}

/* Callout */
#policy .callout {
  margin: 22px 0;
  padding: 20px 22px;
  background: var(--surface-soft);
  border-radius: 13px;
}
#policy .callout strong {
  color: var(--heading);
}
#policy .inline-action {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--green-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Responsive Media Queries */
@media (max-width: 920px) {
  #policy .page-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  #policy .policy-index {
    display: none;
  }
  #policy .mobile-index {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
  }
  #policy .mobile-index summary {
    padding: 15px 18px;
    color: var(--heading);
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
  }
  #policy .mobile-index ol {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0 18px 18px 42px;
  }
  #policy .mobile-index:not([open]) ol {
    display: none;
  }
  #policy .mobile-index a {
    display: block;
    padding: 5px 0;
    color: var(--text);
    font-size: .79rem;
    text-decoration: none;
  }
}

@media (max-width: 680px) {
  #policy .hero__inner,
  #policy .page-layout {
    width: min(calc(100% - 28px), 1180px);
  }
  #policy .hero__inner {
    padding-block: 58px 62px;
  }
  #policy .hero h1 {
    font-size: clamp(2.6rem, 14vw, 4.1rem);
  }
  #policy .page-layout {
    padding-block: 28px 58px;
  }
  #policy .policy-paper {
    border-radius: 18px;
  }
  #policy .policy-content {
    padding: 28px 20px 38px;
  }
  #policy .intro-note {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  #policy .policy-section {
    padding-block: 32px;
    scroll-margin-top: 100px;
  }
  #policy .section-title {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
    font-size: 1.28rem;
  }
  #policy .section-title .number {
    width: 36px;
    height: 36px;
  }
  #policy .policy-section p,
  #policy .policy-section li {
    font-size: .91rem;
  }
  #policy .contact-card {
    grid-template-columns: 1fr;
    padding: 19px;
  }
  #policy .contact-item--wide {
    grid-column: auto;
  }
  #policy .lawful-table {
    border: 0;
    overflow: visible;
  }
  #policy .table-head {
    display: none;
  }
  #policy .table-row.table-body {
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-soft);
  }
  #policy .table-row > div {
    padding: 13px 15px;
  }
  #policy .table-row > div::before {
    display: block;
    margin-bottom: 4px;
    color: var(--green-deep);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    content: attr(data-label);
  }
  #policy .table-row > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}


/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  font-family: sans-serif;
  font-size: 14px;
}

.cookie-banner p {
  margin: 0;
  line-height: 1.5;
}

.cookie-banner a {
  color: #f39c12;
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-buttons button {
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  border: none;
  font-family: inherit;
  font-size: 13px;
  transition: opacity 0.2s ease;
}

.cookie-buttons button:hover {
  opacity: 0.9;
}

.btn-accept {
  background-color: #27ae60;
  color: white;
}

.btn-reject {
  background-color: #555;
  color: white;
}

@media (max-width: 680px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    gap: 14px;
    padding: 14px 18px;
  }
  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }
}


/* Cookie Settings Modal */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 31, 50, 0.65);
  backdrop-filter: blur(6px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: cookieFadeIn 0.2s ease-out;
}

@keyframes cookieFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cookie-modal {
  background: #ffffff;
  color: #125074;
  border-radius: 16px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  font-family: inherit;
  animation: cookieSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cookieSlideUp {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.cookie-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(10, 49, 77, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafb;
}

.cookie-modal-header h3 {
  margin: 0;
  color: #0a314d;
  font-size: 1.25rem;
  font-weight: 700;
}

.cookie-modal-close {
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #587181;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.cookie-modal-close:hover {
  background: #eef2f5;
  color: #0a314d;
}

.cookie-modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: #274b5f;
}

.cookie-modal-desc {
  margin: 0 0 18px;
  color: #587181;
  font-size: 13.5px;
}

.cookie-pref-item {
  padding: 14px 16px;
  background: #f6faf9;
  border: 1px solid rgba(10, 49, 77, 0.1);
  border-radius: 12px;
  margin-bottom: 12px;
}

.cookie-pref-item:last-child {
  margin-bottom: 0;
}

.cookie-pref-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.cookie-pref-header strong {
  color: #0a314d;
  font-size: 14.5px;
}

.cookie-badge {
  display: inline-block;
  margin-left: 8px;
  background: #e8f8ee;
  color: #269b58;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cookie-pref-item p {
  margin: 0;
  font-size: 12.5px;
  color: #587181;
  line-height: 1.5;
}

/* Custom Toggle Switch */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.25s;
  border-radius: 24px;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.cookie-switch input:checked + .cookie-slider {
  background-color: #27ae60;
}

.cookie-switch input:checked + .cookie-slider:before {
  transform: translateX(20px);
}

.cookie-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(10, 49, 77, 0.12);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafb;
}

.cookie-btn {
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  font-family: inherit;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.cookie-btn-save {
  background: #ffffff;
  color: #0a314d;
  border-color: rgba(10, 49, 77, 0.2);
}

.cookie-btn-save:hover {
  background: #f0f4f7;
  border-color: rgba(10, 49, 77, 0.35);
}

.cookie-btn-accept {
  background: #27ae60;
  color: #ffffff;
}

.cookie-btn-accept:hover {
  background: #219653;
}

@media (max-width: 600px) {
  .cookie-modal-footer {
    flex-direction: column;
  }
  .cookie-btn {
    width: 100%;
    text-align: center;
  }
}
