/* Shared part "legal" (data-part="legal"; js/sections/_shared/legal.js). Round 3, phase 2: Naalai's papers, the
   privacy policy, terms of use, refunds, cookies, parent consent and the community guidelines, each its own page
   (sections/<page>/01-doc.html). Restyled from the owner's approved v2 pages, in the paper world:
   - a head with the title, the version and date as two paper labels, the lead, and a small paper scene on the right;
   - a row of folder tabs (one per paper) that joins the sheet below it, the current paper's tab in front;
   - one big cream sheet: a sticky "On this page" list on wide screens (a fold-out list on phones) and the text, with
     numbered sun badges for the parts, paper tables (stacked cards on phones) and "in plain words" cards;
   - notes for the owner: anything new in this draft is a pink sticky note (or a pink flag on a new line), anything
     changed is a lemon one, so the owner can find every addition before the pages go live.
   Reading comes first: body text 18 px (17 on phones), ink colours only, lines of about 65 characters, no motion on the
   text itself. Motion: the lead and labels rise in, the cards are dealt on twos, the scene idles (life.css). */

.lg { padding-top: clamp(40px, 5.5vw, 80px); padding-bottom: clamp(72px, 9vw, 130px); }

/* ---------- Head */
.lg__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px clamp(24px, 4vw, 72px); }
.lg__intro { max-width: 46rem; }
.lg__kick { display: flex; align-items: center; gap: 10px; font: 800 15px/1.2 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.lg__kick::before { content: ""; flex: none; width: 26px; height: 4px; border-radius: 3px; background: var(--sun-deep); box-shadow: 0 1px 0 rgba(90, 42, 0, .25); }
.lg__h { margin-top: 14px; font-size: clamp(42px, 5.4vw, 78px); line-height: 1.02; letter-spacing: -.02em; }
.lg__meta { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 20px; }
.lg__meta > span { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 15px; border-radius: 10px 12px 9px 11px / 11px 9px 12px 10px;
  font: 800 15.5px/1.25 var(--font-body); }
.lg__ver { background: var(--ink); color: #FFFFFF; rotate: -1.5deg; box-shadow: 0 1px 1px rgba(11, 26, 85, .4), 0 6px 10px -6px rgba(11, 26, 85, .5); }
.lg__eff { background: var(--card); color: var(--ink); rotate: .8deg; box-shadow: inset 0 0 0 2px rgba(30, 42, 90, .14), 0 1px 1px rgba(90, 42, 0, .18); }
.lg__eff--draft { background: var(--pink); color: #6E1C35; box-shadow: 0 1px 1px rgba(90, 42, 0, .2); }
.lg__lead { margin-top: 22px; max-width: 40em; font-size: var(--t-lead); line-height: 1.55; color: var(--ink); }

/* the small paper scene beside the title (decorative; each paper has its own, below) */
.lg__art { position: relative; width: clamp(210px, 22vw, 310px); aspect-ratio: 1 / .92; margin-bottom: -6px; pointer-events: none; }
.lg__art > * { position: absolute; display: block; max-width: none; height: auto; }

/* ---------- The papers: folder tabs joined to the sheet */
.lg-tabs { position: relative; z-index: 2; margin-top: clamp(30px, 4vw, 52px); }
.lg-tabs ul { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; padding-inline: clamp(14px, 2.4vw, 30px); }
.lg-tabs a { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 6px; margin-bottom: -6px;
  border-radius: 14px 16px 0 0 / 14px 16px 0 0; background: var(--paper-deep); color: var(--ink-2); font: 800 16px/1 var(--font-body); text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -8px 10px -10px rgba(90, 42, 0, .35);
  transition: translate var(--m-quick, 200ms) var(--m-settle, ease), background-color var(--m-quick, 200ms) var(--m-settle, ease); translate: 0 4px; }
.lg-tabs a::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--lg-dot, var(--sun-deep)); box-shadow: 0 1px 0 rgba(90, 42, 0, .25); }
.lg-tabs li:nth-child(2) a { --lg-dot: var(--blue); }
.lg-tabs li:nth-child(3) a { --lg-dot: var(--leaf); }
.lg-tabs li:nth-child(4) a { --lg-dot: var(--coral); }
.lg-tabs li:nth-child(5) a { --lg-dot: var(--grape); }
.lg-tabs li:nth-child(6) a { --lg-dot: #2A9D8F; }
@media (hover: hover) and (pointer: fine) { .lg-tabs a:not([aria-current]):hover { translate: 0 0; color: var(--ink); background: #FBEBD0; } }
.lg-tabs a:active { translate: 0 6px; transition-duration: var(--m-press, 100ms); }
.lg-tabs a[aria-current="page"] { z-index: 2; translate: 0 0; background: var(--card); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9); }
.lg-tabs a:focus-visible { outline-offset: -3px; }

/* ---------- The sheet */
.lg__sheet { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px);
  padding: clamp(30px, 4vw, 60px) clamp(28px, 4.4vw, 64px) clamp(36px, 4.4vw, 64px); background: var(--card); color: var(--ink);
  border-radius: 8px 26px 24px 28px / 8px 24px 28px 26px;
  box-shadow: var(--pk-edge-light), 0 1px 1.5px rgba(90, 42, 0, .26), 0 34px 56px -30px rgba(90, 42, 0, .45); }
.lg__sheet::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: url(/assets/art/textures/grain-tile.webp) 0 0 / 256px 256px; mix-blend-mode: multiply; opacity: .35; }

/* "On this page": sticky beside the text on wide screens */
.lg__toc { position: sticky; top: 104px; align-self: start; max-height: calc(100vh - 124px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.lg__toc details > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; list-style: none; cursor: pointer;
  font: 800 15px/1.2 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); border-radius: 8px; }
.lg__toc details > summary::-webkit-details-marker { display: none; }
.lg__toc details > summary::after { content: ""; flex: none; width: 10px; height: 10px; margin-right: 6px; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor;
  rotate: 45deg; translate: 0 -3px; transition: rotate var(--m-small, 400ms) var(--m-spring, ease); }
.lg__toc details:not([open]) > summary::after { rotate: -45deg; translate: -2px 0; }
.lg__toc ol { display: grid; gap: 2px; margin-top: 6px; }
.lg__toc a { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: baseline; gap: 6px; min-height: 40px; padding: 8px 10px 8px 6px;
  border-radius: 10px 12px 9px 11px / 11px 9px 12px 10px; color: var(--ink-2); font: 700 16px/1.3 var(--font-body); text-decoration: none;
  transition: background-color var(--m-quick, 200ms) var(--m-settle, ease), color var(--m-quick, 200ms) var(--m-settle, ease); }
.lg__toc a i { font: 800 15px/1 var(--font-display); font-style: normal; color: var(--ink-2); text-align: right; }
@media (hover: hover) and (pointer: fine) { .lg__toc a:hover { background: var(--paper); color: var(--ink); } }
.lg__toc a[aria-current] { background: var(--lemon); color: var(--ink); box-shadow: 0 1px 1px rgba(90, 42, 0, .18); }
.lg__toc a[aria-current] i { color: var(--ink); }

/* ---------- The text */
.lg__doc { min-width: 0; max-width: 40rem; } /* about 74 characters a line at 18 px */
.lg__doc > * + * { margin-top: 24px; }
.lg__doc > .lg-draft + * { margin-top: 18px; }
.lg__doc p, .lg__doc li, .lg__doc dd { font-size: var(--t-body); line-height: 1.65; color: var(--ink); }
.lg__doc a:not([class]) { color: var(--blue-deep); font-weight: 700; text-decoration-thickness: 1.5px; overflow-wrap: anywhere; }
.lg__doc :is(strong, b) { font-weight: 800; }
.lg__doc em { font-style: normal; font-weight: 700; background: linear-gradient(transparent 58%, rgba(255, 203, 61, .55) 58%); }
.lg__doc code { font: 700 .9em/1.3 ui-monospace, "Cascadia Mono", Consolas, monospace; padding: 1px 6px; border-radius: 6px; background: var(--paper); color: var(--ink); overflow-wrap: anywhere; }
.lg__part { scroll-margin-top: 100px; }
.lg__part + .lg__part { margin-top: clamp(34px, 3.4vw, 48px); padding-top: clamp(30px, 3vw, 42px); border-top: 2px dashed rgba(30, 42, 90, .12); }
.lg__part > h2 { display: flex; align-items: center; gap: 14px; font-size: clamp(24px, 2.2vw, 31px); line-height: 1.15; }
.lg__n { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sun); color: var(--ink); rotate: -6deg;
  font: 800 21px/1 var(--font-display); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 1px rgba(90, 42, 0, .3), 0 6px 10px -6px rgba(90, 42, 0, .45); }
