.thp-gc-root{color:inherit;font:inherit;line-height:1.5}
.thp-gc-root *{box-sizing:border-box}
.thp-gc-shell{max-width:1100px;margin:0 auto}
.thp-gc-intro{margin:0 0 1.5rem;color:inherit}
.thp-gc-intro p{margin:.55rem 0;color:inherit}
.thp-gc-intro p:first-child{margin-top:0}
.thp-gc-intro p:last-child{margin-bottom:0}
.thp-gc-parent-grid,.thp-gc-ancestor-grid,.thp-gc-result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.thp-gc-card{border:1px solid currentColor;border-radius:12px;padding:1rem;background:transparent;color:inherit}
.thp-gc-card h3,.thp-gc-card h4{margin:.1rem 0 .8rem;color:inherit}
.thp-gc-field{margin:.75rem 0}
.thp-gc-field label{display:block;font-weight:600;margin-bottom:.3rem}
.thp-gc-field select{width:100%;min-height:42px;padding:.45rem .6rem;border:1px solid currentColor;border-radius:8px;background:transparent;color:inherit}
.thp-gc-patterns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem .7rem}
.thp-gc-check{display:flex;align-items:flex-start;gap:.45rem;font-weight:400!important;margin:0!important}
.thp-gc-check input{margin-top:.25rem}
.thp-gc-button{border-radius:9px;padding:.7rem 1rem;font:inherit;font-weight:700;cursor:pointer}
.thp-gc-button--secondary{font-weight:600}
.thp-gc-actions{display:flex;gap:.7rem;flex-wrap:wrap;margin-top:1rem}
.thp-gc-hidden{display:none!important}
.thp-gc-ancestry{margin-top:1rem;padding-top:1rem;border-top:1px dashed currentColor}
.thp-gc-small{font-size:.9rem;color:inherit;opacity:.8}
.thp-gc-results{margin-top:1.5rem}
.thp-gc-section{margin:1.4rem 0}
.thp-gc-section>h3,.thp-gc-section>h4{color:inherit}
.thp-gc-result{border:1px solid currentColor;border-radius:12px;padding:1rem;background:transparent;color:inherit;overflow:hidden}
.thp-gc-result-namebar{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin:-1rem -1rem .8rem;padding:.65rem 1rem;background:transparent;color:inherit;border-radius:11px 11px 0 0}
.thp-gc-result-namebar strong{font-size:1.05rem;color:inherit}
.thp-gc-percent{font-weight:800;color:inherit;white-space:nowrap}
.thp-gc-note{font-size:.9rem;color:inherit;opacity:.8;margin-top:.35rem}
.thp-gc-warning{border-left:4px solid currentColor;background:transparent;padding:.8rem 1rem;border-radius:7px;margin:.6rem 0;color:inherit}
.thp-gc-warning--danger{border-left-width:6px}
.thp-gc-punnett{overflow:auto}
.thp-gc-punnett table{border-collapse:collapse;width:100%;font-size:.9rem}
.thp-gc-punnett th,.thp-gc-punnett td{border:1px solid currentColor;padding:.45rem;text-align:left}
.thp-gc-link{display:inline-block;margin-top:.55rem;font-weight:700}
.thp-gc-result img{display:block;width:calc(100% + 2rem);max-width:none;aspect-ratio:1/1;object-fit:cover;margin:-1rem -1rem .8rem}
.thp-gc-result img+.thp-gc-result-namebar{margin-top:-.8rem}
.thp-gc-condition{margin-top:.5rem;padding:.55rem .65rem;background:transparent;border:1px solid currentColor;border-radius:7px;font-size:.9rem}
.thp-gc-ancestor-title{display:flex;justify-content:space-between;gap:.5rem;align-items:center}

/* Offspring color and pattern results use four columns on larger screens. */
.thp-gc-result-grid--colors,.thp-gc-result-grid--patterns{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:980px) and (min-width:761px){.thp-gc-result-grid--colors,.thp-gc-result-grid--patterns{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.thp-gc-parent-grid,.thp-gc-ancestor-grid,.thp-gc-result-grid{grid-template-columns:1fr}.thp-gc-patterns{grid-template-columns:1fr}}

/* Inbreeding / pedigree calculator */
.thp-ib-shell input[type="text"]{width:100%;min-height:42px;padding:.45rem .6rem;border:1px solid currentColor;border-radius:8px;background:transparent;color:inherit;font:inherit}
.thp-ib-meta{margin-bottom:1rem}
.thp-ib-generation{border:1px solid currentColor;border-radius:12px;margin:0 0 1rem;overflow:hidden}
.thp-ib-generation>summary{cursor:pointer;display:flex;justify-content:space-between;gap:1rem;align-items:center;padding:.85rem 1rem;list-style-position:inside}
.thp-ib-generation>summary span{font-size:.9rem;opacity:.75}
.thp-ib-rows{padding:0 1rem 1rem}
.thp-ib-row{display:grid;grid-template-columns:minmax(170px,.8fr) minmax(180px,1fr) minmax(220px,1fr);gap:.8rem;align-items:end;padding:.7rem 0;border-top:1px solid color-mix(in srgb,currentColor 20%,transparent)}
.thp-ib-path{font-weight:700;padding-bottom:.6rem;overflow-wrap:anywhere}
.thp-ib-input label{display:block;font-weight:600;font-size:.9rem;margin:0 0 .25rem}
.thp-ib-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}
.thp-ib-mini-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.thp-ib-stat-value{font-size:2rem;font-weight:800;line-height:1.15;margin:.35rem 0}
.thp-ib-method{padding:.75rem 0}
.thp-ib-method p{margin:.55rem 0}
@media(max-width:980px){.thp-ib-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.thp-ib-mini-grid{grid-template-columns:1fr}.thp-ib-row{grid-template-columns:1fr 1fr}.thp-ib-path{grid-column:1/-1;padding-bottom:0}}
@media(max-width:640px){.thp-ib-stats{grid-template-columns:1fr}.thp-ib-row{grid-template-columns:1fr}.thp-ib-path{grid-column:auto}.thp-ib-generation>summary{align-items:flex-start;flex-direction:column;gap:.2rem}}
