@import url('/assets/css/cesba-design-system.css');
/* =========================================================
   Campus Rikytoon · CESBA · Materias 2.0
   Shared visual layer for top-level subject routes.
   ========================================================= */

:root{
  --subject-surface:#091a2c;
  --subject-surface-2:#071421;
  --subject-border:rgba(136,146,176,.11);
  --subject-muted:#71879f;
}

/* Stable app-like shell */
body{background:
  radial-gradient(760px circle at 50% -8%,rgba(var(--route-rgb),.085),transparent 62%),
  radial-gradient(circle at 8% 0%,rgba(49,75,145,.19),transparent 30%),
  linear-gradient(180deg,#050d18,#07111f 58%,#071421)
}
.shell{width:min(1260px,calc(100% - 40px))}
.topbar{
  top:8px;
  min-height:64px;
  margin-bottom:8px;
  padding:7px 9px;
  border:1px solid rgba(var(--route-rgb),.13);
  border-radius:17px;
  background:rgba(5,16,28,.965);
  box-shadow:0 15px 38px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.022);
  -webkit-backdrop-filter:blur(20px);
  backdrop-filter:blur(20px)
}
.topbar::before,.topbar.scrolled::before{display:none}
.topbar.scrolled{
  border-bottom-color:rgba(var(--route-rgb),.16);
  background:rgba(5,16,28,.988)
}
.identity{min-width:0}
.mark{
  width:40px;height:40px;
  border-radius:10px;
  box-shadow:inset 0 0 18px rgba(var(--route-rgb),.035)
}
.identity strong{font-size:.84rem}
.identity small{
  max-width:430px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:.60rem
}
.back{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  padding:0 11px;
  border:1px solid rgba(var(--route-rgb),.12);
  border-radius:9px;
  background:rgba(var(--route-rgb),.025);
  color:#8ea2b9;
  font-size:.64rem;
  font-weight:800
}
.back:hover{
  color:#eefaff;
  border-color:rgba(var(--route-rgb),.24);
  background:rgba(var(--route-rgb),.05)
}

/* Hero becomes academic header instead of landing page */
.hero{
  max-width:none;
  padding:38px 0 24px;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:0
}
.hero::before{
  width:430px;height:190px;
  left:auto;right:8%;top:38px;
  opacity:.72
}
.kicker{
  margin-bottom:9px;
  font-size:.58rem;
  letter-spacing:.12em
}
.hero h1{
  max-width:920px;
  font-size:clamp(2.35rem,5vw,4.4rem);
  line-height:.97;
  letter-spacing:-2.4px
}
.hero p.copy{
  max-width:800px;
  margin-top:15px;
  font-size:.82rem;
  line-height:1.68
}
.meta{
  gap:6px;
  margin-top:16px
}
.meta span{
  padding:5px 8px;
  font-size:.54rem
}
.route-status{
  margin-top:16px!important;
  gap:6px!important
}
.route-status span{
  padding:6px 9px!important;
  font-size:.56rem!important
}
.course-note{
  margin:0 0 24px!important;
  padding:12px 14px!important;
  border-radius:10px!important;
  font-size:.68rem!important;
  line-height:1.55!important
}

