.kfs-card{width:min(720px,calc(100% - 24px));margin:18px auto;padding:20px;border:1px solid rgba(86,220,180,.25);border-radius:24px;background:linear-gradient(145deg,rgba(17,38,36,.97),rgba(9,23,23,.98));box-shadow:0 20px 60px rgba(0,0,0,.28);color:#edf9f5;position:relative;overflow:hidden;z-index:2}.kfs-card header{display:flex;gap:14px;align-items:center}.kfs-card small{color:#63d9b2;font-size:11px;letter-spacing:.14em;font-weight:800}.kfs-card h3{margin:4px 0 0;font-size:20px}.kfs-card p{color:#a9c2ba}.kfs-orbit,.kfs-reveal-mark{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#173d36;position:relative;flex:0 0 auto}.kfs-orbit i,.kfs-reveal-mark span{position:absolute;inset:-5px;border:1px solid #63d9b2;border-radius:50%;border-right-color:transparent;animation:kfs-spin 1.6s linear infinite}.kfs-stats{display:flex;gap:8px;margin:18px 0 12px;flex-wrap:wrap}.kfs-stats span{padding:7px 11px;border-radius:999px;background:rgba(255,255,255,.06);font-size:12px;color:#b8cec7}.kfs-stats b{color:#fff;margin-inline-end:4px}.kfs-hint{font-size:13px;margin:8px 0}.kfs-topics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.kfs-topic{border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.045);color:#e9f8f3;border-radius:14px;padding:12px;text-align:start;min-height:48px;cursor:pointer;transition:.2s}.kfs-topic:hover,.kfs-topic.is-open{border-color:rgba(99,217,178,.45);transform:translateY(-1px)}.kfs-topic span{font-weight:700}.kfs-topic em{display:none;margin-top:7px;color:#a9c2ba;font-style:normal;font-size:12px}.kfs-topic.is-open em{display:block}.kfs-progress{height:3px;background:rgba(255,255,255,.07);border-radius:9px;margin-top:18px;overflow:hidden}.kfs-progress i{display:block;width:40%;height:100%;background:#63d9b2;animation:kfs-progress 1.8s ease-in-out infinite}.kfs-ready{display:grid;grid-template-columns:auto 1fr auto;gap:15px;align-items:center}.kfs-ready-icon{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#63d9b2;color:#08211c;font-weight:900}.kfs-ready button,.kfs-failed button{border:0;border-radius:999px;background:#63d9b2;color:#08211c;padding:11px 16px;font-weight:800;cursor:pointer}.kfs-failed button:disabled{opacity:.6;cursor:wait}.kfs-reveal{position:fixed;inset:0;z-index:99999;background:radial-gradient(circle at center,#173f37,#071312 70%);display:grid;place-content:center;text-align:center;color:white;animation:kfs-in .25s ease-out}.kfs-reveal-mark{margin:auto;width:72px;height:72px;border-radius:50%;display:grid;place-items:center;background:#173d36;position:relative;flex:0 0 auto}.kfs-reveal-mark span{position:absolute;inset:-5px;border:1px solid #63d9b2;border-radius:50%;border-right-color:transparent;animation:kfs-spin 1.6s linear infinite}.kfs-reveal-mark{margin:auto;width:72px;height:72px;font-size:25px}.kfs-reveal p{color:#63d9b2;font-weight:800;letter-spacing:.08em;text-transform:uppercase;margin:24px 0 6px}.kfs-reveal h2{max-width:650px;margin:0 24px;font-size:clamp(25px,5vw,44px)}.read-aloud-button.kfs-autoplay{box-shadow:0 0 0 0 rgba(99,217,178,.55);animation:kfs-pulse 1.2s ease-out 3}@keyframes kfs-spin{to{transform:rotate(360deg)}}@keyframes kfs-progress{0%{transform:translateX(-100%)}100%{transform:translateX(350%)}}@keyframes kfs-in{from{opacity:0;transform:scale(1.02)}}@keyframes kfs-pulse{50%{box-shadow:0 0 0 10px rgba(99,217,178,0)}}@media(max-width:640px){.kfs-card{padding:16px;border-radius:20px}.kfs-topics{grid-template-columns:1fr}.kfs-ready{grid-template-columns:auto 1fr}.kfs-ready button,.kfs-failed button{grid-column:1/-1;width:100%}}@media(prefers-reduced-motion:reduce){.kfs-orbit i,.kfs-progress i,.read-aloud-button.kfs-autoplay{animation:none}.kfs-topic{transition:none}}

/* ==========================================================================
   Chat Skills & Study Plan White Card Theme (20260924)
   ========================================================================== */

/* --- Sticky Composer Skill Badge --- */
.composer-skill-chip-row {
  display: flex !important;
  align-items: center !important;
  padding: 8px 12px 4px !important;
  animation: kvSkillFade 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.composer-skill-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(110, 231, 183, 0.16) !important;
  border: 1px solid rgba(110, 231, 183, 0.38) !important;
  border-radius: 9999px !important;
  padding: 5px 12px 5px 11px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #a7f3d0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  transition: all 0.2s ease !important;
}
.composer-skill-chip em {
  font-style: normal !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
}
.composer-skill-chip svg {
  color: #6ee7b7 !important;
  flex-shrink: 0 !important;
}
.composer-skill-chip button {
  background: rgba(255, 255, 255, 0.1) !important;
  border: none !important;
  color: #6ee7b7 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  margin-inline-start: 4px !important;
  padding: 0 !important;
  transition: all 0.15s ease !important;
}
.composer-skill-chip button:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  transform: scale(1.15) !important;
}
@keyframes kvSkillFade {
  from { opacity: 0; transform: translateY(4px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Search Input Skills Chips (IntentHome) --- */
.intent-home__chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: center !important;
  margin-top: 14px !important;
}
.intent-home__chips .kv-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #d1fae5 !important;
  padding: 7px 15px !important;
  border-radius: 9999px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.intent-home__chips .kv-chip:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(110, 231, 183, 0.45) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}
.intent-home__chips .kv-chip.is-active {
  background: rgba(110, 231, 183, 0.22) !important;
  border-color: #6ee7b7 !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(110, 231, 183, 0.35), inset 0 0 10px rgba(110, 231, 183, 0.15) !important;
}
.intent-home__chips .kv-chip.is-active .chip-icon {
  color: #6ee7b7 !important;
}

/* --- White/Cream Aesthetic for Study Plan & Planning Flow Cards --- */
.study-artifact.kv-paper,
.decision-card.kv-paper,
.placement-card.kv-paper {
  background: #ffffff !important;
  color: #121c1a !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 22px !important;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.25), 0 8px 16px -4px rgba(0, 0, 0, 0.08) !important;
  overflow: hidden !important;
  margin: 16px 0 24px !important;
}

.study-artifact-head {
  background: #fbfcf9 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  padding: 16px 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  cursor: pointer !important;
  width: 100% !important;
  border-top: none !important;
  border-inline: none !important;
}
.study-artifact-icon {
  display: grid !important;
  place-items: center !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  background: #e8f8f0 !important;
  color: #059669 !important;
  flex-shrink: 0 !important;
}
.study-artifact-title strong {
  display: block !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #121c1a !important;
  letter-spacing: -0.01em !important;
}
.study-artifact-title small {
  display: block !important;
  font-size: 13px !important;
  color: #556860 !important;
  margin-top: 2px !important;
}
.study-artifact-chevron {
  color: #889a92 !important;
  margin-inline-start: auto !important;
}

.study-artifact-body {
  background: #ffffff !important;
  color: #121c1a !important;
  padding: 22px 24px !important;
}

/* --- Study Plan Step Nodes (matching workspace flow) --- */
.artifact-steps {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  position: relative !important;
}
.artifact-steps li {
  position: relative !important;
  padding-inline-start: 36px !important;
  padding-bottom: 22px !important;
}
.artifact-steps li:last-child {
  padding-bottom: 8px !important;
}
.artifact-steps li::before {
  content: "" !important;
  position: absolute !important;
  inset-inline-start: 10px !important;
  top: 8px !important;
  bottom: -6px !important;
  width: 2px !important;
  background: #e2e8f0 !important;
}
.artifact-steps li:last-child::before {
  display: none !important;
}
.artifact-steps li::after {
  content: "" !important;
  position: absolute !important;
  inset-inline-start: 4px !important;
  top: 5px !important;
  width: 14px !important;
  height: 14px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 3px solid #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}
.artifact-steps li strong {
  display: inline-block !important;
  color: #121c1a !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  margin-inline-end: 8px !important;
}
.artifact-steps li em {
  display: inline-block !important;
  font-style: normal !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #047857 !important;
  background: #e6f7ef !important;
  padding: 2px 8px !important;
  border-radius: 9999px !important;
}
.artifact-steps li p {
  margin: 6px 0 0 !important;
  color: #4b5a54 !important;
  font-size: 13.5px !important;
  line-height: 1.55 !important;
}

/* --- Card Action Footer Buttons --- */
.artifact-action-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-top: 20px !important;
  padding-top: 18px !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.artifact-action-row .kv-btn--primary,
.decision-card .kv-btn--primary {
  background: #6ee7b7 !important;
  color: #064e3b !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  padding: 10px 24px !important;
  border-radius: 9999px !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(110, 231, 183, 0.35) !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
}
.artifact-action-row .kv-btn--primary:hover,
.decision-card .kv-btn--primary:hover {
  background: #5eead4 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(110, 231, 183, 0.45) !important;
}
.artifact-action-row .kv-btn--secondary,
.decision-card .kv-btn--secondary {
  background: transparent !important;
  color: #334155 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  padding: 9px 20px !important;
  border-radius: 9999px !important;
  border: 1.5px solid rgba(0, 0, 0, 0.14) !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
}
.artifact-action-row .kv-btn--secondary:hover,
.decision-card .kv-btn--secondary:hover {
  background: rgba(0, 0, 0, 0.04) !important;
  color: #0f172a !important;
  border-color: rgba(0, 0, 0, 0.25) !important;
}

/* ==========================================================================
   Study Plan Interactive Cards & Polished Interrupt Pill
   ========================================================================== */

/* --- Card Header & Typography (matching reference screenshot) --- */
.study-artifact-head {
  padding: 22px 26px 18px !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
  background: #ffffff !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}
.study-artifact-kicker {
  display: block !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #059669 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  margin-bottom: 4px !important;
}
.study-artifact-title strong {
  display: block !important;
  font-size: 21px !important;
  font-weight: 800 !important;
  color: #121c1a !important;
  letter-spacing: -0.02em !important;
  line-height: 1.3 !important;
}
.study-artifact-sub {
  display: block !important;
  font-size: 13.5px !important;
  color: #556860 !important;
  margin-top: 6px !important;
  line-height: 1.45 !important;
}
.study-artifact-toggle-btn {
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  margin-inline-start: auto !important;
  padding: 4px !important;
  color: #889a92 !important;
}

/* --- Inner Subject Cards (Exact match to 'Upload materials now' box) --- */
.study-subjects-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-bottom: 16px !important;
}
.study-subject-card {
  background: #f8faf6 !important;
  border: 1px solid rgba(0, 0, 0, 0.07) !important;
  border-radius: 14px !important;
  padding: 15px 18px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
}
.study-subject-card:hover {
  background: #f3f7f0 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}
.study-subject-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}
.study-subject-name {
  font-size: 15.5px !important;
  font-weight: 700 !important;
  color: #121c1a !important;
  flex: 1 !important;
}
.study-subject-meta {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}
.study-subject-badge {
  display: inline-flex !important;
  align-items: center !important;
  background: #e6f7ef !important;
  color: #047857 !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  padding: 3px 10px !important;
  border-radius: 9999px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
}
.study-subject-drop-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.04) !important;
  border: none !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  transition: all 0.15s ease !important;
  opacity: 0.6 !important;
}
.study-subject-card:hover .study-subject-drop-btn {
  opacity: 1 !important;
}
.study-subject-drop-btn:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
  transform: scale(1.1) !important;
}
.study-subject-detail {
  margin: 6px 0 0 !important;
  font-size: 13px !important;
  color: #556860 !important;
  line-height: 1.4 !important;
}

