.ce-panel { display: grid; gap: 1rem; min-width: 0; padding: .85rem clamp(.75rem,2vw,1.25rem); color: var(--body); font-variant-numeric: tabular-nums; }
.ce-ledger { display: grid; min-width: 0; gap: .58rem; }
.ce-head { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .95rem; }
.ce-head { justify-content: space-between; }
.ce-head h3 { margin: 0; font-size: 1.15rem; }
.ce-panel label { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .45rem; color: var(--slate); font-size: .84rem; font-weight: 600; }
.ce-panel select { min-height: 2.15rem; max-width: 100%; padding: .25rem .45rem; border: 1px solid var(--line-strong); border-radius: .35rem; background: #fff; color: var(--navy); font-size: .88rem; }
.ce-dimensions { display: flex; flex-wrap: wrap; gap: .35rem; }
.ce-dimensions button { min-height: 2.25rem; padding: .25rem .65rem; border: 1px solid var(--line-strong); border-radius: .32rem; background: var(--surface); color: var(--slate); font-size: .87rem; font-weight: 580; }
.ce-dimensions button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.ce-headline { color: var(--navy); font-weight: 650; }
.ce-chart { display: grid; gap: .32rem; }
.ce-chart-row { display: grid; width: 100%; gap: .35rem; min-height: 3.65rem; padding: .5rem .65rem .6rem; border: 1px solid transparent; border-radius: .4rem; background: transparent; text-align: left; }
.ce-chart-row[aria-pressed="true"] { background: #f0f5fb; border-color: #8da7bf; box-shadow: inset 3px 0 0 #31597c; }
.ce-chart-row:hover { border-color: #bdcedf; }
.ce-row-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .1rem .5rem; color: var(--navy); font-size: .9rem; }
.ce-row-head > span { color: var(--slate); font-size: .81rem; }
.ce-track { position: relative; display: flex; width: 100%; height: 1.23rem; overflow: hidden; border-radius: .17rem; background: #f0f2f5; }
.ce-paid { background: #304c70; }
.ce-free { background: #6292c2; }
.ce-service { background: #a5b3c1; }
.ce-profit { background: repeating-linear-gradient(135deg, #307b68 0 5px, #64a894 5px 8px); }
.ce-loss-key { background: repeating-linear-gradient(-45deg, #774a45 0 2px, #f0dfdc 2px 4px); }
.ce-loss { position: absolute; top: 0; bottom: 0; border-left: 2px solid #842f27; background: repeating-linear-gradient(-45deg, #9f4c44b8 0 3px, #fff9 3px 6px); }
.ce-legend { display: grid; grid-template-columns: minmax(0,3fr) minmax(7rem,1fr); gap: .4rem 1rem; margin-top: .1rem; padding: .6rem .75rem .7rem; border: 1px solid var(--line); border-radius: .4rem; }
.ce-legend-title { grid-column: 1/-1; color: var(--navy); font-size: .92rem; }
.ce-key-head { display: block; margin-bottom: .24rem; color: var(--slate); font-weight: 600; font-size: .79rem; }
.ce-result-block { padding-left: .8rem; border-left: 1px solid var(--line-strong); }
.ce-legend dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0; gap: .4rem; }
.ce-legend .ce-result { grid-template-columns: 1fr; }
.ce-legend dt { display: flex; align-items: baseline; gap: .36rem; color: var(--slate); font-size: .86rem; line-height: 1.3; }
.ce-legend dd { margin: .18rem 0 0 .98rem; color: var(--navy); font-size: 1rem; font-weight: 700; }
.ce-key { display: inline-block; flex-shrink: 0; width: .65rem; height: .65rem; border-radius: .1rem; }
.ce-table-wrap { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; margin-top: .3rem; }
.ce-panel table { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.35; }
.ce-panel th, .ce-panel td { padding: .45rem .6rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.ce-panel th:first-child { text-align: left; }
.ce-panel thead th { color: var(--slate); font-size: .79rem; font-weight: 600; }
.ce-panel tbody th { font-weight: 550; }
.ce-ledger tfoot { color: var(--navy); font-weight: 700; background: #eef4fb; }
.ce-detail p { color: var(--slate); font-size: .88rem; }
.ce-detail summary { width: fit-content; color: var(--blue-dark); cursor: pointer; font-size: .91rem; font-weight: 650; }
.ce-details-body { display: grid; min-width: 0; gap: .65rem; margin-top: .65rem; padding: .75rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--surface-soft); }
@media (max-width: 40rem) {
  .ce-panel td, .ce-panel th { padding: .4rem .32rem; font-size: .82rem; }
  .ce-dimensions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .25rem; }
  .ce-legend { grid-template-columns: 1fr; gap: .45rem; }
  .ce-legend dl { grid-template-columns: 1fr; }
  .ce-legend dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
  .ce-legend dd { margin: 0; }
  .ce-result-block { padding: .35rem 0 0; border: 0; border-top: 1px solid var(--line); }
}
