/* ==========================================================================
   The Balloon Shoppe — privacy, terms, refunds, credits, accessibility
   Long-form reading pages: a contents column, numbered sections, quiet rules.
   Shared components come from css/styles.css; nothing here restyles them.
   ========================================================================== */

/* ---------- 1. Masthead ---------- */
.lg-hero {
  padding-block: clamp(32px, 20px + 2.5vw, 64px) 0;
}
.lg-hero__text {
  display: grid;
  gap: var(--s-3);
  max-width: 34ch;
}
.lg-hero__text .lede {
  max-width: 54ch;
}
@media (min-width: 760px) {
  .lg-hero__text { max-width: 50ch; }
}
.lg-updated {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-top: var(--s-2);
  font-size: var(--fs-fine);
  color: var(--c-ink-soft);
}
.lg-updated .icon { color: var(--c-shopfront); }

/* ---------- 2. Plain-English summary ---------- */
.lg-summary {
  margin-top: clamp(28px, 4vw, 48px);
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--r-md);
  background: var(--c-sky);
  max-width: 78ch;
}
.lg-summary__title {
  font-family: var(--font-body);
  font-size: var(--fs-4);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
}
.lg-summary ul {
  margin-top: var(--s-3);
  padding-left: 1.2em;
  display: grid;
  gap: var(--s-2);
  font-size: var(--fs-small);
  line-height: 1.55;
}
.lg-summary ul::marker { color: var(--c-shopfront); }
.lg-summary p { font-size: var(--fs-small); }
.lg-summary .fine { margin-top: var(--s-3); }
.lg-summary a { color: var(--c-raspberry-deep); text-underline-offset: 0.18em; }

/* ---------- 3. Contents + body ---------- */
.lg-layout {
  display: grid;
  gap: clamp(32px, 4vw, 56px);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  padding-block: clamp(32px, 4vw, 56px) 0;
}
@media (min-width: 1000px) {
  .lg-layout {
    grid-template-columns: minmax(0, 15.5rem) minmax(0, 1fr);
    gap: clamp(48px, 5vw, 88px);
  }
  .lg-toc {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    max-height: calc(100vh - var(--header-h) - 44px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

.lg-toc {
  border-top: 2px solid var(--c-ink);
  padding-top: var(--s-4);
}
.lg-toc__title {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-raspberry);
  line-height: 1.3;
}
.lg-toc ol {
  list-style: none;
  padding: 0;
  margin-top: var(--s-2);
}
.lg-toc li { border-bottom: 1px solid var(--c-line); }
.lg-toc a {
  display: grid;
  grid-template-columns: 2em minmax(0, 1fr);
  padding: 0.6em 0;
  font-size: var(--fs-small);
  line-height: 1.35;
  color: var(--c-ink);
  text-decoration: none;
}
.lg-toc a > span:first-child {
  color: var(--c-ink-soft);
  font-variant-numeric: tabular-nums;
}
.lg-toc a:hover { color: var(--c-raspberry); }
.lg-toc a:hover > span:last-child {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* ---------- 4. Sections ---------- */
.lg-body { max-width: 74ch; }
.lg-sec { padding-block: clamp(28px, 3.5vw, 44px); }
.lg-sec:first-child { padding-top: 0; }
.lg-sec + .lg-sec { border-top: 1px solid var(--c-line); }
.lg-sec > h2 {
  font-size: var(--fs-3);
  display: flex;
  gap: 0.55em;
  align-items: baseline;
  text-wrap: pretty;
}
.lg-sec > h2 > span:first-child {
  flex: none;
  font-family: var(--font-body);
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--c-raspberry);
  font-variant-numeric: tabular-nums;
}
.lg-sec > h2 + * { margin-top: var(--s-4); }
.lg-sec h3 {
  font-family: var(--font-body);
  font-size: var(--fs-4);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}
.lg-sec .prose { max-width: none; }
.lg-sec .prose a { overflow-wrap: anywhere; }
.lg-sec .prose + .prose { margin-top: 1em; }

/* ---------- 5. Row list (processors, retention, rights) ---------- */
.lg-rows {
  list-style: none;
  padding: 0;
  margin-top: var(--s-5);
  border-top: 1px solid var(--c-line);
}
.lg-rows > li {
  display: grid;
  gap: 0.2em var(--s-5);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--c-line);
}
@media (min-width: 620px) {
  .lg-rows > li { grid-template-columns: minmax(0, 14em) minmax(0, 1fr); }
}
.lg-rows > li > *:first-child { font-weight: 700; }
.lg-rows p {
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--c-ink-soft);
}
.lg-rows p + p { margin-top: 0.4em; }
.lg-rows a { color: var(--c-raspberry); text-underline-offset: 0.18em; overflow-wrap: anywhere; }

