/* PlotVibe's legal pages (made by website/_legal/make.py), on top of site.css: calm, readable text. A reading bar
   along the top; on the left, every legal document and this one's contents; on the right, the text in a ~70
   character column, starting with the short version. */

.lg section { position: relative; }
.nav-links a[aria-current="page"] { color: var(--text); }

/* reading progress, under the top bar */
.lg-progress { position: fixed; left: 0; right: 0; top: calc(68px + env(safe-area-inset-top)); height: 2px; z-index: 49; pointer-events: none; }
.lg-progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, #5a0ee0, #b53efc, #26c281); box-shadow: 0 0 10px rgba(138, 18, 253, .8); }

/* ---- the head ---- */
.lg-hero { padding: 132px 0 34px; border-bottom: 1px solid var(--line); background: radial-gradient(50% 80% at 15% 0%, rgba(138, 18, 253, .16), transparent 70%); }
.lg-crumbs { display: flex; gap: 10px; font-size: 14px; color: var(--dim); margin-bottom: 22px; }
.lg-crumbs a { color: var(--violet-soft); text-decoration: none; }
.lg-crumbs a:hover { color: #fff; }
.lg-title { display: flex; align-items: center; gap: 20px; }
.lg-badge { width: 58px; height: 58px; flex: none; border-radius: 17px; display: grid; place-items: center; color: var(--violet-soft);
  background: rgba(138, 18, 253, .16); border: 1px solid rgba(185, 138, 255, .3); box-shadow: 0 10px 30px rgba(138, 18, 253, .2); }
.lg-badge svg { width: 28px; height: 28px; }
.lg-hero h1 { font-size: clamp(38px, 5.6vw, 72px); font-weight: 800; letter-spacing: -0.02em; }
.lg-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 22px; color: var(--dim); font-size: 14px; }
.lg-meta b { color: var(--muted); font-weight: 600; margin-right: 4px; }
.lg-meta span + span::before { content: "·"; margin-right: 22px; color: var(--line-2); margin-left: -12px; }