.lg__part:nth-of-type(3n + 2) .lg__n { background: var(--sky); rotate: 5deg; }
.lg__part:nth-of-type(3n + 3) .lg__n { background: var(--mint); rotate: -3deg; }
.lg__part h3 { margin-top: 28px; font-size: clamp(19.5px, 1.6vw, 23px); line-height: 1.2; }
.lg__part > * + * { margin-top: 16px; }
.lg__part > h2 + * { margin-top: 18px; }
.lg__part > h3 + * { margin-top: 10px; }
/* lists: paper dots, the second level smaller and blue */
.lg__list { display: grid; gap: 10px; }
.lg__list > li { position: relative; padding-left: 28px; }
.lg__list > li::before { content: ""; position: absolute; left: 5px; top: .66em; width: 10px; height: 10px; border-radius: 50%; background: var(--sun-deep);
  box-shadow: 0 1px 1px rgba(90, 42, 0, .3); }
.lg__list .lg__list { margin-top: 10px; gap: 8px; }
.lg__list .lg__list > li::before { width: 8px; height: 8px; top: .72em; background: var(--card); box-shadow: inset 0 0 0 2.5px var(--blue); }

/* "In plain words": small paper cards with one picture each */
/* three cards: one wide card each (the approved words are long); four: two by two */
.lg-sum { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: clamp(30px, 3vw, 42px); }
.lg-sum:has(> li:nth-child(4)) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.lg-sum > li { position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr); align-content: start; gap: 2px 12px; padding: 16px 16px 16px 12px;
  border-radius: 12px 15px 11px 14px / 14px 11px 15px 12px; background: var(--paper); rotate: var(--t, -.6deg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 1px rgba(90, 42, 0, .22), 0 10px 18px -12px rgba(90, 42, 0, .45); }
