/*
 * Fixes and additions layered on top of the verbatim Claude Design export
 * (kitt.css). Kept separate so a re-exported design can replace kitt.css and
 * Main.dc.html without losing these. Each block says why it exists.
 */

/* The export drops the grid to two columns when the dossier is hidden, but the
   dossier still claims grid-column 3, so it stays on screen as an implicit,
   auto-width column. Actually hide it (wide layout only; narrow/compact layouts
   already slide it off-canvas). */
.kitt.dz-hidden .dossier{display:none}

/* Brand-file upload on the Identity step (injected by bridge.js): a quiet,
   collapsed one-line disclosure so it never competes with the company name. */
.kitt .brand-import{border:1px solid var(--line);border-radius:4px;background:var(--paper)}
.kitt .brand-import>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:12px;padding:10px 14px;min-height:44px;border-radius:4px}
.kitt .brand-import>summary::-webkit-details-marker{display:none}
.kitt .brand-import>summary:hover{background:var(--sage)}
.kitt .bi-title{flex:1;font-weight:500;font-size:14px}
.kitt .bi-chev{width:8px;height:8px;margin:0 4px 3px;border-right:1.5px solid var(--ink-3);border-bottom:1.5px solid var(--ink-3);transform:rotate(45deg);transition:transform .2s ease}
.kitt .brand-import[open] .bi-chev{transform:rotate(-135deg);margin-bottom:-3px}
.kitt .brand-import .bi-body{display:grid;gap:10px;padding:14px 14px 16px;border-top:1px solid var(--line)}
.kitt .brand-import[open] .bi-body{animation:kitt-drop .26s cubic-bezier(.2,.7,.2,1)}
.kitt .brand-import .bi-result{display:grid;gap:8px;font-size:13.5px;color:var(--ink-2)}
.kitt .brand-import .bi-result ul{display:flex;flex-wrap:wrap;gap:6px;margin:0}
.kitt .brand-import .bi-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 8px;border:1px solid var(--line-2);border-radius:3px;background:var(--ivory);font-family:var(--mono);font-size:12px;animation:kitt-arrive .35s cubic-bezier(.2,.7,.2,1) both}
.kitt .brand-import .bi-chip i{width:12px;height:12px;border-radius:2px;border:1px solid rgba(0,0,0,.2);display:inline-block}
@keyframes kitt-drop{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}

/* Slide between setup steps (class toggled by bridge.js when the step changes).
   The design's own reduced-motion rules (.kitt.rm / prefers-reduced-motion)
   switch every animation off, so this respects them automatically. */
@keyframes kitt-slide-fwd{from{opacity:0;transform:translateX(34px)}to{opacity:1;transform:none}}
@keyframes kitt-slide-back{from{opacity:0;transform:translateX(-34px)}to{opacity:1;transform:none}}
.kitt .work-inner{overflow-x:clip}
.kitt .screen.slide-fwd{animation:kitt-slide-fwd .32s cubic-bezier(.2,.7,.2,1) both}
.kitt .screen.slide-back{animation:kitt-slide-back .32s cubic-bezier(.2,.7,.2,1) both}

/* ---------- Guided mode (guided.js): one question at a time ----------
   Question groups are wrapped in .gq. Outside guided mode the wrapper is
   display:contents, so the design's own layouts are untouched. */
.kitt .gq{display:contents}
.kitt .is-guided .gq:not(.is-active){display:none}
.kitt .is-guided .gq.is-active{display:grid;gap:18px;align-content:start}
.kitt .is-guided .gq.is-active.slide-fwd{animation:kitt-slide-fwd .28s cubic-bezier(.2,.7,.2,1) both}
.kitt .is-guided .gq.is-active.slide-back{animation:kitt-slide-back .28s cubic-bezier(.2,.7,.2,1) both}
.kitt .off-grid.is-guided{display:block}
.kitt .off-grid.is-guided .gq.is-active{grid-template-columns:repeat(2,minmax(0,1fr))}
.kitt .off-grid.is-guided .gq.is-active .full{grid-column:1 / -1}
.kitt.is-compact .off-grid.is-guided .gq.is-active{grid-template-columns:1fr}
.kitt .off-detail.is-guided .off-actions{display:none}
.kitt .aud-form.is-guided>.row{display:none}

.kitt .guide-top:empty{display:none}
.kitt .guide-bar{display:grid;gap:10px;margin-bottom:14px}
.kitt .gb-top{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
.kitt .gb-dots{display:flex;gap:4px}
.kitt .gb-dot{flex:1;height:3px;background:var(--line);transition:background-color .25s ease}
.kitt .gb-dot.done{background:var(--hunter-l)}
.kitt .gb-dot.on{background:var(--hunter)}
.kitt .guide-offer{margin-bottom:10px}
.kitt .guide-nav{display:grid;gap:10px;margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.kitt .gn-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.kitt .off-grid .guide-nav{grid-column:1 / -1}

/* Busy overlay while the governance documents are drafted (real.js). */
.kitt-busy{position:fixed;inset:0;z-index:200;display:grid;place-items:center;background:rgba(245,241,231,.88);backdrop-filter:blur(2px)}
.kitt-busy .kb-card{max-width:440px;margin:24px;padding:28px 30px;background:#FBF9F3;border:1px solid #D8D2C0;border-radius:6px;box-shadow:0 12px 40px rgba(25,63,50,.12)}
.kitt-busy .kb-t{margin:0 0 8px;font:500 22px/1.25 'Newsreader',Georgia,serif;color:#1F2A24}
.kitt-busy .kb-n{margin:0 0 18px;font:14px/1.5 'IBM Plex Sans',sans-serif;color:#4A554E}
.kitt-busy .kb-bar{height:3px;background:#E3DDCB;overflow:hidden;border-radius:2px}
.kitt-busy .kb-bar span{display:block;height:100%;width:38%;background:#1F4D36;animation:kb-slide 1.4s ease-in-out infinite}
@keyframes kb-slide{0%{transform:translateX(-100%)}100%{transform:translateX(280%)}}
@media (prefers-reduced-motion:reduce){.kitt-busy .kb-bar span{animation:none;width:100%;opacity:.4}}

/* Way back to the campaign builder (bridge.js adds the links in real mode). */
.kitt .rail-nav{display:grid;gap:2px;padding:12px 18px;border-bottom:1px solid var(--line)}
.kitt .rail-nav a{display:block;padding:7px 0;font:500 14px/1.3 'IBM Plex Sans',sans-serif;color:#1F4D36;text-decoration:none}
.kitt .rail-nav a:hover{text-decoration:underline}
.kitt .rail-nav .rail-nav-main{font-weight:600;padding-bottom:9px;margin-bottom:4px;border-bottom:1px dashed var(--line-2)}
.kitt.is-compact .rail-nav{display:flex;flex-wrap:wrap;gap:4px 16px;padding:0 16px 10px;border-bottom:0}
.kitt.is-compact .rail-nav .rail-nav-main{border-bottom:0;margin:0;padding-bottom:7px}
