/* R3.20 policy reading room. Keep every policy and provisional notice intact;
   this route-owned finish follows the shared customer and R3.17 layers. */
body[data-sfw-surface="r317"].sfw-policy-editorial {
  --policy-paper:#fff;
  --policy-blush:#f7bed5;
  --policy-selected:#fbd6e5;
  --policy-ink:#0b0b0b;
  --policy-muted:#393939;
  --policy-rule:#d9ccd1;
  background:var(--policy-paper);
  color:var(--policy-ink);
}

body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-shell {
  background:var(--policy-paper);
  color:var(--policy-ink);
}

/* Compact document heading: the title and provisional notice share a rail,
   leaving the first reading section visible without a storefront-size hero. */
body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-title {
  position:relative;
  isolation:isolate;
  margin:0;
  padding:clamp(30px,3.2vw,44px) 0;
  background:#fff;
  color:var(--policy-ink);
  border:0;
  border-bottom:1px solid var(--policy-rule);
  border-radius:0;
  box-shadow:none;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-title .site-container {
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,.9fr);
  align-items:center;
  gap:15px 56px;
  width:min(1120px,calc(100% - 80px));
  max-width:1120px;
  margin-inline:auto;
  padding:0;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-title .policy-kicker {
  display:flex;
  grid-column:1;
  grid-row:1;
  align-items:center;
  gap:9px;
  width:fit-content;
  margin:0;
  padding:6px 10px;
  border:1px solid #dfc2d1;
  background:#f6e8ef;
  color:#585858;
  font:600 11px/1.5 var(--font-body,system-ui);
  letter-spacing:.1em;
  text-transform:uppercase;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-kicker::before {
  content:"";
  flex:0 0 5px;
  width:5px;
  height:5px;
  border:0;
  border-radius:50%;
  background:#585858;
  box-shadow:none;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-title h1 {
  grid-column:1;
  grid-row:2;
  max-width:23ch;
  margin:0;
  color:var(--policy-ink);
  font:400 clamp(38px,4.5vw,60px)/1.08 var(--font-display,Georgia,serif);
  letter-spacing:-.035em;
  text-wrap:balance;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-title p {
  grid-column:2;
  grid-row:1 / span 2;
  align-self:center;
  max-width:62ch;
  margin:0;
  padding:16px 20px;
  border:1px solid #0b0b0b;border-radius:12px;box-shadow:4px 4px 0 #fbd6e5;
  background:#f7bed5;
  color:var(--policy-muted);
  font:400 14px/1.8 var(--font-body,system-ui);
  text-wrap:pretty;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-shell>.r6-shell {
  display:grid;
  grid-template-columns:228px minmax(0,1fr);
  justify-content:normal;
  align-items:start;
  gap:48px;
  width:min(1120px,calc(100% - 80px));
  max-width:1120px;
  margin:0 auto;
  padding:clamp(32px,4vw,52px) 0 80px;
  background:transparent;
}

/* The index owns all four inner edges. Long labels wrap inside their own
   hit area instead of touching the paper rim or shrinking the text. */
body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents {
  display:block;
  grid-column:1;
  position:sticky;
  top:108px;
  align-self:start;
  min-width:0;
  width:100%;
  max-height:min(420px,calc(100dvh - 216px));
  overflow:auto;
  scroll-padding-block:8px;
  scrollbar-width:thin;
  scrollbar-color:#bc91a7 #332c32;
  scrollbar-gutter:stable;
  overscroll-behavior:contain;
  box-sizing:border-box;
  margin:0;
  padding:20px 14px 18px;
  border:1px solid #342d33;
  border-top:3px solid #d9a9c1;
  border-radius:12px;
  background:#242126;
  color:#fffdfc;
  box-shadow:4px 4px 0 #ead6e1;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents::-webkit-scrollbar {width:6px;height:6px;}
body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents::-webkit-scrollbar-track {background:#332c32;}
body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents::-webkit-scrollbar-thumb {border:1px solid #332c32;border-radius:4px;background:#bc91a7;}
body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents::-webkit-scrollbar-button {display:none;width:0;height:0;}

body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents>p {
  margin:0 0 13px;
  padding:0 10px 14px;
  border-bottom:1px solid #585858;
  color:#efcadd;
  font:600 11px/1.6 var(--font-body,system-ui);
  letter-spacing:.07em;
  text-transform:uppercase;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents>a {
  display:block;
  min-width:0;
  min-height:44px;
  box-sizing:border-box;
  margin:2px 0;
  padding:10px;
  border:1px solid transparent;
  border-radius:3px;
  background:transparent;
  color:#e0d4dd;
  font:400 13px/1.6 var(--font-body,system-ui);
  text-decoration:none;
  white-space:normal;
  overflow-wrap:anywhere;
  scroll-margin-block:8px;
  transition:background-color .15s ease,color .15s ease,border-color .15s ease;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents>a:first-of-type {
  color:#fffdfc;
  font-weight:600;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents>a:hover {
  color:var(--policy-ink);
  background:var(--policy-blush);
  border-color:#d6bcc7;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents>a:focus-visible {
  color:var(--policy-ink);
  background:var(--policy-selected);
  outline:2px solid #efbcd3;
  outline-offset:3px;
}

/* Existing heading IDs are also the native index state; no policy script or
   new scroll observer is needed for a clearly marked anchor destination. */
body[data-sfw-surface="r317"].sfw-policy-editorial:has(#reading-section-1:target) .customer-article-contents>a[href="#reading-section-1"],
body[data-sfw-surface="r317"].sfw-policy-editorial:has(#policy-section-2:target) .customer-article-contents>a[href="#policy-section-2"],
body[data-sfw-surface="r317"].sfw-policy-editorial:has(#policy-section-3:target) .customer-article-contents>a[href="#policy-section-3"],
body[data-sfw-surface="r317"].sfw-policy-editorial:has(#policy-section-4:target) .customer-article-contents>a[href="#policy-section-4"],
body[data-sfw-surface="r317"].sfw-policy-editorial:has(#policy-section-5:target) .customer-article-contents>a[href="#policy-section-5"],
body[data-sfw-surface="r317"].sfw-policy-editorial:has(#policy-section-6:target) .customer-article-contents>a[href="#policy-section-6"],
body[data-sfw-surface="r317"].sfw-policy-editorial:has(#policy-section-7:target) .customer-article-contents>a[href="#policy-section-7"],
body[data-sfw-surface="r317"].sfw-policy-editorial:has(#policy-section-8:target) .customer-article-contents>a[href="#policy-section-8"],
body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents>a[aria-current] {
  background:var(--policy-selected);
  border-color:#ba8ca5;
  color:var(--policy-ink);
  font-weight:600;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document {
  grid-column:2;
  min-width:0;
  width:100%;
  max-width:none;
  box-sizing:border-box;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--policy-ink);
  box-shadow:none;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document h2 {
  margin:0 0 24px;
  padding:0 0 20px;
  border-bottom:1px solid var(--policy-ink);
  color:var(--policy-ink);
  font:400 clamp(26px,2.6vw,34px)/1.25 var(--font-display,Georgia,serif);
  letter-spacing:-.025em;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document>p:first-of-type {
  max-width:none;
  margin:0 0 28px;
  padding:18px 20px;
  border:1px solid #0b0b0b;
  border-left:3px solid #0b0b0b;
  border-radius:12px;
  background:#fbd6e5;
  color:#484848;
  font-size:14px;
  line-height:1.8;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document>p:first-of-type strong {
  color:var(--policy-ink);
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document h3 {
  margin:36px 0 16px;
  padding:20px 0 0;
  border:0;
  border-top:1px solid var(--policy-rule);
  color:var(--policy-ink);
  font:600 18px/1.5 var(--font-body,system-ui);
  letter-spacing:0;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document :is(h2,h3) {
  scroll-margin-top:116px;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document :is(h2,h3):target {
  border-color:#636363;
  text-decoration:underline;
  text-decoration-color:#d6abc3;
  text-decoration-thickness:3px;
  text-underline-offset:8px;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document :is(p,li) {
  max-width:72ch;
  color:var(--policy-muted);
  font:400 16px/1.85 var(--font-body,system-ui);
  overflow-wrap:anywhere;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document p {
  margin:16px 0;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document strong {
  color:var(--policy-ink);
  font-weight:650;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document ul {
  margin:20px 0 26px;
  padding-left:24px;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document li {
  margin:12px 0;
  padding-left:5px;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document li::marker {
  color:#737373;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document a {
  color:#525252;
  text-decoration-thickness:1px;
  text-underline-offset:4px;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .customer-policy-table,
body[data-sfw-surface="r317"].sfw-policy-editorial .policy-table-scroll {
  max-width:100%;
  min-width:0;
  border-radius:12px;
  overscroll-behavior-inline:contain;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-table-scroll {
  margin:26px 0;
  border:1px solid #bcb0b4;
  box-shadow:4px 4px 0 #f7bed5;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document table {
  width:100%;
  min-width:560px;
  margin:0;
  border:0;
  border-collapse:collapse;
  table-layout:fixed;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document table :is(th,td) {
  padding:18px;
  border:0;
  border-bottom:1px solid var(--policy-rule);
  background:var(--policy-paper);
  color:var(--policy-muted);
  font:400 14px/1.8 var(--font-body,system-ui);
  text-align:left;
  overflow-wrap:anywhere;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document table th {
  background:#252226;
  color:var(--policy-paper);
  font-weight:600;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document table :is(th,td):first-child {
  width:32%;
  color:var(--policy-ink);
  font-weight:600;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document table th:first-child {
  color:var(--policy-paper);
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document table tr:nth-child(odd) td {
  background:#f8f1f6;
}

body[data-sfw-surface="r317"].sfw-policy-editorial .policy-table-scroll:focus-visible {
  outline:2px solid var(--policy-ink);
  outline-offset:5px;
}

@media (max-width:850px) {
  body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-title .site-container {
    grid-template-columns:minmax(0,1fr);
    gap:14px;
  }

  body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-title p {
    grid-column:1;
    grid-row:auto;
    max-width:none;
    margin-top:7px;
  }

  body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-title .site-container,
  body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-shell>.r6-shell {
    width:calc(100% - 48px);
  }

  body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-shell>.r6-shell {
    grid-template-columns:minmax(0,1fr);
    gap:32px;
    padding-block:32px 56px;
  }

  body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    position:static;
    max-height:none;
    overflow:visible;
    gap:3px 12px;
    padding:20px;
  }

  body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents>p {
    grid-column:1/-1;
    margin-bottom:8px;
  }

  body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents>a {
    margin:0;
  }

  body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document {
    grid-column:1;
  }
}

@media (max-width:520px) {
  body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-title .site-container,
  body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-shell>.r6-shell {
    width:calc(100% - 36px);
  }

  body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-title h1 {
    font-size:42px;
  }

  body[data-sfw-surface="r317"].sfw-policy-editorial .customer-reading-title p {
    font-size:14px;
    padding-left:14px;
  }

  body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents {
    grid-template-columns:minmax(0,1fr);
    gap:2px;
    padding:18px;
  }

  body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document>p:first-of-type {
    padding:17px 18px;
  }

  body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document :is(p,li) {
    font-size:15px;
    line-height:1.85;
  }

  body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document h3 {
    margin-top:32px;
  }
}

@media (prefers-reduced-motion:reduce) {
  body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents>a {
    transition:none;
  }
}

@media (forced-colors:active) {
  body[data-sfw-surface="r317"].sfw-policy-editorial .customer-article-contents,
  body[data-sfw-surface="r317"].sfw-policy-editorial .policy-document>p:first-of-type {
    border:1px solid CanvasText;
    box-shadow:none;
  }
}
