/* Legal documents: AERIAL CAD terms of service and the PICKWORKS privacy policy.
   Loaded only by aerial-cad-terms.html and privacy.html, after style.css.
   Other pages are not affected. */

/* Page title: break only between whole words */
.legal-page .page-title .phrase { display: inline-block; }

/* Left column: section list that stays in view on wide screens */
.legal-side { position: sticky; top: 110px; align-self: start; max-height: calc(100vh - 130px); overflow-y: auto; overscroll-behavior: contain; }
.legal-side .content-label { position: static; }
.legal-toc { margin-top: 16px; font-size: .84rem; line-height: 1.55; }
.legal-toc ul { margin: 0; padding: 0; list-style: none; }
.legal-toc a { display: block; padding: 5px 0 5px 14px; color: #555; text-decoration: none; border-left: 2px solid var(--line); }
.legal-toc a:hover, .legal-toc a:focus-visible { color: var(--ink); border-left-color: var(--orange); }
.legal-toc .legal-toc-part { margin-top: 12px; }
.legal-toc .legal-toc-part > a { color: var(--ink); font-weight: 800; border-left-color: var(--ink); }
.legal-toc .legal-toc-sub > a { padding-left: 28px; font-size: .95em; }

/* Body text */
.legal-doc { min-width: 0; max-width: 780px; line-height: 1.9; overflow-wrap: break-word; }
.legal-doc p { margin: 0 0 1em; }
.legal-doc > p:first-child { margin-bottom: 40px; }
.legal-doc a { color: inherit; text-decoration-color: var(--orange); text-decoration-thickness: 1.5px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-doc a:hover { color: var(--orange); }

/* Sections (## headings) */
.legal-section { padding: 34px 0 14px; border-top: 1px solid var(--line); }
.content-body.legal-doc h2 { margin: 0 0 18px; font-size: 1.25rem; line-height: 1.5; letter-spacing: 0; }
.legal-doc h2, .legal-doc h3 { scroll-margin-top: 100px; }
.legal-doc h3 { margin: 30px 0 12px; padding-left: 12px; border-left: 4px solid var(--orange); font-size: 1.05rem; line-height: 1.5; }

/* Parts (# 第1部 / 第2部): a band above the sections they hold */
.legal-part { margin-top: 48px; }
.content-body.legal-doc .legal-part-title { margin: 0 0 6px; padding: 18px 24px; color: white; background: var(--ink); border-radius: 14px; font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.4; letter-spacing: 0; }
.legal-part > .legal-section:first-of-type { border-top: 0; }

/* Numbered paragraphs and bullet points */
.legal-doc ol { margin: 0 0 1em; padding-left: 1.9em; }
.legal-doc ol > li { margin: 0 0 .65em; padding-left: .25em; }
.legal-doc ol > li::marker { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.legal-doc ul { margin: .45em 0 .6em; padding-left: 1.3em; list-style: disc; }
.legal-doc ul > li { margin: 0 0 .35em; }
.legal-doc ul > li::marker { color: var(--muted); }
.legal-doc ul ul { margin-top: .35em; list-style: circle; }

/* Tables: a box that scrolls sideways on narrow screens (with soft edge shadows while there is more to see) */
.legal-table-scroll { margin: .6em 0 1.6em; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px;
  background:
    linear-gradient(to right, white 30%, rgba(255,255,255,0)),
    linear-gradient(to left, white 30%, rgba(255,255,255,0)) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(36,36,36,.24), rgba(36,36,36,0)),
    radial-gradient(farthest-side at 100% 50%, rgba(36,36,36,.24), rgba(36,36,36,0)) 100% 0;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 16px 100%, 16px 100%;
  background-attachment: local, local, scroll, scroll; }
.legal-table-scroll:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.legal-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .92rem; line-height: 1.7; }
.legal-table th, .legal-table td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal-table th + th, .legal-table td + td { border-left: 1px solid var(--line); }
.legal-table thead th { color: #555; background: var(--soft); font-size: .82rem; font-weight: 800; white-space: nowrap; }
.legal-table tbody tr:last-child td { border-bottom: 0; }
.legal-table tbody td:first-child { width: 26%; font-weight: 700; }

@media (max-width: 900px) {
  .legal-page .content-grid { gap: 36px; }
  .legal-side { position: static; max-height: none; overflow: visible; padding: 22px 24px; background: var(--soft); border: 1px solid var(--line); border-radius: 16px; }
  .legal-toc { margin-top: 10px; }
  .legal-doc { max-width: none; }
  .legal-doc h2, .legal-doc h3 { scroll-margin-top: 176px; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .legal-toc > ul { columns: 2; column-gap: 28px; }
  .legal-toc > ul > li { break-inside: avoid; }
  .legal-toc .legal-toc-part:first-child, .legal-toc > ul > li:first-child { margin-top: 0; }
}

@media (max-width: 640px) {
  .legal-side { padding: 18px 18px 16px; }
  .legal-doc ol { padding-left: 1.6em; }
  .legal-section { padding-top: 28px; }
  .content-body.legal-doc .legal-part-title { padding: 14px 18px; border-radius: 12px; }
  .legal-table { min-width: 600px; font-size: .88rem; }
  .legal-table th, .legal-table td { padding: 12px 12px; }
  .legal-table tbody td:first-child { width: 20%; }
  .legal-doc h2, .legal-doc h3 { scroll-margin-top: 148px; }
}
