/* SkillBench Ramp — brand: Mint #55B184, Cyan #43BBEA, Charcoal #3A3F51,
   Faint Gray #F0ECEC, Melon #EEB6B3. Typeface: Figtree. */

:root {
  --mint: #55B184;
  --cyan: #43BBEA;
  --charcoal: #3A3F51;
  --faint: #F0ECEC;
  --melon: #EEB6B3;
  --ink: #2c3040;
  --paper: #ffffff;
  --soft: #f7f5f4;
  --line: #e6e1e0;
  --grad: linear-gradient(120deg, var(--mint), var(--cyan));
  --radius: 14px;
  --shadow: 0 6px 24px rgba(58, 63, 81, 0.10);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--charcoal);
  background: var(--soft);
}

button { font-family: inherit; }
textarea, input { font-family: inherit; color: var(--charcoal); }

/* ---------------- welcome gate ---------------- */

.gate {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background:
    radial-gradient(560px 280px at 12% -5%, rgba(85,177,132,0.14), transparent 60%),
    radial-gradient(560px 280px at 88% 105%, rgba(67,187,234,0.14), transparent 60%),
    var(--soft);
  padding: 32px 16px;
}

.gate-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 44px 48px 40px;
  width: min(440px, 92vw);
  text-align: center;
}

.gate-logo { height: 34px; display: block; margin: 0 auto 22px; }

