body.legal-modal-open { overflow: hidden; }

.legal-modal-backdrop { z-index: 10040; padding: 24px; background: rgba(15, 23, 42, .46); backdrop-filter: blur(6px); }
.legal-modal-content {
  display: grid;
  width: min(1080px, 100%);
  height: min(820px, calc(100vh - 48px));
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(15, 23, 42, .28);
}
.legal-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 28px 18px; }
.legal-modal-title-row { display: flex; min-width: 0; align-items: center; gap: 14px; }
.legal-modal-icon { display: flex; width: 42px; height: 42px; flex: 0 0 42px; align-items: center; justify-content: center; border: 1px solid var(--brand-soft-border); border-radius: 13px; background: var(--brand-soft); color: var(--brand); }
.legal-modal-icon svg { width: 21px; height: 21px; }
.legal-modal-heading { min-width: 0; }
.legal-modal-eyebrow { color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.legal-modal-heading h2 { margin: 4px 0 4px; color: var(--text-primary); font-size: clamp(21px, 2vw, 26px); line-height: 1.15; }
.legal-modal-heading p { max-width: 680px; margin: 0; color: var(--text-secondary); font-size: 11px; line-height: 1.45; }
.legal-document-tabs { display: flex; gap: 8px; padding: 0 28px 14px; border-bottom: 1px solid var(--panel-border); }
.legal-document-tabs button { min-height: 38px; padding: 0 15px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.legal-document-tabs button:hover { background: var(--hover-bg); color: var(--text-primary); }
.legal-document-tabs button.is-active { border-color: var(--brand-soft-border); background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 8%, transparent); }
.legal-reader { display: grid; min-height: 0; grid-template-columns: 250px minmax(0, 1fr); overflow: hidden; background: var(--panel); }
.legal-reader-sidebar { min-height: 0; padding: 24px 16px 24px 22px; overflow-y: auto; border-right: 1px solid var(--panel-border); background: color-mix(in srgb, var(--bg) 42%, var(--panel)); }
.legal-reader-sidebar > span { display: block; margin: 0 8px 10px; color: var(--text-muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.legal-reader-sidebar nav { display: grid; gap: 3px; }
.legal-reader-sidebar button { width: 100%; padding: 10px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 10px; font-weight: 650; line-height: 1.4; text-align: left; cursor: pointer; }
.legal-reader-sidebar button:hover { background: var(--hover-bg); color: var(--text-primary); }
.legal-reader-sidebar button.is-active { background: var(--brand-soft); color: var(--brand); }
.legal-reader-content { min-height: 0; padding: 34px clamp(28px, 5vw, 66px) 58px; overflow-y: auto; scroll-behavior: smooth; }
.legal-document-article { width: min(720px, 100%); margin: 0 auto; }
.legal-text-section { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 16px; padding: 28px 0; scroll-margin-top: 18px; border-bottom: 1px solid var(--panel-border); }
.legal-text-section:first-child { padding-top: 4px; }
.legal-text-section:last-child { border-bottom: 0; }
.legal-section-number { display: flex; width: 30px; height: 30px; align-items: center; justify-content: center; border: 1px solid var(--brand-soft-border); border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-size: 9px; font-weight: 850; }
.legal-text-section h3 { margin: 3px 0 12px; color: var(--text-primary); font-size: clamp(15px, 1.5vw, 18px); line-height: 1.35; text-transform: none; }
.legal-section-copy { display: grid; gap: 12px; }
.legal-text-section p { margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.8; text-align: left; }
.legal-modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 13px 20px; border-top: 1px solid var(--panel-border); background: color-mix(in srgb, var(--panel) 96%, var(--bg)); }
.legal-primary-action, .legal-secondary-action { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; box-sizing: border-box; padding: 0 14px; border-radius: 9px; font: inherit; font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; }
.legal-primary-action { border: 1px solid var(--brand); background: var(--brand); color: #fff; }
.legal-secondary-action { border: 1px solid var(--panel-border); background: transparent; color: var(--text-secondary); }
.legal-secondary-action:hover { border-color: var(--brand-soft-border); color: var(--brand); }
.legal-secondary-action svg { width: 15px; height: 15px; margin-right: 7px; }

.about-legal-section { width: min(1120px, calc(100% - 48px)); margin: 0 auto 30px; padding-top: 22px; border-top: 1px solid var(--panel-border); }
.about-legal-section h2 { margin: 0 0 6px; color: var(--text-primary); font-size: 17px; }
.about-legal-section > p { margin: 0 0 14px; color: var(--text-secondary); font-size: 12px; }
.about-legal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.about-legal-card { display: grid; gap: 5px; padding: 16px; border: 1px solid var(--panel-border); border-radius: 12px; background: var(--panel); color: var(--text-primary); text-align: left; cursor: pointer; }
.about-legal-card:hover { border-color: var(--brand-soft-border); background: var(--hover-bg); }
.about-legal-card strong { font-size: 13px; }
.about-legal-card span { color: var(--text-secondary); font-size: 11px; line-height: 1.5; }
.legal-inline-links { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; max-width: 100%; gap: 5px; margin-left: 0; font-size: 10px; font-weight: 600; white-space: normal; }
.legal-inline-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.about-cookie-preferences { margin-top: 10px; border: 0; background: transparent; color: var(--brand); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.cookie-consent { position: fixed; z-index: 10020; right: 18px; bottom: 18px; left: 18px; display: flex; width: min(820px, calc(100% - 36px)); min-height: 82px; margin: auto; align-items: center; justify-content: space-between; gap: 20px; box-sizing: border-box; padding: 16px 18px; border: 1px solid var(--panel-border); border-radius: 15px; background: color-mix(in srgb, var(--panel) 96%, transparent); box-shadow: 0 18px 50px rgba(0,0,0,.28); backdrop-filter: blur(18px); }
.cookie-consent-copy strong { color: var(--text-primary); font-size: 13px; }
.cookie-consent-copy p { margin: 5px 0 0; color: var(--text-secondary); font-size: 11px; line-height: 1.5; }
.cookie-consent-copy a { color: var(--brand); }
.cookie-consent-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-consent-actions button { min-height: 38px; padding: 0 13px; border: 1px solid var(--brand-soft-border); border-radius: 9px; background: var(--brand-soft); color: var(--brand); font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.cookie-consent-actions button:hover { border-color: var(--brand); }
.cookie-preferences-backdrop { position: fixed; z-index: 10030; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(15, 23, 42, .5); backdrop-filter: blur(6px); }
.cookie-preferences-modal { width: min(560px, 100%); overflow: hidden; border: 1px solid var(--panel-border); border-radius: 18px; background: var(--panel); box-shadow: 0 24px 80px rgba(0, 0, 0, .3); }
.cookie-preferences-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 24px 18px; border-bottom: 1px solid var(--panel-border); }
.cookie-preferences-eyebrow { color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.cookie-preferences-header h2 { margin: 5px 0 6px; color: var(--text-primary); font-size: 21px; line-height: 1.25; }
.cookie-preferences-header p { max-width: 440px; margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.55; }
.cookie-preferences-close { width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid var(--panel-border); border-radius: 9px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 20px; cursor: pointer; }
.cookie-preferences-close:hover { background: var(--hover-bg); color: var(--text-primary); }
.cookie-preferences-options { display: grid; gap: 10px; padding: 18px 24px; }
.cookie-preference-row { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 18px; box-sizing: border-box; padding: 14px 15px; border: 1px solid var(--panel-border); border-radius: 12px; background: color-mix(in srgb, var(--bg) 58%, var(--panel)); }
.cookie-preference-row > div { display: grid; gap: 4px; }
.cookie-preference-row strong { color: var(--text-primary); font-size: 13px; }
.cookie-preference-row span { color: var(--text-secondary); font-size: 11px; line-height: 1.45; }
.cookie-preference-required { flex: 0 0 auto; padding: 5px 8px; border-radius: 8px; background: var(--brand-soft); color: var(--brand) !important; font-weight: 750; }
.cookie-preference-switch { position: relative; display: inline-flex; width: 44px; height: 24px; flex: 0 0 44px; }
.cookie-preference-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cookie-preference-switch > span { position: absolute; inset: 0; border-radius: 999px; background: var(--panel-border); cursor: pointer; transition: background-color .2s ease; }
.cookie-preference-switch > span::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; content: ''; transition: transform .2s ease; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.cookie-preference-switch input:checked + span { background: var(--brand); }
.cookie-preference-switch input:checked + span::after { transform: translateX(20px); }
.cookie-preference-switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 3px; }
.cookie-preferences-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 24px; border-top: 1px solid var(--panel-border); }
.cookie-preferences-footer > a { color: var(--brand); font-size: 11px; font-weight: 700; }
.cookie-preferences-footer > div { display: flex; gap: 8px; }
.cookie-preferences-secondary, .cookie-preferences-primary { min-height: 38px; padding: 0 14px; border-radius: 9px; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.cookie-preferences-secondary { border: 1px solid var(--panel-border); background: transparent; color: var(--text-secondary); }
.cookie-preferences-primary { border: 1px solid var(--brand); background: var(--brand); color: #fff; }

@media (max-width: 700px) {
  .legal-modal-backdrop { padding: 0; }
  .legal-modal-content { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .legal-modal-header { padding: 15px 14px 11px; }
  .legal-modal-icon { width: 36px; height: 36px; flex-basis: 36px; border-radius: 10px; }
  .legal-document-tabs { padding: 0 14px 10px; }
  .legal-document-tabs button { flex: 1; padding: 0 8px; }
  .legal-reader { grid-template-columns: 1fr; }
  .legal-reader-sidebar { display: none; }
  .legal-reader-content { padding: 22px 16px 42px; }
  .legal-text-section { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 20px 0; }
  .legal-section-number { width: 26px; height: 26px; border-radius: 7px; }
  .legal-text-section h3 { margin-top: 2px; font-size: 15px; }
  .legal-text-section p { font-size: 11px; line-height: 1.75; }
  .legal-modal-footer { padding: 9px; }
  .legal-secondary-action, .legal-primary-action { flex: 1; }
  .about-legal-grid { grid-template-columns: 1fr; }
  .legal-inline-links { display: flex; justify-content: center; margin: 4px 0 0; }
  .cookie-consent { right: 8px; bottom: 8px; left: 8px; width: auto; align-items: stretch; flex-direction: column; gap: 12px; }
  .cookie-consent-copy { min-width: 0; }
  .cookie-consent-copy p { overflow-wrap: anywhere; }
  .cookie-consent-actions { width: 100%; min-width: 0; }
  .cookie-consent-actions button { min-height: 44px; flex: 1; }
  .cookie-preferences-backdrop { padding: 10px; }
  .cookie-preferences-header { padding: 20px 18px 15px; }
  .cookie-preferences-options { padding: 14px 18px; }
  .cookie-preferences-footer { align-items: stretch; padding: 13px 18px 18px; flex-direction: column; }
  .cookie-preferences-footer > div { width: 100%; }
  .cookie-preferences-footer button { flex: 1; }
}

@media (max-width: 480px) {
  .legal-inline-links a { display: inline-flex; min-height: 44px; align-items: center; }
  .cookie-consent-actions,
  .cookie-preferences-footer > div { flex-direction: column; }
  .cookie-consent-actions button,
  .cookie-preferences-footer button { width: 100%; min-width: 0; }
  .cookie-preferences-modal { max-height: calc(100dvh - 20px); overflow-y: auto; }
  .cookie-preference-row { min-width: 0; align-items: flex-start; }
}
