/* BGPer detail pages (people, single tools, document lists, sessions; page-detail.php).
   Loaded after bgper-home.css, whose base, card, window and reveal styles it reuses.
   Same frame as the other inner pages: content right under the page hero, 88px (64px phone) above the footer.
   Radius: cards 12px, tiles and controls 8px / 6px. */

.d-page { padding: 0 0 88px; }
.d-page .d-label { margin: 0; font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.d-page a:not(.btn):not(.link):not(.d-file-title):not(.d-shot) { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.d-page a:not(.btn):not(.link):not(.d-file-title):not(.d-shot):hover { text-decoration-color: currentColor; }

/* ---------- person: profile card beside the sections ---------- */
.d-person-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 64px; align-items: start; }
.d-profile { position: sticky; top: calc(var(--nav-h) + 32px); padding: 0; }
.admin-bar .d-profile { top: calc(var(--nav-h) + 64px); }
.d-photo { margin: 0; aspect-ratio: 4 / 5; background: var(--bone); border-bottom: 1px solid var(--line); overflow: hidden; }
.d-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.d-profile-body { display: grid; gap: 10px; padding: 24px; }
.d-page .d-name { font: 600 28px/1.1 var(--display); letter-spacing: -0.035em; }
.d-page .d-org { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 15px; }
.d-org i { font-size: 17px; }

.d-person-main { display: grid; gap: 56px; }
.d-page .d-sec-title { padding-bottom: 16px; margin-bottom: 24px !important; border-bottom: 1px solid var(--ink); font: 600 22px/1.2 var(--display); letter-spacing: -0.02em; }
.d-sec p { max-width: 65ch; margin: 0; color: var(--text); font-size: 17px; line-height: 1.75; }
.d-sec p + p { margin-top: 16px; }
.d-sec .d-timeline + p { margin-top: 24px; }

/* dated Bio lines: date on the left, a dot on the rule, the role on the right */
.d-timeline { position: relative; list-style: none; margin: 0; padding: 0; }
.d-timeline::before { content: ""; position: absolute; left: 180px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.d-timeline li { position: relative; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 0 32px; padding: 10px 0; }
.d-timeline li::before {
  content: ""; position: absolute; left: 180px; top: 19px; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink);
}
.d-timeline li:last-child::before { background: var(--ink); }
.d-when { padding-top: 3px; font: 400 13px/1.5 var(--mono); color: var(--muted); white-space: nowrap; }
.d-what { font-size: 17px; line-height: 1.6; color: var(--ink); }

/* ---------- tool: intro beside the facts card, then the screenshot ---------- */
.d-tool-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; }
.d-intro p { margin: 0; max-width: 62ch; color: var(--muted); font-size: 17px; line-height: 1.75; }
.d-intro p:first-child { color: var(--ink); font-size: clamp(18px, 1.7vw, 22px); line-height: 1.5; letter-spacing: -0.01em; }
.d-intro p + p { margin-top: 20px; }
.d-facts { display: grid; gap: 20px; padding: 24px; }
.d-page .d-url { display: grid; gap: 6px; margin: 0; }
.d-url span { font: 400 13px/1 var(--mono); color: var(--muted); }
.d-page .d-url a { font: 500 16px/1.3 var(--mono); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.d-page .d-url a:hover { color: var(--accent); }
.d-open { justify-content: center; }
.d-page .d-points { list-style: none; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.d-points li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-size: 15px; line-height: 1.5; color: var(--text); }
.d-points i { margin-top: 3px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; background: var(--blue-bg); color: var(--accent); font-size: 11px; }
.d-points a { overflow-wrap: anywhere; }

.d-shot { position: relative; display: block; margin-top: 56px; border-radius: 12px; background: var(--surface); transition: box-shadow .3s var(--ease), transform .5s var(--ease); }
.d-shot:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.d-shot .window-bar b { transition: background .3s; }
.d-shot:hover .window-bar b:nth-child(1) { background: #ff5f57; }
.d-shot:hover .window-bar b:nth-child(2) { background: #febc2e; }
.d-shot:hover .window-bar b:nth-child(3) { background: #28c840; }
.d-shot-img { display: block; overflow: hidden; background: var(--bone); }
.d-shot-img img { width: 100%; height: auto; }

/* ---------- document rows (doc lists, session files) ---------- */
.d-docs-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.d-count { margin: 0; font: 400 13px/1.4 var(--mono); color: var(--muted); }
.d-count b { font-weight: 500; color: var(--ink); }
.d-page .d-files { list-style: none; margin: 0; padding: 0; }
.d-file {
  position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 20px; gap: 20px; align-items: center;
  padding: 18px 12px; margin: 0 -12px; border-radius: 8px; transition: background .2s;
}
/* same row as the Documents page (.docs-row in bgper-inner.css); the rule between rows stays on the
   column edges while the hover fill reaches past them */
.d-file::before { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 1px; background: var(--line); }
.d-file:hover::before { opacity: 0; }
.d-file:hover { background: var(--bone); }
.d-badge {
  position: relative; width: 34px; height: 42px; display: grid; place-items: end center; padding-bottom: 7px;
  border: 1px solid var(--line); border-radius: 4px 10px 4px 4px; background: var(--surface);
  font: 500 11px/1 var(--mono); letter-spacing: 0; color: var(--red);
}
.d-badge::before { content: ""; position: absolute; top: -1px; right: -1px; width: 10px; height: 10px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0 10px 0 3px; background: var(--bone); }
.d-badge::after { content: ""; position: absolute; left: 7px; right: 9px; top: 12px; height: 9px; background: repeating-linear-gradient(var(--line) 0 1px, transparent 1px 4px); }
.d-file-body { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.d-tag { font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
/* the title link covers the whole row; the author link sits above it */
.d-file-title { font: 500 16px/1.4 var(--sans); color: var(--ink); }
.d-file-title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.d-file-title:focus-visible { outline: none; }
.d-file:has(.d-file-title:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.d-by { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 2px; font-size: 13px; color: var(--muted); }
.d-by i { font-size: 15px; margin-right: -6px; }
.d-by-name { color: var(--ink); font-weight: 500; }
.d-by-name a { position: relative; z-index: 1; }
.d-by-org::before { content: ""; display: inline-block; width: 1px; height: 12px; margin-right: 12px; vertical-align: -1px; background: var(--line); }
.d-date { font: 400 13px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.d-go { font-size: 16px; color: var(--muted); transition: transform .3s var(--ease), color .2s; }
.d-file:hover .d-go { color: var(--accent); transform: translate(2px, -2px); }

/* ---------- session: one agenda card, the files at its foot ---------- */
.d-session-grid { max-width: 880px; }
.d-agenda { padding: 40px; }
.d-agenda-head { display: grid; gap: 14px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.d-page .d-session-title { font: 600 clamp(24px, 2.4vw, 28px)/1.2 var(--display); letter-spacing: -0.035em; }
.d-page .d-session-date { display: flex; align-items: center; gap: 8px; margin: 0; font: 400 14px/1 var(--mono); color: var(--muted); }
.d-session-date i { font-size: 16px; }
.d-items { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.d-items > li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 20px; padding: 20px 0; }
.d-items > li + li { border-top: 1px solid var(--line); }
.d-n { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--bone); box-shadow: inset 0 0 0 1px var(--line); font: 500 13px/1 var(--mono); color: var(--ink); }
.d-page .d-item-title { margin: 5px 0 0; font: 500 16px/1.5 var(--sans); color: var(--ink); }
.d-page .d-subs { list-style: none; margin: 14px 0 0; padding: 0 0 0 16px; border-left: 1px solid var(--line); display: grid; gap: 12px; }
.d-subs li { display: grid; gap: 4px; font-size: 15px; line-height: 1.5; color: var(--text); }
.d-speaker { display: block; font-size: 13px; color: var(--muted); }
.d-speaker i { margin-right: 6px; font-size: 14px; vertical-align: -2px; }
.d-page .d-files-side { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.d-files-side .d-file { grid-template-columns: 40px minmax(0, 1fr) 20px; }
.d-files-side .d-file:last-child::before { display: none; }

@media (max-width: 960px) {
  .d-person-grid, .d-tool-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .d-profile { position: static; }
  .d-profile { display: grid; grid-template-columns: 160px minmax(0, 1fr); align-items: center; }
  .d-photo { height: 100%; aspect-ratio: auto; min-height: 190px; border-bottom: 0; border-right: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .d-page { padding-bottom: 64px; }
  .d-profile { grid-template-columns: 112px minmax(0, 1fr); }
  .d-photo { min-height: 140px; }
  .d-profile-body { padding: 18px; }
  .d-page .d-name { font-size: 22px; }
  .d-sec p, .d-intro p, .d-what { font-size: 16px; }
  .d-timeline::before, .d-timeline li::before { display: none; }
  .d-timeline li { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
  .d-timeline li:first-child { border-top: 0; padding-top: 0; }
  .d-shot { margin-top: 40px; }
  .d-file { grid-template-columns: 34px minmax(0, 1fr); gap: 14px; align-items: start; }
  .d-file .d-date { grid-column: 2; margin-top: -6px; }
  .d-file .d-go, .d-files-side .d-go { display: none; }
  .d-files-side .d-file { grid-template-columns: 34px minmax(0, 1fr); }
  .d-agenda { padding: 24px 20px; }
  .d-items > li { grid-template-columns: 28px minmax(0, 1fr); gap: 14px; }
  .d-n { width: 28px; height: 28px; font-size: 12px; }
  .d-page .d-item-title { margin-top: 3px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .d-shot, .d-shot:hover { transition: none; transform: none; }
}
