/* 1.35: explain current money, recorded actions and historical decisions.
   This sheet is enqueued only for missions. State/accounting stays in the core. */
.omm {
  --omm-surface-shadow: 0 8px 28px rgba(33, 59, 100, .045);
}
.omm .omm-intro { border-top: 3px solid #3869ed; box-shadow: var(--omm-surface-shadow); }
.omm .omm-portfolio {
  border: 1px solid #d6e1ef; border-radius: 16px; background: #fff;
  margin-bottom: 18px; overflow: hidden; box-shadow: var(--omm-surface-shadow);
}
.omm .omm-portfolio .omm-metrics { border: 0; border-radius: 0; margin: 0; padding: 17px 22px 13px; }
.omm .omm-metrics > div > span { font-size: 12px; }
.omm .omm-metrics strong { font-size: 23px; }
.omm .omm-metrics > div:first-child strong { color: #163963; }
.omm .omm-allocation { margin: 0 22px; border-top: 1px solid #e7edf5; padding: 12px 0 13px; }
.omm-allocation-labels { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; }
.omm-allocation-labels > span { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: #536985; font-size: 12px; }
.omm-allocation-labels strong { color: #243f62; font-weight: 700; font-variant-numeric: tabular-nums; }
.omm-cash-dot, .omm-btc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: #50867a; flex: 0 0 8px; }
.omm-btc-dot { background: #245cec; }
.omm-allocation-track { height: 6px; border-radius: 3px; background: #50867a; overflow: hidden; margin: 9px 0 6px; display: flex; justify-content: flex-end; }
.omm-allocation-track > span { display: block; height: 100%; background: #245cec; }
.omm .omm-allocation > p { font-size: 12px; line-height: 1.55; }
.omm .omm-chart-card { box-shadow: var(--omm-surface-shadow); }
.omm .omm-observation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 12px 0; margin: 9px 0 4px; border-top: 1px solid #edf1f7; border-bottom: 1px solid #edf1f7; }
.omm-observation > div { min-width: 0; }
.omm-observation span, .omm-observation strong { display: block; }
.omm-observation span { font-size: 12px; line-height: 1.5; color: #536985; margin-bottom: 3px; }
.omm-observation strong { font-size: 13px; line-height: 1.5; font-weight: 650; font-variant-numeric: tabular-nums; }
.omm .omm-control-card { border-top: 3px solid #6783b4; box-shadow: var(--omm-surface-shadow); }
.omm[data-mission-mode="decision"] .omm-control-card { border-top-color: #245cec; }
.omm[data-mission-mode="playing"] .omm-control-card { border-top-color: #50867a; }
.omm .omm-turn-tag { color: #325784; font-size: 12px; line-height: 1.5; }
.omm .omm-control-card .omm-context { font-size: 14px; }
.omm .omm-action-buttons > .omm-button {
  color: #244d85; border-color: #bdcee7; background: #f7faff; box-shadow: none; min-height: 49px;
}
.omm .omm-action-buttons > .omm-button:hover { color: #153c76; border-color: #527ad0; background: #eaf1ff; }
.omm .omm-action-buttons > .omm-trim { border: 1px dashed #c4d2e5; border-radius: 9px; min-height: 44px; padding: 9px; }
.omm .omm-turn-note, .omm .omm-active-plan > small, .omm .omm-control-footer .omm-link { font-size: 12px; }
.omm .omm-active-plan > span { font-size: 11px; }
.omm .omm-action-receipt { padding: 14px; border: 1px solid #cbded7; border-left: 3px solid #50867a; background: #f2f8f5; border-radius: 10px; color: #284f45; }
.omm-action-receipt > span, .omm-action-receipt > strong, .omm-action-receipt > small { display: block; }
.omm .omm-receipt-label { font-size: 11px; font-weight: 650; color: #43695e; margin-bottom: 6px; }
.omm-action-receipt > strong { font-size: 15px; line-height: 1.4; }
.omm .omm-action-receipt > p { color: #375e53; font-size: 13px; line-height: 1.65; margin-top: 8px; }
.omm .omm-action-receipt > small { font-size: 12px; line-height: 1.65; color: #486a60; margin-top: 8px; }
.omm .omm-history-mode { border-left: 3px solid #315bad; }
.omm .omm-inspector > h3 { font-size: 23px; margin: 7px 0 12px; }
.omm .omm-inspect-intro, .omm .omm-inspect-effect, .omm .omm-inspect-detail, .omm .omm-inspect-question { font-size: 13px; line-height: 1.65; margin: 12px 0; }
.omm .omm-inspect-effect { border-left: 3px solid #7899d2; padding: 10px 12px; background: #f0f5ff; border-radius: 0 7px 7px 0; color: #34557f; }
.omm .omm-inspect-question { padding-top: 12px; border-top: 1px solid #e1e8f2; font-weight: 650; color: #294665; }
.omm .omm-inspect-table, .omm .omm-equity-data table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 12px; line-height: 1.5; margin: 14px 0; }
.omm-inspect-table caption, .omm-equity-data caption { text-align: left; font-size: 12px; color: #506681; margin-bottom: 8px; }
.omm .omm-inspect-table :is(th, td), .omm .omm-equity-data :is(th, td) { border: 0; border-bottom: 1px solid #e3eaf3; padding: 9px 4px; text-align: right; vertical-align: middle; color: #264361; background: transparent; font-variant-numeric: tabular-nums; }
.omm .omm-inspect-table thead th { color: #506681; font-weight: 500; }
.omm .omm-inspect-table th:first-child { text-align: left; width: 40%; font-weight: 500; padding-left: 0; }
.omm .omm-inspect-table tbody tr:last-child :is(th, td) { font-weight: 750; }
.omm-inspect-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.omm .omm-inspect-nav .omm-button { padding: 10px 5px; font-size: 12px; }
.omm .omm-inspector > .omm-link { width: 100%; margin-top: 6px; min-height: 44px; }
.omm .omm-review { box-shadow: var(--omm-surface-shadow); }
.omm .omm-review-metrics > div:first-child { background: #edf3ff; border: 1px solid #d0def4; }
.omm-review-metrics small { display: block; font-size: 12px; line-height: 1.55; margin-top: 9px; color: #506681; }
.omm .omm-equity-section { padding: 24px 0; border-bottom: 1px solid #e3eaf4; }
.omm-equity-heading { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.omm-equity-legend { font-size: 12px; color: #536985; }
.omm-equity-legend::before { content: ""; display: inline-block; width: 20px; border-top: 2px dashed #6682ac; vertical-align: middle; margin-right: 6px; }
.omm-equity-labels { display: flex; justify-content: space-between; gap: 12px; }
.omm-equity-labels > div { min-width: 0; }
.omm-equity-labels > div:last-child { text-align: right; }
.omm-equity-labels span, .omm-equity-labels strong { display: block; }
.omm-equity-labels span { font-size: 12px; color: #506681; margin-bottom: 4px; }
.omm-equity-labels strong { font-size: 17px; font-weight: 720; font-variant-numeric: tabular-nums; }
.omm-equity-chart > svg { display: block; width: 100%; height: 155px; overflow: visible; }
.omm-equity-start { stroke: #6682ac; stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.omm-equity-area { fill: #edf3ff; fill-opacity: .55; }
.omm-equity-line { fill: none; stroke: #315d9c; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.omm-equity-point { fill: #315d9c; }
.omm .omm-equity-data summary { display: inline-flex; align-items: center; padding: 8px 0; min-height: 44px; font-size: 12px; color: #315d9c; cursor: pointer; }
.omm-equity-data summary::before { content: "+"; font-size: 18px; margin-right: 8px; }
.omm-equity-data[open] summary::before { content: "−"; }
.omm .omm-equity-data th:first-child, .omm .omm-equity-data td:first-child { text-align: left; }
.omm .omm-equity-caption { font-size: 12px; line-height: 1.65; max-width: 860px; }
.omm .omm-decision[aria-pressed="true"] { border-color: #4c79d4; background: #eef4ff; box-shadow: inset 3px 0 #3869ed; }
.omm .omm-fact { border-left: 2px solid #dde7f5; padding-left: 15px; }
.omm .omm-baseline-grid > div { background: #f7f9fc; }
.omm .omm-chart-tools button[title] { min-height: 44px; }
@media (max-width: 900px) {
  .omm .omm-control-card { padding: 20px; }
  .omm .omm-inspector { max-width: 640px; margin: auto; }
  .omm .omm-inspect-table { font-size: 13px; }
}
@media (max-width: 600px) {
  .omm .omm-portfolio .omm-metrics { padding: 14px 12px 12px; gap: 9px; }
  .omm .omm-metrics > div > span { font-size: 10px; line-height: 1.4; min-height: 28px; }
  .omm .omm-metrics strong { font-size: 17px; }
  .omm .omm-allocation { margin: 0 12px; padding: 10px 0 12px; }
  .omm-allocation-labels { gap: 6px 12px; }
  .omm-allocation-labels > span { gap: 4px; font-size: 11px; }
  .omm .omm-allocation > p { font-size: 11px; }
  .omm .omm-observation { gap: 12px; padding: 10px 0; }
  .omm-observation span { font-size: 11px; }
  .omm-observation strong { font-size: 12px; }
  .omm .omm-control-card { padding: 17px; }
  .omm .omm-inspector > h3 { font-size: 21px; }
  .omm .omm-inspect-table { font-size: 12px; }
  .omm .omm-inspect-table th:first-child { width: 38%; }
  .omm .omm-review-metrics strong { font-size: 24px; }
  .omm .omm-equity-section { padding: 21px 0; }
  .omm-equity-labels span { font-size: 11px; }
  .omm-equity-labels strong { font-size: 14px; }
  .omm-equity-chart > svg { height: 130px; }
  .omm .omm-equity-heading h3 { font-size: 20px; }
  .omm .omm-equity-caption { font-size: 12px; }
}
@media (max-width: 350px) {
  .omm .omm-metrics strong { font-size: 15px; }
  .omm .omm-metrics > div > span { font-size: 9px; }
  .omm .omm-control-card { padding: 14px; }
  .omm .omm-inspect-table { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .omm *, .omm *::before, .omm *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .omm-allocation-track, .omm-allocation-track > span { border: 1px solid CanvasText; }
  .omm-equity-line, .omm-equity-start { stroke: CanvasText; }
  .omm-equity-point { fill: CanvasText; }
  .omm-equity-area { fill: none; }
}
/* Keep long amounts and the historical navigation within each card. */
.omm .omm-inspect-nav .omm-button { display: block; width: 100%; min-width: 0; }
.omm .omm-more-decisions { display: block; width: 100%; min-height: 44px; text-align: left; margin-top: 8px; }
@media (max-width: 600px) {
  .omm .omm-portfolio .omm-metrics { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 32px; }
  .omm .omm-portfolio .omm-metrics > div:first-child { grid-area: 1 / 1 / 2 / 2; }
  .omm .omm-portfolio .omm-metrics > div:nth-child(2) { grid-area: 1 / 2 / 2 / 3; }
  .omm .omm-portfolio .omm-metrics > div:nth-child(3) { display: none; }
  .omm .omm-portfolio .omm-metric-detail { grid-area: 1 / 3 / 2 / 4; }
  .omm .omm-metrics > div > span { font-size: 11px; min-height: 0; }
  .omm .omm-metrics strong { font-size: 20px; white-space: nowrap; }
  .omm .omm-review-metrics > div { display: block; }
  .omm .omm-review-metrics span { max-width: none; }
  .omm .omm-review-metrics strong { margin-top: 7px; }
}
.omm .omm-rounding-note { font-size: 11px; line-height: 1.6; color: #536985; margin: -5px 0 12px; }
.omm .omm-portfolio .omm-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)) 110px; }
.omm .omm-portfolio .omm-metric-detail { display: block; width: 110px; min-width: 0; height: 44px; text-align: right; }
.omm .omm-metric-detail svg { display: inline-block; vertical-align: middle; }
@media (max-width: 600px) {
  .omm .omm-portfolio .omm-metrics { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 32px; }
  .omm .omm-portfolio .omm-metric-detail { width: 32px; text-align: center; }
}
.omm .omm-action-buttons > .omm-button, .omm .omm-action-buttons > .omm-trim { display: block; width: 100%; min-width: 0; text-align: center; }
