/* ==========================================================================
   Information / Policy pages
   Desktop: Figma 217:326 — content 1016, title 36 Bold, section H2 28 Medium,
            body 18/150% Medium, section gap 32, title→body gap 16
   Tablet:  pad 40 · Mobile: pad 20
   ========================================================================== */

.policy-page {
  max-width: 1016px;
  margin-inline: auto;
  padding: 64px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  box-sizing: border-box;
}

.policy-page .breadcrumbs {
  margin: 0;
}

/* ----- Page title ----- */
.policy-page__title {
  margin: 0;
  font-family: var(--font-main);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

/* ----- CMS / WYSIWYG content ----- */
.policy-content--cms {
  display: block;
  width: 100%;
  color: var(--text);
  font-family: var(--font-main);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
}

/* Kill legacy glow / shadows / hard-coded Docs colors (dark + light themes) */
.policy-content--cms,
.policy-content--cms * {
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  -webkit-filter: none !important;
  color: inherit !important;
  background: transparent !important;
  background-color: transparent !important;
  font-family: inherit !important;
}
.policy-content--cms {
  color: var(--text) !important;
}
.policy-content--cms a {
  color: var(--text) !important;
}

.policy-content--cms > *:first-child { margin-top: 0; }
.policy-content--cms > *:last-child { margin-bottom: 0; }

/* Headings */
.policy-content--cms h1 {
  margin: 32px 0 16px;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}
.policy-content--cms h2 {
  margin: 32px 0 20px !important;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--text);
}
/* Heading → table: keep title→table gap via h2 margin-bottom */
.policy-content--cms h2 + .table-wrap,
.policy-content--cms h2 + div:has(> .table-wrap),
.policy-content--cms h3 + .table-wrap,
.policy-content--cms h3 + div:has(> .table-wrap) {
  margin-top: 0;
}
/* Fallback if a title stays as <p> before a table */
.policy-content--cms p:has(+ div .table-wrap),
.policy-content--cms p:has(+ .table-wrap) {
  margin: 32px 0 20px !important;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--text);
}
.policy-content--cms h3 {
  margin: 28px 0 14px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--text);
}
.policy-content--cms h4 {
  margin: 24px 0 12px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
}
.policy-content--cms h5 {
  margin: 20px 0 10px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
.policy-content--cms h1:first-child,
.policy-content--cms h2:first-child,
.policy-content--cms h3:first-child,
.policy-content--cms h4:first-child,
.policy-content--cms h5:first-child {
  margin-top: 0;
}

/* Paragraphs */
.policy-content--cms p {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
}

/* Inline emphasis */
.policy-content--cms strong,
.policy-content--cms b {
  font-weight: 700;
  color: var(--text);
}
.policy-content--cms em,
.policy-content--cms i {
  font-style: italic;
}
.policy-content--cms u {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.policy-content--cms s,
.policy-content--cms strike,
.policy-content--cms del {
  text-decoration: line-through;
}
.policy-content--cms mark {
  background: rgba(143, 23, 67, 0.25) !important;
  color: var(--text) !important;
  padding: 0 0.15em;
  border-radius: 2px;
}
.policy-content--cms small {
  font-size: 0.875em;
}
.policy-content--cms sub,
.policy-content--cms sup {
  font-size: 0.75em;
  line-height: 0;
}

/* Links */
.policy-content--cms a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity var(--tr);
}
.policy-content--cms a:hover {
  opacity: 0.7;
}

/* Lists — bullets flush with body text left edge */
.policy-content--cms ul,
.policy-content--cms ol {
  margin: 8px 0 24px;
  padding: 0 !important;
  padding-inline-start: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.policy-content--cms ul {
  list-style: none !important;
}
.policy-content--cms ol {
  list-style: none !important;
  counter-reset: policy-ol;
}
.policy-content--cms ul ul,
.policy-content--cms ol ul {
  margin: 10px 0 0;
  padding-left: 1.15em !important;
  padding-inline-start: 1.15em !important;
  gap: 10px;
}
.policy-content--cms li {
  position: relative;
  margin: 0;
  padding-left: 1.15em;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  list-style: none !important;
}
.policy-content--cms ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}
.policy-content--cms ul ul > li::before {
  width: 5px;
  height: 5px;
  top: 0.6em;
  background: transparent;
  border: 1.5px solid var(--text-muted);
  box-sizing: border-box;
}
.policy-content--cms ol > li {
  counter-increment: policy-ol;
  padding-left: 1.4em;
}
.policy-content--cms ol > li::before {
  content: counter(policy-ol) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}
.policy-content--cms li > ul,
.policy-content--cms li > ol {
  margin-top: 10px;
  margin-bottom: 0;
}
.policy-content--cms li > p {
  margin: 0;
}

/* Blockquote */
.policy-content--cms blockquote {
  margin: 0 0 16px;
  padding: 12px 0 12px 20px;
  border-left: 3px solid var(--stroke);
  color: var(--text-muted);
  font-style: italic;
}
.policy-content--cms blockquote p:last-child {
  margin-bottom: 0;
}

/* Pre / code */
.policy-content--cms pre {
  margin: 0 0 16px;
  padding: 16px;
  overflow-x: auto;
  background: var(--bg-2);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.policy-content--cms code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-2);
  border: 1px solid var(--stroke);
  border-radius: 6px;
  padding: 0.1em 0.35em;
}
.policy-content--cms pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

