/* legal.css: the legal pages (legal_pages/show, in layouts/marketing), "Report a photo" (photo_reports/*, in the
   guest shell) and the admin's photo reports. Loaded by `ds_page "legal"`. Built on tokens.css + components.css.
   A legal page sits in marketing.css's document frame (.mk-docpage: the policies rail, a reading column of about
   70 characters, "On this page" beside the text from 1200 px), shared with the help articles; .ui-prose sets the
   type. This file adds the legal parts only: "In short" (phone first), the dates, "In full". Tokens only, no new
   colours. Print: the summary and the text, in black on white, with link addresses and the page's own address
   written out. */

/* ---------- Legal pages ---------- */
/* The order people read in: the title, "In short" (what they care about, each item a way into the full text), the
   dates, then the text "In full". Phones and small tablets (below 960 px, one column): the head, the summary and
   the dates sit on a band that runs edge to edge, the summary as a grouped list of white rows, like an app screen;
   the full text follows on the open page. From 960 px the band goes and the same list sits in the reading column. */
.legal-screen{display:grid}
.legal-head h1{text-wrap:balance}

/* "In short": one grouped list; each row is a statement (serif) and a sentence or two that back it up. The whole
   row opens its section (the title's link is stretched over the row); links in the sentences sit above that. */
.legal-short{margin-top:var(--ds-s6)}
.legal-short__title{margin:0;scroll-margin-top:96px;font-family:var(--ds-serif);font-size:var(--ds-fs-lg);font-weight:var(--ds-w-title);line-height:1.2;letter-spacing:var(--ds-track-title)}
.legal-short__list{list-style:none;margin:var(--ds-s4) 0 0;padding:0;border:1px solid var(--ds-line);border-radius:var(--ds-r-md);background:var(--ds-surface)}
.legal-short__item{--_r:calc(var(--ds-r-md) - 1px);--_rt:0px;--_rb:0px;position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:var(--ds-s3);
  padding:18px 20px 19px;border-radius:var(--_rt) var(--_rt) var(--_rb) var(--_rb);transition:background-color var(--ds-dur-1) var(--ds-ease)}
.legal-short__item:first-child{--_rt:var(--_r)}   /* the row's corners follow the list's, so its hover and focus do too */
.legal-short__item:last-child{--_rb:var(--_r)}
.legal-short__item+.legal-short__item::before{content:"";position:absolute;top:0;left:20px;right:0;border-top:1px solid var(--ds-line)} /* inset hairline */
.legal-short__head{grid-column:1;grid-row:1;margin:0;font-family:var(--ds-serif);font-size:var(--ds-fs-md);font-weight:var(--ds-w-title);line-height:1.25;letter-spacing:-.01em;text-wrap:balance}
.legal-short__link{color:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}
.legal-short__link::after{content:"";position:absolute;inset:0;border-radius:var(--_rt) var(--_rt) var(--_rb) var(--_rb)}
.legal-short__link:focus-visible{outline:none}
.legal-short__link:focus-visible::after{outline:2px solid var(--ds-focus);outline-offset:-2px}
.legal-short__chev{grid-column:2;grid-row:1;align-self:start;width:20px;height:20px;margin-top:2px;color:var(--ds-text-muted)}
.legal-short__text{grid-column:1/-1;grid-row:2;margin-top:6px;color:var(--ds-text-muted);font-size:var(--ds-fs-ui);line-height:var(--ds-lh-ui);text-wrap:pretty}
.legal-short__text>*{margin:0}
.legal-short__text>*+*{margin-top:8px}
.legal-short__text strong{font-weight:var(--ds-w-strong)}
.legal-short__text a{position:relative;z-index:1}  /* above the row's own link */
.legal-short__text code{font-size:.9em}
@media (hover:hover){.legal-short__item:has(.legal-short__link:hover){background:var(--ds-hover)}}
.legal-short__item:has(.legal-short__link:active){background:var(--ds-press)}

/* the dates under the summary, like the note under a settings group. "Last updated" first and in ink: it's the
   date people look for. */
.legal-dates{display:flex;flex-wrap:wrap;column-gap:var(--ds-s4);row-gap:2px;margin:var(--ds-s4) 0 0;color:var(--ds-text-muted);font-size:var(--ds-fs-hint);line-height:var(--ds-lh-ui)}
.legal-dates__updated{color:var(--ds-text);font-weight:var(--ds-w-medium)}
.legal-short+.legal-dates{padding-inline:20px}

@media (max-width:959px){
  .legal.mk-docpage{padding-top:0}
  .legal-screen{margin-inline:calc(-1 * var(--ds-pad));padding:28px var(--ds-pad) 28px;background:var(--ds-band)}
  .legal-short__list{border-radius:var(--ds-r-lg)}
  .legal-short__item{--_r:calc(var(--ds-r-lg) - 1px)}
}
@media (max-width:599px){
  .legal-head .mk-lead{font-size:var(--ds-fs-base)}
  .legal-short__item{padding:16px 16px 17px}
  .legal-short__item+.legal-short__item::before{left:16px}
  .legal-short+.legal-dates{padding-inline:16px}
}

