.pp {
  --pp-line: #d4dcd1;
  --pp-ink: #203c31;
  color: var(--pp-ink);
  width: 100%;
}
.pp-layout {
  display: grid;
  grid-template-columns: minmax(0,1.45fr) minmax(18rem,1fr);
  gap: 1rem;
  align-items: start;
}
.pp-figure, .pp-controls, .pp-report {
  min-width: 0;
  background: white;
  padding: clamp(.95rem, 2vw, 1.5rem);
  border: 1px solid var(--pp-line);
  border-radius: 14px;
}
.pp h2, .pp h3 { line-height: 1.2; letter-spacing: -.035em; margin: 0; }
.pp h2 { font-size: clamp(1.2rem, 2.6vw, 1.55rem); }
.pp h3 { font-size: 1.05rem; margin: 1.2rem 0 .55rem; }
.pp p, .pp li { line-height: 1.55; }
.pp-title, .pp-plotbar, .pp-legend, .pp-zoom, .pp-selectcut { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .8rem; }
.pp-title, .pp-plotbar { justify-content: space-between; }
.pp-live { padding: .25rem .6rem; border-radius: 20px; font-weight: 650; font-size: .75rem; background: #e9f0e2; }
.pp-live[data-invalid] { background: #f7e7d2; color: #743f1b; }
.pp-canvas {
  border: 1px solid #d9ded3;
  border-radius: 10px;
  background: #f7f8f2;
  margin: .9rem 0 .65rem;
  width: 100%;
  height: clamp(240px, 37vw, 415px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.pp-canvas svg { display: block; width: 100%; height: 100%; max-width: none; }
.pp-plotbar { gap: .4rem; }
.pp-legend { gap: .25rem .65rem; font-size: .78rem; }
.pp-legend span { display: inline-flex; gap: .3rem; align-items: center; }
.pp-legend i { height: .72rem; width: .86rem; border: 1px solid #5e6256; border-radius: 2px; }
.pp-zoom { flex-wrap: nowrap; gap: .12rem; }
.pp-zoom button, .pp-jump {
  background: #fff; color: #294b38; border: 1px solid #bdc7b9;
  font: inherit; cursor: pointer; border-radius: .45rem; min-height: 42px;
}
.pp-zoom button { padding: .28rem .45rem; min-width: 38px; font-size: .88rem; }
.pp-zoom button[aria-pressed=true] { background: #294b38; border-color: #294b38; color: white; }
.pp-caption, .pp-sources p, .pp-notes, .pp-note { color: #536259; font-size: .88rem; }
.pp-caption { margin: .55rem 0 0; }
.pp-jump { display:none; }
.pp-fields, .pp-custom { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem .65rem; }
.pp-fields { margin: 1rem 0 .6rem; }
.pp-custom[hidden], .pp-alt[hidden] { display: none; }
.pp-wide { grid-column: 1 / -1; }
.pp-field { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: .3rem; font-size: .85rem; font-weight: 650; }
.pp-field select, .pp-input, .pp-selectcut select { width: 100%; min-width: 0; border: 1px solid #a6b5a6; background: white; border-radius: 8px; }
.pp-field select, .pp-input input, .pp-selectcut select { font: inherit; font-weight: 500; font-size: 16px; min-height: 44px; color: #263e31; }
.pp-field select, .pp-selectcut select { padding: .5rem .45rem; }
.pp-input { display: flex; align-items: center; gap: .3rem; padding: 0 .55rem; box-sizing: border-box; }
.pp-input input { width: 100%; min-width: 0; flex: 1; border: none; background: none; padding: .3rem 0; }
.pp-input:focus-within { outline: 2px solid #3c674c; outline-offset: 1px; }
.pp-input input:focus-visible { outline: none; }
.pp-input input[aria-invalid=true] { color: #973a24; }
.pp-input > span { font-size: .8rem; color: #5a655b; }
.pp #pp-error { margin: .4rem 0; color: #883717; font-size: .91rem; }
.pp #pp-error:empty { display: none; }
.pp-sources, .pp-notes, .pp-cuts { margin-top: .85rem; }
.pp summary { color: var(--pp-ink); font-weight: 650; cursor: pointer; min-height: 42px; padding: .6rem 0; }
.pp-sources a, .pp-notes a { color: #274c37; text-decoration: underline; text-underline-offset: .13em; overflow-wrap: anywhere; }
.pp-report { margin: 1rem 0; }
.pp-metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,9rem),1fr)); gap: .5rem; margin: .85rem 0 1rem; }
.pp-metrics div { background: #f0f3e9; border-radius: 9px; padding: .65rem .8rem; }
.pp-metrics dt { font-size: .78rem; color: #4c5c50; }
.pp-metrics dd { margin: .2rem 0 0; font-weight: 720; font-size: 1rem; }
.pp-table { width: 100%; overflow-x: auto; }
.pp table { width: 100%; border-collapse: collapse; font-size: .87rem; text-align: left; }
.pp th, .pp td { border-bottom: 1px solid var(--pp-line); padding: .55rem .4rem; vertical-align: top; }
.pp th { font-weight: 650; background: #f5f6ef; }
.pp .pp-num { text-align: right; font-variant-numeric: tabular-nums; }
.pp .pp-cuts { padding: .15rem .75rem; background: #f5f6ef; border-radius: .45rem; }
.pp-selectcut { justify-content: flex-start; }
.pp-selectcut select { width: auto; max-width: 100%; }
.pp-examples { margin-top: .75rem; }
.pp-examples p { color: #526456; margin: 0 0 .5rem; font-size: .85rem; }
.pp-examples > div { display: flex; gap: .4rem; flex-wrap: wrap; }
.pp-examples button, .pp-cutjump { border: 1px solid #a6b5a6; border-radius: 8px; min-height: 44px; padding: .45rem .7rem; background: #f5f7ef; color: #294b38; font: inherit; font-size: .86rem; font-weight: 650; cursor: pointer; }
.pp-cutjump { margin-bottom: .7rem; }
.pp-selector-report { overflow-wrap: anywhere; }
.pp :focus-visible { outline: 3px solid #3f6c4f; outline-offset: 2px; }
@media (max-width: 790px) {
  .pp-layout { grid-template-columns: 1fr; }
  .pp-jump { display: inline-block; margin-top: .65rem; padding: .5rem .7rem; font-size: .85rem; font-weight: 650; }
  .pp [data-pp-form], .pp [data-pp-canvas] { scroll-margin-top: 14px; }
}
@media(max-width: 400px) {
  .pp-fields { gap: .65rem .4rem; }
  .pp-field { font-size: .8rem; }
  .pp table { font-size: .78rem; }
  .pp th, .pp td { padding: .45rem .25rem; }
}

