/* Options tab + Stocks → Options tape. Tokens only. */

.opt-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

#opt-tape-kind {
    margin: 0 0 20px;
}

.opt-hdr .section-title {
    margin-bottom: 0;
}

.opt-stamp {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.opt-updated {
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.opt-lead {
    margin: 2px 0 18px;
    width: 100%;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.opt-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 12px 0 20px;
}

#section-options .opt-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#tab-options .opt-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.opt-stat {
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.opt-stat-k {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.opt-stat-v {
    font-size: 20px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.opt-stat-v.up { color: var(--gain); }
.opt-stat-v.down { color: var(--loss); }

.opt-stat-note {
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.opt-block {
    margin-top: 28px;
}

.opt-block .section-title,
.opt-h {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.opt-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-sans);
    line-height: 1;
    cursor: help;
    flex: 0 0 auto;
}

.opt-info:hover,
.opt-info:focus {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.opt-info-pop {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    width: 300px;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    z-index: 30;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.opt-info:hover .opt-info-pop,
.opt-info:focus .opt-info-pop {
    display: block;
}

.opt-block > .opt-hdr {
    margin-bottom: 10px;
}

.opt-block > .opt-hdr .opt-h {
    margin: 0;
}

.opt-hdr-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    min-width: 0;
}

.opt-hdr-tools:has(.opt-exp-scroll) {
    flex: 1 1 auto;
    justify-content: flex-end;
    overflow: hidden;
}

.period-toggle.opt-exp-scroll {
    display: flex;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: 100%;
    align-self: stretch;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.opt-exp-scroll .period-toggle-btn {
    flex-shrink: 0;
}

.opt-exp-row {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 8px;
}

.period-toggle.opt-exp-list {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.period-toggle.opt-exp-list::-webkit-scrollbar {
    display: none;
}

.period-toggle.opt-exp-list .period-toggle-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.2;
    padding: 4px 8px;
}

.opt-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.opt-grid2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    min-width: 0;
    max-width: 100%;
}

.opt-grid2 > * {
    min-width: 0;
    max-width: 100%;
}

.opt-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.opt-scroll:has(> .opt-table.opt-chain) {
    overflow-x: auto;
    touch-action: pan-x;
    scrollbar-width: thin;
}

.opt-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

#flow-opps .flow-opp-table {
    width: 100%;
    table-layout: fixed;
}

#flow-opps .flow-opp-table col.flow-ticker { width: 22%; }
#flow-opps .flow-opp-table col.flow-money { width: 14%; }
#flow-opps .flow-opp-table col.flow-manager { width: 36%; }
#flow-opps .flow-opp-table col.flow-also { width: 28%; }

#flow-opps .flow-opp-table th,
#flow-opps .flow-opp-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.opt-table th,
.opt-table td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.opt-table th {
    text-align: left;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 11px;
}

.opt-table th.num,
.opt-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.opt-table th.opt-strike,
.opt-table td.opt-strike {
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
}

.opt-table.opt-chain {
    table-layout: fixed;
    width: 100%;
    min-width: 960px;
}

.opt-table.opt-chain th,
.opt-table.opt-chain td {
    box-sizing: border-box;
}

.opt-table.opt-chain col.opt-c-volx { width: 8%; }
.opt-table.opt-chain col.opt-c-oi { width: 8%; }
.opt-table.opt-chain col.opt-c-vol { width: 8%; }
.opt-table.opt-chain col.opt-c-px { width: 8%; }
.opt-table.opt-chain col.opt-c-ba { width: 12%; }
.opt-table.opt-chain col.opt-c-strike { width: 12%; }

.opt-table.opt-chain th.opt-mirror,
.opt-table.opt-chain td.opt-mirror {
    text-align: left;
}

.opt-table tr.opt-strike-more td {
    padding: 2px 8px;
    border-bottom: none;
    font-weight: 500;
}

.opt-strike-more-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-muted);
    font: inherit;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.1;
    cursor: pointer;
}

.opt-strike-more-arrow {
    font-size: 13px;
    line-height: 1;
}

.opt-strike-more-btn:hover {
    color: var(--text-primary);
}

.opt-table.opt-aligned {
    table-layout: fixed;
    max-width: 100%;
}

@media (min-width: 960px) {
    .opt-scroll {
        overflow-x: hidden;
    }

    .opt-table {
        width: 100%;
        max-width: 100%;
    }
}

.opt-table.opt-aligned .opt-name,
.opt-table.opt-aligned .opt-id {
    min-width: 0;
    max-width: 100%;
}

.opt-table.opt-aligned .opt-co,
.opt-table.opt-aligned .opt-tk {
    overflow: hidden;
    text-overflow: ellipsis;
}

.opt-table.opt-aligned th,
.opt-table.opt-aligned td {
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.opt-table.opt-aligned th {
    position: relative;
}

.opt-table.opt-aligned th.opt-sort::after,
.opt-table.opt-aligned th.opt-sort-asc::after {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
}

.opt-table.opt-aligned th.opt-sort::after {
    content: '▼';
}

.opt-table.opt-aligned th.opt-sort-asc::after {
    content: '▲';
}

.opt-table th.opt-rule,
.opt-table td.opt-rule {
    max-width: 4.75rem;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.opt-hero {
    display: flex;
    flex-direction: column;
    margin: 12px 0 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.opt-hero-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    overflow-x: auto;
}

.opt-hero-line:last-child {
    border-bottom: 0;
}

.opt-hero-side {
    flex: 0 0 2.4rem;
    font-size: 11px;
    font-weight: 600;
}

.opt-hero-side.up,
.opt-hero-prem.up { color: var(--gain); }

.opt-hero-side.down,
.opt-hero-prem.down { color: var(--loss); }

.opt-hero-contract {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 600;
}

.opt-hero-prem {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.opt-hero-note {
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--text-muted);
}

.opt-hero-more {
    display: flex;
    justify-content: center;
    width: 100%;
}

.opt-desk {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 16px;
}

.opt-pill-on {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.opt-toggle {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.opt-chart-sm {
    height: 160px;
    margin-top: 16px;
}

.opt-table tr.opt-atm td,
.opt-table tr.opt-chain-atm td {
    background: color-mix(in srgb, #6b7280 18%, var(--bg-elevated));
}

.opt-table tr.opt-hot td {
    background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
}

.opt-table tr.opt-call td {
    background: color-mix(in srgb, var(--gain) 10%, transparent);
}

.opt-table tr.opt-put td {
    background: color-mix(in srgb, var(--loss) 10%, transparent);
}

.opt-table tr.opt-lottery td {
    background: color-mix(in srgb, #b8860b 12%, transparent);
}

.opt-table tr.opt-twoway td {
    background: color-mix(in srgb, var(--accent-primary) 8%, transparent);
}

.opt-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    vertical-align: middle;
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
}

.opt-name:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.opt-name .mover-logo-wrap,
.opt-name .mover-logo-wrap--sm,
.opt-logo {
    flex-shrink: 0;
    width: 20px !important;
    height: 20px !important;
}

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

.opt-co {
    font-weight: 600;
}

.opt-tk {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}

.opt-name .mover-logo-img,
.opt-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.opt-pill {
    display: inline-block;
    font-size: 10px;
    line-height: 1.4;
    padding: 1px 6px;
    margin-right: 4px;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.opt-chip--go {
    color: var(--text-primary);
}

.opt-empty {
    padding: 24px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.opt-chart {
    height: 200px;
    position: relative;
}

.opt-oi-key {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
}

.opt-oi-key span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.opt-oi-swatch {
    width: 10px;
    height: 10px;
    display: inline-block;
}

.opt-oi-swatch--call { background: var(--gain); }
.opt-oi-swatch--put { background: var(--loss); }

.opt-oi-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.opt-oi {
    display: grid;
    grid-template-columns: 4.25rem repeat(var(--opt-oi-cols, 1), minmax(3.4rem, 1fr));
    gap: 3px;
    width: max-content;
    min-width: 100%;
}

.opt-oi-lab,
.opt-oi-k {
    font-size: 11px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.opt-oi-lab {
    position: sticky;
    left: 0;
    z-index: 1;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px 0 0;
    background: var(--bg-primary);
    border: 0;
    box-shadow: none;
}

.opt-oi-lab.opt-oi-loud {
    color: var(--text-primary);
    font-weight: 600;
}

button.opt-oi-lab {
    border: 0;
    box-shadow: none;
    padding: 0;
    font: inherit;
    text-align: center;
    cursor: pointer;
    background: var(--bg-primary);
}

.opt-gex-hit {
    cursor: pointer;
}

.opt-oi-cell.opt-gex-open {
    box-shadow: inset 0 0 0 1px var(--text-primary);
}

.opt-gex-expand {
    grid-column: 1 / -1;
    min-width: 0;
    padding: 8px 0 12px;
}

.opt-oi-k {
    text-align: center;
    padding: 0 2px 6px;
}

.opt-oi-k.opt-oi-spot {
    color: var(--text-primary);
    font-weight: 600;
}

.opt-oi-cell {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.opt-oi-cell.opt-oi-spot {
    border-color: var(--text-muted);
}

.opt-oi-call,
.opt-oi-put {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 2px 4px;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.opt-oi-call,
.opt-oi-put { color: var(--text-primary); }

.opt-vola {
    display: grid;
    grid-template-columns: 4.25rem repeat(var(--opt-oi-cols, 1), minmax(5.4rem, 1fr));
    gap: 3px;
    width: max-content;
    min-width: 100%;
}

.opt-vola-board {
    display: grid;
    grid-template-columns: 4.25rem minmax(0, 1fr) 6.4rem minmax(0, 1fr);
    column-gap: 3px;
    align-items: start;
    width: 100%;
    min-width: 0;
}

.opt-vola-gutter {
    display: grid;
    gap: 3px;
    width: 3.4rem;
}

.opt-vola-dates,
.opt-vola-mid {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.opt-vola-wing {
    min-width: 0;
}

.opt-vola-side {
    box-sizing: border-box;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.opt-vola-wing > .opt-vola-side {
    border-bottom: 1px solid var(--border);
    margin-bottom: 3px;
}

.opt-vola-scroll {
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.opt-vola-scroll-put {
    display: flex;
    direction: rtl;
    justify-content: flex-start;
}

.opt-vola-scroll-put .opt-vola-cols {
    direction: ltr;
}

.opt-vola-scroll-call {
    display: flex;
    justify-content: flex-start;
}

.opt-vola-cols {
    display: grid;
    gap: 3px;
    width: max-content;
}

.opt-vola-board .opt-oi-k,
.opt-vola-board .opt-vola-more {
    box-sizing: border-box;
    height: 36px;
    padding: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opt-vola-board .opt-vola-cell,
.opt-vola-board .opt-vola-gap,
.opt-vola-dates .opt-oi-lab {
    box-sizing: border-box;
    height: 46px;
    min-height: 46px;
}

.opt-vola-dates .opt-oi-lab {
    position: static;
}

.opt-vola-mid .opt-vola-cell {
    border-color: var(--text-muted);
}

.opt-vola-more {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.opt-vola-gap {
    background: transparent;
    border: 0;
}

.opt-vola-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-height: 42px;
    padding: 3px 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.opt-vola-k {
    font-weight: 600;
    color: var(--text-primary);
}

.opt-vola-px {
    color: var(--text-secondary);
    white-space: nowrap;
}
.opt-oi-empty { color: var(--text-muted); }

.opt-impact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.opt-chip {
    font-size: 12px;
    padding: 3px 8px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
}

.opt-chip:hover { color: var(--text-primary); }

#options-content,
#section-options,
#section-options-body {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 900px) {
    .opt-stats,
    #section-options .opt-stats,
    #tab-options .opt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .opt-grid2 { grid-template-columns: minmax(0, 1fr); }
}
