#experience-calculator-app {
    --exp-accent: #2563eb;
    --exp-accent-dark: #1d4ed8;
    --exp-accent-soft: #eff6ff;
    --exp-border: #e5eaf1;
    --exp-muted: #667085;
    --exp-surface: #fff;
}

.exp-hero,
.exp-workspace,
.exp-result-panel,
.exp-table-section {
    border: 1px solid var(--exp-border);
    border-radius: 0.4rem;
    background: var(--exp-surface);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.045);
}

.exp-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
    background:
        radial-gradient(circle at 92% 0%, rgba(37, 99, 235, 0.1), transparent 35%),
        linear-gradient(135deg, #fff 0%, #fbfdff 68%, #f7fbff 100%);
}

.exp-hero::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #38bdf8 58%, #a7f3d0);
    content: "";
}

.exp-hero-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.25rem 1.35rem 1rem;
}

.exp-hero-icon,
.exp-section-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 0.4rem;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    box-shadow: 0 7px 16px rgba(37, 99, 235, 0.22);
}

.exp-hero-icon {
    width: 3rem;
    height: 3rem;
    font-size: 1.55rem;
}

.exp-hero h1 {
    color: #111827;
    font-size: 1.55rem;
    font-weight: 750;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.exp-hero p {
    margin-top: 0.4rem;
    color: var(--exp-muted);
    font-size: 0.875rem;
    line-height: 1.55;
}

.exp-data-badge {
    display: inline-flex;
    height: 1.55rem;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: #f0fdf4;
    padding: 0 0.65rem;
    color: #047857;
    font-size: 0.72rem;
    font-weight: 700;
}

.exp-summary-strip {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 1.15rem;
    border: 1px solid rgba(219, 234, 254, 0.9);
    border-radius: 0.4rem;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.65rem 1rem;
}

.exp-summary-strip div {
    display: grid;
    gap: 0.1rem;
}

.exp-summary-strip span {
    color: var(--exp-muted);
    font-size: 0.7rem;
}

.exp-summary-strip strong {
    color: #111827;
    font-size: 1rem;
}

.exp-summary-strip i {
    width: 1px;
    height: 2rem;
    background: var(--exp-border);
}

.exp-rate-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--exp-border);
    background: rgba(248, 250, 252, 0.72);
    padding: 0.7rem 1.35rem;
}

.exp-rate-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.exp-rate-title > span {
    color: var(--exp-accent);
    font-size: 1.15rem;
}

.exp-rate-title div {
    display: grid;
}

.exp-rate-title strong {
    color: #1f2937;
    font-size: 0.8rem;
}

.exp-rate-title small {
    color: var(--exp-muted);
    font-size: 0.7rem;
}

.exp-rate-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.exp-rate-input {
    display: flex;
    width: 7.2rem;
    height: 2.25rem;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: #fff;
    padding: 0 0.65rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.exp-rate-input:focus-within {
    border-color: var(--exp-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.exp-rate-input input {
    min-width: 0;
    flex: 1;
    background: transparent;
    color: #111827;
    font-size: 0.8rem;
    font-weight: 700;
}

.exp-rate-input span {
    color: var(--exp-muted);
    font-size: 0.72rem;
}

.exp-rate-preset {
    height: 2.25rem;
    border: 1px solid #dbe2ea;
    border-radius: 0.375rem;
    background: #fff;
    padding: 0 0.75rem;
    color: #475467;
    font-size: 0.75rem;
    font-weight: 650;
    transition: all 0.15s ease;
}

.exp-rate-preset:hover,
.exp-rate-preset.active {
    border-color: var(--exp-accent);
    background: var(--exp-accent-soft);
    color: var(--exp-accent-dark);
}

.exp-calculator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22.5rem;
    gap: 1rem;
    align-items: start;
}

.exp-workspace {
    min-width: 0;
    overflow: hidden;
}

.exp-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    border-bottom: 1px solid var(--exp-border);
    background: #f8fafc;
    padding: 0.65rem;
}

.exp-tabs > button {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid transparent;
    border-radius: 0.4rem;
    padding: 0.65rem 0.8rem;
    color: #667085;
    text-align: left;
    transition: all 0.16s ease;
}

.exp-tabs > button:hover {
    border-color: #dbe5f1;
    background: #fff;
    color: #344054;
}

.exp-tabs > button.active {
    border-color: #bfdbfe;
    background: #fff;
    color: var(--exp-accent-dark);
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.08);
}

.exp-tab-icon {
    display: inline-flex;
    width: 2.1rem;
    height: 2.1rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    background: #e9eef5;
    font-size: 1.05rem;
}

