/* The footer's document pages (/privacy, /terms, /pricing, /refunds, /know/credits).
   Layout: web/templates/partials/doc_page.html. Page-scoped (each template links it).
   The text sits in one reading card (the opaque reading surface 03-core-ui.css gives every
   dark <article>, here with edges, padding and a lit top rule) beside a sticky side column:
   "On this page" and links to the sibling pages. Light-theme rules sit at the end. */

.doc-page {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .doc-page { grid-template-columns: minmax(0, 1fr) 14.5rem; gap: 2.25rem; }
}

/* ─── The reading card ─────────────────────────────────────────────────────── */
.doc-body {
  position: relative;
  min-width: 0;
  padding: 1.5rem 1.25rem 2rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 1.25rem;
  box-shadow: 0 24px 60px -36px rgba(0, 0, 0, 0.9), inset 0 1px rgba(255, 255, 255, 0.035);
}
.doc-body::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 2rem;
  right: 2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.75), rgba(129, 140, 248, 0.6), transparent);
  pointer-events: none;
}
@media (min-width: 640px) {
  .doc-body { padding: 2.25rem 2.5rem 2.5rem; }
}

.doc-body p,
.doc-body li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: rgb(203, 213, 225);
}
.doc-body strong { color: rgb(241, 245, 249); font-weight: 600; }
.doc-body a:not([class]) { color: rgb(103, 232, 249); }

.doc-body h2 {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 2.25rem 0 0.85rem;
  padding-top: 1.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 1.2rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #fff;
  scroll-margin-top: 5.5rem;
}
.doc-body h2::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, rgb(34, 211, 238), rgb(129, 140, 248));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.55);
}
/* Headings inside the pricing cards are card titles, not sections. */
.doc-body section h2 { display: block; margin: 0; padding: 0; border: 0; font-size: 1rem; }
.doc-body section h2::before { content: none; }

.doc-body ul { list-style: none; padding-left: 0; }
.doc-body ul > li { position: relative; padding-left: 1.35rem; }
.doc-body ul > li + li { margin-top: 0.45rem; }
.doc-body ul > li::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.72em;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: rgba(103, 232, 249, 0.75);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.doc-updated {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.06);
  font-size: 0.75rem !important;
  line-height: 1.4 !important;
  color: rgb(148, 163, 184) !important;
}
.doc-updated::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: rgb(52, 211, 153);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
}

/* ─── Side column ──────────────────────────────────────────────────────────── */
.doc-side { display: flex; flex-direction: column; gap: 1.75rem; min-width: 0; }
@media (min-width: 1024px) {
  .doc-side {
    position: sticky;
    top: 5.5rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}
.doc-side-title {
  margin-bottom: 0.65rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgb(148, 163, 184);
}
.doc-toc[hidden] { display: none; }
/* On a phone the contents list would sit below the text it indexes. */
@media (max-width: 1023.98px) { .doc-toc { display: none; } }
.doc-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid rgba(148, 163, 184, 0.18); }
.doc-toc a {
  display: block;
  margin-left: -1px;
  padding: 0.3rem 0.85rem;
  border-left: 2px solid transparent;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgb(148, 163, 184);
  transition: color 0.15s, border-color 0.15s;
}
.doc-toc a:hover { color: rgb(226, 232, 240); }
.doc-toc a[aria-current="true"] { color: rgb(165, 243, 252); border-left-color: rgb(34, 211, 238); }

.doc-related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
@media (min-width: 1024px) { .doc-related ul { flex-direction: column; gap: 0.15rem; } }
.doc-related a {
  display: block;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 0.65rem;
  font-size: 0.82rem;
  color: rgb(203, 213, 225);
  transition: background-color 0.15s, color 0.15s;
}
@media (min-width: 1024px) { .doc-related a { border-color: transparent; } }
.doc-related a:hover { background: rgba(148, 163, 184, 0.08); color: #fff; }
.doc-related a[aria-current="page"] {
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.08);
  color: rgb(165, 243, 252);
}

/* ─── /know/credits: subject jumps and a card grid ─────────────────────────── */
.credit-jumps { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 2rem; }
.credit-jumps a {
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  font-size: 0.78rem;
  color: rgb(203, 213, 225);
  background: rgba(148, 163, 184, 0.05);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.credit-jumps a:hover { border-color: rgba(34, 211, 238, 0.45); color: #fff; background: rgba(34, 211, 238, 0.08); }
.credit-subject { scroll-margin-top: 5.5rem; }
.credit-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.credit-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 0.85rem;
  background: var(--reading-surface, #01040e);
  transition: border-color 0.15s;
}
.credit-card:hover { border-color: rgba(34, 211, 238, 0.35); }
.credit-thumb {
  flex: none;
  width: 4.5rem;
  height: 3.4rem;
  border-radius: 0.5rem;
  background: #fff;
  object-fit: contain;
  padding: 0.15rem;
}

/* ─── Light theme ──────────────────────────────────────────────────────────── */
html[data-theme="light"] body .doc-body {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.09);
  box-shadow: 0 24px 50px -34px rgba(15, 23, 42, 0.35);
}
html[data-theme="light"] body .doc-body p,
html[data-theme="light"] body .doc-body li { color: rgb(51, 65, 85); }
html[data-theme="light"] body .doc-body strong { color: rgb(15, 23, 42); }
html[data-theme="light"] body .doc-body h2 { color: rgb(15, 23, 42); border-top-color: rgba(15, 23, 42, 0.08); }
html[data-theme="light"] body .doc-body ul > li::before { background: rgb(8, 145, 178); box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12); }
html[data-theme="light"] body .doc-updated { color: rgb(71, 85, 105) !important; border-color: rgba(15, 23, 42, 0.12); background: rgba(15, 23, 42, 0.03); }
html[data-theme="light"] body .doc-side-title { color: rgb(71, 85, 105); }
html[data-theme="light"] body .doc-toc ol { border-left-color: rgba(15, 23, 42, 0.12); }
html[data-theme="light"] body .doc-toc a { color: rgb(71, 85, 105); }
html[data-theme="light"] body .doc-toc a:hover { color: rgb(15, 23, 42); }
html[data-theme="light"] body .doc-toc a[aria-current="true"] { color: rgb(14, 116, 144); border-left-color: rgb(8, 145, 178); }
html[data-theme="light"] body .doc-related a { color: rgb(51, 65, 85); border-color: rgba(15, 23, 42, 0.1); }
@media (min-width: 1024px) { html[data-theme="light"] body .doc-related a { border-color: transparent; } }
html[data-theme="light"] body .doc-related a:hover { background: rgba(15, 23, 42, 0.05); color: rgb(15, 23, 42); }
html[data-theme="light"] body .doc-related a[aria-current="page"] { color: rgb(14, 116, 144); background: rgba(8, 145, 178, 0.08); border-color: rgba(8, 145, 178, 0.3); }
html[data-theme="light"] body .credit-jumps a { color: rgb(51, 65, 85); border-color: rgba(15, 23, 42, 0.12); background: rgba(255, 255, 255, 0.7); }
html[data-theme="light"] body .credit-jumps a:hover { color: rgb(14, 116, 144); border-color: rgba(8, 145, 178, 0.4); }
html[data-theme="light"] body .credit-card { background: rgba(255, 255, 255, 0.9); border-color: rgba(15, 23, 42, 0.09); }
html[data-theme="light"] body .credit-thumb { box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08); }

