.tp-page {
    max-width: 820px;
    margin: 0 auto;
    padding-bottom: 48px;
}

.tp-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.tp-refresh-btn {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tp-refresh-btn.is-loading {
    padding: 10px 18px;
    font-size: 0.88rem;
    border-color: rgba(34, 211, 238, 0.55);
    background: rgba(34, 211, 238, 0.14);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2), 0 8px 24px rgba(0, 242, 254, 0.18);
    cursor: wait;
}

.tp-refresh-btn:hover:not(:disabled) {
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.16);
}

.tp-refresh-btn:disabled {
    opacity: 1;
    cursor: wait;
}

.tp-live-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: left;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 16px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: padding 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.tp-live-strip.is-loading {
    padding: 18px 20px;
    background: rgba(34, 211, 238, 0.08);
    border-color: rgba(34, 211, 238, 0.35);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.12), 0 10px 28px rgba(0, 242, 254, 0.12);
}

.tp-live-strip.is-loaded {
    display: block;
    text-align: center;
    padding: 10px 14px;
}

.tp-live-spinner {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.18);
    border-top-color: var(--accent-cyan-bright);
    border-radius: 50%;
    animation: tp-spin 0.85s linear infinite;
}

.tp-live-strip.is-loaded .tp-live-spinner,
.tp-live-strip.is-loaded .tp-live-copy {
    display: none;
}

.tp-live-title {
    display: block;
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.tp-live-sub {
    display: block;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.02em;
}

@keyframes tp-spin {
    to {
        transform: rotate(360deg);
    }
}

.tp-live-strip span {
    color: var(--accent-cyan-soft);
    font-weight: 600;
}

.tp-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.tp-preview-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.tp-preview-card span {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.tp-preview-card strong {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.05rem;
    color: var(--accent-cyan-soft);
}

.tp-preview-card--goal strong {
    color: var(--accent-green-soft);
}

.tp-error {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    text-align: center;
}

.tp-toggle--inline {
    margin-top: 0;
    margin-bottom: 8px;
    background: rgba(34, 211, 238, 0.08);
    border-color: rgba(34, 211, 238, 0.18);
}

.tp-field input.is-editable,
.tp-field input:not([readonly]) {
    border-color: rgba(34, 211, 238, 0.45);
}

.tp-viz {
    margin-bottom: 16px;
}

.tp-viz-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: visible;
    margin-bottom: 6px;
}

.tp-viz-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--accent-cyan-gradient);
    box-shadow: 0 0 12px var(--accent-glow-cyan);
}

.tp-viz-marker {
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-left: -4px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--accent-green-bright);
    box-shadow: 0 0 6px rgba(56, 249, 215, 0.6);
}

.tp-viz-labels {
    display: flex;
    justify-content: space-between;
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
}

.tp-summary-wide {
    grid-column: 1 / -1;
}

.tp-muted {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.tp-buyback-hint {
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 10px;
}

.tp-back {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
}

.tp-back:hover {
    color: var(--accent-cyan-bright);
}

.tp-header {
    margin-bottom: 28px;
}

.tp-hero {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tp-hero-mascot {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-hero-mascot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

.tp-hero-copy {
    flex: 1;
    min-width: 0;
}

.tp-byline {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-cyan-soft);
    margin-bottom: 6px;
}

.tp-header h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(1.45rem, 4.5vw, 2.1rem);
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.15;
}

.tp-header h1 .tp-accent {
    color: var(--accent-cyan-soft);
}

.tp-tagline {
    font-family: 'Outfit', sans-serif;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    max-width: 36rem;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 560px) {
    .tp-hero {
        flex-direction: column;
        text-align: center;
    }

    .tp-hero-mascot {
        width: 104px;
        height: 104px;
    }

    .tp-tagline {
        margin-inline: auto;
    }
}

.tp-calculator {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: clamp(20px, 4vw, 28px);
    box-shadow: var(--glass-shadow), var(--glass-inset);
    color: var(--on-glass-text);
    color-scheme: dark;
}

.tp-sub {
    text-align: center;
    color: var(--on-glass-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    margin-bottom: 20px;
}

.tp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.tp-field label,
.tp-field-label {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 6px;
}

.tp-field--wide {
    grid-column: 1 / -1;
}

.tp-field input {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    font-size: 0.9rem;
    outline: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    transition: border-color 0.2s ease, background 0.2s ease;
    -moz-appearance: textfield;
    appearance: textfield;
}

.tp-field input[type='number']::-webkit-outer-spin-button,
.tp-field input[type='number']::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tp-field--held input {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.28);
}

.tp-field--held input:focus {
    border-color: rgba(251, 191, 36, 0.55);
    background: rgba(251, 191, 36, 0.16);
}

.tp-field--price input {
    background: rgba(34, 211, 238, 0.12);
    border-color: rgba(34, 211, 238, 0.28);
}

.tp-field--price input:focus,
.tp-field--price input.is-editable {
    border-color: rgba(34, 211, 238, 0.55);
    background: rgba(34, 211, 238, 0.16);
}

.tp-field--goal input {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.28);
}

