/* ── RCIC Growth Calculator Styles ─────────────────── */
/* Extracted from inline <style> for cacheability     */

[x-cloak] { display: none !important; }

/* ── Calculator Layout ─────────────────────────────── */
.calc {
    min-height: 100vh;
    padding: 8rem 1.5rem 4rem;
    background: linear-gradient(135deg, var(--color-secondary-900) 0%, var(--color-secondary-800) 100%);
}

.calc__container {
    max-width: 780px;
    margin: 0 auto;
}

.calc__header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.calc__eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #d4af37;
    margin-bottom: 0.75rem;
}

.calc__title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.15;
}

@media (min-width: 768px) {
    .calc__title { font-size: 2.75rem; }
}

.calc__subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Progress Bar ──────────────────────────────────── */
.calc__progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2.5rem;
}

.calc__step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.4);
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.calc__step-dot--active {
    background: #d4af37;
    color: #1a1a1a;
    border-color: #d4af37;
    box-shadow: 0 0 20px rgba(212,175,55,0.3);
}

.calc__step-dot--done {
    background: rgba(34,197,94,0.2);
    color: #22C55E;
    border-color: #22C55E;
}

.calc__step-line {
    width: 60px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    transition: background 0.3s ease;
}

.calc__step-line--done {
    background: #22C55E;
}

@media (min-width: 768px) {
    .calc__step-line { width: 80px; }
}

/* ── Step Labels ───────────────────────────────────── */
.calc__step-labels {
    display: flex;
    justify-content: space-between;
    max-width: 520px;
    margin: -1rem auto 2rem;
}

.calc__step-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    text-align: center;
    width: 80px;
    transition: color 0.3s;
}

.calc__step-label--active {
    color: #d4af37;
}

/* ── Form Card ─────────────────────────────────────── */
.calc__card {
    background: var(--color-secondary-900);
    border: 1px solid var(--color-secondary-700);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

@media (min-width: 768px) {
    .calc__card { padding: 2.5rem; }
}

.calc__step-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.calc__step-desc {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 1.75rem;
}

/* ── Form Elements ─────────────────────────────────── */
.calc__field {
    margin-bottom: 1.25rem;
}

.calc__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-bottom: 0.4rem;
}

.calc__input,
.calc__select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.calc__input:focus,
.calc__select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}

.calc__input::placeholder {
    color: rgba(255,255,255,0.3);
}

.calc__select option {
    background: var(--color-secondary-900);
    color: #fff;
}

.calc__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .calc__row--2 { grid-template-columns: 1fr 1fr; }
    .calc__row--3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* ── Checkboxes (pill-style) ───────────────────────── */
.calc__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.calc__pill {
    position: relative;
}

.calc__pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.calc__pill-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.calc__pill input:checked + .calc__pill-label {
    background: rgba(212,175,55,0.15);
    border-color: #d4af37;
    color: #d4af37;
}

/* ── Range Slider ──────────────────────────────────── */
.calc__range-wrap {
    position: relative;
}

.calc__range {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.1);
    outline: none;
}

.calc__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #d4af37;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(212,175,55,0.4);
}

.calc__range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #d4af37;
    cursor: pointer;
    border: none;
}

.calc__range-value {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 0.5rem;
}

.calc__range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    margin-top: 0.25rem;
}

/* ── Star Rating ───────────────────────────────────── */
.calc__stars {
    display: flex;
    gap: 0.5rem;
}

.calc__star {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
}

.calc__star--active {
    background: rgba(212,175,55,0.15);
    border-color: #d4af37;
}

/* ── Radio Group ───────────────────────────────────── */
.calc__radios {
    display: grid;
    gap: 0.5rem;
}

.calc__radio {
    position: relative;
}

.calc__radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.calc__radio-label {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.2s;
}

.calc__radio input:checked + .calc__radio-label {
    background: rgba(212,175,55,0.1);
    border-color: #d4af37;
    color: #d4af37;
}

/* ── Toggle (Yes/No) ──────────────────────────────── */
.calc__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.calc__toggle-track {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
    position: relative;
    transition: background 0.2s;
}

.calc__toggle-track--on {
    background: #d4af37;
}

.calc__toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
}

.calc__toggle-track--on .calc__toggle-thumb {
    transform: translateX(20px);
}

.calc__toggle-text {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

/* ── Nav Buttons ───────────────────────────────────── */
.calc__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
}

.calc__btn {
    padding: 0.85rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.calc__btn--back {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.12);
}

.calc__btn--back:hover {
    background: rgba(255,255,255,0.1);
}

.calc__btn--next {
    background: linear-gradient(135deg, #F5A623, #d4af37);
    color: #1a1a1a;
    margin-left: auto;
}

.calc__btn--next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(212,175,55,0.4);
}

.calc__btn--next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Results (Step 4) ──────────────────────────────── */
.calc__results {
    text-align: center;
}

.calc__score-ring {
    width: 180px;
    height: 180px;
    margin: 2rem auto;
    position: relative;
}

.calc__score-ring svg {
    transform: rotate(-90deg);
}

.calc__score-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.calc__score-number {
    font-size: 3rem;
    font-weight: 700;
    color: #d4af37;
}

