/* ==========================================================================
   OrbVaal — Path of Exile 2 inspired skin.
   Loaded after MudBlazor.min.css so these rules win without !important spam.
   ========================================================================== */

:root {
    --ov-bg: #0c0b09;
    --ov-bg-deep: #060505;
    --ov-panel: #14120e;
    --ov-panel-hi: #1c1813;
    --ov-panel-hover: #221d15;

    --ov-border: #2e2619;
    --ov-border-hi: #4a3d26;

    --ov-gold: #c9a961;
    --ov-gold-bright: #e8d3a0;
    --ov-gold-dim: #8a7548;

    --ov-text: #ded3ba;
    --ov-text-dim: #9a8f76;
    /* Muted, but kept above 4.5:1 on the panel background — these carry the small
       uppercase column labels, which are real content once the header row is gone. */
    --ov-text-faint: #8a8069;

    --ov-profit: #7fb069;
    --ov-profit-hot: #b9d97c;
    --ov-loss: #c2544d;

    --ov-radius: 3px;
    --ov-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);

    --ov-font-display: "Trajan Pro", "Optima", "Palatino Linotype", Palatino, Georgia, serif;
    --ov-font-body: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html {
    -webkit-text-size-adjust: 100%;
}

html, body {
    background-color: var(--ov-bg);
    color: var(--ov-text);
    font-family: var(--ov-font-body);
    /* iOS Safari: keep the dark page colour behind the rubber-band overscroll. */
    overscroll-behavior-y: none;
}

/* Fixed atmosphere layer: warm vignette + faint film grain, behind everything.
   Cheaper and sharper than a bitmap background, and it never tiles visibly. */
.ov-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(201, 169, 97, 0.10) 0%, rgba(201, 169, 97, 0) 60%),
        radial-gradient(90% 60% at 100% 100%, rgba(122, 106, 156, 0.07) 0%, rgba(122, 106, 156, 0) 70%),
        linear-gradient(180deg, var(--ov-bg) 0%, var(--ov-bg-deep) 100%);
}

.ov-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ov-layout,
.mud-main-content {
    position: relative;
    z-index: 1;
}

.mud-layout,
.mud-main-content {
    background: transparent;
}

::selection {
    background: rgba(201, 169, 97, 0.3);
    color: var(--ov-gold-bright);
}

* {
    scrollbar-color: var(--ov-border-hi) transparent;
    scrollbar-width: thin;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--ov-bg-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--ov-border-hi);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ov-gold-dim);
}

/* --------------------------------------------------------------------------
   App bar & brand
   -------------------------------------------------------------------------- */

.ov-appbar.mud-appbar {
    background: linear-gradient(180deg, #14110c 0%, #0b0a08 100%);
    border-bottom: 1px solid var(--ov-border);
    box-shadow: 0 1px 0 rgba(201, 169, 97, 0.12), 0 6px 20px rgba(0, 0, 0, 0.6);
}

.ov-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.ov-brand__mark {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #f0dcae 0%, var(--ov-gold) 35%, #6d5827 75%, #2a2114 100%);
    box-shadow: 0 0 12px rgba(201, 169, 97, 0.45), inset 0 0 4px rgba(0, 0, 0, 0.5);
}

.ov-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.ov-brand__name {
    font-family: var(--ov-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ov-gold-bright);
}

.ov-brand__name-accent {
    color: var(--ov-gold);
}

.ov-brand__tag {
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ov-text-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ov-main {
    padding-top: 1.75rem;
    padding-bottom: 2rem;
}

.ov-footer {
    border-top: 1px solid var(--ov-border);
    padding: 1.25rem 0 2rem;
    margin-top: 1rem;
}

.ov-footer p {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.6;
    color: var(--ov-text-faint);
}

/* --------------------------------------------------------------------------
   Page header
   -------------------------------------------------------------------------- */

.ov-hero {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.ov-hero__title {
    font-family: var(--ov-font-display);
    font-size: clamp(1.5rem, 4.5vw, 2.1rem);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
    background: linear-gradient(180deg, var(--ov-gold-bright) 0%, var(--ov-gold) 55%, #9b8146 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ov-hero__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ov-hero__spacer {
    flex: 1 1 auto;
}

.ov-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.22rem 0.6rem;
    border: 1px solid var(--ov-border);
    border-radius: 999px;
    background: rgba(20, 18, 14, 0.8);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--ov-text-dim);
    white-space: nowrap;
}

.ov-chip--league {
    border-color: var(--ov-border-hi);
    color: var(--ov-gold);
}

.ov-chip__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ov-profit);
    box-shadow: 0 0 6px var(--ov-profit);
    animation: ov-pulse 2.4s ease-in-out infinite;
}