.exp-tabs > button.active .exp-tab-icon {
    background: var(--exp-accent);
    color: #fff;
}

.exp-tabs strong,
.exp-tabs small {
    display: block;
}

.exp-tabs strong {
    font-size: 0.84rem;
    line-height: 1.2;
}

.exp-tabs small {
    margin-top: 0.22rem;
    color: #98a2b3;
    font-size: 0.68rem;
    font-weight: 500;
}

.exp-tool-heading,
.exp-table-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.exp-tool-heading {
    padding: 1.2rem 1.25rem 1rem;
}

.exp-eyebrow {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--exp-accent);
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.exp-tool-heading h2,
.exp-result-heading h2,
.exp-table-heading h2 {
    color: #111827;
    font-size: 1.08rem;
    font-weight: 750;
    line-height: 1.3;
}

.exp-tool-heading p,
.exp-result-heading p,
.exp-table-heading p {
    margin-top: 0.3rem;
    color: var(--exp-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.exp-quick-btn {
    display: inline-flex;
    min-height: 1.9rem;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe2ea;
    border-radius: 0.375rem;
    background: #fff;
    padding: 0.2rem 0.65rem;
    color: #475467;
    font-size: 0.72rem;
    font-weight: 650;
    transition: all 0.15s ease;
}

.exp-quick-btn:hover,
.exp-quick-btn.active {
    border-color: #93c5fd;
    background: var(--exp-accent-soft);
    color: var(--exp-accent-dark);
}

.exp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.05rem 1rem;
    border-top: 1px solid #f0f2f5;
    padding: 1.2rem 1.25rem 1.3rem;
}

.exp-field {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 0.5rem;
}

.exp-field-label {
    display: flex;
    min-height: 1.35rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    color: #344054;
    font-size: 0.8rem;
    font-weight: 650;
}

.exp-field-label > span {
    display: inline-flex;
    align-items: center;
}

.exp-field-label small,
.exp-field-hint {
    color: var(--exp-muted);
    font-size: 0.7rem;
    font-weight: 500;
}

.exp-step {
    display: inline-flex;
    width: 1.35rem;
    height: 1.35rem;
    align-items: center;
    justify-content: center;
    margin-right: 0.42rem;
    border-radius: 999px;
    background: var(--exp-accent);
    color: #fff;
    font-size: 0.67rem;
    font-style: normal;
    font-weight: 750;
    line-height: 1;
}

.exp-step.optional {
    background: #e8edf3;
    color: #667085;
}

.exp-field-meta {
    display: flex;
    min-height: 1.6rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    color: var(--exp-muted);
    font-size: 0.7rem;
}

.exp-progress-actions {
    display: flex;
    gap: 0.25rem;
}

.exp-progress-actions button {
    min-width: 2.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.3rem;
    background: #f8fafc;
    padding: 0.15rem 0.3rem;
    color: #475467;
    font-size: 0.65rem;
    font-weight: 650;
}

.exp-progress-actions button:hover {
    border-color: #93c5fd;
    color: var(--exp-accent-dark);
}

.exp-input-unit {
    position: relative;
}

.exp-input-unit input {
    padding-right: 8rem;
}

.exp-input-unit > span {
    position: absolute;
    top: 50%;
    right: 0.8rem;
    max-width: 7rem;
    transform: translateY(-50%);
    overflow: hidden;
    color: var(--exp-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

.exp-form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid var(--exp-border);
    background: #f8fafc;
    padding: 0.85rem 1.25rem;
}

.exp-form-footer > span {
    margin-left: auto;
    color: var(--exp-muted);
    font-size: 0.68rem;
}

.exp-primary-btn {
    display: inline-flex;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 0.4rem;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    padding: 0 1.25rem;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 5px 13px rgba(37, 99, 235, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.exp-primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(37, 99, 235, 0.28);
}

.exp-ride-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    border-top: 1px solid #f0f2f5;
    padding: 1.15rem 1.25rem;
}

.exp-state-card {
    display: grid;
    min-width: 0;
    gap: 0.8rem;
    border: 1px solid #e4e9f0;
    border-radius: 0.4rem;
    background: #fbfcfe;
    padding: 0.9rem;
}

.exp-state-card.after {
    border-color: #d8e7fb;
    background: #f8fbff;
}

.exp-state-card legend {
    padding: 0 0.35rem;
    color: #1f2937;
    font-size: 0.8rem;
    font-weight: 750;
}

.exp-ride-arrow {
    display: flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--exp-accent-soft);
    color: var(--exp-accent);
}

.exp-optional-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    border-top: 1px solid var(--exp-border);
    padding: 1rem 1.25rem 1.15rem;
}

