/* ==========================================================================
   Legal documents (Views/Home/Privacy.cshtml, Views/Home/Terms.cshtml) -
   Blush & Berry legal reading layout shared by both pages.
   Loaded after the shared base (_BrandPageHead: landing.css, landing-pink.css,
   brand-page.css). Rules are `.lg .x` so they outrank mypariva.css.
   Behaviour (section highlight, smooth jumps, print) is in
   wwwroot/js/legal/main.js; the documents read fine without it.
   ========================================================================== */

.lg { --lg-measure: 70ch; }
.lg .lg-label { display: inline-flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--lp-madder); }
.lg .lg-label::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }

/* ==========================================================================
   HERO (compact)
   ========================================================================== */
.lg .lg-hero { padding: clamp(28px, 4vw, 52px) 0 clamp(24px, 3vw, 40px); background: linear-gradient(180deg, var(--lp-paper-deep) 0%, var(--lp-paper) 100%); border-bottom: 1px solid var(--lp-line); }
.lg .lg-hero__inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.lg .lg-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.lg .lg-hero__date { font-size: 14px; font-weight: 500; color: var(--lp-ink-soft); }
.lg .lg-hero h1 { margin-top: 14px; font-size: clamp(40px, 5.2vw, 72px); line-height: 1; letter-spacing: -.034em; }
.lg .lg-hero__sub { margin-top: 14px; font-size: 16px; color: var(--lp-ink-soft); }
.lg .lg-hero__mark { flex: 0 0 auto; width: 96px; height: 112px; fill: none; stroke: var(--lp-line-strong); stroke-width: 2; stroke-linecap: round; }
.lg .lg-hero__mark rect:first-child { fill: var(--lp-surface); }
.lg .lg-hero__lock { fill: rgba(var(--lp-madder-rgb), .1); stroke: var(--lp-madder); }
.lg .lg-hero__shackle { stroke: var(--lp-madder); }
.lg .lg-hero__keyhole { fill: var(--lp-madder); stroke: none; }

/* ==========================================================================
   LAYOUT: sticky contents + document
   ========================================================================== */
.lg .lg-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(56px, 7vw, 104px); }

.lg .lg-toc { position: sticky; top: calc(var(--mp-nav-h, 96px) + 16px); max-height: calc(100vh - var(--mp-nav-h, 96px) - 32px); overflow-y: auto; scrollbar-width: thin; }
.lg .lg-toc__summary { display: none; }
.lg .lg-toc__title { margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--lp-ink-soft); }
.lg .lg-toc__list { position: relative; display: flex; flex-direction: column; border-left: 1px solid var(--lp-line); }
.lg .lg-toc__link { position: relative; display: block; padding: 8px 12px 8px 16px; margin-left: -1px; border-left: 2px solid transparent; font-size: 14.5px; line-height: 1.35; color: var(--lp-ink-soft) !important; text-decoration: none; transition: color .3s var(--lp-ease), border-color .3s var(--lp-ease), background-color .3s var(--lp-ease); }
.lg .lg-toc__link:hover { color: var(--lp-ink) !important; background: rgba(var(--lp-madder-rgb), .04); }
.lg .lg-toc__link[aria-current="true"] { border-left-color: var(--lp-madder); background: rgba(var(--lp-madder-rgb), .07); color: var(--lp-madder) !important; font-weight: 600; }
.lg .lg-toc__link:focus-visible { outline: 2px solid var(--lp-madder); outline-offset: -2px; border-radius: 4px; }
/* Section numbers that are part of the existing link text, set quieter than the title */
.lg .lg-toc__n { display: inline-block; min-width: 1.6em; font-variant-numeric: tabular-nums; color: var(--lp-ink-faint); font-weight: 600; }
.lg .lg-toc__link[aria-current="true"] .lg-toc__n { color: inherit; }

.lg .lg-main { min-width: 0; }
.lg .lg-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.lg .lg-tool { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--lp-line-strong); background: var(--lp-surface); font-size: 13.5px; font-weight: 600; color: var(--lp-ink); cursor: pointer; transition: border-color .3s var(--lp-ease), color .3s var(--lp-ease); }
.lg button.lg-tool:hover, .lg a.lg-tool:hover { border-color: var(--lp-madder); color: var(--lp-madder); }
.lg a.lg-tool { text-decoration: none; }

/* ---------- The document ---------- */
.lg .lg-doc { padding: clamp(24px, 4vw, 56px) clamp(20px, 4.5vw, 64px); border-radius: 22px; background: var(--lp-surface); border: 1px solid var(--lp-line); box-shadow: 0 1px 2px rgba(var(--lp-ink-rgb), .04), 0 30px 60px -48px rgba(var(--lp-ink-rgb), .35); }
.lg .lg-doc > section { max-width: var(--lg-measure); scroll-margin-top: 32px; }
.lg .lg-doc > section + section { margin-top: clamp(32px, 4vw, 48px); padding-top: clamp(28px, 3.5vw, 40px); border-top: 1px solid var(--lp-line); }
.lg .lg-doc h2 { scroll-margin-top: 32px; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.15; }
.lg .lg-doc h2:focus { outline: none; }
.lg .lg-doc h2:focus-visible { outline: 2px solid var(--lp-madder); outline-offset: 6px; }
.lg .lg-doc p, .lg .lg-doc li { font-size: 17px; line-height: 1.75; color: var(--lp-ink); }
.lg .lg-doc h2 + p, .lg .lg-doc h2 + ul { margin-top: 16px; }
.lg .lg-doc p + p, .lg .lg-doc ul + p, .lg .lg-doc p + ul { margin-top: 14px; }
.lg .lg-doc strong { font-weight: 600; color: var(--lp-ink); }
.lg .lg-doc ul { display: flex; flex-direction: column; gap: 10px; }
.lg .lg-doc ul > li { position: relative; padding-left: 26px; }
.lg .lg-doc ul > li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--lp-madder); }
.lg .lg-doc a { color: var(--lp-madder); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; transition: color .25s var(--lp-ease), text-decoration-thickness .25s var(--lp-ease); }
.lg .lg-doc a:hover { color: var(--lp-madder-deep); text-decoration-thickness: 2px; }