@keyframes ov-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* --------------------------------------------------------------------------
   Panels & section headings
   -------------------------------------------------------------------------- */

.ov-panel {
    position: relative;
    background: linear-gradient(180deg, var(--ov-panel-hi) 0%, var(--ov-panel) 100%);
    border: 1px solid var(--ov-border);
    border-radius: var(--ov-radius);
    box-shadow: var(--ov-shadow);
    padding: 1rem 1.1rem;
}

/* Hairline gold bevel along the top edge — the PoE panel tell. */
.ov-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(201, 169, 97, 0.45) 25%, rgba(201, 169, 97, 0.45) 75%, transparent 100%);
}

.ov-section {
    margin-top: 2.25rem;
}

.ov-section__head {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.ov-section__title {
    font-family: var(--ov-font-display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ov-gold);
    margin: 0;
    white-space: nowrap;
}

.ov-section__rule {
    flex: 1 1 auto;
    height: 1px;
    background: linear-gradient(90deg, var(--ov-border-hi) 0%, transparent 100%);
}

.ov-section__count {
    font-size: 0.72rem;
    color: var(--ov-text-faint);
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.ov-section__desc {
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--ov-text-dim);
    margin: 0 0 0.9rem;
    max-width: 78ch;
}

.ov-note {
    font-size: 0.72rem;
    color: var(--ov-text-faint);
    margin: 0.6rem 0 0;
}

/* --------------------------------------------------------------------------
   Currency medallion (CurrencyIcon.razor)
   -------------------------------------------------------------------------- */

.ov-cur {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.ov-cur__frame {
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 45%, rgba(201, 169, 97, 0.16) 0%, rgba(0, 0, 0, 0.35) 70%);
    border: 1px solid var(--ov-border-hi);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.6);
}

.ov-cur--sm .ov-cur__frame {
    width: 26px;
    height: 26px;
}

.ov-cur--lg .ov-cur__frame {
    width: 46px;
    height: 46px;
}

.ov-cur__img {
    width: 78%;
    height: 78%;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

.ov-cur__initial {
    font-family: var(--ov-font-display);
    font-size: 0.85rem;
    color: var(--ov-gold);
}

.ov-cur__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ov-text);
    font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   Controls
   -------------------------------------------------------------------------- */

.ov-controls {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(220px, 2fr);
    gap: 0.85rem;
    align-items: start;
}

.ov-select-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

/* --------------------------------------------------------------------------
   Currency price cards
   -------------------------------------------------------------------------- */

.ov-prices {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
    gap: 0.7rem;
}

