/* Legal pages and assistant follow the portal's geometric palette and both themes. */
[hidden] { display: none !important; }
.legal-layout { display: grid; grid-template-columns: 265px minmax(0, 1fr); gap: 42px; padding-top: 28px; padding-bottom: 80px; align-items: start; }
.legal-nav { display: grid; gap: 5px; position: sticky; top: 130px; }
.legal-nav a { padding: 12px 14px; border: 1px solid var(--hair); font-size: 14px; line-height: 1.45; text-decoration: none; background: var(--card); }
.legal-nav a[aria-current] { border: 2px solid var(--line); background: var(--y); color: #15141a; box-shadow: 3px 3px 0 var(--shc); font-weight: 800; }
.legal-copy { min-width: 0; max-width: 850px; line-height: 1.85; overflow-wrap: anywhere; }
.legal-copy section { margin: 0 0 30px; padding: 26px; border: 1px solid var(--hair); background: var(--card); }
.legal-copy h2 { margin: 0 0 16px; font-size: clamp(18px, 2vw, 24px); line-height: 1.45; }
.legal-copy a, .help a { text-underline-offset: 3px; }
.pg-legal .ph h1 { overflow-wrap: anywhere; hyphens: auto; }
.legal-details { display: grid; grid-template-columns: minmax(100px, 180px) minmax(0, 1fr); gap: 8px 20px; margin: 12px 0; font-size: 14px; line-height: 1.65; }
.legal-details dt { color: var(--mute); }
.legal-details dd { margin: 0; overflow-wrap: anywhere; }
.ft-legal { padding-top: 26px; padding-bottom: 24px; border-top: 1px solid var(--ft-line); color: var(--ft-mute); font-size: 12px; line-height: 1.7; }
.ft-legal p { margin: 5px 0; }
.ft-legal a, .ft-legal .lnk { color: var(--ft-fg); }
.ft-legal-with-counters { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 32px; }
.ft-legal-copy { min-width: 0; }
.ft-counters { --counter-width: 200px; --one-scale: 1; --rates-scale: .8; display: flex; align-items: center; gap: 16px; }
.ft-counter { width: var(--counter-width); flex: 0 0 var(--counter-width); min-width: 0; }
.ft-counter-one { height: calc(var(--counter-width) * .4); overflow: hidden; border-radius: 10px; }
.ft-counter-one > div { width: 200px; height: 80px; line-height: 0; transform: scale(var(--one-scale)); transform-origin: top left; }
.ft-counter-one .nbw-rate-link, .ft-counter-one .nbw-svg-rect { display: block; width: 200px; max-width: none; height: 80px; }
.ft-counter-frame { width: var(--counter-width); height: calc(var(--counter-width) * .496); overflow: hidden; border-radius: 14px; }
.ft-counter-frame iframe { display: block; width: 250px; max-width: none; height: 124px; border: 0; transform: scale(var(--rates-scale)); transform-origin: top left; }
.ft-legal .ft-counter-link { display: block; margin-top: 6px; color: var(--ft-mute); text-align: center; font: 10px/1.5 var(--text); text-decoration: none; text-underline-offset: 3px; }
.ft-legal .ft-counter-link:hover, .ft-legal .ft-counter-link:focus-visible { color: var(--ft-fg); text-decoration: underline; }
.ft-project-links { display: flex; flex-wrap: wrap; gap: 20px 48px; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--ft-line); }
.ft-project-links a { display: grid; gap: 4px; max-width: 100%; color: var(--ft-mute); font-size: 12px; line-height: 1.6; text-decoration: none; }
.ft-project-links strong { color: var(--ft-fg); font-size: 14px; }
.ft-project-links a:hover strong, .ft-project-links a:focus-visible strong { color: var(--y); }
.ft-project-links a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.ft-project-links a:focus-visible { outline: 2px solid var(--y); outline-offset: 5px; }
@media (min-width: 981px) {
  .ft-project-links { padding-right: 280px; }
}
@media (max-width: 980px) {
  .ft-legal-with-counters { grid-template-columns: minmax(0, 1fr); }
  .ft-project-links { padding-bottom: 88px; }
}
@media (max-width: 600px) {
  .ft-project-links { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .ft-counters { --counter-width: 160px; --one-scale: .8; --rates-scale: .64; flex-wrap: wrap; gap: 14px; }
}
.ft .newsletter { display: block; }
.sub-fields { display: flex; gap: 6px; }
.sub-fields > label { flex: 1; min-width: 0; }
.sub-fields input { width: 100%; }
.consent { font-size: 12px; line-height: 1.6; align-items: start; }
.consent input { margin-top: 4px; flex-shrink: 0; accent-color: var(--b); }
.newsletter .consent { margin-top: 12px; color: var(--ft-fg); }
.newsletter .consent input[type="checkbox"] { width: 16px; height: 16px; padding: 0; border-radius: 0; flex: 0 0 16px; }
.newsletter .consent span, .ft-in > * { min-width: 0; }
.newsletter .consent a { text-decoration: underline; }
.faq-item { border: 1px solid var(--hair); background: var(--card); padding: 18px 22px; margin: 10px 0; }
.faq-item summary { cursor: pointer; font-weight: 800; }
.faq-item p { line-height: 1.8; }
.ad-label { display: block; font: 11px/1.5 var(--text); color: var(--mute); padding: 7px 0; overflow-wrap: anywhere; }
.ad-label a { text-decoration: underline; }
.privacy-notice { position: fixed; left: 20px; bottom: 20px; z-index: 85; display: flex; align-items: center; gap: 16px; max-width: 580px; padding: 18px 20px; background: var(--card); color: var(--ink); border: 2px solid var(--line); box-shadow: var(--sh); }
.privacy-notice p { margin: 0; font-size: 13px; line-height: 1.65; }
.privacy-notice button { flex-shrink: 0; }
.chat-launch { position: fixed; right: 24px; bottom: 24px; z-index: 80; border: 2px solid #15141a; background: var(--y); color: #15141a; padding: 15px 20px; display: flex; gap: 10px; align-items: center; font-weight: 800; font-family: var(--text); box-shadow: 4px 4px 0 #15141a; cursor: pointer; min-height: 52px; }
.chat-launch:hover { transform: translate(-1px, -1px); }
.deal-chat { position: fixed; z-index: 100; right: 24px; bottom: 24px; width: min(440px, calc(100vw - 32px)); height: min(740px, calc(100dvh - 48px)); max-height: calc(100vh - 48px); background: var(--card); color: var(--ink); border: 2px solid var(--line); box-shadow: var(--sh-l); display: flex; flex-direction: column; overflow: hidden; }
.chat-head { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 2px solid #15141a; background: var(--y); color: #15141a; }
.chat-head b { font-family: var(--disp); font-size: 16px; }
.chat-head small { display: block; margin-top: 6px; font-size: 12px; }
.chat-icon { width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid #15141a; background: transparent; color: inherit; cursor: pointer; }
.chat-log { padding: 18px; overflow-y: auto; flex: 1 1 auto; min-height: 110px; overscroll-behavior: contain; }
.chat-msg { padding: 14px 16px; border: 1px solid var(--hair); margin: 0 0 12px; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-msg p { margin: 0; }
.chat-answer { background: var(--card2); margin-right: 14px; }
.chat-user { background: var(--b); color: white; margin-left: 25px; border-color: var(--b); }
.chat-source { display: block; margin-top: 8px; font-size: 10px; color: var(--mute); }
.chat-link { display: inline-block; margin: 10px 14px 0 0; color: var(--b-tx); text-decoration: underline; font-weight: 600; font-size: 12px; }
.chat-topics { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.chat-chip { padding: 7px 10px; font: 11px/1.4 var(--text); background: var(--card); color: var(--ink); border: 1px solid var(--dash); cursor: pointer; }
.chat-chip:hover { border-color: var(--b-tx); }
.chat-status { min-height: 17px; font-size: 11px; color: var(--mute); margin: 0; padding: 0 18px; }
.chat-form { padding: 12px 18px; border-top: 1px solid var(--hair); }
.chat-form textarea { display: block; width: 100%; min-height: 70px; max-height: 120px; resize: vertical; border: 1px solid var(--dash); padding: 10px 12px; color: var(--ink); background: var(--input); font: 14px/1.5 var(--text); }
.chat-consent { margin: 10px 0; font-size: 11px; line-height: 1.5; }
.chat-consent a { color: var(--b-tx); text-decoration: underline; }
.chat-actions { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.chat-foot { padding: 0 18px 14px; margin: 0; font-size: 10px; line-height: 1.6; color: var(--mute); }
.chat-foot a { text-decoration: underline; }
.deal-chat :focus-visible, .privacy-notice :focus-visible { outline: 3px solid var(--b-tx); outline-offset: 3px; }
.chat-open { overflow: hidden; }
@media (max-width: 800px) {
  .legal-layout { grid-template-columns: 1fr; gap: 20px; }
  .legal-nav { position: static; display: flex; overflow-x: auto; gap: 8px; padding-bottom: 8px; }
  .legal-nav a { flex: 0 0 180px; }
  .legal-copy section { padding: 20px; }
  .privacy-notice { max-width: calc(100vw - 32px); left: 16px; bottom: 90px; }
}
@media (max-width: 520px) {
  .legal-details { grid-template-columns: 1fr; gap: 3px; }
  .legal-details dd { margin-bottom: 10px; }
  .chat-launch { bottom: 16px; right: 16px; padding: 12px 14px; font-size: 12px; }
  .deal-chat { width: calc(100vw - 16px); right: 8px; bottom: 8px; height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
  .chat-head { padding: 12px 16px; }
  .chat-topics { flex-wrap: nowrap; overflow-x: auto; padding-top: 2px; padding-bottom: 12px; flex-shrink: 0; }
  .chat-chip { flex: 0 0 auto; max-width: 240px; }
  .chat-form { padding: 10px 14px; }
  .chat-log { padding: 14px; }
  .privacy-notice { align-items: flex-start; padding: 14px; }
}
@media (prefers-reduced-motion: reduce) { .chat-launch { transition: none; transform: none; } }
@media (max-height: 600px) {
  .chat-head { padding: 8px 14px; }
  .chat-head small, .chat-foot { display: none; }
  .chat-log { min-height: 50px; padding: 10px 14px; }
  .chat-topics { flex-wrap: nowrap; overflow-x: auto; flex-shrink: 0; padding-bottom: 6px; }
  .chat-chip { flex: 0 0 auto; }
  .chat-form { padding: 8px 14px; }
  .chat-form textarea { min-height: 45px; height: 45px; }
  .chat-consent { margin: 6px 0; }
}
@media print { .chat-launch, .deal-chat, .privacy-notice { display: none !important; } }
