/* ═══════════════════════════════════════════════════════════════
   policy.css — MireonSpero™ Policy Codex
   All .po- namespaced. No collision with global.css, home.css,
   support.css, first-impressions.css, or library.css.
   Relies on global.css for :root tokens and base resets.
   Mirrors library.css architecture exactly.
═══════════════════════════════════════════════════════════════ */


/* ── GLOBAL BACKGROUND ───────────────────────────────────── */

.policy-bg {
  background-image: url('../assets/support/policy/policy-background.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  color: var(--ms-navy);
}


/* ── SHARED UTILITIES ────────────────────────────────────── */

.po-section-meta {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ms-gray);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 1.5rem;
}

.po-link-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ms-teal);
  text-decoration: none;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: opacity 0.15s;
}
.po-link-text::after { content: '→'; }
.po-link-text--back::after { content: ''; }
.po-link-text--back::before { content: '← '; }
.po-link-text:hover { opacity: 0.72; }


/* ── POLICY MASTHEAD ─────────────────────────────────────── */

.po-masthead {
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-bottom: 1px solid var(--ms-rule);
}

.po-masthead-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.po-masthead-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ms-navy);
  font-weight: 600;
}

.po-masthead-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 400;
  color: var(--ms-navy);
  line-height: 1.1;
  margin: 0;
  letter-spacing: 0.01em;
}

.po-masthead-body {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: #2d3748;
  line-height: 1.78;
  max-width: 560px;
  margin: 0;
}


/* ── STICKY QUICK-ACCESS NAV ─────────────────────────────── */

.po-quick-access {
  position: sticky;
  top: var(--site-header-height, 0px);
  z-index: 900;
  background: rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-bottom: 1px solid var(--ms-rule);
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.po-quick-access-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
}
.po-quick-access-inner::-webkit-scrollbar { display: none; }

.po-qnav-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.70rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ms-gray);
  text-decoration: none;
  padding: 0.85rem 1.25rem;
  white-space: nowrap;
  display: inline-block;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  position: relative;
  bottom: -1px;
}
.po-qnav-link:hover {
  color: var(--ms-navy);
  border-bottom-color: var(--ms-gold);
}

.po-qnav-sep {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--ms-rule);
  flex-shrink: 0;
}


/* ── ARTICLE INDEX ───────────────────────────────────────── */

.po-index-wrap {
  background: rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  padding: 4rem 2rem;
  max-width: 100%;
  margin: 0;
}

.po-index-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.po-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ms-rule);
}

.po-section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 400;
  color: var(--ms-navy);
  line-height: 1.2;
}

.po-index-intro {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  color: #2d3748;
  line-height: 1.78;
  max-width: 820px;
  margin: 0 0 2.5rem;
}

.po-index-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--ms-rule);
}

.po-index-tile {
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  border: none;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.75rem 1.5rem;
  gap: 0.5rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease;
}
.po-index-tile:hover {
  background: rgba(248, 246, 241, 0.55);
}

.po-index-tile--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
}
.po-index-tile--wide .po-index-tile-desc {
  flex: 1;
}

.po-index-tile-dot-wrap {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(233, 196, 106, 0.50);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.po-index-tile-dot {
  width: 5px;
  height: 5px;
  background: var(--ms-gold);
  border-radius: 50%;
}

.po-index-tile-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.80rem;
  font-weight: 400;
  color: rgba(29, 53, 87, 0.35);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  line-height: 1;
  margin-top: 0.1rem;
}

.po-index-tile-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ms-navy);
  line-height: 1.2;
}

.po-index-tile-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: #2d3748;
  line-height: 1.65;
  margin: 0;
}

.po-index-tile-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ms-teal);
  margin-top: 0.25rem;
  display: inline-block;
  transition: opacity 0.15s;
}
.po-index-tile:hover .po-index-tile-link { opacity: 0.72; }


/* ── SECTION WRAPPERS ────────────────────────────────────── */

