/* SMRbot's terms and privacy pages (terms.html, privacy.html, legal.js): a short teal hero with the title and the date,
   then a narrow reading column beside a table of contents that stays at hand (on phones it folds above the text).
   Loads after brand.css and site.css. RTL first, holds at 360px. The motion plays even when the device asks for less
   motion: the owner wants the site to move.

   Contents
   - hero ......... .lg-hero .lg-hero-inner .lg-title .lg-date
   - layout ....... .lg-body > .lg-grid > nav.lg-toc (details.lg-toc-box) + article.lg-article
   - text ......... .lg-sec (h2 > .lg-n, h3, p, ul, code) .lg-points .lg-note .lg-table
   - end .......... .lg-contact (teal card) .lg-next (the other page)
   - print */

.lg-page main { overflow-x: clip; }

/* =====================================================================================================================
   Hero: the dashboard's banner scene (flat hills, the arches at the end side), shorter than the events hero
   ===================================================================================================================== */
.lg-hero {
  --scene-floor: var(--lt-page); --scene-maxw: var(--maxw);
  min-height: clamp(360px, 30vw, 460px); display: flex; align-items: center;
  padding-bottom: clamp(96px, 9vw, 136px);
}
/* low hills, so the words and the date stay on the sky */
.lg-hero .scene--banner .sc-wave { height: 30%; }
.lg-hero .scene--banner .sc-gate { height: 76%; bottom: 2%; inset-inline-end: max(3cqw, (100cqw - var(--maxw)) / 2); }
.lg-hero-inner { display: grid; gap: 14px; justify-items: start; padding-block: 18px 8px; }
.lg-hero-inner > * { max-width: 600px; }
.lg-title { font-size: clamp(36px, 4.4vw, 60px); text-shadow: 0 2px 24px rgb(6 26 28 / .35); }
.lg-hero .lead { max-width: 54ch; }
.lg-date {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; padding: 7px 14px 7px 16px; border-radius: var(--r-pill);
  background: rgb(243 231 211 / .09); box-shadow: inset 0 0 0 1px rgb(243 231 211 / .18); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: var(--cream-100); font: 700 14.5px/1.3 var(--f-body);
}
[dir="rtl"] .lg-date { padding: 7px 16px 7px 14px; }
.lg-date .ic { width: 17px; height: 17px; color: var(--yellow-500); }
.lg-date time { font-family: var(--f-latin); }
/* below 1040px the words and the arches no longer fit side by side: the words centred, the arches faint behind them
   (the banner scene hides them below 520px) */
@media (max-width: 1040px) {
  .lg-hero-inner { justify-items: center; text-align: center; }
  /* (a filter, because the gate's rise animation holds its opacity at 1) */
  .lg-hero .scene--banner .sc-gate { filter: opacity(.16); height: 64%; inset-inline: auto; left: 50%; translate: -50% 0; }
}
@media (max-width: 760px) {
  .lg-hero { min-height: 0; padding-bottom: 76px; }
  .lg-hero-inner { padding-top: 26px; }
}

/* =====================================================================================================================
   Layout: the contents on the start side, the text in a column of about 70 characters
   ===================================================================================================================== */
.lg-body { padding-top: clamp(26px, 3.6vw, 52px); }
.lg-grid {
  width: min(100% - 2 * var(--gutter), 1140px); margin-inline: auto;
  display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: clamp(32px, 4.4vw, 68px); align-items: start;
}
.lg-article { min-width: 0; max-width: 760px; }