/* A page without contents (/pricing): the text takes the full width and the sibling links
   follow it as a row, so the three plan cards keep room. */
.doc-page--plain { grid-template-columns: minmax(0, 1fr); }
.doc-page--plain .doc-side { position: static; max-height: none; }
.doc-page--plain .doc-related ul { flex-direction: row; gap: 0.4rem; }
.doc-page--plain .doc-related a { border-color: rgba(148, 163, 184, 0.14); }
html[data-theme="light"] body .doc-page--plain .doc-related a:not([aria-current]) { border-color: rgba(15, 23, 42, 0.1); }

.credit-jumps-wrap { margin-bottom: 2rem; }
.credit-jumps-wrap > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  font-size: 0.82rem;
  color: rgb(226, 232, 240);
  cursor: pointer;
  list-style: none;
}
.credit-jumps-wrap > summary::-webkit-details-marker { display: none; }
.credit-jumps-wrap > summary::after { content: "▾"; font-size: 0.7rem; color: rgb(148, 163, 184); transition: transform 0.15s; }
.credit-jumps-wrap[open] > summary::after { transform: rotate(180deg); }
.credit-jumps-wrap > summary span {
  padding: 0 0.45rem;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  font-size: 0.72rem;
  color: rgb(165, 243, 252);
}
.credit-jumps-wrap .credit-jumps { margin: 0.9rem 0 0; }
html[data-theme="light"] body .credit-jumps-wrap > summary { color: rgb(30, 41, 59); border-color: rgba(15, 23, 42, 0.12); background: rgba(255, 255, 255, 0.7); }
html[data-theme="light"] body .credit-jumps-wrap > summary span { color: rgb(14, 116, 144); background: rgba(8, 145, 178, 0.1); }

/* ▼▼ LIGHT THEME — GENERATED by scripts/build_light_theme.py from the rules above. Do not edit by hand: run the builder. Hand tuning goes in 36-theme-light.css. ▼▼ */
html[data-theme="light"] .doc-body{box-shadow:0px 24px 60px -36px rgb(15 23 42/0.2)}
html[data-theme="light"] .doc-body p,html[data-theme="light"] .doc-body li{color:rgb(48 65 85)}
html[data-theme="light"] .doc-body strong{color:rgb(38 66 94)}
html[data-theme="light"] .doc-body a:not([class]){color:rgb(2 111 126)}
html[data-theme="light"] .doc-body h2{color:rgb(51 63 82)}
html[data-theme="light"] .doc-body h2::before{box-shadow:0px 4px 12px rgb(15 23 42/0.12)}
html[data-theme="light"] .doc-body ul > li::before{box-shadow:0px 0px 0px 3px rgb(14 158 180/0.17)}
html[data-theme="light"] .doc-updated{color:rgb(61 75 94)!important}
html[data-theme="light"] .doc-updated::before{box-shadow:none}
html[data-theme="light"] .doc-side-title{color:rgb(61 75 94)}
html[data-theme="light"] .doc-toc a{color:rgb(61 75 94)}
html[data-theme="light"] .doc-toc a:hover{color:rgb(44 63 88)}
html[data-theme="light"] .doc-toc a[aria-current="true"]{color:rgb(1 111 124)}
html[data-theme="light"] .doc-related a{color:rgb(48 65 85)}
html[data-theme="light"] .doc-related a:hover{color:rgb(51 63 82)}
html[data-theme="light"] .doc-related a[aria-current="page"]{color:rgb(1 111 124)}
html[data-theme="light"] .credit-jumps a{color:rgb(48 65 85)}
html[data-theme="light"] .credit-jumps a:hover{color:rgb(51 63 82)}
html[data-theme="light"] .credit-card{background:var(--reading-surface, rgb(252 252 253))}
html[data-theme="light"] .credit-jumps-wrap > summary{color:rgb(44 63 88)}
html[data-theme="light"] .credit-jumps-wrap > summary::after{color:rgb(61 75 94)}
html[data-theme="light"] .credit-jumps-wrap > summary span{color:rgb(1 111 124)}
/* ▲▲ LIGHT THEME END ▲▲ */
