/* RACMA SMART EXPERIENCE v27 */
:root{
  --smart-red:#e30613;
  --smart-ink:#111827;
  --smart-muted:#6b7280;
  --smart-line:#e5e7eb;
  --smart-soft:#f7f8fa;
  --smart-white:#fff;
  --smart-shadow:0 24px 70px rgba(17,24,39,.14);
}

/* page progress */
.racma-page-progress{position:fixed;top:0;left:0;right:0;height:3px;z-index:9997;background:transparent;pointer-events:none}
.racma-page-progress>i{display:block;height:100%;width:0;background:linear-gradient(90deg,#b40009,var(--smart-red),#ff5a64);box-shadow:0 0 18px rgba(227,6,19,.28)}

/* section navigator */
.smart-section-nav{position:fixed;right:18px;top:50%;transform:translateY(-50%);z-index:65;display:grid;gap:8px;padding:10px 8px;background:rgba(255,255,255,.92);border:1px solid rgba(17,24,39,.08);box-shadow:0 12px 36px rgba(17,24,39,.08);backdrop-filter:blur(10px)}
.smart-section-nav button{width:11px;height:11px;border:1px solid #cbd0d6;background:#fff;padding:0;border-radius:50%;cursor:pointer;position:relative;transition:.2s}
.smart-section-nav button:after{content:attr(data-label);position:absolute;right:22px;top:50%;transform:translateY(-50%) translateX(8px);opacity:0;pointer-events:none;white-space:nowrap;background:#111827;color:#fff;padding:7px 9px;font-size:10px;font-weight:500;transition:.2s}
.smart-section-nav button:hover:after{opacity:1;transform:translateY(-50%) translateX(0)}
.smart-section-nav button.active{background:var(--smart-red);border-color:var(--smart-red);transform:scale(1.18)}

/* smart dock */
.smart-action-dock{position:fixed;left:50%;bottom:18px;transform:translateX(-50%) translateY(120%);z-index:88;display:flex;align-items:center;gap:8px;padding:8px;background:rgba(17,24,39,.96);border:1px solid rgba(255,255,255,.08);box-shadow:0 20px 55px rgba(0,0,0,.25);backdrop-filter:blur(14px);opacity:0;transition:.32s ease}
.smart-action-dock.visible{transform:translateX(-50%) translateY(0);opacity:1}
.smart-action-dock .smart-context{min-width:190px;padding:0 12px;color:#fff;line-height:1.25}
.smart-action-dock .smart-context small{display:block;color:#9ca3af;font-size:9px;text-transform:uppercase;letter-spacing:.08em;font-weight:500}
.smart-action-dock .smart-context b{display:block;font-size:12px;font-weight:600;margin-top:3px;max-width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.smart-action-dock button,.smart-action-dock a{min-height:42px;border:0;padding:0 14px;display:inline-flex;align-items:center;gap:8px;justify-content:center;font-size:11px;font-weight:600;cursor:pointer;text-decoration:none;white-space:nowrap}
.smart-dock-search{background:var(--smart-red);color:#fff}
.smart-dock-ai{background:#fff;color:#111827}
.smart-dock-wa{background:#18a95f;color:#fff}
.smart-dock-menu{width:42px;padding:0!important;background:#252b35;color:#fff}

/* command palette */
.smart-command{position:fixed;inset:0;z-index:9998;background:rgba(8,12,18,.62);display:grid;place-items:start center;padding-top:min(12vh,110px);backdrop-filter:blur(9px)}
.smart-command[hidden]{display:none}
.smart-command-box{width:min(680px,calc(100% - 28px));background:#fff;box-shadow:0 32px 100px rgba(0,0,0,.35);border:1px solid rgba(17,24,39,.08);overflow:hidden}
.smart-command-search{display:flex;align-items:center;gap:12px;padding:18px 20px;border-bottom:1px solid #e7e9ec}
.smart-command-search i{color:var(--smart-red)}
.smart-command-search input{width:100%;border:0;outline:0;font-size:17px;font-weight:500;color:#111827}
.smart-command-close{border:1px solid #e2e5e9;background:#fff;width:34px;height:34px;cursor:pointer}
.smart-command-list{max-height:430px;overflow:auto;padding:10px}
.smart-command-item{width:100%;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px;border:0;background:#fff;text-align:left;cursor:pointer;color:#111827}
.smart-command-item:hover,.smart-command-item.active{background:#f6f7f9}
.smart-command-item>i{width:42px;height:42px;display:grid;place-items:center;background:#fff1f2;color:var(--smart-red);border:1px solid #ffd6d9}
.smart-command-item b{font-size:12px;font-weight:600;display:block}
.smart-command-item small{font-size:10px;color:#6b7280;display:block;margin-top:3px}
.smart-command-item>span:last-child{font-size:9px;color:#9ca3af}
.smart-command-empty{padding:30px;text-align:center;color:#6b7280;font-size:12px}

/* interactive cursor/tilt */
.smart-tilt{transform:perspective(900px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)) translateY(var(--tilt-lift,0px));transform-style:preserve-3d;transition:transform .18s ease,box-shadow .18s ease}
.smart-tilt:hover{--tilt-lift:-3px}
.smart-spotlight{position:relative;overflow:hidden}
.smart-spotlight:after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(260px circle at var(--spot-x,50%) var(--spot-y,50%),rgba(227,6,19,.09),transparent 66%);opacity:0;transition:opacity .2s}
.smart-spotlight:hover:after{opacity:1}

/* intelligent advisor */
.smart-advisor-section{padding:96px 0;background:#fff;border-top:1px solid #eceef1;border-bottom:1px solid #eceef1}
.smart-advisor-grid{display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);gap:42px;align-items:start}
.smart-advisor-copy{position:sticky;top:120px}
.smart-advisor-copy h2{font-size:clamp(38px,4.5vw,66px);line-height:1.02;letter-spacing:-.04em;margin:8px 0 16px;font-weight:600;color:#111827}
.smart-advisor-copy p{font-size:14px;line-height:1.8;color:#68727e;max-width:560px;font-weight:500}
.smart-advisor-panel{border:1px solid #e1e5e9;background:#fafbfc;padding:26px}
.smart-question{padding:20px 0;border-bottom:1px solid #e4e7eb}
.smart-question:first-child{padding-top:0}.smart-question:last-of-type{border-bottom:0}
.smart-question>span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.12em;color:#8a929d;font-weight:600;margin-bottom:10px}
.smart-question h3{font-size:19px;margin:0 0 12px;color:#111827;font-weight:600}
.smart-choice-row{display:flex;gap:8px;flex-wrap:wrap}
.smart-choice{border:1px solid #dce1e6;background:#fff;color:#313a45;padding:10px 13px;cursor:pointer;font-size:11px;font-weight:600;transition:.18s}
.smart-choice:hover{border-color:#ffb9bf;color:#c9000b}.smart-choice.active{background:#111827;color:#fff;border-color:#111827}
.smart-advisor-result{margin-top:20px;background:#111827;color:#fff;padding:22px;display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:center}
.smart-advisor-result .result-icon{width:52px;height:52px;background:var(--smart-red);display:grid;place-items:center;font-size:18px}
.smart-advisor-result small{display:block;color:#9ca3af;font-size:9px;text-transform:uppercase;letter-spacing:.10em;font-weight:500}
.smart-advisor-result strong{display:block;margin-top:4px;font-size:18px;font-weight:600}
.smart-advisor-result p{margin:6px 0 0;color:#c5cbd3;font-size:10px;line-height:1.6}
.smart-advisor-result a{color:#fff;text-decoration:none;border:1px solid rgba(255,255,255,.22);padding:11px 13px;font-size:10px;font-weight:600;white-space:nowrap}

/* live search intelligence */
.wizard-field-card{position:relative}
.smart-code-status{display:flex;align-items:center;gap:8px;min-height:26px;margin-top:7px;font-size:9px;color:#7b8490;font-weight:500}
.smart-code-status i{color:#9ca3af}.smart-code-status.valid i{color:#1f9d5a}.smart-code-status.checking i{color:#d19b00}.smart-code-status.error i{color:#d7000d}
.smart-live-suggestions{position:absolute;left:0;right:0;top:calc(100% - 4px);z-index:22;background:#fff;border:1px solid #dfe3e8;box-shadow:0 22px 48px rgba(17,24,39,.13);max-height:260px;overflow:auto}
.smart-live-suggestions[hidden]{display:none}
.smart-live-suggestion{width:100%;border:0;border-bottom:1px solid #edf0f2;background:#fff;padding:12px 13px;display:grid;grid-template-columns:1fr auto;gap:8px;text-align:left;cursor:pointer}
.smart-live-suggestion:last-child{border-bottom:0}.smart-live-suggestion:hover{background:#f7f8fa}
.smart-live-suggestion b{font-size:11px;color:#111827;font-weight:600}.smart-live-suggestion span{font-size:9px;color:#6b7280}
.smart-live-suggestion em{font-style:normal;font-size:9px;color:#1f8d54}
.smart-saved-profile{margin:12px 0;padding:12px 14px;border:1px dashed #d8dde3;background:#fbfcfd;display:flex;align-items:center;gap:12px;font-size:10px;color:#626c78}
.smart-saved-profile i{color:var(--smart-red)}
.smart-saved-profile button{margin-left:auto;border:0;background:none;color:#111827;font-size:9px;text-decoration:underline;cursor:pointer;font-weight:600}

/* AI enhancements */
.ai-chat-panel{overflow:hidden}
.ai-chat-smartbar{padding:9px 11px;border-bottom:1px solid #e6e8eb;background:#fbfcfd;display:flex;align-items:center;gap:7px;overflow:auto;scrollbar-width:none}
.ai-chat-smartbar::-webkit-scrollbar{display:none}
.ai-chat-smartbar button{border:1px solid #e0e4e8;background:#fff;padding:7px 9px;font-size:9px;font-weight:600;color:#3c4651;white-space:nowrap;cursor:pointer}
.ai-chat-smartbar button:hover{border-color:#ffb5bb;color:#c4000a}
.ai-chat-suggestion-banner{margin:8px 12px 0;padding:10px 11px;background:#fff7f8;border:1px solid #ffd9dc;font-size:9px;line-height:1.5;color:#5c6672}
.ai-chat-suggestion-banner b{color:#111827;font-weight:600}
.ai-result-card{transition:.2s}.ai-result-card:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(17,24,39,.08)}

/* reveal helpers */
.smart-reveal{opacity:0;transform:translateY(28px);filter:blur(6px);transition:opacity .6s ease,transform .6s ease,filter .6s ease}
.smart-reveal.in{opacity:1;transform:none;filter:none}
.smart-reveal[data-smart-delay="1"]{transition-delay:.07s}.smart-reveal[data-smart-delay="2"]{transition-delay:.14s}.smart-reveal[data-smart-delay="3"]{transition-delay:.21s}.smart-reveal[data-smart-delay="4"]{transition-delay:.28s}

@media(max-width:1050px){
  .smart-section-nav{display:none}
  .smart-advisor-grid{grid-template-columns:1fr}.smart-advisor-copy{position:static}
}
@media(max-width:760px){
  .smart-action-dock{left:10px;right:10px;bottom:10px;transform:translateY(130%);width:auto;justify-content:stretch}
  .smart-action-dock.visible{transform:translateY(0)}
  .smart-action-dock .smart-context{display:none}
  .smart-action-dock button,.smart-action-dock a{flex:1;padding:0 9px;font-size:9px}.smart-dock-menu{flex:0 0 42px!important}
  .smart-command{padding-top:8vh}.smart-command-box{width:calc(100% - 18px)}
  .smart-command-list{max-height:66vh}
  .smart-advisor-section{padding:64px 0}.smart-advisor-panel{padding:18px}
  .smart-advisor-result{grid-template-columns:auto 1fr}.smart-advisor-result a{grid-column:1/-1;text-align:center}
  .smart-choice{flex:1;min-width:calc(50% - 4px)}
}
@media(prefers-reduced-motion:reduce){
  .smart-reveal{opacity:1;transform:none;filter:none;transition:none}.smart-tilt{transform:none!important}
}
