/* At-a-glance card (design 025). Mobile-first: 44px copy targets on a phone,
   tightened only on desktop inside the 900px query. Values are the point, so
   they read large and monospaced; the copy button sits beside each. */

.glance-intro { margin: 0 0 1rem; line-height: 1.5; }

.glance { display: flex; flex-direction: column; gap: 1rem; }

.glance-card { padding: 1rem 1.1rem; }

.glance-person {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.3rem;
  color: var(--navy);
  margin: 0 0 0.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--line);
}

/* The per-person "what is missing" line — the whole At a glance question,
   answered without a click, from the same identity_sheet() the person page
   renders. Names the gaps (never counts them); clipped to one line so six
   people never become a wall of text on a 320px screen. Links to the sheet. */
.glance-missing {
  /* Up to two lines, then clamp — so "and N more" always shows but one person's
     gaps never run to a third line (owner's rule). */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
}
.glance-missing:hover, .glance-missing:focus { text-decoration: underline; }
.glance-missing.is-complete { color: var(--green); font-weight: 700; }

/* The completeness sheet on the card (design 029): ONE native <details>,
   collapsed by default, so a complete person reads as a short card while the
   detail is a tap away. The Missing line above stays the always-visible index.
   No JS, works on a phone. */
.glance-sheet { margin: 0 0 0.9rem; border-top: 1px solid var(--line); }
.glance-sheet > summary.glance-sheet-summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}
.glance-sheet > summary.glance-sheet-summary::-webkit-details-marker { display: none; }
.glance-sheet > summary.glance-sheet-summary::before {
  content: "▸";
  font-size: 0.8rem;
  transition: transform 0.12s ease;
}
.glance-sheet[open] > summary.glance-sheet-summary::before { transform: rotate(90deg); }
.glance-sheet > summary.glance-sheet-summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* the sheet's own sections (rendered non-collapsible inside the details) */
.glance-sheet .sheet-section:first-of-type { margin-top: 0.2rem; }

.glance-group { margin-top: 0.9rem; }
.glance-group:first-of-type { margin-top: 0.4rem; }

.glance-kind {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

.glance-record {
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}
.glance-record:first-of-type { border-top: 0; padding-top: 0.2rem; }

.glance-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  min-height: 44px;
}
.glance-title:hover span:first-child { text-decoration: underline; }

.glance-values { margin: 0.35rem 0 0; }

.glance-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.4rem 0;
}
.glance-row + .glance-row { border-top: 1px dashed var(--line); }

.glance-row dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.glance-row dd {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: space-between;
}

.glance-val {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  color: var(--ink);
  word-break: break-word;
  overflow-wrap: anywhere;
  flex: 1 1 auto;
}

.glance-copy {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.9rem;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: rgba(201, 162, 39, 0.08);
  color: var(--gold);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.glance-copy:hover { background: rgba(201, 162, 39, 0.16); }
.glance-copy:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.glance-copy.is-copied {
  border-color: var(--green);
  background: rgba(30, 142, 90, 0.1);
  color: var(--green);
}

.glance-empty-row { margin: 0.3rem 0 0; }

@media (min-width: 900px) {
  .glance { display: grid; grid-template-columns: repeat(2, 1fr); align-items: start; }
  .glance-person { font-size: 1.4rem; }
  /* on a pointer device the copy target can relax below the 44px thumb rule */
  .glance-copy { min-height: 32px; }
  .glance-title { min-height: 0; }
}
