/* legal.css: the legal and support pages (privacy, terms, support, delete-account, modern-slavery), on top of mw.css
   (its tokens, header, menu, footer, buttons, crumbs and tables of contents). Loaded only by those pages.
   Their words are kept verbatim (tools/site/content/legal/), so the look is set here on the classes they already use:
   .doc, .upd, .note, .support-card, .sub, .field, .steps, .datatable, .pill, .note-box. The site has one light look
   (no dark theme), like every other page. Logical properties throughout. */

/* ?app=1 (opened from the Android apps): the website-only parts, the site navigation and the Black Friday strip go */
html.app .web-only, html.app .bf-strip { display: none !important; }

.legal { margin-top: 10px; margin-bottom: 40px; }
.tint-sky { --tint: #EAF4FF; --mark: var(--sky); }
.tint-lemon { --tint: #FFFBEA; --mark: var(--lemon); }
.tint-mint { --tint: #EAF7EF; --mark: var(--mint); }
.tint-pink { --tint: #FBEAF0; --mark: var(--pink); }
.tint-lav { --tint: #F1ECFB; --mark: var(--lav); }

/* the opening: the page title, its date and its first lines, in a tinted card like the Help Centre's */
.legal-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: center; margin: 0 0 22px;
  padding: clamp(18px, 3.4vw, 36px); background: var(--tint); border: 3px solid var(--stroke); border-radius: var(--r);
  box-shadow: 0 var(--lip) 0 var(--stroke); }
@media (min-width: 760px) { .legal-hero.with-art { grid-template-columns: minmax(0, 1fr) 150px; } }
.legal-hero h1 { font-size: clamp(32px, 5vw, 52px); margin: 0 0 12px; overflow-wrap: anywhere; }
.legal-hero p { max-width: 72ch; }
.lh-copy > :last-child { margin-bottom: 0; }
.lh-art { justify-self: center; width: 120px; }
.lh-art .doc-av { width: 100%; }
@media (max-width: 759px) { .lh-art { display: none; } }

/* the date line: a chip with a calendar */
.legal .upd { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 13px 6px 10px; font: 700 14px/1.25 var(--display);
  color: var(--ink); background: var(--card); border: 2px solid var(--stroke); border-radius: 99px; }
.legal .upd::before { content: ''; flex: 0 0 18px; width: 18px; height: 18px; background: no-repeat center / contain
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='3' fill='%23fff' stroke='%232A2A2A' stroke-width='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4' stroke='%232A2A2A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
/* the plain-English summary (privacy) */
.legal .note { margin: 0 0 16px; padding: 12px 16px; background: var(--card); border: 3px solid var(--stroke); border-radius: 16px;
  box-shadow: 0 4px 0 var(--stroke); font-weight: 600; }
.legal .lg-party, .legal-hero .sub { color: var(--ink-2); }
.legal-hero .sub { font-size: clamp(17px, 1.6vw, 19px); }

/* the sections: beside their contents list on wide screens */
.legal-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
@media (min-width: 1040px) {
  .legal-grid.with-toc { grid-template-columns: 250px minmax(0, 1fr); }
  .legal-toc.toc-desk { max-height: calc(100vh - var(--head-h) - 32px); overflow: auto; }
}
.legal-toc ol { gap: 6px; }
.legal-toc li { line-height: 1.35; }
.legal-body > .toc-mob { margin: 0 0 22px; background: var(--tint); box-shadow: none; }
.legal-body > .toc-mob summary { margin: 0; padding: 4px 0; }
.legal-body > .toc-mob[open] summary { margin-bottom: 8px; }

/* the document: one white card */
.legal-body { min-width: 0; padding: clamp(18px, 4vw, 44px); background: var(--card); border: 3px solid var(--stroke); border-radius: var(--r);
  box-shadow: 0 var(--lip) 0 var(--stroke); }
.legal-body.plain { padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.legal-body > h2:first-child, .legal-body > .toc-mob + h2 { margin-top: 0; }
.legal-body h2 { display: flex; align-items: center; gap: 10px; font-size: clamp(22px, 2.6vw, 27px); margin: 32px 0 10px;
  scroll-margin-top: calc(var(--head-h) + 16px); }
.legal-body h2::before { content: ''; flex: 0 0 auto; width: 14px; height: 14px; border-radius: 5px; background: var(--mark); border: 2.5px solid var(--stroke); }
.legal-body h3 { font: 800 clamp(18px, 2vw, 20px)/1.3 var(--display); margin: 24px 0 8px; scroll-margin-top: calc(var(--head-h) + 16px); }   /* age-suitability.html's sub-sections */
.legal h2.sec { padding-block: 0; }   /* mw.css .sec is a page section's padding */
.legal p, .legal li { max-width: 74ch; }
.legal a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.legal a:hover { text-decoration-color: var(--gold-d); }
.legal b, .legal strong { font-weight: 700; }
.legal-body ul { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 10px; }
.legal-body ul > li { position: relative; padding-inline-start: 26px; }
.legal-body ul > li::before { content: ''; position: absolute; inset-inline-start: 3px; top: .55em; width: 11px; height: 11px; border-radius: 4px;
  background: var(--mark); border: 2px solid var(--stroke); }
.legal-body ul ul { margin: 8px 0 8px; gap: 6px; }
.legal-body ul ul > li { padding-inline-start: 20px; }
.legal-body ul ul > li::before { inset-inline-start: 5px; top: .7em; width: 7px; height: 7px; border: 0; border-radius: 50%; background: var(--ink-2); }

/* numbered steps (delete-account) */
.legal .steps { list-style: none; counter-reset: s; margin: 14px 0 16px; padding: 0; display: grid; gap: 12px; }
.legal .steps li { counter-increment: s; position: relative; min-height: 32px; padding-inline-start: 46px; }
.legal .steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: -2px; width: 32px; height: 32px; display: grid; place-items: center;
  font: 700 16px/1 var(--display); background: var(--lemon); border: 2.5px solid var(--stroke); border-radius: 10px; }

/* what is deleted and what is kept (delete-account) */
.lg-table { overflow-x: auto; margin: 12px 0 20px; background: var(--card); border: 3px solid var(--stroke); border-radius: 16px; box-shadow: 0 4px 0 var(--stroke); }
.datatable { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.datatable th, .datatable td { text-align: start; vertical-align: top; padding: 11px 13px; border-bottom: 2px solid var(--line); }
.datatable tr:last-child td { border-bottom: 0; }
.datatable td + td, .datatable th + th { border-inline-start: 2px solid var(--line); }
.datatable th { background: var(--tint); font: 700 15px/1.3 var(--display); }
.datatable td:first-child { width: 52%; }
.legal .pill { display: inline-block; margin: 0 6px 4px 0; padding: 3px 10px; font: 700 13px/1.4 var(--display); color: var(--ink);
  border: 2px solid var(--stroke); border-radius: 99px; box-shadow: none; white-space: nowrap; }
.legal .pill.del { background: var(--pink); }
.legal .pill.keep { background: var(--sky); }
.legal .note-box { font-size: 16px; }

/* the forms (support and delete-account): fields as on the Help Centre's contact form */
.legal form { display: grid; gap: 16px; }
.legal-support form { margin: 0 0 18px; padding: clamp(16px, 3vw, 26px); background: var(--card); border: 3px solid var(--stroke); border-radius: var(--r);
  box-shadow: 0 var(--lip) 0 var(--stroke); }
.legal-delete-account form { margin: 14px 0 12px; padding: clamp(14px, 3vw, 22px); background: var(--paper); border: 3px solid var(--stroke); border-radius: 18px; }
.legal .field { display: grid; gap: 6px; }
.legal .field label { font: 700 16px/1.3 var(--display); }
.legal .lg-opt { font: 500 15px/1.3 var(--body); color: var(--ink-2); }
.legal input[type=text], .legal input[type=email], .legal select, .legal textarea { width: 100%; min-height: 48px; padding: 10px 12px;
  font: 500 16px/1.4 var(--body); color: var(--ink); background: #fff; border: 2.5px solid var(--stroke); border-radius: 12px; }
.legal textarea { min-height: 150px; resize: vertical; }
.legal-delete-account textarea { min-height: 96px; }
.legal input::placeholder, .legal textarea::placeholder { color: #6B7079; opacity: 1; }
.legal .hp, .legal .lg-hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.legal form .btn { justify-self: start; }
.legal form .btn:disabled { opacity: .7; cursor: default; }
.legal .lg-actions { margin: 0; }
.legal .chk-row { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.legal .chk-row input { flex: 0 0 auto; width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--stroke); }
.legal .support-msg, #delMsg { margin: 0; font-weight: 700; min-height: 1.4em; }
.legal .support-msg:empty { min-height: 0; margin-top: -16px; }   /* no gap under the button until there is a message */
#delMsg { margin: 0 0 18px; }
#delMsg:empty { margin-bottom: 0; }
.legal .support-msg.err, .legal .err-msg { color: #B3261E; }
.legal .support-msg.ok, .legal .ok-msg { color: #1E6B3A; }
.legal .lg-more { margin-top: 18px; }
.legal .lg-company { margin-top: 14px; font-size: 13px; color: var(--ink-2); }

/* support: the form, with the email address beside it on wide screens */
@media (min-width: 900px) {
  .legal-support .legal-body.plain { display: grid; grid-template-columns: minmax(0, 720px) minmax(0, 1fr); gap: 22px; align-items: start; }
  .legal-support .legal-body.plain .lg-more { margin: 0; padding: 16px 18px; background: var(--tint); border: 3px solid var(--stroke); border-radius: 18px;
    box-shadow: 0 4px 0 var(--stroke); font-weight: 600; }
}
.legal-support .lg-more a { font-weight: 700; overflow-wrap: anywhere; }
