/* Standalone legal document styles. Compatible with the storefront's existing brand variables.
   Markup: body.legal-page > .legal-header + main.legal-shell + .legal-footer.
   Optional .legal-layout contains nav.legal-toc and article.legal-article.
   This stylesheet provides presentation only; it does not supply legal wording. */
.legal-page {
  --legal-accent: var(--accent, #ff454b);
  --legal-ink: var(--ink, #111111);
  --legal-muted: var(--muted, #6d7078);
  --legal-line: var(--line, #dedee3);
  --legal-surface: var(--surface, #f7f7f7);
  --legal-heading: var(--heading, 'DM Sans', Arial, sans-serif);
  --legal-body: var(--body, 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  margin: 0;
  background: #ffffff;
  color: var(--legal-ink);
  font-family: var(--legal-body);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
.legal-page *, .legal-page *::before, .legal-page *::after { box-sizing: border-box; }
.legal-page [hidden] { display: none !important; }
.legal-page a { color: inherit; overflow-wrap: anywhere; }
.legal-page a:focus-visible, .legal-page button:focus-visible, .legal-page summary:focus-visible {
  outline: 3px solid var(--legal-accent);
  outline-offset: 4px;
}
.legal-page a, .legal-page button, .legal-page summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.legal-page :target { scroll-margin-top: 30px; }
.legal-page img { display: block; max-width: 100%; height: auto; }
.legal-header, .legal-shell, .legal-footer {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}
.legal-header {
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 25px;
  padding-block: 24px;
  border-bottom: 1px solid var(--legal-line);
}
.legal-brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.legal-brand img { width: 154px; height: auto; }
.legal-back { display: inline-flex; align-items: center; min-height: 44px; padding: 7px 0; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.legal-shell { padding-block: 55px 65px; }
.legal-kicker { margin: 0 0 14px; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: #b52d36; }
.legal-title { font-family: var(--legal-heading); font-size: clamp(34px, 5vw, 52px); line-height: 1.1; letter-spacing: -.035em; margin: 0 0 18px; max-width: 22ch; text-wrap: balance; }
.legal-meta { margin: 0 0 30px; color: var(--legal-muted); font-size: 13px; line-height: 1.8; }
.legal-intro { max-width: 74ch; font-size: 16px; line-height: 1.85; margin: 0 0 35px; color: #56575f; }
.legal-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: 50px; align-items: start; }
.legal-toc { position: sticky; top: 25px; border: 1px solid var(--legal-line); border-radius: 8px; padding: 20px; background: #ffffff; font-size: 13px; }
.legal-toc h2 { font-family: var(--legal-heading); font-size: 15px; letter-spacing: -.2px; line-height: 1.4; margin: 0 0 12px; }
.legal-toc ol, .legal-toc ul { padding: 0; margin: 0; list-style: none; }
.legal-toc li { margin: 0; }
.legal-toc a { display: flex; align-items: center; min-height: 44px; padding-block: 7px; line-height: 1.55; color: #65656e; text-decoration: none; }
.legal-toc a:hover { color: #b52d36; text-decoration: underline; text-underline-offset: 4px; }
.legal-article { min-width: 0; max-width: 78ch; overflow-wrap: anywhere; }
.legal-article > :first-child { margin-top: 0; }
.legal-article section + section { margin-top: 35px; padding-top: 28px; border-top: 1px solid var(--legal-line); }
.legal-article h2 { font-family: var(--legal-heading); font-size: 24px; line-height: 1.3; letter-spacing: -.45px; margin: 0 0 16px; text-wrap: balance; }
.legal-article h3 { font-family: var(--legal-heading); font-size: 18px; line-height: 1.45; letter-spacing: -.2px; margin: 26px 0 10px; }
.legal-article p { margin: 0 0 18px; }
.legal-article ul, .legal-article ol { margin: 0 0 20px; padding-left: 24px; }
.legal-article li { padding-left: 4px; margin-block: 9px; }
.legal-article a { color: #a82c35; text-decoration: underline; text-underline-offset: 4px; }
.legal-article strong { font-weight: 650; }
.legal-article address { font-style: normal; }
.legal-article dt { font-weight: 650; margin-top: 14px; }
.legal-article dd { margin: 5px 0 18px; }
.legal-callout { background: #fff4f1; border: 1px solid #f1dad6; border-left: 3px solid var(--legal-accent); border-radius: 6px; padding: 17px 20px; margin: 24px 0; font-size: 14px; line-height: 1.85; }
.legal-callout > :last-child { margin-bottom: 0; }
.legal-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--legal-line); border-radius: 6px; margin: 24px 0; -webkit-overflow-scrolling: touch; }
.legal-table-wrap:focus-visible { outline: 3px solid var(--legal-accent); outline-offset: 3px; }
.legal-article table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; line-height: 1.7; }
.legal-article caption { text-align: left; font-weight: 650; padding: 14px 16px; }
.legal-article th, .legal-article td { padding: 14px 16px; vertical-align: top; border-top: 1px solid var(--legal-line); }
.legal-article th { background: var(--legal-surface); font-weight: 650; }
.legal-article table:first-child tr:first-child > * { border-top: 0; }
.legal-footer { background: #ffffff; display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 12px 25px; border-top: 1px solid var(--legal-line); padding-block: 20px 30px; font-size: 12px; color: var(--legal-muted); }
.legal-footer p { margin: 0; }
.legal-footer nav { display: flex; flex-wrap: wrap; gap: 5px 20px; }
.legal-footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 860px) {
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .legal-toc { position: static; max-width: none; padding: 18px 20px; }
  .legal-toc ol, .legal-toc ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
  .legal-article { max-width: none; }
}
@media (max-width: 540px) {
  .legal-header, .legal-shell, .legal-footer { width: calc(100% - 40px); }
  .legal-header { padding-block: 15px; gap: 8px 18px; }
  .legal-brand img { width: 132px; }
  .legal-back { font-size: 12px; }
  .legal-shell { padding-block: 34px 42px; }
  .legal-title { font-size: clamp(31px, 8.5vw, 42px); line-height: 1.13; margin-bottom: 15px; }
  .legal-meta { font-size: 12px; margin-bottom: 24px; }
  .legal-intro { font-size: 15px; margin-bottom: 25px; }
  .legal-layout { gap: 27px; }
  .legal-toc ol, .legal-toc ul { grid-template-columns: minmax(0, 1fr); }
  .legal-article { font-size: 15px; line-height: 1.85; }
  .legal-article h2 { font-size: 22px; }
  .legal-article h3 { font-size: 18px; }
  .legal-article section + section { margin-top: 29px; padding-top: 24px; }
  .legal-callout { font-size: 13px; padding: 15px; }
  .legal-article table { font-size: 13px; }
  .legal-article th, .legal-article td { padding: 12px; }
  .legal-footer { align-items: flex-start; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}
@media print {
  .legal-page { background: #ffffff; color: #000000; font-size: 11pt; line-height: 1.6; }
  .legal-header, .legal-shell, .legal-footer { width: auto; max-width: none; margin: 0; }
  .legal-header { padding-block: 0 15pt; }
  .legal-shell { padding-block: 20pt; }
  .legal-back, .legal-toc, .legal-footer nav { display: none; }
  .legal-layout { display: block; }
  .legal-article { max-width: none; }
  .legal-title { font-size: 28pt; }
  .legal-article h2 { font-size: 17pt; break-after: avoid; }
  .legal-article h3 { font-size: 13pt; break-after: avoid; }
  .legal-article p, .legal-article li { orphans: 3; widows: 3; }
  .legal-callout { background: #ffffff; border-color: #aaaaaa; }
  .legal-table-wrap { overflow: visible; }
  .legal-article table { font-size: 9pt; }
  .legal-article a { color: #000000; }
  .legal-footer { font-size: 9pt; }
}
@media (prefers-reduced-motion: reduce) {
  .legal-page { scroll-behavior: auto; }
}