.tp-field--goal input:focus {
    border-color: rgba(52, 211, 153, 0.55);
    background: rgba(52, 211, 153, 0.16);
}

.tp-field input[readonly]:not(.is-editable) {
    opacity: 0.92;
    cursor: default;
}

.tp-pill-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.tp-pill-group--3 {
    grid-template-columns: repeat(3, 1fr);
}

.tp-pill {
    position: relative;
    cursor: pointer;
}

.tp-pill input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.tp-pill > span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 52px;
    padding: 8px 6px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    text-align: center;
    line-height: 1.2;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.tp-pill > span small {
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.75;
}

.tp-pill:hover > span {
    transform: translateY(-1px);
}

.tp-pill input:focus-visible + span {
    outline: 2px solid var(--accent-cyan-bright);
    outline-offset: 2px;
}

/* Weak tint bases — stronger when selected */
.tp-pill--rose > span {
    background: rgba(244, 114, 182, 0.14);
    border-color: rgba(244, 114, 182, 0.28);
}

.tp-pill--cyan > span {
    background: rgba(34, 211, 238, 0.14);
    border-color: rgba(34, 211, 238, 0.28);
}

.tp-pill--mint > span {
    background: rgba(52, 211, 153, 0.14);
    border-color: rgba(52, 211, 153, 0.28);
}

.tp-pill--violet > span {
    background: rgba(167, 139, 250, 0.14);
    border-color: rgba(167, 139, 250, 0.28);
}

.tp-pill--amber > span {
    background: rgba(251, 191, 36, 0.14);
    border-color: rgba(251, 191, 36, 0.28);
}

.tp-pill--sky > span {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.28);
}

.tp-pill--lime > span {
    background: rgba(163, 230, 53, 0.14);
    border-color: rgba(163, 230, 53, 0.28);
}

.tp-pill--rose input:checked + span {
    background: rgba(244, 114, 182, 0.32);
    border-color: rgba(244, 114, 182, 0.65);
    box-shadow: 0 4px 16px rgba(244, 114, 182, 0.2);
    color: #fff;
}

.tp-pill--cyan input:checked + span {
    background: rgba(34, 211, 238, 0.32);
    border-color: rgba(34, 211, 238, 0.65);
    box-shadow: 0 4px 16px rgba(34, 211, 238, 0.2);
    color: #fff;
}

.tp-pill--mint input:checked + span {
    background: rgba(52, 211, 153, 0.32);
    border-color: rgba(52, 211, 153, 0.65);
    box-shadow: 0 4px 16px rgba(52, 211, 153, 0.2);
    color: #fff;
}

.tp-pill--violet input:checked + span {
    background: rgba(167, 139, 250, 0.32);
    border-color: rgba(167, 139, 250, 0.65);
    box-shadow: 0 4px 16px rgba(167, 139, 250, 0.2);
    color: #fff;
}

.tp-pill--amber input:checked + span {
    background: rgba(251, 191, 36, 0.32);
    border-color: rgba(251, 191, 36, 0.65);
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.2);
    color: #fff;
}

.tp-pill--sky input:checked + span {
    background: rgba(56, 189, 248, 0.32);
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.2);
    color: #fff;
}