/* Subject 2.0 dashboard */
.subject-v2-dashboard{
  margin:0 0 28px;
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(330px,.55fr);
  gap:12px
}
.subject-v2-main,
.subject-v2-stats{
  border:1px solid rgba(var(--route-rgb),.13);
  border-radius:19px;
  background:
    radial-gradient(420px circle at 0 0,rgba(var(--route-rgb),.065),transparent 64%),
    linear-gradient(145deg,rgba(10,29,48,.96),rgba(6,18,31,.98));
  box-shadow:0 20px 50px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.022)
}
.subject-v2-main{
  min-height:205px;
  padding:22px;
  display:flex;
  flex-direction:column;
  justify-content:space-between
}
.subject-v2-topline,
.subject-v2-continue-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px
}
.subject-v2-eyebrow{
  color:var(--route);
  font:850 .55rem Consolas,monospace;
  letter-spacing:.11em
}
.subject-v2-state{
  min-height:24px;
  display:inline-flex;align-items:center;
  padding:0 8px;
  border:1px solid rgba(var(--route-rgb),.14);
  border-radius:999px;
  color:#88a0b9;
  background:rgba(var(--route-rgb),.025);
  font:800 .52rem Consolas,monospace
}
.subject-v2-main h2{
  margin:27px 0 0;
  max-width:780px;
  color:#f0f7ff;
  font:800 clamp(1.35rem,2.7vw,2.05rem)/1.08 Manrope,Inter,sans-serif;
  letter-spacing:-.7px
}
.subject-v2-main>p{
  max-width:760px;
  margin:7px 0 0;
  color:#7890a9;
  font-size:.67rem;
  line-height:1.55
}
.subject-v2-track{
  height:6px;
  margin:18px 0 11px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(136,146,176,.10)
}
.subject-v2-track>span{
  display:block;height:100%;width:0;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--route2),var(--route));
  box-shadow:0 0 16px rgba(var(--route-rgb),.20);
  transition:width .6s ease
}
.subject-v2-continue-footer small{
  color:#627b95;
  font-size:.57rem
}
.subject-v2-continue{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  border:1px solid rgba(var(--route-rgb),.20);
  border-radius:9px;
  color:#f0faff;
  background:linear-gradient(135deg,rgba(var(--route-rgb),.18),rgba(49,75,145,.20));
  font-size:.61rem;
  font-weight:850
}
.subject-v2-continue:hover{
  border-color:rgba(var(--route-rgb),.34);
  transform:translateY(-1px)
}
.subject-v2-continue.is-disabled{
  pointer-events:none;
  opacity:.55
}
.subject-v2-stats{
  padding:18px;
  display:grid;
  grid-template-columns:120px minmax(0,1fr);
  gap:14px;
  align-items:center
}
.subject-v2-ring{
  --p:0;
  width:112px;height:112px;
  display:grid;place-items:center;
  position:relative;
  border-radius:50%;
  background:conic-gradient(var(--route) calc(var(--p)*1%),rgba(136,146,176,.10) 0)
}
.subject-v2-ring::after{
  content:"";
  position:absolute;inset:9px;
  border-radius:50%;
  background:#081827
}
.subject-v2-ring>div{
  position:relative;z-index:1;
  text-align:center
}
.subject-v2-ring strong{
  display:block;
  color:#eff8ff;
  font:800 1.55rem/1 Manrope,Inter,sans-serif
}
.subject-v2-ring span{
  display:block;
  margin-top:4px;
  color:#60778f;
  font-size:.49rem
}
.subject-v2-stat-list{
  display:grid;
  gap:8px
}
.subject-v2-stat{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:31px;
  padding-bottom:7px;
  border-bottom:1px solid rgba(136,146,176,.075)
}
.subject-v2-stat:last-child{border-bottom:0;padding-bottom:0}
.subject-v2-stat span{
  color:#6c839b;
  font-size:.55rem
}
.subject-v2-stat strong{
  color:#cbd9e7;
  font-size:.67rem
}

/* Loading */
@keyframes subjectV2Pulse{0%,100%{opacity:.35}50%{opacity:.82}}
.subject-v2-skeleton{
  animation:subjectV2Pulse 1.25s ease-in-out infinite
}
.subject-v2-skeleton-line{
  display:block;
  height:10px;
  border-radius:999px;
  background:rgba(136,146,176,.10)
}

/* Sections */
.section{
  padding:20px 0 38px
}
.section-head{
  gap:10px;
  margin-bottom:18px
}
.section-index{display:none!important}
.section-head h2{
  font-size:clamp(1.45rem,2.5vw,1.95rem);
  letter-spacing:-.65px
}
.line{max-width:180px}
.note{margin-top:12px}

/* Session cards */
.activity-grid{
  gap:10px
}
.activity-card{
  min-height:198px;
  padding:17px;
  border-radius:14px;
  border-color:rgba(var(--route-rgb),.11);
  border-top-color:rgba(var(--route-rgb),.24);
  background:
    radial-gradient(280px circle at var(--spot-x) var(--spot-y),rgba(var(--route-rgb),.065),transparent 60%),
    linear-gradient(180deg,rgba(11,28,46,.94),rgba(7,20,34,.97));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.015)
}
.activity-card:hover{
  transform:translateY(-3px);
  border-color:rgba(var(--route-rgb),.25);
  box-shadow:0 16px 38px rgba(0,0,0,.18)
}
.activity-card::after{display:none}
.activity-top{
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:7px
}
.activity-number{
  min-height:23px;
  display:inline-flex;
  align-items:center;
  padding:0 7px;
  border:1px solid rgba(var(--route-rgb),.12);
  border-radius:7px;
  background:rgba(var(--route-rgb),.025);
  font-size:.56rem
}
.activity-type{
  min-height:23px;
  display:inline-flex;
  align-items:center;
  padding:0 7px;
  font-size:.50rem
}
.activity-card h3{
  margin:19px 0 7px;
  font-size:1.03rem
}
.activity-card p{
  font-size:.70rem;
  line-height:1.55
}
.activity-footer{
  margin-top:14px;
  padding-top:10px
}
.activity-footer span,.activity-footer b{
  font-size:.56rem
}

