/* Componentes da MENSVRA: a régua organiza a interação; dourado indica seleção. */
.ruler-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-top: 28px; }
.ruler-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-height: 90px; padding: 18px 20px; border: 1px solid #ffffff20; border-top: 3px solid #ffffff30; border-radius: 6px 6px 0 0; background: #ffffff05; color: #c2d1d8; text-align: left; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .18s,border-color .18s; }
.ruler-tab:hover { background: #ffffff0d; }
.ruler-tab[aria-selected="true"] { color: white; border-color: #e0a44a66; border-top-color: var(--brass); background: #e0a44a12; }
.ruler-index { color: var(--brass); font: 12px var(--mono); }
.ruler-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 36px; border: 1px solid #ffffff25; background: #07192365; border-radius: 0 0 8px 8px; }
.ruler-kicker { color: var(--brass); margin-top: 0; }
.ruler-copy h2 { font-size: 34px; letter-spacing: -.04em; margin-block: 10px 18px; color: white; }
.ruler-copy > p { max-width: 430px; font-size: 15px; line-height: 1.8; }
.ruler-copy .ruler-next { padding-top: 20px; border-top: 1px solid #ffffff20; font-size: 12px; color: #adc3d0; }
.ruler-example { align-self: start; padding: 20px; background: #ffffff06; border: 1px solid #ffffff18; border-radius: 10px; }
.ruler-example-label { margin-top: 0; color: #aabfca; font-size: 11px !important; }
.ruler-bubble { max-width: 90%; padding: 12px 16px; margin-top: 12px; border-radius: 8px 8px 8px 0; background: #0e2e4a; color: white; }
.ruler-bubble.customer { margin-left: auto; background: #f3f5f6; color: var(--ink); border-radius: 8px 8px 0 8px; }
.ruler-bubble strong { display: block; font-size: 10px; }
.ruler-bubble p { margin-bottom: 0; line-height: 1.6; font-size: 13px; }
.ruler-example .ruler-state { margin-bottom: 0; padding-top: 18px; color: var(--brass); font-size: 12px; }
.plan-builder { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); background: #fff; border-radius: 14px; box-shadow: 0 20px 55px #0e2e4a0a; overflow: hidden; }
.builder-controls { display: grid; gap: 26px; padding: 38px; align-content: start; }
.builder-field { display: grid; gap: 10px; color: var(--text); font-size: 14px; font-weight: 700; }
.builder-field input,.builder-field select { width: 100%; min-width: 0; min-height: 50px; border: 1px solid #b8c9d2; border-radius: 6px; padding: 10px 14px; background: #f8fafb; color: var(--ink); font-size: 17px; }
.builder-field input:focus,.builder-field select:focus { border-color: var(--blue); outline: 3px solid #2761d420; }
.sell-switch { display: flex; gap: 16px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
.sell-switch:has(input:checked) { border-color: var(--brass-dark); background: #e0a44a0d; }
.sell-switch input { appearance: none; width: 46px; height: 26px; flex: none; margin: 0; border: 1px solid #849cab; border-radius: 20px; background: #d6e0e6; position: relative; cursor: pointer; }
.sell-switch input::before { content: ''; position: absolute; width: 18px; height: 18px; top: 3px; left: 4px; background: white; border-radius: 50%; box-shadow: 0 1px 4px #0003; transition: transform .18s; }
.sell-switch input:checked { background: var(--navy); border-color: var(--navy); }
.sell-switch input:checked::before { transform: translateX(18px); background: var(--brass); }
.sell-switch strong { display: block; font-size: 14px; }
.sell-switch small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.builder-result { padding: 38px; background: var(--navy); color: white; }
.builder-caption { margin: 0; color: #b1c6d1; font-size: 12px; line-height: 1.6; }
.builder-result h3 { margin: 12px 0; font-size: 32px; }
.builder-amount { margin: 16px 0 30px; font-size: clamp(38px,4vw,52px); line-height: 1.2; font-weight: 800; letter-spacing: -.05em; color: var(--brass); }
.builder-amount small { display: block; font-size: 13px; line-height: 1.6; color: #bfced5; letter-spacing: 0; font-weight: 400; }
.builder-amount.needs-proposal { font-size: 32px; }
.builder-breakdown { margin: 0; font-size: 13px; }
.builder-breakdown div { display: flex; gap: 20px; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #ffffff18; }
.builder-breakdown dt { color: #c4d3db; }
.builder-breakdown dd { margin: 0; text-align: right; line-height: 1.5; }
.builder-total { font-size: 15px; line-height: 1.6; margin-top: 24px; }
.builder-note { color: #b1c6d1; font-size: 12px; line-height: 1.8; }
.builder-result .button { width: 100%; margin-top: 16px; }
.builder-help { width: 100%; margin-top: 15px; border: 0; padding: 10px 0; color: #d4e1e7; background: transparent; font-size: 12px; text-decoration: underline; cursor: pointer; }
.sr-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.faq-search { display: grid; gap: 12px; margin-bottom: 20px; }
.faq-search label { font-weight: 700; font-size: 14px; }
.faq-search input { width: 100%; min-height: 50px; border: 1px solid #b8c9d2; border-radius: 7px; padding: 12px 16px; background: white; font-size: 15px; color: var(--ink); }
.faq-status { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.faq-status:empty { display: none; }
.text-faq summary { list-style: none; display: flex; justify-content: space-between; gap: 22px; }
.text-faq summary::-webkit-details-marker { display: none; }
.text-faq summary::after { content: '+'; color: var(--brass-dark); font-size: 23px; font-weight: 400; line-height: 1.2; }
.text-faq details[open] summary::after { content: '−'; }
.diagnostic-progress { display: grid; gap: 12px; padding-block: 0 18px; }
.diagnostic-progress p { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); }
.diagnostic-progress progress { width: 100%; height: 6px; border: 0; border-radius: 10px; overflow: hidden; background: var(--line); accent-color: var(--brass-dark); }
.diagnostic-progress progress::-webkit-progress-bar { background: var(--line); }
.diagnostic-progress progress::-webkit-progress-value { background: var(--brass-dark); }
.diagnostic-progress progress::-moz-progress-bar { background: var(--brass-dark); }
.diagnostic-form fieldset { padding: 28px; }
.diagnostic-form legend { font-size: 21px; }
.diagnostic-form label { padding: 15px; margin-top: 12px; border: 1px solid var(--line); border-radius: 6px; }
.diagnostic-form label:has(input:checked) { background: #e0a44a10; border-color: var(--brass-dark); }
.diagnostic-navigation { display: flex; gap: 15px; justify-content: space-between; }
.diagnostic-navigation button:disabled { opacity: .45; cursor: default; transform: none; }
.diagnostic-validation { margin-top: 0; font-size: 14px; color: #9b2f25; }
.diagnostic-result .button { margin: 12px 12px 0 0; }
.assistant-launcher { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; align-items: center; gap: 14px; padding: 16px 20px; max-width: calc(100vw - 30px); border: 1px solid #819bab; border-top: 2px solid var(--brass); border-radius: 12px; background: var(--night); color: white; cursor: pointer; text-align: left; box-shadow: 0 12px 30px #07192330; }
.assistant-launcher .assistant-mark { width: 27px; height: 29px; }
.assistant-launcher strong { display: block; font-size: 13px; }
.assistant-launcher small { display: block; margin-top: 6px; color: #c1d0d8; font-size: 11px; }
.assistant-launcher:hover { background: var(--navy); border-color: var(--brass); }
body.assistant-open { overflow: hidden; }
.assistant-dialog { position: fixed; inset: auto 22px 22px auto; width: min(440px,calc(100vw - 32px)); max-width: none; height: min(710px,calc(100dvh - 44px)); max-height: none; margin: 0; padding: 0; border: 1px solid #7994a5; border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 80px #07192345; overflow: hidden; }
.assistant-dialog::backdrop { background: #07192355; backdrop-filter: blur(3px); }
.assistant-shell { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.assistant-shell > * { flex-shrink: 0; }
.assistant-shell > .assistant-messages { flex: 1 1 80px; min-height: 80px; }
.assistant-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 22px; background: var(--night); border-bottom: 2px solid var(--brass); color: white; }
.assistant-header h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.assistant-header p { margin: 7px 0 0; font-size: 12px; color: #c1d0d8; }
.assistant-icon-button { width: 38px; height: 38px; border: 1px solid #9db3bf; border-radius: 6px; background: transparent; color: white; font-size: 25px; cursor: pointer; }
.assistant-messages { padding: 22px 18px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.assistant-message { max-width: 94%; margin-bottom: 20px; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 10px 10px 10px 0; }
.assistant-speaker { display: block; font-size: 10px; font-weight: 700; color: var(--brass-dark); }
.assistant-message p { margin: 10px 0 0; font-size: 14px; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; color: var(--text); }
.assistant-message.visitor { margin-left: auto; border-color: var(--navy); border-radius: 10px 10px 0 10px; background: var(--navy); }
.assistant-message.visitor .assistant-speaker { color: var(--brass); }
.assistant-message.visitor p { color: white; }
.assistant-links { display: grid; gap: 8px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.assistant-links a { color: #1855a3; font-size: 12px; line-height: 1.5; font-weight: 700; text-underline-offset: 3px; }
.assistant-suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 18px; max-height: 110px; overflow: auto; }
.assistant-suggestions[hidden] { display: none; }
.assistant-suggestions button { padding: 8px 11px; border: 1px solid #b5c6d0; border-radius: 20px; background: white; color: var(--ink); cursor: pointer; font-size: 12px; line-height: 1.5; }
.assistant-suggestions button:hover { border-color: var(--brass-dark); background: #fff9ed; }
.assistant-form { display: flex; gap: 10px; padding: 14px 18px 0; border-top: 1px solid var(--line); }
.assistant-form textarea { box-sizing: border-box; min-width: 0; width: 100%; max-height: min(220px,30dvh); resize: vertical; min-height: 46px; border: 1px solid #9fb5c2; border-radius: 8px; background: white; padding: 12px; color: var(--ink); font-size: 14px; line-height: 1.5; }
.assistant-form textarea.is-expanded { height: min(160px,24dvh); }
.assistant-composer { flex: 1; min-width: 0; }
.assistant-form .assistant-expand { display: block; min-height: 28px; margin-top: 4px; padding: 3px 0; background: transparent; color: var(--muted); font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.assistant-form > button { align-self: start; }
.assistant-typing { display: flex; align-items: center; gap: 10px; width: fit-content; padding: 12px 16px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px 10px 10px 0; background: white; color: var(--muted); font-size: 12px; }
.assistant-typing-dots { color: var(--brass-dark); letter-spacing: 3px; animation: assistant-pulse 1s ease-in-out infinite alternate; }
@keyframes assistant-pulse { to { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .assistant-typing-dots { animation: none; } }
.assistant-form button { min-height: 46px; align-self: end; border: 0; padding: 12px 15px; border-radius: 8px; background: var(--blue); color: white; font-weight: 700; cursor: pointer; font-size: 13px; }
.assistant-privacy { margin: 10px 18px 0; font-size: 10px; color: var(--muted); line-height: 1.6; }
.assistant-clear { justify-self: start; margin: 10px 18px 15px; padding: 0; background: transparent; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 11px; }
@media (max-width: 760px) {
  .ruler-panel { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .ruler-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ruler-tab { min-height: 85px; border-radius: 6px; }
  .plan-builder { grid-template-columns: 1fr; }
  .builder-controls,.builder-result { padding: 28px; }
  .assistant-launcher { right: 15px; bottom: 15px; padding: 12px 15px; }
  .assistant-launcher small { display: none; }
  .assistant-launcher .assistant-mark { width: 22px; height: 24px; }
  .page-footer { padding-bottom: 85px; }
  .assistant-dialog { inset: 10px; width: calc(100vw - 20px); height: calc(100dvh - 20px); border-radius: 12px; }
  .assistant-header { padding: 18px; }
  .diagnostic-form fieldset { padding: 20px 15px; }
  .diagnostic-form legend { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .ruler-tab,.sell-switch input::before { transition: none; }
}
