/* Learning hub and guided lessons. Positioning and lesson state live in tutorial.js. */
.learning-hub,
.account-grid > .panel.learning-hub {
  display: block;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  padding: clamp(20px, 2.7vw, 30px);
  border-color: #ff81be3b;
  background: radial-gradient(ellipse at 0 0, #ff389c12, transparent 60%), linear-gradient(145deg, #241a2b, #17121e 75%);
}
.learning-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 23px;
}
.learning-header > div { min-width: 0; }
.learning-header h2 { margin: 0; font-size: 21px; line-height: 1.3; letter-spacing: -.035em; }
.learning-header p { max-width: 640px; margin: 9px 0 0; color: #b8aabe; font-size: 12px; line-height: 1.75; }
.learning-summary {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid #ff8bc339;
  border-radius: 11px;
  background: #ff3b9b09;
  color: #e8c2d9;
  font-size: 11px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.learning-summary strong { color: #ff9bd1; font-size: 15px; font-weight: 600; }
.learning-summary svg { flex-shrink: 0; color: #ff79bb; }
.learning-courses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: 100%; }
.learning-course {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  border: 1px solid #eab8d329;
  border-radius: 17px;
  background: linear-gradient(145deg, #211826, #17121d);
  box-shadow: inset 0 1px 0 #ffe5f30a;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.learning-course-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 17px; }
.learning-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid #ff81bc37;
  border-radius: 11px;
  background: linear-gradient(135deg, #ff369c25, #af3c9916);
  color: #ff85c3;
}
.learning-icon svg { width: 19px; height: 19px; }
.learning-course h3 { margin: 0 0 9px; color: #faf0f8; font-size: 16px; font-weight: 600; letter-spacing: -.025em; line-height: 1.4; }
.learning-course p { flex: 1; margin: 0; color: #b4a7be; font-size: 12px; line-height: 1.75; }
.learning-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; color: #bfa5b9; font-size: 10px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.learning-course > .learning-meta { margin-top: 15px; }
.learning-progress,.tour-progress { overflow: hidden; height: 3px; border-radius: 8px; background: #ffffff0d; }
.learning-progress { margin: 17px 0 15px; }
.learning-progress > span,.tour-progress > span { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff399d, #ff91cd); box-shadow: 0 0 10px #ff399d45; transition: width .2s ease; }
.learning-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: auto; padding-top: 17px; }
.learning-progress + .learning-actions { padding-top: 0; }
.learning-actions :is(.primary,.key) { min-height: 36px; padding: 8px 12px; border-radius: 10px; font-size: 11px; }
.learning-actions .minor { min-height: 32px; font-size: 11px; }
.learning-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 17px; color: #b0a1b7; font-size: 11px; line-height: 1.7; }
.learning-note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; color: #d496ba; }
.learning-note p { margin: 0; }
.learning-course.is-complete { border-color: #ff85bf4d; }
.learning-course.is-complete .learning-meta { color: #f1b9d7; }

#tour-root { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
#tour-root .tour-catcher { position: fixed; inset: 0; z-index: 40; pointer-events: auto; background: transparent; touch-action: none; }
#tour-root[data-centered="true"] .tour-catcher { background: #09060ed9; }
#tour-root .tour-highlight { position: fixed; z-index: 41; pointer-events: none; border-radius: 13px; outline: 2px solid #ff6db6; outline-offset: 2px; box-shadow: 0 0 0 9999px #08050dc4, 0 0 24px #ff3b9c42; }
#tour-root .tour-highlight[hidden] { display: none; }
#tour-root .tour-card {
  position: fixed;
  z-index: 42;
  left: 14px;
  top: 14px;
  width: min(380px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px;
  border: 1px solid #ff91cc6b;
  border-radius: 20px;
  background: radial-gradient(ellipse at 0 0, #ff329e16, transparent 65%), linear-gradient(145deg, #302033, #1a121f 80%);
  box-shadow: inset 0 1px 0 #ffe0ef23, 0 20px 75px #000a, 0 0 40px #ff258e13;
  color: #faf0f8;
  pointer-events: auto;
  scrollbar-width: thin;
  scrollbar-color: #ae5987 #1a121f;
  animation: tutorial-appear .18s ease-out;
}
.tour-card .tour-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tour-top .meta { color: #c3a7be; font-size: 10px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.tour-card .tour-top button { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; padding: 0; border: 1px solid #ffffff1a; border-radius: 50%; color: #cdb9d0; background: #ffffff04; }
.tour-progress { margin-bottom: 18px; }
.tour-kicker { color: #ff8bc7; font-size: 9px; font-weight: 600; line-height: 1.5; letter-spacing: .1em; text-transform: uppercase; }
.tour-card h3,.tour-card h2 { margin: 8px 0 11px; font: 600 21px/1.3 var(--sans); letter-spacing: -.035em; text-wrap: balance; }
.tour-card p { margin: 0; color: #ccbdd2; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.tour-card .tour-summary { margin-top: 13px; color: #a99ab3; font-size: 11px; line-height: 1.65; }
.tour-example { margin: 15px 0 0; padding: 13px 14px; border: 1px solid #ff9cd329; border-radius: 12px; background: #0e0b1399; color: #e5cde0; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.tour-example :is(p,strong,span) { color: inherit; }
.tour-example strong { display: block; margin-bottom: 6px; font-size: 10px; letter-spacing: .02em; }
.tour-practice { display: grid; gap: 9px; margin-top: 16px; }
.tour-practice label { display: grid; gap: 8px; color: #e0cbdc; font-size: 11px; line-height: 1.6; }
.tour-practice textarea { display: block; width: 100%; min-height: 80px; max-height: 200px; margin: 0; padding: 11px 12px; border: 1px solid #c299b33b; border-radius: 11px; background: #0e0a14; color: #faeef7; font: 400 12px/1.7 var(--sans); resize: vertical; }
.tour-practice textarea::placeholder { color: #93829e; }
.tour-practice textarea:focus { border-color: #ff7fbd; }
.tour-choice { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.tour-practice .tour-choice { margin-top: 0; }
.tour-choice button { min-height: 34px; max-width: 100%; padding: 8px 11px; border: 1px solid #ffffff23; border-radius: 10px; background: #ffffff04; color: #d9c7de; text-align: left; font-size: 11px; line-height: 1.5; transition: border-color .18s, background .18s, color .18s; }
.tour-choice button:is([aria-pressed="true"],.selected) { color: #ffe6f3; border-color: #ff7fc48c; background: linear-gradient(135deg, #ff409c29, #b33b8a1c); box-shadow: inset 0 1px 0 #ffc1df12; }
.tour-card .tour-feedback { margin-top: 11px; padding: 10px 12px; color: #f0c7df; border-left: 2px solid #ff6eb6; border-radius: 0 8px 8px 0; background: #ff409c0a; font-size: 11px; line-height: 1.7; }
.tour-feedback:empty { display: none; }
.tour-card .actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 9px 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #ffffff10; }
.tour-card .actions .primary { min-height: 36px; margin-left: auto; padding: 9px 14px; border-radius: 11px; font-size: 12px; }
.tour-card .actions .minor { min-height: 32px; font-size: 11px; }
.tour-complete { padding-top: 8px; text-align: center; }
.tour-complete > svg,.tour-complete > .learning-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 17px; padding: 11px; border: 1px solid #ff8fc351; border-radius: 15px; background: #ff329b17; color: #ff97c9; }
.tour-complete h3 { font-size: 23px; }
.tour-complete .tour-summary { padding: 13px; border: 1px solid #ffffff12; border-radius: 12px; background: #ffffff03; }
.learning-hub :is(button,a):focus-visible,.tour-card :is(button,textarea,a):focus-visible { outline: 2px solid #ffb6dc; outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .learning-course:hover { border-color: #ff88c45c; box-shadow: inset 0 1px 0 #ffdced12, 0 10px 24px #0003; }
  .tour-card .tour-top button:hover { color: #ffdbef; border-color: #ff84bf5b; background: #ff389d11; }
  .tour-choice button:hover:not(:disabled) { border-color: #ff8fc378; background-color: #ff5bae11; color: #ffe4f3; }
}
@media (max-width: 760px) {
  .learning-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .learning-courses { grid-template-columns: 1fr; gap: 12px; }
  .learning-course { padding: 19px; }
  .learning-course-top { margin-bottom: 13px; }
  .learning-header h2 { font-size: 20px; }
  #tour-root .tour-card { padding: 18px; border-radius: 18px; }
  .tour-card h3,.tour-card h2 { font-size: 20px; }
}
@media (max-height: 530px) {
  #tour-root .tour-card { padding: 16px; }
  .tour-card .tour-top { margin-bottom: 7px; }
  .tour-progress { margin-bottom: 12px; }
  .tour-card .actions { margin-top: 13px; padding-top: 12px; }
}
@keyframes tutorial-appear { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  #tour-root .tour-card { animation: none; }
  .learning-course,.learning-progress > span,.tour-progress > span,.tour-choice button { transition: none; }
}
@media (forced-colors: active) {
  .learning-hub,.account-grid > .panel.learning-hub,.learning-course,.learning-summary,.learning-icon,#tour-root .tour-card,.tour-example,.tour-practice textarea,.tour-choice button,.tour-card .tour-feedback { border-color: CanvasText; background: Canvas; color: CanvasText; box-shadow: none; }
  #tour-root .tour-highlight { outline-color: Highlight; box-shadow: none; }
  #tour-root[data-centered="true"] .tour-catcher { background: Canvas; opacity: .85; }
  .learning-progress,.tour-progress { border: 1px solid CanvasText; }
  .learning-progress > span,.tour-progress > span { background: Highlight; box-shadow: none; }
  .tour-choice button:is([aria-pressed="true"],.selected) { border-color: Highlight; outline: 1px solid Highlight; }
  .learning-hub :is(button,a):focus-visible,.tour-card :is(button,textarea,a):focus-visible { outline-color: Highlight; }
}