.po-section-wrap {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.po-section-wrap--cream {
  background: rgba(248, 246, 241, 0.32);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.po-section-wrap--white {
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.po-section-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  border-top: 1px solid var(--ms-rule);
}

/* Full-width inner for Article X */
.po-section-inner--full {
  grid-template-columns: 1fr;
  padding: 4rem 2rem;
}


/* ── SECTION LABEL COLUMN ────────────────────────────────── */

.po-section-label-col {
  padding: 4rem 2rem;
  border-right: 1px solid var(--ms-rule);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.4rem;
  padding-top: 4.5rem;
}

.po-ghost-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 3.5rem;
  font-weight: 300;
  color: rgba(29, 53, 87, 0.08);
  line-height: 1;
}

.po-ghost-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.60rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ms-gray);
  font-weight: 400;
}


/* ── SECTION CONTENT COLUMN ──────────────────────────────── */

.po-section-content-col {
  padding: 4rem 2.5rem 4rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.po-content-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.po-content-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 400;
  color: var(--ms-navy);
  line-height: 1.25;
  margin: 0;
}

.po-content-subline {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.90rem;
  color: var(--ms-gray);
  margin: 0;
  font-style: italic;
  line-height: 1.6;
}

.po-section-footer {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ms-rule);
  flex-wrap: wrap;
}


/* ── ACCORDION ───────────────────────────────────────────── */

.po-accordion {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.po-accordion-item {
  border-bottom: 1px solid var(--ms-rule);
}

.po-accordion-item:first-child {
  border-top: 1px solid var(--ms-rule);
}

.po-accordion-summary {
  list-style: none;
  cursor: pointer;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ms-navy);
  padding: 1.1rem 0;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  outline: none;
  transition: color 0.15s;
  user-select: none;
}
.po-accordion-summary::-webkit-details-marker { display: none; }
.po-accordion-summary::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--ms-gold);
  border-bottom: 1.5px solid var(--ms-gold);
  transform: rotate(-45deg);
  flex-shrink: 0;
  margin-top: 1px;
  transition: transform 0.18s ease;
}
.po-accordion-item[open] .po-accordion-summary::before {
  transform: rotate(45deg);
}
.po-accordion-summary:hover { color: var(--ms-teal); }
.po-accordion-item:focus-within .po-accordion-summary {
  outline: 2px dashed var(--ms-gold);
  outline-offset: 2px;
}

.po-accordion-body {
  padding: 0 0 1.5rem 1.5rem;
}

.po-accordion-body p {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  color: #2d3748;
  line-height: 1.78;
  margin: 0 0 0.85rem;
}
.po-accordion-body p:last-child { margin-bottom: 0; }

.po-accordion-body strong {
  color: var(--ms-navy);
  font-weight: 500;
}

.po-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.po-list li {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  color: #2d3748;
  line-height: 1.65;
  padding-left: 1.1rem;
  position: relative;
}

.po-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--ms-gold);
  font-weight: 700;
  font-size: 1rem;
}


/* ── ARTICLE X — PRIVACY, TERMS AND COOKIES LAYOUT ──────── */

.po-ptc-header {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--ms-rule);
  align-items: start;
}

.po-ptc-label {
  padding-right: 2rem;
  border-right: 1px solid var(--ms-rule);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.25rem;
}

.po-ptc-heading-block {
  padding-left: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.po-ptc-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.po-ptc-division {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--ms-rule);
}

.po-ptc-division:last-child { border-bottom: none; }

.po-ptc-division-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ms-teal);
  font-weight: 500;
  margin-bottom: 0.75rem;
  display: block;
}

/* PTC accordions sit flush within their division */
.po-ptc-division .po-accordion-item:first-child {
  border-top: none;
}

.po-ptc-division .po-accordion-item:last-child {
  border-bottom: none;
}


/* ── CLOSING STANDARD ────────────────────────────────────── */