.ov-price {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.8rem;
    background: linear-gradient(180deg, var(--ov-panel-hi) 0%, var(--ov-panel) 100%);
    border: 1px solid var(--ov-border);
    border-radius: var(--ov-radius);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.ov-price:hover {
    border-color: var(--ov-border-hi);
    transform: translateY(-1px);
}

.ov-price__body {
    min-width: 0;
    flex: 1 1 auto;
}

.ov-price__name {
    font-size: 0.82rem;
    color: var(--ov-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ov-price__rate {
    font-variant-numeric: tabular-nums;
    font-size: 1.02rem;
    color: var(--ov-gold-bright);
    line-height: 1.35;
}

.ov-price__vol {
    font-size: 0.68rem;
    color: var(--ov-text-faint);
    letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Profit / loss table
   -------------------------------------------------------------------------- */

.ov-pl {
    border: 1px solid var(--ov-border);
    border-radius: var(--ov-radius);
    background: var(--ov-panel);
    box-shadow: var(--ov-shadow);
    overflow: hidden;
}

.ov-pl__hint {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    color: var(--ov-gold);
    margin: 0 0 0.6rem;
}

/* Toolbar above the table: tap hint on the left, sort control on the right. */
.ov-pl__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    margin-bottom: 0.6rem;
}

.ov-pl__toolbar .ov-pl__hint {
    margin: 0;
}

/* Shared column track for the header and every row. */
.ov-pl__head,
.ov-pl__row {
    display: grid;
    grid-template-columns:
        minmax(0, 1.6fr)     /* item          */
        minmax(0, 1.6fr)     /* sell currency */
        minmax(80px, 0.9fr)  /* buy price     */
        minmax(80px, 0.9fr)  /* sell price    */
        minmax(92px, 0.9fr)  /* liquidity     */
        124px                /* est. profit   */
        44px;                /* go affordance */
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.9rem;
}

.ov-pl__head {
    height: 40px;
    background: #100e0b;
    border-bottom: 1px solid var(--ov-border);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ov-text-faint);
}

/* Desktop: the stats wrapper dissolves so its children land on the parent grid.
   On mobile it becomes a real flex row (see media query). */
.ov-pl__stats {
    display: contents;
}

.ov-pl__row {
    position: relative;
    width: 100%;
    text-align: left;
    min-height: 58px;
    background: transparent;
    border: 0;
    border-top: 1px solid rgba(46, 38, 25, 0.55);
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: background-color 0.14s ease;
}

.ov-pl__row:first-of-type {
    border-top: 0;
}

/* Accent bar that grows out of the left edge on hover — reinforces "this is a target". */
.ov-pl__row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--ov-gold);
    transform: scaleY(0);
    transition: transform 0.16s ease;
}

.ov-pl__row:hover,
.ov-pl__row:focus-visible {
    background-color: var(--ov-panel-hover);
}

.ov-pl__row:hover::before,
.ov-pl__row:focus-visible::before {
    transform: scaleY(1);
}

.ov-pl__row:focus-visible {
    outline: 1px solid var(--ov-gold);
    outline-offset: -1px;
}

.ov-pl__cell {
    min-width: 0;
}

.ov-pl__num {
    font-variant-numeric: tabular-nums;
    font-size: 0.86rem;
    color: var(--ov-text);
}

.ov-pl__head-num,
.ov-pl__cell--buy,
.ov-pl__cell--sellp {
    text-align: right;
}

.ov-pl__head-profit,
.ov-pl__cell--profit {
    text-align: right;
}

/* Est.-profit cell stacks the money figure over the margin %. */
.ov-pl__cell--profit {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}

.ov-profit__amt {
    font-variant-numeric: tabular-nums;
}

.ov-profit__coin {
    flex: none;
}

.ov-profit__pct {
    font-variant-numeric: tabular-nums;
    font-size: 0.72rem;
    color: var(--ov-text-faint);
    letter-spacing: 0.02em;
}

/* Liquidity pill — depth at a glance, sitting where the raw size number used to. */
.ov-liq {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}

.ov-liq--deep {
    color: var(--ov-profit-hot);
    background: rgba(127, 176, 105, 0.16);
    border-color: rgba(185, 217, 124, 0.5);
}

.ov-liq--mod {
    color: var(--ov-gold);
    background: rgba(201, 169, 97, 0.12);
    border-color: rgba(201, 169, 97, 0.35);
}

.ov-liq--thin {
    color: var(--ov-text-faint);
    background: rgba(120, 110, 90, 0.1);
    border-color: rgba(120, 110, 90, 0.3);
}

/* Profit badge, tiered by realizable value so the good rows read at a glance. */
.ov-profit {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--ov-radius);
    font-variant-numeric: tabular-nums;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

.ov-profit--t1 {
    color: var(--ov-profit);
    background: rgba(127, 176, 105, 0.09);
    border-color: rgba(127, 176, 105, 0.22);
}

.ov-profit--t2 {
    color: #a3cc7d;
    background: rgba(127, 176, 105, 0.16);
    border-color: rgba(127, 176, 105, 0.4);
}

.ov-profit--t3 {
    color: var(--ov-profit-hot);
    background: rgba(127, 176, 105, 0.24);
    border-color: rgba(185, 217, 124, 0.6);
    box-shadow: 0 0 10px rgba(127, 176, 105, 0.22);
}

