/* Legal pages (privacy, terms, disclaimer, cookie notice). Workstream W, 2026-10-18.
   Theme-aware through the --mh-* tokens; logical properties so RTL locales mirror. */

.mh-legal-updated { font-size: 0.85rem; color: var(--mh-muted); }

.mh-legal-heading { margin-block: 2.25rem 0.5rem; font-size: 1.35rem; font-weight: 700; color: var(--mh-text); }
.mh-legal-h { font-size: 1.1rem; font-weight: 700; margin-block-end: 0.5rem; color: var(--mh-text); }
.mh-legal-section a, .mh-legal-more a { color: var(--mh-accent); text-decoration: underline; text-underline-offset: 2px; }
.mh-legal-more { text-align: center; font-size: 0.9rem; color: var(--mh-muted); }

/* Controller details under the GDPR "Controller" section. */
.mh-legal-dl { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: 0.5rem 1rem; margin-block-start: 1rem; font-size: 0.92rem; }
.mh-legal-dl dt { font-weight: 600; color: var(--mh-muted-strong, var(--mh-muted)); }
.mh-legal-dl dd { margin: 0; color: var(--mh-text); overflow-wrap: anywhere; }

/* Cookie table: a real table on wide screens, stacked rows on phones. */
.mh-legal-table-wrap { overflow-x: auto; border: 1px solid var(--mh-card-border); border-radius: 1.2rem; background: var(--mh-surface-soft); }
.mh-legal-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.mh-legal-table caption { text-align: start; padding: 1rem 1.25rem 0.25rem; font-weight: 700; color: var(--mh-text); }
.mh-legal-table th, .mh-legal-table td { text-align: start; vertical-align: top; padding: 0.75rem 1.25rem; border-block-start: 1px solid var(--mh-card-border); color: var(--mh-text); }
.mh-legal-table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mh-muted); border-block-start: 0; }
.mh-legal-table tbody th { font-weight: 700; overflow-wrap: anywhere; }
:lang(ar) .mh-legal-table thead th, :lang(fa) .mh-legal-table thead th, :lang(ur) .mh-legal-table thead th, :lang(he) .mh-legal-table thead th, :lang(ja) .mh-legal-table thead th, :lang(ko) .mh-legal-table thead th, :lang(zh-hant) .mh-legal-table thead th { letter-spacing: 0; text-transform: none; }

@media (max-width: 640px) {
  .mh-legal-dl { grid-template-columns: 1fr; gap: 0.15rem; }
  .mh-legal-dl dd { margin-block-end: 0.6rem; }
  .mh-legal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mh-legal-table, .mh-legal-table caption, .mh-legal-table tbody, .mh-legal-table tr, .mh-legal-table th, .mh-legal-table td { display: block; width: auto; }
  .mh-legal-table tr { border-block-start: 1px solid var(--mh-card-border); padding-block: 0.5rem; }
  .mh-legal-table th, .mh-legal-table td { border: 0; padding: 0.25rem 1rem; }
  .mh-legal-table td::before { content: attr(data-label); display: block; font-size: 0.72rem; color: var(--mh-muted); }
}

/* Model withdrawal form (terms #withdrawal-form): a bordered, printable block with fill-in lines. */
.mh-legal-form { border: 1px solid var(--mh-card-border); border-radius: 12px; padding: 1rem 1.1rem; }
.mh-legal-form__line { padding-block-end: 0.9rem; border-block-end: 1px dashed var(--mh-card-border); }
.mh-legal-form__note { font-size: 0.85rem; color: var(--mh-muted); }
#payments p + p, .mh-legal-form p + p { margin-block-start: 0.6rem; }
