/* v0.35.0 the personal document twin: the pregnancy twin's layout (.dtwin / .dt-*), inside the personal pages */
.personal-records .ptw { margin-top: 6px; }
.personal-records .ptw-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; }
.personal-records .ptw-back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.personal-records button.ptw-back { border: 0; background: transparent; padding: 0 4px; color: var(--blue, #26736c); cursor: pointer; }

/* the pregnancy twin stacks at 1100 px; this view keeps both panes side by side down to 761 px */
@media (min-width: 761px) {
  .personal-records .ptw .dtwin { grid-template-columns: minmax(0, 1.15fr) minmax(320px, 1fr); }
  .personal-records .ptw .dt-doc { position: sticky; top: 60px; height: calc(100vh - 140px); min-height: 420px; }
}
.personal-records .ptw .dt-tools { flex-wrap: wrap; align-items: center; }
.personal-records .ptw .dt-tools button { min-height: 36px; height: auto; padding: 4px 10px; }
.personal-records .ptw-status { margin: 0; padding: 0 10px; }
.personal-records .ptw-status:empty { display: none; }
.personal-records .ptw-status:not(:empty) { padding: 6px 10px; border-bottom: 1px solid var(--line, #d8e4e0); }

/* the places: rows drawn over the page; the value itself outlined while its row is in focus */
.personal-records .ptw .dt-box { min-height: 0; max-width: none; padding: 0; line-height: 0; white-space: normal; }
.personal-records .ptw .ptw-vbox { position: absolute; border-radius: 2px; pointer-events: none; opacity: 0; }
.personal-records .ptw .dt-box.on .ptw-vbox, .personal-records .ptw .dt-box:hover .ptw-vbox, .personal-records .ptw .dt-box:focus-visible .ptw-vbox {
  opacity: 1; outline: 2px solid var(--blue, #2563eb); outline-offset: 1px; background: rgb(37 99 235 / 0.16); }
.personal-records .ptw .dt-legend { display: inline-flex; flex-wrap: wrap; }
.personal-records .ptw .dt-legend[hidden], .personal-records .ptw .dt-legend [hidden] { display: none; }

/* the values: the owner's cards (personal-records) made compact inside the twin's list */
.personal-records .ptw-panel .dt-sec { padding: 12px 14px; }
.personal-records .ptw-panel .dt-sec > header h2 { margin: 0; font-size: 1.05rem; }
.personal-records .ptw-panel .dm-row .v { overflow-wrap: anywhere; }
.personal-records .ptw-reason { display: block; margin-top: 2px; }
.personal-records .ptw-hint { margin: 0 0 8px; }
.personal-records .ptw-values > .dv { padding: 10px 12px; border-left-width: 4px; scroll-margin: 96px; }
.personal-records .ptw-values > .dv:focus { outline: 2px solid var(--focus, #2563eb); outline-offset: 2px; }
.personal-records .ptw-values .pr-result { margin: 0; padding: 0; border: 0; background: transparent; }
.personal-records .ptw-values .pr-result-head { flex-wrap: nowrap; gap: 10px; }
.personal-records .ptw-values .pr-result-head > div:first-child { min-width: 0; }
.personal-records .ptw-values .pr-result h3 { font-size: 1rem; margin: 0 0 2px; }
.personal-records .ptw-values .pr-number { font-size: 1.35rem; }
.personal-records .ptw-values .pr-status, .personal-records .ptw-values .pr-reference { font-size: .75rem; padding: 3px 7px; white-space: nowrap; }
.personal-records .ptw-values .pr-result > p { margin: 3px 0; font-size: .92rem; }
.personal-records .ptw-values .pr-result > p.pr-needs-check { margin: 6px 0; font-size: .88rem; }
.personal-records .ptw-values .pr-result details { margin: 2px 0; }
.personal-records .ptw-values .pr-result summary { min-height: 34px; padding: 6px 0; font-size: .9rem; }
.personal-records .ptw-values .pr-actions { margin: 6px 0 0; gap: 5px; }
.personal-records .ptw-values .pr-actions button { min-height: 36px; padding: 4px 8px; font-size: .86rem; }
.personal-records .ptw-values > .dv.ptw-located { cursor: default; }
.personal-records .ptw-where { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 0; color: var(--pr-muted); }
.personal-records .ptw-where.ptw-none { display: block; color: var(--ink, #283c3b); padding: 6px 9px; border: 1px dashed var(--line-strong, #9fb3ad); border-radius: 8px; }
.personal-records .ptw-dot { display: inline-block; width: 14px; height: 9px; border: 1.5px solid var(--blue, #2563eb); border-radius: 2px; }
.personal-records .ptw-dot.model { border-style: dashed; }
.personal-records .ptw-where .ptw-show { min-height: 30px; padding: 2px 9px; font-size: .82rem; }
.personal-records .ptw-above { display: none; }
.personal-records .ptw-codes { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 0; }
.personal-records .ptw-chip { display: inline-block; padding: 2px 7px; border: 1px solid var(--line, #d8e4e0); border-radius: 999px;
  background: var(--canvas-alt, #f2f5f4); color: var(--pr-muted); font-size: .75rem; line-height: 1.5; }

/* narrow screens: the document first, its values below; a value tap brings its place into view */
@media (max-width: 760px) {
  .personal-records .ptw .dtwin { grid-template-columns: minmax(0, 1fr); }
  .personal-records .ptw .dt-doc { position: static; height: 62vh; min-height: 320px; scroll-margin-top: 96px; }
  .personal-records .ptw .dt-legend { display: inline-flex; margin-left: 0; width: 100%; }
  .personal-records .ptw-side { display: none; }
  .personal-records .ptw-above { display: inline; }
  .personal-records .ptw-values > .dv.ptw-located { cursor: pointer; }
}
@media (prefers-reduced-motion: reduce) {
  .personal-records .ptw .dt-box, .personal-records .ptw .ptw-vbox { transition: none; }
}