/* The click affordance itself. */
.ov-pl__go {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    justify-self: end;
    border-radius: 50%;
    border: 1px solid var(--ov-border-hi);
    color: var(--ov-gold-dim);
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.ov-pl__go svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.ov-pl__row:hover .ov-pl__go,
.ov-pl__row:focus-visible .ov-pl__go {
    color: var(--ov-gold-bright);
    border-color: var(--ov-gold);
    background-color: rgba(201, 169, 97, 0.12);
    transform: translateX(2px);
}

/* Route arrow between the two currencies (desktop only — mobile uses a leading arrow). */
.ov-pl__cell--sell {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ov-pl__arrow {
    flex: none;
    color: var(--ov-gold-dim);
    font-size: 0.9rem;
    line-height: 1;
}

/* --------------------------------------------------------------------------
   Mobile: the table becomes a stack of cards.
   -------------------------------------------------------------------------- */

@media (max-width: 899px) {
    .ov-pl__head {
        display: none;
    }

    /* Card layout: name + profit pair up on top, route below, stats span the full
       width so the three figures stay on one line. */
    .ov-pl__row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "item   profit"
            "sell   sell"
            "stats  stats";
        row-gap: 0.45rem;
        column-gap: 0.6rem;
        padding: 0.8rem 2.5rem 0.8rem 0.9rem;
        align-items: center;
    }

    .ov-pl__cell--item { grid-area: item; }
    .ov-pl__cell--sell { grid-area: sell; }
    .ov-pl__cell--profit { grid-area: profit; justify-self: end; }

    .ov-pl__stats {
        display: grid;
        grid-area: stats;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
    }

    /* Pinned to the card's right edge (the row reserves padding for it) so the
       tap target reads the same way a native list row does. */
    .ov-pl__go {
        position: absolute;
        right: 0.8rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .ov-pl__row:hover .ov-pl__go,
    .ov-pl__row:focus-visible .ov-pl__go {
        transform: translateY(-50%);
    }

    /* Values need their own labels once the header row is gone. */
    .ov-pl__cell--buy,
    .ov-pl__cell--sellp,
    .ov-pl__cell--liq {
        text-align: left;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .ov-pl__cell--buy::before,
    .ov-pl__cell--sellp::before,
    .ov-pl__cell--liq::before {
        content: attr(data-label);
        font-size: 0.6rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--ov-text-faint);
    }

    .ov-pl__num {
        font-size: 0.8rem;
    }

    .ov-profit {
        font-size: 1rem;
        padding: 0.3rem 0.6rem;
    }

    /* Always-visible affordance: no hover state exists on touch. */
    .ov-pl__go {
        color: var(--ov-gold);
        border-color: var(--ov-gold-dim);
        background-color: rgba(201, 169, 97, 0.1);
    }

    .ov-pl__cell--buy,
    .ov-pl__cell--sellp,
    .ov-pl__cell--liq {
        padding: 0.3rem 0.4rem;
        background: rgba(0, 0, 0, 0.25);
        border-radius: var(--ov-radius);
    }

    /* The stacked est.-profit badge shouldn't right-align in the mobile card header. */
    .ov-pl__cell--profit {
        align-items: flex-end;
    }

    .ov-pl__row:active {
        background-color: var(--ov-panel-hover);
    }

    .ov-controls {
        grid-template-columns: 1fr;
    }

    .ov-prices {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .ov-main {
        padding-top: 1.1rem;
    }

    .ov-section {
        margin-top: 1.75rem;
    }
}

@media (max-width: 420px) {
    .ov-brand__tag {
        display: none;
    }

    .ov-prices {
        grid-template-columns: 1fr;
    }

    /* Both halves are nowrap and stop fitting side by side around 320px —
       let the count drop to its own line rather than push the page wide. */
    .ov-section__head {
        flex-wrap: wrap;
        row-gap: 0.15rem;
    }

    .ov-section__count {
        flex-basis: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* --------------------------------------------------------------------------
   MudBlazor component overrides
   -------------------------------------------------------------------------- */

.mud-input-outlined-border {
    border-color: var(--ov-border-hi) !important;
}

.mud-input.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: var(--ov-gold-dim) !important;
}

.mud-input-control input,
.mud-input-control .mud-input-slot {
    color: var(--ov-text);
}

.mud-popover {
    background-color: var(--ov-panel-hi);
    border: 1px solid var(--ov-border-hi);
}

.mud-list-item:hover {
    background-color: var(--ov-panel-hover);
}

.mud-selected-item {
    color: var(--ov-gold-bright);
}

.mud-dialog {
    background: linear-gradient(180deg, var(--ov-panel-hi) 0%, var(--ov-panel) 100%);
    border: 1px solid var(--ov-border-hi);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8);
}

.mud-dialog-title {
    font-family: var(--ov-font-display);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ov-gold);
    border-bottom: 1px solid var(--ov-border);
}

.mud-dialog-content {
    color: var(--ov-text);
    /* The info dialog is long; keep it scrollable inside the viewport on short screens. */
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
}

.mud-alert {
    border: 1px solid var(--ov-border-hi);
    border-radius: var(--ov-radius);
}

.mud-dialog-content code {
    padding: 0.1rem 0.3rem;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--ov-border);
    color: var(--ov-gold);
    font-size: 0.85em;
}

.mud-table-container .mud-table-root {
    background: transparent;
}

/* --------------------------------------------------------------------------
   Route detail dialog
   -------------------------------------------------------------------------- */

.ov-route {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 1rem 0.5rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--ov-border);
    border-radius: var(--ov-radius);
}

