
/* Codex reading pages (Nevora) */
.codex-wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}
.codex-header{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.codex-header .crumbs{
  font-size: 12px;
  opacity: .85;
}
.codex-header .crumbs a{ text-decoration: none; }
.codex-title{
  font-size: 22px;
  margin: 6px 0 0;
}
.codex-sub{
  font-size: 13px;
  opacity: .9;
  margin-top: 6px;
}
.codex-card{
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  padding: 16px;
  margin: 14px 0;
}
.codex-card h2{ font-size: 16px; margin: 0 0 10px; }
.codex-card h3{ font-size: 14px; margin: 16px 0 8px; opacity: .95; }
.codex-body p{
  line-height: 1.55;
  margin: 0 0 12px;
  opacity: .98;
}
.codex-nav{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}
.codex-nav a{
  display:inline-block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  text-decoration:none;
  font-size: 13px;
}
.codex-list{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.codex-list a{
  text-decoration:none;
}
.codex-list .item{
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}
.codex-list .item .k{
  font-size: 12px;
  opacity: .85;
}
.codex-list .item .t{
  margin-top: 6px;
  font-size: 14px;
}
.codex-quiz .q{
  margin: 10px 0 14px;
}
.codex-quiz label{
  display:block;
  font-size: 13px;
  opacity: .95;
  margin-bottom: 6px;
}
.codex-quiz textarea{
  width:100%;
  min-height: 84px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: inherit;
  resize: vertical;
}
.codex-quiz .tf{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.codex-quiz .tf button{
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: inherit;
  cursor:pointer;
}
.codex-quiz .score{
  margin-top: 10px;
  font-size: 13px;
  opacity: .9;
}

/* Workbook prompts */
.workbook-prompt{
  margin: 14px 0;
}
.workbook-prompt label{
  display:block;
  font-size: 13px;
  opacity: .95;
  margin-bottom: 6px;
  font-weight: 500;
}
.workbook-prompt textarea{
  width:100%;
  min-height: 84px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: inherit;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}
.workbook-prompt textarea:focus{
  outline: none;
  border-color: rgba(107,255,214,0.45);
  box-shadow: 0 0 0 2px rgba(107,255,214,0.12);
}

.codex-footer{
  margin-top: 28px;
  text-align: center;
  opacity: .85;
  font-size: 13px;
}
.codex-footer a{
  color: inherit;
  text-decoration: none;
}
.codex-footer a:hover{
  text-decoration: underline;
}


/* --- Progress tracking (Volume I) --- */
.codex-progress{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.codex-progress .meta{
  font-size: 12px;
  color: var(--text-dim);
  opacity: .95;
}
.codex-progress-bar{
  display:flex;
  gap: 6px;
  align-items:center;
}
.codex-progress-bar .seg{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(140,170,255,.22);
}
.codex-progress-bar .seg.on{
  background: rgba(107,255,214,0.32);
  border-color: rgba(107,255,214,0.55);
}
.codex-complete-btn{
  white-space: nowrap;
}
.codex-reset-btn{
  margin-top: 10px;
}
a.done{
  position: relative;
  outline: none;
}
a.done .done-pill{
  margin-left: 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(107,255,214,0.20);
  border: 1px solid rgba(107,255,214,0.38);
  color: rgba(245,247,255,.92);
  font-size: 12px;
}
.codex-toc-summary{
  margin-top: 14px;
}