.tp-pill--lime input:checked + span {
    background: rgba(163, 230, 53, 0.32);
    border-color: rgba(163, 230, 53, 0.65);
    box-shadow: 0 4px 16px rgba(163, 230, 53, 0.2);
    color: #fff;
}

.tp-field--moonbag {
    padding: 12px;
    border-radius: 14px;
    background: rgba(244, 114, 182, 0.06);
    border: 1px solid rgba(244, 114, 182, 0.14);
}

.tp-field--risk {
    padding: 12px;
    border-radius: 14px;
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.14);
}

.tp-slider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.18);
}

.tp-slider label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

.tp-slider input[type='range'] {
    flex: 1;
    accent-color: var(--accent-cyan-bright);
}

.tp-slider .tp-slider-val {
    font-weight: 700;
    color: var(--accent-cyan-soft);
    min-width: 2rem;
    text-align: right;
}

.tp-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 4px;
    padding: 10px 12px;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    background: rgba(167, 139, 250, 0.08);
    border: 1px solid rgba(167, 139, 250, 0.18);
}

.tp-toggle input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent-cyan-bright);
}

.tp-toggle--buyback {
    background: rgba(251, 146, 60, 0.08);
    border-color: rgba(251, 146, 60, 0.2);
}

.tp-calc-btn {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 18px auto 0;
    padding: 12px 20px;
    background: var(--accent-cyan-gradient);
    color: #0f172a;
    border: none;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 6px 20px var(--accent-glow-cyan);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tp-calc-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.tp-calc-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.tp-results {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: none;
}

.tp-results.is-visible {
    display: block;
}

.tp-data-info {
    background: rgba(0, 0, 0, 0.15);
    border-left: 3px solid var(--accent-cyan);
    padding: 10px 12px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.78);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.tp-data-info span {
    font-weight: 600;
    color: var(--accent-cyan-soft);
}

.tp-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.tp-summary div {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tp-summary span:first-child {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tp-summary span:last-child {
    font-weight: 700;
    color: var(--accent-cyan-soft);
    font-size: 0.9rem;
}

.tp-table-wrap {
    overflow-x: auto;
    margin-bottom: 14px;
}

.tp-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Outfit', sans-serif;
    font-size: 0.84rem;
}

.tp-table th {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-cyan-soft);
    padding: 8px 6px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    white-space: nowrap;
}

.tp-table td {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: middle;
}

.tp-row-moonbag {
    background: rgba(167, 139, 250, 0.12);
}

.tp-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(34, 211, 238, 0.2);
    color: var(--accent-cyan-soft);
}

.tp-badge--moon {
    background: rgba(167, 139, 250, 0.25);
    color: #e9d5ff;
}

.tp-regime-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin: 4px 4px 4px 0;
}

.regime-bear {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.regime-range {
    background: rgba(251, 191, 36, 0.2);
    color: #fde68a;
}

.regime-bull {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.tp-note {
    background: rgba(0, 0, 0, 0.12);
    border-left: 3px solid var(--accent-green);
    padding: 12px 14px;
    border-radius: 0 10px 10px 0;
    margin: 14px 0;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.tp-note strong {
    color: #fff;
}

.tp-buyback {
    margin-top: 18px;
}

.tp-buyback h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 8px;
}

.tp-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.tp-actions button,
.tp-actions a {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    text-decoration: none;
}

.tp-actions button:hover,
.tp-actions a:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--accent-cyan);
}

.tp-disclaimer {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    margin-top: 16px;
    line-height: 1.45;
}

@media (max-width: 600px) {
    .tp-grid {
        grid-template-columns: 1fr;
    }

    .tp-pill-group {
        grid-template-columns: repeat(2, 1fr);
    }

    .tp-pill-group--3 {
        grid-template-columns: 1fr;
    }

    .tp-preview {
        grid-template-columns: 1fr;
    }

    .tp-table {
        font-size: 0.78rem;
    }

    .tp-actions {
        flex-direction: column;
    }

    .tp-actions button,
    .tp-actions a {
        width: 100%;
        text-align: center;
    }
}
