/* Clean child/parent beta UI: inline code badge, live context-aware AI tutor drawer, separate feedback toggle */
.beta-gate-bg {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .72); z-index: 990;
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.beta-gate-card {
  background: #fff; border-radius: 20px; max-width: 440px; width: 100%;
  padding: 26px; box-shadow: 0 24px 60px rgba(15, 23, 42, .32); color: #0f172a;
}
.beta-gate-card h2 { margin: 0 0 8px; font-size: 21px; }
.beta-gate-card p { margin: 0 0 14px; font-size: 14px; color: #475569; line-height: 1.5; }
.beta-gate-card input[type="text"] {
  width: 100%; padding: 12px 14px; border: 2px solid #cbd5e1; border-radius: 12px;
  font-size: 16px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.beta-gate-check {
  display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #334155;
  margin: 14px 0 16px; cursor: pointer;
}
.beta-gate-btn {
  width: 100%; border: none; border-radius: 12px; padding: 13px; font-size: 15px;
  font-weight: 700; background: #1f5c45; color: #fff; cursor: pointer;
}
.beta-gate-err { color: #dc2626; font-size: 13px; margin-top: 8px; min-height: 18px; }
.beta-grades { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 10px 0 4px; }
.beta-grade-btn {
  border: 1.5px solid #cbd5e1; background: #f8fafc; border-radius: 10px; padding: 8px 9px;
  font-size: 12.5px; font-weight: 600; color: #334155; cursor: pointer; text-align: center;
}
.beta-grade-btn.active { border-color: #1f5c45; background: #ecfdf5; color: #14532d; }

.beta-pill {
  background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 999px;
  padding: 5px 10px; font-size: 12px; font-weight: 700; color: #1f5c45;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.beta-pill--float { position: fixed; bottom: 20px; left: 20px; z-index: 820; box-shadow: 0 4px 12px rgba(15,23,42,.1); }
.beta-pill button {
  border: none; background: #e2e8f0; color: #334155; border-radius: 999px;
  padding: 2px 8px; font-size: 11px; font-weight: 600; cursor: pointer;
}

.beta-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 900;
  border: none; border-radius: 999px; padding: 13px 18px;
  background: #1f5c45; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer;
  box-shadow: 0 10px 26px rgba(31, 92, 69, .32);
}
.beta-drawer {
  position: fixed; right: 20px; bottom: 76px; width: 390px; max-width: calc(100vw - 24px);
  max-height: 76vh; background: #fff; border: 1.5px solid #cbd5e1; border-radius: 18px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .22); z-index: 910;
  display: none; flex-direction: column; overflow: hidden;
}
.beta-drawer.open { display: flex; }
.beta-drawer-head {
  background: #1f5c45; color: #fff; padding: 11px 13px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.beta-head-btns { display: flex; gap: 6px; align-items: center; }
.beta-head-btn {
  border: none; background: rgba(255, 255, 255, .2); color: #fff;
  border-radius: 7px; padding: 4px 8px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.beta-ctx-bar {
  padding: 7px 12px; background: #ecfdf5; border-bottom: 1px solid #bbf7d0;
  font-size: 12px; color: #14532d; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.beta-fb-panel {
  display: none; padding: 8px 10px; background: #fff7ed; border-bottom: 1px solid #fed7aa;
  gap: 6px; align-items: center;
}
.beta-fb-panel.open { display: flex; }
.beta-fb-panel input { flex: 1; padding: 6px 8px; border: 1px solid #fdba74; border-radius: 8px; font-size: 12px; }
.beta-drawer-log {
  padding: 12px; overflow-y: auto; flex: 1; background: #f8fafc;
  display: flex; flex-direction: column; gap: 8px; min-height: 180px;
}
.beta-msg { padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; max-width: 92%; white-space: pre-wrap; }
.beta-msg.bot { background: #fff; border: 1px solid #e2e8f0; color: #0f172a; align-self: flex-start; }
.beta-msg.kid { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; align-self: flex-end; }
.beta-msg.sys { background: transparent; color: #64748b; font-size: 11.5px; align-self: center; padding: 2px 6px; }
.beta-chips {
  padding: 7px 10px 4px; border-top: 1px solid #e2e8f0; background: #fff;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.beta-chip {
  border: 1px solid #cbd5e1; background: #f8fafc; border-radius: 999px;
  padding: 5px 10px; font-size: 12px; font-weight: 600; color: #1e293b; cursor: pointer;
}
.beta-chip:hover { border-color: #1f5c45; background: #ecfdf5; color: #14532d; }
.beta-chat-form {
  padding: 8px 10px 10px; background: #fff; display: flex; gap: 6px; align-items: center;
}
.beta-chat-form input {
  flex: 1; padding: 9px 11px; border: 1.5px solid #cbd5e1; border-radius: 11px;
  font-size: 13.5px; outline: none;
}
.beta-chat-form input:focus { border-color: #1f5c45; }
.beta-chat-send {
  border: none; background: #1f5c45; color: #fff; border-radius: 11px;
  padding: 9px 13px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.beta-chat-send:disabled { opacity: .55; cursor: default; }
.beta-jump-wrap { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #cbd5e1; display: flex; flex-direction: column; gap: 6px; }
.beta-jump-note { font-size: 12px; color: #334155; }
.beta-jump-btn {
  border: 1.5px solid #1f5c45; background: #ecfdf5; color: #14532d; border-radius: 9px;
  padding: 6px 10px; font-size: 12px; font-weight: 700; cursor: pointer; text-align: left;
}
.beta-nudge {
  position: fixed; right: 20px; bottom: 74px; max-width: 310px; z-index: 905;
  background: #fff; border: 2px solid #1f5c45; border-radius: 16px; padding: 11px 13px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .2); display: flex; flex-direction: column; gap: 8px;
}
.beta-nudge-txt { font-size: 13px; color: #0f172a; line-height: 1.4; font-weight: 500; }
.beta-nudge-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.beta-nudge-go {
  border: none; background: #1f5c45; color: #fff; border-radius: 999px;
  padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.beta-nudge-alt {
  border: 1px solid #cbd5e1; background: #f8fafc; color: #1e293b; border-radius: 999px;
  padding: 5px 10px; font-size: 11.5px; font-weight: 600; cursor: pointer;
}
.beta-nudge-x { border: none; background: #f1f5f9; color: #475569; border-radius: 999px; padding: 4px 8px; cursor: pointer; font-size: 12px; margin-left: auto; }
@keyframes betaSpotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, .65), 0 0 0 4px rgba(31, 92, 69, .85); }
  50% { box-shadow: 0 0 0 10px rgba(234, 88, 12, 0), 0 0 0 4px rgba(234, 88, 12, .9); }
}
.beta-spot { animation: betaSpotPulse 1.1s ease-in-out 4; border-radius: 14px; position: relative; z-index: 60; }