/* Progress state generated by Materias 2.0 */
.subject-session-progress{
  margin-left:auto;
  min-height:23px;
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:0 7px;
  border:1px solid rgba(136,146,176,.11);
  border-radius:999px;
  background:rgba(136,146,176,.025);
  color:#8397ad;
  font:800 .49rem Consolas,monospace;
  letter-spacing:.02em
}
.subject-session-progress::before{
  content:"";
  width:5px;height:5px;
  border-radius:50%;
  background:currentColor;
  box-shadow:0 0 8px currentColor
}
.subject-session-progress.completed{
  color:#8de8c6;
  border-color:rgba(114,246,194,.15);
  background:rgba(114,246,194,.025)
}
.subject-session-progress.in_progress{
  color:#88e3ff;
  border-color:rgba(85,216,255,.16);
  background:rgba(85,216,255,.028)
}
.subject-session-progress.available{
  color:#bca6dc;
  border-color:rgba(169,120,255,.13);
  background:rgba(169,120,255,.022)
}
.subject-session-progress.locked{
  color:#a0737c;
  border-color:rgba(255,122,144,.11);
  background:rgba(255,122,144,.018)
}
.activity-card:not(.cesba-session-disabled) .cesba-session-state.is-live{
  display:none!important
}
.activity-card.cesba-session-disabled .subject-session-progress{
  display:none!important
}
.cesba-session-state{
  margin-top:0!important;
  min-height:23px;
  padding:0 7px!important;
  font-size:.49rem!important
}
.activity-card.cesba-session-disabled{
  opacity:.52!important
}

.subject-session-line{
  height:4px;
  margin-top:11px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(136,146,176,.08)
}
.subject-session-line span{
  display:block;height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--route2),var(--route))
}

/* Technologies become secondary */
.tech-panel{
  padding:16px;
  gap:6px;
  border-radius:11px
}
.tech-panel span{padding:5px 7px;font-size:.54rem}
.footer{margin-top:28px;padding-top:18px}

/* Empty / admin overview */
.subject-v2-admin-note{
  grid-column:1/-1;
  min-height:92px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:17px;
  border:1px solid rgba(var(--route-rgb),.12);
  border-radius:15px;
  background:rgba(var(--route-rgb),.025)
}
.subject-v2-admin-note>span{
  width:36px;height:36px;
  flex:0 0 36px;
  display:grid;place-items:center;
  border:1px solid rgba(var(--route-rgb),.14);
  border-radius:10px;
  color:var(--route)
}
.subject-v2-admin-note strong,.subject-v2-admin-note small{display:block}
.subject-v2-admin-note strong{color:#cdd9e6;font-size:.72rem}
.subject-v2-admin-note small{margin-top:4px;color:#677e97;font-size:.58rem;line-height:1.5}

/* Responsive */
@media(max-width:900px){
  .subject-v2-dashboard{grid-template-columns:1fr}
  .subject-v2-stats{grid-template-columns:105px 1fr}
  .subject-v2-ring{width:100px;height:100px}
}
@media(max-width:760px){
  .shell{width:min(100% - 22px,760px)}
  .topbar{top:5px;min-height:60px}
  .hero{padding-top:28px}
  .hero h1{font-size:2.7rem}
  .activity-grid{grid-template-columns:1fr}
}
@media(max-width:520px){
  .identity small{display:none}
  .back{padding:0 8px}
  .subject-v2-main{padding:17px;min-height:190px}
  .subject-v2-main h2{font-size:1.35rem}
  .subject-v2-continue-footer{align-items:flex-start;flex-direction:column}
  .subject-v2-continue{width:100%}
  .subject-v2-stats{grid-template-columns:1fr;justify-items:center;text-align:center}
  .subject-v2-stat-list{width:100%}
  .subject-session-progress{margin-left:0}
}