.lg .lg-summary { padding: 24px 26px; border-radius: 16px; background: var(--lp-paper-deep); border: 1px solid rgba(var(--lp-madder-rgb), .16); }
.lg .lg-doc .lg-summary__title { font-family: var(--lp-sans); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--lp-madder); }
.lg .lg-summary p { margin-top: 10px; font-size: 17.5px; }
.lg .lg-doc > .lg-summary + section { border-top: 0; padding-top: 0; }

.lg .lg-doc .lg-note { margin-top: 20px; padding: 16px 20px; border-left: 3px solid var(--lp-madder); border-radius: 0 12px 12px 0; background: rgba(var(--lp-madder-rgb), .06); font-size: 16px; }
.lg .lg-contact { padding: 16px 20px; border-radius: 12px; background: var(--lp-paper); border: 1px solid var(--lp-line); }
.lg .lg-doc .lg-contact-list li { overflow-wrap: anywhere; }

.lg .lg-top { margin-top: 20px; }
.lg .lg-top a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14.5px; font-weight: 600; color: var(--lp-madder); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   SMALL SCREENS: contents become a compact disclosure above the document
   ========================================================================== */
@media (max-width: 980px) {
  .lg .lg-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 20px; }
  .lg .lg-toc { position: static; max-height: none; overflow: visible; }
  .lg .lg-toc__details { border-radius: 14px; border: 1px solid var(--lp-line-strong); background: var(--lp-surface); }
  .lg .lg-toc__summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 18px; font-size: 15px; font-weight: 600; color: var(--lp-ink); cursor: pointer; list-style: none; }
  .lg .lg-toc__summary::-webkit-details-marker { display: none; }
  .lg .lg-toc__summary i { color: var(--lp-madder); transition: transform .3s var(--lp-ease); }
  .lg .lg-toc__details[open] .lg-toc__summary i { transform: rotate(180deg); }
  .lg .lg-toc__title { display: none; }
  .lg .lg-toc__list { margin: 0 12px 12px; border-left: 0; border-top: 1px solid var(--lp-line); padding-top: 6px; }
  .lg .lg-toc__link { min-height: 44px; display: flex; align-items: center; padding: 8px 10px; border-left: 0; border-radius: 10px; }
  .lg .lg-toc__link[aria-current="true"] { background: rgba(var(--lp-madder-rgb), .07); }
  .lg .lg-hero__mark { width: 72px; height: 84px; }
}
@media (max-width: 560px) {
  .lg .lg-hero__mark { display: none; }
  .lg .lg-doc { border-radius: 18px; }
  .lg .lg-doc p, .lg .lg-doc li { font-size: 16.5px; }
  .lg .lg-summary { padding: 20px 18px; }
}

/* ==========================================================================
   PRINT: just the policy, black on white, with external link addresses
   ========================================================================== */
@media print {
  @page { margin: 18mm 16mm; }
  .mp-marketing-nav, .mp-footer, .mypariva-suggestion-widget, .mypariva-suggestion-modal,
  .lg .lg-toc, .lg .lg-tools, .lg .lg-top, .lg .lg-hero__mark { display: none !important; }
  :root[data-brand-page], :root[data-brand-page] body.mp-body, :root[data-brand-page] .mp-page-content { background: #fff !important; }
  .lg .lg-hero { padding: 0 0 12pt; background: none; border-bottom: 1px solid #999; }
  .lg .lg-hero h1 { font-size: 26pt; }
  .lg .lp-wrap { max-width: none; padding-left: 0; padding-right: 0; }
  .lg .lg-layout { display: block; padding: 12pt 0 0; }
  .lg .lg-doc { padding: 0; border: 0; box-shadow: none; border-radius: 0; opacity: 1 !important; transform: none !important; }
  /* Sections not yet revealed on screen still carry an inline opacity: always print them. */
  .lg .lg-doc > section { max-width: none; break-inside: auto; opacity: 1 !important; transform: none !important; }
  .lg .lg-doc > section + section { margin-top: 14pt; padding-top: 10pt; border-top: 1px solid #ccc; }
  .lg .lg-doc h2 { font-size: 15pt; break-after: avoid; }
  .lg .lg-doc p, .lg .lg-doc li { font-size: 10.5pt; line-height: 1.5; color: #000; }
  .lg .lg-doc li { break-inside: avoid; }
  .lg .lg-summary, .lg .lg-doc .lg-note, .lg .lg-contact { background: none; border: 1px solid #bbb; }
  .lg .lg-doc a { color: #000; }
  .lg .lg-doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
}