/* ---- the body ---- */
.lg-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(30px, 6vw, 90px); padding-top: 50px; padding-bottom: 110px; }
.lg-side { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 116px); overflow: auto; padding-right: 6px; scrollbar-width: thin; }
.lg-side-h { margin: 0 0 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--violet-soft); font-weight: 600; }
.lg-side-h ~ .lg-side-h { margin-top: 30px; }
.lg-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lg-docs a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: 14.5px; transition: color .2s, background .2s; }
.lg-docs a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.lg-docs a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.lg-docs a[aria-current="page"] { color: #fff; background: rgba(138, 18, 253, .2); }
.lg-docs a[aria-current="page"] svg { color: var(--violet-soft); opacity: 1; }
.lg-toc { list-style: none; margin: 0; padding: 0; counter-reset: toc; border-left: 1px solid var(--line); }
.lg-toc li { counter-increment: toc; }
.lg-toc a { display: flex; gap: 10px; margin-left: -1px; padding: 6px 10px; text-decoration: none; color: var(--dim); font-size: 14px; border-left: 2px solid transparent; transition: color .2s, border-color .2s; }
.lg-toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 11px; color: var(--dim); padding-top: 3px; }
.lg-toc a:hover { color: var(--text); }
.lg-toc a.on { color: #fff; border-left-color: var(--violet-soft); }
.lg-toc a.on::before { color: var(--violet-soft); }

.lg-text { max-width: 740px; counter-reset: sec; min-width: 0; }
.lg-short { padding: 24px 26px; border-radius: 20px; border: 1px solid rgba(185, 138, 255, .3);
  background: radial-gradient(60% 100% at 100% 0%, rgba(138, 18, 253, .2), transparent 70%), rgba(138, 18, 253, .07); }
.lg-text .lg-short-h { margin: 0 0 12px; font-family: var(--display); font-weight: 800; font-size: 19px; color: #fff; }
.lg-short ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lg-short li { position: relative; padding-left: 30px; color: #e2dcf2; font-size: 15.5px; line-height: 1.55; }
.lg-short li::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: rgba(38, 194, 129, .16)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.5' fill='none' stroke='%2326c281' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.lg-text .lg-short-n { margin: 14px 0 0; color: var(--dim); font-size: 13px; }

.lg-text section { padding-top: 44px; scroll-margin-top: 96px; }
.lg-text h2 { position: relative; counter-increment: sec; font-size: clamp(23px, 2.4vw, 29px); font-weight: 800; margin: 0 0 14px; }
.lg-text h2::before { content: counter(sec) ". "; color: var(--violet-soft); }
.lg-anchor { position: absolute; left: -26px; top: 0; padding-right: 6px; color: var(--violet-soft); text-decoration: none; opacity: 0; transition: opacity .2s; font-weight: 600; }
.lg-text h2:hover .lg-anchor, .lg-anchor:focus-visible { opacity: 1; }
.lg-anchor.copied::after { content: "Link copied"; position: absolute; left: 0; top: -26px; white-space: nowrap; font-family: var(--mono); font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 6px; color: #0b2a1d; background: #6ff0b2; }
.lg-text h3 { font-size: 18px; margin: 24px 0 8px; color: #fff; }
.lg-text p, .lg-text li { color: #cfc8e2; font-size: 16.5px; line-height: 1.75; }
.lg-text p { margin: 0; }
.lg-text p + p { margin-top: 14px; }
.lg-text ul, .lg-text ol { padding-left: 22px; margin: 12px 0; }
.lg-text li { margin: 7px 0; }
.lg-text li::marker { color: var(--violet-soft); }
.lg-text a { color: var(--violet-soft); text-decoration-color: rgba(185, 138, 255, .4); text-underline-offset: 3px; }
.lg-text a:hover { color: #fff; }
.lg-text b { color: var(--text); font-weight: 600; }
.lg-rules { counter-reset: r; list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.lg-rules li { counter-increment: r; position: relative; margin: 0; padding: 14px 16px 14px 56px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.lg-rules li::before { content: counter(r); position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 13px; color: #fff; background: rgba(138, 18, 253, .3); }
.lg-tablewrap { overflow-x: auto; margin: 16px 0; border-radius: 14px; border: 1px solid var(--line); }
.lg-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.lg-table th, .lg-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); color: #cfc8e2; line-height: 1.5; }
.lg-table tr:last-child td { border-bottom: 0; }
.lg-table th { color: var(--violet-soft); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; background: rgba(138, 18, 253, .08); }
.lg-table td:first-child { color: var(--text); font-weight: 600; }

/* help and the next / previous document */
.lg-help { display: flex; align-items: center; gap: 18px; margin-top: 56px; padding: 22px 24px; border-radius: 20px; border: 1px solid var(--line-2); background: linear-gradient(160deg, rgba(27, 18, 54, .9), rgba(10, 7, 20, .95)); }
.lg-help-i { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; color: var(--violet-soft); background: rgba(138, 18, 253, .18); }
.lg-help-i svg { width: 24px; height: 24px; }
.lg-help div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lg-help b { font-family: var(--display); font-size: 18px; }
.lg-help div span { color: var(--muted); font-size: 14.5px; }
.lg-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.lg-pg { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; border-radius: 16px; border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, background .2s; }
.lg-pg:hover { border-color: rgba(185, 138, 255, .45); background: rgba(138, 18, 253, .08); }
.lg-pg em { font-style: normal; font-size: 12.5px; color: var(--dim); }
.lg-pg b { font-family: var(--display); font-size: 18px; color: #fff; }
.lg-pg.prev em::before { content: "← "; }
.lg-pg.next { text-align: right; }
.lg-pg.next em::after { content: " →"; }

/* ---- the Legal centre ---- */
.lg-hub { padding-bottom: 50px; }
.lg-hub h1 { margin-top: 12px; max-width: 16ch; }
.lg-lede { margin-top: 18px; max-width: 62ch; color: var(--muted); font-size: clamp(16px, 1.35vw, 18.5px); }
.lg-promises { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; }
.lg-promises li { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; color: #d6cfe8; }
.lg-promises svg { width: 18px; height: 18px; color: var(--up); }
.lg-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 50px; }
.lg-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 22px; text-decoration: none; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(24, 16, 48, .8), rgba(12, 8, 24, .8)); transition: border-color .3s, transform .3s, box-shadow .3s; }
.lg-card:hover { border-color: rgba(185, 138, 255, .45); transform: translateY(-4px); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.lg-card .lg-badge { width: 48px; height: 48px; border-radius: 14px; }
.lg-card .lg-badge svg { width: 24px; height: 24px; }
.lg-card b { font-family: var(--display); font-size: 21px; color: #fff; margin-top: 6px; }
.lg-card > span:not(.lg-badge) { color: var(--muted); font-size: 14.5px; }
.lg-card em { margin-top: auto; padding-top: 8px; font-style: normal; font-family: var(--mono); font-size: 12.5px; color: var(--violet-soft); }
.lg-help-hub { margin: 40px 0 110px; }

@media (max-width: 1000px) { .lg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .lg-body { grid-template-columns: minmax(0, 1fr); padding-top: 30px; }
  .lg-side { position: static; max-height: none; overflow: visible; padding: 0; }
  .lg-side-h ~ .lg-side-h, .lg-toc { display: none; }
  .lg-docs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px 4px; }
  .lg-docs::-webkit-scrollbar { display: none; }
  .lg-docs a { white-space: nowrap; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 13px; }
  .lg-anchor { display: none; }
}
@media (max-width: 600px) {
  .lg-hero { padding-top: 110px; }
  .lg-badge { width: 46px; height: 46px; border-radius: 14px; }
  .lg-title { gap: 14px; }
  .lg-meta span + span::before { display: none; }
  .lg-cards { grid-template-columns: minmax(0, 1fr); }
  .lg-text p, .lg-text li { font-size: 16px; }
  .lg-help { flex-wrap: wrap; }
  .lg-pager { grid-template-columns: minmax(0, 1fr); }
  .lg-pager > span:empty { display: none; }
}