/* "In full": the contents list in the text, below 1200 px (the rail shows it beside the text above that, with
   "In short" first). The h2 texts carry their own numbers, so no list markers. */
.legal-toc{margin-top:var(--ds-s7)}
.legal-toc__title{margin:0;color:var(--ds-text);font-family:var(--ds-serif);font-size:var(--ds-fs-lg);font-weight:var(--ds-w-title);line-height:1.2;letter-spacing:var(--ds-track-title)}
.legal-toc ul{list-style:none;margin:12px 0 0;padding:0}
.legal-toc li{break-inside:avoid;padding:3px 0}
.legal-toc a{text-decoration:none}
.legal-toc a:hover{text-decoration:underline}
@media (min-width:44rem){.legal-toc ul{columns:2;column-gap:32px}}
@media (max-width:959px){.legal-toc{margin-top:var(--ds-s6);padding-top:0;border-top:0}}
@media (pointer:coarse){.legal-toc li,.legal-toc li+li{margin:0;padding:0}.legal-toc a{display:flex;align-items:center;min-height:48px}
  .legal-toc li+li{border-top:1px solid var(--ds-line)}} /* a list of rows on phones, 48 px each */

/* arriving from "In short" or the contents: the section's heading (or paragraph) shows where you landed */
.legal-body [id]{scroll-margin-top:96px}
.legal-body :target{border-radius:var(--ds-r-sm);animation:legal-landed 2.4s var(--ds-ease) 1}
@keyframes legal-landed{0%,35%{background:var(--ds-sunken);box-shadow:0 0 0 8px var(--ds-sunken)}100%{background:transparent;box-shadow:0 0 0 8px transparent}}
@media (prefers-reduced-motion:reduce){.legal-body :target{animation:none}}

/* the text: .ui-prose sets the type; a long policy gets a little more air before each section */
.legal-body h2{margin-top:var(--ds-s8)}
.legal-body strong{font-weight:var(--ds-w-strong)}
.legal-body ol{padding-left:1.4em}

/* tables scroll sideways on phones instead of squeezing */
.legal-table{margin-top:16px;overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:var(--ds-r-sm)}
.legal-table:focus-visible{outline:2px solid var(--ds-focus);outline-offset:2px}
.legal-table table{min-width:32rem;font-size:var(--ds-fs-hint);line-height:var(--ds-lh-ui)}
.legal-body .legal-table table{display:table} /* the wrapper scrolls, so the table stays a table (marketing.css makes bare prose tables scroll themselves) */
.legal-table th{white-space:nowrap}
/* phones: no sideways scrolling; each row is a short record under a hairline, its first cell as the name and every
   other cell under its column's name (data-label, set by Legal) */
@media screen and (max-width:599px){
  .legal-table{overflow:visible;border-radius:0}
  .legal-body .legal-table :is(table,tbody,tr,td){display:block;width:auto;min-width:0}
  .legal-body .legal-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .legal-body .legal-table table{border-top:1px solid var(--ds-line-strong);font-size:var(--ds-fs-ui)}
  .legal-body .legal-table tr{padding:14px 0 15px;border-bottom:1px solid var(--ds-line)}
  .legal-body .legal-table td{padding:0;border:0}
  .legal-body .legal-table td:first-child{color:var(--ds-text);font-weight:var(--ds-w-medium)}
  .legal-body .legal-table td+td{margin-top:8px}
  .legal-body .legal-table td+td[data-label]::before{content:attr(data-label);display:block;color:var(--ds-text-muted);font-size:var(--ds-fs-xs);font-weight:var(--ds-w-medium)}
}

/* a business detail Kartikey hasn't supplied yet: visible, but quiet */
.legal-tba{display:inline-block;padding:0 8px;border:1px dashed var(--ds-line-strong);border-radius:var(--ds-r-sm);background:var(--ds-sunken);color:var(--ds-text-muted);font-size:.875em;line-height:1.6;white-space:nowrap}
/* a blank the reader fills in (guest notice) */
.legal-blank{padding:0 2px;border-bottom:1.5px dashed var(--ds-line-strong);color:var(--ds-text-muted);font-style:italic}

/* the copyable texts on the guest notice: plain white sheets with a hairline, in the text's own colour */
.legal-body blockquote{margin:16px 0 0;padding:16px 20px;border:1px solid var(--ds-line);border-left:2px solid var(--ds-text);border-radius:var(--ds-r-ctl);background:var(--ds-surface);
  color:var(--ds-text);font-family:var(--ds-font);font-style:normal}
.legal-body blockquote>*+*{margin-top:10px}

/* /guest-notice: pick an event to fill in */
.legal-picker{margin-top:var(--ds-s6);padding:16px 20px;border:1px solid var(--ds-line);border-radius:var(--ds-r-md);background:var(--ds-surface);font-size:var(--ds-fs-ui)}
.legal-picker .ui-hint{margin-top:8px}
.legal-picker__row{display:flex;flex-wrap:wrap;gap:var(--ds-s2);margin-top:6px}
.legal-picker__row .ui-select{flex:1 1 16rem;min-width:0}
.legal-picker--guest{color:var(--ds-text-muted)}