.lg-sum > li:nth-child(2) { --t: .5deg; background: #FFF1D6; }
.lg-sum > li:nth-child(3) { --t: -.3deg; background: #EEF5FF; }
.lg-sum > li:nth-child(4) { --t: .7deg; background: #EDF8F1; }
.lg-sum img { grid-row: span 2; width: 64px; height: 64px; max-width: none; margin: -6px 0 -8px -6px; }
.lg-sum b { font: 800 19px/1.25 var(--font-display); color: var(--ink); padding-top: 2px; }
.lg-sum span { font: 600 16px/1.45 var(--font-body); color: var(--ink-2); }

/* tables: a paper table; on phones every row is its own small card with its labels */
.lg-table { border-radius: 14px; overflow: hidden; background: var(--card); box-shadow: inset 0 0 0 2px rgba(30, 42, 90, .1); }
.lg-table table { width: 100%; border-collapse: collapse; }
.lg-table th { padding: 12px 14px; text-align: left; vertical-align: bottom; background: var(--lemon); color: var(--ink); font: 800 15.5px/1.3 var(--font-body); }
.lg-table td { padding: 12px 14px; vertical-align: top; border-top: 1.5px dashed rgba(30, 42, 90, .14); font-size: 16.5px; line-height: 1.5; color: var(--ink); }
.lg-table tbody tr:nth-child(even) td { background: rgba(255, 244, 226, .65); }
.lg-table td:first-child { font-weight: 800; }
.lg-table tr.is-new td { background: #FFF0F3; }
.lg-table tr.is-new td:first-child { box-shadow: inset 4px 0 0 #F29BB2; }

/* ---------- Notes for the owner (role="note"): new in this draft (pink), changed in this draft (lemon) */
.lg-new { position: relative; padding: 20px 20px 18px; border-radius: 4px 5px 16px 4px / 4px 5px 8px 4px; rotate: -.35deg;
  background: linear-gradient(135deg, transparent 64%, rgba(90, 42, 0, .06)), var(--pink); color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 1px rgba(90, 42, 0, .18), 5px 12px 16px -12px rgba(90, 42, 0, .42); }
.lg-new::before { content: ""; position: absolute; top: -10px; left: 50%; width: 86px; height: 22px; translate: -50% 0; rotate: -3deg; pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 60%), rgba(250, 244, 230, .75);
  clip-path: polygon(0 9%, 4% 0, 96% 3%, 100% 14%, 97% 32%, 100% 51%, 96.5% 70%, 100% 88%, 95% 100%, 5% 97%, 0 86%, 3% 66%, 0 47%, 3.5% 28%); }
.lg-new__h { display: block; margin-bottom: 6px; font: 800 15px/1.3 var(--font-body); letter-spacing: .05em; text-transform: uppercase; color: #7A1E3A; }
.lg-new p, .lg-new li { font-size: 16.5px; line-height: 1.55; }
.lg-new p + p { margin-top: 8px; }
.lg-new--changed { background: linear-gradient(135deg, transparent 64%, rgba(90, 42, 0, .06)), var(--lemon); rotate: .3deg; }
.lg-new--changed .lg-new__h { color: #6B400C; }
.lg-new q { quotes: "“" "”"; font-style: normal; }
/* a pink flag on a line that is new in this draft */
.lg-flag { display: inline-flex; align-items: center; min-height: 26px; margin-left: 6px; padding: 2px 10px; border-radius: 13px; vertical-align: 1px;
  background: var(--pink); color: #7A1E3A; font: 800 15px/1.25 var(--font-body); letter-spacing: .01em; }
.lg-flag--changed { background: var(--lemon); color: #6B400C; }
.lg__list > li.is-new::before { background: #E8577A; }
/* a block added in this draft: a pink rule down its side */
.lg-add { position: relative; padding-left: 18px; box-shadow: inset 4px 0 0 #F29BB2; border-radius: 2px; }

/* the line under the title on drafts and restyled papers */
.lg-draft { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 12px 14px 11px 13px / 13px 11px 14px 12px;
  background: var(--paper); box-shadow: inset 0 0 0 2px rgba(30, 42, 90, .1); }
.lg-draft p { font-size: 16.5px; line-height: 1.5; }
.lg-draft::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 5px; border-radius: 50%; background: var(--pink); box-shadow: inset 0 0 0 3px #E8577A; }

/* a contact card at the end of a paper (the grievance contact as the approved pages give it) */
.lg-contact { padding: 18px 20px; border-radius: 14px 16px 13px 15px / 15px 13px 16px 14px; background: #EEF5FF; box-shadow: inset 0 0 0 2px rgba(35, 70, 198, .12); }
.lg-contact p + p { margin-top: 8px; }

/* consent: the screen a parent sees, drawn as paper inside a paper phone (not a form; nothing here is saved) */
.lg-screen { display: flex; flex-wrap: wrap; align-items: center; gap: 22px clamp(24px, 4vw, 48px); margin: 0; } /* a figure: no default side margins */
.lg-phone { flex: none; aspect-ratio: auto; }
/* the phone grows with its screen (the kit's phone has a fixed shape; this screen must never be cut off) */
.lg-phone .pk-phone__body { position: relative; inset: auto; }
.lg-phone .pk-phone__screen { height: auto; padding-bottom: 4.5cqi; }
.lg-consent { display: grid; gap: 8px; }
.lg-consent__row { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 10px; row-gap: 3px; align-items: start; padding: 10px 11px;
  border-radius: 12px 13px 11px 12px / 12px 11px 13px 12px; background: var(--card); box-shadow: 0 1px 1px rgba(90, 42, 0, .16), 0 6px 10px -8px rgba(90, 42, 0, .3); }
.lg-consent__row > .pk-mark { --pk-mark-size: 24px; grid-column: 1; grid-row: 1 / span 2; margin-top: 1px; }
.lg-consent__t { grid-column: 2; display: block; font: 800 15px/1.3 var(--font-body); color: var(--ink); }
.lg-consent__t .tag { height: auto; min-height: 22px; margin-left: 2px; padding: 1px 8px; font-size: 12.5px; vertical-align: 1px; }
.lg-consent__d { grid-column: 2; font: 600 13.5px/1.42 var(--font-body); color: var(--ink-2); }
.lg-consent__sign { display: grid; gap: 4px; padding: 8px 12px 10px; border-radius: 12px; background: var(--card); box-shadow: 0 1px 1px rgba(90, 42, 0, .16); }
.lg-consent__sign svg { width: 140px; height: 40px; overflow: visible; }
.lg-consent__sign i { display: block; height: 2px; border-radius: 2px; background: rgba(30, 42, 90, .3); }
.lg-consent__sign span { font: 700 13.5px/1.3 var(--font-body); color: var(--ink-2); }
.lg-screen__note { flex: 1 1 14rem; max-width: 20rem; font: 700 17px/1.5 var(--font-body); color: var(--ink-2); }
.lg-screen__note::before { content: ""; display: block; width: 44px; height: 4px; margin-bottom: 12px; border-radius: 3px; background: var(--sun-deep); }

/* the cookie table: the names keep whole on wide screens; the "new" flag sits under its name */
.lg--cookies .lg-table th:first-child { width: 31%; }
.lg-table .lg-flag { display: flex; width: max-content; margin: 6px 0 0; white-space: nowrap; }
@media (min-width: 760px) { .lg-table code { white-space: nowrap; overflow-wrap: normal; } .lg-table td:first-child code { display: inline-block; margin: 0 4px 3px 0; } }

/* ---------- Each paper's little scene (decorative) */
.lg__art--privacy .lg__a--moon { left: 0; top: 4%; width: 72%; }
.lg__art--privacy .lg__a--disc { right: 0; bottom: 2%; width: 42%; }
.lg__art--privacy .lg__a--star { right: 14%; top: 0; width: 13%; }
.lg__art--privacy .lg__a--star2 { left: 74%; top: 30%; width: 9%; }
.lg__art--terms .lg__a--form { left: 4%; top: 6%; width: 50%; rotate: -8deg; }
.lg__art--terms .lg__a--sun { right: 0; bottom: 0; width: 60%; }
.lg__art--terms .lg__a--pen { left: 40%; top: 0; width: 22%; rotate: 12deg; }
.lg__art--refunds .lg__a--sun { left: 0; top: 2%; width: 66%; }
.lg__art--refunds .lg__a--coin1 { right: 6%; bottom: 8%; width: 30%; rotate: -12deg; }
.lg__art--refunds .lg__a--coin2 { right: 30%; bottom: 0; width: 22%; rotate: 9deg; }
.lg__art--refunds .lg__a--star { right: 4%; top: 6%; width: 14%; }
.lg__art--cookies .lg__a--board { left: 0; top: 10%; width: 82%; rotate: -2deg; }
.lg__art--cookies .lg__a--disc { right: 0; bottom: 0; width: 38%; }
.lg__art--consent .lg__a--amma { left: 10%; bottom: 0; height: 100%; width: auto; }
.lg__art--consent .lg__a--form { right: 2%; top: 18%; width: 44%; rotate: 7deg; }
.lg__art--consent .lg__a--disc { right: 30%; bottom: 0; width: 30%; }
.lg__art--guidelines { aspect-ratio: 1 / .82; }
.lg__art--guidelines .lg__a--p1 { left: 4%; bottom: 0; height: 88%; width: auto; }
.lg__art--guidelines .lg__a--p2 { left: 36%; bottom: 0; height: 93%; width: auto; }
.lg__art--guidelines .lg__a--p3 { left: 68%; bottom: 0; height: 90%; width: auto; }
.lg__art--guidelines .lg__a--chat { left: 16%; top: -10%; width: 18%; }
.lg__art [data-idle="sway"] { transform-origin: 50% 100%; --idle-a: 1.4deg; }

/* ---------- Narrower screens */
@media (max-width: 1099.98px) {
  .lg__sheet { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .lg__toc { position: static; max-height: none; overflow: visible; }
  .lg__toc details { border-radius: 14px; background: var(--paper); padding: 4px 14px 8px; box-shadow: inset 0 0 0 2px rgba(30, 42, 90, .08); }
  .lg__toc ol { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); column-gap: 10px; }
  .lg__toc, .lg__doc { width: 100%; max-width: 41rem; margin-inline: auto; } /* about 75 characters a line */
}
@media (max-width: 759.98px) {
  .lg-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lg-table table, .lg-table tbody, .lg-table tr, .lg-table td { display: block; width: 100%; }
  .lg-table tbody tr { padding: 12px 14px 14px; border-top: 1.5px dashed rgba(30, 42, 90, .16); }
  .lg-table tbody tr:first-child { border-top: 0; }
  .lg-table tbody tr:nth-child(even) { background: rgba(255, 244, 226, .65); }
  .lg-table tbody tr:nth-child(even) td { background: none; }
  .lg-table tr.is-new { background: #FFF0F3; box-shadow: inset 4px 0 0 #F29BB2; }
  .lg-table tr.is-new td, .lg-table tr.is-new td:first-child { background: none; box-shadow: none; }
  .lg-table td { padding: 2px 0; border: 0; }
  .lg-table td + td { margin-top: 6px; }
  .lg-table td[data-th]:not(:first-child)::before { content: attr(data-th); display: block; font: 800 15px/1.3 var(--font-body); color: var(--ink-2); letter-spacing: .01em; }
  .lg-table td:first-child { font-size: 17.5px; }
  .lg-screen { grid-template-columns: minmax(0, 1fr); }
  .lg-screen__note { max-width: none; }
}
/* below 900 px the six papers do not fit one row of folder tabs: they become paper pills that wrap */
@media (max-width: 899.98px) {
  .lg-tabs ul { padding-inline: 0; gap: 8px; }
  .lg-tabs a { min-height: 44px; padding: 0 14px; margin-bottom: 0; border-radius: 999px; translate: none; box-shadow: inset 0 0 0 2px rgba(30, 42, 90, .1); background: var(--card); font-size: 15.5px; }
  .lg-tabs a[aria-current="page"] { background: var(--ink); color: #FFFFFF; box-shadow: none; }
  .lg-tabs a[aria-current="page"]::before { box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }
  .lg-tabs { margin-bottom: 16px; }
  .lg__sheet { border-radius: 22px 26px 24px 28px / 26px 22px 28px 24px; }
  .lg-tabs a:active { translate: 0 1px; }
}
@media (max-width: 699.98px) {
  .lg__head { grid-template-columns: minmax(0, 1fr); }
  .lg__art { order: -1; width: 170px; margin-bottom: -10px; }
  .lg__art--guidelines { width: 200px; }
  .lg__sheet { padding: 24px 18px 30px; border-radius: 18px 22px 20px 24px / 22px 18px 24px 20px; }
  .lg__part > h2 { gap: 12px; }
  .lg__n { width: 38px; height: 38px; font-size: 19px; }
  .lg-sum > li { rotate: 0deg; }
  .lg-new { padding: 20px 16px 16px; rotate: 0deg; }
  .lg-flag { display: flex; width: fit-content; margin: 6px 0 0; } /* on its own line under the words it marks */
}

/* ---------- Motion: the labels and lead rise in (motion.js enter); the cards are dealt on twos; the scene drops in */
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.rm) .lg [data-b].b-wait:not(.b-in) { opacity: 0; }
  .lg [data-b="card"].b-in { animation: lg-deal 500ms steps(1, end) var(--b-at, 0ms) both; }
  .lg [data-b="scene"].b-in { animation: lg-drop 580ms steps(1, end) var(--b-at, 0ms) both; }
}
/* the scene beside the title plays on the first view: its pre-state needs no script (failsafe after 2.4 s) */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .lg [data-b="scene"]:not(.b-in) { opacity: 0; animation: lg-fail 1ms 2.4s forwards; }
}
@keyframes lg-fail { to { opacity: 1; } }
@keyframes lg-deal {
  0% { opacity: 0; transform: translate(-2%, -22px) rotate(-2.4deg) scale(1.03); }
  16.67% { opacity: 1; transform: translate(-1%, -11px) rotate(-1.2deg) scale(1.015); }
  33.33% { transform: translate(-.3%, -4px) rotate(-.4deg); }
  50%, 100% { opacity: 1; transform: none; }
}
@keyframes lg-drop {
  0% { opacity: 0; transform: translateY(-26px) scale(1.04); }
  14.3% { opacity: 1; transform: translateY(-14px) scale(1.02); }
  28.6% { transform: translateY(-5px); }
  42.9% { transform: translateY(2px); }
  57.1%, 100% { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lg [data-b] { animation: none !important; opacity: 1 !important; transform: none !important; }
  .lg-tabs a, .lg__toc a, .lg__toc details > summary::after { transition: none; }
}
@media (prefers-contrast: more) {
  .lg__sheet, .lg-table, .lg-sum > li, .lg-draft { box-shadow: inset 0 0 0 2px var(--ink); }
  .lg__sheet::after { display: none; }
  .lg-sum span, .lg__toc a { color: var(--ink); }
}
@media (forced-colors: active) {
  .lg__sheet, .lg-sum > li, .lg-new, .lg-table, .lg-draft, .lg-contact { border: 1px solid CanvasText; }
  .lg-tabs a { border: 1px solid CanvasText; }
  .lg__list > li::before { background: CanvasText; }
}

/* consent screen tags: needed (mint) and optional (sky), the same paper chips as the app's own words */
.lg-tag--need { background: var(--mint); color: #1F6B3A; }
.lg-tag--opt { background: var(--sky); color: var(--blue-deep); }

/* R6 (9 Nov): the papers strip on one quiet row (scrolls sideways when narrow); no colour dots */
.lg-tabs ul { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; gap: 4px; padding-bottom: 0; -webkit-mask: linear-gradient(90deg, #000 92%, transparent); mask: linear-gradient(90deg, #000 92%, transparent); }
.lg-tabs ul::-webkit-scrollbar { display: none; }
.lg-tabs a { min-height: 42px; padding: 0 14px 5px; font-size: 14.5px; white-space: nowrap; gap: 0; }
.lg-tabs a::before { display: none; }
@media (max-width: 760px) { .lg-tabs a { min-height: 40px; padding: 0 12px 4px; font-size: 14px; } }

.lg__art--terms .lg__a--sun.start__suri { right: 0; bottom: 0; width: 56%; height: auto; }