.po-closing-wrap {
  background: rgba(248, 246, 241, 0.36);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  max-width: 100%;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ms-rule);
}

.po-closing-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
}

.po-closing-label {
  padding: 3.5rem 2rem;
  border-right: 1px solid var(--ms-rule);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
}

.po-closing-label-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 3.5rem;
  font-weight: 300;
  color: rgba(29, 53, 87, 0.08);
  line-height: 1;
}

.po-closing-label-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ms-gray);
  font-weight: 400;
}

.po-closing-content {
  padding: 3.5rem 3rem 3.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  justify-content: center;
}

.po-closing-rule {
  width: 32px;
  height: 2px;
  background: var(--ms-gold);
  border-radius: 2px;
  flex-shrink: 0;
}

.po-closing-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 400;
  color: var(--ms-navy);
  line-height: 1.25;
  margin: 0;
}

.po-closing-body {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: #4a5568;
  max-width: 560px;
  line-height: 1.78;
  margin: 0;
}

.po-closing-cta {
  display: inline-block;
  width: fit-content;
  padding: 0.85rem 2rem;
  background: var(--ms-gold);
  color: var(--ms-navy);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.2s ease, color 0.2s ease;
  margin-top: 0.5rem;
}
.po-closing-cta:hover { background: var(--ms-teal); color: #fff; }


/* ── ANCHOR OFFSETS — preserve existing link IDs ─────────── */

#final-sale,
#final-sale-standard,
#sovereignty-independence,
#governing-content,
#liability-immunity,
#supremacy-clause,
#personal-use-policy,
#transaction-protocol,
#checkout-enforcement,
#data-practices,
#privacy-terms-cookies {
  scroll-margin-top: calc(var(--site-header-height, 0px) + var(--quick-access-height, 48px) + 16px);
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — 768px breakpoint
   Mirrors library.css mobile breakpoint exactly
═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* Masthead */
  .po-masthead-inner {
    padding: 3rem 1.5rem 2.5rem;
    text-align: center;
    align-items: center;
  }
  .po-masthead-heading { font-size: clamp(1.9rem, 7vw, 2.4rem); }

  /* Quick-access nav */
  .po-quick-access-inner { padding: 0 1rem; }
  .po-qnav-link { padding: 0.7rem 0.85rem; font-size: 0.65rem; }

  /* Article index */
  .po-index-wrap { padding: 3rem 1.25rem; }
  .po-index-grid { grid-template-columns: 1fr; }
  .po-index-tile--wide { flex-direction: column; gap: 0.6rem; }

  /* Section headers */
  .po-section-header { flex-direction: column; gap: 0.4rem; }
  .po-section-meta { margin-left: 0; }

  /* Section inner: single column on mobile */
  .po-section-inner {
    grid-template-columns: 1fr;
  }

  .po-section-label-col {
    border-right: none;
    border-bottom: 1px solid var(--ms-rule);
    padding: 2rem 1.5rem 1.25rem;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
  }

  .po-section-content-col {
    padding: 2rem 1.5rem;
  }

  .po-section-inner--full {
    padding: 3rem 1.25rem;
  }

  /* Article X PTC header: single column */
  .po-ptc-header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }
  .po-ptc-label {
    border-right: none;
    border-bottom: 1px solid var(--ms-rule);
    padding-right: 0;
    padding-bottom: 1rem;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
  .po-ptc-heading-block { padding-left: 0; }

  /* Closing standard */
  .po-closing-inner { grid-template-columns: 1fr; }
  .po-closing-label {
    border-right: none;
    border-bottom: 1px solid var(--ms-rule);
    padding: 2rem 1.5rem 1.25rem;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
  .po-closing-content { padding: 2rem 1.5rem; }

  /* Section footer */
  .po-section-footer { gap: 1.25rem; }

}

@media (max-width: 480px) {
  .po-index-grid { grid-template-columns: 1fr; }
}
