/* Personal history inherits the public site's paper, green and type tokens. */
.personal-history {
  min-width: 0;
  margin-top: 40px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  overflow-wrap: anywhere;
}

.personal-history [hidden] { display: none !important; }
.personal-history .ph-heading { margin: 0 0 20px; font-size: 1.3rem; line-height: 1.5; }
.personal-history .ph-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.personal-history .ph-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--green-deep);
  font: inherit;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.personal-history .ph-button:hover:not([aria-disabled="true"]) { border-color: var(--green); background: var(--mint-soft); }
.personal-history .ph-tab[aria-selected="true"] { border-color: var(--green-deep); background: var(--green-deep); color: var(--paper); }
.personal-history .ph-tab[aria-selected="true"]:hover { background: var(--green); color: var(--paper); }
.personal-history .ph-button[aria-disabled="true"] { color: var(--muted); border-color: var(--line); cursor: default; }
.personal-history :is(button, [tabindex]):focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.personal-history .ph-panel { min-width: 0; padding-top: 20px; }
.personal-history .ph-status { min-height: 1.7em; margin: 0 0 16px; color: var(--muted); font-size: .9rem; line-height: 1.7; }
.personal-history .ph-error { color: var(--danger); }
.personal-history .ph-list { list-style: none; margin: 0; padding: 0; }
.personal-history .ph-row { min-width: 0; padding-block: 24px; border-bottom: 1px solid var(--line); }
.personal-history .ph-row:first-child { padding-top: 8px; }
.personal-history .ph-row-title { max-width: 70ch; margin: 0; font-size: 1rem; font-weight: 650; line-height: 1.6; }
.personal-history .ph-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 8px; color: var(--muted); font-size: .85rem; }
.personal-history .ph-score { margin: 12px 0 0; color: var(--green-deep); font-weight: 650; font-variant-numeric: tabular-nums; }
.personal-history .ph-excerpt { max-width: 70ch; margin: 12px 0; line-height: 1.8; }
.personal-history .ph-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.personal-history .ph-page-text { color: var(--muted); text-align: center; font-size: .9rem; font-variant-numeric: tabular-nums; }

@media (max-width: 440px) {
  .personal-history { margin-top: 32px; padding: 16px 12px; }
  .personal-history .ph-tabs { gap: 6px; }
  .personal-history .ph-tab { flex: 1 1 88px; padding-inline: 8px; }
  .personal-history .ph-pagination { gap: 8px; }
  .personal-history .ph-page-text { flex-basis: 100%; order: -1; text-align: left; }
  .personal-history .ph-pagination .ph-button { flex: 1 1 88px; }
}
