/* ============================================================
   OpenSourcePath — module: Learn
   The Learning centre shows an entry card, then opens the
   original Git Assist app (vendor/git-assist/index.html) as a
   full-screen takeover of the current tab. The styles below
   style that card and takeover inside the dashboard shell;
   the app's own styles live in vendor/git-assist/css/*.
   The landing-page ".soon" section styles are kept here
   because index.html loads this stylesheet.
   ============================================================ */

/* ---------- dashboard: entry card + full-screen takeover ---------- */
.learn-entry {
  width: 100%;
  max-width: 780px;
  margin-inline: auto;
}

/* ---------- entry card: live tutorial progress ---------- */
.learn-progress {
  width: min(460px, 100%);
  display: grid;
  gap: 7px;
  padding: 14px 18px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--panel-2) 72%, transparent);
  text-align: left;
}
.learn-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.learn-progress-head span { display: inline-flex; align-items: center; gap: 7px; }
.learn-progress-head .ph { color: var(--accent); font-size: 14px; }
.learn-progress-head b { font-size: 14px; color: var(--accent); }
/* Identity row: same signed-in account as the dashboard (topbar/sidebar) */
.learn-who { justify-content: flex-start; gap: 8px; }
.learn-who .avatar { width: 26px; height: 26px; font-size: 10.5px; }
.learn-who-name { text-transform: none; letter-spacing: 0; font-family: var(--font-sans); font-size: 13.5px !important; color: var(--text) !important; }
.learn-who .mono-dim { font-size: 11px; }
.learn-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--panel-3);
  overflow: hidden;
}
.learn-progress-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff 40%));
  transition: width 0.6s var(--ease);
}
.learn-progress-foot {
  font-size: 12.5px;
  color: var(--text-3);
}
.learn-progress-foot span { display: inline-flex; align-items: center; gap: 7px; }
.learn-progress-foot .ph { color: var(--accent); }
.learn-progress-done { color: var(--accent); font-weight: 700; }

/* Resume chip: sits in the soon-list, shown when the app has an
   unfinished tutorial open. Styled like the other static chips. */
.learn-resume-chip {
  cursor: pointer;
  border-color: var(--accent-line) !important;
  color: var(--accent) !important;
  background: var(--accent-soft) !important;
}
.learn-resume-chip:hover { transform: translateY(-1px); }
.learn-resume-chip[hidden] { display: none; }

/* ---------- takeover: animated open / close ---------- */
.assist-takeover {
  position: fixed;
  inset: 0;
  z-index: 300; /* above topbar (100), chatbot (150) and modal (200) */
  display: flex;
  flex-direction: column;
  background: var(--bg);
  opacity: 0;
  transform: scale(0.97) translateY(14px);
  transition: opacity 0.28s var(--ease), transform 0.32s var(--ease);
  will-change: opacity, transform;
}
.assist-takeover.is-open { opacity: 1; transform: none; }
.assist-takeover.is-opening { pointer-events: none; }
.assist-takeover.is-closing {
  opacity: 0;
  transform: scale(0.98) translateY(10px);
  pointer-events: none;
}
.assist-takeover-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.assist-takeover-bar {
  transform: translateY(-100%);
  transition: transform 0.32s var(--ease);
}
.is-open .assist-takeover-bar, .is-closing .assist-takeover-bar { transform: none; }
.assist-takeover-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-inline: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
}
.assist-takeover-title .ph {
  font-size: 16px;
  color: var(--accent);
}
.assist-takeover-body {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #fff;
}
.assist-takeover .assist-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.assist-note { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); }

/* Freeze the dashboard behind the takeover so scrolling the
   frame's overscroll can never move the shell underneath. */
body.assist-lock { overflow: hidden; }

/* ---------- landing "learn" section (index.html #learn) ---------- */
.soon {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
  padding: clamp(30px, 4.6vw, 56px) clamp(20px, 4vw, 48px);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--accent-soft), transparent 60%), var(--panel);
}
.soon-ico {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 27px;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: var(--shadow-btn);
}
.soon-assis {
  width: clamp(100px, 11vw, 130px);
  height: auto;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.3));
}
.soon h3 { font-size: clamp(22px, 2.8vw, 32px); max-width: 24ch; }
.soon p { max-width: 56ch; color: var(--text-2); font-size: 15.5px; }
.soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 5px 13px;
}
.soon-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.soon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
