/* Grokk chain run. Stark black and white, heavy square strokes. Scoped to .gk; no third-party requests. */
.gk {
  --gk-ink: #14130F; --gk-paper: #FFFFFF; --gk-line: #E4E4E6; --gk-muted: #413D35; --gk-focus: #0B3FCF;
  --gk-cell: 24px;
  display: grid; grid-template-columns: 1fr; gap: 12px; max-width: 760px; margin: 0 auto; padding: 0 16px 16px;
  color: var(--gk-ink); font-family: 'Sohne', 'Instrument Sans', system-ui, sans-serif; font-size: 16px; line-height: 1.4;
}
.gk *, .gk *::before, .gk *::after { box-sizing: border-box; }
.gk [hidden] { display: none !important; }
.gk .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gk :focus-visible { outline: 3px solid var(--gk-focus); outline-offset: 2px; }

.gk-agent { position: relative; display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; gap: 0 12px; align-items: center; background: var(--gk-paper); border: 4px solid var(--gk-ink); padding: 6px 10px; min-height: 72px; }
.gk-mascot { grid-row: 1 / span 2; width: 56px; height: 56px; display: block; }
.gk-dup { position: absolute; left: 62px; bottom: 4px; width: 36px; height: 36px; }
.gk-name { margin: 0; font-family: 'Array', ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 14px; }
.gk-bubble { margin: 0; font-size: 15px; border: 2.5px solid var(--gk-ink); padding: 4px 8px; background: var(--gk-paper); min-height: 32px; display: flex; align-items: center; }
.gk-dup { display: none; }
.gk-mascot.is-happy { animation: gk-hop .5s steps(4) 2; }
.gk-mascot.is-hit { animation: gk-shake .3s steps(3) 2; }
@keyframes gk-hop { 50% { transform: translateY(-6px); } }
@keyframes gk-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.gk-main { display: grid; gap: 10px; min-width: 0; }
.gk-hud { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.gk-stat { border: 2.5px solid var(--gk-ink); background: var(--gk-paper); padding: 4px 8px; min-width: 0; }
.gk-stat dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--gk-muted); }
.gk-stat dd { margin: 0; font-family: 'Array', ui-monospace, Menlo, monospace; font-weight: 700; font-size: 22px; line-height: 1.1; }
.gk-meters { display: grid; gap: 4px; }
.gk-clabel { margin: 0; font-size: 14px; font-weight: 600; }
.gk-meter { height: 12px; border: 2.5px solid var(--gk-ink); background: var(--gk-paper); }
.gk-meter__fill { display: block; height: 100%; background: var(--gk-ink); width: 100%; }
.gk-meter--comp.is-slow { background: repeating-linear-gradient(45deg, var(--gk-paper) 0 4px, var(--gk-ink) 4px 8px); }
.gk-meter--comp.is-slow .gk-meter__fill { background: transparent; }
.gk-meter--comp.is-busy .gk-meter__fill { background: repeating-linear-gradient(90deg, var(--gk-ink) 0 6px, var(--gk-paper) 6px 10px); }

.gk-wellwrap { position: relative; justify-self: center; width: 100%; max-width: calc(36px * 14 + 8px); display: grid; }
.gk-wellwrap > .gk-well, .gk-wellwrap > .gk-cover { grid-area: 1 / 1; min-width: 0; }
.gk-wellwrap > .gk-well { align-self: start; }
.gk-well { border: 4px solid var(--gk-ink); background: var(--gk-paper); padding: 0; line-height: 0; display: block; }
.gk-canvas { display: block; margin: 0 auto; max-width: 100%; }
.gk-cover { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-start; gap: 10px; padding: 14px; background: rgba(255,255,255,.96); border: 4px solid var(--gk-ink); overflow: auto; }
.gk-cover > * { flex: none; }
.gk-cover > :first-child { margin-top: auto; }
.gk-cover > :last-child { margin-bottom: auto; }
.gk-h { margin: 0; font-size: 24px; line-height: 1.15; }
.gk-goal { margin: 0; font-weight: 600; }
.gk-onboard { margin: 0; padding-left: 22px; }
.gk-onboard li { margin: 2px 0; }
.gk-over { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 0; }
.gk-over dt { color: var(--gk-muted); } .gk-over dd { margin: 0; font-family: 'Array', ui-monospace, Menlo, monospace; font-weight: 700; }
.gk-note { margin: 0; font-size: 14px; color: var(--gk-muted); }
.gk-share { width: 100%; min-height: 48px; border: 2.5px solid var(--gk-ink); padding: 8px; font: inherit; }
.gk-btns { display: flex; flex-wrap: wrap; gap: 8px; }

.gk-btn { min-width: 48px; min-height: 48px; padding: 8px 14px; background: var(--gk-paper); color: var(--gk-ink); border: 2.5px solid var(--gk-ink); font: inherit; font-weight: 700; cursor: pointer; border-radius: 0; touch-action: manipulation; user-select: none; }
.gk-btn:hover { background: #F0F0F1; }
.gk-btn:active { background: var(--gk-ink); color: var(--gk-paper); }
.gk-btn--main { background: var(--gk-ink); color: var(--gk-paper); }
.gk-btn--main:hover { background: #2B2A25; }
.gk-hand[aria-disabled="true"] { border-style: dashed; color: var(--gk-muted); }

.gk-ctl { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.gk-pad { display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(2, 56px); gap: 6px; }
.gk-pad .gk-btn { width: 56px; height: 56px; padding: 0; font-size: 20px; }
.gk-pad__up { grid-column: 2; grid-row: 1; } .gk-pad__left { grid-column: 1; grid-row: 2; } .gk-pad__down { grid-column: 2; grid-row: 2; } .gk-pad__right { grid-column: 3; grid-row: 2; }
.gk-side { display: grid; gap: 8px; flex: 1; min-width: 140px; max-width: 220px; }
.gk-hand { min-height: 56px; }

.gk-how { border: 2.5px solid var(--gk-ink); padding: 0 12px; background: var(--gk-paper); }
.gk-how summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.gk-how ul { margin: 0 0 8px; padding-left: 20px; } .gk-how li { margin: 4px 0; }

@media (min-width: 720px) {
  .gk { grid-template-columns: 200px 1fr; align-items: start; }
  .gk-agent { grid-template-columns: 1fr; grid-template-rows: auto; justify-items: center; text-align: center; padding: 12px; }
  .gk-mascot { grid-row: auto; width: 150px; height: 150px; }
  .gk-dup { display: block; left: auto; right: 10px; bottom: 90px; width: 56px; height: 56px; }
  .gk-bubble { width: 100%; justify-content: center; }
  .gk-how { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .gk-mascot.is-happy, .gk-mascot.is-hit { animation: none; }
}
@media (forced-colors: active) {
  .gk-btn, .gk-stat, .gk-meter, .gk-well, .gk-cover { border-color: CanvasText; }
}
