/* Lineage: what other languages took from the Perl 6 design (sites/lineage).
   The section's furniture (lg-*): the chapter strip, the chapter list,
   prev/next, the report's wide tables, and the evidence under each claim — a
   numbered marker after a cited link, and "What the sources say" after the
   paragraph or table, giving each source in our words or, where the exact
   wording has been added, as a quotation followed by a summary of the rest. */

.lineage { --lg: var(--hue-lineage); }

/* ---- navigation -------------------------------------------------------- */

.lg-strip { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 1.6rem; font-size: .8rem; }
.lg-strip a { display: inline-block; padding: 2px 8px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.lg-strip a:first-child { font-weight: 600; }
.lg-strip a:hover { color: var(--fg); border-color: var(--muted); }
.lg-strip a[aria-current="page"] { color: var(--fg); border-color: var(--lg); background: color-mix(in srgb, var(--lg) 12%, transparent); font-weight: 650; }

.lg-eyebrow { font-family: var(--f-mono, ui-monospace, Menlo, monospace); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 .3rem; }
.lineage h1 { font-size: 1.9rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 1.2rem; text-wrap: balance; }
.lineage p { max-width: 48rem; }
.lineage .tagline { margin-bottom: 1.4rem; }
.lg-how { border-left: 3px solid var(--lg); padding: .3rem 0 .3rem 1rem; color: var(--muted); }

.lg-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 2px; }
.lg-list a { display: grid; grid-template-columns: 2.2rem 1fr; gap: 2px 10px; padding: 10px 12px; border-radius: 6px; color: var(--fg); text-decoration: none; }
.lg-list a:hover { background: var(--code-bg); }
.lg-list .n { grid-row: span 2; font-size: 1.3rem; font-weight: 700; color: var(--lg); font-variant-numeric: tabular-nums; }
.lg-list .t { font-weight: 650; font-size: 1.02rem; }
.lg-list .b { color: var(--muted); font-size: .9rem; line-height: 1.45; }

.lg-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 2.6rem 0 1rem; }
.lg-pn a { display: block; padding: 12px 14px; border: 1px solid var(--border); border-radius: 6px; color: var(--fg); text-decoration: none; font-weight: 600; font-size: .92rem; line-height: 1.35; }
.lg-pn a:hover { border-color: var(--lg); }
.lg-pn a span { display: block; font-size: .78rem; font-weight: 400; color: var(--muted); margin-bottom: 3px; }
.lg-pn .next { grid-column: 2; text-align: right; }

/* ---- the report's tables ---------------------------------------------- */
/* Five columns of prose: give them room and let the wrapper scroll, rather
   than squeezing every cell to a word wide on a laptop. */

.lg-t { margin: 1.2rem 0 .4rem; }
.lg-t table { min-width: 860px; font-size: .84rem; line-height: 1.45; }
.lg-t td:first-child { font-weight: 600; min-width: 9rem; }
.lg-t td:last-child { min-width: 9rem; }

/* ---- evidence ---------------------------------------------------------- */

.lg-ref { font-size: .68em; line-height: 0; margin-left: 1px; }
.lg-ref a { color: var(--lg); text-decoration: none; font-weight: 650; font-variant-numeric: tabular-nums; padding: 0 1px; }
.lg-ref a:hover { text-decoration: underline; }

.lg-ev { margin: .4rem 0 1.6rem; max-width: 52rem; border-left: 2px solid color-mix(in srgb, var(--lg) 45%, var(--border)); padding: 0 0 0 .9rem; font-size: .86rem; }
.lg-ev summary { cursor: pointer; color: var(--muted); font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; padding: .15rem 0; list-style-position: outside; }
.lg-ev summary .c { display: inline-block; min-width: 1.4em; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: color-mix(in srgb, var(--lg) 14%, transparent); color: var(--fg); text-align: center; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.lg-ev summary:focus-visible { outline: 2px solid var(--lg); outline-offset: 2px; border-radius: 3px; }
.lg-ev ol { margin: .4rem 0 0; padding-left: 2.1rem; display: grid; gap: .55rem; }
.lg-ev li { padding-left: .2rem; scroll-margin-top: calc(var(--shell-h, 0px) + 1rem); }
.lg-ev li::marker { color: var(--lg); font-weight: 650; font-variant-numeric: tabular-nums; }
.lg-ev li:target { background: color-mix(in srgb, var(--lg) 10%, transparent); border-radius: 4px; }
.lg-ev p { margin: 0; max-width: none; }
.lg-ev-src { display: flex; flex-wrap: wrap; gap: 0 .6rem; align-items: baseline; color: var(--muted); font-size: .92em; }
.lg-ev-src b { color: var(--fg); font-weight: 600; }
.lg-ev-src time { font-variant-numeric: tabular-nums; }
.lg-ev-src a { white-space: nowrap; }
.lg-ev-says { margin-top: .1rem; }
.lg-ev-q { margin: .25rem 0 0; padding: .1rem 0 .1rem .8rem; border-left: 3px solid var(--lg); font-style: italic; }
.lg-ev-q p::before { content: "“"; }
.lg-ev-q p::after { content: "”"; }
.lg-ev-rest { margin-top: .3rem; color: var(--muted); }

@media (max-width: 640px) {
  .lineage h1 { font-size: 1.5rem; }
  .lg-pn { grid-template-columns: 1fr; }
  .lg-pn .next { grid-column: 1; text-align: left; }
}