/* the table of contents: a card that stays in view on wide screens, folded above the text on phones */
.lg-toc { position: sticky; top: calc(var(--head-h) + 22px); max-height: calc(100vh - var(--head-h) - 44px); overflow: auto; overscroll-behavior: contain; border-radius: var(--r-lg); scrollbar-width: thin; }
.lg-toc-box { background: var(--lt-card); border: 1px solid var(--lt-line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 8px; }
.lg-toc summary {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; list-style: none; cursor: pointer;
  font: 800 16px/1.3 var(--f-display); color: var(--lt-text); -webkit-tap-highlight-color: transparent;
}
.lg-toc summary::-webkit-details-marker { display: none; }
.lg-toc summary .ic { width: 20px; height: 20px; color: var(--yellow-600); }
.lg-toc summary .lg-chev { margin-inline-start: auto; color: var(--lt-muted); transition: transform .4s var(--ease-out); }
.lg-toc details[open] .lg-chev { transform: rotate(180deg); }
.lg-toc summary:focus-visible { outline: 3px solid var(--teal-600); outline-offset: 2px; }
.lg-toc ol { counter-reset: lg; margin: 2px 0 4px; padding: 0; list-style: none; display: grid; gap: 1px; }
.lg-toc li { counter-increment: lg; }
.lg-toc a {
  position: relative; display: flex; align-items: baseline; gap: 10px; padding: 7px 12px; border-radius: 10px;
  color: var(--lt-text-2); text-decoration: none; font: 500 14.5px/1.45 var(--f-body);
  transition: background-color .3s, color .3s;
}
.lg-toc a::before { content: counter(lg); min-width: 1.6em; font: 700 12.5px/1 var(--f-latin); color: var(--lt-muted); font-variant-numeric: tabular-nums; transition: color .3s; }
.lg-toc a::after {
  content: ""; position: absolute; inset-block: 8px; inset-inline-start: 0; width: 3px; border-radius: 3px; background: var(--coral-500);
  transform: scaleY(0); transition: transform .45s var(--ease-out);
}
.lg-toc a:hover { background: var(--lt-card-2); color: var(--lt-text); }
.lg-toc a[aria-current="location"] { background: var(--teal-50); color: var(--teal-800); font-weight: 700; }
.lg-toc a[aria-current="location"]::before { color: var(--coral-text); }
.lg-toc a[aria-current="location"]::after { transform: none; }
.lg-toc a:focus-visible { outline: 3px solid var(--teal-600); outline-offset: 1px; }
@media (min-width: 981px) {
  /* on wide screens the box is always open: its head is a title */
  .lg-toc summary { cursor: default; }
  .lg-toc summary .lg-chev { display: none; }
}
@media (max-width: 980px) {
  .lg-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .lg-toc { position: relative; top: auto; max-height: none; overflow: visible; }
  .lg-toc-box { padding: 4px 6px; }
  .lg-toc details[open] summary { border-bottom: 1px solid var(--lt-line); border-radius: 12px 12px 0 0; margin-bottom: 4px; }
  .lg-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 6px; }
  .lg-article { max-width: none; }
}
@media (max-width: 560px) { .lg-toc ol { grid-template-columns: minmax(0, 1fr); } }

/* =====================================================================================================================
   The text
   ===================================================================================================================== */
.lg-sec { padding-bottom: clamp(26px, 3vw, 34px); margin-bottom: clamp(26px, 3vw, 34px); border-bottom: 1px solid var(--lt-line); scroll-margin-top: calc(var(--head-h) + 20px); }
.lg-sec-last { border-bottom: 0; margin-bottom: 0; }
.lg-sec h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font: 800 clamp(22px, 2.3vw, 28px)/1.35 var(--f-display); color: var(--lt-text); }
.lg-n {
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 12px;
  background: var(--grad-teal); color: var(--yellow-500); font: 800 15px/1 var(--f-latin);
  box-shadow: inset 0 1px 0 rgb(243 231 211 / .16), 0 8px 16px -10px rgb(12 43 45 / .7);
}
.lg-sec h3 { margin: 22px 0 8px; font: 800 18px/1.45 var(--f-display); color: var(--lt-text); }
.lg-sec h2 + h3 { margin-top: 4px; }
.lg-sec p, .lg-sec li, .lg-sec td { color: var(--lt-text-2); font-size: 16.5px; line-height: 1.95; }
html[lang="en"] .lg-sec p, html[lang="en"] .lg-sec li, html[lang="en"] .lg-sec td { line-height: 1.75; }
.lg-sec p + p, .lg-sec ul + p, .lg-sec p + ul, .lg-sec table + p { margin-top: 12px; }
.lg-sec strong { color: var(--lt-text); font-weight: 800; }
.lg-sec a:not(.btn) {
  color: var(--teal-600); font-weight: 700; text-decoration: underline; text-decoration-color: rgb(46 110 114 / .35);
  text-decoration-thickness: 1.5px; text-underline-offset: 5px; transition: color .3s, text-decoration-color .3s;
}
.lg-sec a:not(.btn):hover { color: var(--coral-text); text-decoration-color: currentColor; }
.lg-sec code {
  font: 600 .9em/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; direction: ltr; unicode-bidi: isolate;
  padding: 2px 7px; border-radius: 7px; background: var(--lt-sunk); color: var(--teal-800); white-space: nowrap;
}
.lg-sec bdi { unicode-bidi: isolate; }
.lg-sec ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.lg-sec ul > li { position: relative; padding-inline-start: 24px; }
.lg-sec ul > li::before {
  content: ""; position: absolute; inset-inline-start: 5px; top: .78em; width: 7px; height: 7px; border-radius: 50%;
  background: var(--coral-500); box-shadow: 0 0 0 3px rgb(255 122 86 / .16);
}
html[lang="en"] .lg-sec ul > li::before { top: .66em; }

