/* Terms of Service page refinements (scoped to .tos-page). Presentation only. */
.tos-page { --tos-header: 88px; }
/* Legacy overflow-x:hidden makes body a non-scrolling sticky container.
   Clip horizontal paint without creating that container, on this page only. */
html:has(body.tos-page), body.tos-page { overflow-x: clip; overflow-y: visible; }
html:has(body.tos-page) { scroll-padding-top: 0; }
.tos-page .lgp-hero-links { display: none; } /* related links live in the closing nav below the policy */
.tos-page .lgp-hero-inner { grid-template-columns: 1fr; padding-top: 128px; padding-bottom: 64px; max-width: 1200px; }
.tos-page .lgp-eyebrow { color: rgba(255,255,255,.62); font-size: 11px; }
.tos-page .lgp-hero-date { color: rgba(255,255,255,.72); font-size: 14px; font-weight: 400; }
.tos-page .lgp-body { background: var(--c-off-white, #f7f5f0); }
.tos-page .lgp-content {
  max-width: 1180px; padding: 64px var(--ws-gutter, 32px) 0;
  display: grid; grid-template-columns: 240px minmax(0, 720px); column-gap: 72px; justify-content: center;
}
.tos-page .lgp-content > * { grid-column: 2; min-width: 0; }
.tos-page .lgp-content > .lgp-toc {
  grid-column: 1; grid-row: 1 / span 40; align-self: start;
  position: sticky; top: calc(var(--tos-header) + 16px);
  background: transparent; border: 0; border-left: 1px solid var(--c-gray-200); border-radius: 0;
  padding: 4px 0 4px 0; margin: 0; max-height: calc(100vh - var(--tos-header) - 40px); overflow: auto;
}
.tos-page .lgp-toc-label { padding-left: 18px; color: var(--c-gray-700); font-size: 11px; margin-bottom: 12px; }
.tos-page .lgp-toc-toggle { display: none; }
.tos-page .lgp-toc-list { grid-template-columns: minmax(0, 1fr); gap: 0; counter-reset: tos; }
.tos-page .lgp-toc-list li a {
  counter-increment: tos; font-size: 14px; font-weight: 400; line-height: 1.4; color: var(--c-gray-700);
  padding: 7px 12px 7px 18px; margin-left: -1px; border-left: 2px solid transparent; gap: 10px; align-items: baseline;
}
.tos-page .lgp-toc-list li a::before { content: counter(tos, decimal-leading-zero); font-size: 11px; color: var(--c-gray-500); font-variant-numeric: tabular-nums; }
.tos-page .lgp-toc-list li a:hover { color: var(--c-navy); }
.tos-page .lgp-toc-list li a[aria-current="true"] { color: var(--c-navy); border-left-color: var(--c-navy-mid); font-weight: 500; }
.tos-page a:focus-visible, .tos-page button:focus-visible { outline: 2px solid var(--c-navy-mid); outline-offset: 2px; border-radius: 2px; }
.tos-page .lgp-intro { font-size: 17px; font-weight: 400; color: var(--c-dark); line-height: 1.75; }
.tos-page .lgp-section { scroll-margin-top: calc(var(--tos-header) + 24px); border-bottom-color: var(--c-gray-200); margin-bottom: 44px; padding-bottom: 44px; }
.tos-page .lgp-section-num { color: var(--c-gray-500); font-size: 11px; }
.tos-page .lgp-h2, body.tos-page.ws-reading .lgp-h2 { font-size: clamp(22px, 2.2vw, 28px); margin: 0 0 18px; color: var(--c-dark); }
body.tos-page.ws-reading .lgp-content :is(p,li) { max-width: none; }
.tos-page .lgp-p { font-size: 16.5px; font-weight: 400; line-height: 1.75; color: var(--c-gray-700); margin-bottom: 16px; }
.tos-page .lgp-ul { gap: 10px; margin: 14px 0 18px; }
.tos-page .lgp-ul li { font-size: 16.5px; font-weight: 400; line-height: 1.6; color: var(--c-gray-700); }
.tos-page .lgp-ul li::before { content: ''; width: 6px; height: 1px; background: var(--c-navy-mid); margin-top: .8em; }
.tos-page .lgp-highlight { background: #fff; border-left-color: var(--c-navy); padding: 18px 22px; }
.tos-page .lgp-highlight p { font-size: 16.5px; line-height: 1.6; }
.tos-page .lgp-link { text-decoration: underline; text-underline-offset: 3px; }
.tos-page .lgp-footer-nav { gap: 12px 28px; }
.tos-page .lgp-footer-nav a { font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.tos-page .lgp-footer-nav .tos-related-title {
  flex-basis: 100%; font-size: 16px; line-height: 1.5; margin: 0;
  color: var(--c-dark); font-weight: 600;
}

/* Keep the existing closing space inside the grid's last row, not outside its
   sticky containing block, so the last anchor cannot push the TOC under chrome. */
@media (min-width: 961px) {
  .tos-page .lgp-body { padding-bottom: 0; }
  .tos-page .lgp-footer-nav { margin-bottom: 96px; }
}
@media (max-width: 960px) {
  .tos-page .lgp-content { display: block; max-width: 760px; padding-top: 40px; }
  .tos-page .lgp-content > .lgp-toc {
    position: static; max-height: none; overflow: visible; background: #fff;
    border: 1px solid var(--c-gray-200); border-radius: var(--radius-md); padding: 0; margin: 0 0 40px;
  }
  .tos-page .lgp-toc.tos-enhanced .lgp-toc-label { display: none; }
  .tos-page .lgp-toc-toggle {
    display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px;
    background: none; border: 0; padding: 14px 18px; font: inherit; font-size: 15px; font-weight: 500; color: var(--c-dark); cursor: pointer; min-height: 48px;
  }
  .tos-page .lgp-toc-toggle .tos-chev { width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
  .tos-page .lgp-toc-toggle[aria-expanded="true"] .tos-chev { transform: rotate(-135deg); }
  .tos-page .lgp-toc.tos-enhanced .lgp-toc-list { padding: 0 0 10px; border-top: 1px solid var(--c-gray-200); }
  .tos-page .lgp-toc.tos-enhanced.tos-collapsed .lgp-toc-list { display: none; }
  .tos-page .lgp-toc:not(.tos-enhanced) { padding: 16px 0; }
  .tos-page .lgp-toc-list li a { min-height: 44px; display: flex; align-items: center; }
  .tos-page .lgp-hero-inner { padding: 104px var(--page-margin) 44px; }
}
@media (max-width: 480px) { .tos-page .lgp-p, .tos-page .lgp-ul li, .tos-page .lgp-intro { font-size: 16px; } }

@media print {
  .tos-page .ws-header, .tos-page header, .tos-page footer, .tos-page .lgp-toc, .tos-page .lgp-hero-links,
  .tos-page [class*="cookie"], .tos-page [class*="mobile-cta"] { display: none !important; }
  .tos-page, .tos-page .lgp-body { background: none !important; }
  .tos-page .lgp-hero { background: none !important; color: #111; }
  .tos-page .lgp-hero::before { display: none; }
  .tos-page .lgp-hero-inner { padding: 0 0 16pt; }
  .tos-page .lgp-hero-h1, .tos-page .lgp-eyebrow, .tos-page .lgp-hero-date { color: #111 !important; }
  .tos-page .lgp-content { display: block; max-width: none; padding: 0; }
  .tos-page .lgp-p, .tos-page .lgp-ul li, .tos-page .lgp-intro, .tos-page .lgp-highlight p { font-size: 11pt; color: #111; }
  .tos-page .lgp-section { break-inside: avoid-page; margin-bottom: 14pt; padding-bottom: 14pt; }
  .tos-page .lgp-h2 { break-after: avoid; }
  .tos-page .lgp-content a[href^="/"]::after { content: " (https://www.weblysoft.com" attr(href) ")"; font-size: 9pt; color: #444; }
  .tos-page .lgp-content a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
