/* 一看就懂的美股期权：第 2 章（批号 2）新增的样式，跟在 oc-course.css 后面（生成器自动加载，版本号按内容哈希）。
   类名一律 ob2- 开头。颜色只用全站令牌；浅色下不用整块深底；涨 / 赚 --ch-up，跌 / 亏 --ch-down（亏损不用绿）；没有动画。 */

/* 2-1 合约代码拆成四段 */
.ob2-code{margin:4px 0 0;padding:14px 16px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--card)}
.ob2-code-row{display:flex;flex-wrap:wrap;gap:6px}
.ob2-seg{display:flex;flex-direction:column;gap:2px;min-width:0;padding:8px 12px 9px;border:1px solid var(--line);border-top-width:3px;border-radius:var(--r-xs);background:var(--card2)}
.ob2-seg b{font:600 20px/1.3 var(--font-mono,ui-monospace,monospace);letter-spacing:.04em;color:var(--text)}
.ob2-seg small{font-size:var(--fs-tiny,12px);color:var(--sub)}
.ob2-seg em{font-style:normal;font-size:var(--fs-aux,14px);font-weight:600;color:var(--text);font-variant-numeric:tabular-nums}
.ob2-g1{border-top-color:var(--accent)}
.ob2-g2{border-top-color:var(--info)}
.ob2-g3{border-top-color:var(--warn)}
.ob2-g4{border-top-color:var(--sub)}
.ob2-code-read{margin:10px 0 0!important;font-size:var(--fs-ui,15px);line-height:1.7;color:var(--prose)}
@media(max-width:520px){.ob2-seg{flex:1 1 40%;padding:7px 10px}.ob2-seg b{font-size:17px}}

/* 2-1 合约要多少钱（计算器）：选合约的下拉框和输入框一个样子 */
.ob2-cost .oc-calc-in select{flex:1;min-width:0;height:36px;padding:0 8px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--card);color:var(--text);font:inherit;font-size:var(--fs-aux,14px)}
.ob2-cost .oc-calc-in select:focus-visible{outline:2px solid var(--accent);outline-offset:1px;border-color:var(--accent)}
.ob2-cost .oc-calc-outs div:first-child dd{font-size:18px}
.ob2-cost-code{margin:14px 0 0}
.ob2-cost-code:empty{display:none}
.ob2-dir{display:inline-flex}
.ob2-dir button{padding:0 10px}

/* 宽表里允许折行（三个市场对照、英伟达那一周） */
.oc-tbl.ob2-wrap td{white-space:normal;min-width:6.5em}
.ob2-cost .ob2-pick{grid-template-columns:1fr}

/* 2-2 价内 / 平价 / 价外的小标 */
.ob2-b{display:inline-flex;align-items:center;height:20px;padding:0 7px;border-radius:var(--r-pill,999px);font-size:var(--fs-tiny,12px);font-weight:600;line-height:1;white-space:nowrap;border:1px solid transparent}
.ob2-b.ob2-itm{background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent)}
.ob2-b.ob2-atm{background:var(--card);border-color:var(--text);color:var(--text)}
.ob2-b.ob2-otm{background:var(--raise);border-color:var(--line);color:var(--sub)}

/* 2-2 六格表 */
.ob2-six th small,.ob2-six td .ob2-say{display:block}
.ob2-six thead th small,.ob2-six tbody th small{font-size:var(--fs-tiny,12px);font-weight:400;color:var(--mute)}
.ob2-six td{white-space:normal!important;min-width:10em;vertical-align:top}
.ob2-six td .ob2-say{margin-top:6px;font-size:var(--fs-aux,14px);line-height:1.65;color:var(--prose)}

