/* Legal controls use explicit readable colors across public and workspace themes. */
.legal-consents { margin: 22px 0; padding: 20px; border: 1px solid var(--border,#dfe6da); border-radius: 14px; background: var(--surface,#fff); color: var(--text,#1b392f); font-size: 14px; line-height: 1.65; }
.legal-consents h3 { margin: 0 0 8px; font-size: 16px; color: inherit; }
.legal-consents .legal-intro { margin: 0 0 16px; font-size: 13px; color: inherit; }
.legal-consents a, .legal-page a:not(.btn), .legal-document-links a { color: #205846; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-consent-row { display: grid; grid-template-columns: 21px minmax(0,1fr); align-items: start; gap: 12px; margin: 0 0 18px; }
.legal-consent-row:last-of-type { margin-bottom: 0; }
.legal-consent-row input[type=checkbox] { appearance: auto; width: 20px; height: 20px; min-height: 20px; margin: 4px 0 0; padding: 0; accent-color: #205846; cursor: pointer; }
.legal-consent-row label { display: block; margin: 3px 0; color: inherit; font-weight: 500; cursor: pointer; }
.legal-consent-row small { display: block; font-size: 12px; color: inherit; }
.legal-combined-links { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 7px; font-size: 13px; }
.legal-marketing { padding-top: 16px; border-top: 1px solid var(--border,#dfe6da); }
.legal-marketing label span { font-weight: 400; }
.legal-document-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border,#dfe6da); font-size: 13px; }
.legal-validation-error { margin: 12px 0 0; color: #a32121; font-size: 13px; font-weight: 600; }
.legal-validation-error:empty { display: none; }
.legal-unavailable { border-color: #b36b21; }
.legal-consents input[aria-invalid=true] { outline: 2px solid #a32121; outline-offset: 3px; }
.legal-consents :focus-visible, .legal-page :focus-visible, .legal-cookie-dialog :focus-visible { outline: 3px solid #39775f; outline-offset: 4px; }
.legal-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.legal-page { max-width: 900px; margin: 0 auto; padding: 42px 24px 70px; color: var(--text,#1b392f); font-family: var(--brand-font,system-ui,sans-serif); line-height: 1.75; }
.legal-page h1 { font-size: clamp(27px,5vw,40px); line-height: 1.18; margin: 20px 0 14px; overflow-wrap: anywhere; }
.legal-page h2 { font-size: 22px; line-height: 1.35; }
.legal-page .legal-document-body, .legal-page [data-legal-document-body] { white-space: pre-wrap; overflow-wrap: anywhere; }
.legal-page .legal-meta { font-size: 13px; color: inherit; }
.legal-page .legal-card { margin: 24px 0; padding: 28px; background: var(--surface,#fff); border: 1px solid var(--border,#dfe6da); border-radius: 18px; }
.legal-page label { color: inherit; }
.legal-page .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 5px 0; padding: 10px 17px; border: 1px solid #205846; border-radius: 10px; background: #fff; color: #205846; font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.legal-page .btn.primary { background: #163b32; color: #fff; }
.legal-page .btn:disabled { opacity: .6; cursor: wait; }
.legal-document-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); gap: 16px; margin: 24px 0; }
.legal-page .legal-document-grid .legal-card { display: block; margin: 0; text-decoration: none; }
.legal-document-grid .legal-card:hover { border-color: #205846; }
.legal-page .legal-document-grid h2 { font-size: 19px; margin: 0 0 12px; }
.legal-page .legal-document-grid span { font-size: 13px; }
.ro-legal-links { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13px; margin-top: 18px; }
.ro-legal-links a { text-decoration: underline; text-underline-offset: 3px; }
.legal-page input:not([type=checkbox]), .legal-page select, .legal-page textarea { width: 100%; max-width: 100%; font: inherit; padding: 11px 13px; border: 1px solid var(--border-strong,#bcc9bf); border-radius: 10px; background: var(--surface,#fff); color: var(--text,#1b392f); box-sizing: border-box; }
.legal-page input[type=checkbox] { width: 20px; height: 20px; accent-color: #205846; vertical-align: middle; }
.legal-page .field { margin: 0 0 18px; }
.legal-page .field > label { display: block; margin-bottom: 6px; font-weight: 600; }
.legal-page .legal-info-check { display: flex; gap: 10px; align-items: start; margin: 16px 0; }
.legal-page .legal-info-check input { flex-shrink: 0; margin-top: 5px; }
.legal-page [data-legal-status] { overflow-wrap: anywhere; }
.legal-status-error { color: #a32121; }
.legal-page .legal-footer { display: flex; flex-wrap: wrap; gap: 14px; border-top: 1px solid var(--border,#dfe6da); margin-top: 30px; padding-top: 20px; }
.legal-tracking-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 24px; }
.legal-tracking-details dt { font-size: 12px; font-weight: 600; }
.legal-tracking-details dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.legal-request-response { margin: 22px 0; padding: 18px; border: 1px solid var(--border,#dfe6da); border-radius: 12px; background: var(--surface,#fff); }
.legal-request-response h3 { margin: 0 0 10px; font-size: 16px; }
.legal-request-response p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.legal-text-button, [data-legal-cookie-open] { border: 0; background: transparent; padding: 4px 0; color: inherit; text-decoration: underline; text-underline-offset: 3px; font: inherit; cursor: pointer; }
.legal-cookie-dialog { width: min(580px,calc(100vw - 32px)); max-width: 580px; max-height: calc(100dvh - 36px); padding: 0; border: 1px solid #cbd8ce; border-radius: 20px; color: #1b392f; background: #fff; font-family: var(--brand-font,system-ui,sans-serif); box-shadow: 0 24px 80px #10281d40; }
.legal-cookie-dialog::backdrop { background: #0b211bb3; }
.legal-cookie-form { padding: 28px; }
.legal-cookie-heading { display: flex; align-items: start; gap: 16px; justify-content: space-between; }
.legal-cookie-heading span { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: #486458; }
.legal-cookie-heading h2 { margin: 6px 0 14px; font-size: 23px; line-height: 1.25; }
.legal-cookie-heading button { flex-shrink: 0; width: 36px; height: 36px; border: 1px solid #cbd8ce; border-radius: 50%; background: #fff; color: #1b392f; font-size: 24px; cursor: pointer; }
.legal-cookie-form > p { font-size: 14px; line-height: 1.65; margin: 0 0 20px; }
.legal-cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid #dfe6da; padding: 16px 0; color: #1b392f; }
.legal-cookie-category strong, .legal-cookie-category small { display: block; }
.legal-cookie-category strong { font-size: 14px; }
.legal-cookie-category small { font-size: 12px; line-height: 1.6; margin-top: 4px; color: #486458; }
.legal-cookie-category input[type=checkbox] { appearance: auto; flex-shrink: 0; width: 21px; height: 21px; min-height: 21px; accent-color: #205846; }
.legal-cookie-fixed { flex-shrink: 0; font-size: 11px; font-weight: 600; color: #205846; background: #edf3e8; padding: 6px 9px; border-radius: 20px; }
.legal-cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 14px; }
.legal-cookie-actions .btn { flex: 1; justify-content: center; min-height: 44px; border: 1px solid #205846; border-radius: 10px; padding: 10px 14px; font: inherit; font-size: 13px; cursor: pointer; background: #fff; color: #205846; }
.legal-cookie-actions .btn.primary { background: #163b32; color: #fff; }
.legal-cookie-form .legal-text-button { font-size: 12px; color: #486458; }
.legal-cookie-status:empty { display: none; }
.legal-cookie-banner { position: fixed; z-index: 1500; right: max(20px,env(safe-area-inset-right)); bottom: max(20px,env(safe-area-inset-bottom)); left: max(20px,env(safe-area-inset-left)); display: flex; align-items: center; gap: 26px; width: auto; max-width: 1100px; max-height: calc(100dvh - 40px); overflow: auto; margin: 0 auto; padding: 22px 24px; border: 1px solid #cad8ce; border-radius: 18px; box-sizing: border-box; background: #fff; color: #1b392f; box-shadow: 0 12px 60px #10281d33; font-family: var(--brand-font,system-ui,sans-serif); }
.legal-cookie-banner[hidden] { display: none; }
.legal-cookie-banner-space { flex-shrink: 0; width: 100%; pointer-events: none; }
.legal-cookie-banner-space[hidden] { display: none; }
.legal-cookie-banner-copy { min-width: 0; flex: 1; }
.legal-cookie-banner h2 { margin: 0 0 7px; color: inherit; font-size: 17px; line-height: 1.3; }
.legal-cookie-banner p { margin: 0; color: inherit; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.legal-cookie-banner-actions { display: flex; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
.legal-cookie-banner-actions button { display: inline-flex; align-items: center; justify-content: center; min-width: 0; min-height: 44px; max-width: 100%; margin: 0; padding: 11px 15px; border: 1px solid #205846; border-radius: 10px; background: #fff; color: #205846; font: inherit; font-size: 13px; line-height: 1.4; font-weight: 600; white-space: normal; cursor: pointer; }
.legal-cookie-banner-actions button:first-child { background: #163b32; color: #fff; }
.legal-cookie-banner :focus-visible { outline: 3px solid #39775f; outline-offset: 4px; }
html[data-theme=dark] .legal-cookie-banner { border-color: #426052; background: #14271f; color: #f0f5ef; box-shadow: 0 12px 60px #0006; }
html[data-theme=dark] .legal-cookie-banner-actions button { border-color: #a0c7af; background: #14271f; color: #e5f5e9; }
html[data-theme=dark] .legal-cookie-banner-actions button:first-child { background: #d2e8c3; color: #152e23; }
html[data-theme=dark] .legal-cookie-banner :focus-visible { outline-color: #d2e8c3; }
@media(max-width:760px) {
  .legal-cookie-banner { align-items: stretch; flex-direction: column; gap: 16px; right: max(12px,env(safe-area-inset-right)); bottom: max(12px,env(safe-area-inset-bottom)); left: max(12px,env(safe-area-inset-left)); max-height: calc(100dvh - 24px); padding: 18px; border-radius: 14px; }
  .legal-cookie-banner-actions { flex-shrink: 1; }
  .legal-cookie-banner-actions button { flex: 1 1 160px; }
}
html[data-theme=dark] .legal-consents a, html[data-theme=dark] .legal-page a:not(.btn), html[data-theme=dark] .legal-document-links a { color: #c5eca7; }
html[data-theme=dark] .legal-validation-error, html[data-theme=dark] .legal-status-error { color: #ffb4b4; }
@media(max-width:600px) {
  .legal-consents { padding: 16px; }
  .legal-consent-row { gap: 10px; }
  .legal-page { padding: 22px 16px 45px; }
  .legal-page .legal-card { padding: 18px; }
  .legal-tracking-details { grid-template-columns: 1fr; }
  .legal-cookie-form { padding: 21px; }
  .legal-cookie-category { gap: 10px; }
  .legal-cookie-fixed { max-width: 88px; text-align: center; }
  .legal-cookie-actions { flex-direction: column; }
}
