/* Reading and app-link pages use the same visual language as the main site. */
.legal-page, .link-page, .error-page, .download-page {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
[hidden] { display: none !important; }
.legal-main, .link-main, .error-main, .download-main { flex: 1; }
.legal-main { padding-block: 140px 80px; }
.document-layout {
  display: grid;
  grid-template-columns: 215px minmax(0, 690px);
  justify-content: space-between;
  align-items: start;
  gap: 64px;
  max-width: var(--content-width);
}
.document-index { position: sticky; top: 108px; padding-top: 5px; }
.document-index-title { margin-bottom: 15px; color: var(--ink); font-size: 13px; font-weight: 500; }
.document-index nav { display: grid; gap: 3px; max-height: calc(100svh - 180px); overflow-y: auto; padding: 4px 6px 7px 0; }
.document-index a { padding: 5px 0 5px 13px; border-left: 1px solid #927eb72b; color: var(--muted); font-size: 12px; line-height: 1.6; text-decoration: none; }
.document-index a:hover, .document-index a[aria-current="location"] { border-color: var(--purple); color: #665083; }
.document-mobile-index { display: none; }
.legal-document { min-width: 0; }
.legal-kicker { margin-bottom: 15px; font-size: 13px; color: #77668c; }
.legal-document h1 { font-size: clamp(36px, 4vw, 48px); line-height: 1.15; letter-spacing: -.045em; text-wrap: balance; }
.legal-deck { margin-top: 22px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.legal-updated { margin-top: 20px; font-size: 12px; color: #7b7187; }
.legal-overview { margin-top: 35px; padding: 22px 25px; border-left: 2px solid #b7a1d6; border-radius: 0 12px 12px 0; background: #ffffff5c; }
.legal-overview h2 { margin-bottom: 10px; font-size: 19px; line-height: 1.35; letter-spacing: -.025em; }
.legal-section { margin-top: 38px; padding-top: 30px; border-top: 1px solid #927eb726; }
.legal-section h2 { margin-bottom: 16px; font-size: 23px; line-height: 1.35; letter-spacing: -.035em; }
.legal-section h2:not(:first-child) { margin-top: 32px; }
.legal-section h3 { margin-top: 24px; margin-bottom: 10px; font-size: 16px; line-height: 1.5; font-weight: 600; letter-spacing: -.015em; }
.legal-section p, .legal-section li, .legal-section dd, .legal-overview p, .legal-contact {
  color: #625b6e; font-size: 15px; line-height: 1.85; overflow-wrap: anywhere;
}
.legal-section p + p, .legal-overview p + p { margin-top: 14px; }
.legal-document a { color: #70578e; text-decoration-thickness: 1px; text-decoration-color: #b6a2cd; text-underline-offset: 4px; }
.legal-document a:hover { text-decoration-color: currentColor; }
.legal-document strong { color: #413749; font-weight: 600; }
.legal-section ul, .legal-section ol { margin: 15px 0; padding-left: 22px; }
.legal-section li + li { margin-top: 8px; }
.legal-section li::marker { color: #a18aba; }
.legal-facts { margin: 18px 0 0; }
.legal-fact { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding-block: 15px; border-bottom: 1px solid #927eb71c; }
.legal-fact:first-child { padding-top: 0; }
.legal-fact dt { color: #4d405d; font-size: 14px; font-weight: 500; line-height: 1.8; }
.legal-fact dd { margin: 0; }
.legal-contact { font-style: normal; }
.legal-document [id] { scroll-margin-top: 108px; }

/* A shared link has one clear task; keep the content and actions together. */
.link-main { display: grid; align-items: center; padding-block: 136px 72px; }
.question-card { width: 100%; max-width: 680px; }
.question-card .eyebrow { margin-bottom: 19px; color: #7b6498; font-size: 14px; font-weight: 500; }
.question-card h1 { max-width: 19ch; margin-bottom: 21px; font-size: clamp(32px, 3.5vw, 44px); line-height: 1.2; letter-spacing: -.04em; text-wrap: balance; }
.purpose { max-width: 55ch; color: var(--muted); font-size: 16px; line-height: 1.75; }
.purpose:empty, .joining:empty { display: none; }
.joining { margin-top: 16px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.link-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.primary-action, .secondary-action, .error-actions .button, .store-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; padding: 10px 18px; border: 1px solid #ffffffb3;
  border-radius: 10px; background: #ffffff66; color: #4c405d;
  font: 500 14px/1.5 var(--sans); text-decoration: none; cursor: pointer;
}
.primary-action:hover, .error-actions .button:hover, .store-button:hover { background: #ffffffad; }
.secondary-action { background: transparent; border-color: #9580ad38; font-weight: 400; }
.secondary-action:hover { background: #ffffff45; }
[aria-disabled="true"], .secondary-action:disabled, .download-card:disabled { opacity: .48; cursor: default; }
.status { margin-top: 15px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.status:empty { margin: 0; }
.install-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid #927eb72b; color: var(--muted); font-size: 13px; line-height: 1.8; }
.install-note p { margin-top: 5px; }
.install-note a, .download-card { color: #70578e; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.download-card { margin-top: 12px; min-height: 44px; padding: 8px 0; border: 0; background: none; font-size: 13px; text-decoration: underline; cursor: pointer; }
.question-card details { margin-top: 20px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.question-card summary { padding-block: 10px; }
.question-card code { display: block; padding-block: 10px; overflow-wrap: anywhere; user-select: all; }
.question-card noscript p { margin-top: 18px; color: var(--muted); font-size: 13px; }

.error-main, .download-main { display: grid; place-items: center; padding-block: 150px 90px; }
.error-grid { width: min(var(--content-width), 100%); }
.download-content { width: 100%; }
.error-copy h1, .download-content h1 { font-size: clamp(34px, 4vw, 48px); line-height: 1.15; }
.error-lede, .download-content .lede { max-width: 48ch; margin-top: 22px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.error-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 28px; }
.error-routes { display: flex; align-items: center; gap: 17px; color: #70578e; font-size: 14px; }
.error-routes a { text-decoration: none; }
.error-routes a:hover { text-decoration: underline; text-underline-offset: 4px; }
.error-separator { color: #c0b2cd; }
.download-content .product-identity { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; font-size: 17px; }
.download-content .product-identity img { width: 30px; height: 30px; border-radius: 8px; }
.download-content .store-button { margin-top: 25px; }
.store-button img { width: 24px; height: 24px; opacity: .62; }
.handoff-note { margin-top: 18px; color: var(--muted); font-size: 13px; }
.handoff-note a { text-underline-offset: 4px; }

@media (max-width: 900px) {
  .document-layout { grid-template-columns: 175px minmax(0, 1fr); gap: 35px; }
  .document-index a { font-size: 11px; }
  .legal-fact { grid-template-columns: 125px minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 720px) {
  .legal-main { padding-block: 108px 44px; }
  .document-layout { display: block; }
  .document-index { display: none; }
  .document-mobile-index { display: block; margin-top: 26px; border-block: 1px solid #927eb72b; }
  .document-mobile-index summary { display: flex; justify-content: space-between; align-items: center; min-height: 46px; color: #665278; font-size: 13px; list-style: none; }
  .document-mobile-index summary::-webkit-details-marker { display: none; }
  .document-mobile-index summary::after { content: '+'; font-size: 19px; font-weight: 400; }
  .document-mobile-index[open] summary::after { content: '−'; }
  .document-mobile-index nav { display: grid; gap: 1px; padding-bottom: 15px; }
  .document-mobile-index a { padding-block: 7px; font-size: 12px; line-height: 1.65; text-decoration: none; }
  .legal-document h1 { font-size: 36px; }
  .legal-kicker { margin-bottom: 14px; font-size: 12px; }
  .legal-deck { margin-top: 18px; font-size: 15px; }
  .legal-updated { margin-top: 17px; }
  .legal-overview { margin-top: 27px; padding: 18px 20px; }
  .legal-section { margin-top: 30px; padding-top: 25px; }
  .legal-section h2 { font-size: 21px; margin-bottom: 14px; }
  .legal-section p, .legal-section li, .legal-section dd, .legal-overview p, .legal-contact { font-size: 14px; line-height: 1.8; }
  .legal-fact { grid-template-columns: 1fr; gap: 5px; }
  .link-main { padding-block: 116px 55px; }
  .question-card h1 { font-size: 32px; }
  .purpose { font-size: 15px; }
  .error-main, .download-main { padding-block: 125px 65px; }
  .error-lede, .download-content .lede { font-size: 15px; }
  .handoff-note { line-height: 1.75; }
}
@media print {
  .site-header, .document-index, .document-mobile-index, .footer, .skip-link { display: none; }
  body { background: white; }
  .legal-main { padding: 0; }
  .document-layout { display: block; max-width: none; padding: 0; }
  .legal-section { break-inside: avoid; }
}