/* --- Inline Add Subject Row --- */
.study-add-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 12px 0 !important;
  padding: 10px 14px !important;
  background: #f8faf6 !important;
  border: 1.5px dashed rgba(16, 185, 129, 0.35) !important;
  border-radius: 12px !important;
}
.study-add-row input {
  flex: 1 !important;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  font-size: 13.5px !important;
  color: #121c1a !important;
  outline: none !important;
}
.study-add-row input:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}
.study-add-toggle-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: 1.5px dashed rgba(0, 0, 0, 0.12) !important;
  border-radius: 12px !important;
  color: #059669 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 10px 16px !important;
  width: 100% !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  margin-bottom: 14px !important;
}
.study-add-toggle-btn:hover {
  background: #f0fdf4 !important;
  border-color: #10b981 !important;
  color: #047857 !important;
}

/* --- Reconciliation Card Options (Replace vs Add) --- */
.reconcile-options-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin-top: 8px !important;
}
.reconcile-option-card {
  background: #f8faf6 !important;
  border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 16px !important;
  padding: 18px 22px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-align: start !important;
}
.reconcile-option-card:hover {
  background: #f0fdf4 !important;
  border-color: #10b981 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12) !important;
}
.reconcile-option-card.recommended {
  border-color: rgba(16, 185, 129, 0.4) !important;
  background: #f4fbf7 !important;
}
.reconcile-option-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}
.reconcile-option-header strong {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #121c1a !important;
}
.reconcile-badge {
  display: inline-block !important;
  border: 1px solid #10b981 !important;
  color: #047857 !important;
  background: #e6f7ef !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 2px 8px !important;
  border-radius: 9999px !important;
  letter-spacing: 0.04em !important;
}
.reconcile-option-card p {
  margin: 6px 0 0 !important;
  font-size: 13.5px !important;
  color: #556860 !important;
  line-height: 1.45 !important;
}