/* 2-2 期权链按价内价外着色（图和互动共用） */
.ob2-mt{width:100%;border-collapse:collapse;font-size:var(--fs-small,13px);font-variant-numeric:tabular-nums;line-height:1.35}
.ob2-mt th,.ob2-mt td{padding:7px 8px;border-bottom:1px solid var(--line);text-align:right;white-space:nowrap}
.ob2-mt thead th{background:var(--raise);color:var(--sub);font-weight:600;font-size:var(--fs-tiny,12px);vertical-align:bottom}
.ob2-mt .ob2-side th{text-align:center;color:var(--text);font-size:var(--fs-small,13px);background:var(--card2)}
.ob2-mt .ob2-k{text-align:center;color:var(--text);background:var(--raise);font-weight:600;border-left:1px solid var(--line);border-right:1px solid var(--line)}
.ob2-mt .ob2-k small{display:block;font-size:var(--fs-tiny,12px);font-weight:400;color:var(--mute)}
.ob2-mt td.ob2-st{text-align:center}
.ob2-mt td.ob2-itm{background:var(--accent-soft)}
.ob2-mt td.ob2-atm{background:var(--raise2)}
.ob2-mt td.ob2-otm{color:var(--sub)}
.ob2-mt tr.ob2-spot td{padding:0;border-bottom:0;height:0;position:relative;text-align:center}
.ob2-mt tr.ob2-spot td::before{content:"";position:absolute;left:0;right:0;top:-1px;border-top:2px solid var(--accent)}
.ob2-mt tr.ob2-spot span{position:relative;top:-9px;display:inline-block;padding:0 8px;border-radius:var(--r-pill);background:var(--accent);color:var(--on-fill,#16130b);font-size:var(--fs-tiny,12px);font-weight:600;line-height:18px}
.ob2-mt tbody tr:last-child td,.ob2-mt tbody tr:last-child th{border-bottom:0}
@media(max-width:480px){.ob2-mt th,.ob2-mt td{padding:6px 4px}}
.ob2-mn-sum{margin:10px 0 0!important;padding:10px 14px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--card2);font-size:var(--fs-ui,15px);line-height:1.75;color:var(--prose)}
.ob2-jump{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0 0}
.ob2-jump span{font-size:var(--fs-small,13px);color:var(--sub)}
.ob2-jump button{min-height:32px;padding:0 12px;border:1px solid var(--line2);border-radius:var(--r-pill,999px);background:var(--card);color:var(--prose);font:inherit;font-size:var(--fs-small,13px);cursor:pointer;font-variant-numeric:tabular-nums}
.ob2-jump button:hover{border-color:var(--accent-line);color:var(--text)}
.ob2-jump button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}

/* 2-3 两段柱：下段内在价值（中性灰）、上段时间价值（强调色）；强调色会随主题换，内在价值不用彩色免得撞色 */
.oc-svg .ob2-intr{fill:var(--sub);opacity:.7}
.oc-svg .ob2-tv{fill:var(--accent);opacity:.75}
.oc-svg .ob2-spotl{stroke:var(--accent);stroke-width:1.4;stroke-dasharray:4 3;fill:none}
.oc-svg .ob2-spott{fill:var(--accent);font-size:var(--fs-tiny,12px);font-weight:600}
.oc-legend .ob2-lg-intr i,.oc-legend .ob2-lg-tv i{width:12px;height:12px;border:0;border-radius:2px}
.oc-legend .ob2-lg-intr i{background:var(--sub);opacity:.7}
.oc-legend .ob2-lg-tv i{background:var(--accent);opacity:.75}

/* 2-5 三条时间价值曲线：平价用强调色，价内、价外靠线型分（强调色会随主题换，不和别的颜色撞） */
.oc-svg .ob2-l-itm{stroke:var(--text);stroke-width:1.6}
.oc-svg .ob2-l-otm{stroke:var(--sub);stroke-width:1.6;stroke-dasharray:6 4}
.oc-legend .ob2-l-itm i{border-color:var(--text)}
.oc-legend .ob2-l-otm i{border-top:2px dashed var(--sub)}

/* 2-6 只动一个因素：涨跌条 */
.ob2-cb{margin:4px 0 0;padding:0;list-style:none;display:grid;gap:0;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--card);overflow:hidden}
.ob2-cb li{display:grid;grid-template-columns:minmax(7em,11em) minmax(0,1fr) 4.6em;grid-template-areas:"n t v" "x x x";gap:4px 12px;align-items:center;padding:10px 14px;border-top:1px solid var(--line)}
.ob2-cb li:first-child{border-top:0}
.ob2-cb-n{grid-area:n;font-size:var(--fs-aux,14px);font-weight:600;color:var(--text)}
.ob2-cb-t{grid-area:t;position:relative;height:14px;border-radius:var(--r-xs);background:var(--raise)}
.ob2-cb-t::after{content:"";position:absolute;left:50%;top:-3px;bottom:-3px;border-left:1px solid var(--sub)}
.ob2-cb-t i{position:absolute;top:0;bottom:0;border-radius:var(--r-xs);background:var(--sub)}
.ob2-cb-t i.ob2-up{background:var(--ch-up)}
.ob2-cb-t i.ob2-dn{background:var(--ch-down)}
.ob2-cb-v{grid-area:v;text-align:right;font-size:var(--fs-ui,15px);font-weight:600;font-variant-numeric:tabular-nums;color:var(--text)}
.ob2-cb-v.ob2-up{color:var(--ch-up)}
.ob2-cb-v.ob2-dn{color:var(--ch-down)}
.ob2-cb-x{grid-area:x;font-size:var(--fs-small,13px);line-height:1.6;color:var(--sub)}
@media(max-width:520px){.ob2-cb li{grid-template-columns:minmax(0,1fr) 4.6em;grid-template-areas:"n v" "t t" "x x";padding:10px 12px}}
