/* Scoped analytics workspace: terminal charcoal, amber actions, semantic results. */
.jpd { --jpd-green: #91d3a7; --jpd-red: #ff9b96; --jpd-amber: #efc875; color: var(--ink, #f5f3ed); }
.jpd [id] { scroll-margin-top: 110px; }
.jpd h2, .jpd h3, .jpd p { margin: 0; }
.jpd h2 { font-size: clamp(20px, 2vw, 26px); letter-spacing: -.025em; line-height: 1.25; }
.jpd h3 { font-size: 14px; font-weight: 650; line-height: 1.45; }
.jpd .jpd-positive { color: var(--jpd-green); }
.jpd .jpd-negative { color: var(--jpd-red); }
.jpd .jpd-neutral { color: var(--jpd-amber); }
.jpd :focus-visible { outline: 2px solid var(--data, #f3a84f); outline-offset: 4px; }
.jpd-nav { display: flex; gap: 6px; overflow-x: auto; padding: 18px 0; scrollbar-width: thin; }
.jpd-nav a { font-size: 12px; white-space: nowrap; color: var(--ink-muted, #babdb3); border: 1px solid var(--line, #394030); padding: 9px 13px; border-radius: 5px; }
.jpd-nav a:hover { color: var(--data, #f3a84f); border-color: var(--data, #f3a84f); }
.jpd-filters, .jpd-section { min-width: 0; margin: 0 0 22px; padding: 24px; border: 1px solid var(--line, #394030); border-radius: 10px; background: var(--surface, #20231d); }
.jpd-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.jpd-heading .journal-kicker { margin-bottom: 7px; }
.jpd-heading > span, .jpd-table-heading > span { font-size: 11px; color: var(--ink-muted, #babdb3); }
.jpd-currency { border: 1px solid var(--line, #394030); padding: 6px 10px; border-radius: 5px; }
.jpd-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.jpd-filter-grid label { min-width: 0; display: flex; flex-direction: column; gap: 7px; font-size: 11px; color: var(--ink-muted, #babdb3); }
.jpd-filter-grid :is(input, select) { width: 100%; min-width: 0; min-height: 42px; padding: 9px 10px; background: var(--surface-raised, #191c16); border: 1px solid var(--line, #394030); border-radius: 5px; font-size: 12px; color: var(--ink, #f5f3ed); color-scheme: dark; }
.jpd-filter-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 16px; }
.jpd-filter-footer > div { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.jpd-filter-footer p { max-width: 640px; font-size: 11px; line-height: 1.6; color: var(--ink-muted, #babdb3); }
.jpd .jpd-scope { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-muted, #babdb3); margin-bottom: 14px; }
.jpd-account { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 20px; align-items: center; }
.jpd-account > div { display: flex; flex-direction: column; gap: 7px; }
.jpd-account span { font-size: 11px; color: var(--ink-muted, #babdb3); }
.jpd-account strong { font-size: clamp(24px, 2.5vw, 34px); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.jpd-account b { font-size: 16px; font-variant-numeric: tabular-nums; }
.jpd-account small { color: var(--ink-muted, #babdb3); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.jpd-account + .jpd-note { border-bottom: 1px solid var(--line, #394030); padding: 14px 0 20px; margin: 0 0 20px; }
.jpd-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.jpd-kpi { background: var(--surface-raised, #191c16); border: 1px solid var(--line, #394030); border-radius: 7px; padding: 17px; min-width: 0; }
.jpd .jpd-kpi h3 { font-size: 10px; color: var(--ink-muted, #babdb3); letter-spacing: .04em; text-transform: uppercase; min-height: 15px; font-weight: 500; }
.jpd-kpi > strong { display: block; font-size: clamp(22px, 2.1vw, 29px); font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 8px; letter-spacing: -.025em; }
.jpd-kpi > span { font-size: 10px; color: var(--ink-muted, #babdb3); }
.jpd-kpi-primary { border-top: 3px solid var(--data, #f3a84f); padding-top: 15px; }
.jpd-outcomes { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 18px 0 0; font-size: 11px; font-variant-numeric: tabular-nums; }
.jpd-outcomes > span { white-space: normal; }
.jpd .jpd-note { color: var(--ink-muted, #babdb3); font-size: 11px; line-height: 1.75; margin: 12px 0; }
.jpd-chart-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; margin-bottom: 22px; }
.jpd-chart-card { min-width: 0; padding: 18px; border: 1px solid var(--line, #394030); border-radius: 7px; background: var(--surface-raised, #191c16); }
.jpd-curve { display: block; width: 100%; height: 238px; overflow: visible; }
.jpd-chart-zero { stroke: var(--line, #394030); stroke-width: 1; stroke-dasharray: 5 5; }
.jpd-chart-line { fill: none; stroke: var(--data, #f3a84f); stroke-width: 2.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.jpd-chart-point { fill: var(--data, #f3a84f); opacity: .65; }
.jpd-chart-point:focus, .jpd-chart-point:hover { opacity: 1; r: 5px; }
.jpd-axis-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-muted, #babdb3); }
.jpd-chart-empty { display: grid; place-items: center; min-height: 210px; width: 100%; font-size: 12px; color: var(--ink-muted, #babdb3); text-align: center; }
.jpd-month-bars { display: flex; overflow-x: auto; min-height: 268px; align-items: stretch; gap: 16px; padding: 15px 5px 8px; scrollbar-width: thin; }
.jpd-month { flex: 1 0 65px; display: flex; flex-direction: column; text-align: center; font-size: 10px; font-variant-numeric: tabular-nums; }
.jpd-month-value { height: 25px; white-space: nowrap; font-size: 11px; font-weight: 650; }
.jpd-month-positive, .jpd-month-negative { height: 90px; position: relative; display: flex; justify-content: center; }
.jpd-month-positive { align-items: flex-end; border-bottom: 1px solid var(--line, #394030); }
.jpd-month-negative { align-items: flex-start; margin-bottom: 12px; }
.jpd-month-positive > span, .jpd-month-negative > span { display: block; width: 38px; min-height: 2px; max-height: 100%; }
.jpd-month-positive > span { background: var(--jpd-green); border-radius: 4px 4px 0 0; }
.jpd-month-negative > span { background: var(--jpd-red); border-radius: 0 0 4px 4px; }
.jpd-highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.jpd-highlights > article { border: 1px solid var(--line, #394030); border-radius: 7px; padding: 16px; background: var(--surface-raised, #191c16); min-width: 0; }
.jpd-highlight-row { display: flex; flex-direction: column; gap: 5px; padding-top: 14px; font-size: 12px; overflow-wrap: anywhere; }
.jpd-highlight-row > small { color: var(--ink-muted, #babdb3); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.jpd-highlight-row > strong { font-weight: 550; }
.jpd-highlight-row > span { font-variant-numeric: tabular-nums; }
.jpd-highlight-row span small { color: var(--ink-muted, #babdb3); }
.jpd-highlight-row + .jpd-highlight-row { border-top: 1px solid var(--line, #394030); margin-top: 12px; }
.jpd-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.jpd-table-panel { min-width: 0; border: 1px solid var(--line, #394030); border-radius: 7px; overflow: hidden; background: var(--surface-raised, #191c16); }
.jpd-table-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px; }
.jpd-table-scroll { overflow: auto; max-height: 425px; scrollbar-width: thin; }
.jpd-table { width: 100%; border-collapse: collapse; text-align: right; font-size: 11px; line-height: 1.55; font-variant-numeric: tabular-nums; }
.jpd-table th, .jpd-table td { padding: 11px 12px; border-bottom: 1px solid var(--line, #394030); vertical-align: middle; }
.jpd-table th:first-child { text-align: left; min-width: 120px; max-width: 250px; overflow-wrap: anywhere; }
.jpd-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface, #20231d); font-size: 9px; color: var(--ink-muted, #babdb3); font-weight: 500; white-space: nowrap; }
.jpd-table tbody th { font-weight: 500; }
.jpd-table tbody td { white-space: nowrap; }
.jpd-table tbody td:is(.jpd-positive, .jpd-negative) { font-weight: 650; }
.jpd-table tbody tr:last-child > * { border-bottom: none; }
.jpd-table tbody tr:hover { background: rgba(255,255,255,.025); }
.jpd .jpd-empty { padding: 24px 16px; text-align: left; font-size: 12px; color: var(--ink-muted, #babdb3); white-space: normal; }
.jpd-kpis-secondary .jpd-kpi > strong { font-size: 23px; }
.jpd-records { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.jpd-records > div { padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 8px; border: 1px solid var(--line, #394030); border-radius: 7px; }
.jpd-records span { grid-column: 1/-1; font-size: 10px; color: var(--ink-muted, #babdb3); }
.jpd-records a { font-size: 12px; color: var(--ink, #f5f3ed); text-decoration: underline; text-underline-offset: 3px; }
.jpd-records strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.jpd-details { border-top: 1px solid var(--line, #394030); margin-top: 18px; padding-top: 15px; }
.jpd-details > summary { cursor: pointer; color: var(--ink-muted, #babdb3); font-size: 12px; padding: 7px 0; }
.jpd-details[open] > summary { color: var(--data, #f3a84f); margin-bottom: 14px; }
.jpd-bank-management { margin-bottom: 24px; }
@media (max-width: 1200px) { .jpd-pair { grid-template-columns: 1fr; } .jpd-highlights { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 850px) {
  .jpd-filters, .jpd-section { padding: 18px; }
  .jpd-filter-grid, .jpd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jpd-chart-grid, .jpd-highlights { grid-template-columns: 1fr; }
  .jpd-account { grid-template-columns: repeat(2, 1fr); }
  .jpd-account > div:first-child { grid-column: 1/-1; }
  .jpd-filter-footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 480px) {
  .jpd-filters, .jpd-section { padding: 14px; }
  .jpd-heading { align-items: flex-start; }
  .jpd-kpi { padding: 12px; }
  .jpd-kpi > strong { font-size: 22px; }
  .jpd-records { grid-template-columns: 1fr; }
  .jpd-filter-grid label { font-size: 10px; }
}
