/* Why Karya and the KChat window, brought over from site-v4 as built; v5 supplies the tokens they read */
/* ── Why Karya, in three reasons (the long story folds away by default) ── */
.whyk .top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 70px; align-items: end; }
.wk3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px; margin-top: 64px; }
.wk3 > div { padding-top: 22px; border-top: 2px solid var(--ink); }
.wk3 span { font: 500 11px var(--mono); letter-spacing: .12em; color: var(--ink-3); }
.wk3 h3 { margin: 12px 0 10px; font: 500 clamp(26px, 2.2vw, 32px)/1.1 var(--serif); letter-spacing: -.015em; color: var(--ink); }
.wk3 p { margin: 0; font: 400 16px/1.65 var(--sans); color: var(--ink-2); max-width: 40ch; }
@media (max-width: 960px) { .whyk .top, .wk3 { grid-template-columns: minmax(0, 1fr); gap: 26px; } }
/* 02 · Why Karya at a glance: the three blocks we keep meeting inside firms, the intern-to-partner dial, and the door to the story */
.blocks { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: b; }
.blocks li { counter-increment: b; position: relative; padding: 9px 0 9px 30px; border-top: 1px solid var(--hair); font: 400 15.5px/1.5 var(--sans); color: var(--ink); }
.blocks li::before { content: counter(b, lower-roman); position: absolute; left: 0; top: 10px; font: italic 400 17px/1.3 var(--serif); color: var(--ink-3); }
.dial { --v: 0; margin-top: 18px; user-select: none; }
.dial-track { position: relative; height: 34px; cursor: grab; touch-action: none; outline: none; }
.dial-track:active { cursor: grabbing; }
.dial-track svg { position: absolute; left: 12px; top: 5px; width: calc(100% - 24px); height: 24px; overflow: visible; }
.dial-track path { fill: var(--ink); opacity: .82; }
.dial-knob { position: absolute; top: 17px; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 52% 48% 55% 45% / 47% 55% 45% 53%; background: var(--ink);
  box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px rgba(23,23,21,.3); }