.gate-card h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gate-sub { color: #6a6f82; font-size: 15px; line-height: 1.55; margin: 0 0 26px; }

.gate-card form { display: flex; flex-direction: column; gap: 12px; }

.gate-card input {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease;
}
.gate-card input:focus { border-color: var(--cyan); }

.gate-error { color: #c0564f; font-size: 13.5px; margin: 2px 0 0; }
.gate-foot { color: #9aa0b2; font-size: 12.5px; letter-spacing: 0.02em; }

/* ---------------- buttons ---------------- */

.btn-primary {
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 3px 12px rgba(85, 177, 132, 0.28);
}
.btn-primary:hover { box-shadow: 0 5px 18px rgba(67, 187, 234, 0.34); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.55; cursor: default; box-shadow: none; }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--mint);
  font-weight: 700;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------- app shell ---------------- */

.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 880px;
  margin: 0 auto;
  background: var(--paper);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}

.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-logo { height: 24px; }
.topbar-divider { width: 1px; height: 20px; background: var(--line); }
.topbar-app {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar-right { display: flex; align-items: center; gap: 16px; }

.user-chip {
  background: var(--faint);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
}
.user-chip .tier { color: #8a90a4; font-weight: 500; }

.meter { display: flex; align-items: center; gap: 7px; }
.meter-label { font-size: 11px; font-weight: 700; color: #9aa0b2; }
.meter-track {
  width: 110px;
  height: 8px;
  background: var(--faint);
  border-radius: 999px;
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.meter-value { font-size: 12.5px; font-weight: 800; color: var(--mint); min-width: 30px; }

/* ---------------- tabs ---------------- */

.tabs { display: flex; gap: 4px; padding: 10px 22px 0; border-bottom: 1px solid var(--line); }

.tab {
  position: relative;
  background: none;
  border: none;
  font-size: 14.5px;
  font-weight: 700;
  color: #8a90a4;
  padding: 10px 16px 12px;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
}
.tab.active { color: var(--charcoal); border-image: var(--grad) 1; border-bottom: 2.5px solid var(--mint); }

.nudge-dot {
  position: absolute;
  top: 8px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--melon);
}

/* ---------------- explore / chat ---------------- */

.view { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.thread {
  flex: 1;
  overflow-y: auto;
  padding: 26px 26px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bot-row { display: flex; gap: 12px; align-items: flex-start; }
.avatar { width: 30px; height: 30px; margin-top: 2px; flex: none; }

.bubble {
  max-width: 86%;
  border-radius: var(--radius);
  padding: 13px 17px;
  font-size: 15px;
  line-height: 1.62;
}
.bubble p:first-child { margin-top: 0; }
.bubble p:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { margin: 8px 0; padding-left: 22px; }
.bubble li { margin: 3px 0; }
.bubble code {
  background: rgba(58, 63, 81, 0.07);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 13px;
}
.bubble h1, .bubble h2, .bubble h3 { font-size: 16px; margin: 12px 0 6px; }
.bubble strong { font-weight: 700; }

.bot-bubble { background: var(--soft); border: 1px solid var(--line); border-top-left-radius: 4px; }

.user-row { display: flex; justify-content: flex-end; }
.user-bubble {
  background: var(--charcoal);
  color: #fff;
  border-top-right-radius: 4px;
}

.msg-tools { margin-top: 8px; display: flex; gap: 10px; }
.flag-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: #a8adc0;
  cursor: pointer;
}
.flag-btn:hover { color: var(--melon); }
.flag-form { margin-top: 8px; display: flex; gap: 8px; }
.flag-form input {
  flex: 1;
  border: 1.5px solid var(--melon);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
}
.flag-form button {
  background: var(--melon);
  color: var(--charcoal);
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 13px;
  cursor: pointer;
}
.flag-done { font-size: 12.5px; color: var(--mint); font-weight: 600; margin-top: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease;
}
.chip:hover { border-color: var(--cyan); color: var(--cyan); }

.typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); opacity: 0.4;
  animation: blink 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; background: var(--mint); }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 70%, 100% { opacity: 0.25; } 35% { opacity: 1; } }

.nudge-banner {
  margin: 0 26px 10px;
  padding: 11px 16px;
  background: linear-gradient(120deg, rgba(85,177,132,0.10), rgba(67,187,234,0.10));
  border: 1px solid rgba(85,177,132,0.35);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.composer {
  display: flex;
  gap: 10px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--line);
  align-items: flex-end;
}
.composer textarea {
  flex: 1;
  resize: none;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 15px;
  font-size: 15px;
  line-height: 1.5;
  outline: none;
  max-height: 160px;
  transition: border-color 0.15s ease;
}
.composer textarea:focus { border-color: var(--mint); }
.btn-send { padding: 12px 20px; }

/* ---------------- calibrate ---------------- */

#view-calibrate { overflow-y: auto; padding: 28px 30px 40px; display: block; }

.cal-intro h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 8px; }
.cal-intro p { color: #6a6f82; font-size: 15px; line-height: 1.6; max-width: 640px; margin: 0 0 20px; }

#cal-form textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.6;
  outline: none;
  resize: vertical;
}
#cal-form textarea:focus { border-color: var(--mint); }

.cal-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.cal-status { font-size: 13.5px; color: #8a90a4; font-weight: 600; }

/* report */

.report { margin-top: 30px; }

.report-banner {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.report-banner.pending {
  background: rgba(238, 182, 179, 0.16);
  border: 1px solid rgba(226, 147, 142, 0.45);
}
.report-banner.reviewed {
  background: linear-gradient(120deg, rgba(85,177,132,0.10), rgba(67,187,234,0.10));
  border: 1px solid rgba(85, 177, 132, 0.4);
}

.manager-note {
  border-left: 3.5px solid var(--mint);
  background: var(--soft);
  border-radius: 0 12px 12px 0;
  padding: 12px 16px;
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.manager-note span { font-weight: 800; color: var(--mint); margin-right: 6px; }

.report-head {
  display: flex;
  gap: 26px;
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 22px;
}
.dial { flex: none; }
.dial text { font-weight: 800; }
.report-read { font-size: 15px; line-height: 1.6; }

.report-section { margin-bottom: 22px; }
.report-section h3 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-mint { background: var(--mint); }
.dot-melon { background: #e2938e; }
.dot-cyan { background: var(--cyan); }

.report-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  font-size: 14.5px;
  line-height: 1.55;
  background: #fff;
}
.report-item.right { border-left: 3.5px solid var(--mint); }
.report-item.gap { border-left: 3.5px solid var(--cyan); }

.correction { border-left: 3.5px solid #e2938e; }
.correction .they-said { color: #8a90a4; font-style: italic; }
.correction .fix { margin-top: 6px; }
.correction .why { margin-top: 6px; font-size: 13.5px; color: #6a6f82; }
.correction .why::before { content: "Why it matters: "; font-weight: 700; color: var(--charcoal); }

.next-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------- scrollbars ---------------- */

.thread::-webkit-scrollbar, #view-calibrate::-webkit-scrollbar { width: 10px; }
.thread::-webkit-scrollbar-thumb, #view-calibrate::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}

@media (max-width: 700px) {
  .meter { display: none; }
  .bubble { max-width: 94%; }
  .app { border: none; }
}