.calc__score-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.calc__maturity-badge {
    display: inline-block;
    padding: 0.4rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.calc__maturity-badge--early_stage {
    background: rgba(249,115,22,0.15);
    color: #F97316;
    border: 1px solid rgba(249,115,22,0.3);
}

.calc__maturity-badge--developing {
    background: rgba(234,179,8,0.15);
    color: #EAB308;
    border: 1px solid rgba(234,179,8,0.3);
}

.calc__maturity-badge--advanced {
    background: rgba(34,197,94,0.15);
    color: #22C55E;
    border: 1px solid rgba(34,197,94,0.3);
}

/* ── Result Cards ──────────────────────────────────── */
.calc__result-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
    text-align: left;
}

@media (min-width: 640px) {
    .calc__result-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
    .calc__result-grid--2 { grid-template-columns: 1fr 1fr; }
}

.calc__result-card {
    background: var(--color-secondary-800);
    border: 1px solid var(--color-secondary-700);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    animation: calcReveal 0.5s ease forwards;
}

@keyframes calcReveal {
    to { opacity: 1; transform: translateY(0); }
}

.calc__result-card--gold {
    border-color: rgba(212,175,55,0.3);
}

.calc__result-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
}

.calc__result-value--gold { color: #d4af37; }
.calc__result-value--green { color: #22C55E; }
.calc__result-value--orange { color: #F97316; }

.calc__result-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin-top: 0.25rem;
}

/* ── Tier Recommendation Card ──────────────────────── */
.calc__tier-card {
    background: linear-gradient(135deg, rgba(212,175,55,0.1) 0%, rgba(212,175,55,0.03) 100%);
    border: 2px solid rgba(212,175,55,0.3);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    opacity: 0;
    animation: calcReveal 0.5s ease 0.9s forwards;
}

.calc__tier-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.5rem;
}

.calc__tier-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 0.25rem;
}

.calc__tier-price {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.8);
}

.calc__tier-price span {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.calc__tier-desc {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    margin-top: 0.75rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.calc__tier-price--custom {
    font-size: 1.5rem;
    font-weight: 700;
    color: #d4af37;
    font-style: italic;
}

.calc__tier-features {
    list-style: none;
    padding: 0;
    margin: 1.25rem auto 0;
    max-width: 400px;
    text-align: left;
}

.calc__tier-feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
}

.calc__tier-feature svg {
    flex-shrink: 0;
}

/* ── Strengths/Weaknesses lists ────────────────────── */
.calc__sw-section {
    text-align: left;
    margin: 1.5rem 0;
    opacity: 0;
    animation: calcReveal 0.5s ease 0.6s forwards;
}

.calc__sw-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.5rem;
}

.calc__sw-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.calc__sw-item {
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
}

.calc__sw-item--strength::before {
    content: "\2713 ";
    color: #22C55E;
    font-weight: 700;
}

.calc__sw-item--weakness::before {
    content: "\2717 ";
    color: #F97316;
    font-weight: 700;
}

/* ── CTA Buttons ───────────────────────────────────── */
.calc__cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    opacity: 0;
    animation: calcReveal 0.5s ease 1.2s forwards;
}

.calc__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.calc__cta-btn--primary {
    background: linear-gradient(135deg, #F5A623, #d4af37);
    color: #1a1a1a;
}

.calc__cta-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(212,175,55,0.4);
}

.calc__cta-btn--secondary {
    background: transparent;
    color: var(--color-primary-500);
    border: 2px solid var(--color-primary-500);
}

.calc__cta-btn--secondary:hover {
    background: var(--color-primary-500);
    color: var(--color-secondary-900);
}

/* ── Loading State ─────────────────────────────────── */
.calc__loading {
    text-align: center;
    padding: 3rem 0;
}

.calc__spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: calcSpin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes calcSpin {
    to { transform: rotate(360deg); }
}

/* ── Error State ───────────────────────────────────── */
.calc__error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    color: #FCA5A5;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ── Skeleton Loading ─────────────────────────────── */
.calc__skeleton { margin-bottom: 0; }

.calc__skel-line {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: calcShimmer 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.calc__skel-line--lg { height: 1.75rem; width: 55%; margin-bottom: 0.5rem; }
.calc__skel-line--md { height: 1rem; width: 75%; margin-bottom: 1.75rem; }
.calc__skel-line--label { height: 0.85rem; width: 35%; margin-bottom: 0.4rem; }
.calc__skel-line--input { height: 2.75rem; width: 100%; }
.calc__skel-line--pills { height: 2.25rem; width: 85%; }
.calc__skel-line--half { width: 50%; }
.calc__skel-spacer { height: 0.75rem; }

.calc__skel-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.calc__skel-row--3 { grid-template-columns: 1fr 1fr 1fr; }

@media (max-width: 640px) {
    .calc__skel-row,
    .calc__skel-row--3 { grid-template-columns: 1fr; }
}

@keyframes calcShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ── Fallback ─────────────────────────────────────── */
.calc__fallback .calc__btn--next {
    display: inline-block;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 480px) {
    .calc { padding: 6rem 1rem 3rem; }
    .calc__card { padding: 1.5rem; }
    .calc__step-line { width: 30px; }
    .calc__step-dot { width: 30px; height: 30px; font-size: 0.75rem; }
    .calc__title { font-size: 1.5rem; }
    .calc__score-number { font-size: 2.25rem; }
    .calc__score-ring { width: 140px; height: 140px; }
}