/* --- Card Footer Buttons --- */
.artifact-action-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px !important;
  margin-top: 18px !important;
  padding-top: 16px !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.kv-btn--danger-ghost {
  background: transparent !important;
  color: #94a3b8 !important;
  border: 1px solid transparent !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 8px 16px !important;
  border-radius: 9999px !important;
  cursor: pointer !important;
  margin-inline-start: auto !important;
  transition: all 0.15s ease !important;
}
.kv-btn--danger-ghost:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
}

/* --- Polished Interrupt Glass Badge (replacing ugly purple/red button) --- */
.planning-flow-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  padding: 6px 14px 6px 10px !important;
  margin-bottom: 12px !important;
  border-radius: 9999px !important;
  font-size: 12.5px !important;
  background: rgba(16, 185, 129, 0.1) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
  color: #d1fae5 !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}
.planning-flow-pill .pulse-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  box-shadow: 0 0 8px #10b981 !important;
  animation: kvPulseDot 1.6s ease-in-out infinite !important;
}
@keyframes kvPulseDot {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 12px #34d399; }
  100% { transform: scale(0.9); opacity: 0.6; }
}
.planning-flow-pill .pill-label {
  font-weight: 500 !important;
  color: #f0fdf4 !important;
}
.planning-flow-pill .pill-cancel-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  border-radius: 9999px !important;
  padding: 2px 10px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  margin-inline-start: 4px !important;
  transition: all 0.15s ease !important;
}
.planning-flow-pill .pill-cancel-btn:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #fca5a5 !important;
}

/* --- Bottom Viewport Clearance to Prevent Composer Overlap --- */
.chat-page, .chat-view, .chat-content, .chat-thread, .messages-viewport {
  padding-bottom: 160px !important;
}
.study-artifact {
  margin-bottom: 24px !important;
}