.ov-route__node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    width: 84px;
    text-align: center;
}

.ov-route__node--soft {
    opacity: 0.55;
}

.ov-route__label {
    font-size: 0.66rem;
    line-height: 1.3;
    color: var(--ov-text-dim);
}

.ov-route__link {
    color: var(--ov-gold-dim);
    align-self: center;
    margin-top: -0.9rem;
}

.ov-route__link--soft {
    opacity: 0.5;
}

.ov-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.6rem;
}

.ov-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.6rem 0.75rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--ov-border);
    border-radius: var(--ov-radius);
}

.ov-stat__label {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ov-text-faint);
}

.ov-stat__value {
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
    color: var(--ov-text);
}

.ov-stat__value--good {
    color: var(--ov-profit-hot);
}

.ov-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--ov-border);
    border-radius: var(--ov-radius);
    overflow: hidden;
}

.ov-step {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.75rem;
    border-top: 1px solid rgba(46, 38, 25, 0.6);
    font-size: 0.85rem;
}

.ov-step:first-child {
    border-top: 0;
}

.ov-step--soft {
    color: var(--ov-text-dim);
}

.ov-step--soft em {
    color: var(--ov-text-faint);
    font-style: normal;
    font-size: 0.75rem;
}

.ov-step__n {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--ov-border-hi);
    color: var(--ov-gold);
    font-size: 0.72rem;
}

.ov-step__value {
    font-variant-numeric: tabular-nums;
    color: var(--ov-gold-bright);
}

.ov-result {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--ov-radius);
    border: 1px solid transparent;
}

.ov-result--good {
    background: rgba(127, 176, 105, 0.12);
    border-color: rgba(127, 176, 105, 0.4);
}

.ov-result--bad {
    background: rgba(194, 84, 77, 0.12);
    border-color: rgba(194, 84, 77, 0.4);
}

.ov-result__label {
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ov-text-dim);
}

.ov-result__value {
    font-variant-numeric: tabular-nums;
    font-size: 1.2rem;
    font-weight: 600;
}

.ov-result--good .ov-result__value {
    color: var(--ov-profit-hot);
}

.ov-result--bad .ov-result__value {
    color: var(--ov-loss);
}

/* Four medallions plus arrows can't sit on one line inside a phone-width dialog —
   below this the route reads top-to-bottom instead of left-to-right. */
@media (max-width: 560px) {
    .ov-route {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.7rem 0.85rem;
    }

    .ov-route__node {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        width: auto;
        gap: 0.7rem;
        text-align: left;
    }

    .ov-route__label {
        font-size: 0.85rem;
        color: var(--ov-text);
    }

    .ov-route__link {
        align-self: flex-start;
        margin: 0.1rem 0 0.1rem 1.05rem;
        transform: rotate(90deg);
        line-height: 1;
    }
}

/* --------------------------------------------------------------------------
   Framework error UI
   -------------------------------------------------------------------------- */

.blazor-error-boundary {
    background: #4a1a1a;
    border: 1px solid var(--ov-loss);
    padding: 0.9rem 1rem;
    color: #f0d5d5;
    border-radius: var(--ov-radius);
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}