/* ---------- 6. Callouts ---------- */
.lg-callout {
  margin-top: var(--s-5);
  padding: clamp(18px, 2.5vw, 28px);
  border-radius: var(--r-md);
  background: var(--c-butter);
  box-shadow: inset 4px 0 0 #8A5A00;
}
.lg-callout--blush { background: var(--c-blush); box-shadow: inset 4px 0 0 var(--c-raspberry); }
.lg-callout--pistachio { background: var(--c-pistachio); box-shadow: inset 4px 0 0 var(--c-success); }
.lg-callout > h3,
.lg-callout > p:first-child { margin-top: 0; }
.lg-callout .prose { max-width: none; }
.lg-callout h3 + .prose { margin-top: var(--s-3); }
.lg-callout a { color: var(--c-raspberry-deep); text-underline-offset: 0.18em; }

/* ---------- 6b. Small labels, quotes, actions ---------- */
.lg-tag {
  display: inline-block;
  margin-top: 0.2em;
  font-size: var(--fs-fine);
  font-weight: 600;
  color: var(--c-ink-soft);
}
.lg-quote {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--c-sky);
  font-weight: 600;
}
.lg-action { margin-top: var(--s-4); }
.lg-sec .safety-note { margin-top: var(--s-5); }
.lg-sec .safety-note p { font-size: 1rem; line-height: 1.55; }
.lg-sec .safety-note + .prose,
.lg-conspicuous + .prose,
.lg-table-wrap + .prose { margin-top: var(--s-4); }

/* ---------- 6c. Conspicuous legal text (disclaimer, liability cap, class waiver) ---------- */
.lg-conspicuous {
  margin-top: var(--s-4);
  padding: clamp(16px, 2.5vw, 24px);
  border: 2px solid var(--c-ink);
  border-radius: var(--r-md);
  background: var(--c-white);
  font-weight: 700;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--c-ink);
  overflow-wrap: break-word;
}
.lg-conspicuous p + p { margin-top: 0.8em; }
.lg-conspicuous--inline { margin-block: 0.8em; }

/* ---------- 6d. Tables (local storage keys, image credits) ---------- */
.lg-table-wrap { margin-top: var(--s-5); }
.lg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
  line-height: 1.5;
}
.lg-table th,
.lg-table td {
  padding: 0.7em 0.8em 0.7em 0;
  border-bottom: 1px solid var(--c-line);
  text-align: left;
  vertical-align: top;
}
.lg-table thead th {
  border-bottom: 2px solid var(--c-ink);
  font-size: var(--fs-fine);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lg-table tbody th { font-weight: 700; }
.lg-table code { font-size: 0.92em; overflow-wrap: anywhere; }
@media (min-width: 641px) {
  .lg-table--keys tbody th { white-space: nowrap; }
  .lg-table--keys tbody th code { overflow-wrap: normal; }
}
.lg-table td { color: var(--c-ink-soft); }
.lg-table a { color: var(--c-raspberry-deep); text-underline-offset: 0.18em; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .lg-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lg-table, .lg-table tbody, .lg-table tr, .lg-table th, .lg-table td { display: block; }
  .lg-table tr { padding: var(--s-3) 0; border-bottom: 1px solid var(--c-line); }
  .lg-table th, .lg-table td { padding: 0.15em 0; border: 0; }
  .lg-table td::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--c-ink);
  }
}

/* ---------- 7. Closing block ---------- */
.lg-end {
  margin-top: clamp(36px, 4.5vw, 64px);
  padding-top: var(--s-5);
  border-top: 2px solid var(--c-ink);
  display: grid;
  gap: var(--s-4);
}
.lg-end__ways {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--s-3);
  font-size: var(--fs-small);
}
.lg-end__ways li { display: flex; gap: 0.6em; align-items: flex-start; }
.lg-end__ways .icon { flex: none; margin-top: 0.15em; color: var(--c-shopfront); }
.lg-end__ways a { color: var(--c-raspberry); text-underline-offset: 0.18em; overflow-wrap: anywhere; }
.lg-end__links { margin-top: var(--s-2); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
