/* REVVDA shared styles */
/* REVVDA custom styles (Tailwind utilities come from the compiled CSS) */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #FAFAFC;
    color: #090D15;
    overflow-x: hidden;
}
.btn-redo {
    background-color: #FF4726;
    color: white;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-redo:hover {
    background-color: #E03617;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 20px -8px rgba(255, 71, 38, 0.45);
}
@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}
.animate-marquee {
    display: flex;
    width: 200%;
    animation: marquee 28s linear infinite;
}
.animate-marquee:hover {
    animation-play-state: paused;
}
/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #FAFAFC;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}
/* Hide scrollbar on horizontally scrolling chip rows */
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
/* Small indigo ring badge */
.badge-ring { display: inline-block; position: relative; width: 15px; height: 15px; border-radius: 9999px; background: #E0E7FF; flex: none; vertical-align: -3px; margin-left: 4px; }
.badge-ring::before { content: ""; position: absolute; inset: 3px; border-radius: 9999px; border: 1.5px solid #6366F1; }
.badge-ring::after { content: ""; position: absolute; inset: 6px; border-radius: 9999px; background: #6366F1; }
/* Placeholders to fill before publishing (search the file for class="todo") */
.todo { display: inline-block; padding: 1px 6px; border: 1px dashed #FBBF24; border-radius: 4px; background: rgba(254,243,199,.7); color: #78350F; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600; }
.legal-doc h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.15rem; color: #0f172a; margin: 2rem 0 .6rem; }
.legal-doc p, .legal-doc li { font-size: .875rem; line-height: 1.7; color: #475569; }
.legal-doc ul { list-style: disc; padding-left: 1.25rem; margin: .4rem 0; }
.legal-doc strong { color: #0f172a; }
/* ===== REVIEW FLAGS (internal review only: remove before publishing) ===== */
.rv-flag { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 6px; border-radius: 999px; vertical-align: middle; cursor: help; flex-shrink: 0; outline: none; text-transform: none; letter-spacing: normal; }
.rv-flag + .rv-flag { margin-left: 3px; }
.rv-flag svg { width: 13px; height: 13px; }
.rv-cred { background: #EEF2FF; color: #4338CA; border: 1.5px solid #6366F1; }
.rv-legal { background: #FEF3C7; color: #B91C1C; border: 1.5px solid #F59E0B; }
.rv-tip { display: none; position: absolute; z-index: 90; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 280px; padding: 10px 12px; border-radius: 12px; background: #0F172A; color: #F8FAFC; box-shadow: 0 16px 32px -8px rgba(15,23,42,.4); font: 500 12px/1.5 'Plus Jakarta Sans', sans-serif; text-align: left; white-space: normal; }
.rv-tip b { display: block; margin-bottom: 3px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #A5B4FC; }
.rv-legal .rv-tip b { color: #FCD34D; }
.rv-flag:hover .rv-tip, .rv-flag:focus .rv-tip { display: block; }
body.rv-off .rv-flag { display: none; }
body.rv-off .todo { background: transparent; border-color: transparent; }
#rv-legend { position: fixed; left: 16px; bottom: 16px; z-index: 95; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 999px; background: #fff; border: 1px solid #E2E8F0; box-shadow: 0 12px 28px -10px rgba(15,23,42,.25); font: 600 12px 'Plus Jakarta Sans', sans-serif; color: #090D15; }
#rv-legend .rv-flag { margin: 0 5px 0 0; cursor: default; }
#rv-legend .muted { color: #64748B; margin-left: 4px; font-weight: 500; }
#rv-legend button { border: none; background: #F1F5F9; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 11px; cursor: pointer; color: #475569; }

/* ===== Polish layer: quiet refinements on top of the same design ===== */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
:where(.font-display) { letter-spacing: -0.015em; }
.font-mono, [id^="price-"], [id^="sim-"] { font-variant-numeric: tabular-nums; }

/* Buttons: a touch of depth, a settled press */
.btn-redo { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 2px rgba(224, 54, 23, 0.25); }
.btn-redo:active { transform: translateY(0); }

/* Hairlines and shadows: lighter and more layered */
body .border-slate-200 { border-color: rgb(226 232 240 / 0.85); }
body .shadow-sm { box-shadow: 0 1px 2px rgba(9, 13, 21, 0.04), 0 1px 1px rgba(9, 13, 21, 0.02); }
body .shadow-xl { box-shadow: 0 24px 48px -24px rgba(9, 13, 21, 0.14), 0 0 0 1px rgba(9, 13, 21, 0.02); }

/* Clickable cards lift gently */
body a.hover\:shadow-lg, body button.hover\:shadow-lg {
    transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .3s ease, border-color .3s ease;
}
body a.hover\:shadow-lg:hover, body button.hover\:shadow-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -22px rgba(9, 13, 21, 0.22);
}

/* Header: shadow appears only once the page scrolls */
header { transition: box-shadow .25s ease, border-color .25s ease; }
header.is-scrolled { box-shadow: 0 10px 30px -22px rgba(9, 13, 21, 0.35); border-bottom-color: transparent; }

/* Dropdowns slide in a few pixels instead of popping */
header .group > div.absolute.top-full { translate: 0 6px; transition: opacity .2s ease, translate .25s cubic-bezier(0.16, 1, 0.3, 1); }
header .group:hover > div.absolute.top-full { translate: 0 0; }

/* Links and focus */
.hover\:underline:hover { text-underline-offset: 3px; text-decoration-thickness: 1px; }
:where(a, button, summary, [tabindex]):focus-visible { outline: 2px solid #FF4726; outline-offset: 3px; }
input:focus, select:focus, textarea:focus { border-color: rgb(255 71 38 / 0.45); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .animate-marquee, .animate-pulse { animation: none !important; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ===== Action mock-ups (How it works · eight actions) ===== */
.am-frame { border: 1px solid #E4E0D8; border-radius: 18px; overflow: hidden; background: #F6F4F0; box-shadow: 0 28px 56px -28px rgba(11,16,32,.35); }
.am-top { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: #fff; border-bottom: 1px solid #E4E0D8; }
.am-dots { display: flex; gap: 6px; }
.am-dots i { width: 9px; height: 9px; border-radius: 50%; background: #E4E0D8; display: block; }
.am-search { flex: 1; min-width: 0; height: 24px; border-radius: 7px; background: #F6F4F0; border: 1px solid #F0ECE5; font: 500 11px 'Plus Jakarta Sans', sans-serif; color: #9AA2B4; display: flex; align-items: center; padding: 0 9px; overflow: hidden; white-space: nowrap; }
.am-replay { font: 600 11px 'Plus Jakarta Sans', sans-serif; color: #3A4150; background: #fff; border: 1px solid #E4E0D8; border-radius: 7px; padding: 4px 9px; cursor: pointer; }
.am-replay:hover { border-color: #FF4726; color: #B52E0C; }
.am-body { display: grid; grid-template-columns: 136px minmax(0, 1fr); min-height: 400px; }
.am-side { background: #0B1020; color: #B9C0CE; padding: 14px 10px; font: 500 11px 'Plus Jakarta Sans', sans-serif; display: flex; flex-direction: column; gap: 2px; }
.am-logo { font: 700 14px 'Space Grotesk', sans-serif; color: #fff; padding: 0 8px 12px; }
.am-logo span { color: #FF4726; }
.am-nav { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; }
.am-nav i { width: 6px; height: 6px; border-radius: 50%; background: #3A4150; display: block; flex-shrink: 0; }
.am-nav.on { background: #1B2236; color: #fff; }
.am-nav.on i { background: #FF4726; }
.am-main { padding: 18px; min-width: 0; font: 500 12px/1.5 'Plus Jakarta Sans', sans-serif; color: #0B1020; display: flex; flex-direction: column; gap: 12px; }
.am-h { font: 700 16px/1.25 'Space Grotesk', sans-serif; color: #0B1020; margin: 0; }
.am-sub { color: #5A6272; font-size: 11px; margin: 2px 0 0; }
.am-card { background: #fff; border: 1px solid #E4E0D8; border-radius: 12px; padding: 12px; min-width: 0; }
.am-card.hot { border-color: #FF4726; }
.am-label { font: 600 10px 'Plus Jakarta Sans', sans-serif; color: #5A6272; text-transform: uppercase; letter-spacing: .06em; }
.am-big { font: 700 22px/1.1 'Space Grotesk', sans-serif; font-variant-numeric: tabular-nums; }
.am-mono { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }
.am-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.am-row > .grow { flex: 1; min-width: 0; }
.am-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.am-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.am-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.am-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; font: 600 10px 'Plus Jakarta Sans', sans-serif; background: #EFECE6; color: #3A4150; white-space: nowrap; }
.am-chip.gain { background: #E1F3E8; color: #0B6B43; }
.am-chip.risk { background: #FCE7E4; color: #A1200F; }
.am-chip.warn { background: #FCEFD3; color: #86470A; }
.am-chip.info { background: #E4ECFB; color: #1B4FB0; }
.am-chip.violet { background: #EEE8FB; color: #5B36B0; }
.am-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 8px; font: 600 11px 'Plus Jakarta Sans', sans-serif; border: 1px solid #E4E0D8; background: #fff; color: #0B1020; white-space: nowrap; }
.am-btn.primary { background: #B52E0C; border-color: #B52E0C; color: #fff; }
.am-btn.ink { background: #0B1020; border-color: #0B1020; color: #fff; }
.am-btn.done { background: #E1F3E8; border-color: #BFE3CB; color: #0B6B43; }
.am-gain { color: #0B6B43; font-weight: 700; }
.am-risk { color: #A1200F; font-weight: 700; }
.am-muted { color: #5A6272; }
.am-bar { height: 7px; border-radius: 99px; background: #EFECE6; overflow: hidden; }
.am-bar > i { display: block; height: 100%; width: 0; border-radius: 99px; background: #FF4726; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.am-bar.green > i { background: #0B6B43; }
.am-bar.ink > i { background: #0B1020; }
.am-code { background: #0B1020; color: #D6DBE6; border-radius: 10px; padding: 10px 12px; font: 500 11px/1.6 'JetBrains Mono', monospace; white-space: pre; overflow-x: auto; min-height: 20px; }
.am-now { color: #5A6272; text-decoration: line-through; text-decoration-color: rgba(161,32,15,.5); }
.am-dotset { display: inline-flex; gap: 3px; }
.am-dotset i { width: 16px; height: 16px; border-radius: 5px; font: 700 8px/16px 'JetBrains Mono', monospace; text-align: center; font-style: normal; background: #EFECE6; color: #9AA2B4; }
.am-dotset i.y { background: #E1F3E8; color: #0B6B43; }
.am-check { display: flex; align-items: flex-start; gap: 8px; font-size: 11px; color: #3A4150; }
.am-check b { flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%; font: 700 9px/16px sans-serif; text-align: center; background: #EFECE6; color: #9AA2B4; transition: background .3s, color .3s; }
.am-check.ok b { background: #E1F3E8; color: #0B6B43; }
.am-check.flag b { background: #FCEFD3; color: #86470A; }
.am-toast { background: #0B1020; color: #fff; border-radius: 10px; padding: 9px 12px; font-size: 11px; display: flex; gap: 8px; align-items: center; }
.am-col { background: #FAF8F5; border: 1px solid #F0ECE5; border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 120px; min-width: 0; }
.am-col h5 { margin: 0; font: 600 10px 'Plus Jakarta Sans', sans-serif; color: #5A6272; }
.am-step { background: #fff; border: 1px solid #E4E0D8; border-radius: 8px; padding: 7px 8px; font-size: 11px; min-width: 0; }
.am-step .t { font-weight: 600; color: #0B1020; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-foot { font: 500 10px 'Plus Jakarta Sans', sans-serif; color: #9AA2B4; text-align: right; padding: 6px 14px 8px; background: #F6F4F0; }
.am-in { opacity: 0; transform: translateY(8px); animation: amIn .45s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--d, 0s); }
.am-pop { animation: amPop .4s ease; }
.am-caret::after { content: '▍'; color: #FF4726; animation: amBlink 1s steps(1) infinite; margin-left: 1px; }
@keyframes amIn { to { opacity: 1; transform: none; } }
@keyframes amPop { 0% { transform: scale(.96); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes amBlink { 50% { opacity: 0; } }
@media (max-width: 640px) {
  .am-body { grid-template-columns: minmax(0, 1fr); }
  .am-side { display: none; }
  .am-grid3, .am-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .am-qinst { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .am-in { animation: none; opacity: 1; transform: none; }
  .am-bar > i { transition: none; }
  .am-pop, .am-caret::after { animation: none; }
}