.exp-result-panel {
    position: sticky;
    top: 4.75rem;
    overflow: hidden;
}

.exp-result-heading {
    display: flex;
    min-height: 6.3rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--exp-border);
    padding: 1rem 1.1rem;
}

.exp-result-icon {
    display: inline-flex;
    width: 2.7rem;
    height: 2.7rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 0.4rem;
    background: #fff7ed;
    color: #ea580c;
    font-size: 1.35rem;
}

.exp-empty-result {
    padding: 1.25rem 1.15rem 1.35rem;
    text-align: center;
}

.exp-empty-visual {
    display: flex;
    width: 3.5rem;
    height: 3.5rem;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.8rem;
    border-radius: 0.4rem;
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    color: var(--exp-accent);
    font-size: 1.5rem;
}

.exp-empty-result > strong {
    color: #1f2937;
    font-size: 0.86rem;
}

.exp-empty-result > p {
    max-width: 17rem;
    margin: 0.4rem auto 1rem;
    color: var(--exp-muted);
    font-size: 0.72rem;
    line-height: 1.55;
}

.exp-empty-result ol {
    display: grid;
    gap: 0.45rem;
    text-align: left;
}

.exp-empty-result li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-radius: 0.375rem;
    background: #f8fafc;
    padding: 0.55rem 0.7rem;
    color: #475467;
    font-size: 0.72rem;
}

.exp-empty-result li i {
    display: inline-flex;
    width: 1.25rem;
    height: 1.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e8eef7;
    color: var(--exp-accent-dark);
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 750;
}

.exp-error {
    display: flex;
    gap: 0.5rem;
    margin: 1rem;
    border: 1px solid #fecdd3;
    border-radius: 0.4rem;
    background: #fff1f2;
    padding: 0.8rem;
    color: #be123c;
    font-size: 0.76rem;
    line-height: 1.5;
}

.exp-result-list {
    display: grid;
    gap: 0.55rem;
    padding: 1rem;
}

.exp-result-item {
    display: grid;
    gap: 0.2rem;
    border: 1px solid transparent;
    border-radius: 0.4rem;
    background: #f8fafc;
    padding: 0.85rem;
}

.exp-result-item.primary {
    border-color: #bfdbfe;
    background: linear-gradient(135deg, #eff6ff, #f8fbff);
}

.exp-result-item > span,
.exp-result-item > small {
    color: var(--exp-muted);
    font-size: 0.68rem;
}

.exp-result-item > strong {
    overflow-wrap: anywhere;
    color: #111827;
    font-size: 1.18rem;
}

.exp-table-section {
    overflow: hidden;
    margin-top: 1rem;
}

.exp-table-heading {
    padding: 1.15rem 1.25rem;
}

.exp-section-icon {
    width: 2.7rem;
    height: 2.7rem;
    font-size: 1.2rem;
}

.exp-table-search {
    display: flex;
    width: min(100%, 20rem);
    height: 2.55rem;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid #dbe2ea;
    border-radius: 0.4rem;
    background: #fff;
    padding: 0 0.75rem;
    color: #98a2b3;
}

.exp-table-search:focus-within {
    border-color: var(--exp-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.exp-table-search input {
    min-width: 0;
    flex: 1;
    background: transparent;
    color: #344054;
    font-size: 0.76rem;
}

.exp-table-search button {
    display: inline-flex;
    color: #98a2b3;
}

.exp-table-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--exp-border);
    border-bottom: 1px solid var(--exp-border);
    background: #f8fafc;
    padding: 0.65rem 1.25rem;
}

.exp-table-tools span {
    color: var(--exp-muted);
    font-size: 0.68rem;
}

.exp-table-scroll {
    max-height: 44rem;
    overflow: auto;
}

.exp-table-scroll table {
    width: 100%;
    min-width: 43rem;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.76rem;
}

.exp-table-scroll thead {
    position: sticky;
    z-index: 2;
    top: 0;
    background: #fff;
    box-shadow: 0 1px 0 var(--exp-border);
}

.exp-table-scroll th {
    padding: 0.75rem 1.25rem;
    color: #667085;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: right;
}

.exp-table-scroll th:first-child,
.exp-table-scroll td:first-child {
    text-align: left;
}

.exp-table-scroll td {
    border-bottom: 1px solid #eef1f5;
    padding: 0.7rem 1.25rem;
    color: #344054;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.exp-table-scroll tbody tr:hover td {
    background: #f8fbff;
}

.exp-table-scroll tbody tr.max td {
    background: #f0fdf4;
    color: #047857;
}

.exp-level-pill {
    display: inline-flex;
    min-width: 2.45rem;
    height: 1.55rem;
    align-items: center;
    justify-content: center;
    margin-right: 0.65rem;
    border-radius: 0.35rem;
    background: #eef2f7;
    color: #344054;
    font-size: 0.7rem;
    font-weight: 750;
}

.exp-table-empty {
    padding: 3rem !important;
    color: var(--exp-muted) !important;
    text-align: center !important;
}

.tw-dark #experience-calculator-app {
    --exp-border: #30343a;
    --exp-muted: #9ca3af;
    --exp-surface: #181818;
}

