/* Genetics Counseling Clinic: the case file + Punnett square inside the practice shell's stage (about 1066 × 628 at 1366×768). */
.gc { position: absolute; inset: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 12px; padding: 12px; }
.gc-file { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding: 12px 14px; border-radius: var(--tlg-radius-lg);
  border: 2px solid color-mix(in srgb, #c4b5fd 70%, var(--tlg-border)); background: var(--tlg-surface); }
.gc-file-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.gc-file-k { margin: 0; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: var(--tlg-tracking-caps); color: var(--tlg-text-muted); }
.gc-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 16px; font-weight: 700; }
.gc-badge--ar { background: #fecdd3; color: #9f1239; }
.gc-badge--ad { background: #bae6fd; color: #075985; }
.gc-badge--xr { background: #fde68a; color: #78350f; }
.gc-badge--xd { background: #a7f3d0; color: #065f46; }
.gc-badge--mid { background: #ddd6fe; color: #4c1d95; }
.gc-badge--di { background: #e9d5ff; color: #581c87; }
.gc-trait { margin: 0; font-size: 16px; }
.gc-key { padding: 8px 10px; border-radius: var(--tlg-radius-sm); border: 1.5px solid #fcd34d; background: color-mix(in srgb, #fef3c7 80%, var(--tlg-surface)); font-size: 15px; line-height: 1.35; }
html[data-theme="dark"] .gc-key { background: color-mix(in srgb, #fde68a 14%, var(--tlg-surface)); border-color: #a16207; }
.gc-key p { margin: 0; }
.gc-key p + p { margin-top: 4px; }
.gc-family { list-style: none; margin: 0; padding: 0; }
.gc-family li { position: relative; padding: 7px 0 7px 18px; border-bottom: 1px solid var(--tlg-border); font-size: 16px; line-height: 1.4; }
.gc-family li:last-child { border-bottom: 0; }
.gc-family li::before { content: "▸"; position: absolute; left: 2px; color: #7c3aed; }
html[data-theme="dark"] .gc-family li::before { color: #c4b5fd; }

.gc-work { min-width: 0; min-height: 0; display: grid; grid-template-columns: max-content minmax(220px, 1fr); gap: 16px; align-items: start; overflow-y: auto; }
.gc-gridcol { min-width: 0; }
.gc-side { display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.gc-q { padding: 8px 12px; border-radius: var(--tlg-radius-sm); background: color-mix(in srgb, #ede9fe 75%, var(--tlg-surface)); border: 1.5px solid #c4b5fd; }
html[data-theme="dark"] .gc-q { background: color-mix(in srgb, #7c3aed 18%, var(--tlg-surface)); border-color: #6d28d9; }
.gc-q-k { margin: 0; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: var(--tlg-tracking-caps); color: var(--tlg-text-muted); }
.gc-q-t { margin: 2px 0 0; font-size: 16px; line-height: 1.3; }
.gc-muted { color: var(--tlg-text-muted); font-weight: 400; }
.gc-ans { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gc-ans-k { font-weight: 700; font-size: 16px; }
.gc-ans-field { display: inline-flex; align-items: center; gap: 4px; }
.gc-input { width: 110px; min-height: 48px; padding: 6px 10px; border: 2px solid #a78bfa; border-radius: 10px; font: 700 22px/1 var(--tlg-font, system-ui);
  text-align: center; color: var(--tlg-text); background: var(--tlg-surface); }
.gc-input:focus-visible { outline: var(--tlg-focus-width) solid var(--tlg-focus); outline-offset: 2px; border-color: #6d28d9; }
.gc-input.is-ok { border-color: #1a7f4b; box-shadow: inset 0 0 0 2px #1a7f4b; }
.gc-input.is-bad { border-color: #b42318; box-shadow: inset 0 0 0 2px #b42318; }
.gc-input:disabled { opacity: 1; -webkit-text-fill-color: var(--tlg-text); }
.gc-pct { font-size: 22px; font-weight: 700; color: #6d28d9; }
html[data-theme="dark"] .gc-pct { color: #c4b5fd; }
.gc-ans-help { margin: -4px 0 0; font-size: 14px; color: var(--tlg-text-muted); }
.gc-msg { margin: 0; min-height: 0; font-size: 15px; font-weight: 700; color: #b42318; }
.gc-msg:empty { display: none; }
html[data-theme="dark"] .gc-msg { color: #ffb4a8; }
.gc-readout .ppg-readout { font-size: 15px; }
.gc-readout .ppg-readout-l + .ppg-readout-l { margin-top: 4px; }
.gc-note { margin: 0; font-size: 15px; font-weight: 600; }

/* 4×4: a little tighter */
.gc--di .ppg-tile { min-height: 44px; }

/* worked example (Briefing page and drawer) */
.gc-example { display: flex; flex-direction: column; gap: 6px; }
.gc-example .ppg-top { padding-left: 0 !important; font-size: 13px; }
.gc-example .ppg-side { font-size: 13px; }
.gc-example-ro .ppg-readout { font-size: 14px; }
.gc-start-svg { width: 100%; height: 100%; display: block; }

/* Bigger text and a Punnett square that fills the work area (Tim, Oct 3). Desktop/Chromebook only; the narrow layout
   below keeps the component's default sizes. Budget at 1366×768: stage 1066 × 628, case file 320, question column 250,
   so the square column is about 444 px wide and 600 px tall. */
@media (min-width: 901px) {
  .gc { grid-template-columns: 320px minmax(0, 1fr); }
  .gc-work { grid-template-columns: minmax(0, 1fr) 250px; }
  .gc-file-k { font-size: 16px; }
  .gc-badge { font-size: 16px; padding: 4px 12px; }
  .gc-trait, .gc-family li { font-size: 18px; line-height: 1.45; }
  .gc-key { font-size: 17px; }
  .gc-q-k { font-size: 16px; }
  .gc-q-t, .gc-ans-k { font-size: 19px; }
  .gc-ans-help, .gc-note, .gc-msg { font-size: 16px; }
  .gc-readout .ppg-readout { font-size: 17px; }
  .gc-input { width: 120px; min-height: 56px; font-size: 26px; }
  .gc-pct { font-size: 26px; }
  .gc-gridcol .ppg { --ppg-head: 84px; --ppg-head-row: 84px;
    --ppg-cell: clamp(96px, calc((100vh - 400px) / 2.5), 170px); --ppg-cell-h: var(--ppg-cell); }
  .gc-gridcol .ppg-tray-k, .gc-gridcol .ppg-top, .gc-gridcol .ppg-side, .gc-gridcol .ppg-pline { font-size: 17px; }
  .gc-gridcol .ppg-tile { min-width: 60px; min-height: 56px; font-size: 28px; }
  .gc-gridcol .ppg-slot, .gc-gridcol .ppg-box { font-size: 34px; }
  .gc-gridcol .ppg-gam { font-size: 22px; }
  .gc-gridcol .ppg-corner { font-size: 16px; }
  .gc-gridcol .ppg-box-ph { font-size: 14px; }
  /* 4×4: as big as the column allows (4 boxes + header in ~444 px wide, ~330 px tall under the genotype lines) */
  .gc-gridcol .ppg--4 { --ppg-head: 64px; --ppg-head-row: 50px; --ppg-pslot: 48px;
    --ppg-cell: 80px; --ppg-cell-h: clamp(54px, calc((100vh - 500px) / 4), 90px); }
  /* the parent's genotype line: label (wraps to two lines) + four cells on one row */
  .gc-gridcol .ppg--4 .ppg-pline { flex-wrap: nowrap; font-size: 16px; }
  .gc-gridcol .ppg--4 .ppg-pline-k { min-width: 0; width: 170px; flex: none; line-height: 1.2; }
  .gc-gridcol .ppg--4 .ppg-box { font-size: 20px; }
}

@media (max-width: 900px) {
  .gc { position: static; grid-template-columns: 1fr; }
  .gc-work { grid-template-columns: 1fr; overflow: visible; }
  .gc-file { overflow: visible; }
}
.gc-example .ppg-board { zoom: .82; }