.dial.snap .dial-knob { transition: left .45s var(--ease); }
.dial-track:focus-visible .dial-knob { box-shadow: 0 0 0 5px var(--paper), 0 0 0 7px var(--bronze, #8a6440); }
.dial-stops { display: flex; justify-content: space-between; margin-top: 6px; padding: 0 2px; }
.dial-stops button { border: 0; background: none; padding: 4px 0; cursor: pointer; font: 400 19px/1.2 var(--serif); color: var(--ink-3); transition: color .3s; }
.dial-stops button.on { color: var(--ink); font-style: italic; }
.dial-stops button:nth-child(2) { transform: translateX(0); } .dial-stops button:last-child { text-align: right; }
.dial-say { position: relative; display: grid; margin: 14px 0 0; }
.dial-say > div { grid-area: 1 / 1; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; opacity: 0; transform: translateY(6px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.dial-say > div.on { opacity: 1; transform: none; }
.dial-say dt { font: 500 10.5px/1.9 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.dial-say dd { margin: 0; font: 400 15.5px/1.5 var(--sans); color: var(--ink); }
.door { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; margin-top: 72px; padding: 30px 0; border-top: 2px solid var(--ink); }
.door .kick { margin: 0; }
.door-line { margin: 0; font: italic 400 clamp(22px, 1.8vw, 28px)/1.25 var(--serif); color: var(--ink); }
.door + .trust3 { margin-top: 0; }
@media (max-width: 960px) { .door { grid-template-columns: 1fr; gap: 14px; margin-top: 48px; } .door .btn { justify-self: start; } }
@media (prefers-reduced-motion: reduce) { .dial.snap .dial-knob, .dial-say > div { transition: none; } }
.needs3 b { font-weight: 500; }
.essay { display: inline-flex; gap: 8px; margin-top: 16px; font: 500 14px var(--sans); color: var(--ink); text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 5px; transition: text-decoration-color .3s; }
.essay:hover { text-decoration-color: var(--ink); } .essay span { transition: transform .3s var(--ease); } .essay:hover span { transform: translateX(3px); }
.wk-close { max-width: 62ch; margin: 64px 0 0; font: 400 clamp(22px, 1.9vw, 28px)/1.35 var(--serif); color: var(--ink); text-wrap: pretty; }
.wk-close em { display: block; margin-top: 6px; color: var(--ink-2); }
.wk-close + .door { margin-top: 40px; }
.wk3 p.fuel { margin-top: 12px; font: italic 400 19px/1.35 var(--serif); color: var(--ink); }

/* 02 · the three points as small generated interfaces: flat panels on the paper, ink controls */
.gen3 { gap: 22px; }
.wk3.gen3 > .gcard { padding: 0 24px 24px; border: 1px solid var(--hair); border-top: 2px solid var(--ink); background: rgba(250,246,238,.42); }
.gbar { display: flex; align-items: center; gap: 12px; height: 40px; margin: 0 -24px 6px; padding: 0 24px; border-bottom: 1px solid var(--hair); }
.gbar span { font: 500 11px var(--mono); letter-spacing: .12em; color: var(--ink-3); }
.gbar i { font: 500 10.5px var(--mono); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.gbar::after { content: ""; margin-left: auto; width: 34px; height: 6px; background: radial-gradient(circle, var(--ink-3) 1.3px, transparent 1.6px) 0 50% / 12px 6px repeat-x; opacity: .7; }
.gset { margin: 12px 0 0; padding: 0; list-style: none; }
.gset li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--hair); }
.gset b { display: block; font: 500 15.5px/1.3 var(--sans); color: var(--ink); }
.gset em { display: block; margin-top: 2px; font: 400 14px/1.45 var(--sans); font-style: normal; color: var(--ink-2); }
.tg { position: relative; width: 42px; height: 24px; border: 0; padding: 0; cursor: pointer; background: var(--ink); border-radius: 13px 11px 12px 12px / 12px 13px 11px 12px; }
.tg i { position: absolute; top: 4px; right: 4px; width: 16px; height: 16px; background: var(--paper); border-radius: 52% 48% 55% 45% / 47% 55% 45% 53%; }
.tg:focus-visible { outline: 2px solid var(--bronze, #8a6440); outline-offset: 3px; }
.tg.nope i { animation: tg-nope .45s var(--ease); }
@keyframes tg-nope { 30% { transform: translateX(-9px); } 60% { transform: translateX(-3px); } }
.gnote { min-height: 1.4em; margin: 10px 0 0; font: italic 400 17px/1.3 var(--serif); color: var(--ink); }
.gstack { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0 30px; padding: 0; list-style: none; }
.gstack li { padding: 6px 11px 6px 26px; border: 1px solid var(--ink); font: 500 12px/1.2 var(--mono); letter-spacing: .04em; color: var(--ink); position: relative; }
.gstack li::before { content: ""; position: absolute; left: 9px; top: 50%; width: 9px; height: 5px; margin-top: -4px; border-left: 1.6px solid var(--ink); border-bottom: 1.6px solid var(--ink); transform: rotate(-45deg); }
.gen3 .fuel { padding-top: 12px; border-top: 1px solid var(--hair); }
@media (max-width: 960px) { .wk3.gen3 > .gcard { padding: 0 18px 20px; } .gbar { margin: 0 -18px 6px; padding: 0 18px; } }
@media (prefers-reduced-motion: reduce) { .tg.nope i { animation: none; } }
/* 02 · the three cards rise into place once as the section arrives (why.js) */
.gcard.rise-wait { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease-out-quint), transform .6s var(--ease-out-quint); }
.gcard.rise-wait.rise-in { opacity: 1; transform: none; }
/* 02 · the three points, built when used (home-sections.js): generated parts arrive one at a time and decode in */
.gen3 .g { opacity: 0; transform: translateY(4px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.gen3 .g.g-on { opacity: 1; transform: none; }
.gbtn { padding: 8px 13px; border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); font: 500 13.5px/1.2 var(--sans); cursor: pointer; transition: background .18s, color .18s, transform .12s; }
.gbtn:hover { background: rgba(23,23,21,.06); } .gbtn:active { transform: translateY(1px); }
.gbtn.solid { background: var(--ink); color: var(--paper); } .gbtn.solid:hover { background: #2b2a26; }
.gbtn:focus-visible, .cx-c:focus-visible, .cx-all:focus-visible { outline: 2px solid var(--bronze, #8a6440); outline-offset: 2px; }
.gbtn:disabled { opacity: .5; cursor: default; }

/* 01 · are you comfortable with this: sources wire into the AI, and the profile compiles beneath */
.cx-net { position: relative; margin-top: 14px; }
.cx-src { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.cx-c { width: 100%; padding: 7px 4px; border: 1px dashed rgba(23,23,21,.4); border-radius: 0; background: var(--paper); color: var(--ink-3); font: 500 11.5px/1.2 var(--mono); letter-spacing: .02em;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .12s; }
.cx-c:hover { color: var(--ink); border-color: var(--ink); }
.cx-c:active { transform: translateY(1px); }
.cx-c[aria-pressed="true"] { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.cx-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.cx-wires path { fill: none; stroke: rgba(23,23,21,.16); stroke-width: 1; stroke-dasharray: 2 3; }
.cx-wires path.on { stroke: var(--ink); stroke-width: 1.3; stroke-dasharray: 1; stroke-dashoffset: 0; }
.cx-wires path.new { animation: cx-draw .55s var(--ease) both; }
@keyframes cx-draw { from { stroke-dashoffset: 1; } }
.wk3 .cx-hub { position: relative; z-index: 1; display: flex; justify-content: center; max-width: none; margin: 40px 0 0; }
.cx-hub > span { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(23,23,21,.3); border-radius: 52% 48% 55% 45% / 47% 55% 45% 53%; background: var(--paper);
  font: 500 11px/1 var(--mono); letter-spacing: .1em; color: var(--ink-3); transition: background .3s, color .3s, box-shadow .3s; }
.cx-hub.lit > span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.cx-hub.safe > span { box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--bronze, #8a6440); }
.cx-prof { position: relative; min-height: 120px; margin-top: 12px; padding: 10px 14px 12px; border: 1px solid var(--hair); background: rgba(250,246,238,.55); }
.cx-h { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 4px !important; }
.wk3 .cx-h > span, .cx-h > b { font: 500 10.5px/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.cx-h > b { color: var(--ink); white-space: nowrap; }
.cx-lines { margin: 0; padding: 0; list-style: none; }
.cx-lines li { padding: 5px 0; border-top: 1px solid var(--hair); }
.wk3 .cx-lines li > span { font: 400 14.5px/1.4 var(--sans); letter-spacing: normal; color: var(--ink);
  background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 55% / 0% 78%; transition: background-size .5s var(--ease), color .3s .2s; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.wk3 .cx-lines li.sum > span { font: italic 400 18px/1.3 var(--serif); }
.wk3 .cx-lines li.nudge > span { font-weight: 500; }
.cx-lines li.nudge::before { content: "→ "; color: var(--ink-3); }
.wk3 .cx-lines li.red > span { background-size: 100% 78%; color: transparent; }
.cx-lines li.red::before { visibility: hidden; }
.wk3 .cx-empty { margin: 8px 0 0; font: italic 400 17px/1.3 var(--serif); color: var(--ink-3); }
.cx-all { padding: 0; border: 0; background: none; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.cx-acts { margin-top: 12px; }
.wk3 .cx-say { min-height: 2.7em; margin: 10px 0 0; font: italic 400 17px/1.35 var(--serif); color: var(--ink); }
.wk3 .cx-say span { font: inherit; letter-spacing: normal; color: inherit; }
.cx-say b { font-style: normal; font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .cx-wires path.new { animation: none; } .wk3 .cx-lines li > span { transition: none; } }

/* 02 · the horizon: one square per step; ink when right, a bronze ring when an eval caught a slip, a cross where it drifted */
.blocks li b { font-weight: 500; }
.hz { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hair); }
.wk3 .hz-k { margin: 0 0 12px; font: italic 400 18px/1.35 var(--serif); color: var(--ink); }
.hz-ctl { display: grid; grid-template-columns: auto 1fr 3ch; align-items: center; gap: 12px; }
.hz-ctl label { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.hz-ctl output { font: 500 13px/1 var(--mono); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.hz-ctl input { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; }
.hz-ctl input::-webkit-slider-runnable-track { height: 2px; background: var(--ink); }
.hz-ctl input::-moz-range-track { height: 2px; background: var(--ink); }
.hz-ctl input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; border: 0; background: var(--ink); border-radius: 52% 48% 55% 45% / 47% 55% 45% 53%; }
.hz-ctl input::-moz-range-thumb { width: 14px; height: 14px; border: 0; background: var(--ink); border-radius: 52% 48% 55% 45% / 47% 55% 45% 53%; }
.hz-ctl input:focus-visible { outline: 2px solid var(--bronze, #8a6440); outline-offset: 2px; }
.hz-strip { display: flex; flex-wrap: wrap; gap: 3px; min-height: 22px; margin: 12px 0 0; }
.hz-strip i { position: relative; width: 8px; height: 8px; border: 1px solid rgba(23,23,21,.3); }
.hz-strip i.ok { border-color: var(--ink); background: var(--ink); }
.hz-strip i.re { border-color: var(--bronze, #8a6440); background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--bronze, #8a6440); }
.hz-strip i.x { border-color: var(--ink); }
.hz-strip i.x::before, .hz-strip i.x::after { content: ""; position: absolute; left: -2px; top: 2.5px; width: 10px; height: 1.5px; background: var(--ink); transform: rotate(45deg); }
.hz-strip i.x::after { transform: rotate(-45deg); }
.wk3 .hz-odds { margin: 10px 0 0; font: 400 14px/1.45 var(--sans); color: var(--ink-2); }
.hz-odds b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.hz-acts { display: flex; gap: 8px; margin-top: 12px; }
.hz-ev[aria-pressed="false"] { border-style: dashed; color: var(--ink-3); }
.wk3 .hz-say { min-height: 2.7em; margin: 10px 0 0; font: italic 400 17px/1.35 var(--serif); color: var(--ink); }
.wk3 .hz-say span { font: inherit; letter-spacing: normal; color: inherit; }
/* 03 · the interface at each level of autonomy */
.au { min-height: 172px; margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--hair); }
.wk3 .au-task { margin: 8px 0 8px; font: 400 14.5px/1.4 var(--sans); color: var(--ink); }
.au-task > span { margin-right: 10px; font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.au-step { padding: 10px 12px; border: 1px solid var(--hair); background: rgba(250,246,238,.6); }
.au-step > span { display: block; font: 500 10.5px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.au-step b { font: 500 15.5px/1.35 var(--sans); color: var(--ink); }
.au-acts { display: flex; gap: 8px; margin-top: 10px; }
.au-plan, .au-rep { margin: 0; padding: 0; list-style: none; }
.au-plan li, .au-rep li { position: relative; padding: 6px 0 6px 22px; font: 400 14.5px/1.4 var(--sans); color: var(--ink-2); }
.au-plan li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 8px; height: 8px; border: 1px solid var(--ink-3); }
.au-plan li.ok { color: var(--ink); }
.au-plan li.ok::before { width: 8px; height: 4px; top: 11px; border: 0; border-left: 1.6px solid var(--ink); border-bottom: 1.6px solid var(--ink); transform: rotate(-45deg); }
.au-rep li { color: var(--ink); } .au-rep li::before { content: "→"; position: absolute; left: 0; color: var(--ink-3); }
.wk3 .au-say { margin: 0; font: italic 400 17px/1.35 var(--serif); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .gen3 .g { transition: none; } }
/* 03 · the autonomy ladder: a "today" mark on the dial, the spec sheet per level, who does the work, agents in parallel */
.dial-track { margin-bottom: 0; }
.dial-today { position: absolute; left: calc(12px + .3 * (100% - 24px)); top: -14px; transform: translateX(-50%); font: 500 9.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; pointer-events: none; }
.dial-today::after { content: ""; position: absolute; left: 50%; top: 13px; width: 1px; height: 9px; background: var(--ink-3); }
.au-spec { margin: 14px 0 0; }
.au-spec > div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--hair); }
.au-spec dt { font: 500 10.5px/1.75 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.au-spec dd { margin: 0; font: 400 14.5px/1.45 var(--sans); color: var(--ink); }
.au-trust { display: inline-flex; gap: 3px; margin-right: 10px; vertical-align: 1px; }
.wk3 .au-trust i { width: 16px; height: 6px; border: 1px solid var(--ink); }
.wk3 .au-trust i.on { background: var(--ink); }
.au-split { --you: 82%; display: grid; grid-template-columns: var(--you) 1fr; margin-top: 10px; height: 26px; border: 1px solid var(--ink); transition: grid-template-columns .6s var(--ease); }
.wk3 .au-split > span { display: flex; align-items: center; padding: 0 8px; overflow: hidden; white-space: nowrap; font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.wk3 .au-split .au-split-you { background: var(--ink); color: var(--paper); }
.wk3 .au-split .au-split-ai { justify-content: flex-end; color: var(--ink); }
.au-lanes { margin: 0; padding: 0; list-style: none; }
.au-lanes li { display: grid; grid-template-columns: 92px 1fr; gap: 2px 10px; align-items: center; padding: 5px 0; }
.au-lanes b { font: 500 10px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.au-lanes i { position: relative; height: 2px; background: rgba(23,23,21,.14); }
.au-lanes i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; animation: au-fill var(--t) cubic-bezier(.4,.1,.3,1) both; }
@keyframes au-fill { from { transform: scaleX(0); } }
.wk3 .au-lanes li > span { grid-column: 2; font: 400 13px/1.35 var(--sans); letter-spacing: normal; color: var(--ink-2); opacity: 0; animation: au-show .3s var(--t) both; }
@keyframes au-show { to { opacity: 1; } }
.au-run > .au-late > .g, .au-run > .g.au-late { transition-delay: 4.1s; }
.au .au-rep { margin-top: 6px; border-top: 1px solid var(--hair); }
@media (prefers-reduced-motion: reduce) { .au-split { transition: none; } .au-lanes i::after, .wk3 .au-lanes li > span { animation: none; opacity: 1; } .au-run .au-late .g, .au-run .g.au-late { transition-delay: 0s; } }
/* the decode's letter cells are spans; .wk3 span is the small mono label style, so cells must take their line's own type,
   or the text changes size mid-decode and reflows down the card */
.wk3 .ar-t, .wk3 .ar-c { display: inline; margin: 0; padding: 0; border: 0; background: none; opacity: 1; animation: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.wk3 .ar-w { display: inline; white-space: nowrap; }
.wk3 .ar-c.on { display: inline-block; color: var(--ink-3); }
/* 03 · partner: pick an ambition; the agents report, and the big call stays yours */
.au-goals { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.au-goals button { padding: 6px 10px; border: 1px dashed rgba(23,23,21,.4); border-radius: 0; background: transparent; color: var(--ink-2); font: 500 12.5px/1.2 var(--sans); cursor: pointer; transition: background .18s, color .18s, border-color .18s; }
.au-goals button:hover { border-color: var(--ink); color: var(--ink); }
.au-goals button[aria-pressed="true"] { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.au-goals button:focus-visible { outline: 2px solid var(--bronze, #8a6440); outline-offset: 2px; }
.au-call { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--ink); }
.wk3 .au-call > span { display: block; font: 500 10.5px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.au-call > b { font: 500 15.5px/1.35 var(--sans); color: var(--ink); }
.au-why { margin: 10px 0 0; padding: 8px 0 0 18px; border-top: 1px solid var(--hair); font: 400 14px/1.45 var(--sans); color: var(--ink-2); }
.au-why li { padding: 2px 0; }
/* ── 04 · KChat, the quick view: a window you can use, the path your data takes beside it, and the door to everything ── */
.kq-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.kq { padding-top: 40px; }
.kq-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.kq .g { opacity: 0; transform: translateY(4px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.kq .g.g-on { opacity: 1; transform: none; }
.kq .ar-t, .kq .ar-c { display: inline; margin: 0; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.kq .ar-c.on { display: inline-block; color: rgba(237,224,202,.5); }

/* the window: the one dark object on the sheet, square and flat; bone on near-black */
.kq-win { display: flex; flex-direction: column; height: 500px; border: 1px solid #171715; background: #1c1a17; color: #ede0ca; }
.kq-bar { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-bottom: 1px solid rgba(237,224,202,.14); }
.kq-bar i { width: 9px; height: 9px; border: 1px solid rgba(237,224,202,.35); border-radius: 50%; }
.kq-bar span { margin-left: 10px; font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #ede0ca; }
.kq-ctx { min-width: 0; margin-left: auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 400 12px/1 var(--mono); font-style: normal; color: rgba(237,224,202,.55); }
.kq-chat { flex: 1; overflow-y: auto; padding: 20px 22px; scrollbar-width: thin; scrollbar-color: rgba(237,224,202,.2) transparent; }
.kq-hello { margin: 0; font: italic 400 21px/1.3 var(--serif); color: rgba(237,224,202,.6); }
.kq-me { width: fit-content; max-width: 80%; margin: 0 0 16px auto; padding: 10px 14px; border: 1px solid rgba(237,224,202,.22); font: 400 15px/1.45 var(--sans); color: #ede0ca; }
.kq-ai { max-width: 92%; margin-bottom: 14px; font: 400 15.5px/1.55 var(--sans); color: #ede0ca; }
.kq-ai p { margin: 0 0 8px; } .kq-ai b { font-weight: 500; }
.kq-ai ul { margin: 0 0 10px; padding-left: 18px; } .kq-ai li { margin: 3px 0; }
.kq-ai .kq-note { font-size: 13.5px; color: rgba(237,224,202,.6); }
.kq-file { display: flex; align-items: center; gap: 14px; justify-content: space-between; margin: 4px 0 10px; padding: 12px 14px; border: 1px solid rgba(237,224,202,.22); }
.kq-file span { display: grid; gap: 2px; } .kq-file i { font: 400 12.5px/1.3 var(--mono); font-style: normal; color: rgba(237,224,202,.55); }
.kq-diff { font-size: 14px; color: rgba(237,224,202,.8); }
.kq-ask { display: grid; gap: 10px; margin: 6px 0 10px; padding: 12px 14px; border: 1px solid #ede0ca; }
.kq-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.kqb { padding: 7px 12px; border: 1px solid rgba(237,224,202,.5); border-radius: 0; background: transparent; color: #ede0ca; font: 500 13px/1.2 var(--sans); cursor: pointer; transition: background .18s, color .18s, transform .12s; }
.kqb:hover { background: rgba(237,224,202,.08); } .kqb:active { transform: translateY(1px); }
.kqb.solid { background: #ede0ca; border-color: #ede0ca; color: #1c1a17; } .kqb.solid:hover { background: #f6ecd9; }
.kqb:disabled { opacity: .45; cursor: default; }
.kq-get { color: #ede0ca; text-underline-offset: 4px; }
.kq-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.kq-chips button { padding: 7px 11px; border: 1px dashed rgba(237,224,202,.35); border-radius: 0; background: transparent; color: rgba(237,224,202,.8); font: 400 13px/1.2 var(--sans); cursor: pointer; transition: border-color .18s, color .18s, background .18s; }
.kq-chips button:hover { border-color: #ede0ca; color: #ede0ca; }
.kq-chips button[aria-pressed="true"] { border: 1px solid #ede0ca; color: #ede0ca; background: rgba(237,224,202,.08); }
.kq-comp { display: flex; gap: 8px; margin: 0 16px 16px; padding: 6px 6px 6px 14px; border: 1px solid rgba(237,224,202,.28); }
.kq-comp input { flex: 1; min-width: 0; border: 0; background: transparent; color: #ede0ca; font: 400 15px/1.4 var(--sans); outline: none; }
.kq-comp input::placeholder { color: rgba(237,224,202,.4); }
.kq-comp button { width: 34px; height: 34px; border: 0; border-radius: 0; background: #ede0ca; color: #1c1a17; font: 500 16px/1 var(--sans); cursor: pointer; }
.kq-win button:focus-visible, .kq-comp:focus-within { outline: 2px solid var(--bronze, #8a6440); outline-offset: 2px; }

/* follow your data: five hops on an ink line; each lights as the request reaches it */
.kq-hk { margin: 6px 0 18px; font: 500 11.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.kq-hops ol { position: relative; margin: 0; padding: 0; list-style: none; }
.kq-hops li { position: relative; padding: 0 0 22px 30px; opacity: .38; transition: opacity .35s var(--ease); }
.kq-hops li::before { content: ""; position: absolute; left: 4px; top: 5px; width: 11px; height: 11px; border: 1.5px solid var(--ink); border-radius: 52% 48% 55% 45% / 47% 55% 45% 53%; background: var(--paper); transition: background .3s; }
.kq-hops li::after { content: ""; position: absolute; left: 10px; top: 20px; bottom: 2px; width: 1.5px; background: var(--ink); transform: scaleY(0); transform-origin: top; transition: transform .45s var(--ease); }
.kq-hops li:last-child::after { display: none; }
.kq-hops li.on { opacity: 1; } .kq-hops li.on::before { background: var(--ink); } .kq-hops li.on:not(.now)::after { transform: none; }
.kq-hops li.now::before { box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--bronze, #8a6440); }
.kq-hops li.skip { opacity: .2; } .kq-hops li.skip b { text-decoration: line-through; text-decoration-thickness: 1px; }
.kq-hops b { display: block; font: 500 21px/1.2 var(--serif); color: var(--ink); }
.kq-hops span { display: block; margin-top: 3px; font: 400 14.5px/1.45 var(--sans); color: var(--ink-2); }
.kq-hops em { font-style: normal; color: var(--ink); font-weight: 500; }
.kq-hops .end .big { font: italic 400 30px/1.15 var(--serif); color: var(--ink); }
.kq-door { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 48px; padding: 22px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.kq-door p { max-width: 62ch; margin: 0; font: italic 400 20px/1.4 var(--serif); color: var(--ink); }


/* night (the tokens turn in v5.css): the washes and rules set by hand */
.night .wk3.gen3 > .gcard { background: rgba(237,224,202,.035); }
.night .cx-prof { background: rgba(237,224,202,.04); } .night .au-step { background: rgba(237,224,202,.045); }
.night .gbtn:hover { background: rgba(237,224,202,.07); } .night .gbtn.solid:hover { background: #f6ecd9; }
.night .cx-c, .night .au-goals button { border-color: rgba(237,224,202,.4); }
.night .cx-wires path { stroke: rgba(237,224,202,.2); }
.night .cx-hub > span, .night .hz-strip i { border-color: rgba(237,224,202,.35); }
.night .au-lanes i { background: rgba(237,224,202,.16); }
.night .dial-knob { box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px rgba(237,224,202,.35); }
.night .kq-win { border-color: var(--line-2); background: #201d19; }

/* ═══ the window in KChat's own interface (explainer/app.html's replica): a lavender frame round a white canvas,
   Inter, grey on white, rounded as the app is. It is the real product, so it keeps the app's look in every light. ═══ */
.kq .kq-win, .night .kq .kq-win { --k-ink: #1d1d1f; --k-ink2: #4a4a50; --k-ink3: #8a8a92; --k-line: #e6e6ea; --k-soft: #f5f5f7; --k-acc: #8f6738; --k-acc-bg: #f6efe4;
  padding: 0 6px 6px; border: 0; border-radius: 12px; overflow: hidden; color: var(--k-ink); font-family: Inter, system-ui, sans-serif;
  background: linear-gradient(180deg, #c9d3ea, #dde2ee 42%, #e9e9ef); box-shadow: 0 1px 2px rgba(20,22,40,.08), 0 18px 48px -18px rgba(20,22,40,.35); }
.kq .kq-bar { height: 42px; padding: 0 8px; border: 0; gap: 7px; }
.kq .kq-bar i { width: 11px; height: 11px; border: 0; background: rgba(43,45,53,.18); }
.kq .kq-bar span { display: inline-flex; align-items: center; gap: 8px; margin-left: 12px; font: 600 14px/1 Inter, system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: #2b2d35; }
.kq .kq-bar span::before { content: ""; width: 18px; height: 18px; border-radius: 4px; background: url(img/panther.png) center / 12px no-repeat, #e8e8e5; filter: invert(1); }   /* the black panther inverted: white on the app's near-black tile */
.kq .kq-ctx { height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.62); font: 500 12px/24px Inter, system-ui, sans-serif; color: #5d6070; }
.kq .kq-chat { background: #fff; border-radius: 10px 10px 0 0; padding: 22px 24px; scrollbar-color: #d7d7de transparent; }
.kq .kq-hello { font: 400 22px/1.3 Inter, system-ui, sans-serif; letter-spacing: -.01em; color: var(--k-ink3); }
.kq .kq-me { padding: 10px 14px; border: 0; border-radius: 14px; background: var(--k-soft); font: 400 14.5px/1.45 Inter, system-ui, sans-serif; color: var(--k-ink); }
.kq .kq-ai { font: 400 14.5px/1.6 Inter, system-ui, sans-serif; color: var(--k-ink); } .kq .kq-ai b { font-weight: 600; }
.kq .kq-ai .kq-note, .kq .kq-diff { color: var(--k-ink2); }
.kq .kq-file { border: 1px solid var(--k-line); border-radius: 10px; background: #fff; }
.kq .kq-file i { font: 400 12.5px/1.3 Inter, system-ui, sans-serif; color: var(--k-ink3); }
.kq .kq-ask { border: 1px solid var(--k-line); border-radius: 12px; background: var(--k-soft); }
.kq .kqb { border: 1px solid var(--k-line); border-radius: 8px; background: #fff; color: var(--k-ink2); font: 500 13px/1.2 Inter, system-ui, sans-serif; }
.kq .kqb:hover { background: var(--k-soft); }
.kq .kqb.solid { border-color: var(--k-ink); background: var(--k-ink); color: #fff; } .kq .kqb.solid:hover { background: #3a3a3e; }
.kq .kq-get { color: var(--k-acc); }
.kq .ar-c.on { color: var(--k-ink3); }
.kq .kq-chips { background: #fff; padding: 0 16px 10px; gap: 8px; }
.kq .kq-chips button { padding: 7px 12px; border: 1px solid var(--k-line); border-radius: 999px; background: #fff; color: var(--k-ink2); font: 400 13px/1.2 Inter, system-ui, sans-serif; }
.kq .kq-chips button:hover { border-color: #d7d7de; background: var(--k-soft); color: var(--k-ink); }
.kq .kq-chips button[aria-pressed="true"] { border-color: var(--k-ink); background: var(--k-ink); color: #fff; }
.kq .kq-comp { position: relative; margin: 0; padding: 4px 16px 16px; border: 0; border-radius: 0 0 10px 10px; background: #fff; }
.kq .kq-comp::before { content: ""; position: absolute; inset: 4px 16px 16px; border: 1px solid var(--k-line); border-radius: 14px; box-shadow: 0 2px 10px rgba(20,22,40,.05); pointer-events: none; }
.kq .kq-comp input { position: relative; padding: 14px 16px; color: var(--k-ink); font: 400 14.5px/1.4 Inter, system-ui, sans-serif; }
.kq .kq-comp input::placeholder { color: var(--k-ink3); }
.kq .kq-comp button { position: relative; align-self: center; width: 30px; height: 30px; margin-right: 10px; border-radius: 50%; background: var(--k-ink); color: #fff; font: 600 15px/1 Inter, system-ui, sans-serif; }
.kq .kq-win button:focus-visible { outline: 2px solid #3f5bd8; outline-offset: 2px; } .kq .kq-comp:focus-within { outline: 0; } .kq .kq-comp:focus-within::before { border-color: #c4c7d6; }
