/* Lane, smile, and the bits the shared monitor/risks sheets do not cover. */
.ideal3-page { overflow-wrap: normal; }
.ideal3-page .topbar time { color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
.stale { color: var(--amber); }
.ex { margin: 10px 0 0; color: var(--amber); font-size: 12px; letter-spacing: .04em; }
.ex[hidden] { display: none; }
.day-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; max-width: 100%; }
.day-pct { font-size: 15px; font-weight: 650; white-space: nowrap; }
/* Live labels are uppercase («NET LIQUIDATION VALUE», «DAILY P&L»): «NLV», «ДЕНЬ». */
.ideal3-page .hero .eyebrow { text-transform: uppercase; }
.ideal3-page .indices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.ideal3-page .market-item { min-width: 0; align-items: start; }
.ideal3-page .market-symbol { align-self: flex-start; justify-self: start; }
.ideal3-page .market-item strong,
.ideal3-page .hero-number,
.ideal3-page .pnl-number {
  display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: clip;
  font-variant-numeric: tabular-nums;
}
.ideal3-page .market-change { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; min-width: 0; white-space: normal; }
.ideal3-page svg text { font-variant-numeric: tabular-nums; font-family: inherit; }
.book-line {
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline;
  margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px;
}
.book-bit { display: inline-flex; gap: 6px; align-items: baseline; white-space: nowrap; }
.book-line b, .hero-number, .pnl-number, .day-pct, .market-item strong, .mid, .move, .range { white-space: nowrap; }
.burn { color: var(--muted); }
/* Last close before today's first print (Murat 30.10): muted figure, «закр. 29.10» instead of the change. */
.ideal3-page .market-item.is-close strong, .ideal3-page .market-close { color: var(--muted); }
.lane-prev { margin: 0 0 8px; }
.smile-block { padding: 8px 0 4px; }
.block { padding: 18px 0 8px; }
.ideal3-page h2 {
  margin: 0 0 4px; font-size: 15px; font-weight: 760; letter-spacing: .045em;
  text-transform: uppercase; color: var(--text);
}
.ideal3-page .block,
.ideal3-page .smile-block,
.ideal3-page .book-line { border-bottom: 1px solid var(--line); }
.lead { margin: 0 0 8px; color: var(--text); }
.note { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.say { margin: 8px 0 0; font-size: 17px; font-weight: 500; letter-spacing: -.02em; }
.plot { width: 100%; min-width: 0; margin-top: 8px; }
.plot svg { width: 100%; height: auto; display: block; max-width: 100%; }
.zero { stroke: var(--line); stroke-width: 1; }
.smile-grid { stroke: color-mix(in srgb, var(--muted) 28%, transparent); stroke-width: 1; }
.zero-strong { stroke: var(--text); stroke-width: 1.35; }
.now-line { fill: none; stroke: var(--text); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.ideal3-page .smile-block .book-curve { stroke: #4da3ff; stroke-width: 2.5; }
.ideal3-page .smile-block .book-pin { fill: #4da3ff; }
.ideal3-page .smile-block .line-pin { fill: #3ddc97; }
.ideal3-page .smile-block .pin-label.line-label { fill: #3ddc97; }
.ideal3-page .smile-block .pin-label.line-min { font-weight: 650; }
.ideal3-page .smile-block .zero-line { stroke: color-mix(in srgb, var(--muted) 55%, transparent); stroke-width: 1; }
.ideal3-page .smile-block .pin-label {
  fill: #eaf0f5; stroke: var(--bg); stroke-width: 4px; paint-order: stroke fill; stroke-linejoin: round;
}
.ideal3-page .smile-title {
  display: flex; flex-wrap: wrap; align-items: baseline; margin: 0 0 8px;
  text-transform: none; font-size: 14px; font-weight: 650; letter-spacing: 0; line-height: 1.35; color: var(--text);
}
.ideal3-page .smile-title .smile-dot { white-space: pre; flex: none; }
.ideal3-page .smile-note { margin: 6px 0 0; color: var(--muted-2); font-size: 12px; line-height: 1.35; }
.ideal3-page .smile-block .smile-legend i { border-top-color: #4da3ff; border-top-width: 2.5px; }
.tomorrow-line { fill: none; stroke: var(--cyan); stroke-width: 1.75; stroke-dasharray: 5 4; stroke-linecap: round; stroke-linejoin: round; }
.tick { stroke: var(--amber); stroke-width: 1; }
.axis, .mark { fill: var(--muted); font-size: 11px; font-family: inherit; }
.smile-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.smile-legend span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.smile-legend i { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--text); }
.smile-legend i.next { border-top-style: dashed; border-top-color: var(--cyan); }
.mark.worst { fill: var(--amber); }
.lane-slot { min-height: 0; }
.lane-body { width: 100%; min-width: 0; }
.lane-read { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin: 0 0 8px; font-size: 13px; }
.lane-read b { font-weight: 600; white-space: nowrap; }
.lane-title {
  display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; align-items: baseline;
  margin: 14px 0 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.lane-legend { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--text); }
.lane-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lane-legend i { display: inline-block; width: 14px; height: 2px; }
.lane-legend i.call { background: #e39a55; }
.lane-legend i.put { background: #b79cff; }
.lane-svg { width: 100%; height: auto; display: block; max-width: 100%; pointer-events: none; }
.lane-body { -webkit-tap-highlight-color: transparent; }
.lane-res { fill: none; stroke: var(--text); stroke-width: 1.6; }
.lane-call { fill: none; stroke: #e39a55; stroke-width: 1.6; }
.lane-put { fill: none; stroke: #b79cff; stroke-width: 1.6; }
.lane-open { fill: var(--bg); stroke-width: 1.6; }
.lane-open.lane-call { fill: #e39a55; stroke: none; }
.lane-open.lane-put { fill: #b79cff; stroke: none; }
.lane-open.lane-res { fill: var(--text); stroke: none; }
.lane-zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; fill: none; }
.lane-cursor { stroke: var(--text); stroke-width: 1; }
.lane-gap { fill: var(--line); opacity: .45; }
.lane-area-pos { fill: color-mix(in srgb, var(--green) 40%, transparent); stroke: none; }
.lane-area-neg { fill: color-mix(in srgb, var(--red) 40%, transparent); stroke: none; }
.event { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.iv-head, .iv-row { display: grid; grid-template-columns: 4.5em repeat(3, minmax(0, 1fr)); gap: 6px; align-items: baseline; }
.ideal3-page .iv-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ideal3-page .iv-table th,
.ideal3-page .iv-table td { padding: 6px 8px; text-align: right; white-space: nowrap; }
.ideal3-page .iv-table th:first-child,
.ideal3-page .iv-table td:first-child { text-align: left; white-space: nowrap; font-weight: 650; }
.ideal3-page .iv-table th { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ideal3-page .strikes > .note { margin: 4px 0 12px; }
.iv-head { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.when { overflow-wrap: normal; min-width: 0; }
.clock, .move, .nowrap, .say b { white-space: nowrap; }
.ideal3-page .stress-chart-wrap { height: 240px; min-height: 0; }
.ideal3-page .stress-chart-wrap svg { width: 100%; max-width: 100%; }
.ideal3-page .stress-heading { gap: 8px 12px; margin-bottom: 4px; align-items: center; }
.ideal3-page .stress-legend { display: inline-flex; flex-wrap: nowrap; align-items: center; align-self: center; width: auto; order: 0; }
.ideal3-page .stress-axis-money { font-size: 10px; }
.ideal3-page .stress-point-label,
.ideal3-page .stress-min-title,
.ideal3-page .stress-min-value,
.ideal3-page .stress-min-move,
.ideal3-page .stress-spot-label { paint-order: normal; stroke: none; }
.ideal3-page .stress-iv-curve-line { stroke-dasharray: 6 4; }
.ideal3-page .stress-legend-shift:before { border-top-style: dashed; }
.ideal3-page .stress-min-tick { stroke: var(--text); stroke-width: 1; fill: none; }
.ideal3-page .stress-scrub { height: auto; min-height: 0; padding: 0 0 2px; grid-template-rows: auto; }
.ideal3-page .stress-scrub:not(.active) { display: block; }
.ideal3-page .stress-scrub:not(.active) > div { display: none; }
.ideal3-page .stress-scrub em { position: static; inset: auto; display: block; padding: 0 0 2px; text-align: left; }
.ideal3-page .stress-title-group p { margin: 2px 0 0; font-size: 15px; }
.ideal3-page .stress-baseline,
.ideal3-page.analysis-page .analysis-left .stress-baseline {
  display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline;
  font-size: 15px; white-space: normal;
}
.ideal3-page .stress-baseline strong { font-size: 15px; font-weight: 650; }
.ideal3-page .stress-snap { color: var(--muted); font-size: 12px; font-weight: 650; }
.ideal3-page .stress-extrema { gap: 6px 12px; margin-top: 6px; }
.ideal3-page .stress-extrema > div { font-size: 14px; }
.ideal3-page .stress-extrema strong { font-size: 18px; }
.ideal3-page .stress-extrema small { font-size: 13px; }
.ideal3-page .model-footnote,
.ideal3-page .stress-model-settings,
.ideal3-page #stress-unavailable-reason { margin-top: 6px; font-size: 14px; }
.ideal3-page .model-footnote { flex-wrap: wrap; align-items: flex-start; }
.ideal3-page .model-footnote > span {
  overflow: visible; text-overflow: clip; white-space: normal;
  overflow-wrap: normal; word-break: normal; min-width: 0;
}
.ideal3-page .model-footnote > span:last-child { display: block; flex: 1 1 100%; }
.ideal3-page .stress-model-settings[hidden],
.ideal3-page .stress-legend-shift[hidden] { display: none !important; }
.ideal3-page #stress-unavailable-reason { font-size: 15px; }
.ideal3-page .dg-section { margin: 6px 0; align-items: start; }
.ideal3-page .dg-section .greek-item { justify-content: flex-start; align-content: start; }
.ideal3-page .dg-section .greek-item span { display: block; line-height: 1.2; min-height: 1.2em; }
.ideal3-page .freshness-line { margin: 2px 0 8px; }
.ideal3-page .mobile-status { display: none !important; }
.ideal3-page #edit-count,
.ideal3-page #reconciliation,
.ideal3-page #trade-report,
.ideal3-page #report-block { display: none !important; }
.ideal3-page .stress-model-settings { white-space: normal; }
.ideal3-page .manage-inner { max-width: none; }
.ideal3-page .trade-contract {
  overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: normal; word-break: normal; min-width: 0;
  font-size: clamp(13px, 3.8vw, 19px);
}
.ideal3-page .position-current { white-space: normal; overflow-wrap: normal; word-break: normal; }
.ideal3-page .stepper select { font-size: clamp(14px, 4vw, 22px); text-overflow: clip; }
.ideal3-page .segmented button {
  min-width: 0; white-space: nowrap; overflow-wrap: normal; word-break: keep-all;
  font-size: clamp(13px, 3.6vw, 18px);
}
.ideal3-page .big-button { white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.ideal3-page .freshness-line,
.ideal3-page .trade-quote small,
.ideal3-page .trade-preview,
.ideal3-page .cluster-label,
.ideal3-page .event-title,
.ideal3-page .history-note,
.ideal3-page .book-note,
.ideal3-page .event-source { overflow-wrap: normal; word-break: normal; }
.ideal3-page .trade-actions,
.ideal3-page .position-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ideal3-page .trade-actions .big-button,
.ideal3-page .position-actions .big-button { flex: 1 1 max-content; width: auto; min-width: max-content; }
/* Three equal columns. Word and date stack; nowrap keeps each line whole.
   Hidden overflow stops a line painting into the next button. */
.ideal3-page #expiry-buttons button,
.ideal3-page #expiry-buttons button span,
.ideal3-page #expiry-buttons button small {
  white-space: nowrap; overflow-wrap: normal; word-break: keep-all;
  text-overflow: clip;
}
.ideal3-page #expiry-buttons button {
  overflow: hidden;
  font-size: clamp(11px, 2.8vw, 14px);
  padding-left: 4px; padding-right: 4px;
}
.ideal3-page #expiry-buttons button span,
.ideal3-page #expiry-buttons button small {
  display: block; max-width: 100%; min-width: 0; overflow: hidden;
}
/* horizon 03.11: three expiry buttons (Today · Tomorrow · Any date) in one row. */
.ideal3-page #expiry-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ideal3-page .manage-section { padding-bottom: 36px; }
.ideal3-page { --stack: 16px; }
.ideal3-page .manage-inner,
.ideal3-page .hedge-drafts,
.ideal3-page .position-edit-list,
.ideal3-page .trade-list { gap: var(--stack); }
.ideal3-page .hedge-drafts { display: flex; flex-direction: column; }
.ideal3-page .manage-inner .block-heading,
.ideal3-page .hedge-drafts .block-heading { margin: 0; min-height: 0; }
.ideal3-page .block-heading h2 { margin: 0; line-height: 1.15; }
.ideal3-page .position-group { margin: 0; padding: 0; border: 0; }
.ideal3-page .trade-empty { margin: 0; }
.ideal3-page .quote-side { display: inline-block; white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.ideal3-page .trade-group { gap: 8px; }
.ideal3-page .position-edit-row,
.ideal3-page .trade-row {
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.ideal3-page .stress-baseline strong,
.ideal3-page .dg-section .greek-item strong { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: clip; }
@media (max-width: 700px) {
  .ideal3-page .indices,
  .ideal3-page .market-section { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ideal3-page .stress-legend-shift { display: inline-flex; align-items: center; }
  .ideal3-page .stress-model-settings { display: flex; }
  .ideal3-page .stress-axis-money { font-size: 13px; }
  .ideal3-page .topbar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    row-gap: 2px;
  }
  .ideal3-page .identity { grid-area: 1 / 1; display: block; min-width: 0; max-width: 100%; }
  .ideal3-page #status { grid-area: 2 / 1; justify-self: end; }
  .ideal3-page .topbar time { display: block; font-size: 12px; }
  .ideal3-page .stress-chart-wrap { min-height: 300px; }
  .ideal3-page .stress-point-label,
  .ideal3-page .stress-min-title { font-size: 13px; }
  .ideal3-page .model-footnote > span:last-child { display: block; flex: 1 1 100%; }
  .ideal3-page .iv-table th,
  .ideal3-page .iv-table td { padding: 5px 6px; }
  .ideal3-page .page-switch { display: flex; flex-wrap: nowrap; width: 100%; max-width: 100%; box-sizing: border-box; }
  .ideal3-page .page-switch a { flex: 1 1 0; min-width: 0; padding: 0 4px; font-size: clamp(12px, 3.4vw, 14px); white-space: nowrap; }
}
@media (min-width: 1024px) {
  .ideal3-page .position-edit-row {
    grid-template-columns: auto minmax(0, 1.4fr) minmax(148px, 1fr) minmax(68px, auto) minmax(76px, auto);
    grid-template-areas:
      "side name target close putback"
      "side current target close putback"
      "change change change change change";
  }
  .ideal3-page .position-edit-row .position-actions .big-button:first-child { grid-area: close; align-self: center; }
  .ideal3-page .position-edit-row .position-actions .big-button:last-child { grid-area: putback; align-self: center; }
  .ideal3-page .position-edit-row .trade-contract { font-size: 13px; white-space: normal; overflow: visible; text-overflow: clip; }
  .ideal3-page .position-edit-row .stepper select { font-size: 14px; padding: 0 4px; }
  .ideal3-page #expiry-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ideal3-page #expiry-buttons button { font-size: 12px; min-height: 38px; }
  .ideal3-page .manage-inner,
  .ideal3-page .hedge-drafts,
  .ideal3-page .position-edit-list,
  .ideal3-page .trade-list { gap: var(--stack); }
  .ideal3-page .position-edit-row .position-actions .big-button {
    height: 36px; min-height: 36px; max-height: 36px; margin: 0;
    box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
    padding: 0 8px; line-height: 1; white-space: nowrap;
  }
}

/* Proto stress: three smiles (no vol rise / vol as at the 30.10 peak / with hedge), table and hedge under the chart. */
.ideal3-page .smile-block .s-peak.now-line { stroke: #ff6b6b; stroke-width: 2; stroke-dasharray: 6 4; }
.ideal3-page .smile-block .s-hedged.now-line { stroke: #3ddc97; stroke-width: 2.25; }
.ideal3-page .smile-block .smile-legend .s-peak i { border-top: 2px dashed #ff6b6b; }
.ideal3-page .smile-block .smile-legend .s-hedged i { border-top-color: #3ddc97; }
.ideal3-page .smile3-table {
  display: grid; grid-template-columns: minmax(0, 0.8fr) repeat(3, minmax(0, 1fr)); width: 100%; margin: 8px 0 0;
  font-variant-numeric: tabular-nums; font-size: 12px;
}
.ideal3-page .smile3-table > div { padding: 4px 2px; text-align: right; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: clip; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.ideal3-page .smile3-table > .st-h { border-top: 0; color: var(--muted); font-weight: 650; font-size: 11px; }
.ideal3-page .smile3-table > .st-first { text-align: left; }
.ideal3-page .smile3-table .st-h i { display: inline-block; width: 10px; height: 0; margin-right: 4px; vertical-align: middle; border-top: 2.5px solid #4da3ff; }
.ideal3-page .smile3-table .st-h.s-peak i { border-top: 2px dashed #ff6b6b; }
.ideal3-page .smile3-table .st-h.s-hedged i { border-top-color: #3ddc97; }
.ideal3-page .stress-move b { font-weight: 700; margin-right: 4px; }
.ideal3-page .stress-move small { color: var(--muted); font-size: 10.5px; }
.ideal3-page .stress-val.positive { color: var(--green, #3ddc97); }
.ideal3-page .stress-val.negative { color: var(--red, #ff6b6b); }
.ideal3-page .stress-hedge { margin: 10px 0 0; }
.ideal3-page .stress-head { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.ideal3-page .stress-line { margin: 0; font-size: 13px; line-height: 1.4; font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
.ideal3-page .stress-what { font-weight: 700; }
/* Proto «вола по модели» (31.10): line 2 = model vol (red dashed), line 3 = with both hedge layers. */
.ideal3-page .smile-block .s-real.now-line { stroke: #e3b341; stroke-width: 2; }
.ideal3-page .smile-block .smile-legend .s-real i { border-top: 2px solid #e3b341; }
.ideal3-page .smile3-table .st-h.s-real i { border-top: 2px solid #e3b341; }
.ideal3-page .smile-block .s-model.now-line { stroke: #ff6b6b; stroke-width: 2; stroke-dasharray: 6 4; }
.ideal3-page .smile-block .smile-legend .s-model i { border-top: 2px dashed #ff6b6b; }
.ideal3-page .smile3-table .st-h.s-model i { border-top: 2px dashed #ff6b6b; }
.ideal3-page .smile3-table .st-h .st-same { display: block; color: var(--muted-2); font-weight: 500; font-size: 10px; }
.ideal3-page .smile3-table .st-dash { color: var(--muted-2); }
.ideal3-page .stress-sub { margin: 8px 0 2px; font-size: 12px; font-weight: 650; color: var(--muted); }
.ideal3-page .stress-alt { margin-top: 4px; color: var(--muted); }
.ideal3-page .stress-budget { margin-top: 8px; font-weight: 650; }
.ideal3-page .stress-budget.neg { color: var(--red, #ff6b6b); }
.ideal3-page .stress-warn { color: var(--amber, #f5b942); }
@media (max-width: 400px) {
  .ideal3-page .smile3-table { font-size: 11px; }
  .ideal3-page .smile3-table > .st-h { font-size: 10px; }
  .ideal3-page .stress-move small { display: block; font-size: 10px; }
  .ideal3-page .stress-line { font-size: 12px; }
}

/* Desktop «Home» (31.10, desk1, Convexa Design): only ≥1024 px; below it nothing changes. */
@media (min-width: 1024px) {
  /* align1: the 1240 px content box (header and every tab) lives in styles.css; #main only stacks its blocks. */
  .ideal3-page #main:not([hidden]) {
    display: flex; flex-direction: column; gap: 32px;
    box-sizing: border-box; width: 100%; margin: 0; padding: 24px 0 32px;
  }
  .ideal3-page #main > * { margin-top: 0; margin-bottom: 0; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile-block {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 24px; row-gap: 0; align-items: start;
  }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile-block > .smile-title,
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile-block > .smile-fresh,
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile-block > .smile-legend,
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile-block > .stress-hedge { grid-column: 1 / -1; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile-title { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile-legend { font-size: 12px; margin: 0; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile-block > .plot { grid-column: 1; margin-top: 16px; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile-block .axis { font-size: 12px; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile-block > .smile3-table {
    grid-column: 2; align-self: stretch; margin: 16px 0 0;
    grid-template-columns: minmax(0, 1fr) repeat(3, minmax(0, 1fr));
    grid-template-rows: auto; grid-auto-rows: minmax(36px, 1fr);
    font-size: 14px; font-variant-numeric: tabular-nums;
  }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile3-table > div {
    display: flex; flex-direction: column; justify-content: center; align-items: flex-end;
    padding: 0 6px; border-top: 1px solid var(--line);
  }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile3-table > .st-first { align-items: flex-start; padding-left: 0; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile3-table > .st-h {
    justify-content: flex-end; padding-bottom: 8px; border-top: 0;
    font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile3-table .st-h .st-same { text-transform: none; letter-spacing: 0; font-size: 11px; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile3-table .stress-move b { margin-right: 0; font-weight: 700; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile3-table .stress-move small { display: block; font-size: 12px; color: var(--muted); line-height: 1.2; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .stress-hedge { margin: 32px 0 0; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .stress-head,
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .stress-sub {
    font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .stress-head { margin: 0 0 6px; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .sh-head { margin: 0 0 12px; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .sh-layers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .sh-layer:only-child { grid-column: 1 / -1; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .sh-layer > .stress-sub:first-child { margin-top: 0; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .stress-line { font-size: 14px; line-height: 1.45; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .sh-notes { max-width: 820px; margin-top: 32px; }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile-note { font-size: 12px; color: var(--muted-2); }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .sh-notes > .smile-note:first-child { margin-top: 0; }
}

/* «Analysis» (31.10, anl1): the same smile block as on «Home», on top of the tab; existing Analysis content stays below. */
.ideal3-page #analysis-smile[hidden] { display: none !important; }
.ideal3-page #analysis-smile { margin: 0 0 16px; }

/* «Analysis» (31.10, anl2): the «Virtual leg» panel (moved, unchanged) sits next to the smile; its legs redraw the
   smile lines. Phone/tablet: chart → panel → table → «My positions» → hedge text → Delta/Gamma → Stress curve.
   Desktop: chart | panel with «Virtual trades»; table under the chart; then hedge text, Delta/Gamma and
   Stress curve on the left, «My positions» on the right. «Home» is untouched. */
.ideal3-page #analysis-hedge[hidden] { display: none !important; }
.ideal3-page #analysis-smile > [hidden] { display: none !important; }
.ideal3-page #analysis-smile > .anl-legs { padding: 12px 0 20px; }
.ideal3-page #analysis-smile > .anl-table { padding: 4px 0 12px; }
.ideal3-page #analysis-hedge > .anl-hedge { padding: 12px 0 16px; }
.ideal3-page #analysis-hedge .stress-hedge { margin-top: 0; }
.ideal3-page #analysis-hedge .anl-hedge-note { margin: 0 0 8px; }
.ideal3-page .smile-block .s-ghost.now-line { stroke: #8fa3b8; stroke-opacity: .5; stroke-width: 1.5; stroke-dasharray: none; }
.ideal3-page .smile-block .s-ghost.s-model.now-line { stroke-dasharray: 4 4; }
.ideal3-page .smile-block .smile-legend .s-ghost i { border-top: 1.5px solid #8fa3b8; opacity: .7; }
.ideal3-page .smile-block .smile-legend .smile-virtual { color: var(--cyan); font-weight: 750; }
@media (max-width: 1023px) {
  .ideal3-page.analysis-page main { display: flex; flex-direction: column; }
  .ideal3-page.analysis-page .analysis-left > .load-error { order: -9; }
  .ideal3-page.analysis-page main > #analysis-hero { order: -8; margin: 0; }
  .ideal3-page.analysis-page main > #analysis-smile { order: -6; margin: 0; }
  .ideal3-page.analysis-page .analysis-right > .manage-section,
  .ideal3-page.analysis-page .analysis-right > .reconciliation { order: -5; }
  .ideal3-page.analysis-page main > #analysis-hedge { order: -4; }
  .ideal3-page.analysis-page .analysis-left > .dg-section { order: -3; }
}
@media (min-width: 1024px) {
  /* anl3: two independent-looking columns on one grid. Left: chart, table, «My positions» (wide enough for one-line
     rows). Right: «Virtual leg» with «Virtual trades», then the hedge text, Delta/Gamma and the snapshot line. */
  /* Hero (NLV+Day) is a full-width first row; everything else is the 00157-zel Analysis grid, shifted down one row. */
  .ideal3-page.analysis-page main {
    /* align1: the 1240 px box and its side padding come from styles.css, the same on every tab. */
    grid-template-columns: minmax(0, 3fr) minmax(440px, 2fr); grid-template-rows: repeat(7, auto) 1fr; column-gap: 28px;
    align-items: start;
  }
  .ideal3-page.analysis-page main > #analysis-smile,
  .ideal3-page.analysis-page main > .analysis-left { display: contents; }
  .ideal3-page.analysis-page main > #analysis-hero { grid-column: 1 / -1; grid-row: 1; padding: 24px 0 0; min-width: 0; }
  .ideal3-page.analysis-page .analysis-left > .load-error { grid-column: 1 / -1; grid-row: 2; }
  /* Match #main: 32px gap after hero + .smile-block padding 8px 0 4px, so the plot does not jump. */
  .ideal3-page.analysis-page #analysis-smile > .anl-chart { grid-column: 1; grid-row: 3; display: block; min-width: 0; margin-top: 32px; padding: 8px 0 4px; border-bottom: 0; }
  .ideal3-page.analysis-page #analysis-smile > .anl-table { grid-column: 1; grid-row: 4; display: block; min-width: 0; padding: 0 0 16px; }
  .ideal3-page.analysis-page #analysis-smile > .anl-table > .smile3-table { margin: 16px 0 0; }
  .ideal3-page.analysis-page #analysis-smile > .anl-legs { grid-column: 2; grid-row: 3 / span 2; min-width: 0; padding: 40px 0 14px; }
  .ideal3-page.analysis-page main > .analysis-right { grid-column: 1; grid-row: 5 / span 4; min-width: 0; }
  .ideal3-page.analysis-page .analysis-right > .manage-section { padding-top: 16px; }
  .ideal3-page.analysis-page main > #analysis-hedge { grid-column: 2; grid-row: 5; min-width: 0; }
  .ideal3-page.analysis-page #analysis-hedge > .anl-hedge { display: block; padding: 16px 0 16px; }
  .ideal3-page.analysis-page .analysis-left > .dg-section { grid-column: 2; grid-row: 6; min-width: 0; }
  .ideal3-page.analysis-page .analysis-left > .freshness-line { grid-column: 2; grid-row: 7; }
  /* Cards stay readable whatever width they get: below 520 px the contract and «now» take the first line(s),
     the controls go to a second row. Only the layout changes; no word is broken mid-way. */
  .ideal3-page.analysis-page .position-edit-list,
  .ideal3-page.analysis-page .trade-list { container-type: inline-size; }
  .ideal3-page.analysis-page .position-edit-row .trade-contract,
  .ideal3-page.analysis-page .trade-row .trade-contract { overflow-wrap: normal; word-break: normal; }
  @container (max-width: 520px) {
    .ideal3-page.analysis-page .position-edit-row {
      grid-template-columns: auto minmax(0, 1fr) auto auto;
      grid-template-areas: "side name current current" "target target close putback" "change change change change";
      row-gap: 6px; padding: 8px 4px;
    }
    .ideal3-page.analysis-page .position-edit-row .position-current { justify-self: end; white-space: nowrap; font-size: 12px; }
    .ideal3-page.analysis-page .trade-row {
      grid-template-columns: auto minmax(0, 1fr) 88px 36px;
      grid-template-areas: "side name name remove" "qty qty price price" "note note note note";
      row-gap: 6px;
    }
  }
}
/* anl3: «Stress curve» is off on Proto «Analysis» (markup kept with [hidden], calc code untouched). */
.ideal3-page .stress-section[hidden] { display: none !important; }

/* «History» (hist1): strategy diary. Scoped to #history; other tabs untouched. */
#history .hist-wrap { padding: 4px 0 28px; font-variant-numeric: tabular-nums; }
#history .hist-title { display: flex; align-items: center; gap: 12px; padding: 14px 0 10px; border-bottom: 1px solid var(--line); }
#history .hist-title h2 { margin: 0; }
#history .hist-example { color: var(--amber); font-size: 11px; font-weight: 700; }
#history .hist-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
#history .hist-card { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
#history .hist-card:first-child { grid-column: 1 / -1; }
#history .hist-label { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
#history .hist-value { color: var(--text); font-size: 21px; font-weight: 760; line-height: 1.1; white-space: nowrap; }
#history .hist-sub { color: var(--muted-2); font-size: 12px; font-weight: 600; }
#history .hist-block { padding: 14px 0; border-bottom: 1px solid var(--line); }
#history .hist-block:last-child { border-bottom: 0; }
#history .hist-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
#history .hist-head h2 { margin: 0; }
#history .hist-legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
#history .hist-legend i { display: inline-block; width: 14px; height: 2px; border-radius: 1px; margin-left: 6px; }
#history .lg-actual { background: var(--cyan); }
#history .lg-advice { background: var(--amber); }
#history .hist-chart { width: 100%; min-height: 170px; }
#history .hist-svg { display: block; overflow: visible; }
#history .hist-grid line { stroke: var(--line-soft); stroke-width: 1; }
#history .hist-grid .hist-zero { stroke: var(--muted-2); stroke-dasharray: 3 3; }
#history .hist-svg text { fill: var(--muted-2); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
#history .hist-line-actual { fill: none; stroke: var(--cyan); stroke-width: 2; }
#history .hist-line-advice { fill: none; stroke: var(--amber); stroke-width: 2; stroke-dasharray: 5 3; }
#history .hist-dots-actual circle { fill: var(--cyan); }
#history .hist-dots-advice circle { fill: var(--amber); }
#history .hist-foot { margin: 8px 0 0; color: var(--muted-2); font-size: 12px; }
#history .hist-days { display: flex; flex-direction: column; gap: 12px; }
#history .hist-day { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
#history .hist-day-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2); }
#history .hist-date { margin: 0; color: var(--text); font-size: 16px; font-weight: 760; }
#history .hist-date small { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
#history .hist-market { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.5; }
#history .hist-market b { font-weight: 700; }
#history .hist-market .dot { margin: 0 6px; color: var(--muted-2); font-style: normal; }
#history .hist-day-pnl { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
#history .hist-day-pnl strong { font-size: 19px; font-weight: 780; white-space: nowrap; }
#history .hist-day-pnl small { font-size: 12px; font-weight: 700; }
#history .hist-tag { color: var(--amber); font-size: 10px; font-weight: 700; white-space: nowrap; }
#history .hist-secs { display: grid; grid-template-columns: 1fr; }
#history .hist-sec { min-width: 0; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
#history .hist-sec:last-child { border-bottom: 0; }
#history .hist-sec h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; color: var(--muted); font-size: 11px; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
#history .hist-sec h3 em { color: var(--muted-2); font-size: 10px; font-style: normal; font-weight: 650; letter-spacing: .02em; text-transform: none; }
#history .hist-sec p { margin: 0 0 8px; color: var(--text); font-size: 13px; line-height: 1.45; }
#history .hist-sec .hist-none { color: var(--muted-2); }
#history .hist-basis { color: var(--muted) !important; font-size: 12px !important; }
#history .hist-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: var(--muted); font-size: 12px; font-weight: 600; }
#history .hist-row span:last-child { color: var(--text); text-align: right; }
#history .fol-yes { color: var(--green); }
#history .fol-partly { color: var(--amber); }
#history .fol-no { color: var(--red); }
#history .hist-lesson { padding: 8px 10px; border-left: 2px solid var(--amber); background: rgba(215, 164, 104, .06); }
#history .hist-lesson span { display: block; margin-bottom: 2px; color: var(--amber); font-size: 10px; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
#history .hist-open { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--cyan); font-size: 12px; font-weight: 700; text-decoration: none; }
#history .hist-open:hover { border-color: var(--cyan); }
#history .hist-notes { padding: 8px 14px 10px; border-top: 1px solid var(--line-soft); color: var(--muted-2); font-size: 12px; }
#history .hist-notes summary { cursor: pointer; font-weight: 650; }
#history .hist-notes ul { margin: 6px 0 0; padding-left: 16px; }
#history .hist-notes li { margin: 3px 0; line-height: 1.4; }
#history .hist-notes code { color: var(--muted); font-size: 11px; }
#history .hist-empty { display: flex; flex-direction: column; gap: 8px; padding: 40px 16px; text-align: center; }
#history .hist-empty strong { color: var(--text); font-size: 18px; font-weight: 760; }
#history .hist-empty span { color: var(--muted); font-size: 13px; }
@media (min-width: 760px) {
  #history .hist-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #history .hist-card:first-child { grid-column: auto; }
}
@media (min-width: 1024px) {
  #history .hist-secs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #history .hist-sec { border-bottom: 0; border-right: 1px solid var(--line-soft); }
  #history .hist-sec:last-child { border-right: 0; }
}

/* «Vol» (vol1): flat sections on hairlines, no cards. Everything here is scoped to #vol. */
.ideal3-page #vol { box-sizing: border-box; width: 100%; min-width: 0; padding: 0 4px 32px; font-size: 14px; font-variant-numeric: tabular-nums; }
.ideal3-page #vol .vol-head { padding: 16px 0 12px; }
.ideal3-page #vol .vol-head h1 { margin: 0; color: var(--text); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ideal3-page #vol .vol-fresh { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.ideal3-page #vol .vol-section { min-width: 0; margin: 0; padding: 24px 0; border: 0; border-top: 1px solid var(--line); background: transparent; border-radius: 0; }
.ideal3-page #vol .vol-section > h2 { margin: 0 0 12px; color: var(--text); font-size: 13px; font-weight: 700; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; }
.ideal3-page #vol .vol-sub { margin: -6px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.ideal3-page #vol .vol-level { margin: 0 0 8px; font-size: 20px; font-weight: 600; line-height: 1.25; color: var(--muted); }
.ideal3-page #vol .vol-level[data-level="low"] { color: var(--green); }
.ideal3-page #vol .vol-level[data-level="mid"] { color: #f0c84a; }
.ideal3-page #vol .vol-level[data-level="high"] { color: #f0943a; }
.ideal3-page #vol .vol-summary .say { margin: 0; color: var(--text); font-size: 14px; line-height: 1.45; overflow-wrap: normal; word-break: normal; hyphens: none; }
.ideal3-page #vol .vol-plot { height: 260px; margin: 0; }
.ideal3-page #vol .vol-plot svg { height: 100%; }
.ideal3-page #vol .vol-plot .axis { fill: var(--muted); font-size: 11px; }
.ideal3-page #vol .vol-today { fill: none; stroke: #4da3ff; stroke-width: 2.5; }
.ideal3-page #vol .vol-fail { margin: 0; color: var(--muted); font-size: 14px; }
.ideal3-page #vol .vol-pair { display: block; }
.ideal3-page #vol .vol-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ideal3-page #vol .vol-table th,
.ideal3-page #vol .vol-table td { height: 40px; padding: 0 0 0 12px; box-sizing: border-box; border-bottom: 1px solid var(--line-soft); text-align: right; white-space: nowrap; vertical-align: middle; }
.ideal3-page #vol .vol-table th { height: 32px; background: transparent; border-bottom-color: var(--line); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ideal3-page #vol .vol-table td { color: var(--text); font-size: 14px; font-weight: 400; }
.ideal3-page #vol .vol-table .lead { padding-left: 0; text-align: left; }
.ideal3-page #vol .iv-table td.contract { font-weight: 600; }
.ideal3-page #vol .iv-table td.past { color: var(--muted); }
.ideal3-page #vol .straddle-table .term-name { text-transform: uppercase; font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.ideal3-page #vol .straddle-table .term-date { display: none; }
@media (max-width: 1023px) {
  .ideal3-page #vol .straddle-table .exp { display: none; }
  .ideal3-page #vol .straddle-table td.term { height: 48px; line-height: 1.25; }
  .ideal3-page #vol .straddle-table .term-name,
  .ideal3-page #vol .straddle-table .term-date { display: block; }
  .ideal3-page #vol .straddle-table .term-date { color: var(--muted); font-size: 12px; }
}
@media (min-width: 1024px) {
  .ideal3-page #vol:not([hidden]) { display: block; margin: 0; padding: 8px 0 32px; }
  .ideal3-page #vol .vol-plot { height: clamp(320px, 42vh, 420px); }
  .ideal3-page #vol .vol-plot .axis { font-size: 12px; }
  .ideal3-page #vol .vol-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; border-top: 1px solid var(--line); }
  .ideal3-page #vol .vol-pair > .vol-section { border-top: 0; position: relative; }
  .ideal3-page #vol .vol-pair > .vol-section + .vol-section::before { content: ""; position: absolute; top: 24px; bottom: 24px; left: -16px; border-left: 1px solid var(--line); }
}
/* «Vol» (vol2): ATM, expected-move band, our strikes on the main-expiry smile. */
.ideal3-page #vol .vol-band { fill: var(--text); fill-opacity: .06; stroke: none; }
.ideal3-page #vol .vol-atm { stroke: var(--muted); stroke-opacity: .7; stroke-width: 1; }
.ideal3-page #vol .vol-note { fill: var(--muted); font-variant-numeric: tabular-nums; stroke: var(--bg); stroke-width: 4px; paint-order: stroke fill; stroke-linejoin: round; }
.ideal3-page #vol .vol-pin { fill: #4da3ff; stroke: var(--bg); stroke-width: 1.5; }
.ideal3-page #vol .vol-pin-label { fill: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; stroke: var(--bg); stroke-width: 4px; paint-order: stroke fill; stroke-linejoin: round; }

/* lines2 (02.11): «Analysis» table has two value columns (вола пост. / по модели); short one-line hedge block on «Home». */
.ideal3-page .smile3-table.st-two { grid-template-columns: minmax(0, 0.8fr) repeat(2, minmax(0, 1fr)); }
.ideal3-page .stress-hedge.sh-short .sh-leg { white-space: normal; }
.ideal3-page .stress-hedge .sh-src { color: var(--muted); font-size: .82em; font-weight: 600; white-space: nowrap; }
.ideal3-page .stress-hedge .sh-src-late { color: var(--amber); }
@media (min-width: 1024px) {
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile-block > .smile3-table.st-two,
  .ideal3-page.analysis-page #analysis-smile > .anl-table > .smile3-table.st-two { grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, 1fr)); }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .stress-hedge.sh-short .sh-layers { display: block; }
}

/* align1 (02.11): chart labels, legend and the move table. */
.ideal3-page .smile-block .pin-leader { stroke: #4da3ff; stroke-opacity: .55; stroke-width: 1; }
.ideal3-page .smile-block .pin-leader.line-leader { stroke: #3ddc97; }
.ideal3-page .smile-block .smile-legend .legend-same { color: var(--muted-2); font-weight: 500; }
.ideal3-page .smile3-table { font-size: 13px; }
.ideal3-page .smile3-table > div { padding: 6px 4px; }
.ideal3-page .smile3-table > .st-h { font-size: 12px; }
.ideal3-page .smile3-table .stress-move b { font-weight: 700; }
.ideal3-page .smile3-table .stress-move small { display: block; font-size: 12px; color: var(--muted); line-height: 1.25; }
@media (max-width: 400px) {
  .ideal3-page .smile3-table { font-size: 13px; }
  .ideal3-page .smile3-table > .st-h { font-size: 12px; }
  .ideal3-page .stress-move small { display: block; font-size: 12px; }
  .ideal3-page .stress-line { font-size: 13px; }
}
@media (max-width: 1023px) {
  .ideal3-page .smile3-table.st-two { grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, 1.2fr)); }
}
@media (min-width: 1024px) {
  .ideal3-page.analysis-page #analysis-smile > .anl-table > .smile3-table.st-two,
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile-block > .smile3-table.st-two {
    grid-template-columns: minmax(0, 1fr) 170px 170px;
  }
}
/* align1 (02.11): QQQ · VIX · VXN in one row of three, same layout in each: name, figure, change. */
@media (min-width: 701px) {
  .ideal3-page .indices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; }
  .ideal3-page .indices .market-item {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 4px; min-height: 0; padding: 16px 0; align-content: start;
  }
  .ideal3-page .indices .market-symbol { grid-row: auto; color: var(--muted); font-size: 13px; letter-spacing: .06em; }
  .ideal3-page .indices .market-item strong { font-size: 26px; line-height: 1.1; }
  .ideal3-page .indices .market-change { font-size: 14px; }
}
/* align1 (02.11): «History» day head never hides the day's P/L — the market line wraps, and on phones the P/L goes under the date. */
#history .hist-day-head > :first-child { min-width: 0; }
#history .hist-market { overflow-wrap: break-word; min-width: 0; }
#history .hist-tag { font-size: 11px; }
#history .hist-sec h3 em { font-size: 11px; }
#history .hist-lesson span { font-size: 11px; }
@media (max-width: 599px) {
  #history .hist-day-head { flex-wrap: wrap; row-gap: 8px; }
  #history .hist-day-head > :first-child { flex: 1 1 100%; }
  #history .hist-day-pnl { flex-direction: row; align-items: baseline; gap: 8px; }
}
/* align1 (02.11): «Virtual leg» — same controls, one size system: labels 12 px, button text never smaller
   than its sub-date, 40 px controls on desktop. Nothing removed. */
.ideal3-page.analysis-page .hedge-drafts .trade-label { font-size: 12px; }
.ideal3-page.analysis-page .hedge-drafts .block-heading small { font-size: 12px; }
.ideal3-page.analysis-page .hedge-drafts #expiry-buttons button { font-size: 14px; line-height: 1.2; }
.ideal3-page.analysis-page .hedge-drafts #expiry-buttons button small { font-size: 12px; color: var(--muted); }
.ideal3-page.analysis-page .hedge-drafts .count-badge { font-size: 12px; }
.ideal3-page.analysis-page .hedge-drafts .trade-note,
.ideal3-page.analysis-page .hedge-drafts .trade-quote small { font-size: 12px; line-height: 1.35; }
.ideal3-page.analysis-page .hedge-drafts .big-button { font-size: 16px; }
@media (min-width: 1024px) {
  .ideal3-page.analysis-page .hedge-drafts .segmented button,
  .ideal3-page.analysis-page .hedge-drafts .stepper button,
  .ideal3-page.analysis-page .hedge-drafts .stepper input,
  .ideal3-page.analysis-page .hedge-drafts .price-input,
  .ideal3-page.analysis-page .hedge-drafts .big-button,
  .ideal3-page.analysis-page .hedge-drafts .trade-row button,
  .ideal3-page.analysis-page .hedge-drafts .trade-row input { box-sizing: border-box; height: 40px; min-height: 40px; }
  .ideal3-page.analysis-page .hedge-drafts .stepper { grid-template-columns: 40px minmax(0, 1fr) 40px; }
  .ideal3-page.analysis-page .hedge-drafts #expiry-buttons button { height: auto; min-height: 44px; font-size: 13px; padding-top: 4px; padding-bottom: 4px; }
  .ideal3-page.analysis-page .hedge-drafts #expiry-buttons button small { font-size: 12px; }
  .ideal3-page.analysis-page .hedge-drafts .segmented[data-choice] button { font-size: 15px; }
  .ideal3-page.analysis-page .hedge-drafts .stepper input,
  .ideal3-page.analysis-page .hedge-drafts .price-input,
  .ideal3-page.analysis-page .hedge-drafts .trade-row input { font-size: 16px; }
  .ideal3-page.analysis-page .hedge-drafts .big-button { font-size: 14px; }
  .ideal3-page.analysis-page .hedge-drafts .trade-remove { width: 40px; min-width: 40px; }
  .ideal3-page.analysis-page .hedge-drafts .trade-row .stepper button { font-size: 18px; }
  .ideal3-page.analysis-page .hedge-drafts .trade-side { font-size: 12px; }
}
/* align1 (02.11): «My positions» cards on desktop — 40 px controls, 12 px small text, actions in fixed columns. */
@media (min-width: 1024px) {
  .ideal3-page.analysis-page .hedge-drafts .trade-row .stepper { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 4px; }
  .ideal3-page.analysis-page .position-group { font-size: 12px; }
  .ideal3-page.analysis-page .position-edit-row .trade-side { font-size: 12px; }
  .ideal3-page.analysis-page .position-edit-row .trade-contract { font-size: 14px; }
  .ideal3-page.analysis-page .position-edit-row .position-current { font-size: 12px; }
  .ideal3-page.analysis-page .position-edit-row .stepper { grid-template-columns: 40px minmax(0, 1fr) 40px; }
  .ideal3-page.analysis-page .position-edit-row .stepper button,
  .ideal3-page.analysis-page .position-edit-row .stepper select,
  .ideal3-page.analysis-page .position-edit-row .position-actions .big-button { box-sizing: border-box; height: 40px; min-height: 40px; max-height: 40px; font-size: 14px; }
  .ideal3-page.analysis-page .position-edit-row .stepper button { font-size: 18px; }
}
/* align1: no text under 11 px on Proto. */
.ideal3-page .greek-item > span,
.ideal3-page .greek-item small,
.ideal3-page .freshness-line { font-size: 12px; }
.ideal3-page .hero-primary .eyebrow,
.ideal3-page .hero-pnl .eyebrow { font-size: 11px; }

/* nohedge (03.11): «Home» without the hedge advice — two-column table (вола пост. / по модели), the chart takes the freed width. */
@media (min-width: 1024px) {
  /* samesize (03.11): the chart column is the «Analysis» chart column (3fr of the same 1240 px box, gap 28 px), so the
     smile has the same width on both tabs; the table takes the column where «Analysis» has «Virtual leg». */
  .ideal3-page #main .smile-block.no-hedge { grid-template-columns: minmax(0, 3fr) minmax(440px, 2fr); column-gap: 28px; }
  .ideal3-page #main .smile-block.no-hedge > .smile3-table.st-two { grid-template-columns: minmax(0, 0.9fr) repeat(2, minmax(0, 1.1fr)); font-size: 13px; }
}

/* Fast layer (05.11): QQQ age, full-calc age, «fast estimate» under the smile title. Wraps at 390. */
.ideal3-page .smile-fresh {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
}

.ideal3-page #analysis-hero[hidden] { display: none !important; }
.ideal3-page #analysis-hero { margin: 0; }
.ideal3-page #analysis-hero > .hero { margin: 0; }

/* Proto: the lower MARGIN block is gone, the hero-metrics trio is the only margin readout: larger, visible on mobile too */
.ideal3-page .hero-metrics span { font-size: 12px; }
.ideal3-page .hero-metrics strong { font-size: 23px; font-weight: 650; }
@media (max-width: 700px) {
  /* line1 (10.11, Murat «Maintenance и Excess Liquidity в мобильной версии не на одной строчке… ровно по линейке»):
     one grid, labels in row 1 and values in row 2, so the three values always share one line even if a label is long;
     labels and values never wrap, the value size follows the screen width (iPhone SF is wider than the box font). */
  .ideal3-page .hero-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto; grid-auto-flow: column; column-gap: 8px; row-gap: 5px; align-items: baseline; width: 100%; padding: 10px 0 12px; border-top: 1px solid var(--line-soft); }
  .ideal3-page .hero-metrics > div { display: contents; }
  .ideal3-page .hero-metrics span { min-width: 0; overflow: hidden; font-size: clamp(9px, 2.75vw, 11px); white-space: nowrap; text-overflow: ellipsis; }
  .ideal3-page .hero-metrics strong { min-width: 0; overflow: hidden; font-size: clamp(13px, 4.3vw, 18px); line-height: 1.15; letter-spacing: -.02em; white-space: nowrap; text-overflow: clip; font-variant-numeric: tabular-nums; }
}

/* pin1 (10.11, Murat «верхняя часть, где Convexa, не ездила вместе с текстом, чтобы текст ездил под ней»): the header
   (brand, tabs, «updated N с») stays at the top on every width; the page scrolls under its opaque background.
   The box-shadow paints the same background across the full window width outside the 1240 px box. */
@media (min-width: 701px) {
  .ideal3-page .dashboard > .topbar { position: sticky; top: 0; z-index: 40; background: var(--bg); box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(0 -100vmax); }
}

/* integral smile (09.11): headers as in the legend (wrapping), four-column table. */
.ideal3-page .smile3-table > .st-h,
.ideal3-page .smile3-table > .st-h .st-name { white-space: normal; overflow: visible; line-height: 1.25; }
.ideal3-page .smile3-table.st-four { grid-template-columns: minmax(0, 0.7fr) repeat(4, minmax(0, 1.05fr)); }
.ideal3-page .smile3-table.st-four > .st-h { text-transform: none; letter-spacing: 0; }
@media (max-width: 1023px) {
  .ideal3-page .smile3-table.st-four { grid-template-columns: minmax(0, 0.62fr) repeat(4, minmax(0, 1.05fr)); }
}
@media (min-width: 1024px) {
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile-block > .smile3-table.st-four {
    grid-template-columns: minmax(72px, 0.75fr) repeat(4, minmax(0, 1.1fr));
  }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile3-table.st-four > .st-h { text-transform: none; letter-spacing: 0; }
}

/* proto-smile-range-1111: smile range switch ±1 / ±3 / ±5 (same selected look as the Analysis segmented buttons). */
.ideal3-page .smile-block > .smile-range {
  display: grid; grid-template-columns: repeat(3, minmax(64px, 1fr)); gap: 6px; margin: 10px 0 0; max-width: 260px;
}
.ideal3-page .smile-range button {
  min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px;
  color: var(--muted); background: var(--surface); font: inherit; font-size: 16px; font-weight: 720;
  font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer;
}
.ideal3-page .smile-range button[aria-pressed="true"] {
  border-color: var(--cyan); color: var(--text); background: #16324a; box-shadow: inset 0 0 0 1px var(--cyan);
}
.ideal3-page .smile-range button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.smile-gap { fill: var(--line); opacity: .28; }
.smile-gap-text { fill: var(--muted-2); font-size: 11px; font-weight: 650; }

/* Gap warning (display only, PROTO_GAP_WARN): same number table, amber title, under the smile. */
.ideal3-page .smile-block > .gap-warn { grid-column: 1 / -1; }
.ideal3-page .gap-warn {
  margin: 12px 0 0; padding: 10px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--amber, #f5b942) 55%, var(--line));
}
.ideal3-page .gap-warn .stress-head { margin: 0 0 2px; color: var(--amber, #f5b942); }
.ideal3-page .gap-warn .smile-note { margin: 0 0 6px; }
.ideal3-page .gap-warn .smile3-table { margin-top: 0; }
.ideal3-page .gap-warn .smile3-table > div { white-space: normal; overflow: visible; }
.ideal3-page .gap-warn .gap-split { display: block; margin-top: 1px; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.25; }
@media (min-width: 1024px) {
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .gap-warn .stress-head {
    color: var(--amber, #f5b942); text-transform: none; letter-spacing: 0;
  }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .gap-warn .smile3-table > div {
    white-space: normal; overflow: visible; align-items: flex-end;
  }
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .gap-warn .smile3-table > .st-first { align-items: flex-start; }
  .ideal3-page.analysis-page #analysis-smile > .anl-table > .gap-warn { margin-top: 16px; }
}
@media (min-width: 1024px) {
  .ideal3-page :is(#main, #analysis-smile, #analysis-hedge) .smile-block > .smile-range {
    grid-column: 1 / -1; justify-self: start; margin-top: 12px;
  }
  .ideal3-page .smile-range button { min-height: 34px; border-radius: 7px; font-size: 13px; }
  .ideal3-page .smile-range button[aria-pressed="false"]:hover { border-color: var(--cyan); color: var(--text); }
}
.ideal3-page .hero:has(.snapshot-flag) { flex-wrap: wrap; }
.ideal3-page .snapshot-flag {
  flex: 1 0 100%; margin: 0 0 12px; color: var(--amber); font-size: 14px; font-weight: 650; line-height: 1.35;
}
