.pr {
  --pr-ink: #242820;
  --pr-muted: #60645a;
  --pr-border: #dedfd6;
  --pr-paper: #fffefa;
  --pr-orange: #dc572b;
  --pr-green: #46634b;
  color: var(--pr-ink);
  container-type: inline-size;
  width: 100%;
}
.pr *, .pr *::before, .pr *::after { box-sizing: border-box; }
.pr h1, .pr h2, .pr p { margin: 0; }
.pr button { font: inherit; cursor: pointer; }
.pr button:focus-visible { outline: 3px solid #9e461e; outline-offset: 3px; }
.pr-header, .pr-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.pr-header { flex-wrap: wrap; margin-bottom: 1.45rem; }
.pr-header h1 {
  color: var(--pr-ink);
  font-size: clamp(2.15rem, 5vw, 3.1rem);
  font-weight: 720;
  letter-spacing: -.055em;
  line-height: 1.04;
}
.pr-header p, .pr-card header p {
  font-size: .9rem;
  font-weight: 450;
  line-height: 1.5;
  color: var(--pr-muted);
}
.pr-header p { margin-top: .45rem; }
.pr-range {
  flex: none;
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--pr-border);
  border-radius: 14px;
  background: #eeefe8;
}
.pr-range button {
  min-height: 44px;
  padding: .35rem .95rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--pr-muted);
  font-size: .88rem;
  font-weight: 600;
}
.pr-range button[aria-pressed="true"] {
  background: var(--pr-ink);
  color: white;
}
.pr-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1rem;
  padding: 1.2rem 0;
  border: 1px solid #d8ddcd;
  border-radius: 20px;
  background: #edf0e5;
}
.pr-summary section {
  min-width: 0;
  padding: 0 clamp(.9rem, 3.5vw, 2.15rem);
}
.pr-summary section + section { border-left: 1px solid #cdd4c2; }
.pr-summary h2 { font-size: .9rem; font-weight: 620; line-height: 1.35; }
.pr-summary p { margin: .5rem 0 .25rem; line-height: 1.1; overflow-wrap: anywhere; }
.pr-summary strong {
  font-size: clamp(1.75rem, 4.7vw, 2.65rem);
  font-weight: 680;
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
}
.pr-summary p span, .pr-summary small {
  color: #535e4d;
  font-size: .82rem;
  line-height: 1.4;
}
.pr-charts { display: grid; gap: 1rem; }
.pr-card, .pr-records {
  min-width: 0;
  padding: clamp(1rem, 3.5vw, 1.6rem);
  border: 1px solid var(--pr-border);
  border-radius: 20px;
  background: var(--pr-paper);
}
.pr-card header { min-height: 44px; align-items: flex-start; }
.pr-card h2, .pr-records h2 {
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  font-weight: 670;
  letter-spacing: -.04em;
  line-height: 1.25;
}
.pr-card header p { margin-top: .25rem; }
.pr-swatch { width: 1.7rem; height: .4rem; margin-top: .65rem; border-radius: 4px; background: var(--pr-orange); }
.pr .pr-add-weight {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  min-height: 44px;
  padding: .45rem .8rem;
  border: 1px solid #d4dacd;
  border-radius: 12px;
  background: #f1f4eb;
  color: #345139;
  font-size: .88rem;
  font-weight: 640;
}
.pr-icon { display: block; flex: none; }
.pr-add-weight .pr-icon { width: 15px; height: 15px; }
.pr-empty {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .7rem;
  min-height: 11rem;
  margin-top: 1.1rem;
  padding: 1.25rem;
  border-radius: 13px;
  background: #f8f6ef;
  color: var(--pr-muted);
  text-align: center;
}
.pr-empty-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f8e8d8;
  color: #a24823;
}
.pr-weight .pr-empty { background: #f5f6ef; }
.pr-weight .pr-empty-symbol { background: #e4eadc; color: var(--pr-green); }
.pr-empty p { max-width: 24ch; font-size: .9rem; line-height: 1.45; }
.pr-chart {
  display: grid;
  grid-template-columns: max-content 1fr;
  grid-template-rows: 9rem auto;
  gap: .85rem .65rem;
  margin: 1.8rem 0 .1rem;
}
.pr-y-axis { position: relative; min-width: 4.5ch; color: var(--pr-muted); font-size: .78rem; }
.pr-y-axis span { position: absolute; right: 0; transform: translateY(-50%); }
.pr-plot {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.pr-rule { width: 100%; border-top: 1px dashed var(--pr-border); }
.pr-rule:nth-child(3) { border-top-style: solid; }
.pr-bar {
  display: block;
  position: absolute;
  bottom: 0;
  min-height: 2px;
  transform: translateX(-50%);
  border-radius: 4px 4px 0 0;
  background: var(--pr-orange);
}
.pr-weight-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pr-weight-line path { fill: none; stroke: var(--pr-green); stroke-width: 2.5; stroke-linecap: round; }
.pr-point {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--pr-green);
}
.pr-x-axis {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  color: var(--pr-muted);
  font-size: .78rem;
}
.pr-records { margin-top: 1rem; }
.pr-records h2 { margin-bottom: .8rem; }
.pr-table-wrap { overflow-x: auto; }
.pr-records table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.pr-records th, .pr-records td { padding: .75rem .25rem; text-align: right; line-height: 1.4; }
.pr-records thead th { border-bottom: 1px solid var(--pr-border); color: var(--pr-muted); font-weight: 550; }
.pr-records tbody th { font-weight: 630; }
.pr-records tbody tr + tr { border-top: 1px solid #ebebe2; }
.pr-records tr > :first-child { padding-left: 0; text-align: left; }
.pr-records tr > :last-child { padding-right: 0; }
@container (min-width: 700px) {
  .pr-charts { grid-template-columns: 1fr 1fr; }
}
@container (max-width: 330px) {
  .pr-summary section { padding: 0 .75rem; }
  .pr-card header, .pr-header { gap: .5rem; }
  .pr-records table { font-size: .8rem; }
}
