/* policies.digisaint.com
   Read mostly inside the apps' in-app browser sheet, so the system font (San
   Francisco on Apple devices) keeps it feeling like part of the app. Colour is
   reserved for the apps themselves: the two brand colours form the split rule
   under each page title. No external requests (the CSP forbids them). */

:root {
  --ink: #1c1b22;
  --ink-soft: #3a3944;
  --muted: #676674;
  --paper: #ffffff;
  --panel: #f4f4f7;
  --line: #e3e3ea;
  --link: #4f2fd0;
  --ps: #d22a3f;        /* Purple Sector icon red */
  --hoop: #e8611a;      /* Hoopster icon orange */
  --measure: 42rem;
  --toc: 13.5rem;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eeedf3;
    --ink-soft: #cfcdd9;
    --muted: #9c9aab;
    --paper: #17161c;
    --panel: #212029;
    --line: #2f2e39;
    --link: #b3a2ff;
    --ps: #ff6b7d;
    --hoop: #ff9a5c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.62 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }
img { display: block; }

/* ---------- Top bar ---------- */
.bar {
  max-width: calc(var(--toc) + var(--measure) + 4rem);
  margin: 0 auto;
  padding: 18px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
}
.bar .home { color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; margin-right: auto; }
.bar .home span { color: var(--muted); font-weight: 500; }
.bar nav { display: flex; flex-wrap: wrap; gap: 4px; }
.bar nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
  padding: 6px 12px;
  border-radius: 999px;
}
.bar nav a:hover { background: var(--panel); }
.bar nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* ---------- Document hero ---------- */
.hero {
  max-width: calc(var(--toc) + var(--measure) + 4rem);
  margin: 0 auto;
  padding: 40px 16px 32px;
  position: relative;
}
/* The one signature element: a rule split between the two apps' colours,
   because every page here belongs to both of them. */
.hero::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--ps) 0 50%, var(--hoop) 50% 100%);
}
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 750;
  margin: 0 0 20px;
}
.hero .lede { font-size: 1.15rem; color: var(--ink-soft); max-width: var(--measure); margin: 0 0 22px; }
.applies { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0; padding: 0; list-style: none; }
.applies li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.applies img { width: 44px; height: 44px; border-radius: 22.5%; box-shadow: 0 0 0 1px var(--line); }
.applies .label { font-weight: 400; color: var(--muted); font-size: 15px; }
.applies .updated { font-weight: 400; color: var(--muted); font-size: 15px; margin-left: auto; }

/* ---------- Two-column reading layout ---------- */
.doc {
  max-width: calc(var(--toc) + var(--measure) + 4rem);
  margin: 0 auto;
  padding: 8px 16px 64px;
}
/* The contents list is printed twice: a folded list above the text on phones,
   a sticky column beside it on wide screens. A closed <details> can't be forced
   open with CSS everywhere, so two plain elements are simpler than one clever one. */
.toc { font-size: 15px; }
.toc ol { list-style: none; margin: 0 0 8px; padding: 0; }
.toc li a { display: block; padding: 5px 0; color: var(--muted); text-decoration: none; }
.toc li a:hover { color: var(--ink); }
.toc-mobile { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.toc-mobile summary { cursor: pointer; font-weight: 600; padding: 14px 0; color: var(--ink-soft); }
.toc-desktop { display: none; }
@media (min-width: 960px) {
  .doc { display: grid; grid-template-columns: var(--toc) minmax(0, var(--measure)); gap: 4rem; }
  .toc-mobile { display: none; }
  .toc-desktop { display: block; position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow: auto; padding-top: 40px; }
}
article { min-width: 0; }

article h2 {
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 44px 0 10px;
}
article h3 { font-size: 1.05rem; margin: 26px 0 6px; }
article p, article ul, article ol { margin: 0 0 14px; }
article ul, article ol { padding-left: 1.2em; }
article li { margin: 6px 0; }
article li::marker { color: var(--muted); }
article strong { font-weight: 650; }

/* At-a-glance: plain statements, each led by its point. */
.glance {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 28px 0 8px;
}
.glance h2 { margin-top: 0; font-size: 1.1rem; }
.glance ul { margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
thead th { font-weight: 650; color: var(--ink-soft); border-bottom-color: var(--ink-soft); }
.app { display: inline-flex; align-items: center; gap: 10px; }
.app img { width: 28px; height: 28px; border-radius: 22.5%; box-shadow: 0 0 0 1px var(--line); }

/* Plans, grouped under the app they belong to. */
.plans { display: grid; gap: 14px; margin: 8px 0 18px; }
@media (min-width: 720px) { .plans { grid-template-columns: 1fr 1fr; } }
.plans section { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 6px; }
.plans h3 { margin: 0 0 10px; font-size: 1.05rem; }
.plans dl { margin: 0; }
.plans dt { font-weight: 650; }
.plans dt .note { font-weight: 400; margin-left: 4px; }
.plans dd { margin: 2px 0 12px; color: var(--ink-soft); font-size: 15.5px; }
td.no { color: var(--muted); }

/* Reference detail that would make the page long: folded, never hidden. */
details.more { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 16px; }
details.more > summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "Show"; color: var(--link); font-weight: 500; }
details.more[open] > summary::after { content: "Hide"; }
details.more > .inner { padding: 0 18px 8px; }

.note { color: var(--muted); font-size: 15px; }

/* ---------- Home ---------- */
.home-hero {
  max-width: calc(var(--toc) + var(--measure) + 4rem);
  margin: 0 auto;
  padding: 56px 16px 24px;
}
.home-hero .icons { display: flex; gap: 14px; margin-bottom: 28px; }
.home-hero .icons img { width: 76px; height: 76px; border-radius: 22.5%; box-shadow: 0 0 0 1px var(--line); }
.home-hero h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); line-height: 1.08; letter-spacing: -0.035em; margin: 0 0 14px; font-weight: 750; }
.home-hero p { font-size: 1.15rem; color: var(--ink-soft); max-width: 36rem; margin: 0; }
.docs { max-width: calc(var(--toc) + var(--measure) + 4rem); margin: 0 auto; padding: 16px 16px 56px; list-style: none; }
.docs li { border-top: 1px solid var(--line); max-width: 44rem; }
.docs li:last-child { border-bottom: 1px solid var(--line); }
.docs a {
  display: grid;
  max-width: 44rem;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  padding: 22px 0;
  color: var(--ink);
  text-decoration: none;
}
.docs a strong { font-size: 1.3rem; letter-spacing: -0.015em; }
.docs a span { grid-column: 1; color: var(--muted); }
.docs a em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; color: var(--link); font-weight: 500; }
.docs a:hover strong { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- Footer ---------- */
footer {
  max-width: calc(var(--toc) + var(--measure) + 4rem);
  margin: 0 auto;
  padding: 24px 16px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
footer p { margin: 0 0 4px; }

/* ---------- Phones ---------- */
@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .bar { padding-bottom: 6px; }
  .bar nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 0 16px 6px;
    width: calc(100% + 32px);
  }
  .bar nav::-webkit-scrollbar { display: none; }
  .bar nav a { white-space: nowrap; font-size: 14.5px; padding: 6px 11px; }
  .hero { padding-top: 24px; }
  .applies { gap: 10px 16px; }
  .applies .label { flex-basis: 100%; }
  .applies img { width: 36px; height: 36px; }
  .applies .updated { flex-basis: 100%; margin-left: 0; }
}