/* Horizontal rule */
.policy-content--cms hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--stroke);
}

/* Images / figures */
.policy-content--cms img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 16px;
  border-radius: 12px;
}
.policy-content--cms figure {
  margin: 0 0 24px;
}
.policy-content--cms figure img {
  margin-bottom: 12px;
}
.policy-content--cms figcaption {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-muted);
}
.policy-content--cms p img {
  display: inline-block;
  margin: 0;
  vertical-align: middle;
}

/* Tables — stroke + radius on wrapper (border-collapse clips corners on <table>) */
.policy-content--cms .table-wrap,
.policy-content--cms .table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 24px;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--stroke);
  border-radius: 6px;
  background: transparent !important;
  box-sizing: border-box;
}
.policy-content--cms table {
  width: 100% !important;
  max-width: 100%;
  margin: 0 0 24px;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  border: none !important;
  border-radius: 0;
  table-layout: auto !important;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
}
.policy-content--cms .table-wrap table,
.policy-content--cms .table-responsive table {
  margin-bottom: 0;
}
/* Bare tables (no wrap yet): own rounded frame via separate borders */
.policy-content--cms > table,
.policy-content--cms div > table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid var(--stroke) !important;
  border-radius: 6px;
  overflow: hidden;
}
.policy-content--cms th,
.policy-content--cms td {
  padding: 18px 22px !important;
  border: none !important;
  border-right: 1px solid var(--stroke) !important;
  border-bottom: 1px solid var(--stroke) !important;
  text-align: left;
  vertical-align: middle;
  overflow: visible !important;
  color: var(--text) !important;
}
.policy-content--cms th p,
.policy-content--cms td p {
  margin: 0;
}
.policy-content--cms th:last-child,
.policy-content--cms td:last-child {
  border-right: none !important;
}
.policy-content--cms tr:last-child th,
.policy-content--cms tr:last-child td {
  border-bottom: none !important;
}
.policy-content--cms th {
  background: var(--bg-2) !important;
  font-weight: 700;
}
.policy-content--cms tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02) !important;
}
[data-theme="light"] .policy-content--cms tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.02) !important;
}

/* iframe / video embeds */
.policy-content--cms iframe,
.policy-content--cms video {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 0 0 16px;
  border: 0;
  border-radius: 12px;
}

/* Summernote / CKEditor helpers */
.policy-content--cms .text-left { text-align: left; }
.policy-content--cms .text-center { text-align: center; }
.policy-content--cms .text-right { text-align: right; }
.policy-content--cms .text-justify { text-align: justify; }

/* ---------- TABLET ---------- */
@media (max-width: 1199px) {
  .policy-page {
    max-width: none;
    width: 100%;
    padding: 48px var(--container-px, 40px);
    gap: 28px;
  }

  .policy-page__title { font-size: 26px; }
  .policy-content--cms { font-size: 18px; }
  .policy-content--cms h1 { font-size: 26px; }
  .policy-content--cms h2 { font-size: 22px; }
  .policy-content--cms h3 { font-size: 20px; }
  .policy-content--cms h4 { font-size: 18px; }
  .policy-content--cms p,
  .policy-content--cms li { font-size: 18px; }
}

/* ---------- MOBILE ---------- */
@media (max-width: 767px) {
  .policy-page {
    padding: 40px var(--container-px, 20px) 48px;
    gap: 24px;
  }

  .policy-page__title { font-size: 24px; }
  .policy-content--cms { font-size: 16px; }
  .policy-content--cms h1 { font-size: 24px; margin: 24px 0 12px; }
  .policy-content--cms h2 { font-size: 20px; margin: 24px 0 12px; }
  .policy-content--cms h3 { font-size: 18px; }
  .policy-content--cms h4,
  .policy-content--cms h5 { font-size: 16px; }
  .policy-content--cms p,
  .policy-content--cms li { font-size: 16px; }
  .policy-content--cms th,
  .policy-content--cms td { padding: 14px 16px !important; font-size: 14px; }
  .policy-content--cms ul,
  .policy-content--cms ol { gap: 8px; }
}
