.stock-v-scene {
    --stock-v-line: #b9c7af;
    --stock-v-paper: #fffdf4;
    --stock-v-mint: #dcebd5;
    --stock-v-green: #397657;
    --stock-v-muted: #496559;
    --stock-v-market: #ae714d;
    padding: clamp(10px, 2.2vw, 22px);
}

.stock-v-scene > div {
    display: grid;
    gap: 10px;
    width: min(100%, 700px);
    min-width: 0;
}

.stock-v-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    gap: clamp(3px, 1.3vw, 13px);
    align-items: center;
}

.stock-v-tile {
    display: grid;
    grid-template-rows: 26px auto auto;
    align-content: center;
    justify-items: center;
    align-self: stretch;
    gap: 5px;
    min-width: 0;
    padding: 10px 2px;
    border: 1px solid var(--stock-v-line);
    border-radius: 10px;
    background: var(--stock-v-paper);
    text-align: center;
}

.stock-v-tile > span:not(.stock-v-share-icon, .stock-v-coin) {
    color: var(--stock-v-muted);
    font-size: clamp(11px, 1.65vw, 14px);
}

.stock-v-tile strong { font-size: clamp(17px, 3.25vw, 28px); line-height: 1; white-space: nowrap; }
.stock-v-tile strong small { font-size: .58em; }
.stock-v-tile.is-result {
    border-color: #83a783;
    background: var(--stock-v-mint);
    animation: stock-v-settle .38s .20s both;
}

.stock-v-share-icon {
    width: 26px;
    height: 26px;
    border: 1px solid #8caa8d;
    border-radius: 4px;
    background:
        repeating-linear-gradient(to right, transparent 0 6px, #fffdf4 6px 8px),
        repeating-linear-gradient(to bottom, #9cbba2 0 6px, #fffdf4 6px 8px);
}

.stock-v-coin {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid #ad854a;
    border-radius: 50%;
    background: #f8e9ba;
    color: #725526;
    font-weight: 800;
}

.stock-v-operator { color: var(--stock-v-green); font-size: clamp(17px, 3.1vw, 29px); }
.stock-v-note { margin: 0; color: var(--stock-v-muted); font-size: 13px; line-height: 1.5; }
.stock-v-cash > .stock-v-note { text-align: center; }
.stock-v-timeline-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 12px;
}

.stock-v-timeline-head span { color: var(--stock-v-muted); font-size: 13px; }
.stock-v-year-grid { display: grid; gap: 5px; }
.stock-v-year {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, .8fr);
    align-items: center;
    gap: 4px;
    padding: 6px clamp(4px, 1.5vw, 12px);
    border: 1px solid var(--stock-v-line);
    border-radius: 7px;
    background: var(--stock-v-paper);
    animation: stock-v-settle .35s ease-out both;
}

.stock-v-year:nth-child(2) { animation-delay: .11s; }
.stock-v-year:nth-child(3) { animation-delay: .22s; }
.stock-v-year > :nth-child(2) { color: var(--stock-v-muted); font-size: clamp(12px, 2vw, 16px); }
.stock-v-year strong { text-align: end; white-space: nowrap; }
.stock-v-equation {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 9px 6px;
    border: 1px solid #8bad8a;
    border-radius: 9px;
    background: var(--stock-v-mint);
    text-align: center;
    animation: stock-v-settle .38s both;
}

.stock-v-equation span { color: var(--stock-v-muted); font-size: 13px; }
.stock-v-equation b { font-size: clamp(13px, 2vw, 17px); }
.stock-v-equation strong { font-size: clamp(17px, 3vw, 24px); }
.stock-v-comparison { display: grid; gap: 6px; }
.stock-v-bar {
    display: grid;
    grid-template-columns: 5em minmax(32px, 1fr) 6.75em;
    align-items: center;
    gap: clamp(4px, 1.3vw, 12px);
    font-size: clamp(11px, 1.85vw, 14px);
}

.stock-v-bar b { text-align: end; white-space: nowrap; }
.stock-v-track {
    position: relative;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #dfded3;
}

.stock-v-track i {
    display: block;
    width: var(--stock-v-fill);
    height: 100%;
    border-radius: inherit;
    background: var(--stock-v-green);
    transition: width .25s ease-out;
    animation: stock-v-reveal .42s ease-out;
}

.stock-v-track .is-price { background: var(--stock-v-market); }
.stock-v-proof { color: var(--stock-v-muted); font-size: 13px; }
.stock-v-proof summary { width: fit-content; cursor: pointer; font-weight: 650; }
.stock-v-proof p { margin: 5px 0 0; }
.stock-v-proof summary:focus-visible { outline: 2px solid var(--stock-v-green); outline-offset: 2px; }
.stock-v-sliders {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.stock-v-input {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 6px 9px;
    border: 1px solid var(--stock-v-line);
    border-radius: 8px;
    background: var(--stock-v-paper);
}

.stock-v-input > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1px 8px;
    font-size: 13px;
}

.stock-v-input label { color: var(--stock-v-muted); }
.stock-v-input output { font-weight: 780; white-space: nowrap; }
.stock-v-input input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 24px;
    margin: 0;
    accent-color: var(--stock-v-green);
    cursor: pointer;
}

.stock-v-lab-math {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    column-gap: 8px;
    padding: 6px 8px;
    border-radius: 7px;
    background: var(--stock-v-mint);
    font-size: clamp(12px, 1.85vw, 15px);
}

.stock-v-lab-summary { display: grid; gap: 3px; }
.stock-v-result { margin: 0; font-size: 14px; font-weight: 750; }
.stock-v-lab-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 12px;
    color: var(--stock-v-muted);
    font-size: 12px;
}

.stock-v-lab-footer button {
    min-height: 30px;
    padding: 4px 8px;
    border: 1px solid var(--stock-v-line);
    border-radius: 6px;
    background: var(--stock-v-paper);
    color: #26483b;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.stock-v-lab-footer button:hover { background: var(--stock-v-mint); }

@keyframes stock-v-settle {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes stock-v-reveal {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0); }
}

@media (max-width: 420px) {
    .stock-v-scene > div { gap: 7px; }
    .stock-v-input { padding-inline: 6px; }
    .stock-v-input > div { font-size: 12px; }
    .stock-v-note { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .stock-v-track i { transition: none; }
}