.tw-dark .exp-hero {
    background:
        radial-gradient(circle at 92% 0%, rgba(59, 130, 246, 0.13), transparent 35%),
        linear-gradient(135deg, #181818, #191b1e);
}

.tw-dark .exp-hero h1,
.tw-dark .exp-summary-strip strong,
.tw-dark .exp-tool-heading h2,
.tw-dark .exp-result-heading h2,
.tw-dark .exp-table-heading h2,
.tw-dark .exp-result-item > strong {
    color: #f3f4f6;
}

.tw-dark .exp-summary-strip,
.tw-dark .exp-rate-input,
.tw-dark .exp-rate-preset,
.tw-dark .exp-tabs > button.active,
.tw-dark .exp-quick-btn,
.tw-dark .exp-table-search,
.tw-dark .exp-table-scroll thead {
    border-color: #343a42;
    background: #202225;
}

.tw-dark .exp-rate-bar,
.tw-dark .exp-tabs,
.tw-dark .exp-form-footer,
.tw-dark .exp-table-tools {
    background: #151617;
}

.tw-dark .exp-rate-title strong,
.tw-dark .exp-field-label,
.tw-dark .exp-state-card legend,
.tw-dark .exp-empty-result > strong {
    color: #e5e7eb;
}

.tw-dark .exp-rate-input input,
.tw-dark .exp-table-search input {
    color: #f3f4f6;
}

.tw-dark .exp-tabs > button:hover {
    border-color: #343a42;
    background: #202225;
}

.tw-dark .exp-tab-icon,
.tw-dark .exp-step.optional,
.tw-dark .exp-empty-result li i,
.tw-dark .exp-level-pill {
    background: #30343a;
    color: #d1d5db;
}

.tw-dark .exp-state-card,
.tw-dark .exp-state-card.after,
.tw-dark .exp-empty-result li,
.tw-dark .exp-result-item {
    border-color: #30343a;
    background: #202225;
}

.tw-dark .exp-result-item.primary {
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(37, 99, 235, 0.12);
}

.tw-dark .exp-progress-actions button {
    border-color: #3b3f45;
    background: #26282c;
    color: #d1d5db;
}

.tw-dark .exp-table-scroll td {
    border-color: #292d32;
    color: #d1d5db;
}

.tw-dark .exp-table-scroll tbody tr:hover td {
    background: #20242a;
}

.tw-dark .exp-table-scroll tbody tr.max td {
    background: rgba(16, 185, 129, 0.08);
    color: #6ee7b7;
}

@media (max-width: 1023px) {
    .exp-calculator-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .exp-result-panel {
        position: static;
    }
}

@media (max-width: 767px) {
    .exp-hero-main,
    .exp-rate-bar,
    .exp-tool-heading,
    .exp-table-heading,
    .exp-table-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .exp-summary-strip,
    .exp-rate-controls,
    .exp-table-search {
        width: 100%;
    }

    .exp-rate-controls {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .exp-rate-input {
        width: auto;
    }

    .exp-rate-preset {
        padding: 0 0.35rem;
    }

    .exp-form-grid,
    .exp-optional-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .exp-ride-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .exp-ride-arrow {
        margin: -0.2rem auto;
        transform: rotate(90deg);
    }

    .exp-form-footer > span {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 479px) {
    .exp-hero-main,
    .exp-rate-bar,
    .exp-tool-heading,
    .exp-form-grid,
    .exp-ride-grid,
    .exp-optional-grid,
    .exp-form-footer,
    .exp-table-heading,
    .exp-table-tools {
        padding-right: 0.9rem;
        padding-left: 0.9rem;
    }

    .exp-tabs small {
        display: none;
    }

    .exp-tabs > button {
        justify-content: center;
    }

    .exp-tab-icon {
        width: 1.8rem;
        height: 1.8rem;
    }

    .exp-summary-strip {
        justify-content: space-between;
    }

    .exp-rate-controls {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .exp-rate-input {
        grid-column: 1 / -1;
    }

    .exp-primary-btn,
    .exp-form-footer > button {
        flex: 1;
    }
}
