/* The pedigree bracket on the server-rendered pages: EquiMarket's listing and a
   horse's EquiSocial page (#370) link /shell-kit/pedigree.css from their
   base.html. The markup is the Jinja macro in jinja/_pedigree.html; the app's
   own bracket is apps/equidetails_web/src/components/horse/HorsePedigreeCard.tsx.

   ONE piece of markup for both shapes. The tree is a nested list, which is
   what a pedigree actually is; wide screens lay each row out left to right so
   it reads as the bracket everybody knows from a registry paper, and a phone
   drops that rule so the same list indents. Rendering a bracket and a list
   separately would have meant two truths to keep in step and a screen reader
   hearing the pedigree twice. */
.ped-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.ped-title { font-weight: 700; font-size: 15px; }
.ped-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--eqd-brass-text, #8A6A30); border: 1px solid var(--eqd-brass-text, #8A6A30); border-radius: 4px; padding: 1px 7px;
}
/* The bracket fits itself to whatever width it is given and lets the long
   names wrap. The scroll is insurance for a container narrower than three
   legible boxes. */
.ped-scroll { overflow-x: auto; }
.ped-tree, .ped-kids { list-style: none; margin: 0; padding: 0; }
.ped-tree { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ped-li { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
/* Even columns. Left to itself, a nested flex halves the width at every step,
   so the parents got 50% and the great-grandparents 12% and their names broke
   after two letters. The macro weights each level by how many generations it
   still has to hold (an inline flex on .ped-kids), so the columns come out
   equal however deep the bracket goes. */
.ped-kids { display: flex; flex-direction: column; gap: 6px; align-self: stretch; min-width: 0; }
.ped-li > .ped-box { flex: 1 1 0; }
.ped-box {
  min-width: 0; background: var(--eqd-surface, #FFFDF9); border: 1px solid var(--eqd-line, #ded7c9);
  border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; justify-content: center;
}
.ped-name { font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
.ped-meta { font-size: 11.5px; color: var(--eqd-muted, #5C6672); line-height: 1.3; }
/* The registry badge beside the number (#371), on the line with the words. */
.ped-meta .eqd-rbadge { margin: 0 1px 0 2px; }
.ped-check { color: var(--eqd-hunter, #1E4A38); font-size: 11px; margin-left: 4px; cursor: help; }
/* An ancestor with a published page (#354, #369): its picture at the left is the
   link to the page; the name stays words. */
.ped-has-face { flex-direction: row; align-items: center; gap: 8px; }
.ped-face { display: block; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: #8a8579 center / cover no-repeat; }
a.ped-face:hover, a.ped-face:focus-visible { box-shadow: 0 0 0 2px var(--eqd-hunter, #1E4A38); outline: none; }
.ped-words { display: flex; flex-direction: column; min-width: 0; }
.ped-empty { background: none; border-style: dashed; align-items: flex-start; }
.ped-dash { display: block; width: 14px; height: 0; border-top: 2px solid #8a8579; opacity: .6; }
.ped-foot { font-size: 12px; color: var(--eqd-muted, #5C6672); margin: 8px 0 0; max-width: 48ch; }
/* Show more generations, show fewer: quiet links under the bracket. */
.ped-more { display: flex; gap: 14px; margin-top: 8px; font-size: 12.5px; }
.ped-more a { color: var(--eqd-hunter, #1E4A38); text-decoration: underline; text-underline-offset: 2px; }
/* Phone: the same list, indented, sire line first. */
@media (max-width: 640px) {
  .ped-scroll { overflow-x: visible; }
  .ped-tree { min-width: 0; }
  .ped-li { display: block; }
  .ped-kids { display: block; margin: 6px 0 0 6px; border-left: 1px solid var(--eqd-line, #ded7c9); padding-left: 10px; }
  .ped-kids .ped-li + .ped-li { margin-top: 6px; }
  .ped-box { display: block; }
  .ped-has-face { display: flex; }
  /* An indented list has no shape to keep, so an ancestor nobody recorded is
     simply not a line. The placeholder exists to hold a column open in the
     bracket; on a phone it is four blank rows between two real names. */
  .ped-li-empty { display: none; }
}