.legal-end{margin-top:var(--ds-s8);padding-top:20px;border-top:1px solid var(--ds-line);color:var(--ds-text-muted);font-size:var(--ds-fs-hint)}
.legal-print-only{display:none}

/* the long face search notice (legal_pages/_face_search_details), wherever it's shown */
.legal-face{font-size:var(--ds-fs-ui);line-height:var(--ds-lh-body)}
.legal-face>*+*{margin-top:10px}
.legal-face__title{font-size:var(--ds-fs-md);line-height:1.25}

/* ---------- Report a photo (guest shell) ---------- */
.legal-report>*+*{margin-top:16px}
.legal-report__studio{color:var(--ds-text-muted);font-size:var(--ds-fs-hint)}
.legal-report__studio a{color:inherit}
.legal-report__title{margin-top:8px;font-size:var(--ds-fs-xl);line-height:var(--ds-lh-head);letter-spacing:-.01em}
.legal-report__lead{color:var(--ds-text-muted)}
.legal-report__photo{display:flex;align-items:center;gap:var(--ds-s4);margin:24px 0 0;padding:12px;border:1px solid var(--ds-line);border-radius:var(--ds-r-md);background:var(--ds-surface)}
.legal-report__photo img{flex:none;width:120px;height:auto;max-height:120px;object-fit:cover;border-radius:var(--ds-r-photo);background:var(--ds-sunken)}
.legal-report__photo figcaption{color:var(--ds-text-muted);font-size:var(--ds-fs-hint)}
.legal-report__file{overflow-wrap:anywhere;color:var(--ds-text)}
.legal-report__form{margin-top:28px}
.legal-report__form .ui-fieldset{gap:var(--ds-s3)}
.legal-report__terms{margin-top:0}
.legal-report__facts{margin-top:24px}
.legal-report__code{font-family:var(--ds-mono);letter-spacing:.06em}
.legal-report__outcome{display:block;margin-top:6px}
.legal-report__h2{margin-top:32px;font-size:var(--ds-fs-lg)}
.legal-report .ui-actions{margin-top:28px}
/* the field only bots fill in: off screen, out of the tab order (aria-hidden in the markup) */
.legal-hp{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}

/* ---------- Admin: photo reports ---------- */
.legal-pre{white-space:pre-wrap;overflow-wrap:anywhere}

/* ---------- Print ---------- */
@media print{
  /* paper is white whatever the screen's mode: light roles, made from the core palette */
  :root,html.ds,.ds{--ds-bg:var(--ds-white);--ds-surface:var(--ds-white);--ds-sunken:var(--ds-white);--ds-text:var(--ds-ink);
    --ds-text-muted:color-mix(in srgb,var(--ds-ink) 72%,transparent);--ds-line:color-mix(in srgb,var(--ds-ink) 18%,transparent);
    --ds-line-strong:color-mix(in srgb,var(--ds-ink) 45%,transparent);--ds-link:var(--ds-ink)}
  html{color-scheme:light}
  body{background:var(--ds-white);color:var(--ds-ink)}
  .mk-top,.mk-foot,.ui-foot,.ui-skip,.ui-flashes,.legal-nav,.legal-rail,.legal-toc,.legal-picker,.legal-report .ui-actions{display:none !important}
  .legal.mk-docpage{display:block;max-width:none;margin:0;padding:0}
  .legal-doc{max-width:none;color:var(--ds-ink);font-size:11pt;line-height:1.45}
  .legal-doc .mk-dochead h1{font-size:24pt}
  .legal-doc .mk-dochead .mk-lead{font-size:12pt}
  .legal-doc .legal-body{font-size:11pt}
  .legal-doc .legal-body h2{margin-top:18pt;font-size:14pt}
  .legal-doc a{color:var(--ds-ink);text-decoration:underline}
  .legal-body a[href^="http"]::after{content:" (" attr(href) ")";font-size:.85em;overflow-wrap:anywhere}
  .legal-doc h2,.legal-doc h3{break-after:avoid}
  .legal-doc tr,.legal-doc li,.legal-body blockquote{break-inside:avoid}
  .legal-table{overflow:visible}
  .legal-table table{min-width:0;font-size:9.5pt}
  .legal-body blockquote{background:none}
  .legal-tba{background:none;color:var(--ds-ink)}
  .legal-print-only{display:block}
  /* "In short" on paper: a plain list under a rule, before the dates and the text */
  .legal-screen{margin:0;padding:0;background:none}
  .legal-short{margin-top:14pt}
  .legal-doc .legal-short__title{font-size:14pt}
  .legal-short__list{margin-top:6pt;border:0;border-top:1px solid var(--ds-line);border-radius:0}
  .legal-short__item{padding:6pt 0;break-inside:avoid}
  .legal-short__item+.legal-short__item::before{left:0}
  .legal-short__head{font-size:12pt}
  .legal-short__text{margin-top:2pt;font-size:10.5pt}
  .legal-short__chev,.legal-short__link::after{display:none}
  .legal-doc .legal-short__link{text-decoration:none}
  .legal-short+.legal-dates{padding-inline:0}
  .legal-body :target{animation:none}
}
