/* Economics panel (#34): cards, statement lines and the pages HQ opens (money history, ledger). Charts: charts.js. */
.panel-body.economics { container-type: inline-size; }
.eco-main { display: grid; gap: 16px; min-width: 0; }
.eco-slot { min-width: 0; }
.eco-card { min-width: 0; }
.eco-card p, .economics p { margin: 0; }
.eco-chart { min-width: 0; }
.eco-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.eco-hr { border: 0; border-top: .5px solid rgba(255,255,255,.14); margin: 0; width: 100%; }
.eco-tip { display: flex; gap: 10px; align-items: flex-start; }
.eco-tip > div { display: grid; gap: 6px; justify-items: start; font-size: 13px; }
.eco-tip .ic { width: 22px; flex: none; color: var(--teal); }
.eco-tip .ic.good { color: var(--good); } .eco-tip .ic.warn { color: var(--accent); }
.eco-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 15px; }
.eco-line.bold { font-weight: 700; }
.eco-line.small { font-size: 13px; color: rgba(235,235,245,.6); }
.eco-line .lbl { display: inline-flex; align-items: center; gap: 8px; }
.eco-line .r { display: inline-flex; gap: 8px; align-items: baseline; }
.eco-line .r em { font-style: normal; width: 42px; text-align: right; font-size: 12px; color: rgba(235,235,245,.6); }
.eco-row { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.eco-row > span { color: rgba(235,235,245,.6); }
.eco-head { font-size: 11px; font-weight: 700; color: rgba(235,235,245,.6); letter-spacing: .02em; }
.eco-head.big { font-size: 13px; text-transform: uppercase; }
.economics .good { color: var(--good); } .economics .bad { color: var(--stamp); }
.eco-line b.bad { color: #FF453A; }
.eco-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.eco-big .din { font-size: 32px; line-height: 1.1; }
.eco-grow { display: flex; align-items: center; gap: 8px; }
.eco-growth, .eco-change { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(52,199,89,.16); }
.eco-growth.bad { background: rgba(232,85,62,.16); }
.eco-change { background: none; padding: 0; margin-left: auto; font-size: 13px; }
.eco-part { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.eco-part i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.eco-part > span, .eco-part .lbl { flex: 1; display: inline-flex; align-items: center; gap: 8px; }
.eco-part > div { display: grid; justify-items: end; gap: 1px; }
.eco-part > div .eco-change { margin: 0; font-size: 12px; }
.eco-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 2px; border-radius: 9px; background: rgba(0,0,0,.28); margin-bottom: 4px; }
.eco-seg button { padding: 6px 4px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--ink); }
.eco-seg button.on { background: rgba(243,235,216,.2); }
.eco-biz { display: flex; align-items: center; gap: 10px; }
.eco-biz .t { flex: 1; display: grid; gap: 2px; min-width: 0; }
.eco-biz .v { display: grid; justify-items: end; gap: 2px; }
.eco-biz .v .din { font-size: 17px; }
.eco-biz.small { font-size: 15px; } .eco-biz.small > span { flex: 1; }
.eco-fi { position: relative; display: inline-grid; place-items: center; flex: none; color: var(--accent); }
.eco-fi .fb { display: grid; place-items: center; }
.eco-fi img { position: absolute; inset: 0; background: var(--paper); }
.eco-daily-head { display: grid; grid-template-columns: 1fr 80px 80px; gap: 6px; font-size: 12px; color: rgba(235,235,245,.6); }
.eco-daily-head > span:not(:first-child) { text-align: right; }
.eco-day { border-top: .5px solid rgba(255,255,255,.12); }
.eco-day summary { display: grid; grid-template-columns: 1fr 80px 80px; gap: 6px; padding: 10px 0; cursor: pointer; list-style: none; font-size: 15px; }
.eco-day summary::-webkit-details-marker { display: none; }
.eco-day summary > :not(:first-child) { text-align: right; }
.eco-dayrow { display: grid; grid-template-columns: 20px 1fr 80px 80px; gap: 6px; align-items: center; padding: 4px 0 8px; font-size: 13px; }
.eco-dayrow > :nth-child(n+3) { text-align: right; }
.eco-linkcard { display: grid; gap: 12px; text-align: left; width: 100%; color: inherit; }
.eco-top { display: flex; justify-content: space-between; }
.eco-more { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--accent); }
.eco-bar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; }
.eco-bar i { min-width: 3px; }
.eco-bank { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 10px; border-radius: 10px; background: rgba(243,235,216,.06); color: inherit; }
.eco-bank > span { flex: 1; display: grid; gap: 2px; } .eco-bank .sf:first-child { color: var(--accent); }
.eco-bottom { display: flex; justify-content: space-between; align-items: center; }
@container (min-width: 760px) {
  .eco-main { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

/* Capacity card: a row per step (name, rate, full-width bar), wrapping at any text size */
.eco-caps { display: grid; gap: 12px; }
.eco-cap { display: grid; gap: 6px; min-height: 44px; align-content: center; font-size: 14px; }
.eco-cap .top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 8px; }
.eco-cap .nm { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.eco-cap .lbl { font-weight: 600; overflow-wrap: anywhere; }
.eco-cap .rate { color: rgba(235,235,245,.7); }
.eco-cap .tag { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--stamp); color: #000; }
.eco-cap.bn .rate { color: var(--stamp); font-weight: 700; }
.eco-cap .track { display: block; height: 10px; border-radius: 5px; background: rgba(243,235,216,.14); overflow: hidden; }
.eco-cap .track i { display: block; height: 100%; min-width: 10px; border-radius: 5px; background: rgba(63,167,160,.7); }
.eco-cap.bn .track { height: 14px; border-radius: 7px; }
.eco-cap.bn .track i { background: var(--stamp); }
.eco-supply { color: var(--accent); font-weight: 600; font-size: 14px; }