/* the summary: a check before each line, in a sunk card */
.lg-sec ul.lg-points { gap: 10px; padding: clamp(16px, 2vw, 22px); border-radius: var(--r-lg); background: var(--lt-card); border: 1px solid var(--lt-line); box-shadow: var(--sh-sm); }
.lg-sec ul.lg-points > li { display: flex; gap: 12px; align-items: flex-start; padding: 0; }
.lg-sec ul.lg-points > li::before { display: none; }
.lg-points > li > .ic, .lg-points > li > [data-icon] { flex: none; width: 24px; height: 24px; margin-top: 4px; padding: 4px; border-radius: 50%; background: var(--teal-100); color: var(--teal-700); box-sizing: border-box; }
.lg-points > li > [data-icon] > .ic { width: 16px; height: 16px; }
html[lang="en"] .lg-points > li > [data-icon] { margin-top: 2px; }

/* a short note under a table */
.lg-sec .lg-note {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px 16px; border-radius: 14px;
  background: var(--yellow-50); box-shadow: inset 0 0 0 1px rgb(242 174 58 / .3); color: var(--lt-text);
  font-weight: 700; font-size: 15.5px; line-height: 1.7;
}
.lg-note > [data-icon], .lg-note > .ic { flex: none; margin-top: 3px; color: var(--yellow-700); }

/* the retention table: two columns, which stack on phones */
.lg-table { width: 100%; margin-top: 6px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--lt-line); border-radius: var(--r-lg); overflow: hidden; background: var(--lt-card); box-shadow: var(--sh-sm); }
.lg-table th { padding: 12px 18px; background: var(--lt-card-2); color: var(--lt-text); font: 800 14.5px/1.4 var(--f-display); text-align: start; border-bottom: 1px solid var(--lt-line); }
.lg-table td { padding: 11px 18px; vertical-align: top; font-size: 15.5px; line-height: 1.7; border-top: 1px solid var(--lt-line); }
.lg-table tbody tr:first-child td { border-top: 0; }
.lg-table td:first-child { width: 56%; color: var(--lt-text); font-weight: 600; }
.lg-table tbody tr:nth-child(even) td { background: rgb(251 245 234 / .55); }
@media (max-width: 600px) {
  .lg-table, .lg-table tbody, .lg-table tr, .lg-table td { display: block; width: auto; }
  .lg-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lg-table tr { padding: 11px 16px; border-top: 1px solid var(--lt-line); }
  .lg-table tbody tr:first-child { border-top: 0; }
  .lg-table td { padding: 0; border: 0; }
  .lg-table td:first-child { width: auto; }
  .lg-table td + td { margin-top: 2px; color: var(--lt-muted); font-size: 15px; }
  .lg-table tbody tr:nth-child(even) { background: rgb(251 245 234 / .55); }
  .lg-table tbody tr:nth-child(even) td { background: none; }
}

/* =====================================================================================================================
   The end: the developer's card, then the other page
   ===================================================================================================================== */
.lg-contact { margin-top: 18px; display: grid; gap: 14px; justify-items: start; padding: clamp(18px, 2.4vw, 26px); }
.lg-sec .lg-contact-t { display: inline-flex; align-items: center; gap: 10px; color: var(--cream-100); font: 800 18px/1.4 var(--f-display); }
.lg-contact-t .ic { width: 22px; height: 22px; color: var(--yellow-500); }
.lg-contact bdi { font-family: var(--f-latin); }
.lg-contact .btn-ghost { color: var(--cream-100); }

.lg-next { display: flex; align-items: center; gap: 16px; margin-top: clamp(30px, 4vw, 44px); }
.lg-next-ic { display: inline-grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--grad-teal); color: var(--yellow-500); box-shadow: var(--sh-sm); }
.lg-next-ic .ic { width: 24px; height: 24px; }
.lg-next-t { display: grid; gap: 2px; flex: 1; min-width: 0; }
.lg-next-t small { color: var(--coral-text); font: 700 13px/1.3 var(--f-body); }
.lg-next-t b { color: var(--lt-text); font: 800 18px/1.4 var(--f-display); }
.lg-next-t > span { color: var(--lt-muted); font-size: 15px; line-height: 1.6; }
@media (max-width: 560px) {
  .lg-next { flex-wrap: wrap; }
  .lg-next .btn { flex: 1 1 100%; }
}

/* =====================================================================================================================
   Print: the text alone
   ===================================================================================================================== */
@media print {
  .site-head, .sh-sheet, .site-foot, .lg-toc, .lg-next, .lg-contact .btn-row, [data-scene], .skip-link { display: none !important; }
  .site { background: #fff; }
  .lg-hero { min-height: 0; padding: 0 0 12px; background: none; color: var(--lt-text); }
  .lg-hero .lead, .lg-date { color: var(--lt-muted); box-shadow: none; background: none; }
  .lg-hero .eyebrow { display: none; }
  .lg-grid { display: block; width: auto; }
  .lg-sec { break-inside: auto; }
  .lg-contact { background: none; color: var(--lt-text); box-shadow: none; border: 1px solid var(--lt-line); }
  .lg-sec .lg-contact-t { color: var(--lt-text); }
  [data-reveal], .intro > * { opacity: 1 !important; transform: none !important; animation: none !important; filter: none !important; }
}
